diff --git a/cgdoom/g_game.c b/cgdoom/g_game.c index 47173f5..33c04ad 100644 --- a/cgdoom/g_game.c +++ b/cgdoom/g_game.c @@ -67,7 +67,8 @@ #include "g_game.h" -#define SAVEGAMESIZE 0x2c000 +/* CGDoom: Amount of data available at screens[0], here full VRAM */ +#define SAVEGAMESIZE (384*216*2) #define SAVESTRINGSIZE 24 @@ -1009,7 +1010,7 @@ void G_DoSaveGame (void) sprintf(name, SAVEGAMENAME "%d.dsg", savegameslot); description = savedescription; - save_p = savebuffer = screens[1]+0x4000; + save_p = savebuffer = screens[0]; memcpy (save_p, description, SAVESTRINGSIZE); save_p += SAVESTRINGSIZE; diff --git a/cgdoom/i_system.c b/cgdoom/i_system.c index f8ca97f..670fae6 100644 --- a/cgdoom/i_system.c +++ b/cgdoom/i_system.c @@ -131,7 +131,10 @@ byte *I_ScreenBase(int screen) -> Give 320*200 = 64 kB to screens[0] (main display) -> Give 320*200 = 64 kB to screens[1] (intermissions) -> Give 320*32 = 10 kiB to screens[4] (status bar) - -> 27 kiB are left */ + -> 27 kiB are left + Note that the screen buffers are used as temporary storage to write game + data during saves, so if continuity is broken g_game.c must be updated + to point savebuffer elsewhere and/or update SAVEGAMESIZE. */ if (screen == 0) return CGDOOM_SCREENS_BASE; if (screen == 1)