Prev: C206 Up: Map Next: C285
C264: A bolt hits a thing from the sky
Used by the routine at BOLT.
Scores for it, from its graphic number: the points are three digits made of the number's bits -- the hundreds from bits 5-7, the tens from bits 2-4, the units from bits 6, 7 and 0 -- so that no digit goes past 7 and the sum stays BCD. The things that fall (DROP_GRAPHICS) start as graphics 164, 160, 48, 80 and 168, which score 512, 502, 140, 241 and 522 at those frames. The score is shown at once (SHOW_SCORE). The thing becomes a puff (graphic 64) and the bolt vanishes.
Input
IX the bolt
IY the thing it hit
SHOOT_DOWN C264 LD A,(IY+$00) BC = the points: C its graphic rotated left twice, AND $77; B rotated left three times, AND 7
C267 LD B,A
C268 RLCA
C269 RLCA
C26A AND $77
C26C LD C,A
C26D LD A,B
C26E RLCA
C26F RLCA
C270 RLCA
C271 AND $07
C273 LD B,A
C274 CALL ADD_SCORE add them, and copy the score to the screen
C277 CALL SHOW_SCORE
C27A LD (IY+$00),$40 the thing: a puff, out of collisions
C27E SET 1,(IY+$07)
C282 JP VANISH the bolt: gone
Prev: C206 Up: Map Next: C285