projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added description for BD style explosion
[rocksndiamonds.git]
/
src
/
game_sp
/
OrangeDisk.c
diff --git
a/src/game_sp/OrangeDisk.c
b/src/game_sp/OrangeDisk.c
index 279ba8767ced046d411cbb4a1d529a8f0b1a9fb4..dc83e9eae849e783f211798c38255a5fdfd9632b 100644
(file)
--- a/
src/game_sp/OrangeDisk.c
+++ b/
src/game_sp/OrangeDisk.c
@@
-4,23
+4,19
@@
#include "OrangeDisk.h"
#include "OrangeDisk.h"
-// static char *VB_Name = "modOrangeDisk";
-// --- Option Explicit
// ==========================================================================
// SUBROUTINE
// Animate/move orange disks (falling)
// ==========================================================================
// ==========================================================================
// SUBROUTINE
// Animate/move orange disks (falling)
// ==========================================================================
-
int
subAnimateOrangeDisks(int si)
+
void
subAnimateOrangeDisks(int si)
{
{
- int subAnimateOrangeDisks;
-
int ax, bl, dx, X, Y;
ax = PlayField16[si];
if (LowByte(ax) != fiOrangeDisk)
int ax, bl, dx, X, Y;
ax = PlayField16[si];
if (LowByte(ax) != fiOrangeDisk)
- return
subAnimateOrangeDisks
;
+ return;
if (ax >= 0x3008) // disk is falling
goto loc_g_2804;
if (ax >= 0x3008) // disk is falling
goto loc_g_2804;
@@
-31,18
+27,20
@@
int subAnimateOrangeDisks(int si)
if (PlayField16[si + FieldWidth] == 0)
goto loc_g_27CF;
if (PlayField16[si + FieldWidth] == 0)
goto loc_g_27CF;
- return
subAnimateOrangeDisks
;
+ return;
loc_g_27CF: // below is empty -> disk may start to fall
MovHighByte(&PlayField16[si], 0x20);
MovHighByte(&PlayField16[si + FieldWidth], fiOrangeDisk);
loc_g_27CF: // below is empty -> disk may start to fall
MovHighByte(&PlayField16[si], 0x20);
MovHighByte(&PlayField16[si + FieldWidth], fiOrangeDisk);
- return subAnimateOrangeDisks;
+
+ return;
loc_g_27DA:
if (PlayField16[si + FieldWidth] == 0)
{
PlayField16[si] = fiOrangeDisk;
loc_g_27DA:
if (PlayField16[si + FieldWidth] == 0)
{
PlayField16[si] = fiOrangeDisk;
- return subAnimateOrangeDisks;
+
+ return;
} // loc_g_27E8:
bl = HighByte(PlayField16[si]) + 1;
} // loc_g_27E8:
bl = HighByte(PlayField16[si]) + 1;
@@
-50,21
+48,24
@@
loc_g_27DA:
bl = 0x30;
MovHighByte(&PlayField16[si], bl);
bl = 0x30;
MovHighByte(&PlayField16[si], bl);
- return subAnimateOrangeDisks;
+
+ return;
loc_g_2804: // disk is falling
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dx = HighByte(PlayField16[si]) & 0x7;
X = GetStretchX(si);
Y = GetStretchY(si);
loc_g_2804: // disk is falling
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dx = HighByte(PlayField16[si]) & 0x7;
X = GetStretchX(si);
Y = GetStretchY(si);
-
StretchedSprites.BltEx(X, Y
, 0);
-
StretchedSprites.BltEx(X, Y + TwoPixels * (dx + 1), fiOrangeDisk
);
+
DDSpriteBuffer_BltImg(X, Y, aniSpace
, 0);
+
DDSpriteBuffer_BltImg(X, Y + TwoPixels * (dx + 1), aniOrangeDisk, dx
);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
bl = HighByte(PlayField16[si]) + 1;
if ((bl & 0x7) != 0)
{
MovHighByte(&PlayField16[si], bl);
bl = HighByte(PlayField16[si]) + 1;
if ((bl & 0x7) != 0)
{
MovHighByte(&PlayField16[si], bl);
- return subAnimateOrangeDisks;
+
+ return;
}
PlayField16[si] = 0;
}
PlayField16[si] = 0;
@@
-74,14
+75,12
@@
loc_g_2804: // disk is falling
{
MovHighByte(&PlayField16[si], 0x30); // go on falling down
MovHighByte(&PlayField16[si + FieldWidth], fiOrangeDisk);
{
MovHighByte(&PlayField16[si], 0x30); // go on falling down
MovHighByte(&PlayField16[si + FieldWidth], fiOrangeDisk);
- return subAnimateOrangeDisks;
+
+ return;
} // loc_g_2867:
if (LowByte(PlayField16[si + FieldWidth]) == fiExplosion)
} // loc_g_2867:
if (LowByte(PlayField16[si + FieldWidth]) == fiExplosion)
- return
subAnimateOrangeDisks
;
+ return;
ExplodeFieldSP(si); // Explode
ExplodeFieldSP(si); // Explode
-
- return subAnimateOrangeDisks;
-} // subAnimateOrangeDisks
-
+}