1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
5 #include "OrangeDisk.h"
8 // ==========================================================================
10 // Animate/move orange disks (falling)
11 // ==========================================================================
13 void subAnimateOrangeDisks(int si)
18 if (LowByte(ax) != fiOrangeDisk)
21 if (ax >= 0x3008) // disk is falling
24 if (ax >= 0x2008) // disk is in wait state before falling
27 if (PlayField16[si + FieldWidth] == 0)
32 loc_g_27CF: // below is empty -> disk may start to fall
33 MovHighByte(&PlayField16[si], 0x20);
34 MovHighByte(&PlayField16[si + FieldWidth], fiOrangeDisk);
39 if (PlayField16[si + FieldWidth] == 0)
41 PlayField16[si] = fiOrangeDisk;
46 bl = HighByte(PlayField16[si]) + 1;
47 if (bl == 0x22) // wait phase is finished
50 MovHighByte(&PlayField16[si], bl);
54 loc_g_2804: // disk is falling
55 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
56 dx = HighByte(PlayField16[si]) & 0x7;
59 DDSpriteBuffer_BltImg(X, Y, aniSpace, 0);
60 DDSpriteBuffer_BltImg(X, Y + TwoPixels * (dx + 1), aniOrangeDisk, dx);
61 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
63 bl = HighByte(PlayField16[si]) + 1;
66 MovHighByte(&PlayField16[si], bl);
72 PlayField16[si + FieldWidth] = fiOrangeDisk;
74 if (PlayField16[si + FieldWidth] == 0)
76 MovHighByte(&PlayField16[si], 0x30); // go on falling down
77 MovHighByte(&PlayField16[si + FieldWidth], fiOrangeDisk);
82 if (LowByte(PlayField16[si + FieldWidth]) == fiExplosion)
85 ExplodeFieldSP(si); // Explode