Routines |
Prev: B92F | Up: Map | Next: B984 |
Used by the routine at Animation_BarMaid.
|
||||||||
Draws the pint glass to the screen at the location provided by HL.
|
||||||||
Print_Pint_Frame | B965 | LD B,$10 | Set a counter in B for the height of the graphic (10). | |||||
B967 | LD DE,$CA54 | DE=Graphics_Pint. | ||||||
Print_Pint_Frame_Loop | B96A | LD A,(HL) | Fetch the current byte in the screen buffer and stash it on the stack. | |||||
B96B | PUSH AF | |||||||
B96C | LD A,(DE) | Fetch a byte from the graphic pointer in *DE and write it to the screen buffer pointer held by *HL. | ||||||
B96D | LD (HL),A | |||||||
B96E | CALL NextScreenBufferLine | Call NextScreenBufferLine. | ||||||
B971 | INC DE | Increment the graphic pointer by one. | ||||||
B972 | DJNZ Print_Pint_Frame_Loop | Decrease the height counter by one and loop back to Print_Pint_Frame_Loop until the whole of the graphic has been drawn to the screen. | ||||||
Make sure the player sees the drawn pint before removing it.
|
||||||||
B974 | HALT | Halt operation (suspend CPU until the next interrupt) three times. | ||||||
B975 | HALT | |||||||
B976 | HALT | |||||||
Next all the stashed bytes are returned to the screen, ready for the next frame of the animation.
|
||||||||
B977 | CALL $A8DB | Call A8DB. | ||||||
B97A | LD B,$10 | Set a counter in B for the height of the graphic (10). | ||||||
Restore_Background_Loop | B97C | POP AF | Restore the stashed byte from the stack and write it to the screen buffer pointer held by *HL. | |||||
B97D | LD (HL),A | |||||||
B97E | CALL $A8DB | Call A8DB. | ||||||
B981 | DJNZ Restore_Background_Loop | Decrease the height counter by one and loop back to Restore_Background_Loop until all the stashed bytes have been drawn back to the screen. | ||||||
B983 | RET | Return. |
Prev: B92F | Up: Map | Next: B984 |