home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / gameseq.h < prev    next >
Text File  |  1998-06-08  |  8KB  |  269 lines

  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.  
  162.  
  163.  
  164. #ifndef _GAMESEQ_H
  165. #define _GAMESEQ_H
  166.  
  167. #include "player.h"
  168. #include "mission.h"
  169.  
  170. #define SUPER_MISSILE        0
  171. #define SUPER_SEEKER            1
  172. #define SUPER_SMARTBOMB        2
  173. #define SUPER_SHOCKWAVE        3
  174.  
  175. #ifdef SHAREWARE
  176. #define Last_level
  177. #define Last_level            7            //the number of the very last level for shareware
  178. #define Last_secret_level    0             // No secret levels!
  179. #else
  180. extern int Last_level,Last_secret_level;    //set by mission code
  181. #endif
  182.  
  183. extern int Secret_level_table[MAX_SECRET_LEVELS_PER_MISSION];
  184.  
  185. #define LEVEL_NAME_LEN 36        //make sure this is multipe of 4!
  186.  
  187. //Current_level_num starts at 1 for the first level
  188. //-1,-2,-3 are secret levels
  189. //0 means not a real level loaded
  190. extern int Current_level_num,Next_level_num;
  191. extern char Current_level_name[];
  192. extern obj_position    Player_init[MAX_PLAYERS];
  193.  
  194.  
  195. //This is the highest level the player has ever reached
  196. extern int Player_highest_level;
  197.  
  198. //
  199. //  New game sequencing functions
  200. //
  201.  
  202. //called once at program startup to get the player's name
  203. RegisterPlayer();
  204.  
  205. //Inputs the player's name, without putting up the background screen
  206. RegisterPlayerSub(int allow_abort_flag);
  207.  
  208. //starts a new game on the given level
  209. StartNewGame(int start_level);
  210.  
  211. //starts the next level
  212. StartNewLevel(int level_num);
  213.  
  214. // Actually does the work to start new level
  215. StartNewLevelSub(int level_num, int page_in_textures);
  216.  
  217. InitPlayerObject();                //make sure player's object set up
  218. init_player_stats_game();        //clear all stats
  219.  
  220. //starts a resumed game loaded from disk
  221. ResumeSavedGame(int start_level);
  222.  
  223. //called when the player has finished a level
  224. //if secret flag is true, advance to secret level, else next normal level
  225. PlayerFinishedLevel(int secret_flag);
  226.  
  227. //called when the player has died
  228. DoPlayerDead();
  229.  
  230. //load a level off disk. level numbers start at 1.  
  231. //Secret levels are -1,-2,-3
  232. void LoadLevel(int level_num);
  233.  
  234. extern void gameseq_remove_unused_players();
  235.  
  236. extern void show_help(); 
  237. extern void update_player_stats();
  238.  
  239. //from scores.c
  240.  
  241. extern void show_high_scores( int place );
  242. extern void draw_high_scores( int place );
  243. extern int add_player_to_high_scores(player *pp);
  244. extern void input_name ( int place );
  245. extern int reset_high_scores();
  246. extern init_player_stats_level();
  247.  
  248. void open_message_window(void);
  249. void close_message_window(void);
  250.  
  251. //create flash for player appearance
  252. extern void create_player_appearance_effect(object *player_obj);
  253.  
  254. //goto whatever secrect level is appropriate given the current level
  255. extern goto_secret_level();
  256.  
  257. //reset stuff so game is semi-normal when playing from editor
  258. void editor_reset_stuff_on_level();
  259.  
  260. //Show endlevel bonus scores
  261. extern void DoEndLevelScoreGlitz(int network);
  262.  
  263. //stuff for multiplayer
  264. extern int MaxNumNetPlayers;
  265. extern int NumNetPlayerPositions;
  266.  
  267. #endif
  268. 
  269.