diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-04-21 14:50:52 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-04-21 14:50:52 -0400 |
commit | 8142a9c87a13cecc7a3698e877f24d89f128c074 (patch) | |
tree | cbee6ae85c5c674dd313c7cfe1420477ee55ca95 /src/systems/mapping.cpp | |
parent | 0f70db34d9b47de55b00c558ac3c445f30b7b6a5 (diff) | |
download | therapy-proto-objs.tar.gz therapy-proto-objs.tar.bz2 therapy-proto-objs.zip |
Started working on prototype objects proto-objs
Diffstat (limited to 'src/systems/mapping.cpp')
-rw-r--r-- | src/systems/mapping.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/systems/mapping.cpp b/src/systems/mapping.cpp index a3a17ec..c7c2f9d 100644 --- a/src/systems/mapping.cpp +++ b/src/systems/mapping.cpp | |||
@@ -195,4 +195,18 @@ void MappingSystem::loadMap(size_t mapId) | |||
195 | MappableComponent::Boundary::Type::danger); | 195 | MappableComponent::Boundary::Type::danger); |
196 | } | 196 | } |
197 | } | 197 | } |
198 | |||
199 | for (const Map::Object& object : map.getObjects()) | ||
200 | { | ||
201 | const Prototype& prototype = game_.getPrototypeManager(). | ||
202 | getPrototype(object.getType()); | ||
203 | |||
204 | id_type emplacedObject = prototype.instantiate( | ||
205 | game_, | ||
206 | object.getX(), | ||
207 | object.getY(), | ||
208 | object.getItems()); | ||
209 | |||
210 | mappable.getInstances()[object.getIndex()] = emplacedObject; | ||
211 | } | ||
198 | } | 212 | } |