Routines |
Prev: 7B8B | Up: Map | Next: 7BD0 |
This updates the itemstruct with the dropped item. It is its own function so that action_red_cross_parcel can make use of it.
Used by the routine at action_red_cross_parcel.
|
||||||||
drop_item_tail | 7BB5 | CALL item_to_itemstruct | Convert the item index in A into an itemstruct pointer in HL | |||||
7BB8 | INC HL | Advance HL to point to the room index | ||||||
7BB9 | LD A,($68A0) | Get the global current room index | ||||||
7BBC | LD (HL),A | Set the object's room index | ||||||
7BBD | AND A | Is it outdoors? (room index is zero) | ||||||
7BBE | JR NZ,drop_item_interior | Jump if not | ||||||
Outdoors.
|
||||||||
7BC0 | INC HL | Point HL at itemstruct.pos | ||||||
7BC1 | PUSH HL | Save for below | ||||||
7BC2 | INC HL | Bug: HL is incremented by two here but then is immediately overwritten by the LD HL at $7BC5. | ||||||
7BC3 | INC HL | |||||||
7BC4 | POP DE | Restore itemstruct.pos pointer into DE | ||||||
7BC5 | LD HL,$800F | Point HL at the hero's map position | ||||||
7BC8 | CALL pos_to_tinypos | Scale down hero's map position (HL) and assign the result to itemstruct's tinypos (DE). DE is updated to point after tinypos on return | ||||||
7BCB | DEC DE | Point at height field | ||||||
7BCC | LD A,$00 | Set height to zero | ||||||
7BCE | LD (DE),A | |||||||
7BCF | EX DE,HL | Move itemstruct pointer into HL | ||||||
FALL THROUGH into calc_exterior_item_iso_pos.
|
Prev: 7B8B | Up: Map | Next: 7BD0 |