![]() |
Routines |
| Prev: AC6B | Up: Map | Next: AD54 |
|
Reached through UPDATES. Knight Lore's spiked ball: deadly both ways, it hangs until a turn when the random number is under 16 (one in sixteen), no other is falling (DROPPING), and the drop latch (DROP_LATCH) is clear -- which in an even-numbered room it is not until something has been picked up. Then it falls, with a sound pitched by its height, lands with a thud (THUD_ON_LANDING), and lets the next one go.
Bit 2 of +D: falling. Once on the floor it can be let go again, but it has nowhere to fall and makes no second thud. Rooms $0C, $1C, $58 and $84 have them (object template 20).
|
||||
| CEILING_DROP | AD13 | CALL MAKE_DEADLY | deadly both ways | |
| AD16 | CALL DRAW_AT_L12_D8 | draw 12 left and 8 down | ||
| AD19 | LD A,(DROP_LATCH) | latched: nothing drops | ||
| AD1C | AND A | |||
| AD1D | RET NZ | |||
| AD1E | BIT 2,(IX+$0D) | falling | ||
| AD22 | JR NZ,CEILING_DROP_0 | |||
| AD24 | LD HL,DROPPING | another is falling | ||
| AD27 | LD A,(HL) | |||
| AD28 | AND A | |||
| AD29 | RET NZ | |||
| AD2A | LD A,(RANDOM) | one turn in sixteen | ||
| AD2D | CP $10 | |||
| AD2F | RET NC | |||
| AD30 | SET 2,(IX+$0D) | let go | ||
| AD34 | LD (HL),$01 | |||
| AD36 | RET | |||
| CEILING_DROP_0 | AD37 | CALL DEC_DZ_AND_UPDATE_UVZ | fall | |
| AD3A | CALL THUD_ON_LANDING | a thud if it has just landed | ||
| AD3D | BIT 2,(IX+$0C) | landed | ||
| AD41 | JR NZ,CEILING_DROP_2 | |||
| AD43 | CALL BEEP_BY_Z | a sound pitched by its height | ||
| CEILING_DROP_1 | AD46 | JP SET_WIPE_AND_DRAW_FLAGS | redraw | |
| CEILING_DROP_2 | AD49 | RES 2,(IX+$0D) | landed: another may fall | |
| AD4D | LD HL,DROPPING | |||
| AD50 | LD (HL),$00 | |||
| AD52 | JR CEILING_DROP_1 | |||
| Prev: AC6B | Up: Map | Next: AD54 |