Prev: 56951 Up: Map Next: 57028
56989: Show Player Number
Used by the routines at SwitchPlayer and RunGame.
Clears the screen and prints the number of the player, which is the text at PlayerNumberText, and if the player has no lives left plays the tune at GameOverTune. Then waits for a short time.
show-player-number
ShowPlayerNumber 56989 CALL ClearScreen Call ClearScreen.
56992 CALL ResetAttributes Call ResetAttributes.
This entry point is used by the routine at RunGame.
ShowPlayerNumber_Print 56995 LD A,(57053) Read the byte at CurrentPlayer.
56998 INC A Advance A.
56999 LD (57039),A Write A at 57039.
57002 LD DE,57028 Point DE at PlayerNumberText.
57005 CALL PrintText Call PrintText.
57008 LD DE,57297 Point DE at GameOverTune.
57011 LD A,(57054) Read the byte at Lives.
57014 AND A See whether A is zero.
57015 CALL Z,PlayMusic Call PlayMusic if the zero flag is set.
57018 LD B,8 B is 8.
ShowPlayerNumber_Loop 57020 LD D,0 D is 0.
57022 CALL Delay Call Delay.
57025 DJNZ ShowPlayerNumber_Loop Repeat from 57020 while B still counts.
57027 RET Return.
Prev: 56951 Up: Map Next: 57028