home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / playsave.h < prev    next >
C/C++ Source or Header  |  1998-06-08  |  3KB  |  96 lines

  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/playsave.h $
  15.  * $Revision: 2.0 $
  16.  * $Author: john $
  17.  * $Date: 1995/02/27 11:31:24 $
  18.  * 
  19.  * Header for playsave.c
  20.  * 
  21.  * $Log: playsave.h $
  22.  * Revision 2.0  1995/02/27  11:31:24  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.10  1995/01/22  18:57:04  matt
  27.  * Made player highest level work with missions
  28.  * 
  29.  * Revision 1.9  1994/12/12  11:37:15  matt
  30.  * Fixed auto leveling defaults & saving
  31.  * 
  32.  * Revision 1.8  1994/12/08  10:01:37  john
  33.  * Changed the way the player callsign stuff works.
  34.  * 
  35.  * Revision 1.7  1994/11/25  22:46:56  matt
  36.  * Made saved game descriptions longer
  37.  * 
  38.  * Revision 1.6  1994/10/24  20:00:02  john
  39.  * Added prototype for read_player_file.
  40.  * 
  41.  * Revision 1.5  1994/10/17  13:07:12  john
  42.  * Moved the descent.cfg info into the player config file.
  43.  * 
  44.  * Revision 1.4  1994/10/09  14:54:32  matt
  45.  * Made player cockpit state & window size save/restore with saved games & automap
  46.  * 
  47.  * Revision 1.3  1994/10/08  23:08:09  matt
  48.  * Added error check & handling for game load/save disk io
  49.  * 
  50.  * Revision 1.2  1994/09/28  17:25:06  matt
  51.  * Added first draft of game save/load system
  52.  * 
  53.  * Revision 1.1  1994/09/27  15:47:23  matt
  54.  * Initial revision
  55.  * 
  56.  * 
  57.  */
  58.  
  59. #ifndef _PLAYSAVE_H
  60. #define _PLAYSAVE_H
  61.  
  62. #define N_SAVE_SLOTS        10
  63. #define GAME_NAME_LEN    25        //+1 for terminating zero = 26
  64.  
  65. extern int Default_leveling_on;
  66.  
  67. //fills in a list of pointers to strings describing saved games
  68. //returns the number of non-empty slots
  69. //returns -1 if this is a new player
  70. int get_game_list(char *game_text[N_SAVE_SLOTS]);
  71.  
  72. //returns errno (0 == no error)
  73. int save_player_game(int slot_num,char *text);
  74.  
  75. //returns errno (0 == no error)
  76. int load_player_game(int slot_num);
  77.  
  78. //update the player's highest level.  returns errno (0 == no error)
  79. int update_player_file();
  80.  
  81. //Used to save kconfig values to disk.
  82. int write_player_file();
  83.  
  84. int new_player_config();
  85. void init_game_list();
  86.  
  87. int read_player_file();
  88.  
  89. //set a new highest level for player for this mission
  90. void set_highest_level(int levelnum);
  91.  
  92. //gets the player's highest level from the file for this mission
  93. int get_highest_level(void);
  94.  
  95. #endif
  96.