Prev: 53684 Up: Map Next: 53782
53723: If Berk has been killed then reset his position and state, flash screen and decrease time / lives
Used by the routine at 34438.
53723 LD HL,34208 Point HL at game flags
53726 RES 3,(HL) Reset reset-spiders-to-initial-state flag
53728 BIT 2,(HL) If Berk-has-been-killed flag is not set...
53730 RET Z ...then return
53731 RES 2,(HL) Reset Berk-has-been-killed flag
53733 SET 3,(HL) Set reset-spiders-to-initial-state flag
53735 LD IX,(34240) Load IX with address of current level's complex state data for Berk
53739 CALL 36296 Make Berk drop the entity he is holding and load IY with its complex state data address
53742 LD DE,53674 Point DE at location two bytes (1 WORD) before start of table of addresses of Berk reset data
53745 LD A,(34207) Load current level number into A
53748 CALL 53814 Load DE with that level's address (from table at 53676) for complex state data to revert Berk to after he is killed
53751 EX DE,HL Swap HL (now address of complex state data to revert to) and DE
53752 LD DE,(34240) Load DE with address of current level's complex state data for Berk
53756 LD BC,13 Overwrite Berk's current complex state data...
53759 LDIR ...with reset data from table at 53684 for current level
53761 LD HL,35363 Load HL with address of script data for Berk starting to fall...
53764 LD (35687),HL ...and store at 35687 (as current position in Berk's script data)
53767 CALL 53577 Cycle attributes (long, full-screen) and clear display buffers
53770 LD A,127 Fill top 22 rows of attribute file with white INK, white PAPER, BRIGHT...
53772 CALL 53649 ...
53775 CALL 53887 Paint red areas outside accessible areas of current character's current room
53778 CALL 47485 Decrease current time / lives by one if greater than zero and redraw timer figures
53781 RET Return
Prev: 53684 Up: Map Next: 53782