| 336 | //========================================================================== |
| 337 | |
| 338 | FTextureID FTextureManager::GetTextureID (const char *name, ETextureType usetype, BITFIELD flags) |
| 339 | { |
| 340 | FTextureID i; |
| 341 | |
| 342 | if (name == NULL || name[0] == 0) |
| 343 | { |
| 344 | return FTextureID(0); |
| 345 | } |
| 346 | else |
| 347 | { |
| 348 | i = CheckForTexture (name, usetype, flags | TEXMAN_TryAny); |
| 349 | } |
| 350 | |
| 351 | if (!i.Exists()) |
| 352 | { |
| 353 | // Use a default texture instead of aborting like Doom did |
| 354 | Printf ("Unknown texture: \"%s\"\n", name); |
| 355 | i = DefaultTexture; |
| 356 | } |
| 357 | return FTextureID(i); |
| 358 | } |
| 359 | |
| 360 | //========================================================================== |
| 361 | // |
no test coverage detected