savegame.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* =============================================================================
  2. * PROGRAM: ularn
  3. * FILENAME: savegame.h
  4. *
  5. * DESCRIPTION:
  6. * This module contains functions for saving and loading the game.
  7. *
  8. * =============================================================================
  9. * EXPORTED VARIABLES
  10. *
  11. * None
  12. *
  13. * =============================================================================
  14. * EXPORTED FUNCTIONS
  15. *
  16. * savegame : Function to save the game
  17. * restoregame : Function to load the game
  18. *
  19. * =============================================================================
  20. */
  21. #ifndef __SAVEGAME_H
  22. #define __SAVEGAME_H
  23. /* =============================================================================
  24. * FUNCTION: savegame
  25. *
  26. * DESCRIPTION:
  27. * Function to save the current game data to a file.
  28. *
  29. * PARAMETERS:
  30. *
  31. * fname : The name of the save file to be written.
  32. *
  33. * RETURN VALUE:
  34. *
  35. * 0 if successfully written
  36. * -1 if an error occurred
  37. */
  38. int savegame(char *fname);
  39. /* =============================================================================
  40. * FUNCTION: restoregame
  41. *
  42. * DESCRIPTION:
  43. * Function to restore a game from a file.
  44. *
  45. * PARAMETERS:
  46. *
  47. * fname : The name of the file containing the game to be restored.
  48. *
  49. * RETURN VALUE:
  50. *
  51. * None.
  52. */
  53. void restoregame(char *fname);
  54. #endif