| author | terom |
| Mon, 08 Dec 2008 18:36:06 +0000 | |
| changeset 304 | d0f60a97a85e |
| parent 300 | 417183866f35 |
| child 311 | 440763821484 |
| 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 |
|
|
283
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
276
diff
changeset
|
28 |
/** |
|
7540b0859579
start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents:
276
diff
changeset
|
29 |
* 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
|
30 |
*/ |
| 214 | 31 |
const float MAP_GRAVITY = 1500.0; |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
32 |
|
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
33 |
// Player properties |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
34 |
const float PLAYER_MASS = 10.0; |
| 219 | 35 |
const float PLAYER_MOVE_FORCE = 1100.0; |
36 |
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
|
37 |
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
|
38 |
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
|
39 |
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
|
40 |
const float PLAYER_INITIAL_X = 400.0; |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
41 |
const float PLAYER_INITIAL_Y = 300.0; |
| 261 | 42 |
const float PLAYER_CROSSHAIR_DISTANCE = 20.0; |
43 |
const float PLAYER_CROSSHAIR_WIDTH = 4; |
|
| 293 | 44 |
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
|
45 |
|
| 219 | 46 |
const float PLAYER_MAX_SPEED = 43; |
47 |
const float PLAYER_WALK_SPEED = 33; |
|
| 188 | 48 |
|
| 214 | 49 |
const float PLAYER_COLLISION_ELASTICITY = 0.25; // TODO: This could be |
| 188 | 50 |
// different for different |
51 |
// objects |
|
| 288 | 52 |
const float PLAYER_RADIUS = 10; |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
53 |
|
| 300 | 54 |
/** What size of hole to dig */ |
55 |
const float PLAYER_DIG_RADIUS = 15; |
|
56 |
||
57 |
/** Player's initial health */ |
|
58 |
const Health PLAYER_HEALTH = 100; |
|
59 |
||
60 |
/** How long to wait after dying to respawn */ |
|
61 |
const TimeMS PLAYER_RESPAWN_DELAY = 2500; |
|
62 |
||
|
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
63 |
/* |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
64 |
* Projectiles |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
65 |
*/ |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
66 |
|
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
67 |
// 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
|
68 |
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
|
69 |
|
| 235 | 70 |
// how far away from the player the projectile spawns |
71 |
const float PROJECTILE_START_DISTANCE = 10.0; |
|
72 |
||
|
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
73 |
/* |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
74 |
* Rope |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
75 |
*/ |
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
76 |
|
|
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
266
diff
changeset
|
77 |
// how much to grow the rope length by on every ROPE_UP/DOWN |
| 235 | 78 |
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
|
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 |
// the force that the rope exerts on the player when the length is too long |
| 235 | 81 |
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
|
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 |
// 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
|
84 |
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
|
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 |
// initial length... this should probably be a bit more dynamic? |
| 235 | 87 |
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
|
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 |
// initial velocity of the rope when thrown |
| 235 | 90 |
const float ROPE_VELOCITY = 500; |
91 |
||
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
92 |
// Graphical properties |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
93 |
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
|
94 |
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
|
95 |
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
|
96 |
|
|
266
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
97 |
// graphics params |
|
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
98 |
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
|
99 |
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
|
100 |
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
|
101 |
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
|
102 |
|
|
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
103 |
|
|
ad72d0a0cc02
increase the map size and control the camera to always have the screen full of terrain
terom
parents:
261
diff
changeset
|
104 |
// Filesystem paths |
|
220
1c92222af6d3
use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents:
219
diff
changeset
|
105 |
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
|
106 |
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
|
107 |
|
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
108 |
#endif |