| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * 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, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/main/gamesequence.h $ |
| 21 | * $Revision: 24 $ |
| 22 | * $Date: 4/08/99 3:12p $ |
| 23 | * $Author: Matt $ |
| 24 | * |
| 25 | * Game Sequencer |
| 26 | * |
| 27 | * $Log: /DescentIII/main/gamesequence.h $ |
| 28 | * |
| 29 | * 24 4/08/99 3:12p Matt |
| 30 | * Finished cleaning up level sequencing code. Got rid of all the "level |
| 31 | * minus one" stuff. |
| 32 | * |
| 33 | * 23 4/07/99 12:30p Matt |
| 34 | * Added code for failed missions. |
| 35 | * |
| 36 | * 22 4/04/99 8:15p Jeff |
| 37 | * added debug graph stuff |
| 38 | * |
| 39 | * 21 2/12/99 3:54a Jeff |
| 40 | * added function to restart a level, and a cheat key to do so (del-alt-e) |
| 41 | * |
| 42 | * 20 1/31/99 3:44p Matt |
| 43 | * Streamlined game sequencing |
| 44 | * |
| 45 | * 19 1/15/99 7:16p Kevin |
| 46 | * Added GameGauge Configuration & code |
| 47 | * |
| 48 | * 18 12/15/98 4:28p Jeff |
| 49 | * added mission data information to the pilot files to save what the |
| 50 | * highest level they achieved on a mission is. Added level select dialog |
| 51 | * (not hooked up) and level warp cheat. |
| 52 | * |
| 53 | * 17 11/19/98 5:40p Kevin |
| 54 | * Demo system |
| 55 | * |
| 56 | * 16 10/08/98 7:29p Samir |
| 57 | * revamped sequencing. |
| 58 | * |
| 59 | * 15 10/08/98 12:00p Kevin |
| 60 | * Demo system work |
| 61 | * |
| 62 | * 14 10/05/98 12:09p Kevin |
| 63 | * Converted projects to VC6 and demo file stuff added |
| 64 | * |
| 65 | * 13 8/18/98 3:02p Samir |
| 66 | * new sequencing for LoadGameState and PLEASE define Current_level some |
| 67 | * other way (or at least keep the definition in StartNewLebvel) |
| 68 | * |
| 69 | * 12 8/18/98 1:05a Samir |
| 70 | * added save and load interfaces. |
| 71 | * |
| 72 | * 11 8/16/98 5:56p Jeff |
| 73 | * added game interface for multiplayer dll ui stuff |
| 74 | * |
| 75 | * 10 6/25/98 12:43p Jeff |
| 76 | * Added exit game confirmation |
| 77 | * |
| 78 | * 9 5/18/98 4:36p Jeff |
| 79 | * TelCom uses Game_interface_mode variable now |
| 80 | * |
| 81 | * 8 4/03/98 3:36p Chris |
| 82 | * Added the start of the buddy menu |
| 83 | * |
| 84 | * 7 3/13/98 12:08p Samir |
| 85 | * Added SimpleStartLevel. |
| 86 | * |
| 87 | * 6 3/05/98 2:51p Jeff |
| 88 | * Added Help interface |
| 89 | * |
| 90 | * 5 3/03/98 12:10p Samir |
| 91 | * Added simple pausing. |
| 92 | * |
| 93 | * 4 3/02/98 5:52p Samir |
| 94 | * Added game interface system. |
| 95 | * |
| 96 | * 3 2/12/98 5:08p Matt |
| 97 | * Reset cockpit mode when starting a level. Unfortunately, this involved |
| 98 | * some semi-major mucking with game sequencing. |
| 99 | * |
| 100 | * 2 2/08/98 5:01p Samir |
| 101 | * New game sequencing changes. |
| 102 | * |
| 103 | * 1 2/08/98 3:54p Samir |
| 104 | * Initial revision. |
| 105 | * |
| 106 | * $NoKeywords: $ |
| 107 | */ |
| 108 | |
| 109 | #ifndef GAMESEQUENCE_H |
| 110 | #define GAMESEQUENCE_Hcxx . . $ `Descent3/gamesequence.h:110:9`! |
| 111 | |
| 112 | // gamesequencer states: |
| 113 | // game states |
| 114 | |
| 115 | enum tGameStatecxx . . $ tGameState# { |
| 116 | GAMESTATE_IDLEcxx . . $ GAMESTATE_IDLE., // no state |
| 117 | GAMESTATE_NEWcxx . . $ GAMESTATE_NEW., // starts a new game (with current mission.) |
| 118 | GAMESTATE_LVLNEXTcxx . . $ GAMESTATE_LVLNEXT., // go to the next level |
| 119 | GAMESTATE_LVLSTARTcxx . . $ GAMESTATE_LVLSTART., // happens when a level starts, game time starts here. |
| 120 | GAMESTATE_LVLPLAYINGcxx . . $ GAMESTATE_LVLPLAYING., // calls gameloop, polls for input. |
| 121 | GAMESTATE_LOADGAMEcxx . . $ GAMESTATE_LOADGAME., // a load game request has been issued. |
| 122 | GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND., // calls endlevel and any other endlevel stuff. |
| 123 | GAMESTATE_LVLFAILEDcxx . . $ GAMESTATE_LVLFAILED., // a level was unsuccessfully ended |
| 124 | GAMESTATE_LVLWARPcxx . . $ GAMESTATE_LVLWARP., // warp to a new level |
| 125 | GAMESTATE_LOADDEMOcxx . . $ GAMESTATE_LOADDEMO., // Load whatever demo was chosen in the UI |
| 126 | }; |
| 127 | |
| 128 | // top level interfaces for game. |
| 129 | #define GAME_INTERFACEcxx . . $ `Descent3/gamesequence.h:129:9`! 0 |
| 130 | #define GAME_OPTIONS_INTERFACEcxx . . $ `Descent3/gamesequence.h:130:9`! 1 |
| 131 | #define GAME_PAUSE_INTERFACEcxx . . $ `Descent3/gamesequence.h:131:9`! 2 |
| 132 | #define GAME_HELP_INTERFACEcxx . . $ `Descent3/gamesequence.h:132:9`! 3 |
| 133 | #define GAME_BUDDY_INTERFACEcxx . . $ `Descent3/gamesequence.h:133:9`! 4 |
| 134 | #define GAME_TELCOM_BRIEFINGScxx . . $ `Descent3/gamesequence.h:134:9`! 5 |
| 135 | #define GAME_TELCOM_AUTOMAPcxx . . $ `Descent3/gamesequence.h:135:9`! 6 |
| 136 | #define GAME_TELCOM_CARGOcxx . . $ `Descent3/gamesequence.h:136:9`! 7 |
| 137 | #define GAME_EXIT_CONFIRMcxx . . $ `Descent3/gamesequence.h:137:9`! 8 |
| 138 | #define GAME_DLL_INTERFACEcxx . . $ `Descent3/gamesequence.h:138:9`! 9 |
| 139 | #define GAME_SAVE_INTERFACEcxx . . $ `Descent3/gamesequence.h:139:9`! 10 |
| 140 | #define GAME_LOAD_INTERFACEcxx . . $ `Descent3/gamesequence.h:140:9`! 11 |
| 141 | #define GAME_TOGGLE_DEMOcxx . . $ `Descent3/gamesequence.h:141:9`! 12 |
| 142 | #define GAME_POST_DEMOcxx . . $ `Descent3/gamesequence.h:142:9`! 13 |
| 143 | #define GAME_DEMO_LOOPcxx . . $ `Descent3/gamesequence.h:143:9`! 14 |
| 144 | #define GAME_LEVEL_WARPcxx . . $ `Descent3/gamesequence.h:144:9`! 15 |
| 145 | #define GAME_DEBUGGRAPH_INTERFACEcxx . . $ `Descent3/gamesequence.h:145:9`! 16 |
| 146 | |
| 147 | // variables |
| 148 | extern tGameStatecxx . . $ tGameState# Game_statecxx . . $ Game_state.; |
| 149 | extern int Game_interface_modecxx . . $ Game_interface_mode.; // current interface mode of game (menu, game?) |
| 150 | extern int paged_in_countcxx . . $ paged_in_count.; |
| 151 | extern int paged_in_numcxx . . $ paged_in_num.; |
| 152 | |
| 153 | // functions |
| 154 | // main sequencing code for game. run this to execute a game. |
| 155 | // before calling this function make sure that a |
| 156 | // mission has been loaded/initialized. |
| 157 | bool GameSequencercxx . . $ GameSequencer(c9857a73d68e59ba).(); |
| 158 | |
| 159 | // Sets the current level for subsequent level loads, movies, or briefings |
| 160 | void SetCurrentLevelcxx . . $ SetCurrentLevel(d4f767463ce0a6b3).(int level); |
| 161 | |
| 162 | // loads and starts the specified leve. starts a new level (usually called internally) |
| 163 | bool LoadAndStartCurrentLevelcxx . . $ LoadAndStartCurrentLevel(c9857a73d68e59ba).(); |
| 164 | |
| 165 | // creates a simple mission to play one level. |
| 166 | bool SimpleStartLevelcxx . . $ SimpleStartLevel(c6b7e35ff6de5671).(char *level_name); |
| 167 | |
| 168 | // sets and retrieves the current gamestate |
| 169 | inline void SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(tGameStatecxx . . $ tGameState# state) { Game_statecxx . . $ Game_state. = state; } |
| 170 | |
| 171 | inline tGameStatecxx . . $ tGameState# GetGameStatecxx . . $ GetGameState(473ac89a9d0ba37a).() { return Game_statecxx . . $ Game_state.; } |
| 172 | |
| 173 | #endif |