Fix linux compilation

This commit is contained in:
Rosalie Wanders 2020-11-19 16:27:50 +01:00
parent 3a9370499a
commit 8f09f9d61a
13 changed files with 27 additions and 4 deletions

View File

@ -25,6 +25,7 @@
#include "SKY.H"
#include "DEBRIS.H"
#include <stdint.h>
#include <math.h>
#include "FELONY.H"

View File

@ -17,6 +17,7 @@
#include "PAUSE.H"
#ifndef PSX
#include <stdint.h>
#include <stdlib.h>
#include <PLATFORM.H>

View File

@ -29,6 +29,7 @@
#include <string.h>
#ifndef PSX
#include <stdint.h>
#include <SDL.h>
#endif // PSX

View File

@ -8,6 +8,7 @@
#include "CARS.H"
#include "CAMERA.H"
#include <stdint.h>
#include "SDL.h"
ushort distanceCache[16384];

View File

@ -1,6 +1,7 @@
#include "DRIVER2.H"
#ifndef PSX
#include <stdint.h>
#include <SDL.h>
#endif // !PSX

View File

@ -1,12 +1,14 @@
#include "DRIVER2.H"
#ifndef PSX
#include <stdint.h>
#include <SDL.h>
#endif // !PSX
#include "LIBETC.H"
#include "SYSTEM.H"
#include "PLATFORM.H"
#include "XAPLAY.H"
#include "LOADVIEW.H"
#include "MISSION.H"

View File

@ -4729,8 +4729,8 @@ int GameNameScreen(int bSetup)
else
offset = (GameType - 4U) * 8;
strcpy_s(pCurrScreen->buttons[0].Name, GAMEMODE_AREA_NAME(GameLevel, offset, 0));
strcpy_s(pCurrScreen->buttons[1].Name, GAMEMODE_AREA_NAME(GameLevel, offset, 1));
strcpy(pCurrScreen->buttons[0].Name, GAMEMODE_AREA_NAME(GameLevel, offset, 0));
strcpy(pCurrScreen->buttons[1].Name, GAMEMODE_AREA_NAME(GameLevel, offset, 1));
}
return 0;

View File

@ -1,4 +1,8 @@
#ifdef _WIN32
#include <windows.h>
#else
#include <stddef.h>
#endif // _WIN32
#include "EMULATOR_TIMER.H"
void Emulator_InitHPCTimer(timerCtx_t* timer)
@ -6,7 +10,7 @@ void Emulator_InitHPCTimer(timerCtx_t* timer)
#ifdef _WIN32
QueryPerformanceFrequency(&timer->performanceFrequency);
#else
gettimeofday(&timer.timeStart, NULL);
gettimeofday(&timer->timeStart, NULL);
#endif // _WIN32
}
@ -27,7 +31,7 @@ double Emulator_GetHPCTime(timerCtx_t* timer, int reset)
gettimeofday(&curr, NULL);
double value = (float(curr.tv_sec - timer->timeStart.tv_sec) + 0.000001f * float(curr.tv_usec - timer.timeStart->tv_usec));
double value = (float(curr.tv_sec - timer->timeStart.tv_sec) + 0.000001f * float(curr.tv_usec - timer->timeStart.tv_usec));
if (reset)
timer->timeStart = curr;

View File

@ -1,6 +1,7 @@
#ifndef RAND_H
#define RAND_H
#include <stdint.h>
#include <stdlib.h>
#endif

View File

@ -53,6 +53,7 @@
#define GLAPIENTRY APIENTRY
#endif
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {

View File

@ -131,6 +131,7 @@ project "REDRIVER2"
"GL",
"openal",
"SDL2",
"dl",
}
linkoptions {

View File

@ -1,6 +1,7 @@
#include "snd_wav_source.h"
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
//---------------------------------------------------------------------

View File

@ -10,6 +10,10 @@
#define INI_VERSION "0.1.1"
#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
typedef struct ini_t ini_t;
ini_t* ini_load(const char *filename);
@ -17,4 +21,8 @@ void ini_free(ini_t *ini);
const char* ini_get(ini_t *ini, const char *section, const char *key);
int ini_sget(ini_t *ini, const char *section, const char *key, const char *scanfmt, void *dst);
#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif