summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-10-24 10:29:10 +0200
committerPaweł Redman <pawel.redman@gmail.com>2017-10-24 13:13:45 +0200
commit28331efb18a9700e556879e51915cd0ecb51ae79 (patch)
tree89289301ad562d378cc1811854a39a835b53bbe5 /src/game.cpp
parentee017fb5def1c4d372a664e5e64210ed0cd52174 (diff)
Node elimination basics.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 2dab5c6..f4b5057 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -36,13 +36,6 @@ public:
link(world);
}
- bool move_towards(v2f_t point, float *time)
- {
- bool partial;
-
- return partial;
- }
-
void keep_moving(void)
{
float time;
@@ -89,7 +82,7 @@ public:
move.dst = dst_;
move.path.clear();
- if (world->find_path(x, move.dst, size, &move.path))
+ if (world->find_path(x, move.dst, size, this, &move.path))
move.moving = true;
else
move.moving = false;
@@ -112,7 +105,7 @@ public:
}
};
-static human_t human;
+static human_t human, human2;
void state_t::start(void)
{
@@ -121,6 +114,13 @@ void state_t::start(void)
human.render_size[0] = v2f_t(-0.5f, -1.0f);
human.render_size[1] = v2f_t(+0.5f, +0.5f);
human.place(&world, v2f_t(0.5f, 0.5f));
+
+ human2.size[0] = v2f_t(-0.4f, -0.4f);
+ human2.size[1] = v2f_t(+0.4f, +0.4f);
+ human2.render_size[0] = v2f_t(-0.5f, -1.0f);
+ human2.render_size[1] = v2f_t(+0.5f, +0.5f);
+ human2.place(&world, v2f_t(3.5f, 0.5f));
+
}
void state_t::debug_click(v2f_t x)