From 4bc92a14c34bb32f2506f07e40978541b63b3c1b Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 4 Sep 2024 01:27:29 +0700 Subject: [PATCH] check background_lump, cosmetic changes --- src/u_mapinfo.h | 5 ++--- src/wi_stuff.c | 8 ++++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/u_mapinfo.h b/src/u_mapinfo.h index 644077ca..85949bd4 100644 --- a/src/u_mapinfo.h +++ b/src/u_mapinfo.h @@ -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 diff --git a/src/wi_stuff.c b/src/wi_stuff.c index 85ac96d8..801d1909 100644 --- a/src/wi_stuff.c +++ b/src/wi_stuff.c @@ -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)