| 296 | } |
| 297 | |
| 298 | bool TerrainBlock::_setBaseTexFormat(void *obj, const char *index, const char *data) |
| 299 | { |
| 300 | TerrainBlock *terrain = static_cast<TerrainBlock*>(obj); |
| 301 | |
| 302 | EngineEnumTable eTable = _baseTexFormat::_sEnumTable; |
| 303 | |
| 304 | for (U8 i = 0; i < eTable.getNumValues(); i++) |
| 305 | { |
| 306 | if (strcasecmp(eTable[i].mName, data) == 0) |
| 307 | { |
| 308 | terrain->mBaseTexFormat = (BaseTexFormat)eTable[i].mInt; |
| 309 | terrain->_updateMaterials(); |
| 310 | |
| 311 | if (terrain->isServerObject()) return false; |
| 312 | terrain->_updateLayerTexture(); |
| 313 | // If the cached base texture is older that the terrain file or |
| 314 | // it doesn't exist then generate and cache it. |
| 315 | String baseCachePath = terrain->_getBaseTexCacheFileName(); |
| 316 | if (Platform::compareModifiedTimes(baseCachePath, terrain->mTerrainAsset->getTerrainFilePath()) < 0 && terrain->mUpdateBasetex) |
| 317 | terrain->_updateBaseTexture(true); |
| 318 | break; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | return false; |
| 323 | } |
| 324 | |
| 325 | bool TerrainBlock::_setLightMapSize( void *obj, const char *index, const char *data ) |
| 326 | { |
nothing calls this directly
no test coverage detected