![]() |
Routines |
| Prev: 58753 | Up: Map | Next: 59068 |
|
Used by the routine at InitialiseGame.
|
||||
| Handler_Items | 58868 | LD IX,(23520) | IX=*ReferenceItems. | |
|
Are we done?
|
||||
| Handler_Items_Loop | 58872 | LD A,(IX+0) | Return if the terminator character has been received instead of a co-ordinate (255). | |
| 58875 | CP 255 | |||
| 58877 | RET Z | |||
| 58878 | LD C,A | C=A. | ||
| 58879 | LD B,(IX+1) | B=*IX+1. | ||
| 58882 | LD A,(IX+5) | Jump to Handler_Items_Next if this item has already been "collected". | ||
| 58885 | CP 0 | |||
| 58887 | JR Z,Handler_Items_Next | |||
| 58889 | LD A,(62002) | A=*62002. | ||
| 58892 | DEC A | Decrease A by one. | ||
| 58893 | CP B | Jump to Handler_Items_Next if A is not equal to B. | ||
| 58894 | JR NZ,Handler_Items_Next | |||
| 58896 | LD A,(62001) | A=*TablePlayerAttributes. | ||
| 58899 | SUB C | A-=C. | ||
| 58900 | JR Z,Item_Collected | Jump to Item_Collected if A is either zero or 255. | ||
| 58902 | CP 255 | |||
| 58904 | JR Z,Item_Collected | |||
| Handler_Items_Next | 58906 | LD DE,7 | IX+=0007. | |
| 58909 | ADD IX,DE | |||
| 58911 | JR Handler_Items_Loop | Jump to Handler_Items_Loop. | ||
| Item_Collected | 58913 | CALL Controller_BombCheck | Call Controller_BombCheck. | |
| 58916 | LD A,4 | Write 4 to *SoundFlag_General. | ||
| 58918 | LD (65534),A | |||
| 58921 | LD A,0 | A=0. | ||
| 58923 | LD D,2 | DE=Set the sprite width/ height (2/ 2). | ||
| 58925 | LD E,2 | |||
| 58927 | PUSH DE | Stash DE on the stack. | ||
| 58928 | CALL 59183 | Call 59183. | ||
| 58931 | CALL 3545 | Call CL_SET. | ||
| 58934 | POP DE | Restore DE from the stack. | ||
| 58935 | LD HL,40812 | Write 40812 (Graphics_MaskSprite) to *CHARS. | ||
| 58938 | LD (23606),HL | |||
| 58941 | LD A,32 | A=32. | ||
| 58943 | CALL PrintSprite | Call PrintSprite. | ||
| 58946 | LD (IX+5),0 | Write "collected" (0) to (*IX+5). | ||
| 58950 | LD A,16 | Set INK: YELLOW (6). | ||
| 58952 | RST 16 | |||
| 58953 | LD A,6 | |||
| 58955 | RST 16 | |||
| 58956 | LD A,17 | Set PAPER: *Active_BorderColour. | ||
| 58958 | RST 16 | |||
| 58959 | LD A,(23504) | |||
| 58962 | RST 16 | |||
|
Restore the default ZX Spectrum font.
|
||||
| 58963 | LD HL,15360 | Write 15360 (CHARSET-256) to *CHARS. | ||
| 58966 | LD (23606),HL | |||
| 58969 | LD C,19 | Set up the screen buffer location 19/1 using CL_SET. | ||
| 58971 | LD B,1 | |||
| 58973 | CALL 3545 | |||
| 58976 | LD BC,(23540) | Increment *PlayerBooty by one. | ||
| 58980 | INC BC | |||
| 58981 | LD (23540),BC | |||
| 58985 | CALL 6683 | Call OUT_NUM_1. | ||
| 58988 | LD C,5 | Set up the screen buffer location 5/1 using CL_SET. | ||
| 58990 | LD B,1 | |||
| 58992 | CALL 3545 | |||
| 58995 | LD BC,(23538) | Decrease *PlayerTreasure by one. | ||
| 58999 | DEC BC | |||
| 59000 | LD (23538),BC | |||
| 59004 | LD A,B | Jump to Handler_Items_0 if B is not equal to 0. | ||
| 59005 | CP 0 | |||
| 59007 | JR NZ,Handler_Items_0 | |||
| 59009 | LD A,C | Jump to Handler_Items_0 if C is not equal to 50. | ||
| 59010 | CP 50 | |||
| 59012 | JR NZ,Handler_Items_0 | |||
| 59014 | LD A,(23507) | Write *CurrentRoom to *GoldenKeyRoom. | ||
| 59017 | LD (23548),A | |||
| 59020 | LD A,(IX+0) | Write *IX+0 to *PositionGoldenKey. | ||
| 59023 | LD (23549),A | |||
| 59026 | LD A,(IX+1) | A=*IX+1. | ||
| 59029 | INC A | Increment A by one. | ||
| 59030 | LD (23550),A | Write A to *23550. | ||
| Handler_Items_0 | 59033 | LD A,C | Compare C with 0. | |
| 59034 | CP 0 | |||
| 59036 | PUSH AF | Stash AF on the stack. | ||
| 59037 | CALL NZ,6683 | Call OUT_NUM_1 if C was not zero on line Handler_Items_0. | ||
| 59040 | LD A,32 | A=ASCII "space" (32). | ||
| 59042 | CALL PrintColourCharacter | Call PrintColourCharacter. | ||
| 59045 | POP AF | Restore AF from the stack. | ||
| 59046 | RET NZ | Return if {} is not zero. | ||
| 59047 | LD A,45 | Write 45 to *TimerGoldenKey. | ||
| 59049 | LD (23551),A | |||
| 59052 | LD BC,20 | Write 0020 to *TimerGoldenKey_FrameSkip. | ||
| 59055 | LD (23546),BC | |||
|
Restore the default ZX Spectrum font.
|
||||
| 59059 | LD HL,15360 | Write 15360 (CHARSET-256) to *CHARS. | ||
| 59062 | LD (23606),HL | |||
| 59065 | JP PrintFindTheGoldKey | Jump to PrintFindTheGoldKey. | ||
| Prev: 58753 | Up: Map | Next: 59068 |