Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub GameOver0()
- Dim X, XX, Y, Z, ZZ, abortLoop, tempSort
- If HSCheck < numPlayers+1 Then
- Debug.Print "Checking HS, cursor POS: " & cursorPOS
- for y=0 To 4 'Check this score against high scores 0 to 4
- Debug.Print "Player: " & cDbl(playerScore(HSCheck)) & " HS check: " & cDbl(highScores(y))
- if (cDbl(playerScore(HSCheck)) >= cDbl(highScores(y))) Then 'Did player beat this high score? Equalling it will also bump it down a place
- Debug.Print "Score higher than " & y
- ' playMusic "N", "E" 'Only play the music if a player got a high score
- musicplayer "bgout_ne.mp3"
- for z=4 To y+1 Step -1 'Shift scores down one space below new high score
- highScores(z) = highScores(z - 1)
- topPlayers((z * 3) + 0) = topPlayers(((z - 1) * 3) + 0)
- topPlayers((z * 3) + 1) = topPlayers(((z - 1) * 3) + 1)
- topPlayers((z * 3) + 2) = topPlayers(((z - 1) * 3) + 2)
- Next
- for zz = 0 To 4 'Send the newly sorted top 5 scores from RAM to EEPROM
- setHighScore zz, highScores(zz), topPlayers((zz * 3) + 0), topPlayers((zz * 3) + 1), topPlayers((zz * 3) + 2)
- Next
- SaveValue "AMH", "HSPoints" & y, PlayerScore(HSCheck)
- SaveValue "AMH", "HSName" & y, ""
- HSPlace = y
- cursorPos = 0
- initials(0) = 95 'What player has entered (starts as empty spaces)
- initials(1) = 95
- initials(2) = 95
- GotHS = 1
- nameEntry HSCHeck, HSPlace 'Get initials from player, and show which place they got
- Exit For
- Else
- GotHS = 0
- End If
- Next
- End If
- If GotHS = 0 Then
- WaLeftSide1.TimerEnabled = 1
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement