]> icculus.org git repositories - btb/d2x.git/blob - main/gameseq.h
fix briefing spinning robot display in OGL (d1x r1.28, r1.20, r1.2)
[btb/d2x.git] / main / gameseq.h
1 /* $Id: gameseq.h,v 1.3 2003-10-10 09:36:35 btb Exp $ */
2 /*
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
13 */
14
15 /*
16  *
17  * Prototypes for functions for game sequencing.
18  *
19  * Old Log:
20  * Revision 1.4  1995/10/31  10:22:55  allender
21  * shareware stuff
22  *
23  * Revision 1.3  1995/09/14  14:13:14  allender
24  * initplayerobject have void return
25  *
26  * Revision 1.2  1995/08/24  15:36:17  allender
27  * fixed prototypes warnings
28  *
29  * Revision 1.1  1995/05/16  15:57:26  allender
30  * Initial revision
31  *
32  * Revision 2.0  1995/02/27  11:32:03  john
33  * New version 2.0, which has no anonymous unions, builds with
34  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
35  *
36  * Revision 1.41  1995/02/07  10:51:54  rob
37  * fix typo.
38  *
39  * Revision 1.40  1995/02/06  20:10:16  rob
40  * Extern'ed DoEndLevelScoreGlitz.
41  *
42  * Revision 1.39  1995/02/01  16:34:13  john
43  * Linted.
44  *
45  * Revision 1.38  1995/01/27  11:15:03  rob
46  * Added extern for player position vars.
47  *
48  * Revision 1.37  1995/01/20  22:47:38  matt
49  * Mission system implemented, though imcompletely
50  *
51  * Revision 1.36  1995/01/17  13:36:08  john
52  * Moved pig loading into StartNewLevelSub.
53  *
54  * Revision 1.35  1995/01/04  12:21:28  john
55  * *** empty log message ***
56  *
57  * Revision 1.34  1995/01/04  12:20:47  john
58  * Declearations to work better with game state save.
59  *
60  *
61  * Revision 1.33  1994/12/08  09:46:35  matt
62  * Made level name len a multiple of 4 for alignment
63  *
64  * Revision 1.32  1994/11/29  16:33:29  rob
65  * Added new defines for last_secret_level based on shareware or not shareware.
66  *
67  * Revision 1.31  1994/11/26  15:30:20  matt
68  * Allow escape out of change pilot menu
69  *
70  * Revision 1.30  1994/11/21  17:29:38  matt
71  * Cleaned up sequencing & game saving for secret levels
72  *
73  * Revision 1.29  1994/11/21  15:55:03  matt
74  * Corrected LAST_LEVEL
75  *
76  * Revision 1.28  1994/11/20  22:12:43  mike
77  * set LAST_LEVEL based on SHAREWARE.
78  *
79  * Revision 1.27  1994/11/09  10:55:51  matt
80  * Cleaned up initialization for editor -> game transitions
81  *
82  * Revision 1.26  1994/11/08  17:50:48  rob
83  * ADded prototype for StartNewLEvel.
84  *
85  *
86  * Revision 1.25  1994/11/07  17:50:57  rob
87  * Added extern prototype for init_player_stats_level called for
88  * network games.
89  *
90  * Revision 1.24  1994/10/25  15:40:03  yuan
91  * *** empty log message ***
92  *
93  * Revision 1.23  1994/10/22  00:08:52  matt
94  * Fixed up problems with bonus & game sequencing
95  * Player doesn't get credit for hostages unless he gets them out alive
96  *
97  * Revision 1.22  1994/10/18  18:57:08  matt
98  * Added main menu option to enter new player name
99  *
100  * Revision 1.21  1994/10/07  23:37:32  matt
101  * Added prototype
102  *
103  * Revision 1.20  1994/10/07  16:02:53  matt
104  * Loading saved game no longer clears players weapons & other stats
105  *
106  * Revision 1.19  1994/10/06  14:12:46  matt
107  * Added flash effect when player appears
108  *
109  * Revision 1.18  1994/10/03  13:34:44  matt
110  * Added new (and hopefully better) game sequencing functions
111  *
112  * Revision 1.17  1994/09/30  15:19:53  matt
113  * Added new game sequencing functions, but left them disabled for now.
114  *
115  * Revision 1.16  1994/09/28  17:24:34  matt
116  * Added first draft of game save/load system
117  *
118  * Revision 1.15  1994/09/27  12:29:42  matt
119  * Changed level naming
120  *
121  * Revision 1.14  1994/09/02  11:53:55  mike
122  * Rename init_player_stats to init_player_stats_game.
123  *
124  * Revision 1.13  1994/08/31  20:57:34  matt
125  * Cleaned up endlevel/death code
126  *
127  * Revision 1.12  1994/08/23  18:45:06  yuan
128  * Added level 10 capability.. (LEDGES)
129  *
130  * Revision 1.11  1994/08/18  10:47:38  john
131  * Cleaned up game sequencing and player death stuff
132  * in preparation for making the player explode into
133  * pieces when dead.
134  *
135  * Revision 1.10  1994/08/15  15:24:45  john
136  * Made players know who killed them; Disabled cheat menu
137  * during net player; fixed bug with not being able to turn
138  * of invulnerability; Made going into edit/starting new leve
139  * l drop you out of a net game; made death dialog box.
140  *
141  * Revision 1.9  1994/08/13  12:20:56  john
142  * Made the networking uise the Players array.
143  *
144  * Revision 1.8  1994/07/22  12:36:24  matt
145  * Cleaned up editor/game interactions some more.
146  *
147  * Revision 1.7  1994/07/19  20:15:33  matt
148  * Name for each level now saved in the .SAV file & stored in Current_level_name
149  *
150  * Revision 1.6  1994/07/02  13:49:33  matt
151  * Cleaned up includes
152  *
153  * Revision 1.5  1994/07/02  13:09:52  matt
154  * Moved player stats struct from gameseq.h to player.h
155  *
156  * Revision 1.4  1994/07/01  16:35:35  yuan
157  * Added key system
158  *
159  * Revision 1.3  1994/06/26  14:07:35  matt
160  * Added prototypes
161  *
162  * Revision 1.2  1994/06/24  17:03:56  john
163  * Added VFX support. Also took all game sequencing stuff like
164  * EndGame out and put it into gameseq.c
165  *
166  * Revision 1.1  1994/06/24  14:13:53  john
167  * Initial revision
168  *
169  *
170  */
171
172
173 #ifndef _GAMESEQ_H
174 #define _GAMESEQ_H
175
176 #include "player.h"
177 #include "mission.h"
178
179 #define SUPER_MISSILE       0
180 #define SUPER_SEEKER        1
181 #define SUPER_SMARTBOMB     2
182 #define SUPER_SHOCKWAVE     3
183
184 extern int Last_level, Last_secret_level;   //set by mission code
185
186 extern int Secret_level_table[MAX_SECRET_LEVELS_PER_MISSION];
187
188 #define LEVEL_NAME_LEN 36       //make sure this is multiple of 4!
189
190 // Current_level_num starts at 1 for the first level
191 // -1,-2,-3 are secret levels
192 // 0 means not a real level loaded
193 extern int Current_level_num, Next_level_num;
194 extern char Current_level_name[LEVEL_NAME_LEN];
195 extern obj_position Player_init[MAX_PLAYERS];
196
197
198 // This is the highest level the player has ever reached
199 extern int Player_highest_level;
200
201 //
202 // New game sequencing functions
203 //
204
205 // called once at program startup to get the player's name
206 int RegisterPlayer();
207
208 // Inputs the player's name, without putting up the background screen
209 int RegisterPlayerSub(int allow_abort_flag);
210
211 // starts a new game on the given level
212 void StartNewGame(int start_level);
213
214 // starts the next level
215 void StartNewLevel(int level_num, int secret_flag);
216 void StartLevel(int random_flag);
217
218 // Actually does the work to start new level
219 void StartNewLevelSub(int level_num, int page_in_textures, int secret_flag);
220
221 void InitPlayerObject();            //make sure player's object set up
222 void init_player_stats_game();      //clear all stats
223
224 // starts a resumed game loaded from disk
225 void ResumeSavedGame(int start_level);
226
227 // called when the player has finished a level
228 // if secret flag is true, advance to secret level, else next normal level
229 void PlayerFinishedLevel(int secret_flag);
230
231 // called when the player has died
232 void DoPlayerDead(void);
233
234 // load a level off disk. level numbers start at 1.
235 // Secret levels are -1,-2,-3
236 void LoadLevel(int level_num, int page_in_textures);
237
238 extern void gameseq_remove_unused_players();
239
240 extern void show_help();
241 extern void update_player_stats();
242
243 // from scores.c
244
245 extern void show_high_scores(int place);
246 extern void draw_high_scores(int place);
247 extern int add_player_to_high_scores(player *pp);
248 extern void input_name (int place);
249 extern int reset_high_scores();
250 extern void init_player_stats_level(int secret_flag);
251
252 void open_message_window(void);
253 void close_message_window(void);
254
255 // create flash for player appearance
256 extern void create_player_appearance_effect(object *player_obj);
257
258 // goto whatever secrect level is appropriate given the current level
259 extern void goto_secret_level();
260
261 // reset stuff so game is semi-normal when playing from editor
262 void editor_reset_stuff_on_level();
263
264 // Show endlevel bonus scores
265 extern void DoEndLevelScoreGlitz(int network);
266
267 // stuff for multiplayer
268 extern int MaxNumNetPlayers;
269 extern int NumNetPlayerPositions;
270
271 void bash_to_shield(int, char *);
272
273 #endif /* _GAMESEQ_H */