Routines |
Prev: DE7F | Up: Map | Next: DEF9 |
Used by the routine at C42A.
|
||||
An interactable object has been found in the room Maroc is entering.
This routine:
|
||||
DEB7 | LD A,$04 | Graphic type = 4 (interactable object) | ||
DEB9 | LD ($EB43),A | |||
DEBC | LD A,($EB84) | Data set number for interactable object - from object table at 736F | ||
DEBF | LD ($EB46),A | |||
DEC2 | LD HL,($EB82) | Address pointer to the beginning of this interactable object's data set | ||
DEC5 | LD ($EB44),HL | |||
DEC8 | LD A,($EB86) | Horizontal (X) position of object in room, in 4-pixel (half-character) steps | ||
DECB | LD ($EB48),A | |||
DECE | LD A,($EB87) | Vertical (Y) position of object in room, in pixels, from top of room | ||
DED1 | LD ($EB4A),A | |||
DED4 | LD A,$40 | 64 signifies item in 'standard' room (254/255 for tunnel room items) | ||
DED6 | LD ($EB4B),A | |||
DED9 | LD DE,$0000 | Set vertical and horizontal speed of item to zero | ||
DEDC | LD ($EB4C),DE | |||
DEE0 | LD ($EB4D),DE | |||
DEE4 | LD A,($EB88) | Copy item properties byte into data buffer | ||
DEE7 | LD ($EB4E),A | |||
DEEA | LD A,$01 | Graphic address frame offset = n-1 (= 0, no offset) | ||
DEEC | LD ($EB50),A | |||
DEEF | LD A,($EB90) | Graphics number for this item (offset for address pointer in graphics table starting at 97C3) | ||
DEF2 | CALL $E0C2 | Set up graphics for this interactable object | ||
DEF5 | CALL $E0B0 | Copy item data buffer (EB43) into a data set at 7C00 | ||
DEF8 | RET |
Prev: DE7F | Up: Map | Next: DEF9 |