Prev: 41412 Up: Map Next: 41498
41424: Update state of skeleton (dying)
Used by the routine at 41381.
Input
IX Address of complex state data for skeleton (level 4)
41424 LD A,(42911) If current attribute in skeleton's graphic layout data is not 1...
41427 CP 1 ...
41429 JR NZ,41473 ...then skip ahead to 41473
41431 LD (IX+1),0 Set skeleton's room to 0
41435 LD IY,45417 Load IY with address of complex state data for Boni (level 4)
41439 LD A,(IX+4) Set y-coordinate of Boni's top edge...
41442 LD (IY+4),A ...to same as that of skeleton
41445 ADD A,3 Set y-coordinate of Boni's bottom edge...
41447 LD (IY+6),A ...to three characters below this
41450 LD A,(IX+5) Set x-coordinate of Boni's left edge...
41453 LD (IY+5),A ...to same as that of skeleton
41456 INC A Set x-coordinate of Boni's right edge...
41457 LD (IY+7),A ...to one to the right of this
41460 LD (IY+1),1 Set Boni's depth to 1
41464 SET 6,(IY+10) Set Boni's can-fall flag
41468 SET 2,(IX+9) Set skeleton's removed-from-game flag
41472 RET Return
Current attribute in skeleton's graphic layout data is not 1
41473 LD IX,41412 Load IX with address of table of addresses of attribute data in skeleton's GLD blocks
41477 LD B,6 Load B with 6 (as there are six blocks of graphic layout data to modify)
41479 LD L,(IX+0) Load HL with address of attribute data in current block...
41482 LD H,(IX+1) ...
41485 DEC (HL) Decrease the attribute value
41486 INC IX Advance IX to next address...
41488 INC IX ...
41490 DJNZ 41479 Decrease remaining number of blocks to modify and loop back to 41479 if not zero
41492 LD A,11 Set sound 11 as pending if appropriate, then play and clear pending sound...
41494 CALL 59722 ...
41497 RET Return
Prev: 41412 Up: Map Next: 41498