2014-03-15 16:59:03 +00:00
|
|
|
// SONIC ROBO BLAST 2
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
2020-02-19 22:08:45 +00:00
|
|
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
2014-03-15 16:59:03 +00:00
|
|
|
//
|
|
|
|
// This program is free software distributed under the
|
|
|
|
// terms of the GNU General Public License, version 2.
|
|
|
|
// See the 'LICENSE' file for more details.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
/// \file p_saveg.h
|
|
|
|
/// \brief Savegame I/O, archiving, persistence
|
|
|
|
|
|
|
|
#ifndef __P_SAVEG__
|
|
|
|
#define __P_SAVEG__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Persistent storage/archiving.
|
|
|
|
// These are the load / save game routines.
|
|
|
|
|
Special saves!
All this refactoring, just to resolve #162. Specifically, it engages savegame events not at level load (except for savefile start) but on level completion, just after you've gotten all the intermission bonuses but before the intermission actually starts.
Also fixes a never-before-discovered bug where if the titlemap has LF_SAVEGAME, your save file will be overwritten upon returning to the title screen. This game is a mess of hacks, I swear...
One unintended side effect: It may actually be faster in some speedrun circumstances in mods with cutscenes to complete the map, exit back to the title screen, and reload the file. It's a common feature of optimal runs in games with cutscenes, though, and Marathon Run has a toggle for cutscenes, so I'm not particularly bothered.
2020-06-22 18:00:47 +00:00
|
|
|
void P_SaveGame(INT16 mapnum);
|
2020-01-31 14:57:04 +00:00
|
|
|
void P_SaveNetGame(boolean resending);
|
2014-03-15 16:59:03 +00:00
|
|
|
boolean P_LoadGame(INT16 mapoverride);
|
2020-01-31 14:57:04 +00:00
|
|
|
boolean P_LoadNetGame(boolean reloading);
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
mobj_t *P_FindNewPosition(UINT32 oldposition);
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
UINT8 skin;
|
|
|
|
UINT8 botskin;
|
|
|
|
INT32 score;
|
|
|
|
INT32 lives;
|
|
|
|
INT32 continues;
|
|
|
|
UINT16 emeralds;
|
2017-08-17 23:58:16 +00:00
|
|
|
UINT8 numgameovers;
|
2014-03-15 16:59:03 +00:00
|
|
|
} savedata_t;
|
|
|
|
|
|
|
|
extern savedata_t savedata;
|
|
|
|
extern UINT8 *save_p;
|
|
|
|
|
|
|
|
#endif
|