1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2025-09-06 16:30:14 +02:00

Replaced GlobalAlloc with malloc.

WaveMix keeps GlobalAlloc for authenticity.
Fixed float to double casts.
Some cleanup.
This commit is contained in:
Muzychenko Andrey 2021-02-18 12:53:25 +03:00
parent 55984fbb08
commit 98f234fce3
33 changed files with 171 additions and 174 deletions

View file

@ -54,12 +54,12 @@ int high_score::read(high_score_struct* table, int* ptrToSmth)
auto tablePtr = &table[position];
_itoa_s(position, Buffer, 10);
lstrcatA(Buffer, ".Name");
options::get_string(optPath, Buffer, buf1, pinball::WindowName, 32);
options::get_string(optPath, Buffer, buf1, "", 32);
buf1[32] = 0;
lstrcpyA(tablePtr->Name, buf1);
_itoa_s(position, Buffer, 10);
lstrcatA(Buffer, ".Score");
options::get_string(optPath, Buffer, buf1, pinball::WindowName, 300);
options::get_string(optPath, Buffer, buf1, "", 300);
tablePtr->Score = atol(buf1);
for (int i = lstrlenA(tablePtr->Name); --i >= 0; scoreSum += tablePtr->Name[i])
{
@ -68,7 +68,7 @@ int high_score::read(high_score_struct* table, int* ptrToSmth)
}
scramble_number_string(scoreSum, buf1);
options::get_string(optPath, "Verification", buf2, pinball::WindowName, 300);
options::get_string(optPath, "Verification", buf2, "", 300);
if (lstrcmpA(buf1, buf2))
clear_table(table);
memory::free(buf1);