Routines |
Prev: 34695 | Up: Map | Next: 34864 |
Used by the routine at 34438.
|
||||
34751 | LD IY,34687 | Point IY at start of table of start addresses of levels' state data for complex entities | ||
34755 | LD HL,59821 | Point HL at start of table of initial-state data for complex entities | ||
34758 | LD B,4 | Set B to 4 (as there are 4 levels) | ||
34760 | PUSH BC | Store BC (B = remaining number of levels to process) | ||
34761 | LD E,(IY+0) | Load start address of current level's complex state data into DE... | ||
34764 | LD D,(IY+1) | ... | ||
34767 | INC IY | Advance IY to next entry in list of addresses of complex state data... | ||
34769 | INC IY | ... | ||
34771 | PUSH DE | Transfer start address of current level's complex state data into IX... | ||
34772 | POP IX | ... | ||
34774 | LD A,(IX+0) | If first byte in current complex state data entry is 255 (end marker)... | ||
34777 | CP 255 | ... | ||
34779 | JR Z,34803 | ...then skip ahead to 34803 | ||
34781 | LD A,(IX+10) | If entity's can-be-reset flag is reset... | ||
34784 | AND 128 | ... | ||
34786 | JR Z,34796 | ...then advance IX by 13 bytes to next entry and loop back to 34774 | ||
34788 | PUSH IX | Transfer start address of current entry in complex state data into DE... | ||
34790 | POP DE | ... | ||
34791 | LD BC,13 | Load BC with 13 (as entries in complex state data are 13 bytes wide) | ||
34794 | LDIR | Copy current entry in table of initial-state data for complex entities at 59821 into complex state data | ||
34796 | LD BC,13 | Load BC with 13 (as entries in complex state data are 13 bytes wide) | ||
34799 | ADD IX,BC | Advance IX to next entry in complex state data | ||
34801 | JR 34774 | Loop back to 34774 | ||
34803 | POP BC | Restore BC (B = remaining number of levels to process) | ||
34804 | DJNZ 34760 | Decrease B and loop back to 34760 to process next level | ||
34806 | LD HL,34298 | Point HL at joystick-mode flag | ||
34809 | LD DE,34207 | Point DE at store for current level number | ||
34812 | XOR A | Set A to zero and reset carry flag | ||
34813 | SBC HL,DE | Subtract DE from HL to leave HL = 91 | ||
34815 | LD B,L | Load B with 91 | ||
34816 | LD HL,34207 | Point HL at store for current level number... | ||
34819 | LD (HL),A | ...and set 91 bytes from here onwards to zero... | ||
34820 | INC HL | ... | ||
34821 | DJNZ 34819 | ... | ||
34823 | LD A,16 | Set time / lives to 16... | ||
34825 | LD (34210),A | ... | ||
34828 | LD A,1 | Set current level to level 1... | ||
34830 | LD (34207),A | ... | ||
34833 | CALL 36778 | Initialise script data positions for flying skeleton creature and bat (level 1) | ||
34836 | CALL 38468 | Reset current positions in ape-beasts' script data to initial values | ||
34839 | CALL 41354 | Reset skeleton to initial state | ||
34842 | CALL 51732 | Reset Drutt to initial state | ||
34845 | LD A,1 | Set room of "closed Trap Door" and impassable marker to 1 (i.e. starting room)... | ||
34847 | LD (43188),A | ... | ||
34850 | LD (43450),A | ... | ||
34853 | LD (34226),A | Set attribute of current character to 1 (blue, Berk) | ||
34856 | DEC A | Set room of "open Trap Door" and "Home Sweet Home" brickwork to 0... | ||
34857 | LD (43437),A | ...i.e. remove from game... | ||
34860 | LD (43159),A | ... | ||
34863 | RET | Return |
Prev: 34695 | Up: Map | Next: 34864 |