aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-11-06 08:48:46 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-11-06 08:48:46 -0500
commite257d84daee9d474a944588214fbdafed9d9e983 (patch)
treefcbd3d8e7cbaad994c0ab20793b3ae86903b7451 /main.cpp
parentcb55d6e72ae1f48622ffc2a36d7bdb3719355afe (diff)
Fixed some handAngle bugs, and raised the world height
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/main.cpp b/main.cpp
index 90b673d..b3e94c4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -65,6 +65,8 @@ static GLuint bgDay, bgNight, bgMtn, bgTreesFront, bgTreesMid, bgTreesFar;
bool gameRunning;
+float handAngle;
+
/*
* currentWorld - This is a pointer to the current world that the player
* is in. Most drawing/entity handling is done through this
@@ -489,8 +491,6 @@ int main(int argc, char *argv[]){
char *worldBuf;
unsigned int worldSize;
worldBuf=currentWorld->save(&worldSize);
- std::cout<<worldSize<<" "<<(int)worldBuf<<std::endl;
- std::cout<<fwrite(worldBuf,1,worldSize,worldSave)<<std::endl;
if(ferror(worldSave))perror("HEY: ");
fclose(worldSave);
@@ -795,7 +795,6 @@ void render(){
glUseProgramObjectARB(0);
#endif //SHADERS
- float handAngle;
if(player->light){
handAngle = atan((ui::mouse.y - (player->loc.y + player->height/2)) / (ui::mouse.x - player->loc.x + player->width/2))*180/PI;
if(ui::mouse.x < player->loc.x){
@@ -1082,7 +1081,7 @@ void logic(){
if(SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(SDL_BUTTON_RIGHT)){
NPCp(entity[i])->interact();
- //Mix_PlayChannel( -1, horn, 0); // Audio feedback
+ Mix_PlayChannel( -1, horn, 0); // Audio feedback
}
}