1 /* 2 3 Copyright (C) 2015-2018 Night Dive Studios, LLC. 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 */ 19 #ifndef __GAMEWRAP_H 20 #define __GAMEWRAP_H 21 22 /* 23 * $Source: n:/project/cit/src/inc/RCS/gamewrap.h $ 24 * $Revision: 1.13 $ 25 * $Author: xemu $ 26 * $Date: 1994/03/24 01:22:08 $ 27 * 28 * 29 */ 30 31 // Includes 32 33 // Remember, change in wrapper.c also 34 35 extern char *modding_archive_override; 36 37 #define OLD_SAVE_GAME_ID_BASE 550 38 #define SAVE_GAME_ID_BASE 4000 39 #define NUM_RESIDS_PER_LEVEL 100 40 #define CURRENT_GAME_FNAME "CurrentGame.dat" 41 #define ARCHIVE_FNAME (modding_archive_override != NULL ? modding_archive_override : "res/data/archive.dat") 42 43 #define ResIdFromLevel(level) (SAVE_GAME_ID_BASE + (level * NUM_RESIDS_PER_LEVEL) + 2) 44 45 // Defines 46 47 // Typedefs 48 49 // Prototypes 50 51 // Loads or saves a game named by fname. 52 errtype copy_file(char *src_fname, char *dest_fname); 53 // errtype copy_file(FSSpec *srcFile, FSSpec *destFile, Boolean saveGameFile); 54 errtype save_game(char *fname, char *comment); 55 // errtype save_game(FSSpec *fSpec); 56 errtype load_game(char *fname); 57 // errtype load_game(FSSpec *loadSpec); 58 errtype write_level_to_disk(int idnum, uchar flush_mem); 59 uchar create_initial_game_func(short keycode, ulong context, void *data); 60 uchar create_level_archive_func(short keycode, ulong context, void *data); 61 errtype load_level_from_file(int level_num); 62 void startup_game(uchar visible); 63 void closedown_game(uchar visible); 64 65 // Globals 66 67 #endif // __GAMEWRAP_H 68