renamed duplicate definition of global variable
authorHolger Schemel <info@artsoft.org>
Fri, 31 Jan 2020 16:13:43 +0000 (17:13 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 19 May 2020 16:12:54 +0000 (18:12 +0200)
This would cause a compilation error with GCC 10, where "-fno-common"
is set by default.

src/game_sp/BugsTerminals.c
src/game_sp/DDScrollBuffer.c
src/game_sp/init.c
src/game_sp/main.c
src/game_sp/main_sp.h

index cf808c09b3f27df7ba9b8872d4dde8e2e6abb2b0..c6f03e2e6bcd13cd652da4bfd304c99255999ef9 100644 (file)
@@ -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);
 
index 0db7e7fd2af75a00ef34dbc429e676d1c6395c92..13c773a164e99e2432ad67cc4d0d045184fb1a71 100644 (file)
@@ -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
       {
index 4b001ae44c777fc17f978caf1f5ff7e103b52895..e728c9a74e3c9e3a866cbe47c942475dd8591651 100644 (file)
@@ -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));
index 2a79f6da6ae1566f9736d1c738948abc682c7c06..7eed1dd5d44bde6fb11c22abb8b14359d2517156 100644 (file)
@@ -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)
index 2eee6ef6c7df755d7d44679d9176524ea24d2f82..58693d8db95bbbb00f0a259b1d66605806fa9163 100644 (file)
@@ -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];
 
 
 // ----------------------------------------------------------------------------