src/Config.hh
author ekku
Mon, 08 Dec 2008 16:46:48 +0000
changeset 295 4d3adfbec077
parent 293 d40fbf8ba13b
child 300 417183866f35
permissions -rw-r--r--
Damage
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
283
7540b0859579 start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents: 276
diff changeset
    12
/**
7540b0859579 start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents: 276
diff changeset
    13
 * 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
    14
 */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    15
const float KG_PI = 3.14159265;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    16
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    17
// Physics simulation
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    18
// 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
    19
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
    20
const uint16_t MAP_HEIGHT = 800;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    21
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
    22
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    23
// Simulation
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    24
const uint16_t PHYSICS_TICK_MS = 10;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    25
283
7540b0859579 start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents: 276
diff changeset
    26
/**
7540b0859579 start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents: 276
diff changeset
    27
 * 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
    28
 */
214
6af842e348a4 Liero-kuvat lis?tty.
ekku
parents: 211
diff changeset
    29
const float MAP_GRAVITY = 1500.0;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    30
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    31
// Player properties
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    32
const float PLAYER_MASS = 10.0;
219
ec472f8ac482 fixed walkingspeed and improved drawing
nireco
parents: 214
diff changeset
    33
const float PLAYER_MOVE_FORCE = 1100.0;
ec472f8ac482 fixed walkingspeed and improved drawing
nireco
parents: 214
diff changeset
    34
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
    35
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
    36
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
    37
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
    38
const float PLAYER_INITIAL_X = 400.0;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    39
const float PLAYER_INITIAL_Y = 300.0;
261
91f769d490a6 a better crosshair
terom
parents: 258
diff changeset
    40
const float PLAYER_CROSSHAIR_DISTANCE = 20.0;
91f769d490a6 a better crosshair
terom
parents: 258
diff changeset
    41
const float PLAYER_CROSSHAIR_WIDTH = 4;
293
d40fbf8ba13b Added some text to documentation.
saiam
parents: 288
diff changeset
    42
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
    43
219
ec472f8ac482 fixed walkingspeed and improved drawing
nireco
parents: 214
diff changeset
    44
const float PLAYER_MAX_SPEED = 43;
ec472f8ac482 fixed walkingspeed and improved drawing
nireco
parents: 214
diff changeset
    45
const float PLAYER_WALK_SPEED = 33;
188
156df474ad00 sonffed Config.hh
nireco
parents: 185
diff changeset
    46
214
6af842e348a4 Liero-kuvat lis?tty.
ekku
parents: 211
diff changeset
    47
const float PLAYER_COLLISION_ELASTICITY = 0.25; // TODO: This could be
188
156df474ad00 sonffed Config.hh
nireco
parents: 185
diff changeset
    48
                                        // different for different
156df474ad00 sonffed Config.hh
nireco
parents: 185
diff changeset
    49
                                        // objects
288
47a5d7896aec some collisions on PhysicsWorld::tick
nireco
parents: 283
diff changeset
    50
const float PLAYER_RADIUS = 10;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    51
276
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    52
/*
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    53
 * Projectiles
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    54
 */
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    55
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    56
// 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
    57
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
    58
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
    59
// how far away from the player the projectile spawns
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
    60
const float PROJECTILE_START_DISTANCE = 10.0;
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
    61
276
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    62
/*
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    63
 * Rope
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    64
 */
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
// how much to grow the rope length by on every ROPE_UP/DOWN
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
    67
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
    68
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    69
// the force that the rope exerts on the player when the length is too long
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
    70
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
    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
// 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
    73
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
    74
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    75
// initial length... this should probably be a bit more dynamic?
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
    76
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
    77
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
    78
// initial velocity of the rope when thrown
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
    79
const float ROPE_VELOCITY = 500;
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
    80
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    81
// Graphical properties
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    82
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
    83
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
    84
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
    85
266
ad72d0a0cc02 increase the map size and control the camera to always have the screen full of terrain
terom
parents: 261
diff changeset
    86
// graphics params
ad72d0a0cc02 increase the map size and control the camera to always have the screen full of terrain
terom
parents: 261
diff changeset
    87
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
    88
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
    89
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
    90
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
    91
ad72d0a0cc02 increase the map size and control the camera to always have the screen full of terrain
terom
parents: 261
diff changeset
    92
ad72d0a0cc02 increase the map size and control the camera to always have the screen full of terrain
terom
parents: 261
diff changeset
    93
// Filesystem paths
220
1c92222af6d3 use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents: 219
diff changeset
    94
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
    95
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
    96
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    97
#endif