aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-10-07 08:38:50 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-10-07 08:38:50 -0400
commitaad308a8938135a9fd2614f2cf47774918539847 (patch)
tree1e5e7d4ae234157fd5ba2c1f9ef457714a81a843
parent4244e4e535bcc2690e96468c4ac688a8a6002e2e (diff)
parent47be4d4887cd5c53ea9c019ac77b79dc4ed01c6a (diff)
Added walking animation to player
-rw-r--r--main.cpp3
-rw-r--r--out/entities.obin93800 -> 93560 bytes
-rw-r--r--src/entities.cpp4
3 files changed, 2 insertions, 5 deletions
diff --git a/main.cpp b/main.cpp
index c11da6d..5834310 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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
index 2fe8908..db0a4aa 100644
--- a/out/entities.o
+++ b/out/entities.o
Binary files differ
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]);