Prev: 48567 Up: Map Next: 48641
48593: Move entity right one character, and into new room if appropriate
Used by the routine at 48487.
Input
IX (Entry at 48593 only) Address of complex state data (current level) for Berk
IX (Entry at 48615 only) Address of complex state data for an entity
48593 LD A,(34235) Load E with width of current room (chars) + 99...
48596 LD E,A ...
48597 LD A,(IX+7) If x-coordinate of Berk's right side is less than x-coordinate of right of current room...
48600 CP E ...
48601 JR C,48615 ...then skip ahead to 48615 (move Berk right by one character
48603 CALL 54505 Load B with index of room to right of current character's current room...
48606 JP Z,48096 ...and if there is no room to the right, then jump to 48096 (advance HL to next script instruction and execute)
48609 CALL 54383 Move Berk into room to right of its current room and update position of carried entity if moving entity is Berk
48612 CALL 48710 Move carried entity in front of Berk as he faces out of screen
This entry point is used by the routines at 37085 and 48096.
This entry point serves as the start of the routine triggered by instruction 03 in script data.
48615 INC (IX+5) Increase x-coordinates of entity's left and right edges by one character...
48618 INC (IX+7) ...
48621 BIT 4,(IX+9) If entity is Berk and his carrying-something flag is reset...
48625 JP Z,48096 ...then jump to 48096 (advance HL to next script instruction and execute)
48628 LD IY,(34260) Load IY with address of complex state data for entity held by Berk...
48632 INC (IY+5) ...and increase its left and right x-coordinates by one character...
48635 INC (IY+7) ...
48638 JP 48096 Advance HL to next script instruction and execute
Prev: 48567 Up: Map Next: 48641