PLAYSAVE.H 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. #ifndef _PLAYSAVE_H
  59. #define _PLAYSAVE_H
  60. #define N_SAVE_SLOTS 10
  61. #define GAME_NAME_LEN 25 //+1 for terminating zero = 26
  62. extern int Default_leveling_on;
  63. //fills in a list of pointers to strings describing saved games
  64. //returns the number of non-empty slots
  65. //returns -1 if this is a new player
  66. int get_game_list(char *game_text[N_SAVE_SLOTS]);
  67. //returns errno (0 == no error)
  68. int save_player_game(int slot_num,char *text);
  69. //returns errno (0 == no error)
  70. int load_player_game(int slot_num);
  71. //update the player's highest level. returns errno (0 == no error)
  72. int update_player_file();
  73. //Used to save kconfig values to disk.
  74. int write_player_file();
  75. int new_player_config();
  76. void init_game_list();
  77. int read_player_file();
  78. //set a new highest level for player for this mission
  79. void set_highest_level(int levelnum);
  80. //gets the player's highest level from the file for this mission
  81. int get_highest_level(void);
  82. #endif