]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Fixed something
authordrumsetmonkey <abelleisle@roadrunner.com>
Mon, 7 Dec 2015 12:38:33 +0000 (07:38 -0500)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Mon, 7 Dec 2015 12:38:33 +0000 (07:38 -0500)
src/entities.cpp
src/inventory.cpp
src/ui.cpp

index f81291999b44584686ee2548eb2aa812f5f59d26..c840b6e60ae60fe9a0823cb93bb3e0bf647d42de 100644 (file)
@@ -205,7 +205,7 @@ void Entity::draw(void){            //draws the entities
        if(type == PLAYERT){
                static int texState = 0;
                static bool up = true;
-               if(loops % (int)((float)2 / (float)speed) == 0){
+               if(loops % (int)((float)4/(float)speed) == 0){
                        if(up){
                                texState+=1;
                                if(texState==2)up=false;
index 7d3bc6d285270c7a10a576322a86d14bcf681c38..f78933436c74359fec80cbb91c1c5dfba35063ee 100644 (file)
@@ -171,7 +171,8 @@ void Inventory::draw(void){
                                                glTexCoord2i(1,1);glVertex2i(r.end.x+(itemWide/2),      r.end.y-(itemWide/2)*((float)item[inv[a].id].height/(float)item[inv[a].id].width));
                                                glTexCoord2i(1,0);glVertex2i(r.end.x+(itemWide/2),      r.end.y+(itemWide/2)*((float)item[inv[a].id].height/(float)item[inv[a].id].width));
                                                glTexCoord2i(0,0);glVertex2i(r.end.x-(itemWide/2),      r.end.y+(itemWide/2)*((float)item[inv[a].id].height/(float)item[inv[a].id].width));
-                                       }                               glEnd();
+                                       }
+                               glEnd();
                                glDisable(GL_TEXTURE_2D);
                                ui::putText(r.end.x-(itemWide/2),r.end.y-(itemWide*.9),"%s",item[inv[a].id].name);
                                ui::putText(r.end.x-(itemWide/2)+(itemWide*.85),r.end.y-(itemWide/2),"%d",inv[a].count);
index c0b50044c366633187ef787bf03898faddc39f78..c59f9ee279664b38a44038e7ad6549c5e675f9d5 100644 (file)
@@ -631,7 +631,7 @@ DONE:
                                                }
                                                break;
                                        case SDLK_LSHIFT:
-                                               player->speed = debug ? 4 : 3;
+                                               player->speed = debug ? 4.0f : 3.0f;
                                                break;
                                        case SDLK_LCTRL:
                                                player->speed = .5;
@@ -672,6 +672,8 @@ DONE:
                                        player->right = false;
                                        break;
                                case SDLK_LSHIFT:
+                                       player->speed = 1;
+                                       break;
                                case SDLK_LCTRL:
                                        player->speed = 1;
                                        break;