1 /* 2 Copyright (C) 1994-1995 Apogee Software, Ltd. 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU General Public License 6 as published by the Free Software Foundation; either version 2 7 of the License, or (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 13 See the GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19 */ 20 /********************************************************************** 21 module: RT_BATTL.H 22 23 author: James R. Dose 24 phone: (214)-271-1365 Ext #221 25 date: September 8, 1994 26 27 Public header for RT_BATTL.C 28 29 (c) Copyright 1994 Apogee Software. All Rights Reserved. 30 **********************************************************************/ 31 32 #ifndef __RT_BATTLE_public 33 #define __RT_BATTLE_public 34 35 36 #define BIT_MASK( bit_number ) ( 1 << ( bit_number ) ) 37 #define MINUTES_TO_GAMECOUNT( minutes ) \ 38 ( ( minutes ) * 60 * VBLCOUNTER ) 39 40 // 41 // Return codes 42 // 43 44 typedef enum 45 { 46 battle_no_event, 47 battle_end_game, 48 battle_end_round, 49 battle_out_of_time 50 } battle_status; 51 52 // 53 // Types of battle events 54 // 55 56 typedef enum 57 { 58 battle_refresh, 59 battle_player_killed, 60 battle_player_tagged, 61 battle_kill_with_missile, 62 battle_kill_with_bullet, 63 battle_kill_with_missile_in_air, 64 battle_kill_with_bullet_in_air, 65 battle_kill_by_crushing, 66 battle_get_collector_item, 67 battle_caught_eluder, 68 battle_shot_deluder, 69 battle_captured_triad 70 } battle_event; 71 72 // 73 // Battle modes 74 // 75 76 enum 77 { 78 battle_StandAloneGame, 79 battle_Normal, 80 battle_ScoreMore, 81 battle_Collector, 82 battle_Scavenger, 83 battle_Hunter, 84 battle_Tag, 85 battle_Eluder, 86 battle_Deluder, 87 battle_CaptureTheTriad, 88 battle_NumBattleModes 89 }; 90 91 // 92 // Battle mode option : Gravity 93 // 94 95 //enum 96 // { 97 // bo_low_gravity, 98 // bo_normal_gravity, 99 // bo_high_gravity 100 // }; 101 102 // 103 // Battle mode option : Speed 104 // 105 106 enum 107 { 108 bo_normal_speed, 109 bo_fast_speed 110 }; 111 112 // 113 // Battle mode option : Ammo 114 // 115 116 enum 117 { 118 bo_one_shot, 119 bo_normal_shots, 120 bo_infinite_shots 121 }; 122 123 // 124 // Battle mode option : Hit points 125 // 126 127 #define bo_character_hitpoints 0 128 #define bo_default_hitpoints 250 129 130 // 131 // Battle mode option : Light levels 132 // 133 134 enum 135 { 136 bo_light_dark, 137 bo_light_normal, 138 bo_light_bright, 139 bo_light_fog, 140 bo_light_periodic, 141 bo_light_lightning 142 }; 143 144 // 145 // Battle mode option : Number of kills 146 // 147 148 enum 149 { 150 bo_kills_random = -2, 151 bo_kills_blind = -1, 152 bo_kills_infinite = 0, 153 bo_kills_default = 21 154 }; 155 156 // 157 // Battle mode option : Environment danger damage 158 // 159 160 enum 161 { 162 bo_danger_normal = -1, 163 bo_danger_low = 1, 164 bo_danger_kill = 30000 165 }; 166 167 // 168 // Battle mode option : Time limit 169 // 170 #define bo_time_infinite 0 171 172 // 173 // Battle mode configuration 174 // 175 typedef struct 176 { 177 unsigned Gravity; 178 unsigned Speed; 179 unsigned Ammo; 180 unsigned HitPoints; 181 unsigned SpawnDangers; 182 unsigned SpawnHealth; 183 unsigned SpawnWeapons; 184 unsigned SpawnMines; 185 unsigned RespawnItems; 186 unsigned WeaponPersistence; 187 unsigned RandomWeapons; 188 unsigned FriendlyFire; 189 unsigned LightLevel; 190 int Kills; 191 int DangerDamage; 192 unsigned TimeLimit; 193 unsigned RespawnTime; 194 } battle_type; 195 196 #define bo_normal_respawn_time 30 197 198 extern boolean BATTLEMODE; 199 extern short WhoKilledWho[ MAXPLAYERS ][ MAXPLAYERS ]; 200 extern short BATTLE_Points[ MAXPLAYERS ]; 201 extern short BATTLE_PlayerOrder[ MAXPLAYERS ]; 202 extern int BATTLE_NumCollectorItems; 203 extern int PointGoal; 204 extern int DisplayPoints; 205 extern int BATTLE_It; 206 extern boolean BATTLE_ShowKillCount; 207 extern short BATTLE_Team[ MAXPLAYERS ]; 208 extern short BATTLE_TeamLeader[ MAXPLAYERS ]; 209 extern int BATTLE_NumberOfTeams; 210 extern boolean UpdateKills; 211 212 // Located in RT_MENU.C 213 extern battle_type BATTLE_Options[ battle_NumBattleModes ]; 214 215 void BATTLE_Init( int battlemode, int numplayers ); 216 void BATTLE_GetSpecials( void ); 217 void BATTLE_SetOptions( battle_type *options ); 218 void BATTLE_GetOptions( battle_type *options ); 219 battle_status BATTLE_CheckGameStatus( battle_event reason, int player ); 220 void BATTLE_SortPlayerRanks( void ); 221 battle_status BATTLE_PlayerKilledPlayer( battle_event reason, int killer, int victim ); 222 void BATTLE_Shutdown( void ); 223 224 #endif 225