src/proto2/Config.hh
author nireco
Wed, 03 Dec 2008 14:25:23 +0000
changeset 182 84675387ca74
parent 160 ba0b6f421a3c
permissions -rw-r--r--
PhyWo draw, Shot speed, Shot.show_target, Shot is now drawn with const shape...
155
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     1
#ifndef CONFIG_HH
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     2
#define CONFIG_HH
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     3
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     4
#include <ClanLib/display.h>
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     5
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     6
// This is a temporary way to declare different constants. Maybe we
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     7
// should do somekind of resource manager? Do we have time?
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     8
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
     9
// Mathematical constants
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    10
const float KG_PI = 3.14159265;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    11
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    12
// Physics simulation
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    13
// Physics resolution
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    14
const uint16_t MAP_WIDTH = 800;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    15
const uint16_t MAP_HEIGHT = 600;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    16
const float MAP_SCALE = 1; // One "pixel" in "real" units
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    17
// Simulation
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    18
const uint16_t PHYSICS_TICK_MS = 10;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    19
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    20
// Constants affecting physics
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    21
const float MAP_GRAVITY = 1200.0;
182
84675387ca74 PhyWo draw, Shot speed, Shot.show_target, Shot is now drawn with const shape...
nireco
parents: 160
diff changeset
    22
const float PLAYER_COLLISION_ELASTICITY = 0.3; // TODO: This could be
155
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    23
                                        // different for different
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    24
                                        // objects
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    25
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    26
// Player properties
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    27
const float PLAYER_MASS = 10.0;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    28
const float PLAYER_MOVE_FORCE = 5000.0;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    29
const float PLAYER_MIN_SPEED = 30.0;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    30
const float PLAYER_JUMP_MIN_DISTANCE = 5.0;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    31
const float PLAYER_AIM_MIN = -KG_PI/4; 
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    32
const float PLAYER_AIM_MAX = KG_PI/2;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    33
const float PLAYER_INITIAL_X = 400.0;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    34
const float PLAYER_INITIAL_Y = 300.0;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    35
const float CROSSHAIR_ANGLE_SPEED = PI/40;
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    36
160
ba0b6f421a3c not anything big
nireco
parents: 158
diff changeset
    37
const float PLAYER_MAX_SPEED = 70;
ba0b6f421a3c not anything big
nireco
parents: 158
diff changeset
    38
155
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    39
// Graphical properties
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    40
const CL_Color COLOR_EMPTY(86, 41, 0);
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    41
const CL_Color COLOR_DIRT(144, 82, 23);
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    42
const CL_Color COLOR_ROCK(132, 136, 135);
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    43
1550a5eb725a Forgon this!
saiam
parents:
diff changeset
    44
#endif