Prev: 54419 Up: Map Next: 54456
54434: Set entity's position to be right-hand side of new room to left
Used by the routine at 54419.
Input
B Index of destination room
IX Address of complex state data for an entity
54434 LD A,100 Load D with x-coordinate of left edge of room minus x-coordinate of left edge of current entity...
54436 SUB (IX+5) ...(i.e. distance by which entity's left edge is to the left of left edge of room)...
54439 LD D,A ...
54440 CALL 54480 Set room of entity to B, store room size data for new room and load E with entity's width minus one
54443 LD A,(34235) Load A with width of current (new) room (chars) + 99
54446 SUB D Subtract D...
54447 INC A ...and add one to get x-coordinate of entity's left edge in new room
54448 LD (IX+5),A Set entity's left edge to this position
54451 ADD A,E Add (width - 1) of entity...
54452 LD (IX+7),A ...and set this as x-coordinate of entity's right edge
54455 RET Return
Prev: 54419 Up: Map Next: 54456