Prev: F2CA Up: Map Next: F352
F31C: Handler: Energy Bar Attributes
Used by the routine at RunHandlers.
energy
George:
Handler_EnergyBarAttributes F31C LD C,$22 C=horizontal co-ordinate (22).
F31E LD H,$6A H=INK: RED, PAPER: CYAN (BRIGHT) .
F320 LD A,($CFDE) A=*George_Energy.
F323 CALL WriteEnergyBar_AttributesLoop Call WriteEnergyBar_AttributesLoop.
Lizzy:
F326 LD C,$2C C=horizontal co-ordinate (2C).
F328 LD H,$6C H=INK: GREEN, PAPER: CYAN (BRIGHT) .
F32A LD A,($D00D) A=*Lizzy_Energy.
F32D CALL WriteEnergyBar_AttributesLoop Call WriteEnergyBar_AttributesLoop.
Ralph:
F330 LD C,$36 C=horizontal co-ordinate (36).
F332 LD H,$6F H=INK: WHITE, PAPER: CYAN (BRIGHT) .
F334 LD A,($D03C) A=*Ralph_Energy.
F337 CALL WriteEnergyBar_AttributesLoop Call WriteEnergyBar_AttributesLoop.
F33A RET Return.
f
WriteEnergyBar_AttributesLoop F33B LD B,$00 B=00.
F33D LD D,B D=B.
F33E AND A Return if the monsters energy is at zero.
F33F RET Z
F340 SUB $08 Subtract 08 from the monsters energy held by A.
F342 JR C,WriteEnergyBar_Attributes Jump to WriteEnergyBar_Attributes if A was lower than 08.
Stash the monsters energy while A is being used for writing to the buffer.
F344 EX AF,AF' Exchange the AF register with the shadow AF register.
F345 CALL WriteEnergyBar_Attributes Call WriteEnergyBar_Attributes.
F348 EX AF,AF' Exchange the shadow AF register back to the normal AF register.
F349 INC C Increment the horizontal co-ordinate by one.
F34A JR WriteEnergyBar_AttributesLoop Jump to WriteEnergyBar_AttributesLoop.
Write the energy bar to the buffer.
WriteEnergyBar_Attributes F34C LD D,$83 D=vertical co-ordinate (83).
F34E LD E,C E=horizontal co-ordinate for the current monster held in C.
F34F LD A,H A=bar colour held in H.
F350 LD (DE),A Write A to *DE.
F351 RET Return.
Prev: F2CA Up: Map Next: F352