/* $Id: constants.hpp,v 1.55 2005/08/12 08:24:14 uwe Exp $ */ #ifndef WOP_CONSTANTS_INCLUDED #define WOP_CONSTANTS_INCLUDED #include /**********************************************************/ // some global string constants, that are used in several files // name of the random circle theme #define RANDOM_CIRCLES_WOP_MAP_THEME "randcircles" // name of the file containing the theme definitions // (only file name, no relative or absolute path) #define THEME_CONFIG_PATH "images" #define THEME_CONFIG "themes.conf" // name and path of the sprite configuration file #define SPRITE_CONFIG_PATH "images" #define SPRITE_CONFIG "sprites.conf" // default relative path of the bonus configuration file #define THEME_DEFAULT_BONUS_CONFIG_PATH "miscconf/bonus/standard.conf" // #define BOT_MAP_PATH "miscconf/bot" #define BOT_MAP_FILE "bot.map" /********************************************************** * constants for game settings * according string maps in class WopSettings **********************************************************/ // program modes enum { SERVER = 0, CLIENT, REPLAY, NUMBER_OF_PROGRAM_MODES }; // view modes enum { FULLSCREEN = 0, WINDOW, NUMBER_OF_VIEW_MODES }; // game modes enum { DEATHMATCH = 0 << 0, TEAMPLAY = 1 << 0, NUMBER_OF_GAME_MODES }; // constants concerning the player IDs // - valid player IDs can be found in range // [FIRST_VALID_PLAYER_ID, LAST_VALID_PLAYER_ID] // - use constant INVALID_PLAYER_ID for an invalid // player ID // - change data types storing player IDs, if you // change MAX_NUMBER_OF_PLAYERS to a value of 255 // or greater (... und dann die Weltherrschaft ;)) enum { FIRST_VALID_PLAYER_ID = 0, MAX_NUMBER_OF_PLAYERS = 20, LAST_VALID_PLAYER_ID = FIRST_VALID_PLAYER_ID + MAX_NUMBER_OF_PLAYERS - 1, INVALID_PLAYER_ID = LAST_VALID_PLAYER_ID + 1 }; extern const Uint32 TEAM_COLOR[MAX_NUMBER_OF_PLAYERS]; /**********************************************************/ // Object-IDs // Add new objects between NONE_VALID_OBJECT and NUMBER_OF_OBJECTS // IMPORTANT: // (1) the valid IDs start with 0 // (2) the list MUST start with avatar IDs, terminated by the pseudo // ID LAST_AVATAR with value of the last avatar ID // (3) also add the corresponding string in the char* array in // ObjectIDString in file constants.cpp enum { ////////////////////////////////////////////////// /// first, nonvalid ID INVALID_OBJECT = -1, ////////////////////////////////////////////////// /// avatar IDs FIRST_COLLIDABLE, FIRST_AVATAR = FIRST_COLLIDABLE, AVATAR_WORM = FIRST_AVATAR, // (1) insert new avatar IDs above this line // (2) set LAST_AVATAR to the new avatar ID LAST_AVATAR = AVATAR_WORM, ////////////////////////////////////////////////// /// IDs of other collidable objects // BALL, GRENADE, MINE, MISSILE, HOMING_MISSILE, GUIDED_MISSILE, HELICOPTER, HOOK, // stationary guns FIRST_STATIONARY_GUN, STATIC_GUN_I = FIRST_STATIONARY_GUN, LAST_STATIONARY_GUN = STATIC_GUN_I, // bonus objects FIRST_BONUS, BONUS_HEALTH = FIRST_BONUS, BONUS_SHIELD, BONUS_INVISIBLE, BONUS_FUEL, BONUS_HOMING_VIRUS, LAST_BONUS = BONUS_HOMING_VIRUS, // LAST_COLLIDABLE = LAST_BONUS, ////////////////////////////////////////////////// /// IDs of noncollidable objects FIRST_NONCOLLIDABLE, // IDs of explosions. We need SMALLEST_EXPLOSION // and BIGGEST_EXPLOSION to check the range of // explosion sizes in the program. SMALLEST_EXPLOSION = FIRST_NONCOLLIDABLE, // first (== smallest) Explosion must be SMALLEST_EXPLOSION EXPLOSION_15 = SMALLEST_EXPLOSION, EXPLOSION_40, EXPLOSION_60, EXPLOSION_80, BIGGEST_EXPLOSION = EXPLOSION_80, // IDs of smoke. We need SMALLEST_SMOKE and // BIGGEST_SMOKE to check the range of smoke sizes // in the program. SMALLEST_SMOKE, SMOKE_15 = SMALLEST_SMOKE, SMOKE_30, BIGGEST_SMOKE = SMOKE_30, // IDs of blue glowing effects. We need // SMALLEST_BLUEGLOW and BIGGEST_BLUEGLOW to check the // range of effect sizes in the program. SMALLEST_BLUEGLOW, BLUEGLOW_25 = SMALLEST_BLUEGLOW, BIGGEST_BLUEGLOW = BLUEGLOW_25, // goals of different size SMALLEST_GOAL, GOAL_50 = SMALLEST_GOAL, BIGGEST_GOAL = GOAL_50, // IDs of shield corona SHIELD_CORONA, // IDs of invisible corona INVISIBLE_CORONA, ROPE, STATIC_GUN_I_CHASSIS, // (1) insert new noncollidabel object above this line // (2) adapt LAST_NONCOLLIDABLE to this new ID LAST_NONCOLLIDABLE = STATIC_GUN_I_CHASSIS, ////////////////////////////////////////////////// /// the total number of valid IDs NUMBER_OF_OBJECT_IDs }; // extern string IDs extern const char* const ObjectIDString[NUMBER_OF_OBJECT_IDs+1]; /**********************************************************/ enum { INVALID_WEAPON = -1, WEAPON_SHOTGUN, WEAPON_UZI, WEAPON_RUBBERGUN, WEAPON_GRENADE, WEAPON_MINE, WEAPON_MISSILE, WEAPON_HOMING_MISSILE, WEAPON_GUIDED_MISSILE, WEAPON_HELICOPTER, WEAPON_ZAPPER, WEAPON_HOOK, WEAPON_HOOK_REL, WEAPON_HOOK_CUT, NUMBER_OF_WEAPON_IDs }; extern const char* const WeaponIDString[NUMBER_OF_WEAPON_IDs+1]; /**********************************************************/ // constants for focus priorities enum { FOCUS_PRIO_AVATAR_BASE = 100, FOCUS_PRIO_AVATAR_LOCAL = 1000, FOCUS_PRIO_FORCE_FOCUS = 2000, FOCUS_PRIO_GUIDED_MISSILE = 5, FOCUS_PRIO_RC_HELICOPTER = 5 }; /**********************************************************/ #endif // WOP_CONSTANTS_INCLUDED