| 276 | } |
| 277 | |
| 278 | bool TerrainBlock::_setBaseTexFormat(void *obj, const char *index, const char *data) |
| 279 | { |
| 280 | TerrainBlock *terrain = static_cast<TerrainBlock*>(obj); |
| 281 | |
| 282 | EngineEnumTable eTable = _baseTexFormat::_sEnumTable; |
| 283 | |
| 284 | for (U8 i = 0; i < eTable.getNumValues(); i++) |
| 285 | { |
| 286 | if (strcasecmp(eTable[i].mName, data) == 0) |
| 287 | { |
| 288 | terrain->mBaseTexFormat = (BaseTexFormat)eTable[i].mInt; |
| 289 | terrain->_updateMaterials(); |
| 290 | |
| 291 | if (terrain->isServerObject()) return false; |
| 292 | terrain->_updateLayerTexture(); |
| 293 | // If the cached base texture is older that the terrain file or |
| 294 | // it doesn't exist then generate and cache it. |
| 295 | String baseCachePath = terrain->_getBaseTexCacheFileName(); |
| 296 | if (Platform::compareModifiedTimes(baseCachePath, terrain->mTerrFileName) < 0) |
| 297 | terrain->_updateBaseTexture(true); |
| 298 | break; |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | return false; |
| 303 | } |
| 304 | |
| 305 | bool TerrainBlock::_setLightMapSize( void *obj, const char *index, const char *data ) |
| 306 | { |
nothing calls this directly
no test coverage detected