aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 7f9b1c0..5663086 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -980,6 +980,14 @@ void World::addLayer(unsigned int width){
behind->bgTex=bgTex;
}
+NPC *World::getAvailableNPC(void){
+ for(auto &n : npc){
+ if(n->aiFunc.empty())
+ return n;
+ }
+ return (NPC *)NULL;
+}
+
World *World::goWorldLeft(Player *p){
if(toLeft&&p->loc.x<x_start+HLINE*15){
p->loc.x=toLeft->x_start+getWidth(toLeft)-HLINE*10;