![]() |
Routines |
| Prev: 60060 | Up: Map | Next: 60554 |
|
|
||||||||||||||||||||
| 60150 | CALL Controls | Call Controls. | ||||||||||||||||||
| 60153 | CP 8 | Jump to 60207 if A is not equal to 8. | ||||||||||||||||||
| 60155 | JP NZ,60207 | |||||||||||||||||||
| 60158 | LD A,(53828) | Jump to 60207 if *JumpTable_Pointer is equal to 28. | ||||||||||||||||||
| 60161 | CP 28 | |||||||||||||||||||
| 60163 | JP Z,60207 | |||||||||||||||||||
| 60166 | LD A,(53838) | Jump to 60207 if *Active_MonsterYPosition is higher than 17. | ||||||||||||||||||
| 60169 | CP 17 | |||||||||||||||||||
| 60171 | JR NC,60207 | |||||||||||||||||||
| 60173 | LD A,(53837) | Jump to 60184 if *Active_MonsterXPosition is equal to 255. | ||||||||||||||||||
| 60176 | CP 255 | |||||||||||||||||||
| 60178 | JR Z,60184 | |||||||||||||||||||
| 60180 | CP 29 | Jump to 60207 if *Active_MonsterXPosition is higher than 29. | ||||||||||||||||||
| 60182 | JR NC,60207 | |||||||||||||||||||
| 60184 | LD HL,53831 | HL=Flag_Orientation. | ||||||||||||||||||
| 60187 | LD A,(HL) | A=*HL. | ||||||||||||||||||
| 60188 | XOR %00000001 | Flip bit 0. | ||||||||||||||||||
| 60190 | INC HL | Increment HL by one. | ||||||||||||||||||
| 60191 | AND (HL) | Merge the bits from *HL. | ||||||||||||||||||
| 60192 | CALL NZ,Handler_DecreaseMonsterXPosition | Call Handler_DecreaseMonsterXPosition not zero. | ||||||||||||||||||
| 60195 | LD A,(53830) | A=*Flag_MonsterClimbing. | ||||||||||||||||||
| 60198 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||||||||||||||||||
| 60199 | CALL C,Handler_IncrementMonsterYPosition | Call Handler_IncrementMonsterYPosition if the carry flag is set. | ||||||||||||||||||
| 60202 | LD A,8 | A=8. | ||||||||||||||||||
| 60204 | JP Controls_Up | Jump to Controls_Up. | ||||||||||||||||||
|
This entry point is used by the routine at Handler_Controls.
|
||||||||||||||||||||
| 60207 | LD A,(53830) | A=*Flag_MonsterClimbing. | ||||||||||||||||||
| 60210 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||||||||||||||||||
| 60211 | JR NC,60227 | Jump to 60227 if the carry flag is not set. | ||||||||||||||||||
| 60213 | LD HL,51350 | HL=51350. | ||||||||||||||||||
| 60216 | LD A,(53831) | A=*Flag_Orientation. | ||||||||||||||||||
|
Moves the orientation flag into the carry flag.
|
||||||||||||||||||||
| 60219 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||||||||||||||||||
| 60220 | JR NC,60239 | Jump to 60239 if the carry flag is not set. | ||||||||||||||||||
| 60222 | LD HL,51369 | HL=51369. | ||||||||||||||||||
| 60225 | JR 60239 | Jump to 60239. | ||||||||||||||||||
| 60227 | LD HL,51310 | HL=51310. | ||||||||||||||||||
| 60230 | LD A,(53831) | A=*Flag_Orientation. | ||||||||||||||||||
|
Moves the orientation flag into the carry flag.
|
||||||||||||||||||||
| 60233 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||||||||||||||||||
| 60234 | JR NC,60239 | Jump to 60239 if the carry flag is not set. | ||||||||||||||||||
| 60236 | LD HL,51330 | HL=51330. | ||||||||||||||||||
| 60239 | LD BC,(53837) | BC=*Active_MonsterXPosition/Active_MonsterYPosition. | ||||||||||||||||||
| 60243 | LD A,(53836) | Increment *53836 by one. | ||||||||||||||||||
| 60246 | INC A | |||||||||||||||||||
| 60247 | LD (53836),A | |||||||||||||||||||
|
This entry point is used by the routine at Handler_Projectiles.
|
||||||||||||||||||||
| 60250 | LD D,0 | D=0. | ||||||||||||||||||
| 60252 | LD E,A | E=A. | ||||||||||||||||||
| 60253 | ADD HL,DE | HL+=DE. | ||||||||||||||||||
| 60254 | LD (53790),HL | Write HL to *53790. | ||||||||||||||||||
| 60257 | LD D,(HL) | D=*HL. | ||||||||||||||||||
| 60258 | BIT 5,D | Jump to 60263 if bit 5 of D is not set. | ||||||||||||||||||
| 60260 | JR Z,60263 | |||||||||||||||||||
| 60262 | INC C | Increment C by one. | ||||||||||||||||||
| 60263 | BIT 0,D | Jump to 60268 if bit 0 of D is not set. | ||||||||||||||||||
| 60265 | JR Z,60268 | |||||||||||||||||||
| 60267 | INC C | Increment C by one. | ||||||||||||||||||
| 60268 | BIT 1,D | Jump to 60273 if bit 1 of D is not set. | ||||||||||||||||||
| 60270 | JR Z,60273 | |||||||||||||||||||
| 60272 | DEC C | Decrease C by one. | ||||||||||||||||||
| 60273 | LD A,(54271) | Jump to 60296 if *54271 is not zero. | ||||||||||||||||||
| 60276 | AND A | |||||||||||||||||||
| 60277 | JR NZ,60296 | |||||||||||||||||||
| 60279 | LD A,(53831) | A=*Flag_Orientation. | ||||||||||||||||||
| 60282 | XOR %00011111 | Flip bits 0-4. | ||||||||||||||||||
| 60284 | CP C | Jump to 60526 if A is equal to C. | ||||||||||||||||||
| 60285 | JP Z,60526 | |||||||||||||||||||
| 60288 | XOR %00011110 | Flip bits 1-4. | ||||||||||||||||||
| 60290 | ADD A,252 | A+=252. | ||||||||||||||||||
| 60292 | CP C | Jump to 60526 if A is equal to C. | ||||||||||||||||||
| 60293 | JP Z,60526 | |||||||||||||||||||
| 60296 | BIT 2,D | Jump to 60301 if bit 2 of D is not set. | ||||||||||||||||||
| 60298 | JR Z,60301 | |||||||||||||||||||
| 60300 | DEC B | Decrease B by one. | ||||||||||||||||||
| 60301 | LD A,D | A=D. | ||||||||||||||||||
| 60302 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||||||||||||||||||
| 60303 | BIT 3,D | Jump to 60381 if bit 3 of D is not set. | ||||||||||||||||||
| 60305 | JR Z,60381 | |||||||||||||||||||
| 60307 | INC B | Increment B by one. | ||||||||||||||||||
| 60308 | LD A,(54271) | Jump to 60381 if *54271 is not zero. | ||||||||||||||||||
| 60311 | AND A | |||||||||||||||||||
| 60312 | JR NZ,60381 | |||||||||||||||||||
| 60314 | LD A,18 | Jump to 60498 if B is equal to 18. | ||||||||||||||||||
| 60316 | CP B | |||||||||||||||||||
| 60317 | JP Z,60498 | |||||||||||||||||||
| 60320 | LD A,B | Write B to *Active_MonsterYPosition. | ||||||||||||||||||
| 60321 | LD (53838),A | |||||||||||||||||||
| 60324 | LD (53788),BC | Write BC to *53788. | ||||||||||||||||||
| 60328 | LD BC,1282 | BC=1282. | ||||||||||||||||||
| 60331 | LD DE,2319 | DE=2319. | ||||||||||||||||||
| 60334 | CALL 57517 | Call 57517. | ||||||||||||||||||
| 60337 | LD BC,(53788) | BC=*53788. | ||||||||||||||||||
| 60341 | JR Z,60381 | Jump to 60381 if {} is zero. | ||||||||||||||||||
| 60343 | LD A,(53828) | Jump to 60381 if *JumpTable_Pointer is equal to 28. | ||||||||||||||||||
| 60346 | CP 28 | |||||||||||||||||||
| 60348 | JR Z,60381 | |||||||||||||||||||
| 60350 | LD A,(53830) | A=*Flag_MonsterClimbing. | ||||||||||||||||||
| 60353 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||||||||||||||||||
| 60354 | JP NC,60498 | Jump to 60498 if the carry flag is not set. | ||||||||||||||||||
| 60357 | LD (53788),BC | Write BC to *53788. | ||||||||||||||||||
| 60361 | LD B,5 | B=5. | ||||||||||||||||||
| 60363 | LD A,(53831) | C=*Flag_Orientation*4. | ||||||||||||||||||
| 60366 | ADD A,A | |||||||||||||||||||
| 60367 | ADD A,A | |||||||||||||||||||
| 60368 | LD C,A | |||||||||||||||||||
| 60369 | LD DE,2319 | DE=2319. | ||||||||||||||||||
| 60372 | CALL 57517 | Call 57517. | ||||||||||||||||||
| 60375 | LD BC,(53788) | BC=*53788. | ||||||||||||||||||
| 60379 | JR NZ,60498 | Jump to 60498 if {} is not zero. | ||||||||||||||||||
| 60381 | LD A,(54271) | Return if *54271 is not zero. | ||||||||||||||||||
| 60384 | AND A | |||||||||||||||||||
| 60385 | RET NZ | |||||||||||||||||||
| 60386 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||||||||||||||||||
| 60387 | BIT 4,A | Jump to 60464 if bit 4 of A is not set. | ||||||||||||||||||
| 60389 | JR Z,60464 | |||||||||||||||||||
| 60391 | INC B | Increment B by one. | ||||||||||||||||||
| 60392 | LD A,(54271) | Return if *54271 is not zero. | ||||||||||||||||||
| 60395 | AND A | |||||||||||||||||||
| 60396 | RET NZ | |||||||||||||||||||
| 60397 | LD A,18 | Jump to 60498 if B is not equal to 18. | ||||||||||||||||||
| 60399 | CP B | |||||||||||||||||||
| 60400 | JR Z,60498 | |||||||||||||||||||
| 60402 | LD A,B | A=B. | ||||||||||||||||||
| 60403 | LD (53838),A | Write A to *Active_MonsterYPosition. | ||||||||||||||||||
| 60406 | LD (53788),BC | Write BC to *53788. | ||||||||||||||||||
| 60410 | LD BC,1282 | BC=1282. | ||||||||||||||||||
| 60413 | LD DE,2319 | DE=2319. | ||||||||||||||||||
| 60416 | CALL 57517 | Call 57517. | ||||||||||||||||||
| 60419 | LD BC,(53788) | BC=*53788. | ||||||||||||||||||
| 60423 | JP Z,60464 | Jump to 60464 if {} is zero. | ||||||||||||||||||
| 60426 | LD A,(53828) | Jump to 60464 if *JumpTable_Pointer is equal to 28. | ||||||||||||||||||
| 60429 | CP 28 | |||||||||||||||||||
| 60431 | JP Z,60464 | |||||||||||||||||||
| 60434 | LD A,(53830) | A=*Flag_MonsterClimbing. | ||||||||||||||||||
| 60437 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||||||||||||||||||
| 60438 | JR NC,60498 | Jump to 60498 if the carry flag is not set. | ||||||||||||||||||
| 60440 | LD (53788),BC | Write BC to *53788. | ||||||||||||||||||
| 60444 | LD B,5 | B=5. | ||||||||||||||||||
| 60446 | LD A,(53831) | C=*Flag_Orientation*4. | ||||||||||||||||||
| 60449 | ADD A,A | |||||||||||||||||||
| 60450 | ADD A,A | |||||||||||||||||||
| 60451 | LD C,A | |||||||||||||||||||
| 60452 | LD DE,2319 | DE=2319. | ||||||||||||||||||
| 60455 | CALL 57517 | Call 57517. | ||||||||||||||||||
| 60458 | LD BC,(53788) | BC=*53788. | ||||||||||||||||||
| 60462 | JR NZ,60498 | Jump to 60498 if {} is not zero. | ||||||||||||||||||
| 60464 | LD (53837),BC | Write BC to *Active_MonsterXPosition. | ||||||||||||||||||
| 60468 | LD A,(53783) | Jump to Handler_JumpPunch if *Active_MonsterControl is higher than 17. | ||||||||||||||||||
| 60471 | CP 17 | |||||||||||||||||||
| 60473 | JP NC,Handler_JumpPunch | |||||||||||||||||||
|
The routine at DrawMonsterSprite handles which monster to display.
|
||||||||||||||||||||
| 60476 | LD A,9 | A=sprite ID 9.
|
||||||||||||||||||
| 60478 | PUSH BC | Stash the co-ordinates on the stack. | ||||||||||||||||||
| 60479 | CALL DrawMonsterSprite | Call DrawMonsterSprite. | ||||||||||||||||||
| 60482 | POP BC | Restore the co-ordinates from the stack. | ||||||||||||||||||
| 60483 | INC B | Increment both the X and Y positions by one to target drawing the mouth section. | ||||||||||||||||||
| 60484 | INC C | |||||||||||||||||||
| 60485 | LD A,(53831) | A=*Flag_Orientation. | ||||||||||||||||||
| 60488 | XOR %00000001 | Flip bit 0. | ||||||||||||||||||
| 60490 | ADD A,C | A+=C. | ||||||||||||||||||
| 60491 | LD C,A | C=A. | ||||||||||||||||||
|
The routine at DrawMonsterSprite handles which monster to display.
|
||||||||||||||||||||
| 60492 | LD A,23 | A=sprite ID 23.
|
||||||||||||||||||
| 60494 | CALL DrawMonsterSprite | Call DrawMonsterSprite. | ||||||||||||||||||
| 60497 | RET | Return. | ||||||||||||||||||
| 60498 | LD (53837),BC | Write BC to *Active_MonsterXPosition. | ||||||||||||||||||
| 60502 | LD A,(53831) | A=*Flag_Orientation. | ||||||||||||||||||
|
Moves the orientation flag into the carry flag.
|
||||||||||||||||||||
| 60505 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||||||||||||||||||
| 60506 | CALL NC,Handler_DecreaseMonsterXPosition | Call Handler_DecreaseMonsterXPosition if the carry flag is not set. | ||||||||||||||||||
| 60509 | XOR A | Write 0 to: | ||||||||||||||||||
| 60510 | LD (53836),A | |||||||||||||||||||
| 60513 | LD (53830),A | |||||||||||||||||||
| 60516 | LD (53832),A | |||||||||||||||||||
| 60519 | INC A | Increment A by one. | ||||||||||||||||||
| 60520 | LD (53839),A | Write A to *53839. | ||||||||||||||||||
| 60523 | JP 61318 | Jump to 61318. | ||||||||||||||||||
| 60526 | XOR A | Write 0 to *53836. | ||||||||||||||||||
| 60527 | LD (53836),A | |||||||||||||||||||
| 60530 | INC A | Increment A by one. | ||||||||||||||||||
| 60531 | LD (53828),A | Write A to *JumpTable_Pointer. | ||||||||||||||||||
| 60534 | LD A,(53838) | Jump to 61318 if *Active_MonsterYPosition is equal to 18. | ||||||||||||||||||
| 60537 | CP 18 | |||||||||||||||||||
| 60539 | JP Z,61318 | |||||||||||||||||||
| 60542 | LD A,11 | Write 11 to *JumpTable_Pointer. | ||||||||||||||||||
| 60544 | LD (53828),A | |||||||||||||||||||
| 60547 | LD A,B | Write B to *Active_MonsterYPosition. | ||||||||||||||||||
| 60548 | LD (53838),A | |||||||||||||||||||
| 60551 | JP Action_JumpTable | Jump to Action_JumpTable. | ||||||||||||||||||
| Prev: 60060 | Up: Map | Next: 60554 |