/* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012 Guus Sliepen Copyright (C) 2012, 2015 Julian Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) // ALL #define NONE 0 // Compile-time options #ifndef VERSION #define VERSION "devbuild" #endif #ifndef DATADIR #define DATADIR "." #endif #ifndef PATH_MAX #define PATH_MAX 4096 #endif // Object Flags #define FL_WEAPCO 1 #define FL_FRIEND 2 #define FL_IMMORTAL 4 #define FL_NOMOVE 8 #define FL_NOFIRE 16 #define FL_FIRERAY 32 #define FL_DAMAGEOWNER 64 #define FL_LEAVESECTOR 128 #define FL_ESCAPED 256 #define FL_DROPMINES 512 #define FL_AIMS 1024 #define FL_DISABLED 2048 #define FL_CANNOTDIE 4096 // This will only apply to Kline before the final mission #define FL_RUNSAWAY 8192 #define FL_ALWAYSFACE 16384 // Kline doesn't turn his back on you! ;) #define FL_CIRCLES 32768 // Kline can circle around #define FL_CONTINUOUS_FIRE 65536 // Go absolutely nutts(!) #define FL_DEPLOYDRONES 131072 // Deploys small drone - Used by Boss 2 #define FL_CANCLOAK 262144 #define FL_ISCLOAKED 524288 #define FL_ACTIVATE 1048576 #define FL_HASMINIMUMSPEED 2097152 #define FL_FIRELASER 4194304 // Explosions #define E_SMALL_EXPLOSION 4 #define E_BIG_EXPLOSION 8 #define E_SMOKE 12 #define E_TINY_EXPLOSION 16 #define E_ELECTRICAL 20 // Weapon flags #define WF_SPREAD 4 #define WF_SCATTER 8 #define WF_VARIABLE_SPEED 16 #define WF_HOMING 32 #define WF_SHOCKWAVE 64 #define WF_WEAPCO 128 #define WF_FRIEND 256 #define WF_AIMED 512 #define WF_DISABLE 1024 #define WF_TIMEDEXPLOSION 2048 #define MAX_WEAPONS 20 #define MAX_SHAPES 100 #define MAX_SHIPSHAPES 120 #define MAX_SOUNDS 17 #define MAX_ALIENS 25 #define MAX_TEXTSHAPES 150 #define MAX_FONTSHAPES 6 #define MAX_SHOPSHAPES 6 #define MAX_DEFALIENS 40 #define MAX_MISSIONS 28 #define MAX_CARGO 20 #define MAX_SHOPITEMS 17 #define SHIP_HIT_INDEX 60 // AI Types enum { AI_NORMAL = 1, AI_DEFENSIVE, AI_OFFENSIVE, AI_EVASIVE, AI_WANDER }; // These are for Alien *indexes* NOT classdefs!! enum { WC_BOSS = 14, WC_KLINE, FR_PHOEBE, FR_URSULA, FR_SID }; // Droppables enum { P_ANYTHING = 1, P_WEAPONS, P_CASH, P_ROCKET, P_SHIELD, P_CARGO, P_PLASMA_AMMO, P_PLASMA_RATE, P_PLASMA_SHOT, P_PLASMA_DAMAGE, P_MINE, // mines detonate when you "pick them up!" P_PHOEBE, // only used as an attachment(!) P_SLAVES, P_ESCAPEPOD, P_ORE, P_SUPER }; // Jobs enum { WT_PLASMA = 1, WT_ROCKET, WT_ENERGYRAY, WT_LASER, WT_MICROROCKET, WT_CHARGER, WT_DIRECTIONAL, WT_SPREAD }; // Weapons enum { W_NONE = -1, W_PLAYER_WEAPON, W_PLAYER_WEAPON2, W_SINGLE_SHOT, W_DOUBLE_SHOT, W_TRIPLE_SHOT, W_ROCKETS, W_DOUBLE_ROCKETS, W_MICRO_ROCKETS, W_ENERGYRAY, W_LASER, W_CHARGER, W_HOMING_MISSILE, W_DOUBLE_HOMING_MISSILES, W_MICRO_HOMING_MISSILES, W_AIMED_SHOT, W_SPREADSHOT, W_IONCANNON, W_DIRSHOCKMISSILE }; // Missions enum { M_DESTROY_ALL_TARGETS = 1, M_DESTROY_TARGET_TYPE, M_COLLECT, M_PROTECT_PICKUP, M_PROTECT_TARGET, M_DISABLE_TARGET, M_ESCAPE_TARGET }; enum { OB_JUST_FAILED = -2, OB_FAILED, OB_INCOMPLETE, OB_COMPLETED, OB_JUST_COMPLETED, OB_CONDITION, OB_HIDDEN }; // Class Defs - Some of these are just place holders enum { CD_DUALFIGHTER, // 0 CD_MISSILEBOAT, CD_PROTOFIGHTER, CD_FRIEND, CD_FRIGATE, CD_FRIGATE_WING1, CD_FRIGATE_WING2, CD_TRANSPORTSHIP, CD_CARGOSHIP, CD_MINER, CD_KLINE, // 10 CD_AIMFIGHTER, CD_SLAVETRANSPORT, CD_GOODTRANSPORT, CD_SID, CD_MINEBOSS, CD_BOSS2_WING1, CD_BOSS2_WING2, CD_BOSS2_WING3, CD_BOSS2_WING4, CD_DRONE, // 20 CD_CLOAKFIGHTER, CD_EVILURSULA, CD_KRASS, CD_EXEC, CD_ASTEROID, CD_ASTEROID2, CD_ESCORT, CD_MOBILE_RAY, CD_REBELCARRIER, CD_PLUTOBOSS, // 30 CD_BARRIER, CD_NEPTUNEBOSS, CD_MOBILESHIELD, CD_PIRATE, CD_FIREFLY, CD_URANUSBOSS, CD_URANUSBOSSWING1, CD_URANUSBOSSWING2, // Some special ones CD_ANY = 100, CD_BOSS, CD_PHOEBE, CD_URSULA }; // Text shapes enum { TS_PRESENTS, TS_AN_SDL_GAME, TS_START_NEW_GAME, TS_LOAD_GAME, TS_CONTINUE_CURRENT_GAME, TS_OPTIONS, TS_CHEAT_OPTIONS, TS_QUIT, TS_SOUND, TS_MUSIC, TS_FULLSCREEN, TS_BACK_TO_MAIN_MENU, TS_SAVESLOT_0, TS_SAVESLOT_1, TS_SAVESLOT_2, TS_SAVESLOT_3, TS_SAVESLOT_4, TS_SAVESLOT_5, TS_UNLIMITED_SHIELD, TS_UNLIMITED_AMMO, TS_UNLIMITED_CASH, TS_UNLIMITED_TIME, TS_START_GAME, TS_DIFFICULTY }; // Menu types enum { MENU_MAIN, MENU_DIFFICULTY, MENU_LOAD, MENU_OPTIONS, MENU_CHEAT }; // Font Colors enum { FONT_WHITE, FONT_RED, FONT_YELLOW, FONT_GREEN, FONT_CYAN, FONT_OUTLINE // a dark blue color }; // Sounds enum { SFX_EXPLOSION, SFX_HIT, SFX_DEATH, SFX_MISSILE, SFX_PLASMA, SFX_CLOCK, SFX_FLY, SFX_ENERGYRAY, SFX_PICKUP, SFX_SHIELDUP, SFX_CLOAK, SFX_DEBRIS, SFX_DEBRIS2, SFX_LASER, SFX_PLASMA2, SFX_PLASMA3 }; enum { SECTION_TITLE, SECTION_INTERMISSION, SECTION_GAME }; enum { FACE_CHRIS = 90, FACE_SID, FACE_KRASS, FACE_KLINE, FACE_PHOEBE, FACE_URSULA, FACE_CREW }; // Difficulties enum { DIFFICULTY_EASY, DIFFICULTY_NORMAL, DIFFICULTY_HARD, DIFFICULTY_NIGHTMARE }; enum { PAK_IMG, PAK_WAV, PAK_MOD, PAK_FONT, PAK_S3M }; extern const char *systemNames[]; extern const char *systemBackground[]; const char rate2reload[6] = {15, 15, 13, 11, 9, 7}; const int screenWidth = 800; const int screenHeight = 600; const int xViewBorder = 100; const int yViewBorder = 100; const float cameraMaxSpeed = 3.; const int maxHoming = 20; const int maxDoubleHoming = 15; const int maxMicroHoming = 10;