From: Holger Schemel Date: Fri, 31 Jan 2020 16:13:43 +0000 (+0100) Subject: renamed duplicate definition of global variable X-Git-Tag: 4.2.0.0~197 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b4271393b10b7c664a58f3db7349a3875c1676fe;p=rocksndiamonds.git renamed duplicate definition of global variable This would cause a compilation error with GCC 10, where "-fno-common" is set by default. --- diff --git a/src/game_sp/BugsTerminals.c b/src/game_sp/BugsTerminals.c index cf808c09..c6f03e2e 100644 --- a/src/game_sp/BugsTerminals.c +++ b/src/game_sp/BugsTerminals.c @@ -77,7 +77,7 @@ void subAnimateTerminals(int si) // use native frame handling (undo frame incrementation in main loop) if (game.use_native_sp_graphics_engine) - GfxFrame[lx][ly]--; + GfxFrameSP[lx][ly]--; // get last random animation delay bl = SgnHighByte(PlayField16[si]); @@ -108,7 +108,7 @@ void subAnimateTerminals(int si) graphic = (bl < 8 ? aniTerminal : aniTerminalActive); if (game.use_native_sp_graphics_engine) - GfxFrame[lx][ly] += getGraphicInfo_Delay(graphic); + GfxFrameSP[lx][ly] += getGraphicInfo_Delay(graphic); GfxGraphic[lx][ly] = (bl < 8 ? aniTerminal : aniTerminalActive); diff --git a/src/game_sp/DDScrollBuffer.c b/src/game_sp/DDScrollBuffer.c index 0db7e7fd..13c773a1 100644 --- a/src/game_sp/DDScrollBuffer.c +++ b/src/game_sp/DDScrollBuffer.c @@ -185,7 +185,7 @@ void UpdatePlayfield(boolean force_redraw) { int element = LowByte(PlayField16[GetSI(x, y)]); int graphic = GfxGraphic[x][y]; - int sync_frame = GfxFrame[x][y]; + int sync_frame = GfxFrameSP[x][y]; boolean redraw = force_redraw; if (graphic < 0) @@ -212,7 +212,7 @@ void UpdatePlayfield(boolean force_redraw) GfxElementLast[x][y] = element; GfxGraphicLast[x][y] = GfxGraphic[x][y]; - sync_frame = GfxFrame[x][y] = 0; + sync_frame = GfxFrameSP[x][y] = 0; } else if (isNextAnimationFrame_SP(graphic, sync_frame)) // new frame { diff --git a/src/game_sp/init.c b/src/game_sp/init.c index 4b001ae4..e728c9a7 100644 --- a/src/game_sp/init.c +++ b/src/game_sp/init.c @@ -178,7 +178,7 @@ void SaveEngineSnapshotValues_SP(ListNode **buffers) SaveSnapshotBuffer(buffers, ARGS_ADDRESS_AND_SIZEOF(GfxElementLast)); SaveSnapshotBuffer(buffers, ARGS_ADDRESS_AND_SIZEOF(GfxGraphicLast)); SaveSnapshotBuffer(buffers, ARGS_ADDRESS_AND_SIZEOF(GfxGraphic)); - SaveSnapshotBuffer(buffers, ARGS_ADDRESS_AND_SIZEOF(GfxFrame)); + SaveSnapshotBuffer(buffers, ARGS_ADDRESS_AND_SIZEOF(GfxFrameSP)); SaveSnapshotBuffer(buffers, ARGS_ADDRESS_AND_SIZEOF(ScrollMinX)); SaveSnapshotBuffer(buffers, ARGS_ADDRESS_AND_SIZEOF(ScrollMinY)); diff --git a/src/game_sp/main.c b/src/game_sp/main.c index 2a79f6da..7eed1dd5 100644 --- a/src/game_sp/main.c +++ b/src/game_sp/main.c @@ -9,7 +9,7 @@ struct LevelInfo_SP native_sp_level; int GfxElementLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; int GfxGraphicLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; int GfxGraphic[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; -int GfxFrame[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; +int GfxFrameSP[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; void InitGameEngine_SP(void) @@ -43,7 +43,7 @@ void InitGameEngine_SP(void) GfxElementLast[x][y] = -1; GfxGraphicLast[x][y] = -1; GfxGraphic[x][y] = -1; - GfxFrame[x][y] = 0; + GfxFrameSP[x][y] = 0; } } @@ -91,7 +91,7 @@ void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode) for (x = DisplayMinX; x <= DisplayMaxX; x++) for (y = DisplayMinY; y <= DisplayMaxY; y++) - GfxFrame[x][y]++; + GfxFrameSP[x][y]++; } int getRedDiskReleaseFlag_SP(void) diff --git a/src/game_sp/main_sp.h b/src/game_sp/main_sp.h index 2eee6ef6..58693d8d 100644 --- a/src/game_sp/main_sp.h +++ b/src/game_sp/main_sp.h @@ -70,7 +70,7 @@ extern Bitmap *bitmap_db_field_sp; extern int GfxElementLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; extern int GfxGraphicLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; extern int GfxGraphic[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; -extern int GfxFrame[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; +extern int GfxFrameSP[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; // ----------------------------------------------------------------------------