![]() |
Routines |
| Prev: 61700 | Up: Map | Next: 61871 |
|
Used by the routine at Handler_Player.
|
||||
| Handler_KeysAndLockedDoors | 61703 | PUSH IX | Stash IX on the stack. | |
| 61705 | LD IX,(23514) | IX=*ReferenceKeysAndLockedDoors. | ||
| Handler_KeysAndLockedDoors_Loop | 61709 | LD A,(IX+0) | Jump to Handler_Housekeeping if the terminator character has been received instead of a co-ordinate (255). | |
| 61712 | CP 255 | |||
| 61714 | JR Z,Handler_Housekeeping | |||
| 61716 | LD A,(IX+5) | A=*IX+5. | ||
| 61719 | AND %00000010 | Keep only bit 1. | ||
| 61721 | JR Z,Handler_KeysAndLockedDoors_Next | Jump to Handler_KeysAndLockedDoors_Next if the result is zero. | ||
| 61723 | LD A,(IX+2) | Jump to Handler_KeysAndLockedDoors_Next if *IX+2 is not equal to C. | ||
| 61726 | CP C | |||
| 61727 | JR NZ,Handler_KeysAndLockedDoors_Next | |||
| 61729 | LD A,(IX+3) | Jump to Handler_KeysAndLockedDoors_0 if *IX+3 is equal to B. | ||
| 61732 | CP B | |||
| 61733 | JR Z,Handler_KeysAndLockedDoors_0 | |||
| Handler_KeysAndLockedDoors_Next | 61735 | LD DE,6 | IX+=0006. | |
| 61738 | ADD IX,DE | |||
| 61740 | JR Handler_KeysAndLockedDoors_Loop | Jump to Handler_KeysAndLockedDoors_Loop. | ||
| Handler_KeysAndLockedDoors_0 | 61742 | LD A,6 | Write 6 to *SoundFlag_General. | |
| 61744 | LD (65534),A | |||
| 61747 | LD (IX+5),1 | Write 1 to *IX+5. | ||
| 61751 | LD C,(IX+2) | C=*IX+2. | ||
| 61754 | LD B,(IX+3) | B=*IX+3. | ||
| 61757 | LD E,1 | Set the sprite width/ height in DE (1/2). | ||
| 61759 | LD D,2 | |||
| 61761 | LD A,0 | A=0. | ||
| 61763 | CALL 59183 | Call 59183. | ||
| 61766 | LD HL,(23606) | Stash *CHARS on the stack. | ||
| 61769 | PUSH HL | |||
| 61770 | LD HL,40812 | Write 40812 (Graphics_MaskSprite) to *CHARS. | ||
| 61773 | LD (23606),HL | |||
| 61776 | LD A,32 | A=32. | ||
| 61778 | CALL PrintSprite | Call PrintSprite. | ||
| 61781 | POP HL | Restore the original value of *CHARS from the stack. | ||
| 61782 | LD (23606),HL | |||
| 61785 | LD A,(IX+4) | A=*IX+4. | ||
| 61788 | POP IX | Restore IX from the stack. | ||
| 61790 | PUSH AF | Stash AF on the stack. | ||
| 61791 | LD A,(IX+16) | Jump to Handler_KeysAndLockedDoors_1 if *IX+16 is equal to 0. | ||
| 61794 | CP 0 | |||
| 61796 | JR Z,Handler_KeysAndLockedDoors_1 | |||
| 61798 | PUSH IX | Stash IX on the stack. | ||
| 61800 | CALL 61925 | Call 61925. | ||
| 61803 | LD HL,(23606) | Stash *CHARS on the stack. | ||
| 61806 | PUSH HL | |||
| 61807 | LD HL,33656 | Write 33656 (Graphics_RoomScaffolding_Empty) to *CHARS. | ||
| 61810 | LD (23606),HL | |||
| 61813 | LD A,16 | Set INK: *ActiveRoom_KeyColour. | ||
| 61815 | RST 16 | |||
| 61816 | LD A,(23500) | |||
| 61819 | RST 16 | |||
| 61820 | LD (IX+5),3 | Write 3 to *IX+5. | ||
| 61824 | LD C,(IX+2) | C=*IX+2. | ||
| 61827 | LD B,(IX+3) | B=*IX+3. | ||
| 61830 | PUSH BC | Stash BC on the stack. | ||
| 61831 | CALL ConvertCoordinateToBufferOffset | Call ConvertCoordinateToBufferOffset. | ||
| 61834 | CALL 3545 | Call CL_SET. | ||
| 61837 | LD A,(IX+4) | A=*IX+4. | ||
| 61840 | ADD A,65 | A+=65. TODO Graphics_KeyLabels | ||
| 61842 | CALL 59396 | Call 59396. | ||
| 61845 | RST 16 | Print to the screen using RST 16. | ||
| 61846 | POP BC | Restore BC from the stack. | ||
| 61847 | DEC B | Decrease B by one. | ||
| 61848 | CALL ConvertCoordinateToBufferOffset | Call ConvertCoordinateToBufferOffset. | ||
| 61851 | CALL 3545 | Call CL_SET. | ||
| 61854 | LD A,75 | A=Graphics_KeyBottom (75). | ||
| 61856 | CALL 59396 | Call 59396. | ||
| 61859 | RST 16 | Print to the screen using RST 16. | ||
| 61860 | POP HL | Restore the original value of *CHARS from the stack. | ||
| 61861 | LD (23606),HL | |||
| 61864 | POP IX | Restore IX from the stack. | ||
| Handler_KeysAndLockedDoors_1 | 61866 | POP AF | Restore AF from the stack. | |
| 61867 | LD (IX+16),A | Write A to *IX+16. | ||
| 61870 | RET | Return. | ||
| Prev: 61700 | Up: Map | Next: 61871 |