projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20090721-1-src
[rocksndiamonds.git]
/
src
/
game_sp
/
MainForm.c
diff --git
a/src/game_sp/MainForm.c
b/src/game_sp/MainForm.c
index 8022080ac4759e95f5c6901bbba39ddad32a3694..5105a789610e652dad04a8c00ff1cc77d324f390 100644
(file)
--- a/
src/game_sp/MainForm.c
+++ b/
src/game_sp/MainForm.c
@@
-1003,13
+1003,17
@@
void DisplayLevel()
{
int X, Y;
{
int X, Y;
+#if 1
+ printf("::: DisplayLevel (%d, %d, %d)\n", Loaded, LevelLoaded, bPlaying);
+#endif
+
if (! Loaded)
return;
if (! LevelLoaded)
return;
if (! Loaded)
return;
if (! LevelLoaded)
return;
-#if
0
+#if
1
SetDisplayRegion();
#endif
SetDisplayRegion();
#endif
@@
-1022,10
+1026,18
@@
void DisplayLevel()
if (bPlaying)
{
if (bPlaying)
{
+#if 1
+ printf("::: DisplayLevel [%ld, %ld, %ld, %ld]...\n",
+ DisplayMinY, DisplayMaxY, DisplayMinX, DisplayMaxX);
+#endif
+
for (Y = DisplayMinY; Y <= DisplayMaxY; Y++)
{
for (X = DisplayMinX; X <= DisplayMaxX; X++)
{
for (Y = DisplayMinY; Y <= DisplayMaxY; Y++)
{
for (X = DisplayMinX; X <= DisplayMaxX; X++)
{
+#if 0
+ printf("::: DrawFieldNoAnimated(%d, %d)\n", X, Y);
+#endif
DrawFieldNoAnimated(X, Y);
}
}
DrawFieldNoAnimated(X, Y);
}
}
@@
-1034,6
+1046,9
@@
void DisplayLevel()
{
for (X = DisplayMinX; X <= DisplayMaxX; X++)
{
{
for (X = DisplayMinX; X <= DisplayMaxX; X++)
{
+#if 0
+ printf("::: DrawFieldAnimated(%d, %d)\n", X, Y);
+#endif
DrawFieldAnimated(X, Y);
}
}
DrawFieldAnimated(X, Y);
}
}
@@
-1045,6
+1060,9
@@
void DisplayLevel()
{
for (X = DisplayMinX; X <= DisplayMaxX; X++)
{
{
for (X = DisplayMinX; X <= DisplayMaxX; X++)
{
+#if 0
+ printf("::: DrawField(%d, %d)\n", X, Y);
+#endif
DrawField(X, Y);
}
}
DrawField(X, Y);
}
}
@@
-1100,8
+1118,8
@@
static void cmbLevel_Click()
long InfoCount;
boolean Oldflag;
int Msg;
long InfoCount;
boolean Oldflag;
int Msg;
-
long LastIndex
;
-
boolean bBlock
;
+
static long LastIndex = 0
;
+
static boolean bBlock = False
;
if (bBlock)
return;
if (bBlock)
return;
@@
-1305,7
+1323,9
@@
static void Form_KeyUp(int KeyCode, int Shift)
picPane_KeyUp(KeyCode, Shift);
}
picPane_KeyUp(KeyCode, Shift);
}
-static void Form_Load()
+#endif
+
+void Form_Load()
{
#if 0
{
#if 0
@@
-1346,14
+1366,23
@@
static void Form_Load()
picViewPort.ScaleMode = vbPixels;
picViewPort.ScaleMode = vbPixels;
+#endif
+
PauseMode = 0;
// BaseWidth = 16
PauseMode = 0;
// BaseWidth = 16
+
+#if 0
menBorder_Click();
menBorder_Click();
+#endif
+
Loaded = True;
Loaded = True;
+
+#if 0
+
ReStretch(Stretch);
LoadKeyIndicators();
ReStretch(Stretch);
LoadKeyIndicators();
- Show;
+ Show
()
;
FillFileList(CurPath);
if (s.Read("ShowSplash", True))
FillFileList(CurPath);
if (s.Read("ShowSplash", True))
@@
-1365,6
+1394,8
@@
static void Form_Load()
#endif
}
#endif
}
+#if 0
+
static void FillLevelList(char *Path, int LevelIndex)
{
long FNum, LevLen, i, iMax;
static void FillLevelList(char *Path, int LevelIndex)
{
long FNum, LevLen, i, iMax;
@@
-1620,8
+1651,6
@@
static void DrawFrame(int Delta)
}
}
}
}
-#if 0
-
static void RestoreFrame()
{
int i, LX, tY, RX, BY;
static void RestoreFrame()
{
int i, LX, tY, RX, BY;
@@
-1643,6
+1672,8
@@
static void RestoreFrame()
}
}
}
}
+#if 0
+
static void Form_Unload(int Cancel)
{
EndFlag = True;
static void Form_Unload(int Cancel)
{
EndFlag = True;
@@
-1695,7
+1726,7
@@
static void Form_Unload(int Cancel)
static void fpsTim_Timer()
{
currency TickDiff;
static void fpsTim_Timer()
{
currency TickDiff;
-
int count5
;
+
static int count5 = 0
;
count5 = count5 + 1;
if (4 < count5)
count5 = count5 + 1;
if (4 < count5)
@@
-1756,9
+1787,15
@@
static void menBorder_Click()
// DisplayLevel True
}
// DisplayLevel True
}
+#endif
+
void SetDisplayRegion()
{
void SetDisplayRegion()
{
+#if 1
+ if (0)
+#else
if (! menBorder.Checked)
if (! menBorder.Checked)
+#endif
{
DisplayMinX = 1;
DisplayMaxX = FieldWidth - 2;
{
DisplayMinX = 1;
DisplayMaxX = FieldWidth - 2;
@@
-1766,6
+1803,7
@@
void SetDisplayRegion()
DisplayMinY = 1;
DisplayMaxY = FieldHeight - 2;
DisplayHeight = FieldHeight;
DisplayMinY = 1;
DisplayMaxY = FieldHeight - 2;
DisplayHeight = FieldHeight;
+
if (LevelLoaded)
DrawFrame(1);
if (LevelLoaded)
DrawFrame(1);
@@
-1778,11
+1816,14
@@
void SetDisplayRegion()
DisplayMinY = 0;
DisplayMaxY = FieldHeight - 1;
DisplayHeight = FieldHeight + 2;
DisplayMinY = 0;
DisplayMaxY = FieldHeight - 1;
DisplayHeight = FieldHeight + 2;
+
if (LevelLoaded)
RestoreFrame();
}
}
if (LevelLoaded)
RestoreFrame();
}
}
+#if 0
+
static void menCopy_Click()
{
FMark.Copy;
static void menCopy_Click()
{
FMark.Copy;
@@
-2089,7
+2130,7
@@
static void menPanel_Click()
void Let_PanelVisible(boolean NewVal)
{
void Let_PanelVisible(boolean NewVal)
{
-
boolean HidePanel
;
+
static boolean HidePanel = False
;
if (HidePanel != NewVal)
return;
if (HidePanel != NewVal)
return;
@@
-2125,8
+2166,8
@@
static void menPaste_Click()
static void menPause_Click()
{
static void menPause_Click()
{
- StdPicture OldPic;
-
char *OldText
;
+
static
StdPicture OldPic;
+
static char *OldText = 0
;
PauseMode = (PauseMode != 0 ? 0 : 0);
if (PauseMode != 0)
PauseMode = (PauseMode != 0 ? 0 : 0);
if (PauseMode != 0)
@@
-2151,7
+2192,7
@@
static void menPlayAll_Click()
int FNum;
char *LogPath, *OutStr, *ReRecPath, *SPPath;
boolean bEqual;
int FNum;
char *LogPath, *OutStr, *ReRecPath, *SPPath;
boolean bEqual;
-
boolean QuitFlag
;
+
static boolean QuitFlag = False
;
if (cmdPlayAll.STRING_IS_LIKE(Caption, "Play) All Demos")
{
if (cmdPlayAll.STRING_IS_LIKE(Caption, "Play) All Demos")
{
@@
-2364,7
+2405,6
@@
static void menSoundFX_Click()
// static void menPlay_Click()
void menPlay_Click()
{
// static void menPlay_Click()
void menPlay_Click()
{
-
#if 0
boolean OldEditFlag;
#if 0
boolean OldEditFlag;
@@
-2918,6
+2958,10
@@
static void ReStretch(float NewStretch)
if (! Loaded)
{
if (! Loaded)
{
+#if 1
+ printf("::: NewStretch == %d\n", NewStretch);
+#endif
+
Stretch = NewStretch;
return;
}
Stretch = NewStretch;
return;
}
@@
-3168,7
+3212,7
@@
void ShowKey(int KeyVar)
int i;
boolean Tmp;
long Col;
int i;
boolean Tmp;
long Col;
- boolean LastState[5 + 1];
+
static
boolean LastState[5 + 1];
// For i = 1 To 5
// State(i) = False
// For i = 1 To 5
// State(i) = False