1 /* $Id: mission.h,v 1.11 2003-03-14 09:17:08 btb Exp $ */
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.
17 * Header for mission.h
20 * Revision 1.1 1995/05/16 15:59:22 allender
23 * Revision 2.0 1995/02/27 11:31:35 john
24 * New version 2.0, which has no anonymous unions, builds with
25 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
27 * Revision 1.6 1995/01/30 12:55:41 matt
28 * Added vars to point to mission names
30 * Revision 1.5 1995/01/22 18:57:21 matt
31 * Made player highest level work with missions
33 * Revision 1.4 1995/01/22 14:13:21 matt
34 * Added flag in mission list for anarchy-only missions
36 * Revision 1.3 1995/01/21 23:13:12 matt
37 * Made high scores with (not work, really) with loaded missions
38 * Don't give player high score when quit game
40 * Revision 1.2 1995/01/20 22:47:53 matt
41 * Mission system implemented, though imcompletely
43 * Revision 1.1 1995/01/20 13:42:26 matt
54 #define MAX_MISSIONS 300
55 #define MAX_LEVELS_PER_MISSION 30
56 #define MAX_SECRET_LEVELS_PER_MISSION 6
57 #define MISSION_NAME_LEN 25
59 #define D1_MISSION_FILENAME "descent"
60 #define D1_MISSION_NAME "Descent: First Strike"
61 #define D1_MISSION_HOGSIZE 6856701
62 #define D1_10_MISSION_HOGSIZE 7261423
63 #define D1_MAC_MISSION_HOGSIZE 7456179
64 #define D1_OEM_MISSION_NAME "Destination Saturn"
65 #define D1_OEM_MISSION_HOGSIZE 4492107
66 #define D1_SHAREWARE_MISSION_NAME "Descent Demo"
67 #define D1_SHAREWARE_MISSION_HOGSIZE 2339773
68 #define D1_SHAREWARE_10_MISSION_HOGSIZE 2365676
69 #define D1_MAC_SHARE_MISSION_HOGSIZE 3370339
71 #define SHAREWARE_MISSION_FILENAME "d2demo"
72 #define SHAREWARE_MISSION_NAME "Descent 2 Demo"
73 #define SHAREWARE_MISSION_HOGSIZE 2292566
74 #define MAC_SHARE_MISSION_HOGSIZE 4292746
76 #define OEM_MISSION_FILENAME "d2"
77 #define OEM_MISSION_NAME "D2 Destination:Quartzon"
78 #define OEM_MISSION_HOGSIZE 6132957
80 #define FULL_MISSION_FILENAME "d2"
81 #define FULL_MISSION_HOGSIZE 7595079
82 #define MAC_FULL_MISSION_HOGSIZE 7110007
86 char filename[9]; // path and filename without extension
87 char mission_name[MISSION_NAME_LEN+1];
88 ubyte anarchy_only_flag; // if true, mission is anarchy only
89 ubyte location; // see defines below
90 ubyte descent_version; // descent 1 or descent 2?
93 //values that describe where a mission is located
95 #define ML_MISSIONDIR 1
98 //where the missions go
100 #define MISSION_DIR "missions/"
102 #define MISSION_DIR "./"
105 extern mle Mission_list[MAX_MISSIONS];
107 extern int Current_mission_num, Builtin_mission_num;
108 extern char *Current_mission_filename,*Current_mission_longname;
109 extern char Builtin_mission_filename[9];
110 extern int Builtin_mission_hogsize;
112 //arrays of name of the level files
113 extern char Level_names[MAX_LEVELS_PER_MISSION][FILENAME_LEN];
114 extern char Secret_level_names[MAX_SECRET_LEVELS_PER_MISSION][FILENAME_LEN];
116 //fills in the global list of missions. Returns the number of missions
117 //in the list. If anarchy_mode set, don't include non-anarchy levels.
118 //if there is only one mission, this function will call load_mission on it.
119 int build_mission_list(int anarchy_mode);
121 //loads the specfied mission from the mission list. build_mission_list()
122 //must have been called. If build_mission_list() returns 0, this function
123 //does not need to be called. Returns true if mission loaded ok, else false.
124 int load_mission(int mission_num);
126 //loads the named mission if exists.
127 //Returns true if mission loaded ok, else false.
128 int load_mission_by_name(char *mission_name);