Prev: 34687 Up: Map Next: 34751
34695: Copy state data for all resettable complex entities into table of initial-state data for complex entities
Used by the routine at 34438.
34695 LD IY,34687 Point IY at start of table of start addresses of levels' state data for complex entities
34699 LD DE,59821 Point DE at start of table of initial-state data for complex entities
34702 LD B,4 Set B to 4 (as there are 4 levels)
34704 PUSH BC Store BC (B = remaining number of levels to process)
34705 LD L,(IY+0) Load start address of current level's complex state data into HL...
34708 LD H,(IY+1) ...
34711 INC IY Advance IY to next entry in list of addresses of complex state data...
34713 INC IY ...
34715 PUSH HL Transfer start address of current level's complex state data into IX...
34716 POP IX ...
34718 LD A,(IX+0) If first byte in current complex state data entry is 255 (end marker)...
34721 CP 255 ...
34723 JR Z,34747 ...then skip ahead to 34747
34725 LD A,(IX+10) If entity's can-be-reset flag is reset...
34728 AND 128 ...
34730 JR Z,34740 ...then advance IX by 13 bytes to next entry and loop back to 34718
34732 PUSH IX Transfer start address of current entry in complex state data into HL...
34734 POP HL ...
34735 LD BC,13 Load BC with 13 (as entries in complex state data are 13 bytes wide)
34738 LDIR Copy current entry in complex state data into table of initial-state data for complex entities at 59821
34740 LD BC,13 Load BC with 13 (as entries in complex state data are 13 bytes wide)
34743 ADD IX,BC Advance IX to next entry in complex state data
34745 JR 34718 Loop back to 34718
34747 POP BC Restore BC (B = remaining number of levels to process)
34748 DJNZ 34704 Decrease B and loop back to 34704 to process next level
34750 RET Return
Prev: 34687 Up: Map Next: 34751