- fixed compilation.

This commit is contained in:
Christoph Oelckers 2019-10-21 19:36:54 +02:00
parent 8c7590e161
commit 72b87e5bd7
4 changed files with 9 additions and 24 deletions

View file

@ -26,6 +26,6 @@ BEGIN_BLD_NS
void credLogosDos(void); void credLogosDos(void);
void credReset(void); void credReset(void);
FileReader credPlaySmk(const char *pzSMK, const char *pzWAV, int nWAV); void credPlaySmk(const char *pzSMK, const char *pzWAV, int nWAV);
END_BLD_NS END_BLD_NS

View file

@ -87,7 +87,6 @@ CDemo::CDemo()
at0 = 0; at0 = 0;
at1 = 0; at1 = 0;
at3 = 0; at3 = 0;
hPFile = -1;
hRFile = NULL; hRFile = NULL;
atb = 0; atb = 0;
pFirstDemo = NULL; pFirstDemo = NULL;
@ -105,11 +104,6 @@ CDemo::~CDemo()
at3 = 0; at3 = 0;
atb = 0; atb = 0;
memset(&atf, 0, sizeof(atf)); memset(&atf, 0, sizeof(atf));
if (hPFile >= 0)
{
kclose(hPFile);
hPFile = -1;
}
if (hRFile != NULL) if (hRFile != NULL)
{ {
fclose(hRFile); fclose(hRFile);
@ -199,10 +193,9 @@ void CDemo::Close(void)
fwrite(&atf, sizeof(DEMOHEADER), 1, hRFile); fwrite(&atf, sizeof(DEMOHEADER), 1, hRFile);
fwrite(&m_gameOptions, sizeof(GAMEOPTIONS), 1, hRFile); fwrite(&m_gameOptions, sizeof(GAMEOPTIONS), 1, hRFile);
} }
if (hPFile >= 0) if (hPFile.isOpen())
{ {
kclose(hPFile); hPFile.Close();
hPFile = -1;
} }
if (hRFile != NULL) if (hRFile != NULL)
{ {

View file

@ -2798,7 +2798,7 @@ static int32_t defsparser(scriptfile *script)
break; break;
} }
if (palookupbuf >= 256*32) if (palookupbuf.Size() >= 256*32)
{ {
didLoadShade = 1; didLoadShade = 1;
numshades = 32; numshades = 32;
@ -2813,7 +2813,7 @@ static int32_t defsparser(scriptfile *script)
break; break;
} }
paletteMakeLookupTable(id, palookupbuf, 0,0,0, g_noFloorPal[id]); paletteMakeLookupTable(id, (char*)palookupbuf.Data(), 0,0,0, g_noFloorPal[id]);
} }
break; break;
} }
@ -3091,7 +3091,7 @@ static int32_t defsparser(scriptfile *script)
break; break;
} }
paletteSetBlendTable(id, blendbuf); paletteSetBlendTable(id, (char*)blendbuf.Data());
didLoadTransluc = 1; didLoadTransluc = 1;
break; break;
} }

View file

@ -8141,15 +8141,7 @@ int32_t enginePreInit(void)
// //
int32_t engineInit(void) int32_t engineInit(void)
{ {
int32_t i, j; int32_t i;
#if !defined _WIN32 && defined DEBUGGINGAIDS && !defined GEKKO
struct sigaction sigact, oldact;
memset(&sigact, 0, sizeof(sigact));
sigact.sa_sigaction = &sighandler;
sigact.sa_flags = SA_SIGINFO;
sigaction(SIGFPE, &sigact, &oldact);
#endif
if (!preinitcalled) if (!preinitcalled)
{ {
@ -10585,7 +10577,7 @@ int32_t qloadkvx(int32_t voxindex, const char *filename)
voxelmemory.Reserve(1); voxelmemory.Reserve(1);
voxelmemory.Last() = fil.Read(dasiz); voxelmemory.Last() = fil.Read(dasiz);
voxoff[voxindex][i] = (intptr)voxelmemoty.Last().Data(); voxoff[voxindex][i] = (intptr_t)voxelmemory.Last().Data();
lengcnt += dasiz+4; lengcnt += dasiz+4;
if (lengcnt >= lengtot-768) if (lengcnt >= lengtot-768)