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

Method setCache

src/Savegame/BattleUnit.cpp:717–728  ·  view source on GitHub ↗

* Sets the unit's cache flag. * @param cache Pointer to cache surface to use, NULL to redraw from scratch. * @param part Unit part to cache. */

Source from the content-addressed store, hash-verified

715 * @param part Unit part to cache.
716 */
717void BattleUnit::setCache(Surface *cache, int part)
718{
719 if (cache == 0)
720 {
721 _cacheInvalid = true;
722 }
723 else
724 {
725 _cache[part] = cache;
726 _cacheInvalid = false;
727 }
728}
729
730/**
731 * Check if the unit is still cached in the Map cache.

Callers 15

setDiscoveredMethod · 0.80
thinkMethod · 0.80
animateMethod · 0.80
cacheUnitMethod · 0.80
initMethod · 0.80
createNewProjectileMethod · 0.80
thinkMethod · 0.80
performMeleeAttackMethod · 0.80
thinkMethod · 0.80
postPathProceduresMethod · 0.80
thinkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected