mirror of
https://github.com/nmlgc/ReC98.git
synced 2025-02-26 20:55:09 +00:00

So many things named `score_*`, so many things named `hiscore_*`… Let's go with `scoredat_*`, which clearly indicates that this stuff is saved into a file, while still being only 8 characters. Part of P0063, funded by -Tom-.
12 lines
269 B
C
12 lines
269 B
C
void pascal near scoredat_load(void)
|
|
{
|
|
int byte;
|
|
file_ropen(SCOREDAT_FN);
|
|
file_seek(rank * sizeof(hi), 0);
|
|
file_read(&hi, sizeof(hi));
|
|
for(byte = 0; byte < sizeof(hi.score); byte++) {
|
|
*((unsigned char*)(&hi.score) + byte) -= 0x12;
|
|
}
|
|
file_close();
|
|
}
|