diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-12-16 07:32:28 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-12-16 07:32:28 -0500 |
commit | bf82dd59140d32f4eb265ae69a44784b5fda116a (patch) | |
tree | 4c5d628fcdb800781daa69ede30ee916816297c1 | |
parent | e67bfdde0b7e15ac6bc29993a92a89a844474554 (diff) |
Stuff
-rw-r--r-- | assets/door.png | bin | 255 -> 252 bytes | |||
-rw-r--r-- | include/entities.h | 3 | ||||
-rw-r--r-- | src/entities.cpp | 7 | ||||
-rw-r--r-- | src/gameplay.cpp | 2 | ||||
-rw-r--r-- | src/world.cpp | 2 | ||||
-rw-r--r-- | xcf/door.xcf | bin | 1404 -> 1930 bytes |
6 files changed, 8 insertions, 6 deletions
diff --git a/assets/door.png b/assets/door.png Binary files differindex 2a8b0dd..7db551d 100644 --- a/assets/door.png +++ b/assets/door.png diff --git a/include/entities.h b/include/entities.h index 1abe886..7a97200 100644 --- a/include/entities.h +++ b/include/entities.h @@ -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; diff --git a/src/entities.cpp b/src/entities.cpp index 24c0d01..3b8b52b 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -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); + } diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 69ae2cc..6b62465 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -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); diff --git a/src/world.cpp b/src/world.cpp index 1b460a2..d26b0fb 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -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()); } diff --git a/xcf/door.xcf b/xcf/door.xcf Binary files differindex 7965018..e4edc10 100644 --- a/xcf/door.xcf +++ b/xcf/door.xcf |