Advertisement
Guest User

REDRIVER

a guest
Nov 16th, 2020
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 6.04 KB | None | 0 0
  1. diff --git a/src_rebuild/EMULATOR/EMULATOR_TIMER.C b/src_rebuild/EMULATOR/EMULATOR_TIMER.C
  2. index ca4f038..b98541e 100644
  3. --- a/src_rebuild/EMULATOR/EMULATOR_TIMER.C
  4. +++ b/src_rebuild/EMULATOR/EMULATOR_TIMER.C
  5. @@ -1,4 +1,3 @@
  6. -#include <windows.h>
  7.  #include "EMULATOR_TIMER.H"
  8.  
  9.  void Emulator_InitHPCTimer(timerCtx_t* timer)
  10. @@ -6,7 +5,7 @@ void Emulator_InitHPCTimer(timerCtx_t* timer)
  11.  #ifdef _WIN32
  12.     QueryPerformanceFrequency(&timer->performanceFrequency);
  13.  #else
  14. -   gettimeofday(&timer.timeStart, NULL);
  15. +   gettimeofday(&timer->timeStart, NULL);
  16.  #endif // _WIN32
  17.  
  18.  }
  19. @@ -27,11 +26,11 @@ double Emulator_GetHPCTime(timerCtx_t* timer, int reset)
  20.  
  21.     gettimeofday(&curr, NULL);
  22.  
  23. -   double value = (float(curr.tv_sec - timer->timeStart.tv_sec) + 0.000001f * float(curr.tv_usec - timer.timeStart->tv_usec));
  24. +   double value = (float(curr.tv_sec - timer->timeStart.tv_sec) + 0.000001f * float(curr.tv_usec - timer->timeStart.tv_usec));
  25.  
  26.     if (reset)
  27.         timer->timeStart = curr;
  28.  #endif // _WIN32
  29.  
  30.     return value;
  31. -}
  32. \ No newline at end of file
  33. +}
  34. diff --git a/src_rebuild/EMULATOR/EMULATOR_TIMER.H b/src_rebuild/EMULATOR/EMULATOR_TIMER.H
  35. index 6e037af..84a5d0a 100644
  36. --- a/src_rebuild/EMULATOR/EMULATOR_TIMER.H
  37. +++ b/src_rebuild/EMULATOR/EMULATOR_TIMER.H
  38. @@ -3,9 +3,11 @@
  39.  
  40.  #ifdef _WIN32
  41.  #include <profileapi.h>
  42. +#include <windows.h>
  43.  #else
  44.  #include <sys/time.h>
  45.  #endif
  46. +#include <cstddef>
  47.  
  48.  struct timerCtx_t
  49.  {
  50. @@ -21,4 +23,4 @@ struct timerCtx_t
  51.  extern void Emulator_InitHPCTimer(timerCtx_t* timer);
  52.  extern double Emulator_GetHPCTime(timerCtx_t* timer, int reset = 0);
  53.  
  54. -#endif // EMULATOR_TIMER_H
  55. \ No newline at end of file
  56. +#endif // EMULATOR_TIMER_H
  57. diff --git a/src_rebuild/EMULATOR/RAND.H b/src_rebuild/EMULATOR/RAND.H
  58. index 606d868..daca7a6 100644
  59. --- a/src_rebuild/EMULATOR/RAND.H
  60. +++ b/src_rebuild/EMULATOR/RAND.H
  61. @@ -1,6 +1,7 @@
  62.  #ifndef RAND_H
  63.  #define RAND_H
  64.  
  65. +#include <stdint.h>
  66.  #include <stdlib.h>
  67.  
  68. -#endif
  69. \ No newline at end of file
  70. +#endif
  71. diff --git a/src_rebuild/EMULATOR/glad.h b/src_rebuild/EMULATOR/glad.h
  72. index a78710e..deff3c3 100644
  73. --- a/src_rebuild/EMULATOR/glad.h
  74. +++ b/src_rebuild/EMULATOR/glad.h
  75. @@ -53,6 +53,7 @@
  76.  #define GLAPIENTRY APIENTRY
  77.  #endif
  78.  #include <stdint.h>
  79. +#include <stddef.h>
  80.  
  81.  #ifdef __cplusplus
  82.  extern "C" {
  83. diff --git a/src_rebuild/GAME/C/GAMESND.C b/src_rebuild/GAME/C/GAMESND.C
  84. index 077aeee..ab5cf61 100644
  85. --- a/src_rebuild/GAME/C/GAMESND.C
  86. +++ b/src_rebuild/GAME/C/GAMESND.C
  87. @@ -25,6 +25,7 @@
  88.  #include "SKY.H"
  89.  #include "DEBRIS.H"
  90.  
  91. +#include <stdint.h>
  92.  #include <math.h>
  93.  
  94.  #include "FELONY.H"
  95. diff --git a/src_rebuild/GAME/C/LOADSAVE.C b/src_rebuild/GAME/C/LOADSAVE.C
  96. index 5ce8018..ecb2207 100644
  97. --- a/src_rebuild/GAME/C/LOADSAVE.C
  98. +++ b/src_rebuild/GAME/C/LOADSAVE.C
  99. @@ -17,6 +17,7 @@
  100.  #include "PAUSE.H"
  101.  
  102.  #ifndef PSX
  103. +#include <stdint.h>
  104.  #include <stdlib.h>
  105.  
  106.  #include <PLATFORM.H>
  107. diff --git a/src_rebuild/GAME/C/MISSION.C b/src_rebuild/GAME/C/MISSION.C
  108. index fb7761f..749a8ca 100644
  109. --- a/src_rebuild/GAME/C/MISSION.C
  110. +++ b/src_rebuild/GAME/C/MISSION.C
  111. @@ -26,8 +26,10 @@
  112.  #include "DENTING.H"
  113.  #include "LOADSAVE.H"
  114.  
  115. +#include <stdint.h>
  116.  #include <string.h>
  117.  
  118. +
  119.  #ifndef PSX
  120.  #include <SDL.h>
  121.  #endif // PSX
  122. diff --git a/src_rebuild/GAME/C/PATHFIND.C b/src_rebuild/GAME/C/PATHFIND.C
  123. index 11444c3..fff2ea3 100644
  124. --- a/src_rebuild/GAME/C/PATHFIND.C
  125. +++ b/src_rebuild/GAME/C/PATHFIND.C
  126. @@ -8,6 +8,7 @@
  127.  #include "CARS.H"
  128.  #include "CAMERA.H"
  129.  
  130. +#include <stdint.h>
  131.  #include "SDL.h"
  132.  
  133.  ushort distanceCache[16384];
  134. diff --git a/src_rebuild/GAME/C/SPOOL.C b/src_rebuild/GAME/C/SPOOL.C
  135. index e1c14d1..f705592 100644
  136. --- a/src_rebuild/GAME/C/SPOOL.C
  137. +++ b/src_rebuild/GAME/C/SPOOL.C
  138. @@ -1,6 +1,7 @@
  139.  #include "DRIVER2.H"
  140.  
  141.  #ifndef PSX
  142. +#include <stdint.h>
  143.  #include <SDL.h>
  144.  #endif // !PSX
  145.  
  146. diff --git a/src_rebuild/GAME/C/SPOOL.H b/src_rebuild/GAME/C/SPOOL.H
  147. index 6153861..6779d71 100644
  148. --- a/src_rebuild/GAME/C/SPOOL.H
  149. +++ b/src_rebuild/GAME/C/SPOOL.H
  150. @@ -1,6 +1,7 @@
  151.  #ifndef SPOOL_H
  152.  #define SPOOL_H
  153.  
  154. +#include <stdint.h>
  155.  extern int cell_objects_add[5];
  156.  extern int cell_slots_add[5];
  157.  
  158. diff --git a/src_rebuild/GAME/C/SYSTEM.C b/src_rebuild/GAME/C/SYSTEM.C
  159. index df763ae..6b8710a 100644
  160. --- a/src_rebuild/GAME/C/SYSTEM.C
  161. +++ b/src_rebuild/GAME/C/SYSTEM.C
  162. @@ -1,6 +1,7 @@
  163.  #include "DRIVER2.H"
  164.  
  165.  #ifndef PSX
  166. +#include <stdint.h>
  167.  #include <SDL.h>
  168.  #endif // !PSX
  169.  
  170. @@ -14,6 +15,7 @@
  171.  #include "MAIN.H"
  172.  #include "PAD.H"
  173.  #include "DRAW.H"
  174. +#include "PLATFORM.H"
  175.  #include <string.h>
  176.  
  177.  // Initialized in redriver2_main
  178. diff --git a/src_rebuild/premake5.lua b/src_rebuild/premake5.lua
  179. index 77dad01..0cc180f 100644
  180. --- a/src_rebuild/premake5.lua
  181. +++ b/src_rebuild/premake5.lua
  182. @@ -131,6 +131,7 @@ project "REDRIVER2"
  183.              "GL",
  184.              "openal",
  185.              "SDL2",
  186. +       "dl",
  187.          }
  188.  
  189.          linkoptions {
  190. @@ -173,4 +174,4 @@ project "REDRIVER2"
  191.              "COLLISION_DEBUG",
  192.             "CUTSCENE_RECORDER"
  193.          }
  194. -        optimize "Full"
  195. \ No newline at end of file
  196. +        optimize "Full"
  197. diff --git a/src_rebuild/utils/audio_source/snd_wav_source.cpp b/src_rebuild/utils/audio_source/snd_wav_source.cpp
  198. index 70a2363..9e51e89 100644
  199. --- a/src_rebuild/utils/audio_source/snd_wav_source.cpp
  200. +++ b/src_rebuild/utils/audio_source/snd_wav_source.cpp
  201. @@ -1,4 +1,5 @@
  202.  #include "snd_wav_source.h"
  203. +#include <stdint.h>
  204.  #include <stdio.h>
  205.  #include <string.h>
  206.  #include <stdlib.h>
  207. diff --git a/src_rebuild/utils/ini.h b/src_rebuild/utils/ini.h
  208. index cd6af9f..19684bb 100644
  209. --- a/src_rebuild/utils/ini.h
  210. +++ b/src_rebuild/utils/ini.h
  211. @@ -10,6 +10,10 @@
  212.  
  213.  #define INI_VERSION "0.1.1"
  214.  
  215. +#ifdef __cplusplus
  216. +extern "C" {
  217. +#endif
  218. +
  219.  typedef struct ini_t ini_t;
  220.  
  221.  ini_t*      ini_load(const char *filename);
  222. @@ -18,3 +22,7 @@ const char* ini_get(ini_t *ini, const char *section, const char *key);
  223.  int         ini_sget(ini_t *ini, const char *section, const char *key, const char *scanfmt, void *dst);
  224.  
  225.  #endif
  226. +
  227. +#ifdef __cplusplus
  228. +}
  229. +#endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement