diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-13 11:00:02 -0400 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-17 15:39:39 -0400 |
| commit | 046ee24a341468e9b3ea2983a731dbce18b52ac6 (patch) | |
| tree | 554a645bbc9dac63433cf06e1a5168eb2551d02a /src/components | |
| parent | 5269e7c09a0b17c8c972c8ad996b04d42dbcd9cb (diff) | |
| download | therapy-046ee24a341468e9b3ea2983a731dbce18b52ac6.tar.gz therapy-046ee24a341468e9b3ea2983a731dbce18b52ac6.tar.bz2 therapy-046ee24a341468e9b3ea2983a731dbce18b52ac6.zip | |
Integrated RealizableComponent into RealizingSystem
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/realizable.h | 74 |
1 files changed, 0 insertions, 74 deletions
| diff --git a/src/components/realizable.h b/src/components/realizable.h deleted file mode 100644 index b749aeb..0000000 --- a/src/components/realizable.h +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | #ifndef REALIZABLE_H_36D8D71E | ||
| 2 | #define REALIZABLE_H_36D8D71E | ||
| 3 | |||
| 4 | #include "component.h" | ||
| 5 | #include <set> | ||
| 6 | #include <map> | ||
| 7 | #include "entity_manager.h" | ||
| 8 | #include "vector.h" | ||
| 9 | |||
| 10 | class RealizableComponent : public Component { | ||
| 11 | public: | ||
| 12 | |||
| 13 | using id_type = EntityManager::id_type; | ||
| 14 | |||
| 15 | /** | ||
| 16 | * Path to the XML file containing the world definition. | ||
| 17 | * | ||
| 18 | * @managed_by RealizingSystem | ||
| 19 | */ | ||
| 20 | std::string worldFile; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * Path to the XML file containing the map object prototype definitions. | ||
| 24 | * | ||
| 25 | * @managed_by RealizingSystem | ||
| 26 | */ | ||
| 27 | std::string prototypeFile; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * Starting map and player location for a new game. | ||
| 31 | * | ||
| 32 | * @managed_by RealizingSystem | ||
| 33 | */ | ||
| 34 | int startingMapId; | ||
| 35 | vec2i startingPos; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * The set of map entities loaded by this entity. It is only intended for | ||
| 39 | * there to be one realizable entity, so this should contain all loaded maps. | ||
| 40 | * The realizable entity has ownership of the loaded maps. | ||
| 41 | * | ||
| 42 | * @managed_by RealizingSystem | ||
| 43 | */ | ||
| 44 | std::set<id_type> maps; | ||
| 45 | |||
| 46 | /** | ||
| 47 | * A lookup table that translates a map ID to the entity representing that | ||
| 48 | * loaded map. | ||
| 49 | * | ||
| 50 | * @managed_by RealizingSystem | ||
| 51 | */ | ||
| 52 | std::map<size_t, id_type> entityByMapId; | ||
| 53 | |||
| 54 | /** | ||
| 55 | * The entity ID of the currently active map. | ||
| 56 | * | ||
| 57 | * @managed_by RealizingSystem | ||
| 58 | */ | ||
| 59 | id_type activeMap; | ||
| 60 | |||
| 61 | /** | ||
| 62 | * Whether or not a map has been activated yet. | ||
| 63 | * | ||
| 64 | * @managed_by RealizingSystem | ||
| 65 | */ | ||
| 66 | bool hasActiveMap = false; | ||
| 67 | |||
| 68 | /** | ||
| 69 | * The entity ID of the currently active player. | ||
| 70 | */ | ||
| 71 | id_type activePlayer; | ||
| 72 | }; | ||
| 73 | |||
| 74 | #endif /* end of include guard: REALIZABLE_H_36D8D71E */ | ||
