]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Stuff
authordrumsetmonkey <abelleisle@roadrunner.com>
Wed, 16 Dec 2015 12:32:28 +0000 (07:32 -0500)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Wed, 16 Dec 2015 12:32:28 +0000 (07:32 -0500)
assets/door.png
include/entities.h
src/entities.cpp
src/gameplay.cpp
src/world.cpp
xcf/door.xcf

index 2a8b0dd975859b9424580d4c205b3b1707b65f7d..7db551dceb672c51222f0a12d7be2986dffe5dd6 100644 (file)
Binary files a/assets/door.png and b/assets/door.png differ
index 1abe8862c000f405d61224077153ed88ddb1032d..7a972008cb91cddb01257b6ba675df1a43dcfd7a 100644 (file)
@@ -138,7 +138,7 @@ public:
        virtual ~Entity(){}
 };
 
-class Player : public Entity {
+class Player : public Entity{
 public:
        QuestHandler qh;
        bool light = false;
@@ -147,7 +147,6 @@ public:
        ~Player();
        void interact();
 };
-
 class NPC : public Entity{
 public:
        std::vector<int (*)(NPC *)>aiFunc;
index 24c0d01054fe7b9ba1139f8f708b5adc5ee4c83a..3b8b52ba5f530a21290c881afdb446837a2f2e20 100644 (file)
@@ -155,8 +155,8 @@ Mob::Mob(int sub){
                height = 2000;
                tex = new Texturec(0);
        case MS_DOOR:
-               width = HLINE * 10;
-               height = HLINE * 16;
+               width = HLINE * 12;
+               height = HLINE * 20;
                tex = new Texturec(1,"assets/door.png");
                break;
        }
@@ -416,7 +416,10 @@ unsigned int Structures::spawn(_TYPE t, BUILD_SUB sub, float x, float y){
                 *      with type NPC.
                */
                
+               //((World*)(inWorld))->addNPC(loc.x + i * HLINE ,100);
+               //inWorld->addNPC(loc.x + i * HLINE, 100);
                currentWorld->addNPC(loc.x + i * HLINE ,100);
+
                
        }
 
index 69ae2cc5aac02aaf152d2e7b0ad9d0aac77db88e..6b6246596f59dd3382c9a64191f6cba1d3fc136d 100644 (file)
@@ -133,7 +133,6 @@ void initEverything(void){
 
        //playerSpawnHill->addMob(MS_TRIGGER,player->loc.x,0,story);
 
-       //worldSpawnHill2->addStructure(STRUCTURET,HOUSE,(rand()%120*HLINE),100,worldSpawnHill1,worldSpawnHill2);
        //playerSpawnHill->addStructure(STRUCTURET,FOUNTAIN,(rand()%120*HLINE)+100*HLINE,100,test,iw);
        //playerSpawnHill->addStructure(STRUCTURET,HOUSE2,(rand()%120*HLINE)+300*HLINE,100,test,iw);
 
@@ -143,6 +142,7 @@ void initEverything(void){
 
        currentWorld = worldSpawnHill1;
        
+       worldSpawnHill2->addStructure(STRUCTURET,HOUSE,(rand()%120*HLINE),100,worldSpawnHill1,worldSpawnHill2);
        player = new Player();
        player->spawn(200,100);
        
index 1b460a2d9adc4add08b82db71e48cac9dc9c6752..d26b0fb7c332e2d0febc882b11bb301523df68f7 100644 (file)
@@ -903,7 +903,7 @@ void World::addStructure(_TYPE t,BUILD_SUB sub, float x,float y,World *outside,W
        build.push_back(new Structures());
        build.back()->spawn(t,sub,x,y);
        build.back()->inWorld=outside;
-       build.back()->inside=(void *)inside;
+       build.back()->inside=inside;
        
        entity.push_back(build.back());
 }
index 796501889b1b7676a7b1372dc28304477eda465c..e4edc10c9b7edce3ab4e05c9f0ee61715e94b9f8 100644 (file)
Binary files a/xcf/door.xcf and b/xcf/door.xcf differ