Routines |
Prev: A3A4 | Up: Map | Next: A41E |
Used by the routine at DrawCurrentOpponent.
|
||||
Messaging_PrintPlayerCurrentTotal | A3C3 | CALL PrintString_Loop | Call PrintString_Loop. | |
A3C6 | DEFB $16,$13,$01 | PRINT AT: 13, 01. | ||
A3C9 | DEFM "PLAYER" | |||
A3CF | DEFB $FF | Terminator. | ||
Who is currently playing?
|
||||
A3D0 | LD A,($9AB8) | Jump to PrintPlayerTwo_CurrentTotal if *ActivePlayer is player two. | ||
A3D3 | AND A | |||
A3D4 | JR Z,PrintPlayerTwo_CurrentTotal | |||
Handle 1UP:
|
||||
A3D6 | CALL PrintString_Loop | Call PrintString_Loop. | ||
A3D9 | DEFB $16,$14,$03 | PRINT AT: 14, 03. | ||
A3DC | DEFM "ONE" | |||
A3DF | DEFB $FF | Terminator. | ||
A3E0 | LD HL,($9AB2) | HL=*1UP_Total. | ||
A3E3 | LD DE,$ACF6 | DE=Current_Total. | ||
A3E6 | CALL $AEF0 | Call AEF0. | ||
A3E9 | LD HL,$ACF6 | HL=Current_Total. | ||
A3EC | CALL PrintCurrentTotal | Call PrintCurrentTotal. | ||
A3EF | CALL FlashCurrentTotal | Call FlashCurrentTotal. | ||
A3F2 | RET | Return. | ||
Handle 2UP:
|
||||
PrintPlayerTwo_CurrentTotal | A3F3 | CALL PrintString_Loop | Call PrintString_Loop. | |
A3F6 | DEFB $16,$14,$03 | PRINT AT: 14, 03. | ||
A3F9 | DEFM "TWO" | |||
A3FC | DEFB $FF | Terminator. | ||
A3FD | LD HL,($9AB0) | HL=*2UP_Total. | ||
A400 | LD DE,$ACF6 | DE=Current_Total. | ||
A403 | CALL $AEF0 | Call AEF0. | ||
A406 | LD HL,$ACF6 | HL=Current_Total. | ||
A409 | CALL PrintCurrentTotal | Call PrintCurrentTotal. | ||
A40C | CALL FlashCurrentTotal | Call FlashCurrentTotal. | ||
A40F | RET | Return. | ||
Convert the total to a printable string, and display it.
|
||||
PrintCurrentTotal | A410 | LD B,$03 | Set a counter in B for the 03 digits of a total value. | |
PrintCurrentTotal_Loop | A412 | LD A,(HL) | A=*HL. | |
A413 | CP $20 | Jump to PrintCurrentTotal_Next if A is an ASCII "space" (20). | ||
A415 | JR Z,PrintCurrentTotal_Next | |||
A417 | ADD A,$30 | Add 30 (ASCII "0") to A to "convert" it to ASCII. | ||
A419 | LD (HL),A | Write A to *HL. | ||
PrintCurrentTotal_Next | A41A | INC HL | Increment HL by one. | |
A41B | DJNZ PrintCurrentTotal_Loop | Decrease counter by one and loop back to PrintCurrentTotal_Loop until counter is zero. | ||
A41D | RET | Return. |
Prev: A3A4 | Up: Map | Next: A41E |