Prev: 83C2 Up: Map Next: 8411
83E7: Decreases Wally's milk energy level by given amount.
Input
B Amount to decrease milk energy level by.
Output
Milk_DecreaseByAmount 83E7 PUSH BC
83E8 LD BC,$FF0A Play SFX.
83EB LD DE,$0114
83EE LD HL,$3CC4
83F1 CALL Beep_Effect
83F4 POP BC
83F5 LD A,(MilkLevel) Get row value and convert into DF table address for matching row.
83F8 PUSH AF
83F9 ADD A,A
83FA LD L,A
83FB LD H,$00
83FD LD DE,DF_lookup
8400 ADD HL,DE
8401 PUSH HL
8402 POP IX
8404 LD C,$FF
8406 POP AF Row value again and convert into equivalent row on the empty glass bitmap.
8407 LD E,A
8408 ADD A,A
8409 ADD A,E
840A LD E,A
840B LD D,$00
840D LD HL,Bmp_MilkEmpty Replace on screen bitmap with the empty glass bitmap, row by row.
8410 ADD HL,DE
Code falls through to Bmp_DrawRows code to update the rows of the glass bitmap.
Prev: 83C2 Up: Map Next: 8411