1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
5 #include "OrangeDisk.h"
7 // static char *VB_Name = "modOrangeDisk";
10 // ==========================================================================
12 // Animate/move orange disks (falling)
13 // ==========================================================================
15 int subAnimateOrangeDisks(int si)
17 int subAnimateOrangeDisks;
22 if (LowByte(ax) != fiOrangeDisk)
23 return subAnimateOrangeDisks;
25 if (ax >= 0x3008) // disk is falling
28 if (ax >= 0x2008) // disk is in wait state before falling
31 if (PlayField16[si + FieldWidth] == 0)
34 return subAnimateOrangeDisks;
36 loc_g_27CF: // below is empty -> disk may start to fall
37 MovHighByte(&PlayField16[si], 0x20);
38 MovHighByte(&PlayField16[si + FieldWidth], fiOrangeDisk);
39 return subAnimateOrangeDisks;
42 if (PlayField16[si + FieldWidth] == 0)
44 PlayField16[si] = fiOrangeDisk;
45 return subAnimateOrangeDisks;
48 bl = HighByte(PlayField16[si]) + 1;
49 if (bl == 0x22) // wait phase is finished
52 MovHighByte(&PlayField16[si], bl);
53 return subAnimateOrangeDisks;
55 loc_g_2804: // disk is falling
56 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
57 dx = HighByte(PlayField16[si]) & 0x7;
60 StretchedSprites.BltEx(X, Y, 0);
61 StretchedSprites.BltEx(X, Y + TwoPixels * (dx + 1), fiOrangeDisk);
62 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
63 bl = HighByte(PlayField16[si]) + 1;
66 MovHighByte(&PlayField16[si], bl);
67 return subAnimateOrangeDisks;
71 PlayField16[si + FieldWidth] = fiOrangeDisk;
73 if (PlayField16[si + FieldWidth] == 0)
75 MovHighByte(&PlayField16[si], 0x30); // go on falling down
76 MovHighByte(&PlayField16[si + FieldWidth], fiOrangeDisk);
77 return subAnimateOrangeDisks;
80 if (LowByte(PlayField16[si + FieldWidth]) == fiExplosion)
81 return subAnimateOrangeDisks;
83 ExplodeFieldSP(si); // Explode
85 return subAnimateOrangeDisks;
86 } // subAnimateOrangeDisks