CameraConfig Class Reference

List of all members.

Public Member Functions

 CameraConfig ()
void load (const std::string &filename)

Public Attributes

int xmode
int ymode
float kirby_rectsize_x
float kirby_rectsize_y
float target_x
float target_y
float max_speed_x
float max_speed_y
float dynamic_max_speed_x
float dirchange_time
float edge_x
float sensitive_x
float clamp_x
float clamp_y
float dynamic_speed_sm

Detailed Description

Definition at line 37 of file camera.cpp.


Constructor & Destructor Documentation

CameraConfig::CameraConfig (  )  [inline]

Definition at line 69 of file camera.cpp.

00069                  :
00070     xmode(4),
00071     ymode(3),
00072     kirby_rectsize_x(0.2f),
00073     kirby_rectsize_y(0.34f),
00074     target_x(.5f),
00075     target_y(.5f),
00076     max_speed_x(100),
00077     max_speed_y(100),
00078     dynamic_max_speed_x(1.0),
00079     dirchange_time(0.2f),
00080     edge_x(0.4f),
00081     sensitive_x(-1),
00082     clamp_x(0.1666f),
00083     clamp_y(0.3f),
00084     dynamic_speed_sm(0.8f)
00085   {
00086   }


Member Function Documentation

void CameraConfig::load ( const std::string &  filename  )  [inline]

Definition at line 88 of file camera.cpp.

References clamp_x, clamp_y, dirchange_time, dynamic_max_speed_x, dynamic_speed_sm, edge_x, lisp::Lisp::get(), lisp::Lisp::get_lisp(), kirby_rectsize_x, kirby_rectsize_y, max_speed_x, max_speed_y, lisp::Parser::parse(), sensitive_x, target_x, target_y, xmode, and ymode.

Referenced by Camera::reload_config().

00089   {
00090     lisp::Parser parser;
00091     const lisp::Lisp* root = parser.parse(filename);
00092     const lisp::Lisp* camconfig = root->get_lisp("camera-config");
00093     if(camconfig == NULL)
00094       throw std::runtime_error("file is not a camera config file.");
00095 
00096     camconfig->get("xmode", xmode);
00097     camconfig->get("ymode", ymode);
00098     camconfig->get("target-x", target_x);
00099     camconfig->get("target-y", target_y);
00100     camconfig->get("max-speed-x", max_speed_x);
00101     camconfig->get("max-speed-y", max_speed_y);
00102     camconfig->get("dynamic-max-speed-x", dynamic_max_speed_x);
00103     camconfig->get("dirchange-time", dirchange_time);
00104     camconfig->get("clamp-x", clamp_x);
00105     camconfig->get("clamp-y", clamp_y);
00106     camconfig->get("kirby-rectsize-x", kirby_rectsize_x);
00107     camconfig->get("kirby-rectsize-y", kirby_rectsize_y);
00108     camconfig->get("edge-x", edge_x);
00109     camconfig->get("sensitive-x", sensitive_x);
00110     camconfig->get("dynamic-speed-sm", dynamic_speed_sm);
00111   }


Member Data Documentation

int CameraConfig::xmode

Definition at line 41 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

int CameraConfig::ymode

Definition at line 43 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::kirby_rectsize_x

Definition at line 44 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::kirby_rectsize_y

Definition at line 45 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::target_x

Definition at line 47 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::target_y

Definition at line 48 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::max_speed_x

Definition at line 50 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::max_speed_y

Definition at line 51 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::dynamic_max_speed_x

Definition at line 53 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::dirchange_time

Definition at line 57 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::edge_x

Definition at line 59 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::sensitive_x

Definition at line 62 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::clamp_x

Definition at line 64 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::clamp_y

Definition at line 65 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().

float CameraConfig::dynamic_speed_sm

Definition at line 67 of file camera.cpp.

Referenced by load(), and Camera::update_scroll_normal().


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 03:38:29 2014 for SuperTux by  doxygen 1.5.1