Moved constants to one header Config.hh, we probably should use somekind of resourcemanager. But do we have time for that? :)
--- a/src/proto2/GameState.hh Sat Nov 29 17:59:49 2008 +0000
+++ b/src/proto2/GameState.hh Sat Nov 29 20:59:50 2008 +0000
@@ -3,29 +3,12 @@
#include "Physics.hh"
#include "Input.hh"
+#include "Config.hh"
#include <list>
#include <stdexcept>
#include <cmath>
-const float KG_PI = 3.14159265;
-
-// in cells/kg
-const uint16_t MAP_WIDTH = 800;
-const uint16_t MAP_HEIGHT = 600;
-const float MAP_GRAVITY = 1200.0;
-const float COLLISION_ELASTICITY = 0.4;
-
-const float PLAYER_MASS = 10.0;
-const float PLAYER_MOVE_FORCE = 5000.0;
-const float PLAYER_INITIAL_X = 400.0;
-const float PLAYER_INITIAL_Y = 300.0;
-const float PLAYER_MIN_SPEED = 10.0;
-
-const float CROSSHAIR_ANGLE_SPEED = PI/40; // TODO: Adjust this
-const float PLAYER_AIM_MIN = -KG_PI/4; // TODO: -- || --
-const float PLAYER_AIM_MAX = KG_PI/2; // TODO: -- || --
-
// forward-declare GameState
class GameState;
--- a/src/proto2/Physics.hh Sat Nov 29 17:59:49 2008 +0000
+++ b/src/proto2/Physics.hh Sat Nov 29 20:59:50 2008 +0000
@@ -6,6 +6,7 @@
#include <ClanLib/core.h>
#include "Vector.hh"
+#include "Config.hh"
// Forward declares
class PhysicsWorld;
@@ -22,9 +23,6 @@
// TODO: Random definitions. Should these be somewhere else?
enum TerrainType {EMPTY, DIRT, ROCK};
-// This probably should come from somewhere else
-const TimeMS PHYSICS_TICK_MS = 10;
-
// Yeah?!?!?! Atleast this could be documented. Contains vectors
// presenting all the 8 directions in a square grid?
const Vector DIRECTIONS[] = { Vector(0,-1), Vector(1,-1), Vector(1,0),