| author | ekku |
| Sun, 07 Dec 2008 18:21:44 +0000 | |
| changeset 247 | b87f68be579f |
| parent 235 | 0a0c729365ee |
| child 255 | 99431fdb0dc8 |
| permissions | -rw-r--r-- |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
1 |
#ifndef CONFIG_HH |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
2 |
#define CONFIG_HH |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
3 |
|
|
220
1c92222af6d3
use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents:
219
diff
changeset
|
4 |
// XXX: merge this as Config.hh.in? |
|
1c92222af6d3
use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents:
219
diff
changeset
|
5 |
#include "config.h" |
|
1c92222af6d3
use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents:
219
diff
changeset
|
6 |
|
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
7 |
#include <ClanLib/display.h> |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
8 |
|
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
9 |
// This is a temporary way to declare different constants. Maybe we |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
10 |
// should do somekind of resource manager? Do we have time? |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
11 |
|
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
12 |
// Mathematical constants |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
13 |
const float KG_PI = 3.14159265; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
14 |
|
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
15 |
// Physics simulation |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
16 |
// Physics resolution |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
17 |
const uint16_t MAP_WIDTH = 800; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
18 |
const uint16_t MAP_HEIGHT = 600; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
19 |
const float MAP_SCALE = 1; // One "pixel" in "real" units |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
20 |
// Simulation |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
21 |
const uint16_t PHYSICS_TICK_MS = 10; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
22 |
|
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
23 |
// Constants affecting physics |
| 214 | 24 |
const float MAP_GRAVITY = 1500.0; |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
25 |
|
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
26 |
// Player properties |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
27 |
const float PLAYER_MASS = 10.0; |
| 219 | 28 |
const float PLAYER_MOVE_FORCE = 1100.0; |
29 |
const float PLAYER_MIN_SPEED = 10.0; |
|
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
30 |
const float PLAYER_JUMP_MIN_DISTANCE = 5.0; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
31 |
const float PLAYER_AIM_MIN = -KG_PI/4; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
32 |
const float PLAYER_AIM_MAX = KG_PI/2; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
33 |
const float PLAYER_INITIAL_X = 400.0; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
34 |
const float PLAYER_INITIAL_Y = 300.0; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
35 |
const float CROSSHAIR_ANGLE_SPEED = PI/40; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
36 |
|
| 219 | 37 |
const float PLAYER_MAX_SPEED = 43; |
38 |
const float PLAYER_WALK_SPEED = 33; |
|
| 188 | 39 |
|
| 214 | 40 |
const float PLAYER_COLLISION_ELASTICITY = 0.25; // TODO: This could be |
| 188 | 41 |
// different for different |
42 |
// objects |
|
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
43 |
|
| 235 | 44 |
// how far away from the player the projectile spawns |
45 |
const float PROJECTILE_START_DISTANCE = 10.0; |
|
46 |
||
47 |
const float ROPE_GROWTH_RATE = 5; |
|
48 |
const float ROPE_FORCE = 3500; |
|
49 |
const float ROPE_MASS = 10.0; // same as player mass...? |
|
50 |
const float ROPE_LENGTH = 100.0; |
|
51 |
const float ROPE_VELOCITY = 500; |
|
52 |
||
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
53 |
// Graphical properties |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
54 |
const CL_Color COLOR_EMPTY(86, 41, 0); |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
55 |
const CL_Color COLOR_DIRT(144, 82, 23); |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
56 |
const CL_Color COLOR_ROCK(132, 136, 135); |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
57 |
|
|
233
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
220
diff
changeset
|
58 |
// Data paths |
|
220
1c92222af6d3
use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents:
219
diff
changeset
|
59 |
const std::string PLAYER_SKIN_PATH = (PROJECT_DATA_DIR "/skin.png"); |
|
233
ff4ecea83cf5
start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
terom
parents:
220
diff
changeset
|
60 |
const std::string RESOURCE_XML_PATH = (PROJECT_DATA_DIR "/resources.xml"); |
|
220
1c92222af6d3
use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents:
219
diff
changeset
|
61 |
|
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
62 |
#endif |