| 386 | |
| 387 | |
| 388 | static VirtualTexture* LoadVirtualTexture(istream& in, const string& path) |
| 389 | { |
| 390 | Tokenizer tokenizer(&in); |
| 391 | Parser parser(&tokenizer); |
| 392 | |
| 393 | if (tokenizer.nextToken() != Tokenizer::TokenName) |
| 394 | return NULL; |
| 395 | |
| 396 | string virtTexString = tokenizer.getNameValue(); |
| 397 | if (virtTexString != "VirtualTexture") |
| 398 | return NULL; |
| 399 | |
| 400 | Value* texParamsValue = parser.readValue(); |
| 401 | if (texParamsValue == NULL || texParamsValue->getType() != Value::HashType) |
| 402 | { |
| 403 | DPRINTF(0, "Error parsing virtual texture\n"); |
| 404 | delete texParamsValue; |
| 405 | return NULL; |
| 406 | } |
| 407 | |
| 408 | Hash* texParams = texParamsValue->getHash(); |
| 409 | |
| 410 | VirtualTexture* virtualTex = CreateVirtualTexture(texParams, path); |
| 411 | delete texParamsValue; |
| 412 | |
| 413 | return virtualTex; |
| 414 | } |
| 415 | |
| 416 | |
| 417 | VirtualTexture* LoadVirtualTexture(const string& filename) |
no test coverage detected