Prev: 52148 Up: Map Next: 52243
52193: Advance position of entity pushed right by Drutt
Used by the routine at 52148.
Input
IY Address of complex state data for entity pushed by Drutt
52193 PUSH IY Transfer address of complex state data for pushed entity from IY...
52195 POP IX ...to IX
52197 CALL 54569 Check pushed entity for collision with another impassable / pushable entity immediately to the right...
52200 JR C,52207 ...and if a collision has not occurred, then skip ahead to 52207
52202 CP 129 If collision was with entity of class 129 (causes other entities to start falling)...
52204 JR Z,52235 ...then skip ahead to 52235
52206 RET Return (as Drutt can't push two entities)
No knock-on collision
52207 LD A,(34235) Load E with width of current room (chars) + 99...
52210 SUB 2 ...minus 2...
52212 LD E,A ...
52213 LD A,(IX+7) ...and if x-coordinate of right edge of pushed entity is less than this...
52216 CP E ...i.e. not yet at right edge of room...
52217 JR C,52227 ...then skip ahead to 52227
52219 CALL 54505 Load B with index of room to right of current character's current room...
52222 RET Z ...and if there is no room to the right then return
52223 CALL 54313 Move pushed entity into room to the right, if appropriate...
52226 RET NC ...and if pushed entity can't enter new room then return
52227 INC (IX+5) Move pushed entity right one character...
52230 INC (IX+7) ...
52233 XOR A Load A with zero (see trivia)
52234 RET Return
52235 CALL 55516 Set can-fall flag and set initial velocity factor of 2 for pushed entity
52238 CALL 52227 Move pushed entity right two characters...
52241 JR 52227 ...and return
Prev: 52148 Up: Map Next: 52243