2 Copyright (C) 2003 Parallel Realities
3 Copyright (C) 2011, 2012 Guus Sliepen
4 Copyright (C) 2012, 2015 Julian Marchant
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 3
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #define MIN(a, b) ((a) < (b) ? (a) : (b))
24 #define MAX(a, b) ((a) > (b) ? (a) : (b))
25 #define LIMIT(x, a, b) x = ((x) < (b) ? ((x) > (a) ? (x) : (a)) : (b))
26 #define LIMIT_ADD(x, y, a, b) x = (((x) + (y)) < (b) ? \
27 (((x) + (y)) > (a) ? \
28 ((x) + (y)) : (a)) : (b))
29 #define WRAP_ADD(x, y, a, b) x = (((x) + (y)) + \
30 ((x) + (y) < (a) ? ((b) - (a)) : 0) + \
31 ((x) + (y) > (b) ? ((a) - (b)) : 0))
32 #define RANDRANGE(x, y) (((x) < (y)) ? ((x) + (rand() % (1 + (y) - (x)))) : (x))
37 // Compile-time options
57 #define FL_DAMAGEOWNER 64
58 #define FL_LEAVESECTOR 128
59 #define FL_ESCAPED 256
60 #define FL_DROPMINES 512
62 #define FL_DISABLED 2048
63 #define FL_CANNOTDIE 4096 // This will only apply to Kline before the final mission
64 #define FL_RUNSAWAY 8192
65 #define FL_ALWAYSFACE 16384 // Kline doesn't turn his back on you! ;)
66 #define FL_CIRCLES 32768L // Kline can circle around
67 #define FL_CONTINUOUS_FIRE 65536L // Go absolutely nutts(!)
68 #define FL_DEPLOYDRONES 131072L // Deploys small drone - Used by Boss 2
69 #define FL_CANCLOAK 262144L
70 #define FL_ISCLOAKED 524288L
71 #define FL_ACTIVATE 1048576L
72 #define FL_HASMINIMUMSPEED 2097152L
73 #define FL_FIRELASER 4194304L
76 #define E_SMALL_EXPLOSION 4
77 #define E_BIG_EXPLOSION 8
79 #define E_TINY_EXPLOSION 16
80 #define E_ELECTRICAL 20
85 #define WF_VARIABLE_SPEED 16
87 #define WF_SHOCKWAVE 64
91 #define WF_DISABLE 1024
92 #define WF_TIMEDEXPLOSION 2048
94 #define MAX_WEAPONS 20
95 #define MAX_SHAPES 100
96 #define MAX_SHIPSHAPES 120
97 #define MAX_TEXTSHAPES 150
98 #define MAX_FONTSHAPES 6
99 #define MAX_SHOPSHAPES 6
102 #define SHIP_HIT_INDEX 60
114 // These are for Alien *indexes* NOT classdefs!!
117 ALIEN_BOSS_PART4 = 10,
118 ALIEN_BOSS_PART3 = 11,
119 ALIEN_BOSS_PART2 = 12,
120 ALIEN_BOSS_PART1 = 13,
126 ALIEN_GOODTRANSPORT = 19,
143 P_MINE, // mines detonate when you "pick them up!"
144 P_PHOEBE, // only used as an attachment(!)
180 W_DOUBLE_HOMING_MISSILES,
181 W_MICRO_HOMING_MISSILES,
191 M_DESTROY_ALL_TARGETS = 1,
192 M_DESTROY_TARGET_TYPE,
211 // Class Defs - Some of these are just place holders
269 TS_CONTINUE_CURRENT_GAME,
277 TS_BACK_TO_MAIN_MENU,
305 SHOP_PLASMA_MAX_OUTPUT,
306 SHOP_PLASMA_MAX_DAMAGE,
307 SHOP_PLASMA_MAX_RATE,
308 SHOP_PLASMA_MIN_OUTPUT,
309 SHOP_PLASMA_MIN_DAMAGE,
310 SHOP_PLASMA_MIN_RATE,
313 SHOP_PLASMA_MAX_AMMO,
314 SHOP_ROCKET_MAX_AMMO,
320 SHOP_DOUBLE_HOMING_MISSILES,
321 SHOP_MICRO_HOMING_MISSILES,
333 FONT_OUTLINE // a dark blue color
362 SECTION_INTERMISSION,
417 DIFFICULTY_NIGHTMARE,
422 const char * const systemNames[] = {"Spirit", "Eyananth", "Mordor", "Sol"};
424 const char * const systemBackground[] = {
425 "gfx/spirit.jpg", "gfx/eyananth.jpg", "gfx/mordor.jpg", "gfx/sol.jpg"
428 const int rate2reload[6] = {15, 15, 13, 11, 9, 7};
429 const int screenWidth = 800;
430 const int screenHeight = 600;
431 const int xViewBorder = 100;
432 const int yViewBorder = 100;
433 const float cameraMaxSpeed = 3.;
434 const int maxHoming = 20;
435 const int maxDoubleHoming = 15;
436 const int maxMicroHoming = 10;