diff --git a/src/playdate/scoreboards.nim b/src/playdate/scoreboards.nim index 445e60e..b03fb7e 100644 --- a/src/playdate/scoreboards.nim +++ b/src/playdate/scoreboards.nim @@ -77,13 +77,6 @@ proc newPDBoardsList(lastUpdated: uint32, boards: seq[PDBoard]): PDBoardsList = PDBoardsList(lastUpdated: lastUpdated, boards: boards) let emptyPDBoardsList = newPDBoardsList(lastUpdated = 0, boards = @[]) -proc scoreBuilder(score: PDScorePtr): PDScore = - newPDScore( - value = score.value.uint32, - rank = score.rank.uint32, - player = $score.player - ) - proc scoreBuilder(score: PDScoreRaw): PDScore = newPDScore( value = score.value.uint32, @@ -91,6 +84,9 @@ proc scoreBuilder(score: PDScoreRaw): PDScore = player = $score.player ) +proc scoreBuilder(score: PDScorePtr): PDScore = + scoreBuilder(score[]) + proc invokePersonalBestCallback(score: PDScorePtr, errorMessage: ConstChar) {.cdecl, raises: [].} = invokeCallback( callbackSeqs = privatePersonalBestCallbacks,