Mercurial > fife-parpg
comparison engine/core/model/structures/layer.cpp @ 255:51cc05d862f2
Merged editor_rewrite branch to trunk.
This contains changes that may break compatibility against existing clients.
For a list of changes that may affect your client, see: http://wiki.fifengine.de/Changes_to_pychan_and_FIFE_in_editor_rewrite_branch
author | cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Mon, 08 Jun 2009 16:00:02 +0000 |
parents | 56ac89189bc4 |
children | ab41334e8a57 |
comparison
equal
deleted
inserted
replaced
254:10b5f7f36dd4 | 255:51cc05d862f2 |
---|---|
143 matching_instances.push_back(*it); | 143 matching_instances.push_back(*it); |
144 } | 144 } |
145 return matching_instances; | 145 return matching_instances; |
146 } | 146 } |
147 | 147 |
148 std::vector<Instance*> Layer::getInstancesAt(Location& loc, bool use_exactcoordinates) { | |
149 std::vector<Instance*> matching_instances; | |
150 std::vector<Instance*>::iterator it = m_instances.begin(); | |
151 | |
152 for(; it != m_instances.end(); ++it) { | |
153 if (use_exactcoordinates) { | |
154 if ((*it)->getLocationRef().getExactLayerCoordinatesRef() == loc.getExactLayerCoordinatesRef()) { | |
155 matching_instances.push_back(*it); | |
156 } | |
157 } else { | |
158 if ((*it)->getLocationRef().getLayerCoordinates() == loc.getLayerCoordinates()) { | |
159 matching_instances.push_back(*it); | |
160 } | |
161 } | |
162 } | |
163 | |
164 return matching_instances; | |
165 } | |
166 | |
148 void Layer::getMinMaxCoordinates(ModelCoordinate& min, ModelCoordinate& max, const Layer* layer) const { | 167 void Layer::getMinMaxCoordinates(ModelCoordinate& min, ModelCoordinate& max, const Layer* layer) const { |
149 if (!layer) { | 168 if (!layer) { |
150 layer = this; | 169 layer = this; |
151 } | 170 } |
152 | 171 |