projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor cleanup
[rocksndiamonds.git]
/
src
/
game_sp
/
Electrons.c
diff --git
a/src/game_sp/Electrons.c
b/src/game_sp/Electrons.c
index 5f77e738223dac467f88164fe37edcb689e3f94f..496e35079c7d3a59abfafae5d36fd88bf8c104bd 100644
(file)
--- a/
src/game_sp/Electrons.c
+++ b/
src/game_sp/Electrons.c
@@
-4,27
+4,24
@@
#include "Electrons.h"
#include "Electrons.h"
-// static char *VB_Name = "modElectron";
-// --- Option Explicit
// ==========================================================================
// SUBROUTINE
// Animate/move Electrons
// ==========================================================================
// ==========================================================================
// SUBROUTINE
// Animate/move Electrons
// ==========================================================================
-
int
subAnimateElectrons(int si)
+
void
subAnimateElectrons(int si)
{
{
- int subAnimateElectrons;
-
int bx, Tmp;
if (SnikSnaksElectronsFrozen == 1)
int bx, Tmp;
if (SnikSnaksElectronsFrozen == 1)
- return
subAnimateElectrons
;
+ return;
if (LowByte(PlayField16[si]) != fiElectron)
if (LowByte(PlayField16[si]) != fiElectron)
- return
subAnimateElectrons
;
+ return;
bx = HighByte(PlayField16[si]);
bx = HighByte(PlayField16[si]);
+
Tmp = bx / 8;
switch (Tmp)
{
Tmp = bx / 8;
switch (Tmp)
{
@@
-52,21
+49,18
@@
int subAnimateElectrons(int si)
subElectronFromLeft(si, bx); // access si from left
break;
}
subElectronFromLeft(si, bx); // access si from left
break;
}
+}
- return subAnimateElectrons;
-} // subAnimateElectrons
-
-int subDrawAnimatedElectrons(int si)
+void subDrawAnimatedElectrons(int si)
{
{
- int subDrawAnimatedElectrons;
-
int bx, Tmp;
// If SnikSnaksElectronsFrozen = 1 Then Exit Function
if (LowByte(PlayField16[si]) != fiElectron)
int bx, Tmp;
// If SnikSnaksElectronsFrozen = 1 Then Exit Function
if (LowByte(PlayField16[si]) != fiElectron)
- return
subDrawAnimatedElectrons
;
+ return;
bx = HighByte(PlayField16[si]);
bx = HighByte(PlayField16[si]);
+
Tmp = bx / 8;
switch (Tmp)
{
Tmp = bx / 8;
switch (Tmp)
{
@@
-94,16
+88,11
@@
int subDrawAnimatedElectrons(int si)
subDrawElectronFromLeft(si, bx); // access si from left
break;
}
subDrawElectronFromLeft(si, bx); // access si from left
break;
}
+}
- return subDrawAnimatedElectrons;
-} // subDrawAnimatedElectrons
-
-int subElectronTurnLeft(int si, int bx)
+void subElectronTurnLeft(int si, int bx)
{
{
- int subElectronTurnLeft;
-
- // int ax, ah, bl, dx, X, Y;
- int ax, bl, X, Y;
+ int ax, bl;
ax = (TimerVar & 3);
if (ax != 0)
ax = (TimerVar & 3);
if (ax != 0)
@@
-111,17
+100,17
@@
int subElectronTurnLeft(int si, int bx)
if (ax == 3)
goto loc_g_7ACD;
if (ax == 3)
goto loc_g_7ACD;
- return
subElectronTurnLeft
;
+ return;
} // loc_g_7A9F:
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
} // loc_g_7A9F:
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
- X = GetStretchX(si);
- Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniElectron[bx]);
+ subDrawElectronTurnLeft(si, bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
+
bx = (bx + 1) & 0x7;
MovHighByte(&PlayField16[si], bx);
bx = (bx + 1) & 0x7;
MovHighByte(&PlayField16[si], bx);
- return subElectronTurnLeft;
+
+ return;
loc_g_7ACD:
bl = HighByte(PlayField16[si]);
loc_g_7ACD:
bl = HighByte(PlayField16[si]);
@@
-137,7
+126,7
@@
loc_g_7ACD:
if (bl == 6)
goto loc_g_7B43;
if (bl == 6)
goto loc_g_7B43;
- return
subElectronTurnLeft
;
+ return;
loc_g_7AE6: // pointing up
ax = PlayField16[si - FieldWidth];
loc_g_7AE6: // pointing up
ax = PlayField16[si - FieldWidth];
@@
-147,13
+136,14
@@
loc_g_7AE6: // pointing up
if (LowByte(ax) == fiMurphy) // above is murphy -> explode
ExplodeFieldSP(si);
if (LowByte(ax) == fiMurphy) // above is murphy -> explode
ExplodeFieldSP(si);
- return
subElectronTurnLeft
;
+ return;
loc_g_7AF5: // above is empty -> go up
PlayField16[si] = 0x1BB;
si = si - FieldWidth; // 1 field up
PlayField16[si] = 0x1018;
loc_g_7AF5: // above is empty -> go up
PlayField16[si] = 0x1BB;
si = si - FieldWidth; // 1 field up
PlayField16[si] = 0x1018;
- return subElectronTurnLeft;
+
+ return;
loc_g_7B05: // pointing left
ax = PlayField16[si - 1];
loc_g_7B05: // pointing left
ax = PlayField16[si - 1];
@@
-163,13
+153,14
@@
loc_g_7B05: // pointing left
if (LowByte(ax) == fiMurphy) // left is murphy -> explode
ExplodeFieldSP(si);
if (LowByte(ax) == fiMurphy) // left is murphy -> explode
ExplodeFieldSP(si);
- return
subElectronTurnLeft
;
+ return;
loc_g_7B14: // left is empty -> go there
PlayField16[si] = 0x2BB;
si = si - 1; // 1 field left
PlayField16[si] = 0x1818;
loc_g_7B14: // left is empty -> go there
PlayField16[si] = 0x2BB;
si = si - 1; // 1 field left
PlayField16[si] = 0x1818;
- return subElectronTurnLeft;
+
+ return;
loc_g_7B24: // pointing down
ax = PlayField16[si + FieldWidth];
loc_g_7B24: // pointing down
ax = PlayField16[si + FieldWidth];
@@
-179,13
+170,14
@@
loc_g_7B24: // pointing down
if (LowByte(ax) == fiMurphy) // below is murphy -> explode
ExplodeFieldSP(si);
if (LowByte(ax) == fiMurphy) // below is murphy -> explode
ExplodeFieldSP(si);
- return
subElectronTurnLeft
;
+ return;
loc_g_7B33: // below is empty -> go down
PlayField16[si] = 0x3BB;
si = si + FieldWidth; // 1 field down
PlayField16[si] = 0x2018;
loc_g_7B33: // below is empty -> go down
PlayField16[si] = 0x3BB;
si = si + FieldWidth; // 1 field down
PlayField16[si] = 0x2018;
- return subElectronTurnLeft;
+
+ return;
loc_g_7B43: // pointing Right
ax = PlayField16[si + 1];
loc_g_7B43: // pointing Right
ax = PlayField16[si + 1];
@@
-195,22
+187,17
@@
loc_g_7B43: // pointing Right
if (LowByte(ax) == fiMurphy) // right is murphy -> explode
ExplodeFieldSP(si);
if (LowByte(ax) == fiMurphy) // right is murphy -> explode
ExplodeFieldSP(si);
- return
subElectronTurnLeft
;
+ return;
loc_g_7B55: // right is empty -> go there
PlayField16[si] = 0x4BB;
si = si + 1; // 1 field right
PlayField16[si] = 0x2818;
loc_g_7B55: // right is empty -> go there
PlayField16[si] = 0x4BB;
si = si + 1; // 1 field right
PlayField16[si] = 0x2818;
+}
- return subElectronTurnLeft;
-} // subElectronTurnLeft
-
-int subElectronTurnRight(int si, int bx)
+void subElectronTurnRight(int si, int bx)
{
{
- int subElectronTurnRight;
-
- // int ax, ah, bl, dx, X, Y;
- int ax, bl, X, Y;
+ int ax, bl;
ax = (TimerVar & 3);
if (ax != 0)
ax = (TimerVar & 3);
if (ax != 0)
@@
-218,17
+205,17
@@
int subElectronTurnRight(int si, int bx)
if (ax == 3)
goto loc_g_7BA3;
if (ax == 3)
goto loc_g_7BA3;
- return
subElectronTurnRight
;
+ return;
} // loc_g_7B73:
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
} // loc_g_7B73:
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
- X = GetStretchX(si);
- Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniElectron[0x10 - bx]);
+ subDrawElectronTurnRight(si, bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
+
bx = ((bx + 1) & 0x7) | 8;
MovHighByte(&PlayField16[si], bx);
bx = ((bx + 1) & 0x7) | 8;
MovHighByte(&PlayField16[si], bx);
- return subElectronTurnRight;
+
+ return;
loc_g_7BA3:
bl = HighByte(PlayField16[si]);
loc_g_7BA3:
bl = HighByte(PlayField16[si]);
@@
-244,7
+231,7
@@
loc_g_7BA3:
if (bl == 0xE)
goto loc_g_7BDB;
if (bl == 0xE)
goto loc_g_7BDB;
- return
subElectronTurnRight
;
+ return;
loc_g_7BBC: // pointing up
ax = PlayField16[si - FieldWidth];
loc_g_7BBC: // pointing up
ax = PlayField16[si - FieldWidth];
@@
-254,13
+241,14
@@
loc_g_7BBC: // pointing up
if (LowByte(ax) == fiMurphy) // above is murphy -> explode
ExplodeFieldSP(si);
if (LowByte(ax) == fiMurphy) // above is murphy -> explode
ExplodeFieldSP(si);
- return
subElectronTurnRight
;
+ return;
loc_g_7BCB: // above is empty -> go up
PlayField16[si] = 0x1BB;
si = si - FieldWidth; // 1 field up
PlayField16[si] = 0x1018;
loc_g_7BCB: // above is empty -> go up
PlayField16[si] = 0x1BB;
si = si - FieldWidth; // 1 field up
PlayField16[si] = 0x1018;
- return subElectronTurnRight;
+
+ return;
loc_g_7BDB: // pointing left
ax = PlayField16[si - 1];
loc_g_7BDB: // pointing left
ax = PlayField16[si - 1];
@@
-270,13
+258,14
@@
loc_g_7BDB: // pointing left
if (LowByte(ax) == fiMurphy) // left is murphy -> explode
ExplodeFieldSP(si);
if (LowByte(ax) == fiMurphy) // left is murphy -> explode
ExplodeFieldSP(si);
- return
subElectronTurnRight
;
+ return;
loc_g_7BEA: // left is empty -> go there
PlayField16[si] = 0x2BB;
si = si - 1; // 1 field left
PlayField16[si] = 0x1818;
loc_g_7BEA: // left is empty -> go there
PlayField16[si] = 0x2BB;
si = si - 1; // 1 field left
PlayField16[si] = 0x1818;
- return subElectronTurnRight;
+
+ return;
loc_g_7BFA: // pointing down
ax = PlayField16[si + FieldWidth];
loc_g_7BFA: // pointing down
ax = PlayField16[si + FieldWidth];
@@
-286,13
+275,14
@@
loc_g_7BFA: // pointing down
if (LowByte(ax) == fiMurphy) // below is murphy -> explode
ExplodeFieldSP(si);
if (LowByte(ax) == fiMurphy) // below is murphy -> explode
ExplodeFieldSP(si);
- return
subElectronTurnRight
;
+ return;
loc_g_7C09: // below is empty -> go down
PlayField16[si] = 0x3BB;
si = si + FieldWidth; // 1 field down
PlayField16[si] = 0x2018;
loc_g_7C09: // below is empty -> go down
PlayField16[si] = 0x3BB;
si = si + FieldWidth; // 1 field down
PlayField16[si] = 0x2018;
- return subElectronTurnRight;
+
+ return;
loc_g_7C19: // pointing Right
ax = PlayField16[si + 1];
loc_g_7C19: // pointing Right
ax = PlayField16[si + 1];
@@
-302,30
+292,23
@@
loc_g_7C19: // pointing Right
if (LowByte(ax) == fiMurphy) // right is murphy -> explode
ExplodeFieldSP(si);
if (LowByte(ax) == fiMurphy) // right is murphy -> explode
ExplodeFieldSP(si);
- return
subElectronTurnRight
;
+ return;
loc_g_7C2B: // right is empty -> go there
PlayField16[si] = 0x4BB;
si = si + 1; // 1 field right
PlayField16[si] = 0x2818;
loc_g_7C2B: // right is empty -> go there
PlayField16[si] = 0x4BB;
si = si + 1; // 1 field right
PlayField16[si] = 0x2818;
+}
- return subElectronTurnRight;
-} // subElectronTurnRight
-
-int subElectronFromBelow(int si, int bx)
+void subElectronFromBelow(int si, int bx)
{
{
- int subElectronFromBelow;
-
- // int ax, ah, bl, dx, X, Y;
- int ax, bl, X, Y;
+ int ax, bl;
- bx = bx - 0xF; // get and increment sequence#
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
- X = GetStretchX(si);
- Y = GetStretchY(si + FieldWidth);
- StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X, Y - bx * TwoPixels, aniElectron[bx]);
+ subDrawElectronFromBelow(si, bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ bx = bx - 0xF; // get and increment sequence#
+
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si + FieldWidth]) != fiExplosion)
{
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si + FieldWidth]) != fiExplosion)
{
@@
-336,7
+319,8
@@
int subElectronFromBelow(int si, int bx)
{
bl = bl + 0x10;
MovHighByte(&PlayField16[si], bl);
{
bl = bl + 0x10;
MovHighByte(&PlayField16[si], bl);
- return subElectronFromBelow;
+
+ return;
} // loc_g_7C84
PlayField16[si] = 0x18; // sequence#=8 -> arrived at the new field
} // loc_g_7C84
PlayField16[si] = 0x18; // sequence#=8 -> arrived at the new field
@@
-344,7
+328,8
@@
int subElectronFromBelow(int si, int bx)
if (ax == 0 || LowByte(ax) == fiMurphy) // check for empty or murphy
{
MovHighByte(&PlayField16[si], 1); // start to turn left
if (ax == 0 || LowByte(ax) == fiMurphy) // check for empty or murphy
{
MovHighByte(&PlayField16[si], 1); // start to turn left
- return subElectronFromBelow;
+
+ return;
} // loc_g_7CA4:
ax = PlayField16[si - FieldWidth]; // cannot turn left -> check above
} // loc_g_7CA4:
ax = PlayField16[si - FieldWidth]; // cannot turn left -> check above
@@
-353,42
+338,38
@@
int subElectronFromBelow(int si, int bx)
PlayField16[si] = 0x1BB; // mark as "electron leaving"
si = si - FieldWidth; // go up!
PlayField16[si] = 0x1018;
PlayField16[si] = 0x1BB; // mark as "electron leaving"
si = si - FieldWidth; // go up!
PlayField16[si] = 0x1018;
- return subElectronFromBelow;
+
+ return;
}
if (LowByte(ax) == fiMurphy) // check for murphy above
{
ExplodeFieldSP(si); // Explode
}
if (LowByte(ax) == fiMurphy) // check for murphy above
{
ExplodeFieldSP(si); // Explode
- return subElectronFromBelow;
+
+ return;
} // loc_g_7CC6:
ax = PlayField16[si + 1]; // check right field
if (ax == 0 || LowByte(ax) == fiMurphy) // check for empty or murphy
{
MovHighByte(&PlayField16[si], 9); // start to turn right
} // loc_g_7CC6:
ax = PlayField16[si + 1]; // check right field
if (ax == 0 || LowByte(ax) == fiMurphy) // check for empty or murphy
{
MovHighByte(&PlayField16[si], 9); // start to turn right
- return subElectronFromBelow;
+
+ return;
} // loc_g_7CE0:
// else: no way to go, start turning around
MovHighByte(&PlayField16[si], 1);
} // loc_g_7CE0:
// else: no way to go, start turning around
MovHighByte(&PlayField16[si], 1);
+}
- return subElectronFromBelow;
-} // subElectronFromBelow
-
-int subElectronFromRight(int si, int bx)
+void subElectronFromRight(int si, int bx)
{
{
- int subElectronFromRight;
-
- // int ax, ah, bl, dx, X, Y;
- int ax, bl, X, Y;
+ int ax, bl;
- bx = bx - 0x17; // get and increment sequence#
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
- X = GetStretchX(si + 1);
- Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X - bx * TwoPixels, Y, aniElectron[bx]);
+ subDrawElectronFromRight(si, bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ bx = bx - 0x17; // get and increment sequence#
+
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si + 1]) != fiExplosion)
{
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si + 1]) != fiExplosion)
{
@@
-399,7
+380,8
@@
int subElectronFromRight(int si, int bx)
{
bl = bl + 0x18;
MovHighByte(&PlayField16[si], bl);
{
bl = bl + 0x18;
MovHighByte(&PlayField16[si], bl);
- return subElectronFromRight;
+
+ return;
} // loc_g_7D2A:
PlayField16[si] = 0x18; // sequence#=8 -> arrived at the new field
} // loc_g_7D2A:
PlayField16[si] = 0x18; // sequence#=8 -> arrived at the new field
@@
-407,7
+389,8
@@
int subElectronFromRight(int si, int bx)
if (ax == 0 || LowByte(ax) == fiMurphy) // empty or murphy?
{
MovHighByte(&PlayField16[si], 3); // yes -> turn left down
if (ax == 0 || LowByte(ax) == fiMurphy) // empty or murphy?
{
MovHighByte(&PlayField16[si], 3); // yes -> turn left down
- return subElectronFromRight;
+
+ return;
} // loc_g_7D4A:
ax = PlayField16[si - 1]; // check left, etc ... see the comments on subElectronFromBelow()
} // loc_g_7D4A:
ax = PlayField16[si - 1]; // check left, etc ... see the comments on subElectronFromBelow()
@@
-416,41
+399,37
@@
int subElectronFromRight(int si, int bx)
PlayField16[si] = 0x2BB;
si = si - 1; // 1 field left
PlayField16[si] = 0x1818;
PlayField16[si] = 0x2BB;
si = si - 1; // 1 field left
PlayField16[si] = 0x1818;
- return subElectronFromRight;
+
+ return;
} // loc_g_7D61:
if (LowByte(ax) == fiMurphy)
{
ExplodeFieldSP(si); // Explode
} // loc_g_7D61:
if (LowByte(ax) == fiMurphy)
{
ExplodeFieldSP(si); // Explode
- return subElectronFromRight;
+
+ return;
} // loc_g_7D6C:
ax = PlayField16[si - FieldWidth]; // check above
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 0xF);
} // loc_g_7D6C:
ax = PlayField16[si - FieldWidth]; // check above
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 0xF);
- return subElectronFromRight;
+
+ return;
} // loc_g_7D86:
MovHighByte(&PlayField16[si], 3);
} // loc_g_7D86:
MovHighByte(&PlayField16[si], 3);
+}
- return subElectronFromRight;
-} // subElectronFromRight
-
-int subElectronFromAbove(int si, int bx)
+void subElectronFromAbove(int si, int bx)
{
{
- int
subElectronFromAbove
;
+ int
ax, bl
;
- // int ax, ah, bl, dx, X, Y;
- int ax, bl, X, Y;
-
- bx = bx - 0x1F; // get and increment sequence#
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
- X = GetStretchX(si);
- Y = GetStretchY(si - FieldWidth);
- StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X, Y + bx * TwoPixels, aniElectron[bx]);
+ subDrawElectronFromAbove(si, bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ bx = bx - 0x1F; // get and increment sequence#
+
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si - FieldWidth]) != fiExplosion)
{
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si - FieldWidth]) != fiExplosion)
{
@@
-461,7
+440,8
@@
int subElectronFromAbove(int si, int bx)
{
bl = bl + 0x20;
MovHighByte(&PlayField16[si], bl);
{
bl = bl + 0x20;
MovHighByte(&PlayField16[si], bl);
- return subElectronFromAbove;
+
+ return;
} // loc_g_7DD7
PlayField16[si] = 0x18; // sequence#=8 -> arrived at the new field
} // loc_g_7DD7
PlayField16[si] = 0x18; // sequence#=8 -> arrived at the new field
@@
-469,7
+449,8
@@
int subElectronFromAbove(int si, int bx)
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 5);
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 5);
- return subElectronFromAbove;
+
+ return;
} // loc_g_7DF7:
ax = PlayField16[si + FieldWidth]; // check below
} // loc_g_7DF7:
ax = PlayField16[si + FieldWidth]; // check below
@@
-478,41
+459,37
@@
int subElectronFromAbove(int si, int bx)
PlayField16[si] = 0x3BB;
si = si + FieldWidth; // 1 field down
PlayField16[si] = 0x2018;
PlayField16[si] = 0x3BB;
si = si + FieldWidth; // 1 field down
PlayField16[si] = 0x2018;
- return subElectronFromAbove;
+
+ return;
} // loc_g_7E0E:
if (LowByte(ax) == fiMurphy)
{
ExplodeFieldSP(si); // Explode
} // loc_g_7E0E:
if (LowByte(ax) == fiMurphy)
{
ExplodeFieldSP(si); // Explode
- return subElectronFromAbove;
+
+ return;
} // loc_g_7E19:
ax = PlayField16[si - 1]; // check left
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 0xD);
} // loc_g_7E19:
ax = PlayField16[si - 1]; // check left
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 0xD);
- return subElectronFromAbove;
+
+ return;
} // loc_g_7E33:
MovHighByte(&PlayField16[si], 5);
} // loc_g_7E33:
MovHighByte(&PlayField16[si], 5);
+}
- return subElectronFromAbove;
-} // subElectronFromAbove
-
-int subElectronFromLeft(int si, int bx)
+void subElectronFromLeft(int si, int bx)
{
{
- int subElectronFromLeft;
-
- // int ax, ah, bl, dx, X, Y;
- int ax, bl, X, Y;
+ int ax, bl;
- bx = bx - 0x27; // get and increment sequence#
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
- X = GetStretchX(si - 1);
- Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X + bx * TwoPixels, Y, aniElectron[bx]);
+ subDrawElectronFromLeft(si, bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ bx = bx - 0x27; // get and increment sequence#
+
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si - 1]) != fiExplosion)
{
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si - 1]) != fiExplosion)
{
@@
-523,7
+500,8
@@
int subElectronFromLeft(int si, int bx)
{
bl = bl + 0x28;
MovHighByte(&PlayField16[si], bl);
{
bl = bl + 0x28;
MovHighByte(&PlayField16[si], bl);
- return subElectronFromLeft;
+
+ return;
} // loc_g_7E7E:
PlayField16[si] = 0x18; // sequence#=8 -> arrived at the new field
} // loc_g_7E7E:
PlayField16[si] = 0x18; // sequence#=8 -> arrived at the new field
@@
-531,7
+509,8
@@
int subElectronFromLeft(int si, int bx)
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 7);
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 7);
- return subElectronFromLeft;
+
+ return;
} // loc_g_7E9E:
ax = PlayField16[si + 1]; // check right(straight on)
} // loc_g_7E9E:
ax = PlayField16[si + 1]; // check right(straight on)
@@
-540,121
+519,102
@@
int subElectronFromLeft(int si, int bx)
PlayField16[si] = 0x4BB;
si = si + 1; // 1 field right
PlayField16[si] = 0x2818;
PlayField16[si] = 0x4BB;
si = si + 1; // 1 field right
PlayField16[si] = 0x2818;
- return subElectronFromLeft;
+
+ return;
} // loc_g_7EB5:
if (LowByte(ax) == fiMurphy)
{
ExplodeFieldSP(si); // Explode
} // loc_g_7EB5:
if (LowByte(ax) == fiMurphy)
{
ExplodeFieldSP(si); // Explode
- return subElectronFromLeft;
+
+ return;
} // loc_g_7EC0:
ax = PlayField16[si + FieldWidth]; // check below
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 0xB);
} // loc_g_7EC0:
ax = PlayField16[si + FieldWidth]; // check below
if (ax == 0 || LowByte(ax) == fiMurphy)
{
MovHighByte(&PlayField16[si], 0xB);
- return subElectronFromLeft;
+
+ return;
} // loc_g_7A69:
MovHighByte(&PlayField16[si], 7);
} // loc_g_7A69:
MovHighByte(&PlayField16[si], 7);
+}
- return subElectronFromLeft;
-} // subElectronFromLeft
-
-int subDrawElectronTurnLeft(int si, int bx)
+void subDrawElectronTurnLeft(int si, int bx)
{
{
- int subDrawElectronTurnLeft;
-
int X, Y;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
int X, Y;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
-
StretchedSprites.BltEx(X, Y, aniElectron[bx]
);
+
DDSpriteBuffer_BltImg(X, Y, aniElectron, bx
);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- return subDrawElectronTurnLeft;
}
}
-
int
subDrawElectronTurnRight(int si, int bx)
+
void
subDrawElectronTurnRight(int si, int bx)
{
{
- int subDrawElectronTurnRight;
-
int X, Y;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
int X, Y;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
-
StretchedSprites.BltEx(X, Y, aniElectron[0x10 - bx]
);
+
DDSpriteBuffer_BltImg(X, Y, aniElectron, 0x10 - bx
);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- return subDrawElectronTurnRight;
}
}
-
int
subDrawElectronFromBelow(int si, int bx)
+
void
subDrawElectronFromBelow(int si, int bx)
{
{
- int subDrawElectronFromBelow;
-
int X, Y;
bx = bx - 0xF; // get and increment sequence#
int X, Y;
bx = bx - 0xF; // get and increment sequence#
+
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si + FieldWidth);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si + FieldWidth);
-
StretchedSprites.BltEx(X, Y
, 0);
-
StretchedSprites.BltEx(X, Y - bx * TwoPixels, aniElectron[bx]
);
+
DDSpriteBuffer_BltImg(X, Y, aniSpace
, 0);
+
DDSpriteBuffer_BltImg(X, Y - bx * TwoPixels, aniElectron, bx
);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- return subDrawElectronFromBelow;
}
}
-
int
subDrawElectronFromRight(int si, int bx)
+
void
subDrawElectronFromRight(int si, int bx)
{
{
- int subDrawElectronFromRight;
-
int X, Y;
bx = bx - 0x17; // get and increment sequence#
int X, Y;
bx = bx - 0x17; // get and increment sequence#
+
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si + 1);
Y = GetStretchY(si);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si + 1);
Y = GetStretchY(si);
-
StretchedSprites.BltEx(X, Y
, 0);
-
StretchedSprites.BltEx(X - bx * TwoPixels, Y, aniElectron[bx]
);
+
DDSpriteBuffer_BltImg(X, Y, aniSpace
, 0);
+
DDSpriteBuffer_BltImg(X - bx * TwoPixels, Y, aniElectron, bx
);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- return subDrawElectronFromRight;
}
}
-
int
subDrawElectronFromAbove(int si, int bx)
+
void
subDrawElectronFromAbove(int si, int bx)
{
{
- int subDrawElectronFromAbove;
-
int X, Y;
bx = bx - 0x1F; // get and increment sequence#
int X, Y;
bx = bx - 0x1F; // get and increment sequence#
+
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si - FieldWidth);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si - FieldWidth);
-
StretchedSprites.BltEx(X, Y
, 0);
-
StretchedSprites.BltEx(X, Y + bx * TwoPixels, aniElectron[bx]
);
+
DDSpriteBuffer_BltImg(X, Y, aniSpace
, 0);
+
DDSpriteBuffer_BltImg(X, Y + bx * TwoPixels, aniElectron, bx
);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- return subDrawElectronFromAbove;
}
}
-
int
subDrawElectronFromLeft(int si, int bx)
+
void
subDrawElectronFromLeft(int si, int bx)
{
{
- int subDrawElectronFromLeft;
-
int X, Y;
bx = bx - 0x27; // get and increment sequence#
int X, Y;
bx = bx - 0x27; // get and increment sequence#
+
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si - 1);
Y = GetStretchY(si);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si - 1);
Y = GetStretchY(si);
-
StretchedSprites.BltEx(X, Y
, 0);
-
StretchedSprites.BltEx(X + bx * TwoPixels, Y, aniElectron[bx]
);
+
DDSpriteBuffer_BltImg(X, Y, aniSpace
, 0);
+
DDSpriteBuffer_BltImg(X + bx * TwoPixels, Y, aniElectron, bx
);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- return subDrawElectronFromLeft;
}
}