![]() |
Routines |
| Prev: B8C8 | Up: Map | Next: B916 |
|
The bubbles rise out of the cauldron, cycling through four frames, and they are not solid on the way up (bit 1 of +7 is set, so the collision code ignores them). At height $A0 they hover, and every fourth frame they are replaced by a picture of the next object the wizard wants -- type 168 plus that object's number -- for one frame in every five: the picture, then 160, 161, 162 and 163, then the picture again.
If the player is Sabrewulf -- his legs are type 48 to 63 -- the bubbles turn hostile instead: they become types 164 to 167 (upd_164_to_167), solid, and still carry the deadly bits their starting record gave them.
They vanish while object record 2 is occupied, which is while an object has been dropped into the cauldron and is being taken. init_cauldron_bubbles puts them back once the record is free again.
|
||||
| upd_160_to_163 | B8DA | CALL adj_m4_m12 | pixel offsets | |
| B8DD | LD A,($5C48) | an object is in the cauldron: vanish | ||
| B8E0 | AND A | |||
| B8E1 | JP NZ,upd_111 | |||
| B8E4 | SET 1,(IX+$07) | not solid | ||
| B8E8 | CALL dec_dZ_and_update_XYZ | move; next of four frames | ||
| B8EB | CALL next_graphic_no_mod_4 | |||
| B8EE | LD A,(IX+$03) | still below $A0: dZ = 2, so rise one unit | ||
| B8F1 | CP $A0 | |||
| B8F3 | LD (IX+$0B),$02 | |||
| B8F7 | JR C,bubbles_draw | |||
| B8F9 | LD (IX+$0B),$01 | at the top: dZ = 1, so hover | ||
| B8FD | LD A,($5C08) | the player is Sabrewulf | ||
| B900 | SUB $30 | |||
| B902 | CP $10 | |||
| B904 | JR C,bubbles_turn_hostile | |||
| B906 | LD A,(IX+$00) | only when the cycle comes back round to 160 | ||
| B909 | AND $03 | |||
| B90B | JR NZ,bubbles_draw | |||
| B90D | CALL ret_next_obj_required | show the object wanted: type 168 plus its number | ||
| B910 | LD A,(HL) | |||
| B911 | OR $A8 | |||
| B913 | LD (IX+$00),A | |||
| Prev: B8C8 | Up: Map | Next: B916 |