Prev: 62238 Up: Map Next: 62351
62281: Handler: Time Bar
Used by the routine at 54098.
Handler_TimeBar 62281 LD B,40 B=40.
62283 LD HL,55354 HL=Time.
62286 RES 5,(HL) Reset bits 5 and 6 of *HL.
62288 RES 6,(HL)
62290 LD HL,(55387) HL=*TimeBar_CurrentPosition.
UpdateTimeBar_Loop 62293 LD C,4 Set a pixel counter in C for the height of each segment.
62295 PUSH HL Stash the current screen position on the stack.
Handler_TimeBar_0 62296 SCF Set the carry flag (prepare for the right rotation).
62297 RR (HL) Rotate *HL right one position.
62299 JP C,Handler_TimeBar_2 If the carry flag is set after the rotation, move to the next column - jump to Handler_TimeBar_2.
62302 INC H Increment H by one.
62303 DEC C Decrease the pixel counter by one.
62304 JP NZ,Handler_TimeBar_0 Jump to Handler_TimeBar_0 until the full height of the bar has been drawn.
62307 LD A,B H=B+30.
62308 ADD A,30
62310 LD H,A
62311 LD L,20 L=20.
62313 LD A,5 A=5.
Handler_TimeBar_1 62315 XOR %00010000 Flip bit 4.
62317 OUT (254),A Send to the speaker.
62319 LD D,H Load the pitch delay counter into D.
TimeBar_PitchDelay 62320 DEC D Decrease the pitch delay counter by one.
62321 JP NZ,TimeBar_PitchDelay Jump back to TimeBar_PitchDelay until the pitch delay counter is zero.
62324 DEC L Decrease L by one.
62325 JP NZ,Handler_TimeBar_1 Jump to Handler_TimeBar_1 until L is zero.
62328 POP HL Restore HL from the stack.
62329 DJNZ UpdateTimeBar_Loop Decrease counter by one and loop back to UpdateTimeBar_Loop until counter is zero.
62331 RET Return.
Handler_TimeBar_2 62332 POP HL Restore HL from the stack.
62333 LD A,(55390) A=*TimeBar_Length.
62336 CP 20 Return if A is greater than or equal to 20.
62338 RET P
62339 INC A Increment A by one.
62340 LD (55390),A Write A to *TimeBar_Length.
62343 INC HL Increment HL by one.
62344 LD (55387),HL Write HL to *TimeBar_CurrentPosition.
62347 PUSH HL Stash HL on the stack.
62348 JP Handler_TimeBar_0 Jump to Handler_TimeBar_0.
Prev: 62238 Up: Map Next: 62351