![]() |
Routines |
| Prev: C0A9 | Up: Map | Next: C0DD |
|
Used by the routine at find_free_record_loop.
IY is a free special-object record. The charm dropped is the one in the last slot, $5BE4. If that slot is empty the slots are shifted along anyway, which brings the next charm into the dropping position.
In the wizard's room, with the player standing high (z of $98 or more, which in that room means standing on the cauldron -- inferred from the height), the charm becomes type $68 to $6E instead of $60 to $66, which upd_104_to_110 carries into the cauldron, and $5BC4 is set to lock out the controls until it arrives.
|
||||
| room_to_drop | C0B2 | LD HL,$5BE4 | last slot empty: just move the slots along | |
| C0B5 | LD A,(HL) | |||
| C0B6 | INC HL | |||
| C0B7 | AND A | |||
| C0B8 | JR Z,adjust_carried | |||
| C0BA | LD A,($5BD3) | something above the player's head: no drop | ||
| C0BD | AND A | |||
| C0BE | JR NZ,done_pickup_drop | |||
| C0C0 | DEC HL | the charm's type into the free record | ||
| C0C1 | LD A,(HL) | |||
| C0C2 | INC HL | |||
| C0C3 | LD (IY+$00),A | |||
| C0C6 | LD A,(IX+$08) | in the wizard's room and high up? | ||
| C0C9 | CP $88 | |||
| C0CB | JR NZ,place_under_player | |||
| C0CD | LD A,(IX+$03) | |||
| C0D0 | CP $98 | |||
| C0D2 | JR C,place_under_player | |||
| C0D4 | SET 3,(IY+$00) | yes: into the cauldron, and freeze the player's controls | ||
| C0D8 | LD A,$01 | |||
| C0DA | LD ($5BC4),A | |||
| Prev: C0A9 | Up: Map | Next: C0DD |