X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FGlobals.c;h=ebf59fd6b444a1f76631840bfcc7d15319506a9c;hb=9f688962eb90591205c511c1ae9bf752d276d1f5;hp=9dbe3138901d24bd2ee90e58207ab56f4de9f3b1;hpb=026c569fc47fbe95d8cb131442a4e04610f27f05;p=rocksndiamonds.git diff --git a/src/game_sp/Globals.c b/src/game_sp/Globals.c index 9dbe3138..ebf59fd6 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,28 @@ ReadDemoEH: Close(); #endif } + +void ReadLevel() +{ +#if 0 + OLD_ReadLevel(); + + // return; +#endif + + copyInternalEngineVars_SP(); + +#if 1 + SetDisplayRegion(); + SetScrollEdges(); +#endif + + LevelNumber = level_nr; + +#if 0 + if (!DemoFlag || !DemoAvailable) + subRandomize(); +#endif + + LevelLoaded = True; +}