X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_sp%2FGlobals.c;h=91c715172ee6c8c5981e8b4d5b5149b36ca07031;hp=e34d19624341f42236c2ee46c5c67343ca8d900b;hb=fe43dcf8ac7fb16e80d60a0c187bcbd65f40b5f2;hpb=97baecdfcf386d972f6f8e6eec9ddfd3021ed7ed diff --git a/src/game_sp/Globals.c b/src/game_sp/Globals.c index e34d1962..91c71517 100644 --- a/src/game_sp/Globals.c +++ b/src/game_sp/Globals.c @@ -17,7 +17,8 @@ int FieldMax, LevelMax; long FileMax; #if 1 -int PlayField16[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; +int *PlayField16; +// int PlayField16[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; byte PlayField8[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; byte DisPlayField[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; #else @@ -164,6 +165,8 @@ boolean isSnappingSequence(int sequence) void InitGlobals() { + InitPrecedingPlayfieldMemory(); + AutoScrollFlag = True; FreezeZonks = 0; LevelLoaded = False; @@ -175,6 +178,11 @@ void InitGlobals() bPlaying = False; menBorder = False; + PlayField16 = checked_calloc((game_sp.preceding_buffer_size + + SP_MAX_PLAYFIELD_SIZE + + SP_HEADER_SIZE) * sizeof(int)); + PlayField16 = &PlayField16[game_sp.preceding_buffer_size]; + #if 0 /* these defaults will be changed after reading a Supaplex level file */ PlayField8 = REDIM_1D(sizeof(byte), 0, FieldMax);