Subversion Repositories Games.Descent

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Portions of this file are copyright Rebirth contributors and licensed as
  3.  * described in COPYING.txt.
  4.  * Portions of this file are copyright Parallax Software and licensed
  5.  * according to the Parallax license below.
  6.  * See COPYING.txt for license details.
  7.  
  8. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  9. SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
  10. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  11. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  12. IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  13. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  14. FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  15. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
  16. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
  17. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  18. */
  19.  
  20. /*
  21.  *
  22.  * Headers for gamesave.c
  23.  *
  24.  */
  25.  
  26.  
  27. #ifndef _GAMESAVE_H
  28. #define _GAMESAVE_H
  29.  
  30. #include "pstypes.h"
  31.  
  32. #ifdef __cplusplus
  33. #include "fwd-segment.h"
  34.  
  35. #define D1X_LEVEL_FILE_EXTENSION        "RDL"
  36. #define D2X_LEVEL_FILE_EXTENSION        "RL2"
  37.  
  38. #if defined(DXX_BUILD_DESCENT_I)
  39. #define NUM_SHAREWARE_LEVELS    7
  40. #define NUM_REGISTERED_LEVELS   23
  41.  
  42. extern const char Shareware_level_names[NUM_SHAREWARE_LEVELS][12];
  43. extern const char Registered_level_names[NUM_REGISTERED_LEVELS][12];
  44.  
  45. int convert_tmap(int tmap);     // for gamemine.c
  46. #define DXX_LEVEL_FILE_EXTENSION        D1X_LEVEL_FILE_EXTENSION
  47. #elif defined(DXX_BUILD_DESCENT_II)
  48. #define DXX_LEVEL_FILE_EXTENSION        D2X_LEVEL_FILE_EXTENSION
  49. #endif
  50. void LoadGame(void);
  51. void SaveGame(void);
  52. int get_level_name(void);
  53.  
  54. #ifdef dsx
  55. namespace dsx {
  56. int load_level(
  57. #if defined(DXX_BUILD_DESCENT_II)
  58.         d_level_shared_destructible_light_state &LevelSharedDestructibleLightState,
  59. #endif
  60.         const char *filename);
  61. int save_level(
  62. #if defined(DXX_BUILD_DESCENT_II)
  63.         const d_level_shared_destructible_light_state &LevelSharedDestructibleLightState,
  64. #endif
  65.         const char *filename);
  66. }
  67. #endif
  68.  
  69. extern int Gamesave_current_version;
  70.  
  71. extern int Gamesave_num_org_robots;
  72.  
  73. // In dumpmine.c
  74. extern void write_game_text_file(const char *filename);
  75.  
  76. extern int Errors_in_mine;
  77.  
  78. #endif
  79.  
  80. #endif /* _GAMESAVE_H */
  81.