MISSION.H 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. #ifndef _MISSION_H
  48. #define _MISSION_H
  49. #include <types.h>
  50. #define MAX_MISSIONS 100
  51. #define MAX_LEVELS_PER_MISSION 30
  52. #define MAX_SECRET_LEVELS_PER_MISSION 5
  53. #define MISSION_NAME_LEN 21
  54. //mission list entry
  55. typedef struct mle {
  56. char filename[9]; //filename without extension
  57. char mission_name[MISSION_NAME_LEN+1];
  58. ubyte anarchy_only_flag; //if true, mission is anarchy only
  59. } mle;
  60. extern mle Mission_list[MAX_MISSIONS];
  61. extern int Current_mission_num;
  62. extern char *Current_mission_filename,*Current_mission_longname;
  63. //arrays of name of the level files
  64. extern char Level_names[MAX_LEVELS_PER_MISSION][13];
  65. extern char Secret_level_names[MAX_SECRET_LEVELS_PER_MISSION][13];
  66. //fills in the global list of missions. Returns the number of missions
  67. //in the list. If anarchy_mode set, don't include non-anarchy levels.
  68. //if there is only one mission, this function will call load_mission on it.
  69. int build_mission_list(int anarchy_mode);
  70. //loads the specfied mission from the mission list. build_mission_list()
  71. //must have been called. If build_mission_list() returns 0, this function
  72. //does not need to be called. Returns true if mission loaded ok, else false.
  73. int load_mission(int mission_num);
  74. //loads the named mission if exists.
  75. //Returns true if mission loaded ok, else false.
  76. int load_mission_by_name(char *mission_name);
  77. #endif