Routines |
Prev: 42251 | Up: Map | Next: 42381 |
Used by the routine at 41211.
|
||||
42266 | LD IX,45482 | Load IX with address of complex state data for flying skeleton creature (level 4) | ||
42270 | CALL 54768 | Check entity at IX for collision with another entity at same depth whose interaction-(11,6) flag is set... | ||
42273 | CP 31 | ...and if collision was not with entity of class 31 (Berk)... | ||
42275 | JR NZ,42285 | ...then skip ahead to 42285 | ||
42277 | LD A,(45401) | If Berk's can-fall flag is reset... | ||
42280 | BIT 6,A | ... | ||
42282 | CALL Z,53667 | ...then set Berk-has-been-killed flag | ||
42285 | LD HL,45491 | Load HL with address of flying skeleton creature's flags | ||
42288 | BIT 0,(HL) | If creature's horizontal-direction flag is set (moving left)... | ||
42290 | JR NZ,42320 | ...then skip ahead to 42320 | ||
Horizontal-direction flag reset (moving right)
|
||||
42292 | LD A,(IX+0) | If creature's room is not 4 (yellow skull's room)... | ||
42295 | CP 4 | ... | ||
42297 | JR NZ,42309 | ...then skip ahead to 42309 | ||
42299 | LD A,(IX+7) | If x-coordinate of creature's right edge is less than 126... | ||
42302 | CP 126 | ... | ||
42304 | JR C,42309 | ...then skip ahead to 42309 | ||
42306 | SET 0,(HL) | Set creature's horizontal-direction flag (moving left) | ||
42308 | RET | Return | ||
42309 | INC (IX+5) | Move creature right one character... | ||
42312 | INC (IX+7) | ... | ||
42315 | CALL 54313 | ...and move into room to the right, if appropriate | ||
42318 | JR 42346 | Skip ahead to 42346 | ||
Horizontal-direction flag set (moving left)
|
||||
42320 | LD A,(IX+0) | If creature's room is not 1 (door room)... | ||
42323 | CP 1 | ... | ||
42325 | JR NZ,42337 | ...then skip ahead to 42337 | ||
42327 | LD A,(IX+5) | If x-coordinate of creature's left edge is at least 108... | ||
42330 | CP 108 | ... | ||
42332 | JR NC,42337 | ...then skip ahead to 42337 | ||
42334 | RES 0,(HL) | Reset creature's horizontal-direction flag (moving right) | ||
42336 | RET | Return | ||
42337 | DEC (IX+5) | Move creature left one character... | ||
42340 | DEC (IX+7) | ... | ||
42343 | CALL 54348 | ...and move into room to the left, if appropriate | ||
42346 | LD A,(IX+4) | Load A with y-coordinate of creature's top edge | ||
42349 | BIT 1,(HL) | If creature's vertical-direction flag is set (moving up)... | ||
42351 | JR NZ,42367 | ...then skip ahead to 42367 | ||
Vertical-direction flag reset, moving down
|
||||
42353 | CP 108 | If y-coordinate of creature's top edge is not 108... | ||
42355 | JR NZ,42360 | ...then skip ahead to 42360 | ||
42357 | SET 1,(HL) | Set creature's vertical-direction flag (moving up) | ||
42359 | RET | Return | ||
This entry point is used by the routine at 41633.
|
||||
42360 | INC (IX+4) | Move creature down one character... | ||
42363 | INC (IX+6) | ... | ||
42366 | RET | Return | ||
Vertical-direction flag set, moving up
|
||||
42367 | CP 100 | If y-coordinate of creature's top edge is not 100... | ||
42369 | JR NZ,42374 | ...then skip ahead to 42374 | ||
42371 | RES 1,(HL) | Reset creature's vertical-direction flag (moving down) | ||
42373 | RET | Return | ||
This entry point is used by the routine at 41633.
|
||||
42374 | DEC (IX+4) | Move creature up one character... | ||
42377 | DEC (IX+6) | ... | ||
42380 | RET | Return |
Prev: 42251 | Up: Map | Next: 42381 |