mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2025-09-07 16:50:15 +02:00
Made it compile with GCC on Linux.
Fixed GCC warnings and Windows specifics. Restored C++11, switch to 14 was not supposed to happen. Not 100% sure about my Find* module section.
This commit is contained in:
parent
2fe6d6d33a
commit
28e2417ef9
33 changed files with 523 additions and 190 deletions
|
@ -15,11 +15,10 @@ datFileStruct* partman::load_records(LPCSTR lpFileName, int resolution, bool ful
|
|||
dat8BitBmpHeader bmpHeader{};
|
||||
dat16BitBmpHeader zMapHeader{};
|
||||
|
||||
FILE* fileHandle;
|
||||
fopen_s(&fileHandle, lpFileName, "rb");
|
||||
FILE* fileHandle = fopen(lpFileName, "rb");
|
||||
if (fileHandle == nullptr)
|
||||
return nullptr;
|
||||
fread(&header, 1, sizeof datFileHeader, fileHandle);
|
||||
fread(&header, 1, sizeof header, fileHandle);
|
||||
if (strcmp("PARTOUT(4.0)RESOURCE", header.FileSignature) != 0)
|
||||
{
|
||||
fclose(fileHandle);
|
||||
|
@ -46,7 +45,7 @@ datFileStruct* partman::load_records(LPCSTR lpFileName, int resolution, bool ful
|
|||
memory::free(datFile);
|
||||
return nullptr;
|
||||
}
|
||||
strcpy_s(descriptionBuf, lenOfStr + 1, header.Description);
|
||||
strncpy(descriptionBuf, header.Description, lenOfStr + 1);
|
||||
}
|
||||
|
||||
if (header.Unknown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue