Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src_rebuild/EMULATOR/EMULATOR_TIMER.C b/src_rebuild/EMULATOR/EMULATOR_TIMER.C
- index ca4f038..b98541e 100644
- --- a/src_rebuild/EMULATOR/EMULATOR_TIMER.C
- +++ b/src_rebuild/EMULATOR/EMULATOR_TIMER.C
- @@ -1,4 +1,3 @@
- -#include <windows.h>
- #include "EMULATOR_TIMER.H"
- void Emulator_InitHPCTimer(timerCtx_t* timer)
- @@ -6,7 +5,7 @@ void Emulator_InitHPCTimer(timerCtx_t* timer)
- #ifdef _WIN32
- QueryPerformanceFrequency(&timer->performanceFrequency);
- #else
- - gettimeofday(&timer.timeStart, NULL);
- + gettimeofday(&timer->timeStart, NULL);
- #endif // _WIN32
- }
- @@ -27,11 +26,11 @@ 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;
- #endif // _WIN32
- return value;
- -}
- \ No newline at end of file
- +}
- diff --git a/src_rebuild/EMULATOR/EMULATOR_TIMER.H b/src_rebuild/EMULATOR/EMULATOR_TIMER.H
- index 6e037af..84a5d0a 100644
- --- a/src_rebuild/EMULATOR/EMULATOR_TIMER.H
- +++ b/src_rebuild/EMULATOR/EMULATOR_TIMER.H
- @@ -3,9 +3,11 @@
- #ifdef _WIN32
- #include <profileapi.h>
- +#include <windows.h>
- #else
- #include <sys/time.h>
- #endif
- +#include <cstddef>
- struct timerCtx_t
- {
- @@ -21,4 +23,4 @@ struct timerCtx_t
- extern void Emulator_InitHPCTimer(timerCtx_t* timer);
- extern double Emulator_GetHPCTime(timerCtx_t* timer, int reset = 0);
- -#endif // EMULATOR_TIMER_H
- \ No newline at end of file
- +#endif // EMULATOR_TIMER_H
- diff --git a/src_rebuild/EMULATOR/RAND.H b/src_rebuild/EMULATOR/RAND.H
- index 606d868..daca7a6 100644
- --- a/src_rebuild/EMULATOR/RAND.H
- +++ b/src_rebuild/EMULATOR/RAND.H
- @@ -1,6 +1,7 @@
- #ifndef RAND_H
- #define RAND_H
- +#include <stdint.h>
- #include <stdlib.h>
- -#endif
- \ No newline at end of file
- +#endif
- diff --git a/src_rebuild/EMULATOR/glad.h b/src_rebuild/EMULATOR/glad.h
- index a78710e..deff3c3 100644
- --- a/src_rebuild/EMULATOR/glad.h
- +++ b/src_rebuild/EMULATOR/glad.h
- @@ -53,6 +53,7 @@
- #define GLAPIENTRY APIENTRY
- #endif
- #include <stdint.h>
- +#include <stddef.h>
- #ifdef __cplusplus
- extern "C" {
- diff --git a/src_rebuild/GAME/C/GAMESND.C b/src_rebuild/GAME/C/GAMESND.C
- index 077aeee..ab5cf61 100644
- --- a/src_rebuild/GAME/C/GAMESND.C
- +++ b/src_rebuild/GAME/C/GAMESND.C
- @@ -25,6 +25,7 @@
- #include "SKY.H"
- #include "DEBRIS.H"
- +#include <stdint.h>
- #include <math.h>
- #include "FELONY.H"
- diff --git a/src_rebuild/GAME/C/LOADSAVE.C b/src_rebuild/GAME/C/LOADSAVE.C
- index 5ce8018..ecb2207 100644
- --- a/src_rebuild/GAME/C/LOADSAVE.C
- +++ b/src_rebuild/GAME/C/LOADSAVE.C
- @@ -17,6 +17,7 @@
- #include "PAUSE.H"
- #ifndef PSX
- +#include <stdint.h>
- #include <stdlib.h>
- #include <PLATFORM.H>
- diff --git a/src_rebuild/GAME/C/MISSION.C b/src_rebuild/GAME/C/MISSION.C
- index fb7761f..749a8ca 100644
- --- a/src_rebuild/GAME/C/MISSION.C
- +++ b/src_rebuild/GAME/C/MISSION.C
- @@ -26,8 +26,10 @@
- #include "DENTING.H"
- #include "LOADSAVE.H"
- +#include <stdint.h>
- #include <string.h>
- +
- #ifndef PSX
- #include <SDL.h>
- #endif // PSX
- diff --git a/src_rebuild/GAME/C/PATHFIND.C b/src_rebuild/GAME/C/PATHFIND.C
- index 11444c3..fff2ea3 100644
- --- a/src_rebuild/GAME/C/PATHFIND.C
- +++ b/src_rebuild/GAME/C/PATHFIND.C
- @@ -8,6 +8,7 @@
- #include "CARS.H"
- #include "CAMERA.H"
- +#include <stdint.h>
- #include "SDL.h"
- ushort distanceCache[16384];
- diff --git a/src_rebuild/GAME/C/SPOOL.C b/src_rebuild/GAME/C/SPOOL.C
- index e1c14d1..f705592 100644
- --- a/src_rebuild/GAME/C/SPOOL.C
- +++ b/src_rebuild/GAME/C/SPOOL.C
- @@ -1,6 +1,7 @@
- #include "DRIVER2.H"
- #ifndef PSX
- +#include <stdint.h>
- #include <SDL.h>
- #endif // !PSX
- diff --git a/src_rebuild/GAME/C/SPOOL.H b/src_rebuild/GAME/C/SPOOL.H
- index 6153861..6779d71 100644
- --- a/src_rebuild/GAME/C/SPOOL.H
- +++ b/src_rebuild/GAME/C/SPOOL.H
- @@ -1,6 +1,7 @@
- #ifndef SPOOL_H
- #define SPOOL_H
- +#include <stdint.h>
- extern int cell_objects_add[5];
- extern int cell_slots_add[5];
- diff --git a/src_rebuild/GAME/C/SYSTEM.C b/src_rebuild/GAME/C/SYSTEM.C
- index df763ae..6b8710a 100644
- --- a/src_rebuild/GAME/C/SYSTEM.C
- +++ b/src_rebuild/GAME/C/SYSTEM.C
- @@ -1,6 +1,7 @@
- #include "DRIVER2.H"
- #ifndef PSX
- +#include <stdint.h>
- #include <SDL.h>
- #endif // !PSX
- @@ -14,6 +15,7 @@
- #include "MAIN.H"
- #include "PAD.H"
- #include "DRAW.H"
- +#include "PLATFORM.H"
- #include <string.h>
- // Initialized in redriver2_main
- diff --git a/src_rebuild/premake5.lua b/src_rebuild/premake5.lua
- index 77dad01..0cc180f 100644
- --- a/src_rebuild/premake5.lua
- +++ b/src_rebuild/premake5.lua
- @@ -131,6 +131,7 @@ project "REDRIVER2"
- "GL",
- "openal",
- "SDL2",
- + "dl",
- }
- linkoptions {
- @@ -173,4 +174,4 @@ project "REDRIVER2"
- "COLLISION_DEBUG",
- "CUTSCENE_RECORDER"
- }
- - optimize "Full"
- \ No newline at end of file
- + optimize "Full"
- diff --git a/src_rebuild/utils/audio_source/snd_wav_source.cpp b/src_rebuild/utils/audio_source/snd_wav_source.cpp
- index 70a2363..9e51e89 100644
- --- a/src_rebuild/utils/audio_source/snd_wav_source.cpp
- +++ b/src_rebuild/utils/audio_source/snd_wav_source.cpp
- @@ -1,4 +1,5 @@
- #include "snd_wav_source.h"
- +#include <stdint.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- diff --git a/src_rebuild/utils/ini.h b/src_rebuild/utils/ini.h
- index cd6af9f..19684bb 100644
- --- a/src_rebuild/utils/ini.h
- +++ b/src_rebuild/utils/ini.h
- @@ -10,6 +10,10 @@
- #define INI_VERSION "0.1.1"
- +#ifdef __cplusplus
- +extern "C" {
- +#endif
- +
- typedef struct ini_t ini_t;
- ini_t* ini_load(const char *filename);
- @@ -18,3 +22,7 @@ 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);
- #endif
- +
- +#ifdef __cplusplus
- +}
- +#endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement