along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
*/
-
-#ifdef WIN32
-#include <windows.h>
-#endif
+#include <math.h>
+#include <stdio.h>
+#include <string.h>
+#include <fstream>
+#include <iostream>
+#include <zlib.h>
+#include <set>
+#include "gamegl.h"
+#include "MacCompatibility.h"
+#include "Settings.h"
#include "Game.h"
#include "openal_wrapper.h"
+#ifdef WIN32
+#include <windows.h>
+#include <shellapi.h>
+#include "win-res/resource.h"
+#endif
+
extern float multiplier;
extern float sps;
extern float realmultiplier;
extern float slomofreq;
extern bool visibleloading;
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <fstream>
-#include <iostream>
-#include <zlib.h>
-#include <set>
-#include "gamegl.h"
-#include "MacCompatibility.h"
-#include "Settings.h"
-
-#ifdef WIN32
-#include <shellapi.h>
-#include "win-res/resource.h"
-#endif
-
extern SDL_Window *sdlwindow;
using namespace std;
set<pair<int,int>> resolutions;
-bool SetUp ();
-void DoUpdate ();
-
-void CleanUp (void);
-
// statics/globals (internal only) ------------------------------------------
#ifdef _MSC_VER
int kContextWidth;
int kContextHeight;
-bool gDone = false;
-bool gameFocused;
-
static int _argc = 0;
static char **_argv = NULL;
if (!SetUp ())
return 42;
- while (!gDone && !tryquit) {
+ bool gameDone = false;
+ bool gameFocused = true;
+
+ while (!gameDone && !tryquit) {
if (IsFocused()) {
gameFocused = true;
// message pump
while ( SDL_PollEvent( &e ) ) {
if (!sdlEventProc(e)) {
- gDone = true;
+ gameDone = true;
break;
}
}
LOG(e);
MessageBox(g_windowHandle, error.what(), "ERROR", MB_OK | MB_ICONEXCLAMATION);
- }
- CleanUp();
-
- return -1;
+ return -1;
+ }
}