diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-10 00:41:59 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-10 00:41:59 -0400 |
commit | 7f0e8c7ef70c62814c274f110367db92f01cbb26 (patch) | |
tree | 750bcfec923a826609034ebe9185014521400c68 /src/world.cpp | |
parent | b53826079429939cdfbda073608cb85be8ba0738 (diff) | |
download | therapy-7f0e8c7ef70c62814c274f110367db92f01cbb26.tar.gz therapy-7f0e8c7ef70c62814c274f110367db92f01cbb26.tar.bz2 therapy-7f0e8c7ef70c62814c274f110367db92f01cbb26.zip |
C++11'd everything!
Also moved location information from physics components into entity.
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/world.cpp b/src/world.cpp deleted file mode 100644 index 90d9ab8..0000000 --- a/src/world.cpp +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #include "world.h" | ||
2 | |||
3 | void World::tick() | ||
4 | { | ||
5 | for (auto it = entities.begin(); it != entities.end(); it++) | ||
6 | { | ||
7 | (*it)->tick(); | ||
8 | } | ||
9 | } | ||
10 | |||
11 | void World::input(int key, int action) | ||
12 | { | ||
13 | for (auto it = entities.begin(); it != entities.end(); it++) | ||
14 | { | ||
15 | (*it)->input(key, action); | ||
16 | } | ||
17 | } | ||
18 | |||
19 | void World::render(Texture* buffer) | ||
20 | { | ||
21 | fillTexture(buffer, NULL, 0, 0, 0); | ||
22 | |||
23 | for (auto it = entities.begin(); it != entities.end(); it++) | ||
24 | { | ||
25 | (*it)->render(buffer); | ||
26 | } | ||
27 | } | ||
28 | |||
29 | void World::addEntity(std::shared_ptr<Entity> e) | ||
30 | { | ||
31 | entities.push_back(e); | ||
32 | } | ||