rnd-20100214-1-src
[rocksndiamonds.git] / src / game_sp / BugsTerminals.c
index 70aa7b64b6d34d2bf8b08fb924d5b44e824d221e..374a6f48fd3050adf3ad657ab1c44b7b49d02c11 100644 (file)
@@ -12,7 +12,10 @@ long MyGetTickCount();
 
 byte *TerminalState;
 int TerminalMaxCycles;
+
+#if 0
 #define aniTerminal                    (0x80)
+#endif
 
 // ==========================================================================
 //                              SUBROUTINE
@@ -78,7 +81,7 @@ markPlaySound:
 
 markDisplay:
   // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-  cx = aniBug[bl];
+  cx = aniFramesBug[bl];
   StretchedSprites.BltEx(GetStretchX(si), GetStretchY(si), cx);
   // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
@@ -95,7 +98,7 @@ int subAnimateTerminals(int si)
 
   // int bl, ax, al, X, Y;
 #if 1
-  short bl, al, X, Y;
+  short bl;
 #else
   int bl, al, X, Y;
 #endif
@@ -146,22 +149,36 @@ int subAnimateTerminals(int si)
     bl = 8;
   }
 
+  TerminalState[si] = bl;
+
+  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 #if 1
-  graphic = (bl < 8 ? IMG_SP_TERMINAL : IMG_SP_TERMINAL_ACTIVE);
+
+  graphic = (bl < 8 ? aniTerminal : aniTerminalActive);
 
   if (game.use_native_sp_graphics_engine)
     GfxFrame[lx][ly] += getGraphicInfo_Delay(graphic);
-#endif
 
-  TerminalState[si] = bl;
-  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-  al = aniTerminal + bl;
+#if 1
+  subCopyAnimToScreen(si, graphic, GfxFrame[lx][ly]);
+#else
   X = GetStretchX(si);
   Y = GetStretchY(si);
-#if 1
   StretchedSprites.BltImg(X, Y, graphic, GfxFrame[lx][ly]);
+#endif
+
+#else
+
+  al = aniTerminal + bl;
+
+#if 1
+  subCopyFieldToScreen(si, al);
 #else
+  X = GetStretchX(si);
+  Y = GetStretchY(si);
   StretchedSprites.BltEx(X, Y, al);
+#endif
+
 #endif
   // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++