aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index 805fa00..ecff5c6 100644
--- a/main.cpp
+++ b/main.cpp
@@ -235,6 +235,7 @@ int main(/*int argc, char *argv[]*/){
return -1;
}
Mix_AllocateChannels(8);
+ updateConfig();
// Run Mix_Quit when main returns
atexit(Mix_Quit);
@@ -527,7 +528,7 @@ void render(){
if(player->loc.x - SCREEN_WIDTH/2 < currentWorld->getTheWidth() * -0.5f)
offset.x = ((currentWorld->getTheWidth() * -0.5f) + SCREEN_WIDTH / 2) + player->width / 2;
if(player->loc.x + player->width + SCREEN_WIDTH/2 > currentWorld->getTheWidth() * 0.5f)
- offset.x = ((currentWorld->getTheWidth() * 0.5f) - SCREEN_WIDTH / 2);// + player->width / 2;
+ offset.x = ((currentWorld->getTheWidth() * 0.5f) - SCREEN_WIDTH / 2) - player->width / 2;
}
if(player->loc.y > SCREEN_HEIGHT/2)
@@ -573,6 +574,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();
@@ -895,7 +897,7 @@ void logic(){
}
}
}
- for(auto &b : currentWorld->build){
+ /*for(auto &b : currentWorld->build){
switch(b->bsubtype){
case FOUNTAIN:
for(int r = 0; r < (rand()%25)+10;r++){
@@ -920,7 +922,7 @@ void logic(){
break;
default: break;
}
- }
+ }*/
/*
* Switch between day and night (SUNNY and DARK) if necessary.