rnd-20091030-1-src
[rocksndiamonds.git] / src / game_sp / Globals.c
index 9dbe3138901d24bd2ee90e58207ab56f4de9f3b1..a54380ef768bd59d73188c3a718d5853b111b265 100644 (file)
@@ -64,6 +64,8 @@ int *PlayField16;
 byte *PlayField8;
 byte *DisPlayField;
 
+long ScreenBuffer[SP_SCREEN_BUFFER_XSIZE][SP_SCREEN_BUFFER_YSIZE];
+
 // Public DisplayMin%, DisplayMax%, DisplayWidth%, DisplayHeight%
 
 int TimerVar;
@@ -329,7 +331,7 @@ int GetStretchY(int si)
   return GetStretchY;
 }
 
-void ReadLevel()
+void OLD_ReadLevel()
 {
 #if 1
   static char CurPathTEST[1024];
@@ -580,6 +582,18 @@ static void ReadDemo()
   printf("::: LInfo.DemoRandomSeed == %d\n", LInfo.DemoRandomSeed);
 #endif
 
+#if 0
+  printf("::: LInfo.SpecialPortCount == %d\n", LInfo.SpecialPortCount);
+  for (i = 0; i < LInfo.SpecialPortCount; i++)
+  {
+    int port_x = (LInfo.SpecialPort[i].PortLocation / 2) % FieldWidth;
+    int port_y = (LInfo.SpecialPort[i].PortLocation / 2) / FieldWidth;
+
+    printf("::: %d: port_location == %d => (%d, %d)\n",
+          i, LInfo.SpecialPort[i].PortLocation, port_x, port_y);
+  }
+#endif
+
   RandomSeed = LInfo.DemoRandomSeed;
 
 #if 0
@@ -607,3 +621,23 @@ ReadDemoEH:
   Close();
 #endif
 }
+
+void ReadLevel()
+{
+#if 0
+  OLD_ReadLevel();
+
+  // return;
+#endif
+
+  copyInternalEngineVars_SP();
+
+  LevelNumber = level_nr;
+
+#if 0
+  if (!DemoFlag || !DemoAvailable)
+    subRandomize();
+#endif
+
+  LevelLoaded = True;
+}