Prev: 34751 Up: Map Next: 34901
34864: Copy start addresses of current level's data blocks and clean up old data
Data blocks are copied to 34236.
Used by the routines at 34438 and 36753.
34864 PUSH DE Store DE
34865 PUSH HL Store HL
34866 LD HL,(34244) Load HL with address of complex state data (current level) for worm
34869 LD (HL),0 Set worm's current room to zero
34871 LD A,(34207) Load current level into A
34874 LD HL,34281 Point HL at position 20 bytes before start of list of start addresses of level 1's data blocks
34877 LD BC,20 Set data length to 20, as there are 10 data blocks per level (so 10 addresses)
34880 ADD HL,BC Advance HL to start of data block address list for next level
34881 DEC A Decrease level counter
34882 JR NZ,34880 Loop back if we have not reached data for required level
At this point, HL points to the start of the list of start addresses of the current level's data blocks
34884 LD DE,34236 Copy this level's data block start addresses to 34236...
34887 LDIR ...
34889 LD B,9 Clear store for script instruction loop data...
34891 LD HL,34285 ...
34894 LD (HL),A ...
34895 INC HL ...
34896 DJNZ 34894 ...
34898 POP HL Restore HL
34899 POP DE Restore DE
34900 RET Return
Prev: 34751 Up: Map Next: 34901