![]() |
Routines |
Prev: 60301 | Up: Map | Next: 60725 |
Used by the routine at InitialiseGame.
|
||||
Handler_Player | 60376 | LD IX,62001 | IX=TablePlayerAttributes. | |
60380 | LD A,16 | Set INK: CYAN (5). | ||
60382 | RST 16 | |||
60383 | LD A,5 | |||
60385 | RST 16 | |||
60386 | XOR A | Write 0 to *62255. | ||
60387 | LD (62255),A | |||
60390 | LD A,(59424) | Jump to Handler_Player_2 if *59424 is not equal to 0. | ||
60393 | CP 0 | |||
60395 | JR NZ,Handler_Player_2 | |||
60397 | LD A,(IX+17) | Jump to Handler_Player_2 if *IX+17 is equal to 3. | ||
60400 | CP 3 | |||
60402 | JR Z,Handler_Player_2 | |||
60404 | LD A,(IX+5) | Jump to Handler_Player_2 if *IX+5 is not equal to 0. | ||
60407 | CP 0 | |||
60409 | JR NZ,Handler_Player_2 | |||
60411 | LD A,(IX+3) | Jump to Handler_Player_1 if *IX+3 is not equal to 3. | ||
60414 | CP 3 | |||
60416 | JP NZ,Handler_Player_1 | |||
60419 | LD A,(IX+1) | Jump to Handler_Player_0 if *IX+1 is equal to 26. | ||
60422 | CP 26 | |||
60424 | JR Z,Handler_Player_0 | |||
60426 | CP 21 | Jump to Handler_Player_0 if *IX+1 is equal to 21. | ||
60428 | JR Z,Handler_Player_0 | |||
60430 | CP 16 | Jump to Handler_Player_0 if *IX+1 is equal to 16. | ||
60432 | JR Z,Handler_Player_0 | |||
60434 | CP 11 | Jump to Handler_Player_0 if *IX+1 is equal to 11. | ||
60436 | JR Z,Handler_Player_0 | |||
60438 | CP 6 | Jump to Handler_Player_1 if *IX+1 is not equal to 6. | ||
60440 | JR NZ,Handler_Player_1 | |||
Handler_Player_0 | 60442 | LD C,(IX+0) | C=*IX+0. | |
60445 | LD B,(IX+1) | B=*IX+1. | ||
60448 | DEC B | Decrease B by three. | ||
60449 | DEC B | |||
60450 | DEC B | |||
60451 | CALL 3545 | Call CL_SET. | ||
60454 | LD HL,(23684) | HL=*DF_CC. | ||
60457 | LD A,(62252) | A=*62252. | ||
60460 | AND (HL) | Merge the bits from *HL. | ||
60461 | JR NZ,Handler_Player_2 | Jump to Handler_Player_2 if the result is not zero. | ||
60463 | INC HL | Increment HL by one. | ||
60464 | LD A,(62253) | A=*62253. | ||
60467 | AND (HL) | Merge the bits from *HL. | ||
60468 | JR NZ,Handler_Player_2 | Jump to Handler_Player_2 if the result is not zero. | ||
60470 | INC HL | Increment HL by one. | ||
60471 | LD A,(62254) | A=*62254. | ||
60474 | AND (HL) | Merge the bits from *HL. | ||
60475 | JR NZ,Handler_Player_2 | Jump to Handler_Player_2 if the result is not zero. | ||
Handler_Player_1 | 60477 | DEC (IX+5) | Decrease *IX+5 by one. | |
60480 | LD A,(62266) | Increment *62266 by one. | ||
60483 | INC A | |||
60484 | LD (62266),A | |||
60487 | JR Handler_Player_3 | Jump to Handler_Player_3. | ||
Handler_Player_2 | 60489 | LD A,(62271) | A=*62271. | |
60492 | LD (65532),A | Write A to *65532. | ||
60495 | CP 0 | Jump to LoseLife if A is not equal to 0. | ||
60497 | JP NZ,LoseLife | |||
60500 | LD A,0 | Write 0 to *62266. | ||
60502 | LD (62266),A | |||
Handler_Player_3 | 60505 | CALL 61094 | Call 61094. | |
60508 | LD A,C | Jump to Handler_Player_8 if C is equal to 34. | ||
60509 | CP 34 | |||
60511 | JP Z,Handler_Player_8 | |||
60514 | CP 3 | Jump to Handler_Player_8 if C is equal to 3. | ||
60516 | JP Z,Handler_Player_8 | |||
60519 | LD A,B | Jump to Handler_Player_8 if B is equal to 24. | ||
60520 | CP 24 | |||
60522 | JP Z,Handler_Player_8 | |||
60525 | CP 4 | Jump to LoseLife if B is equal to 4. | ||
60527 | JP Z,LoseLife | |||
60530 | LD A,C | Jump to Handler_Player_4 if C is not equal to *IX+0. | ||
60531 | CP (IX+0) | |||
60534 | JR NZ,Handler_Player_4 | |||
60536 | LD A,B | Jump to Handler_Player_4 if B is not equal to *IX+1. | ||
60537 | CP (IX+1) | |||
60540 | JR NZ,Handler_Player_4 | |||
60542 | LD A,(IX+3) | Jump to Handler_Player_6 if *IX+3 is equal to D. | ||
60545 | CP D | |||
60546 | JR Z,Handler_Player_6 | |||
Handler_Player_4 | 60548 | LD A,1 | Write 1 to *62255. | |
60550 | LD (62255),A | |||
60553 | PUSH DE | Stash DE and BC on the stack. | ||
60554 | PUSH BC | |||
60555 | LD A,(IX+17) | Jump to Handler_Player_5 if *IX+17 is not equal to 19. | ||
60558 | CP 19 | |||
60560 | JR NZ,Handler_Player_5 | |||
60562 | DEC C | Decrease C by two. | ||
60563 | DEC C | |||
Handler_Player_5 | 60564 | CALL 61871 | Call 61871. | |
60567 | POP BC | Restore BC and DE from the stack. | ||
60568 | POP DE | |||
60569 | CP 255 | Jump to Handler_Player_6 if A is equal to 255. | ||
60571 | JR Z,Handler_Player_6 | |||
See Walkthrough All Doors.
|
||||
60573 | CP (IX+16) | Jump to Handler_Player_8 if A is not equal to *IX+16. | ||
60576 | JR NZ,Handler_Player_8 | |||
60578 | CALL Handler_UnlockDoor | Call Handler_UnlockDoor. | ||
Handler_Player_6 | 60581 | LD (IX+0),C | Write C to *IX+0. | |
60584 | LD (IX+1),B | Write B to *IX+1. | ||
60587 | LD (IX+2),E | Write E to *IX+2. | ||
60590 | LD (IX+3),D | Write D to *IX+3. | ||
60593 | PUSH DE | Stash DE on the stack. | ||
60594 | CALL 59874 | Call 59874. | ||
60597 | POP DE | Restore DE from the stack. | ||
60598 | LD (IX+2),E | Write E to *IX+2. | ||
60601 | LD (IX+3),D | Write D to *IX+3. | ||
60604 | LD A,(62266) | Call Action_Falling if *62266 is higher than 8. | ||
60607 | CP 8 | |||
60609 | CALL NC,Action_Falling | |||
60612 | LD HL,35192 | Write 35192 (Graphics_Player) to *CHARS. | ||
60615 | LD (23606),HL | |||
60618 | CALL 61143 | Call 61143. | ||
60621 | LD A,(41227) | Write *41227 to *62252. | ||
60624 | LD (62252),A | |||
60627 | LD A,(41259) | Write *41259 to *62253. | ||
60630 | LD (62253),A | |||
60633 | LD A,(41291) | Write *41291 to *62254. | ||
60636 | LD (62254),A | |||
60639 | LD A,(IX+0) | Write *IX+0 to *IX+13. | ||
60642 | LD (IX+13),A | |||
60645 | LD A,(IX+1) | Write *IX+1 to *IX+14. | ||
60648 | LD (IX+14),A | |||
60651 | LD A,(IX+3) | Write *IX+3 to *IX+15. | ||
60654 | LD (IX+15),A | |||
60657 | LD A,(IX+2) | Write *IX+2 to *IX+11. | ||
60660 | LD (IX+11),A | |||
60663 | LD A,(62255) | Jump to Handler_Player_8 if *62255 is equal to 0. | ||
60666 | CP 0 | |||
60668 | JR Z,Handler_Player_8 | |||
60670 | LD C,(IX+0) | C=*IX+0. | ||
60673 | LD B,(IX+1) | B=*IX+1. | ||
60676 | LD A,(IX+17) | Jump to Handler_Player_7 if *IX+17 is not equal to 19. | ||
60679 | CP 19 | |||
60681 | JR NZ,Handler_Player_7 | |||
60683 | DEC C | Decrease C by two. | ||
60684 | DEC C | |||
Handler_Player_7 | 60685 | CALL Handler_KeysAndLockedDoors | Call Handler_KeysAndLockedDoors. | |
Handler_Player_8 | 60688 | LD (IX+4),0 | Write 0 to *IX+4. | |
60692 | LD (IX+5),0 | Write 0 to *IX+5. | ||
60696 | RET | Return. | ||
Player is falling, handle the animation.
|
||||
Action_Falling | 60697 | LD A,1 | Write 1 to *62271. | |
60699 | LD (62271),A | |||
60702 | LD (IX+17),2 | Write 2 to *IX+17. | ||
60706 | LD A,(IX+6) | Jump to SetFallingSprite if *IX+6 is lower than 158. | ||
60709 | CP 158 | |||
60711 | JR C,SetFallingSprite | |||
60713 | ADD A,6 | A+=6. | ||
60715 | CP 176 | Jump to SetPlayerSprite if A is not equal to 176. | ||
60717 | JR NZ,SetPlayerSprite | |||
SetFallingSprite | 60719 | LD A,158 | Set A to 158, the first frame of the "falling" animation. | |
SetPlayerSprite | 60721 | LD (IX+6),A | Write A to *IX+6 (*PlayerSpriteID). | |
60724 | RET | Return. |
Prev: 60301 | Up: Map | Next: 60725 |