Prev: B7B9 Up: Map Next: B873
B841: Charges up the gun by 2 units.
Used by the routine at _939a.
Updates both the charge value and the onscreen meter.
Gun_ChargeUnit B841 LD A,$A0 Set gun to full charge
B843 LD (Gun_Charge),A
B846 LD HL,$59CC Colour ATTTR area of charge meter.
B849 LD DE,$59CD
B84C LD BC,$0004
B84F LD (HL),$44
B851 LDIR
B853 LD A,$02 Number of unit to charge by.
Gun_ChargeUnit_0 B855 LD B,$08 Height of the on screen indicator.
B857 LD HL,$48CC Position in DF where indicator is.
B85A LD DE,$00FC
Gun_ChargeUnit_1 B85D SCF Shift the hold charge block graphic
B85E RR (HL) right by 4 pixels, slowly filling the meter.
B860 INC HL
B861 RR (HL)
B863 INC HL
B864 RR (HL)
B866 INC HL
B867 RR (HL)
B869 INC HL
B86A RR (HL)
B86C ADD HL,DE
B86D DJNZ Gun_ChargeUnit_1 Next row down in DF.
B86F DEC A Repeat for next unit.
B870 JR NZ,Gun_ChargeUnit_0
B872 RET
Prev: B7B9 Up: Map Next: B873