diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-10-07 08:38:50 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-10-07 08:38:50 -0400 |
commit | aad308a8938135a9fd2614f2cf47774918539847 (patch) | |
tree | 1e5e7d4ae234157fd5ba2c1f9ef457714a81a843 | |
parent | 4244e4e535bcc2690e96468c4ac688a8a6002e2e (diff) | |
parent | 47be4d4887cd5c53ea9c019ac77b79dc4ed01c6a (diff) |
Added walking animation to player
-rw-r--r-- | main.cpp | 3 | ||||
-rw-r--r-- | out/entities.o | bin | 93800 -> 93560 bytes | |||
-rw-r--r-- | src/entities.cpp | 4 |
3 files changed, 2 insertions, 5 deletions
@@ -41,7 +41,7 @@ unsigned int millis(void){ int main(int argc, char *argv[]){ // Initialize SDL - if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0){ + if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0){ std::cout << "SDL was not able to initialize! Error: " << SDL_GetError() << std::endl; return -1; } @@ -235,5 +235,4 @@ void logic(){ } } loops++; - //std::cout << loops << std::endl; } diff --git a/out/entities.o b/out/entities.o Binary files differindex 2fe8908..db0a4aa 100644 --- a/out/entities.o +++ b/out/entities.o diff --git a/src/entities.cpp b/src/entities.cpp index 197bea0..0ca2284 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -53,9 +53,7 @@ void Entity::draw(void){ //draws the entities texState-=1; if(texState==0)up=true; } - } - std::cout << texState << std::endl; - if(vel.x != 0){ + }if(vel.x != 0){ switch(texState){ case 0: glBindTexture(GL_TEXTURE_2D,texture[1]); |