check background_lump, cosmetic changes

This commit is contained in:
Roman Fomin 2024-09-04 01:27:29 +07:00
parent 6663fba661
commit 4bc92a14c3
2 changed files with 8 additions and 5 deletions

View File

@ -32,9 +32,8 @@ typedef struct
typedef enum
{
MapInfo_None = 0x0001,
MapInfo_Episode = 0x0002,
MapInfo_Endgame = 0x0004,
MapInfo_Episode = 0x0001,
MapInfo_Endgame = 0x0002,
} mapinfo_flags_t;
typedef struct mapentry_s

View File

@ -571,6 +571,7 @@ static boolean UpdateAnimation(boolean enteringcondition)
}
animation->states = NULL;
animation->background_lumpnum = -1;
if (!enteringcondition && animation->interlevel_exiting)
{
@ -597,8 +598,11 @@ static boolean DrawAnimation(void)
return false;
}
V_DrawPatchFullScreen(
V_CachePatchNum(animation->background_lumpnum, PU_CACHE));
if (animation->background_lumpnum >= 0)
{
V_DrawPatchFullScreen(
V_CachePatchNum(animation->background_lumpnum, PU_CACHE));
}
wi_animationstate_t *state;
array_foreach(state, animation->states)