* Gets the tile's shade amount 0-15. It returns the brightest of all light layers. * Shade level is the inverse of light level. So a maximum amount of light (15) returns shade level 0. * @return shade */
| 422 | * @return shade |
| 423 | */ |
| 424 | int Tile::getShade() const |
| 425 | { |
| 426 | int light = 0; |
| 427 | |
| 428 | for (int layer = 0; layer < LIGHTLAYERS; layer++) |
| 429 | { |
| 430 | if (_light[layer] > light) |
| 431 | light = _light[layer]; |
| 432 | } |
| 433 | |
| 434 | return 15 - light; |
| 435 | } |
| 436 | |
| 437 | /** |
| 438 | * Destroy a part on this tile. We first remove the old object, then replace it with the destroyed one. |
no outgoing calls
no test coverage detected