| 372 | //==================================================================== |
| 373 | |
| 374 | bool DInterBackground::LoadBackground(bool isenterpic) |
| 375 | { |
| 376 | const char* lumpname = nullptr; |
| 377 | const char* exitpic = nullptr; |
| 378 | const char* exitanim = nullptr; |
| 379 | char buffer[10]; |
| 380 | in_anim_t an; |
| 381 | lnode_t pt; |
| 382 | FTextureID texture; |
| 383 | bool noautostartmap = false; |
| 384 | bool id24anim = false; |
| 385 | |
| 386 | bcnt = 0; |
| 387 | |
| 388 | if (!isenterpic) tilebackground = false; |
| 389 | texture.SetInvalid(); |
| 390 | |
| 391 | level_info_t* li = FindLevelInfo(wbs->current.GetChars()); |
| 392 | if (li != nullptr) |
| 393 | { |
| 394 | if (li->ExitAnim.IsNotEmpty()) |
| 395 | { |
| 396 | id24anim = true; |
| 397 | exitpic = li->ExitAnim.GetChars(); |
| 398 | tilebackground = false; |
| 399 | } |
| 400 | else |
| 401 | { |
| 402 | exitpic = li->ExitPic.GetChars(); |
| 403 | if (li->ExitPic.IsNotEmpty()) tilebackground = false; |
| 404 | } |
| 405 | } |
| 406 | lumpname = exitpic; |
| 407 | |
| 408 | if (isenterpic) |
| 409 | { |
| 410 | level_info_t* li = FindLevelInfo(wbs->next.GetChars()); |
| 411 | if (li != NULL) |
| 412 | { |
| 413 | if (li->EnterAnim.IsNotEmpty()) |
| 414 | { |
| 415 | id24anim = true; |
| 416 | lumpname = li->EnterAnim.GetChars(); |
| 417 | tilebackground = false; |
| 418 | } |
| 419 | else |
| 420 | { |
| 421 | lumpname = li->EnterPic.GetChars(); |
| 422 | if (li->EnterPic.IsNotEmpty()) tilebackground = false; |
| 423 | } |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | // Try to get a default if nothing specified |
| 428 | if (lumpname == NULL || lumpname[0] == 0) |
| 429 | { |
| 430 | lumpname = NULL; |
| 431 | switch (gameinfo.gametype) |
no test coverage detected