* 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. */
| 715 | * @param part Unit part to cache. |
| 716 | */ |
| 717 | void 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. |
no outgoing calls
no test coverage detected