src/Config.hh
branchnew_graphics
changeset 418 194bc810a570
parent 417 c503e0c6a740
child 423 947ab54de4b7
--- a/src/Config.hh	Thu Jan 22 01:53:05 2009 +0200
+++ b/src/Config.hh	Thu Jan 22 02:38:33 2009 +0200
@@ -17,39 +17,69 @@
 #include <ClanLib/display.h>
 
 /**
- * The value of pi used in physics/graphics calculations
+ * @name General
+ * @{
  */
-const float KG_PI = 3.14159265;
+
+// @}
 
 /**
- * Random generator seed to use for terrain generator
+ * @name Terrain
+ * @{
  */
+
+/** Default random generator seed to use for terrain generator */
 const int TERRAIN_RANDOM_SEED = 1337;
 
+/** Default terrain size, equal to physics simulation size */
+const PixelDimensions TERRAIN_DIMENSIONS (1000, 800);
+
+/** Base color of empty space (i.e. background color) */
+const CL_Color COLOR_EMPTY(86, 41, 0);
+
+/** Base color of dirt */
+const CL_Color COLOR_DIRT(144, 82, 23);
+
+/** Base color of rock */
+const CL_Color COLOR_ROCK(132, 136, 135);
+
+
+// @}
+
 /**
- * Terrain size, equal to physics simulation size
+ * @name Engine
+ * @{
  */
-const PixelDimension TERRAIN_WIDTH = 1000;
-const PixelDimension TERRAIN_HEIGHT = 800;
 
 /** Engine timeout, this determines our minimum tick rate */
 const TimeMS ENGINE_TIMEOUT_MS = 10;
 
+/** Default log output level */
+const LogLevel DEFAULT_LOG_LEVEL = DEBUG;
+
+// @}
+
+/**
+ * @name Physics
+ * @{
+ */
+
+/** The value of pi used in physics/graphics calculations */
+const float KG_PI = 3.14159265;
+
 /** Physics tick interval */
 const TimeMS PHYSICS_TICK_MS = 10;
 
-/** Input handling keyboard poll interval */
-const TimeMS INPUT_POLL_INTERVAL = 10;
+/** The force of gravity on objects, exerted on the Y axis */
+const float MAP_GRAVITY = 1500.0;
 
-/** How long to block INPUT_FLAG_NOREPEAT for */
-const TimeMS INPUT_REPEAT_DELAY = 250;
+// @}
 
 /**
- * The force of gravity on objects, exerted on the Y axis
+ * @name Player
+ * @{
  */
-const float MAP_GRAVITY = 1500.0;
 
-// Player properties
 const float PLAYER_MASS = 10.0;
 const float PLAYER_MOVE_FORCE = 1100.0;
 const float PLAYER_MIN_SPEED = 10.0;
@@ -61,16 +91,12 @@
 const float PLAYER_CROSSHAIR_DISTANCE = 20.0;
 const float PLAYER_CROSSHAIR_WIDTH = 4;
 const float CROSSHAIR_ANGLE_SPEED = PI/2000;
-
 const float PLAYER_MAX_SPEED = 43;
 const float PLAYER_WALK_SPEED = 33;
-
-const float PLAYER_COLLISION_ELASTICITY = 0.25; // TODO: This could be
-                                        // different for different
-                                        // objects
+const float PLAYER_COLLISION_ELASTICITY = 0.25;
 const float PLAYER_RADIUS = 10;
 
-/** What size of hole to dig */
+/** Radius if ground removed on digging */
 const float PLAYER_DIG_RADIUS = 15;
 
 /** Player's initial health */
@@ -79,17 +105,22 @@
 /** How long to wait after dying to respawn */
 const TimeMS PLAYER_RESPAWN_DELAY = 2500;
 
-/*
- * Projectiles
+// @}
+
+/**
+ * @name Projectile
+ * @{
  */
 
-// object mass...
+/** Projectiles mass is irrelevant */
 const float PROJECTILE_MASS = 10.0;
 
-// how far away from the player the projectile spawns
+/** How far away from the player the projectile spawns */
 const float PROJECTILE_START_DISTANCE = 10.0;
 
-/*
+// @}
+
+/**
  * @name Rope
  * @{
  */
@@ -117,23 +148,34 @@
 
 // @}
 
-// 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);
+/**
+ * @name Graphics/Input
+ * @{
+ */
 
-// graphics params
+/** Window title, XXX: PROJECT_VERSION is unreliable */
 const std::string GRAPHICS_WINDOW_TITLE = (std::string() + PROJECT_LONG_NAME + " : Version " + PROJECT_VERSION);
-const uint32_t GRAPHICS_RESOLUTION_WIDTH = 800;
-const uint32_t GRAPHICS_RESOLUTION_HEIGHT = 600;
-const uint16_t GRAPHICS_UPDATE_INTERVAL_MS = 20;
+
+/** Default resolution */
+const PixelDimensions GRAPHICS_RESOLUTION (800, 600);
+
+/** Interval between frames */
+const TimeMS GRAPHICS_UPDATE_INTERVAL_MS = 20;
+
+/** Default fullscreen mode? */
 const bool GRAPHICS_FULLSCREEN = false;
 
-/**
- * Number of pixels between lines
- */
+/** Number of pixels between lines */
 const PixelDimension GRAPHICS_INFO_TEXT_LINE_OFFSET = 5;
 
+/** Input handling keyboard poll interval */
+const TimeMS INPUT_POLL_INTERVAL = 10;
+
+/** How long to block INPUT_FLAG_NOREPEAT for */
+const TimeMS INPUT_REPEAT_DELAY = 250;
+
+// @}
+
 /**
  * @name Network
  * @{