src/Config.hh
changeset 423 947ab54de4b7
parent 418 194bc810a570
child 432 82b0f4e55a13
equal deleted inserted replaced
422:5e4c8631779e 423:947ab54de4b7
    11 #include "config.h"
    11 #include "config.h"
    12 
    12 
    13 // custom types
    13 // custom types
    14 #include "Types.hh"
    14 #include "Types.hh"
    15 
    15 
    16 // for CL_Color
    16 // for Color
    17 #include <ClanLib/display.h>
    17 #include "Graphics/Color.hh"
       
    18 using graphics::Color;
    18 
    19 
    19 /**
    20 /**
    20  * @name General
    21  * @name General
    21  * @{
    22  * @{
    22  */
    23  */
    33 
    34 
    34 /** Default terrain size, equal to physics simulation size */
    35 /** Default terrain size, equal to physics simulation size */
    35 const PixelDimensions TERRAIN_DIMENSIONS (1000, 800);
    36 const PixelDimensions TERRAIN_DIMENSIONS (1000, 800);
    36 
    37 
    37 /** Base color of empty space (i.e. background color) */
    38 /** Base color of empty space (i.e. background color) */
    38 const CL_Color COLOR_EMPTY(86, 41, 0);
    39 const Color COLOR_EMPTY(86, 41, 0);
    39 
    40 
    40 /** Base color of dirt */
    41 /** Base color of dirt */
    41 const CL_Color COLOR_DIRT(144, 82, 23);
    42 const Color COLOR_DIRT(144, 82, 23);
    42 
    43 
    43 /** Base color of rock */
    44 /** Base color of rock */
    44 const CL_Color COLOR_ROCK(132, 136, 135);
    45 const Color COLOR_ROCK(132, 136, 135);
    45 
    46 
    46 
    47 
    47 // @}
    48 // @}
    48 
    49 
    49 /**
    50 /**
    63  * @name Physics
    64  * @name Physics
    64  * @{
    65  * @{
    65  */
    66  */
    66 
    67 
    67 /** The value of pi used in physics/graphics calculations */
    68 /** The value of pi used in physics/graphics calculations */
    68 const float KG_PI = 3.14159265;
    69 const float KG_PI = 3.14159265f;
    69 
    70 
    70 /** Physics tick interval */
    71 /** Physics tick interval */
    71 const TimeMS PHYSICS_TICK_MS = 10;
    72 const TimeMS PHYSICS_TICK_MS = 10;
    72 
    73 
    73 /** The force of gravity on objects, exerted on the Y axis */
    74 /** The force of gravity on objects, exerted on the Y axis */
    82 
    83 
    83 const float PLAYER_MASS = 10.0;
    84 const float PLAYER_MASS = 10.0;
    84 const float PLAYER_MOVE_FORCE = 1100.0;
    85 const float PLAYER_MOVE_FORCE = 1100.0;
    85 const float PLAYER_MIN_SPEED = 10.0;
    86 const float PLAYER_MIN_SPEED = 10.0;
    86 const float PLAYER_JUMP_MIN_DISTANCE = 5.0;
    87 const float PLAYER_JUMP_MIN_DISTANCE = 5.0;
    87 const float PLAYER_AIM_MIN = -3*KG_PI/8; 
    88 const float PLAYER_AIM_MIN = -3 * KG_PI / 8; 
    88 const float PLAYER_AIM_MAX = KG_PI/2;
    89 const float PLAYER_AIM_MAX = KG_PI / 2;
    89 const float PLAYER_INITIAL_X = 400.0;
    90 const float PLAYER_INITIAL_X = 400.0;
    90 const float PLAYER_INITIAL_Y = 300.0;
    91 const float PLAYER_INITIAL_Y = 300.0;
    91 const float PLAYER_CROSSHAIR_DISTANCE = 20.0;
    92 const float PLAYER_CROSSHAIR_DISTANCE = 20.0;
    92 const float PLAYER_CROSSHAIR_WIDTH = 4;
    93 const float PLAYER_CROSSHAIR_WIDTH = 4;
    93 const float CROSSHAIR_ANGLE_SPEED = PI/2000;
    94 const float CROSSHAIR_ANGLE_SPEED = KG_PI / 2000;
    94 const float PLAYER_MAX_SPEED = 43;
    95 const float PLAYER_MAX_SPEED = 43;
    95 const float PLAYER_WALK_SPEED = 33;
    96 const float PLAYER_WALK_SPEED = 33;
    96 const float PLAYER_COLLISION_ELASTICITY = 0.25;
    97 const float PLAYER_COLLISION_ELASTICITY = 0.25;
    97 const float PLAYER_RADIUS = 10;
    98 const float PLAYER_RADIUS = 10;
    98 
    99 
   141 const float ROPE_VELOCITY = 500;
   142 const float ROPE_VELOCITY = 500;
   142 
   143 
   143 /**
   144 /**
   144  * Rope colors, it should alternate between these two
   145  * Rope colors, it should alternate between these two
   145  */
   146  */
   146 const CL_Color ROPE_COLOR_LIGHT = CL_Color(198, 100, 2);
   147 const Color ROPE_COLOR_LIGHT(198, 100, 2);
   147 const CL_Color ROPE_COLOR_DARK = CL_Color(159, 79, 1);
   148 const Color ROPE_COLOR_DARK(159, 79, 1);
   148 
   149 
   149 // @}
   150 // @}
   150 
   151 
   151 /**
   152 /**
   152  * @name Graphics/Input
   153  * @name Graphics/Input