* If an object stand on this tile, this returns how high the unit is it standing. * @return the level in pixels */
| 278 | * @return the level in pixels |
| 279 | */ |
| 280 | int Tile::getTerrainLevel() const |
| 281 | { |
| 282 | int level = 0; |
| 283 | |
| 284 | if (_objects[MapData::O_FLOOR]) |
| 285 | level = _objects[MapData::O_FLOOR]->getTerrainLevel(); |
| 286 | if (_objects[MapData::O_OBJECT]) |
| 287 | level += _objects[MapData::O_OBJECT]->getTerrainLevel(); |
| 288 | |
| 289 | return level; |
| 290 | } |
| 291 | |
| 292 | /** |
| 293 | * Gets the tile's footstep sound. |
no outgoing calls
no test coverage detected