aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-02-19 18:33:29 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-02-19 18:33:29 -0500
commit0075f9e7997d01fa2105bff38e40a3d5b8b421e6 (patch)
treec2e9bbbced1ac97cbcfd81930905aec50325dc64 /main.cpp
parent2a4a514b654ef0e08134a116c658d49a8f16cfe7 (diff)
Village work
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/main.cpp b/main.cpp
index da1790f..eb53c99 100644
--- a/main.cpp
+++ b/main.cpp
@@ -237,6 +237,7 @@ int main(/*int argc, char *argv[]*/){
return -1;
}
Mix_AllocateChannels(8);
+ updateConfig();
// Run Mix_Quit when main returns
atexit(Mix_Quit);
@@ -373,8 +374,6 @@ int main(/*int argc, char *argv[]*/){
delete[] shaderSource;
glEnable(GL_MULTISAMPLE);
-
- Mix_Volume(0,VOLUME_MASTER);
/*
* Create all the worlds, entities, mobs, and the player. This function is defined in
@@ -524,7 +523,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)
@@ -570,7 +569,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((offset.x-SCREEN_WIDTH/2),(offset.x+SCREEN_WIDTH/2),(offset.y-SCREEN_HEIGHT/2),(offset.y+SCREEN_HEIGHT/2),-1,1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
@@ -892,7 +891,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++){
@@ -917,7 +916,7 @@ void logic(){
break;
default: break;
}
- }
+ }*/
/*
* Switch between day and night (SUNNY and DARK) if necessary.