What I did to make it compile:
Change the string to string.h
Commented out the mmsystem.h (Too lazy to move it)
Commented out all code that knightly added in simsys_s.cc, and uncommented SDL_GetTicks in dr_time() (Too lazy to place it in an ifdef, as far as I know SDL_GetTicks is good enough on linux/unix, Knightly please correct me if I'm wrong...)
Added path_explorer.cc to SOURCES in Makefile
For reference: complete patch
diff --git a/Makefile b/Makefile
index 0cf09c5..53edd4c 100644
--- a/Makefile
+++ b/Makefile
@@ -307,6 +307,7 @@ SOURCES += simware.cc
SOURCES += simwerkz.cc
SOURCES += simwin.cc
SOURCES += simworld.cc
+SOURCES += path_explorer.cc
SOURCES += sucher/platzsucher.cc
SOURCES += tpl/debug_helper.cc
SOURCES += unicode.cc
diff --git a/path_explorer.h b/path_explorer.h
index 0d55358..9cc0208 100644
--- a/path_explorer.h
+++ b/path_explorer.h
@@ -8,7 +8,7 @@
#ifndef path_explorer_h
#define path_explorer_h
-#include <string>
+#include <string.h>
#include "halthandle_t.h"
#include "convoihandle_t.h"
diff --git a/simsys_s.cc b/simsys_s.cc
index a514ad0..134e2c3 100644
--- a/simsys_s.cc
+++ b/simsys_s.cc
@@ -35,7 +35,8 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
-#include <mmsystem.h>
+//#include <mmsystem.h>
+#define LARGE_INTEGER uint64
#ifndef PATH_MAX
#define PATH_MAX (1024)
@@ -141,7 +142,7 @@ int dr_os_init(const int* parameter)
atexit(SDL_Quit); // clean up on exit
// Added by : Knightly
- if ( umgebung_t::default_einstellungen.get_system_time_option() == 0 )
+ /*if ( umgebung_t::default_einstellungen.get_system_time_option() == 0 )
{
// set precision to 1ms if multimedia timer functions are used
timeBeginPeriod(1);
@@ -156,7 +157,7 @@ int dr_os_init(const int* parameter)
umgebung_t::default_einstellungen.set_system_time_option(0); // reset to using multimedia timer
timeBeginPeriod(1); // set precision to 1ms
}
- }
+ }*/
return TRUE;
}
@@ -261,11 +262,11 @@ int dr_os_close(void)
// SDL_FreeSurface(screen);
// Added by : Knightly
- if ( umgebung_t::default_einstellungen.get_system_time_option() == 0 )
+ /*if ( umgebung_t::default_einstellungen.get_system_time_option() == 0 )
{
// reset precision if multimedia timer functions have been used
timeEndPeriod(1);
- }
+ }*/
return TRUE;
@@ -693,7 +694,7 @@ unsigned long dr_time(void)
{
// Modified by : Knightly
// declare and initialize once
- static LARGE_INTEGER t; // for storing current time in counts
+ /*static LARGE_INTEGER t; // for storing current time in counts
static LARGE_INTEGER f; // for storing performance counter frequency, which is fixed when system is running
static const bool support_performance_counter = ( QueryPerformanceFrequency(&f) != 0 );
@@ -707,10 +708,10 @@ unsigned long dr_time(void)
{
// Case : use multimedia timer functions
return timeGetTime();
- }
+ }*/
// Knightly : this function actually calls timeGetTime()
- // return SDL_GetTicks();
+ return SDL_GetTicks();
}