Forgon this!
authorsaiam
Mon, 01 Dec 2008 10:36:05 +0000
changeset 155 1550a5eb725a
parent 154 78d144a48354
child 156 d3e6625cc695
Forgon this!
src/proto2/Config.hh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/proto2/Config.hh	Mon Dec 01 10:36:05 2008 +0000
@@ -0,0 +1,42 @@
+#ifndef CONFIG_HH
+#define CONFIG_HH
+
+#include <ClanLib/display.h>
+
+// This is a temporary way to declare different constants. Maybe we
+// should do somekind of resource manager? Do we have time?
+
+// Mathematical constants
+const float KG_PI = 3.14159265;
+
+// Physics simulation
+// Physics resolution
+const uint16_t MAP_WIDTH = 800;
+const uint16_t MAP_HEIGHT = 600;
+const float MAP_SCALE = 1; // One "pixel" in "real" units
+// Simulation
+const uint16_t PHYSICS_TICK_MS = 10;
+
+// Constants affecting physics
+const float MAP_GRAVITY = 1200.0;
+const float COLLISION_ELASTICITY = 0.7; // TODO: This could be
+                                        // different for different
+                                        // objects
+
+// Player properties
+const float PLAYER_MASS = 10.0;
+const float PLAYER_MOVE_FORCE = 5000.0;
+const float PLAYER_MIN_SPEED = 30.0;
+const float PLAYER_JUMP_MIN_DISTANCE = 5.0;
+const float PLAYER_AIM_MIN = -KG_PI/4; 
+const float PLAYER_AIM_MAX = KG_PI/2;
+const float PLAYER_INITIAL_X = 400.0;
+const float PLAYER_INITIAL_Y = 300.0;
+const float CROSSHAIR_ANGLE_SPEED = PI/40;
+
+// Graphical properties
+const CL_Color COLOR_EMPTY(86, 41, 0);
+const CL_Color COLOR_DIRT(144, 82, 23);
+const CL_Color COLOR_ROCK(132, 136, 135);
+
+#endif