Prev: E6FA Up: Map Next: E77E
E753: Write active spell message on scroll and draw energy bar
spell message text and energy bar
Print the appropriate message (6FBC) for the active spell on the scroll.
E753 LD A,($EAE6) Get the spell message number
E756 LD HL,($EB63) Address of spell messages (6FBD)
E759 LD D,$00 D = counter to check message number against
Get the address pointer to the correct spell text:
E75B CP D Check spell message number against current message counter
E75C JR Z,$E766 If it's the same, we're at the right message so skip ahead to E766
E75E LD B,(HL) Length of current text string
E75F INC B Increment for the following check loop
E760 INC HL Move address pointer along
E761 DJNZ $E760 ...to the next message
E763 INC D Increment the counter (to check spell message against)
E764 JR $E75B ...and keep checking
The HL register pair is now pointing to the active spell message text.
E766 LD ($EAEA),HL Store the spell message text address pointer
E769 LD A,$00
E76B LD ($EBC9),A Reset the spell message text counter
Draw the energy bar:
E76E LD A,$84 Graphics address pointer offset for 98C9, which points at the energy bar graphic at AEF3.
E770 CALL $E0C2 Set up graphics ready to draw
E773 LD DE,$50C7 Set screen display address to the bottom left of the scroll
E776 CALL $DD24 Draw the energy bar
E779 LD A,$18 This byte is set to 24 which indicates the energy bar has just been drawn - checked in routine at E641
E77B LD ($EAE1),A
Prev: E6FA Up: Map Next: E77E