Mercurial > fife-parpg
comparison engine/core/model/structures/layer.cpp @ 92:746df66978da
* Fix by Sleek & GreyGhost
author | mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 19 Jul 2008 13:38:01 +0000 |
parents | e7b55b2b398f |
children | 64e7fe3d4288 |
comparison
equal
deleted
inserted
replaced
91:e7b55b2b398f | 92:746df66978da |
---|---|
26 | 26 |
27 // FIFE includes | 27 // FIFE includes |
28 // These includes are split up in two parts, separated by one empty line | 28 // These includes are split up in two parts, separated by one empty line |
29 // First block: files included from the FIFE root src directory | 29 // First block: files included from the FIFE root src directory |
30 // Second block: files included from the same folder | 30 // Second block: files included from the same folder |
31 #include "util/log/logger.h" | |
31 #include "util/structures/purge.h" | 32 #include "util/structures/purge.h" |
32 | 33 |
33 #include "layer.h" | 34 #include "layer.h" |
34 #include "instance.h" | 35 #include "instance.h" |
35 #include "map.h" | 36 #include "map.h" |
36 #include "instancetree.h" | 37 #include "instancetree.h" |
37 | 38 |
38 namespace FIFE { | 39 namespace FIFE { |
40 | |
41 static Logger _log(LM_STRUCTURES); | |
39 | 42 |
40 Layer::Layer(const std::string& identifier, Map* map, CellGrid* grid) | 43 Layer::Layer(const std::string& identifier, Map* map, CellGrid* grid) |
41 : m_id(identifier), | 44 : m_id(identifier), |
42 m_map(map), | 45 m_map(map), |
43 m_instances_visibility(true), | 46 m_instances_visibility(true), |
61 Instance* Layer::createInstance(Object* object, const ModelCoordinate& p, const std::string& id) { | 64 Instance* Layer::createInstance(Object* object, const ModelCoordinate& p, const std::string& id) { |
62 ExactModelCoordinate emc(static_cast<double>(p.x), static_cast<double>(p.y), static_cast<double>(p.z)); | 65 ExactModelCoordinate emc(static_cast<double>(p.x), static_cast<double>(p.y), static_cast<double>(p.z)); |
63 return createInstance(object, emc, id); | 66 return createInstance(object, emc, id); |
64 } | 67 } |
65 | 68 |
66 bool Layer::createInstance(Object* object, const ExactModelCoordinate& p, const std::string& id) { | 69 Instance* Layer::createInstance(Object* object, const ExactModelCoordinate& p, const std::string& id) { |
67 Location l; | 70 Location l; |
68 l.setLayer(this); | 71 l.setLayer(this); |
69 l.setExactLayerCoordinates(p); | 72 l.setExactLayerCoordinates(p); |
70 | 73 |
71 if(id != "") { | 74 if(id != "") { |