aboutsummaryrefslogtreecommitdiff
path: root/src/score.s
Commit message (Collapse)AuthorAgeFilesLines
* Fix overwrite issues when adding scoresMiquel Sabaté Solà2026-03-281-35/+38
| | | | | | | | | | | | | | | | | | | | | | | The add_to_player() function relied on parameters to be passed on the 'Globals::zp_tmpX' variables, but that's just plain stupid. First, because these memory addresses are not meant for arguments; but most importantly, because callers actually needed some of these values before calling this function. Hence, everything went into chaos and sprites began to act wrongly in all sorts of random ways. Moreover, some of the callers also needed a guarantee on either the 'x' or the 'y' registers. Since this wasn't always feasible, we needed to store/load these registers' values case by case. All in all, now add_to_player() accepts only one argument via the 'y' register (which callers already knew it was going to be messed with). The value on 'y' has to be set via some helper constants. As a cherry on top, this not only fixes a nasty bug, but it also makes things more performant and with less code. Fixes: 63ef73de3bdd ("Update scores on screen") Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Save the high score after game overMiquel Sabaté Solà2026-03-271-0/+96
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Update scores on screenMiquel Sabaté Solà2026-03-251-1/+71
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Add support for adding scoresMiquel Sabaté Solà2026-03-251-0/+159
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>