aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-02-12 08:47:15 -0500
committerClyne Sullivan <tullivan99@gmail.com>2016-02-12 08:47:15 -0500
commitba7df965e73e121820f20e3a0e57631d078c11db (patch)
tree75f09a352be19c369f7bd02e279a275322634d67 /main.cpp
parent3033594b89f23e65b6152daa6610f991307f2f67 (diff)
more saving/loading
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/main.cpp b/main.cpp
index da1790f..19fe8d4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -200,8 +200,6 @@ int main(/*int argc, char *argv[]*/){
gameRunning=false;
- readConfig();
-
/**
* (Attempt to) Initialize SDL libraries so that we can use SDL facilities and eventually
* make openGL calls. Exit if there was an error.
@@ -241,6 +239,12 @@ int main(/*int argc, char *argv[]*/){
// Run Mix_Quit when main returns
atexit(Mix_Quit);
+ /**
+ * Load saved settings into the game (see config/settings.xml)
+ */
+
+ readConfig();
+
/*
* Create a window for SDL to draw to. Most parameters are the default, except for the
* following which are defined in include/common.h:
@@ -382,6 +386,7 @@ int main(/*int argc, char *argv[]*/){
*/
fadeIntensity = 250;
+
initEverything();
if(!currentWorld){
@@ -570,7 +575,7 @@ void render(){
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
- glOrtho((offset.x-SCREEN_WIDTH/2),(offset.x+SCREEN_WIDTH/2),offset.y-SCREEN_HEIGHT/2,offset.y+SCREEN_HEIGHT/2,-1,1);
+ glOrtho(floor(offset.x-SCREEN_WIDTH/2),floor(offset.x+SCREEN_WIDTH/2),floor(offset.y-SCREEN_HEIGHT/2),floor(offset.y+SCREEN_HEIGHT/2),-1,1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
@@ -729,7 +734,7 @@ void render(){
SDL_GL_SwapWindow(window);
}
-static volatile bool objectInteracting = false;
+static bool objectInteracting = false;
void logic(){