GAMESEQ.H 8.1 KB

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