using namespace std;
+// Added more evilness needed for MSVC
+#ifdef _MSC_VER
+ #define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)
+ #define snprintf(buf, size, format, ...) _sprintf_p(buf, size, format)
+#endif
+
+
extern float multiplier;
extern XYZ viewer;
extern int environment;
}
// game is not in focus, give CPU time to other apps by waiting for messages instead of 'peeking'
- STUBBED("give up CPU but sniff the event queue");
+ SDL_ActiveEvent evt;
+ SDL_WaitEvent((SDL_Event*)&evt);
+ if (evt.type == SDL_ACTIVEEVENT && evt.gain == 1)
+ gameFocused = true;
+ else if (evt.type == SDL_QUIT)
+ gDone = true;
}
}
printf("Loading config\n");
while(!ipstream.eof()) {
ipstream.getline( setting, sizeof(setting) );
- printf("setting : %s\n",setting);
// skip blank lines
// assume lines starting with spaces are all blank
#include "SDL.h"
#ifdef WIN32
-#include "String.h"
+#include <string.h>
#else
#include <stdio.h>
#include <stdlib.h>