![]() |
Routines |
| Prev: D6D5 | Up: Map | Next: D70A |
|
Used by the routine at OBJECT_FLIGHT.
Called by the thrown object's update (OBJECT_FLIGHT) when it strikes its villain. The four records at FINDS become sparkles, graphic 140 (SPARKLE_FLY moves them), at the villain's U and V, each facing a different way so that they fly apart: a speed of 12, half-sizes of 16 and the drawing offset things of that size have. Graphics 140-143 share their sprites with the first frames of the four kinds of find (48, 52, 56 and 60), so the sparkles show the finds' pictures. Whatever the four records held -- things found in buildings and not yet picked up -- is lost. The flags (+7), the step (+A, +B) and where each was drawn (+E, +F) are left as they were. The ending waits for the sparkles to finish (CHECK_QUEST_DONE).
|
||||||||
| VILLAIN_SPARKLES | D6D6 | LD HL,FINDS | The four records at FINDS | |||||
| D6D9 | LD B,$04 | |||||||
| VILLAIN_SPARKLES_0 | D6DB | LD (HL),$8C | Graphic 140 | |||||
| D6DD | INC HL | U and V (+1 to +4), the villain's | ||||||
| D6DE | PUSH IY | |||||||
| D6E0 | POP DE | |||||||
| D6E1 | INC DE | |||||||
| D6E2 | LD C,$04 | |||||||
| VILLAIN_SPARKLES_1 | D6E4 | LD A,(DE) | ||||||
| D6E5 | INC DE | |||||||
| D6E6 | LD (HL),A | |||||||
| D6E7 | INC HL | |||||||
| D6E8 | DEC C | |||||||
| D6E9 | JR NZ,VILLAIN_SPARKLES_1 | |||||||
| D6EB | LD (HL),$0C | Speed (+5) 12 | ||||||
| D6ED | INC HL | Facing (+6, bits 6-7): 3, 2, 1 and 0 for the four records, so they fly apart | ||||||
| D6EE | LD A,B | |||||||
| D6EF | DEC A | |||||||
| D6F0 | RRCA | |||||||
| D6F1 | RRCA | |||||||
| D6F2 | AND $C0 | |||||||
| D6F4 | LD (HL),A | |||||||
| D6F5 | INC HL | Half-sizes (+8, +9) 16 and 16 | ||||||
| D6F6 | INC HL | |||||||
| D6F7 | LD (HL),$10 | |||||||
| D6F9 | INC HL | |||||||
| D6FA | LD (HL),$10 | |||||||
| D6FC | INC HL | Drawing offset (+C, +D): 12 left and 4 up | ||||||
| D6FD | INC HL | |||||||
| D6FE | INC HL | |||||||
| D6FF | LD (HL),$F4 | |||||||
| D701 | INC HL | |||||||
| D702 | LD (HL),$04 | |||||||
| D704 | INC HL | On to the next record | ||||||
| D705 | INC HL | |||||||
| D706 | INC HL | |||||||
| D707 | DJNZ VILLAIN_SPARKLES_0 | |||||||
| D709 | RET | |||||||
| Prev: D6D5 | Up: Map | Next: D70A |