]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Started inv ui, new item system
authordrumsetmonkey <abelleisle@roadrunner.com>
Fri, 20 Nov 2015 13:49:54 +0000 (08:49 -0500)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Fri, 20 Nov 2015 13:49:54 +0000 (08:49 -0500)
1  2 
include/entities.h
include/world.h
main.cpp
src/entities.cpp
src/gameplay.cpp
src/ui.cpp
src/world.cpp

Simple merge
diff --cc include/world.h
index 3d5fdadb65edff3de77651033578fc0c0547cfee,8f4ea5152b416a5efe65551b2a8b162d7ef0682e..a32c7f29cfd392a6c08b388bf698df6dfa96bffc
@@@ -83,10 -83,9 +83,11 @@@ public
        
        void addStructure(_TYPE t,float x,float y,World *outside,World *inside);
        void addMob(int t,float x,float y);
+       void addMob(int t,float x,float y,void (*hey)());
        void addNPC(float x,float y);
        void addObject(int, float, float);
 +      void addObject(int, bool, char*, float, float);
 +
  
        //void removeObjet(Object);
        
diff --cc main.cpp
index 397c9da78ebcfa09ab3dd60f8edd77640d770960,1f8c58e6ee0a53cb7e24534e128ccbb464cb8ffb..f6a40ec3b9c8445140586e930e8ac9f2fc432fa6
+++ b/main.cpp
@@@ -440,14 -434,13 +440,14 @@@ int main(int argc, char *argv[])
         *      Load a temporary background image.
        */
        
 -      bgDay            =Texture::loadTexture("assets/bg.png"                          );
 -      bgNight          =Texture::loadTexture("assets/bgn.png"                         );
 -      bgMtn            =Texture::loadTexture("assets/bgFarMountain.png"       );
 -      bgTreesFront =Texture::loadTexture("assets/bgFrontTreeTile.png" );
 -      bgTreesMid       =Texture::loadTexture("assets/bgMidTreeTile.png"       );
 -      bgTreesFar       =Texture::loadTexture("assets/bgFarTreeTile.png"       );
 -      
 +      bgDay            =Texture::loadTexture("assets/bg.png"                   );
 +      bgNight          =Texture::loadTexture("assets/bgn.png"                  );
 +      bgMtn            =Texture::loadTexture("assets/bgFarMountain.png");
 +      bgTreesFront =Texture::loadTexture("assets/bgFrontTree.png"      );
 +      bgTreesMid       =Texture::loadTexture("assets/bgMidTree.png"    );
 +      bgTreesFar       =Texture::loadTexture("assets/bgFarTree.png"    );
 +      invUI            =Texture::loadTexture("assets/invUI.png"                );
-       
++
        /*
         *      Load sprites used in the inventory menu. See src/inventory.cpp
        */
index e979e330ed489b633ced2e39abadccaba376762a,67a564a8fd5fd31158cbd0ab3c598eaa82946faa..af32cd6c18442723d5c679b328eaab1983e6aa18
@@@ -181,16 -171,18 +187,16 @@@ void Entity::draw(void){                //draws the e
                                        tex->bind(0);
                                }
                                break;
-                       case 2: //RABBIT
-                               if(ground == 0){
-                                       tex->bind(0);
-                               }else if(ground == 1){
-                                       tex->bind(0);
-                               }
+                       case MS_BIRD:
+                               tex->bind(0);
+                               break;
+                       case MS_TRIGGER:
+                               goto NOPE;
                                break;
                        default:
-                       break;
+                               tex->bind(0);
+                               break;
                }
 -      }else if(type == OBJECTT){
 -              tex->bind(0);
        }else{
                tex->bind(0);
        }
index 18bf327fae043c60a0e763b6c544725d907c05bd,e5d7251f053c6990750d9e4ca772cce3d737ae98..92d12840adfe08b3aab7944aeab42c8f7e9e0a80
@@@ -138,9 -128,9 +157,9 @@@ void initEverything(void)
        
        test->addMob(MS_RABBIT,200,100);
        test->addMob(MS_BIRD,-500,500);
--
 -      test->addObject(2, 500,200);
+       
 +      currentWorld->addObject(SWORD_WOOD, 500,200);
 +      currentWorld->addObject(FLASHLIGHT, true, "This looks important, do you want to pick it up?",600,200);
        /*
         *      Link all the entities that were just created to the initial world, and setup a test AI function. 
        */
diff --cc src/ui.cpp
Simple merge
diff --cc src/world.cpp
Simple merge