![]() |
Routines |
| Prev: A8F8 | Up: Map | Next: A95A |
|
Reached through UPDATES. A deadly thing that now and then leaps 48 units straight up and falls back. Only one in a room is in the air at a time (LEAPING); when none is, each on its turn has a chance of one in four of going. It rises two units a turn until it is 48 above where it started or meets something above it, then falls under gravity, with a sound pitched by its height all the while, and lands.
+10: bit 0 in the air, bit 1 falling. +11: the height to leap to. Rooms $97, $A9 and $B7 have them (object template 39).
|
||||
| LEAPER | A8F9 | CALL DRAW_AT_L16_D9 | draw 16 left and 9 down | |
| A8FC | CALL MAKE_DEADLY | deadly both ways | ||
| A8FF | BIT 0,(IX+$10) | in the air | ||
| A903 | JR NZ,LEAPER_0 | |||
| A905 | LD A,(LEAPING) | another is in the air | ||
| A908 | AND A | |||
| A909 | RET NZ | |||
| A90A | LD A,(RANDOM) | one turn in four | ||
| A90D | INC A | |||
| A90E | AND $03 | |||
| A910 | RET NZ | |||
| A911 | LD A,$01 | leap: the flag, and the height to reach, 48 up | ||
| A913 | LD (LEAPING),A | |||
| A916 | LD (IX+$10),A | |||
| A919 | LD A,(IX+$03) | |||
| A91C | ADD A,$30 | |||
| A91E | LD (IX+$11),A | |||
| LEAPER_0 | A921 | BIT 1,(IX+$10) | not falling yet | |
| A925 | JR Z,LEAPER_2 | |||
| A927 | CALL DEC_DZ_AND_UPDATE_UVZ | fall | ||
| A92A | BIT 2,(IX+$0C) | landed: on the floor again, and another may leap | ||
| A92E | JR Z,LEAPER_1 | |||
| A930 | XOR A | |||
| A931 | LD (IX+$10),A | |||
| A934 | LD (LEAPING),A | |||
| LEAPER_1 | A937 | CALL BEEP_BY_Z | a sound pitched by its height; redraw | |
| A93A | JP SET_WIPE_AND_DRAW_FLAGS | |||
| LEAPER_2 | A93D | LD (IX+$0B),$03 | rising: two units a turn (3, less one for gravity) | |
| A941 | CALL DEC_DZ_AND_UPDATE_UVZ | |||
| A944 | LD A,(IX+$03) | not yet at the top, and nothing above | ||
| A947 | CP (IX+$11) | |||
| A94A | JR NC,LEAPER_3 | |||
| A94C | BIT 2,(IX+$0C) | |||
| A950 | JR NZ,LEAPER_3 | |||
| A952 | JR LEAPER_1 | |||
| LEAPER_3 | A954 | SET 1,(IX+$10) | now fall | |
| A958 | JR LEAPER_1 | |||
| Prev: A8F8 | Up: Map | Next: A95A |