2 Copyright (C) 2003 Parallel Realities
3 Copyright (C) 2011, 2012 Guus Sliepen
4 Copyright (C) 2012, 2015, 2016 onpon4 <onpon4@riseup.net>
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/>.
27 #define MIN(a, b) ((a) < (b) ? (a) : (b))
28 #define MAX(a, b) ((a) > (b) ? (a) : (b))
29 #define LIMIT(x, a, b) x = ((x) < (b) ? ((x) > (a) ? (x) : (a)) : (b))
30 #define LIMIT_ADD(x, y, a, b) x = (((x) + (y)) < (b) ? \
31 (((x) + (y)) > (a) ? \
32 ((x) + (y)) : (a)) : (b))
33 #define WRAP_ADD(x, y, a, b) x = (((x) + (y)) + \
34 ((x) + (y) < (a) ? ((b) - (a)) : 0) + \
35 ((x) + (y) > (b) ? ((a) - (b)) : 0))
36 #define CHANCE(x) ((rand() % RAND_MAX) < ((x) * RAND_MAX))
37 #define RANDRANGE(x, y) (((x) < (y)) ? ((x) + (rand() % (long)(1 + (y) - (x)))) : (x))
40 // Compile-time options
50 #define SCREEN_WIDTH 800
54 #define SCREEN_HEIGHT 600
70 #define FL_DAMAGEOWNER 64
71 #define FL_LEAVESECTOR 128
72 #define FL_ESCAPED 256
73 #define FL_DROPMINES 512
75 #define FL_DISABLED 2048
76 #define FL_CANNOTDIE 4096 // No longer used
77 #define FL_RUNSAWAY 8192
78 #define FL_ALWAYSFACE 16384 // Kline doesn't turn his back on you! ;)
79 #define FL_CIRCLES 32768L // Kline can circle around
80 #define FL_CONTINUOUS_FIRE 65536L // Go absolutely nutts(!)
81 #define FL_DEPLOYDRONES 131072L // Deploys small drone - Used by Boss 2
82 #define FL_CANCLOAK 262144L
83 #define FL_ISCLOAKED 524288L
84 #define FL_ACTIVATE 1048576L
85 #define FL_HASMINIMUMSPEED 2097152L
86 #define FL_FIRELASER 4194304L
91 #define WF_VARIABLE_SPEED 16
93 #define WF_SHOCKWAVE 64
97 #define WF_DISABLE 1024
98 #define WF_TIMEDEXPLOSION 2048
101 #define MAX_INFOLINES 3
102 #define MAX_EVENTS 20
129 // These are for Alien *indexes* NOT classdefs!!
131 ALIEN_NORMAL_LAST = 20,
160 P_MINE, // mines detonate when you "pick them up!"
161 P_PHOEBE, // only used as an attachment(!)
195 W_DOUBLE_HOMING_MISSILES,
196 W_MICRO_HOMING_MISSILES,
207 M_DESTROY_ALL_TARGETS,
208 M_DESTROY_TARGET_TYPE,
226 // Class Defs - Some of these are just place holders
288 SP_PLASMA_MAX_OUTPUT,
293 SP_PLASMA_MIN_OUTPUT,
303 SP_DOUBLE_HOMING_MISSILES,
304 SP_MICRO_HOMING_MISSILES,
326 SP_SMALL_EXPLOSION_2,
327 SP_SMALL_EXPLOSION_3,
328 SP_SMALL_EXPLOSION_L,
351 SP_PICKUP_PLASMA_OUTPUT,
352 SP_PICKUP_PLASMA_POWER,
353 SP_PICKUP_PLASMA_RATE,
372 SP_ARROW_FRIEND_NORTH,
373 SP_ARROW_FRIEND_NORTHEAST,
374 SP_ARROW_FRIEND_EAST,
375 SP_ARROW_FRIEND_SOUTHEAST,
376 SP_ARROW_FRIEND_SOUTH,
377 SP_ARROW_FRIEND_SOUTHWEST,
378 SP_ARROW_FRIEND_WEST,
379 SP_ARROW_FRIEND_NORTHWEST,
456 SS_MINERBOSS_WING1_L,
458 SS_MINERBOSS_WING2_L,
460 SS_MINERBOSS_WING3_L,
462 SS_MINERBOSS_WING4_L,
470 SS_URANUSBOSS_WING1_L,
472 SS_URANUSBOSS_WING2_L,
476 SS_MAX = SS_HIT_INDEX * 2
493 TS_PRESENTS = MAX_INFOLINES,
497 TS_CONTINUE_CURRENT_GAME,
505 TS_BACK_TO_MAIN_MENU,
521 TS_INFO_START_MISSION,
542 TS_CHRIS_SHIELD_PICKUPS,
543 TS_CHRIS_PLASMA_PICKUPS,
544 TS_CHRIS_ROCKET_PICKUPS,
545 TS_CHRIS_POWERUP_PICKUPS,
546 TS_CHRIS_MINES_KILLED,
547 TS_CHRIS_SLAVES_RESCUED,
592 SHOP_PLASMA_MAX_OUTPUT,
593 SHOP_PLASMA_MAX_DAMAGE,
594 SHOP_PLASMA_MAX_RATE,
595 SHOP_PLASMA_MIN_OUTPUT,
596 SHOP_PLASMA_MIN_DAMAGE,
597 SHOP_PLASMA_MIN_RATE,
600 SHOP_PLASMA_MAX_AMMO,
601 SHOP_ROCKET_MAX_AMMO,
607 SHOP_DOUBLE_HOMING_MISSILES,
608 SHOP_MICRO_HOMING_MISSILES,
619 FONT_OUTLINE, // a dark blue color
647 SECTION_INTERMISSION,
668 // Planets (Eyananth)
675 PLANET_RESCUESLAVES = 9 // For save compatibility
686 PLANET_CLOAKFIGHTER = 9 // For save compatibility
740 DIFFICULTY_NIGHTMARE,
745 const char * const systemNames[] = {"¥¹¥Ô¥ê¥Ã¥È", "¥¨¥ä¥Ê¥ó¥¹", "¥â¥ë¥É¡¼¥ë", "ÂÀÍÛ"};
747 const char * const systemBackground[] = {
748 "gfx/spirit.jpg", "gfx/eyananth.jpg", "gfx/mordor.jpg", "gfx/sol.jpg"
751 const int rate2reload[6] = {15, 15, 13, 11, 9, 7};
752 const int screenWidth = SCREEN_WIDTH;
753 const int screenHeight = SCREEN_HEIGHT;
754 const int xViewBorder = 100;
755 const int yViewBorder = 100;
756 const float cameraMaxSpeed = 3.;
757 const int maxHoming = 20;
758 const int maxDoubleHoming = 15;
759 const int maxMicroHoming = 10;