X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FInitGameConditions.c;h=d5818d25acbc285be57c8c64348d5483457ec40b;hb=e63e92923fa0196ba7d538d4c8f5a16994e3bee8;hp=f1c0f2e14b44d8635d7958e9fb29ab93346d1d2b;hpb=5ba7f2d9a3f07f342afdf215a3307d5487cb6d43;p=rocksndiamonds.git diff --git a/src/game_sp/InitGameConditions.c b/src/game_sp/InitGameConditions.c index f1c0f2e1..d5818d25 100644 --- a/src/game_sp/InitGameConditions.c +++ b/src/game_sp/InitGameConditions.c @@ -4,7 +4,8 @@ #include "InitGameConditions.h" -static char *VB_Name = "modInitGameConditions"; +// static char *VB_Name = "modInitGameConditions"; + // --- Option Explicit // ========================================================================== @@ -125,8 +126,10 @@ int subConvertToEasySymbols() { int subConvertToEasySymbols; - int ax, bx, cx, dx, di, X, Y, i; - int ah, bh, ch, dh, al, bl, cl, dl, ZF; + // int ax, bx, cx, dx, di, X, Y, i; + // int ah, bh, ch, dh, al, bl, cl, dl, ZF; + int ax, bx, cx, dx, i; + int al; bx = 0; dx = 0; @@ -306,8 +309,11 @@ int subFetchAndInitLevelA(boolean UpdatePlayTime) DemoFlag = 1; GameBusyFlag = 0; // restore scissors too + subFetchAndInitLevel(); // Fetch and initialize a level + GameBusyFlag = 1; // no free screen write + if (1 <= demo_stopped) { if (1 == demo_stopped) @@ -340,7 +346,9 @@ int subFetchAndInitLevel() Trace("modInitGameConditions", "--> subFetchAndInitLevel"); Trace("modInitGameConditions", "Call ReadLevel"); + ReadLevel(); // Read LEVELS.DAT + Trace("modInitGameConditions", "ReadLevel return subFetchAndInitLeveled"); if (RecordDemoFlag == 1) @@ -353,17 +361,27 @@ int subFetchAndInitLevel() // Debug.Print "FetchPlay: " & Hex(RandomSeed) // End If GameBusyFlag = -GameBusyFlag; // make <>1 + Trace("modInitGameConditions", "subConvertToEasySymbols"); + InfoCountInLevel = subConvertToEasySymbols(); // Convert to easy symbols GameBusyFlag = -GameBusyFlag; // restore + Trace("modInitGameConditions", "subDisplayLevel"); + subDisplayLevel(); // Paint (Init) game field subDisplayPanel(); // Paint (Init) Panel + ResetInfotronsNeeded(InfoCountInLevel); // and reset Infotron count + Data_SubRstFlg = 1; + Trace("modInitGameConditions", "subInitGameConditions"); + subInitGameConditions(); // Init game conditions (vars) + InitMurphyPos(); // Locate Murphy + screen pos + Trace("modInitGameConditions", "<-- subFetchAndInitLevel"); return subFetchAndInitLevel;