Prev: 46752 Up: Map Next: 46837
46784: Draw axe(s) to screen if Magic Knight is in an axe room
Used by the routines at 38841, 39393, 61823 and 61860.
46784 LD A,(23702) If Magic Knight's current room's index is less than 17...
46787 CP 17 ...i.e. he is outside the Castle / Spaceship...
46789 RET C ...then return
46790 CP 23 If Magic Knight's current room's index is 23 or more (not in any, except last, Castle ground floor room)...
46792 RET NC ...then return
46793 LD HL,46752 Load HL with start address of properties of axe 0
46796 CALL 46823 Draw axe 0
46799 LD A,(23702) If Magic Knight's current room's index is less than 21...
46802 CP 21 ...i.e. he is on the Castle ground floor, in room 0, 1, 2 or 3...
46804 RET C ...then return (only one axe in these rooms)
46805 LD BC,4 Advance HL to start of properties of axe 1...
46808 ADD HL,BC ...
46809 CALL 46823 Draw axe 0
46812 LD BC,4 Advance HL to start of properties of axe 2...
46815 ADD HL,BC ...
46816 CALL 46823 Draw axe 0
46819 LD BC,4 Advance HL to start of properties of axe 3...
46822 ADD HL,BC ...
46823 LD E,(HL) Load E with current axe's x-coordinate...
46824 INC HL ...
46825 LD D,(HL) Load D with current axe's y-coordinate...
46826 LD (23677),DE ...and store coordinates in coordinate storage
46830 INC HL Advance HL to axe frame number...
46831 INC HL ...
46832 INC HL ...
46833 LD A,(HL) ...and load into A
46834 JP 63040 Draw axe to screen and return
Prev: 46752 Up: Map Next: 46837