author | nireco |
Mon, 08 Dec 2008 22:57:01 +0000 | |
changeset 325 | a19c78786d7f |
parent 311 | 440763821484 |
child 377 | 01d3c340b372 |
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 |
|
300 | 7 |
#include "Types.hh" |
8 |
||
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
9 |
#include <ClanLib/display.h> |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
10 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
11 |
// 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
|
12 |
// 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
|
13 |
|
283
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
276
diff
changeset
|
14 |
/** |
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
276
diff
changeset
|
15 |
* The value of pi used in physics/graphics calculations |
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
276
diff
changeset
|
16 |
*/ |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
17 |
const float KG_PI = 3.14159265; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
18 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
19 |
// Physics simulation |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
20 |
// Physics resolution |
266
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
21 |
const uint16_t MAP_WIDTH = 1000; |
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
22 |
const uint16_t MAP_HEIGHT = 800; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
23 |
const float MAP_SCALE = 1; // One "pixel" in "real" units |
266
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
24 |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
25 |
// Simulation |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
26 |
const uint16_t PHYSICS_TICK_MS = 10; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
27 |
|
311
440763821484
make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents:
300
diff
changeset
|
28 |
/** Input handling keyboard poll interval */ |
440763821484
make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents:
300
diff
changeset
|
29 |
const TimeMS INPUT_POLL_INTERVAL = 10; |
440763821484
make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents:
300
diff
changeset
|
30 |
|
440763821484
make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents:
300
diff
changeset
|
31 |
/** How long to block INPUT_FLAG_NOREPEAT for */ |
440763821484
make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents:
300
diff
changeset
|
32 |
const TimeMS INPUT_REPEAT_DELAY = 250; |
440763821484
make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents:
300
diff
changeset
|
33 |
|
283
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
276
diff
changeset
|
34 |
/** |
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
276
diff
changeset
|
35 |
* The force of gravity on objects, exerted on the Y axis |
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
276
diff
changeset
|
36 |
*/ |
214 | 37 |
const float MAP_GRAVITY = 1500.0; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
38 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
39 |
// Player properties |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
40 |
const float PLAYER_MASS = 10.0; |
219 | 41 |
const float PLAYER_MOVE_FORCE = 1100.0; |
42 |
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
|
43 |
const float PLAYER_JUMP_MIN_DISTANCE = 5.0; |
258
833ad8d7db8b
The first weapon now has a recoil so that you can fly. There is a bug with facing when you are flying with recoil.
saiam
parents:
255
diff
changeset
|
44 |
const float PLAYER_AIM_MIN = -3*KG_PI/8; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
45 |
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
|
46 |
const float PLAYER_INITIAL_X = 400.0; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
47 |
const float PLAYER_INITIAL_Y = 300.0; |
261 | 48 |
const float PLAYER_CROSSHAIR_DISTANCE = 20.0; |
49 |
const float PLAYER_CROSSHAIR_WIDTH = 4; |
|
293 | 50 |
const float CROSSHAIR_ANGLE_SPEED = PI/2000; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
51 |
|
219 | 52 |
const float PLAYER_MAX_SPEED = 43; |
53 |
const float PLAYER_WALK_SPEED = 33; |
|
188 | 54 |
|
214 | 55 |
const float PLAYER_COLLISION_ELASTICITY = 0.25; // TODO: This could be |
188 | 56 |
// different for different |
57 |
// objects |
|
288 | 58 |
const float PLAYER_RADIUS = 10; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
59 |
|
300 | 60 |
/** What size of hole to dig */ |
61 |
const float PLAYER_DIG_RADIUS = 15; |
|
62 |
||
63 |
/** Player's initial health */ |
|
64 |
const Health PLAYER_HEALTH = 100; |
|
65 |
||
66 |
/** How long to wait after dying to respawn */ |
|
67 |
const TimeMS PLAYER_RESPAWN_DELAY = 2500; |
|
68 |
||
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
69 |
/* |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
70 |
* Projectiles |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
71 |
*/ |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
72 |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
73 |
// object mass... |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
74 |
const float PROJECTILE_MASS = 10.0; |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
75 |
|
235 | 76 |
// how far away from the player the projectile spawns |
77 |
const float PROJECTILE_START_DISTANCE = 10.0; |
|
78 |
||
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
79 |
/* |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
80 |
* Rope |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
81 |
*/ |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
82 |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
83 |
// how much to grow the rope length by on every ROPE_UP/DOWN |
235 | 84 |
const float ROPE_GROWTH_RATE = 5; |
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
85 |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
86 |
// the force that the rope exerts on the player when the length is too long |
235 | 87 |
const float ROPE_FORCE = 3500; |
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
88 |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
89 |
// same as player mass...? |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
90 |
const float ROPE_MASS = 10.0; |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
91 |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
92 |
// initial length... this should probably be a bit more dynamic? |
235 | 93 |
const float ROPE_LENGTH = 100.0; |
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
94 |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
95 |
// initial velocity of the rope when thrown |
235 | 96 |
const float ROPE_VELOCITY = 500; |
97 |
||
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
98 |
// Graphical properties |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
99 |
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
|
100 |
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
|
101 |
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
|
102 |
|
266
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
103 |
// graphics params |
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
104 |
const std::string GRAPHICS_WINDOW_TITLE = "Kisna Glista"; |
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
105 |
const uint32_t GRAPHICS_RESOLUTION_WIDTH = 800; |
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
106 |
const uint32_t GRAPHICS_RESOLUTION_HEIGHT = 600; |
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
107 |
const uint16_t GRAPHICS_UPDATE_INTERVAL_MS = 20; |
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
108 |
|
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
109 |
|
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
110 |
// Filesystem paths |
220
1c92222af6d3
use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents:
219
diff
changeset
|
111 |
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
|
112 |
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
|
113 |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
114 |
#endif |