Prev: C0B2 Up: Map Next: C106
C0DD: Put the charm under the player
Used by the routine at room_to_drop.
The charm takes the player's x, y and z, and the player -- both records, at $5C08 and $5C28 -- goes up 12 units, the height of a charm, so the player ends up standing on it. This is how charms can be stacked into steps.
place_under_player C0DD PUSH HL HL = $5BE5: the rest of the slot, for drop_object
C0DE LD BC,$0003 copy x, y, z from the player to the charm
C0E1 PUSH IX
C0E3 POP HL
C0E4 PUSH IY
C0E6 POP DE
C0E7 INC DE
C0E8 INC HL
C0E9 LDIR
C0EB LD A,(IX+$03) lift both of the player's records by 12
C0EE ADD A,$0C
C0F0 LD (IX+$03),A
C0F3 LD A,(IX+$23)
C0F6 ADD A,$0C
C0F8 LD (IX+$23),A
C0FB PUSH IX the charm's screen position
C0FD PUSH IY
C0FF POP IX
C101 CALL calc_pixel_XY
C104 POP IX
Prev: C0B2 Up: Map Next: C106