MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getShade

Method getShade

src/Savegame/Tile.cpp:424–435  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

422 * @return shade
423 */
424int 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.

Callers 7

nextStageMethod · 0.45
runMethod · 0.45
drawTerrainMethod · 0.45
drawMethod · 0.45
saveVoxelViewMethod · 0.45
visibleMethod · 0.45
cbxMissionChangeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected