1 /* $Id: mission.h,v 1.16 2003-11-24 23:11:26 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 // v1.4 - 1.5
62 #define D1_10_MISSION_HOGSIZE 7261423 // v1.0
63 #define D1_MAC_MISSION_HOGSIZE 7456179
64 #define D1_OEM_MISSION_NAME "Destination Saturn"
65 #define D1_OEM_MISSION_HOGSIZE 4492107 // v1.4a
66 #define D1_OEM_10_MISSION_HOGSIZE 4494862 // v1.0
67 #define D1_SHAREWARE_MISSION_NAME "Descent Demo"
68 #define D1_SHAREWARE_MISSION_HOGSIZE 2339773 // v1.4
69 #define D1_SHAREWARE_10_MISSION_HOGSIZE 2365676 // v1.0 - 1.2
70 #define D1_MAC_SHARE_MISSION_HOGSIZE 3370339
72 #define SHAREWARE_MISSION_FILENAME "d2demo"
73 #define SHAREWARE_MISSION_NAME "Descent 2 Demo"
74 #define SHAREWARE_MISSION_HOGSIZE 2292566 // v1.0 (d2demo.hog)
75 #define MAC_SHARE_MISSION_HOGSIZE 4292746
77 #define OEM_MISSION_FILENAME "d2"
78 #define OEM_MISSION_NAME "D2 Destination:Quartzon"
79 #define OEM_MISSION_HOGSIZE 6132957 // v1.1
81 #define FULL_MISSION_FILENAME "d2"
82 #define FULL_MISSION_HOGSIZE 7595079 // v1.1 - 1.2
83 #define FULL_10_MISSION_HOGSIZE 7107354 // v1.0
84 #define MAC_FULL_MISSION_HOGSIZE 7110007 // v1.1 - 1.2
88 char filename[9]; // path and filename without extension
89 char mission_name[MISSION_NAME_LEN+1];
90 ubyte anarchy_only_flag; // if true, mission is anarchy only
91 ubyte location; // see defines below
92 ubyte descent_version; // descent 1 or descent 2?
95 //values that describe where a mission is located
97 #define ML_MISSIONDIR 1
100 //where the missions go
102 #define MISSION_DIR "missions/"
104 #define MISSION_DIR "./"
107 extern mle Mission_list[MAX_MISSIONS];
109 extern int Current_mission_num, Builtin_mission_num;
110 extern char *Current_mission_filename,*Current_mission_longname;
111 extern char Builtin_mission_filename[9];
112 extern int Builtin_mission_hogsize;
114 #define is_SHAREWARE (Builtin_mission_hogsize == SHAREWARE_MISSION_HOGSIZE)
115 #define is_MAC_SHARE (Builtin_mission_hogsize == MAC_SHARE_MISSION_HOGSIZE)
116 #define is_D2_OEM (Builtin_mission_hogsize == OEM_MISSION_HOGSIZE)
118 //arrays of name of the level files
119 extern char Level_names[MAX_LEVELS_PER_MISSION][FILENAME_LEN];
120 extern char Secret_level_names[MAX_SECRET_LEVELS_PER_MISSION][FILENAME_LEN];
122 //fills in the global list of missions. Returns the number of missions
123 //in the list. If anarchy_mode set, don't include non-anarchy levels.
124 //if there is only one mission, this function will call load_mission on it.
125 int build_mission_list(int anarchy_mode);
127 //loads the specfied mission from the mission list. build_mission_list()
128 //must have been called. If build_mission_list() returns 0, this function
129 //does not need to be called. Returns true if mission loaded ok, else false.
130 int load_mission(int mission_num);
132 //loads the named mission if exists.
133 //Returns true if mission loaded ok, else false.
134 int load_mission_by_name(char *mission_name);