Prev: 37158 Up: Map Next: 37210
37172: Copy Buffer To Screen
Used by the routine at Initialise_SubGame.
CopyBufferToScreen 37172 LD BC,8210 Set the size of the playarea in BC (width 32 height 18).
37175 LD HL,30912 HL=30912.
CopyBufferToScreen_Loop 37178 PUSH BC Stash the playarea size and HL on the stack.
37179 PUSH HL
37180 CALL 38242 Call 38242.
37183 POP HL Restore HL from the stack.
37184 INC HL Increment HL by two.
37185 INC HL
37186 POP BC Restore the playarea size from the stack.
37187 DJNZ CopyBufferToScreen_Loop Decrease the playarea width counter by one and loop back to CopyBufferToScreen_Loop the whole width has been drawn for this line.
37189 LD B,32 Reset the playarea width in B back to 32.
37191 DEC C Decrease the playarea height counter by one.
37192 JR NZ,CopyBufferToScreen_Loop Jump to CopyBufferToScreen_Loop until all the playarea lines have been drawn.
37194 LD HL,16448 HL=16448 (screen buffer location).
37197 LD C,32 C=32.
37199 CALL ClearScreenArea Call ClearScreenArea.
37202 LD HL,20640 HL=20640 (screen buffer location).
37205 LD C,96 C=96.
37207 JP ClearScreenArea Jump to ClearScreenArea.
Prev: 37158 Up: Map Next: 37210