home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / mission.h < prev    next >
C/C++ Source or Header  |  1998-06-08  |  3KB  |  89 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/mission.h $
  15.  * $Revision: 2.0 $
  16.  * $Author: john $
  17.  * $Date: 1995/02/27 11:31:35 $
  18.  * 
  19.  * Header for mission.h
  20.  * 
  21.  * $Log: mission.h $
  22.  * Revision 2.0  1995/02/27  11:31:35  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.6  1995/01/30  12:55:41  matt
  27.  * Added vars to point to mission names
  28.  * 
  29.  * Revision 1.5  1995/01/22  18:57:21  matt
  30.  * Made player highest level work with missions
  31.  * 
  32.  * Revision 1.4  1995/01/22  14:13:21  matt
  33.  * Added flag in mission list for anarchy-only missions
  34.  * 
  35.  * Revision 1.3  1995/01/21  23:13:12  matt
  36.  * Made high scores with (not work, really) with loaded missions
  37.  * Don't give player high score when quit game
  38.  * 
  39.  * Revision 1.2  1995/01/20  22:47:53  matt
  40.  * Mission system implemented, though imcompletely
  41.  * 
  42.  * Revision 1.1  1995/01/20  13:42:26  matt
  43.  * Initial revision
  44.  * 
  45.  * 
  46.  */
  47.  
  48. #ifndef _MISSION_H
  49. #define _MISSION_H
  50.  
  51. #include <types.h>
  52.  
  53. #define MAX_MISSIONS                         100
  54. #define MAX_LEVELS_PER_MISSION            30
  55. #define MAX_SECRET_LEVELS_PER_MISSION    5
  56. #define MISSION_NAME_LEN                     21
  57.  
  58. //mission list entry
  59. typedef struct mle {
  60.     char    filename[9];                            //filename without extension
  61.     char    mission_name[MISSION_NAME_LEN+1];
  62.     ubyte    anarchy_only_flag;                    //if true, mission is anarchy only
  63. } mle;
  64.  
  65. extern mle Mission_list[MAX_MISSIONS];
  66.  
  67. extern int Current_mission_num;
  68. extern char *Current_mission_filename,*Current_mission_longname;
  69.  
  70. //arrays of name of the level files
  71. extern char Level_names[MAX_LEVELS_PER_MISSION][13];
  72. extern char Secret_level_names[MAX_SECRET_LEVELS_PER_MISSION][13];
  73.  
  74. //fills in the global list of missions.  Returns the number of missions
  75. //in the list.  If anarchy_mode set, don't include non-anarchy levels.
  76. //if there is only one mission, this function will call load_mission on it.
  77. int build_mission_list(int anarchy_mode);
  78.  
  79. //loads the specfied mission from the mission list.  build_mission_list()
  80. //must have been called.  If build_mission_list() returns 0, this function
  81. //does not need to be called.  Returns true if mission loaded ok, else false.
  82. int load_mission(int mission_num);
  83.  
  84. //loads the named mission if exists.
  85. //Returns true if mission loaded ok, else false.
  86. int load_mission_by_name(char *mission_name);
  87.  
  88. #endif
  89.