1 /* $Id: mission.h,v 1.10 2003-02-28 03:54:55 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
85 char filename[9]; // path and filename without extension
86 char mission_name[MISSION_NAME_LEN+1];
87 ubyte anarchy_only_flag; // if true, mission is anarchy only
88 ubyte location; // see defines below
89 ubyte descent_version; // descent 1 or descent 2?
92 //values that describe where a mission is located
94 #define ML_MISSIONDIR 1
97 //where the missions go
99 #define MISSION_DIR "missions/"
101 #define MISSION_DIR "./"
104 extern mle Mission_list[MAX_MISSIONS];
106 extern int Current_mission_num, Builtin_mission_num;
107 extern char *Current_mission_filename,*Current_mission_longname;
108 extern char Builtin_mission_filename[9];
109 extern int Builtin_mission_hogsize;
111 //arrays of name of the level files
112 extern char Level_names[MAX_LEVELS_PER_MISSION][FILENAME_LEN];
113 extern char Secret_level_names[MAX_SECRET_LEVELS_PER_MISSION][FILENAME_LEN];
115 //fills in the global list of missions. Returns the number of missions
116 //in the list. If anarchy_mode set, don't include non-anarchy levels.
117 //if there is only one mission, this function will call load_mission on it.
118 int build_mission_list(int anarchy_mode);
120 //loads the specfied mission from the mission list. build_mission_list()
121 //must have been called. If build_mission_list() returns 0, this function
122 //does not need to be called. Returns true if mission loaded ok, else false.
123 int load_mission(int mission_num);
125 //loads the named mission if exists.
126 //Returns true if mission loaded ok, else false.
127 int load_mission_by_name(char *mission_name);