projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20100224-1-src
[rocksndiamonds.git]
/
src
/
game_sp
/
InitGameConditions.c
diff --git
a/src/game_sp/InitGameConditions.c
b/src/game_sp/InitGameConditions.c
index f1c0f2e14b44d8635d7958e9fb29ab93346d1d2b..003cedc404cad6fcce1234f5cc926287d1285b1a 100644
(file)
--- a/
src/game_sp/InitGameConditions.c
+++ b/
src/game_sp/InitGameConditions.c
@@
-4,7
+4,8
@@
#include "InitGameConditions.h"
#include "InitGameConditions.h"
-static char *VB_Name = "modInitGameConditions";
+// static char *VB_Name = "modInitGameConditions";
+
// --- Option Explicit
// ==========================================================================
// --- Option Explicit
// ==========================================================================
@@
-95,12
+96,25
@@
int InitMurphyPosB(int si)
MurphyScreenYPos = GetStretchY(si); // Murphy's screen y-position
// To Do: draw Murphy in location ax
MurphyScreenYPos = GetStretchY(si); // Murphy's screen y-position
// To Do: draw Murphy in location ax
+#if 1
+ StretchedSprites.BltImg(MurphyScreenXPos, MurphyScreenYPos, fiMurphy, 0);
+#else
StretchedSprites.BltEx(MurphyScreenXPos, MurphyScreenYPos, fiMurphy);
StretchedSprites.BltEx(MurphyScreenXPos, MurphyScreenYPos, fiMurphy);
+#endif
MurphyScreenXPos = MurphyScreenXPos / Stretch;
MurphyScreenYPos = MurphyScreenYPos / Stretch;
subCalculateScreenScrollPos(); // calculate screen start addrs
MurphyScreenXPos = MurphyScreenXPos / Stretch;
MurphyScreenYPos = MurphyScreenYPos / Stretch;
subCalculateScreenScrollPos(); // calculate screen start addrs
+
+#if 0
+ printf(":1: %d, %d [%d, %d] [%d, %d] [%d, %d]\n",
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ ScreenScrollXPos, ScreenScrollYPos,
+ ScrollX, ScrollY);
+#endif
+
if (AutoScrollFlag)
{
if (bPlaying)
if (AutoScrollFlag)
{
if (bPlaying)
@@
-113,6
+127,14
@@
int InitMurphyPosB(int si)
}
}
}
}
+#if 0
+ printf(":2: %d, %d [%d, %d] [%d, %d] [%d, %d]\n",
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ ScreenScrollXPos, ScreenScrollYPos,
+ ScrollX, ScrollY);
+#endif
+
return InitMurphyPosB;
} // InitMurphyPosB
return InitMurphyPosB;
} // InitMurphyPosB
@@
-125,8
+147,10
@@
int subConvertToEasySymbols()
{
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;
bx = 0;
dx = 0;
@@
-285,7
+309,7
@@
int subFetchAndInitLevelB()
MovLowByte(&data_SPtorunavail, 0); // no SP file
data_scr_demo = 0;
MovLowByte(&data_SPtorunavail, 0); // no SP file
data_scr_demo = 0;
- UpdatePlayTime = (0 == demo_stopped ?
True : Tru
e);
+ UpdatePlayTime = (0 == demo_stopped ?
True : Fals
e);
demo_stopped = 0;
subFetchAndInitLevelA(UpdatePlayTime);
demo_stopped = 0;
subFetchAndInitLevelA(UpdatePlayTime);
@@
-306,8
+330,11
@@
int subFetchAndInitLevelA(boolean UpdatePlayTime)
DemoFlag = 1;
GameBusyFlag = 0; // restore scissors too
DemoFlag = 1;
GameBusyFlag = 0; // restore scissors too
+
subFetchAndInitLevel(); // Fetch and initialize a level
subFetchAndInitLevel(); // Fetch and initialize a level
+
GameBusyFlag = 1; // no free screen write
GameBusyFlag = 1; // no free screen write
+
if (1 <= demo_stopped)
{
if (1 == demo_stopped)
if (1 <= demo_stopped)
{
if (1 == demo_stopped)
@@
-340,7
+367,9
@@
int subFetchAndInitLevel()
Trace("modInitGameConditions", "--> subFetchAndInitLevel");
Trace("modInitGameConditions", "Call ReadLevel");
Trace("modInitGameConditions", "--> subFetchAndInitLevel");
Trace("modInitGameConditions", "Call ReadLevel");
+
ReadLevel(); // Read LEVELS.DAT
ReadLevel(); // Read LEVELS.DAT
+
Trace("modInitGameConditions", "ReadLevel return subFetchAndInitLeveled");
if (RecordDemoFlag == 1)
Trace("modInitGameConditions", "ReadLevel return subFetchAndInitLeveled");
if (RecordDemoFlag == 1)
@@
-353,17
+382,27
@@
int subFetchAndInitLevel()
// Debug.Print "FetchPlay: " & Hex(RandomSeed)
// End If
GameBusyFlag = -GameBusyFlag; // make <>1
// Debug.Print "FetchPlay: " & Hex(RandomSeed)
// End If
GameBusyFlag = -GameBusyFlag; // make <>1
+
Trace("modInitGameConditions", "subConvertToEasySymbols");
Trace("modInitGameConditions", "subConvertToEasySymbols");
+
InfoCountInLevel = subConvertToEasySymbols(); // Convert to easy symbols
GameBusyFlag = -GameBusyFlag; // restore
InfoCountInLevel = subConvertToEasySymbols(); // Convert to easy symbols
GameBusyFlag = -GameBusyFlag; // restore
+
Trace("modInitGameConditions", "subDisplayLevel");
Trace("modInitGameConditions", "subDisplayLevel");
+
subDisplayLevel(); // Paint (Init) game field
subDisplayPanel(); // Paint (Init) Panel
subDisplayLevel(); // Paint (Init) game field
subDisplayPanel(); // Paint (Init) Panel
+
ResetInfotronsNeeded(InfoCountInLevel); // and reset Infotron count
ResetInfotronsNeeded(InfoCountInLevel); // and reset Infotron count
+
Data_SubRstFlg = 1;
Data_SubRstFlg = 1;
+
Trace("modInitGameConditions", "subInitGameConditions");
Trace("modInitGameConditions", "subInitGameConditions");
+
subInitGameConditions(); // Init game conditions (vars)
subInitGameConditions(); // Init game conditions (vars)
+
InitMurphyPos(); // Locate Murphy + screen pos
InitMurphyPos(); // Locate Murphy + screen pos
+
Trace("modInitGameConditions", "<-- subFetchAndInitLevel");
return subFetchAndInitLevel;
Trace("modInitGameConditions", "<-- subFetchAndInitLevel");
return subFetchAndInitLevel;