src/Config.hh
author Tero Marttila <terom@fixme.fi>
Tue, 27 Jan 2009 00:25:58 +0200
changeset 439 9823e6cd1086
parent 432 82b0f4e55a13
permissions -rw-r--r--
some README text
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
412
721c60072091 new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents: 408
diff changeset
     4
/**
721c60072091 new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents: 408
diff changeset
     5
 * @file
721c60072091 new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents: 408
diff changeset
     6
 *
721c60072091 new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents: 408
diff changeset
     7
 * Various constants used to define application/game behaviour
721c60072091 new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents: 408
diff changeset
     8
 */
721c60072091 new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents: 408
diff changeset
     9
721c60072091 new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents: 408
diff changeset
    10
// build settings
220
1c92222af6d3 use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents: 219
diff changeset
    11
#include "config.h"
1c92222af6d3 use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents: 219
diff changeset
    12
412
721c60072091 new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents: 408
diff changeset
    13
// custom types
300
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
    14
#include "Types.hh"
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
    15
423
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    16
// for Color
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    17
#include "Graphics/Color.hh"
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    18
using graphics::Color;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    19
283
7540b0859579 start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents: 276
diff changeset
    20
/**
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    21
 * @name General
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    22
 * @{
283
7540b0859579 start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents: 276
diff changeset
    23
 */
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    24
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    25
// @}
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    26
408
e6cfc44266af reorganize Terrain/PhysicsWorld/GameState/Engine to use NetworkClientConnect, and hence handle the connection process asynchronously, and finally properly implement receiving the terrain data from the server
Tero Marttila <terom@fixme.fi>
parents: 398
diff changeset
    27
/**
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    28
 * @name Terrain
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    29
 * @{
408
e6cfc44266af reorganize Terrain/PhysicsWorld/GameState/Engine to use NetworkClientConnect, and hence handle the connection process asynchronously, and finally properly implement receiving the terrain data from the server
Tero Marttila <terom@fixme.fi>
parents: 398
diff changeset
    30
 */
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    31
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    32
/** Default random generator seed to use for terrain generator */
408
e6cfc44266af reorganize Terrain/PhysicsWorld/GameState/Engine to use NetworkClientConnect, and hence handle the connection process asynchronously, and finally properly implement receiving the terrain data from the server
Tero Marttila <terom@fixme.fi>
parents: 398
diff changeset
    33
const int TERRAIN_RANDOM_SEED = 1337;
e6cfc44266af reorganize Terrain/PhysicsWorld/GameState/Engine to use NetworkClientConnect, and hence handle the connection process asynchronously, and finally properly implement receiving the terrain data from the server
Tero Marttila <terom@fixme.fi>
parents: 398
diff changeset
    34
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    35
/** Default terrain size, equal to physics simulation size */
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    36
const PixelDimensions TERRAIN_DIMENSIONS (1000, 800);
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    37
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    38
/** Base color of empty space (i.e. background color) */
423
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    39
const Color COLOR_EMPTY(86, 41, 0);
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    40
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    41
/** Base color of dirt */
423
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    42
const Color COLOR_DIRT(144, 82, 23);
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    43
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    44
/** Base color of rock */
423
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    45
const Color COLOR_ROCK(132, 136, 135);
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    46
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    47
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    48
// @}
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    49
408
e6cfc44266af reorganize Terrain/PhysicsWorld/GameState/Engine to use NetworkClientConnect, and hence handle the connection process asynchronously, and finally properly implement receiving the terrain data from the server
Tero Marttila <terom@fixme.fi>
parents: 398
diff changeset
    50
/**
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    51
 * @name Engine
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    52
 * @{
408
e6cfc44266af reorganize Terrain/PhysicsWorld/GameState/Engine to use NetworkClientConnect, and hence handle the connection process asynchronously, and finally properly implement receiving the terrain data from the server
Tero Marttila <terom@fixme.fi>
parents: 398
diff changeset
    53
 */
266
ad72d0a0cc02 increase the map size and control the camera to always have the screen full of terrain
terom
parents: 261
diff changeset
    54
380
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 377
diff changeset
    55
/** Engine timeout, this determines our minimum tick rate */
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 377
diff changeset
    56
const TimeMS ENGINE_TIMEOUT_MS = 10;
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 377
diff changeset
    57
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    58
/** Default log output level */
432
82b0f4e55a13 add NetworkChannelPacket class, and modify NetworkTarget::send/send_raw signature. Add hard-coded DEBUG_ENABLED define
Tero Marttila <terom@fixme.fi>
parents: 423
diff changeset
    59
const LogLevel DEFAULT_LOG_LEVEL = DEBUG_ENABLED ? DEBUG : INFO;
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    60
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    61
// @}
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    62
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    63
/**
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    64
 * @name Physics
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    65
 * @{
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    66
 */
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    67
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    68
/** The value of pi used in physics/graphics calculations */
423
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    69
const float KG_PI = 3.14159265f;
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    70
380
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 377
diff changeset
    71
/** Physics tick interval */
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 377
diff changeset
    72
const TimeMS PHYSICS_TICK_MS = 10;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    73
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    74
/** The force of gravity on objects, exerted on the Y axis */
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    75
const float MAP_GRAVITY = 1500.0;
311
440763821484 make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents: 300
diff changeset
    76
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    77
// @}
311
440763821484 make Input have its own timer, and add key-repeat handling, and fix some warnings
terom
parents: 300
diff changeset
    78
283
7540b0859579 start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents: 276
diff changeset
    79
/**
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    80
 * @name Player
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    81
 * @{
283
7540b0859579 start adding some documentation, most core classes (outside of Network) are now doxygen-enabled
terom
parents: 276
diff changeset
    82
 */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    83
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    84
const float PLAYER_MASS = 10.0;
219
ec472f8ac482 fixed walkingspeed and improved drawing
nireco
parents: 214
diff changeset
    85
const float PLAYER_MOVE_FORCE = 1100.0;
ec472f8ac482 fixed walkingspeed and improved drawing
nireco
parents: 214
diff changeset
    86
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
    87
const float PLAYER_JUMP_MIN_DISTANCE = 5.0;
423
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    88
const float PLAYER_AIM_MIN = -3 * KG_PI / 8; 
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    89
const float PLAYER_AIM_MAX = KG_PI / 2;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    90
const float PLAYER_INITIAL_X = 400.0;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    91
const float PLAYER_INITIAL_Y = 300.0;
261
91f769d490a6 a better crosshair
terom
parents: 258
diff changeset
    92
const float PLAYER_CROSSHAIR_DISTANCE = 20.0;
91f769d490a6 a better crosshair
terom
parents: 258
diff changeset
    93
const float PLAYER_CROSSHAIR_WIDTH = 4;
423
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
    94
const float CROSSHAIR_ANGLE_SPEED = KG_PI / 2000;
219
ec472f8ac482 fixed walkingspeed and improved drawing
nireco
parents: 214
diff changeset
    95
const float PLAYER_MAX_SPEED = 43;
ec472f8ac482 fixed walkingspeed and improved drawing
nireco
parents: 214
diff changeset
    96
const float PLAYER_WALK_SPEED = 33;
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
    97
const float PLAYER_COLLISION_ELASTICITY = 0.25;
288
47a5d7896aec some collisions on PhysicsWorld::tick
nireco
parents: 283
diff changeset
    98
const float PLAYER_RADIUS = 10;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    99
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   100
/** Radius if ground removed on digging */
300
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
   101
const float PLAYER_DIG_RADIUS = 15;
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
   102
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
   103
/** Player's initial health */
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
   104
const Health PLAYER_HEALTH = 100;
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
   105
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
   106
/** How long to wait after dying to respawn */
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
   107
const TimeMS PLAYER_RESPAWN_DELAY = 2500;
417183866f35 suicide key and respawning
terom
parents: 293
diff changeset
   108
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   109
// @}
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   110
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   111
/**
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   112
 * @name Projectile
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   113
 * @{
276
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
   114
 */
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
   115
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   116
/** Projectiles mass is irrelevant */
276
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
   117
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
   118
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   119
/** How far away from the player the projectile spawns */
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
   120
const float PROJECTILE_START_DISTANCE = 10.0;
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
   121
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   122
// @}
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   123
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   124
/**
377
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   125
 * @name Rope
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   126
 * @{
276
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
   127
 */
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
   128
377
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   129
/** How much to grow the rope length by on every ROPE_UP/DOWN */
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
   130
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
   131
377
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   132
/** The force that the rope exerts on the player when the length is too long */
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
   133
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
   134
377
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   135
/** Same as player mass...? */
276
87434abc1ba1 ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents: 266
diff changeset
   136
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
   137
377
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   138
/** Initial rope length... this should probably be a bit more dynamic? */
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
   139
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
   140
377
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   141
/** Initial velocity of the rope when thrown */
235
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
   142
const float ROPE_VELOCITY = 500;
0a0c729365ee code cleanup
terom
parents: 233
diff changeset
   143
377
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   144
/**
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   145
 * Rope colors, it should alternate between these two
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   146
 */
423
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
   147
const Color ROPE_COLOR_LIGHT(198, 100, 2);
947ab54de4b7 fix worst compilation errors when using the debian lenny gcc/libc...
Tero Marttila <terom@fixme.fi>
parents: 418
diff changeset
   148
const Color ROPE_COLOR_DARK(159, 79, 1);
377
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   149
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   150
// @}
01d3c340b372 direction normalization functions in vector, change rope color, misc comments+whitespace
terom
parents: 311
diff changeset
   151
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   152
/**
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   153
 * @name Graphics/Input
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   154
 * @{
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   155
 */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   156
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   157
/** Window title, XXX: PROJECT_VERSION is unreliable */
398
306825786fba more tweaking of version.c ... maybe it works now
Tero Marttila <terom@fixme.fi>
parents: 397
diff changeset
   158
const std::string GRAPHICS_WINDOW_TITLE = (std::string() + PROJECT_LONG_NAME + " : Version " + PROJECT_VERSION);
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   159
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   160
/** Default resolution */
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   161
const PixelDimensions GRAPHICS_RESOLUTION (800, 600);
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   162
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   163
/** Interval between frames */
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   164
const TimeMS GRAPHICS_UPDATE_INTERVAL_MS = 20;
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   165
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   166
/** Default fullscreen mode? */
389
e74c1820fbd2 implement --help, --fullscreen, --resolution and --list-modes
Tero Marttila <terom@fixme.fi>
parents: 380
diff changeset
   167
const bool GRAPHICS_FULLSCREEN = false;
266
ad72d0a0cc02 increase the map size and control the camera to always have the screen full of terrain
terom
parents: 261
diff changeset
   168
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   169
/** Number of pixels between lines */
393
5dd4d782cf3a a basic implementation of game messages, plus some weird GameStateEvent stuff
Tero Marttila <terom@fixme.fi>
parents: 389
diff changeset
   170
const PixelDimension GRAPHICS_INFO_TEXT_LINE_OFFSET = 5;
266
ad72d0a0cc02 increase the map size and control the camera to always have the screen full of terrain
terom
parents: 261
diff changeset
   171
418
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   172
/** Input handling keyboard poll interval */
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   173
const TimeMS INPUT_POLL_INTERVAL = 10;
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   174
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   175
/** How long to block INPUT_FLAG_NOREPEAT for */
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   176
const TimeMS INPUT_REPEAT_DELAY = 250;
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   177
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   178
// @}
194bc810a570 add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
Tero Marttila <terom@fixme.fi>
parents: 417
diff changeset
   179
417
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   180
/**
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   181
 * @name Network
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   182
 * @{
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   183
 */
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   184
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   185
/** Default port used for network games */
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   186
const std::string NETWORK_PORT_STR = "9338";
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   187
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   188
/** Maximum packet size used for normal NetworkPackets... aligned to a sensible UDP mtu */
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   189
const size_t NETWORK_PACKET_SIZE = 1280;
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   190
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   191
/** Backlog used for TCP server... doesn't really matter all that much */
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   192
const int NETWORK_LISTEN_BACKLOG = 5;
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   193
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   194
/** Magic string used to identify game between client/server */
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   195
const char NETWORK_MAGIC_STR[8+1] = "KISNGLIS";
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   196
const uint64_t NETWORK_MAGIC_ID = * ((const uint64_t *) NETWORK_MAGIC_STR);
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   197
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   198
// @}
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   199
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   200
/**
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   201
 * @name Filesystem paths
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   202
 * @{
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   203
 */
220
1c92222af6d3 use Player static vars for texture loading, and load from the PROJECT_DATA_DIR path
terom
parents: 219
diff changeset
   204
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
   205
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
   206
417
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   207
// @}
c503e0c6a740 support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
Tero Marttila <terom@fixme.fi>
parents: 412
diff changeset
   208
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   209
#endif