2002-08-27 04:13:03 +00:00
|
|
|
/* $Id: mission.h,v 1.5 2002-08-27 04:13:03 btb Exp $ */
|
2001-01-19 03:30:16 +00:00
|
|
|
/*
|
|
|
|
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
|
|
|
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
|
|
|
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
|
|
|
|
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
|
|
|
|
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
|
|
|
|
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
|
|
|
|
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
|
|
|
|
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
|
2002-08-07 07:34:09 +00:00
|
|
|
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
2001-01-19 03:30:16 +00:00
|
|
|
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MISSION_H
|
|
|
|
#define _MISSION_H
|
|
|
|
|
|
|
|
#include <pstypes.h>
|
|
|
|
|
2002-08-07 07:34:09 +00:00
|
|
|
#define MAX_MISSIONS 300
|
|
|
|
#define MAX_LEVELS_PER_MISSION 30
|
|
|
|
#define MAX_SECRET_LEVELS_PER_MISSION 6
|
|
|
|
#define MISSION_NAME_LEN 25
|
2001-01-19 03:30:16 +00:00
|
|
|
|
2002-08-23 10:43:11 +00:00
|
|
|
#define SHAREWARE_MISSION_FILENAME "d2demo"
|
|
|
|
#define SHAREWARE_MISSION_NAME "Descent 2 Demo"
|
|
|
|
#define SHAREWARE_MISSION_HOGSIZE 2292566
|
|
|
|
#define MAC_SHARE_MISSION_HOGSIZE 4292746
|
|
|
|
|
|
|
|
#define OEM_MISSION_FILENAME "d2"
|
|
|
|
#define OEM_MISSION_NAME "D2 Destination:Quartzon"
|
|
|
|
#define OEM_MISSION_HOGSIZE 6132957
|
|
|
|
|
2002-08-26 06:46:37 +00:00
|
|
|
#define FULL_MISSION_FILENAME "d2"
|
2002-08-23 10:43:11 +00:00
|
|
|
#define FULL_MISSION_HOGSIZE 7595079
|
|
|
|
|
2001-01-19 03:30:16 +00:00
|
|
|
//mission list entry
|
|
|
|
typedef struct mle {
|
2002-08-07 07:34:09 +00:00
|
|
|
char filename[9]; // path and filename without extension
|
|
|
|
char mission_name[MISSION_NAME_LEN+1];
|
|
|
|
ubyte anarchy_only_flag; // if true, mission is anarchy only
|
|
|
|
ubyte location; // see defines below
|
|
|
|
ubyte descent_version; // descent 1 or descent 2?
|
2001-01-19 03:30:16 +00:00
|
|
|
} mle;
|
|
|
|
|
|
|
|
//values that describe where a mission is located
|
2002-08-07 07:34:09 +00:00
|
|
|
#define ML_CURDIR 0
|
|
|
|
#define ML_MISSIONDIR 1
|
|
|
|
#define ML_CDROM 2
|
2001-01-19 03:30:16 +00:00
|
|
|
|
|
|
|
extern mle Mission_list[MAX_MISSIONS];
|
|
|
|
|
2002-08-27 04:13:03 +00:00
|
|
|
extern int Current_mission_num, Builtin_mission_num;
|
2001-01-19 03:30:16 +00:00
|
|
|
extern char *Current_mission_filename,*Current_mission_longname;
|
2002-08-26 06:46:37 +00:00
|
|
|
extern char Builtin_mission_filename[9];
|
2002-08-23 10:43:11 +00:00
|
|
|
extern int Builtin_mission_hogsize;
|
2001-01-19 03:30:16 +00:00
|
|
|
|
|
|
|
//arrays of name of the level files
|
|
|
|
extern char Level_names[MAX_LEVELS_PER_MISSION][FILENAME_LEN];
|
|
|
|
extern char Secret_level_names[MAX_SECRET_LEVELS_PER_MISSION][FILENAME_LEN];
|
|
|
|
|
|
|
|
//fills in the global list of missions. Returns the number of missions
|
|
|
|
//in the list. If anarchy_mode set, don't include non-anarchy levels.
|
|
|
|
//if there is only one mission, this function will call load_mission on it.
|
|
|
|
int build_mission_list(int anarchy_mode);
|
|
|
|
|
|
|
|
//loads the specfied mission from the mission list. build_mission_list()
|
|
|
|
//must have been called. If build_mission_list() returns 0, this function
|
|
|
|
//does not need to be called. Returns true if mission loaded ok, else false.
|
|
|
|
int load_mission(int mission_num);
|
|
|
|
|
|
|
|
//loads the named mission if exists.
|
|
|
|
//Returns true if mission loaded ok, else false.
|
|
|
|
int load_mission_by_name(char *mission_name);
|
|
|
|
|
|
|
|
#endif
|