X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FGlobals.c;h=e73a7d534505e022f74eeb9490bef89a5caf8df9;hb=83a31e12a79ab21deddbbb7533998a1a54a989dd;hp=9dbe3138901d24bd2ee90e58207ab56f4de9f3b1;hpb=026c569fc47fbe95d8cb131442a4e04610f27f05;p=rocksndiamonds.git diff --git a/src/game_sp/Globals.c b/src/game_sp/Globals.c index 9dbe3138..e73a7d53 100644 --- a/src/game_sp/Globals.c +++ b/src/game_sp/Globals.c @@ -329,7 +329,7 @@ int GetStretchY(int si) return GetStretchY; } -void ReadLevel() +void OLD_ReadLevel() { #if 1 static char CurPathTEST[1024]; @@ -580,6 +580,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 +619,21 @@ ReadDemoEH: Close(); #endif } + +void ReadLevel() +{ +#if 0 + OLD_ReadLevel(); + + // return; +#endif + + copyInternalEngineVars_SP(); + + LevelNumber = level_nr; + + if (!DemoFlag || !DemoAvailable) + subRandomize(); + + LevelLoaded = True; +}