Prev: 48593 Up: Map Next: 48686
48641: Move entity left one character, and into new room if appropriate
Used by the routine at 48487.
Input
IX (Entry at 48641 only) Address of complex state data (current level) for Berk
IX (Entry at 48660 only) Address of complex state data for an entity
48641 LD A,100 If Berk's left-side x-coordinate is greater than 100 (x-coordinate of left side of room)...
48643 CP (IX+5) ...
48646 JR C,48660 ...then skip ahead to 48660 (move Berk left by one character)
48648 CALL 54539 Load B with index of room to left of entity's current room...
48651 JP Z,48096 ...and if there is no room to the left, then jump to 48096 (advance HL to next script instruction and execute)
48654 CALL 54419 Move Berk into room to left of its current room and update position of carried entity if moving entity is Berk
48657 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 02 in script data.
48660 DEC (IX+5) Move entity left by one character
48663 DEC (IX+7)
48666 BIT 4,(IX+9) If entity is Berk and his carrying-something flag is reset then jump to 48096 (advance HL to next script instruction and execute)
48670 JP Z,48096
48673 LD IY,(34260) Move carried entity left by one character
48677 DEC (IY+5)
48680 DEC (IY+7)
48683 JP 48096 Advance HL to next script instruction and execute
Prev: 48593 Up: Map Next: 48686