mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Exhumed: Add fixSeqs()
and use it to patch OOB issue with skulstrt.seq
.
This commit is contained in:
parent
33d4809663
commit
ea7fe0e0b4
1 changed files with 26 additions and 0 deletions
|
@ -137,6 +137,29 @@ const TArray<Seq>* const getFileSeqs(const FName nSeqFile)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void fixSeqs()
|
||||
{
|
||||
// Seq file "skulstrt" has one sprite face with 20 frames instead of 24.
|
||||
if (auto skulstrt = FileSeqMap.CheckKey("skulstrt"))
|
||||
{
|
||||
// Get sequence and store last frame.
|
||||
auto& seq = skulstrt->operator[](4);
|
||||
const auto lastframe = seq.frames.Last();
|
||||
|
||||
// Repeat last frame another four times.
|
||||
for (unsigned i = 20; i < 24; i++)
|
||||
{
|
||||
seq.frames.Push(lastframe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static int addSeq(const char *seqName)
|
||||
{
|
||||
const FStringf seqfilename("%s.seq", seqName);
|
||||
|
@ -310,6 +333,9 @@ void seq_LoadSequences()
|
|||
}
|
||||
}
|
||||
|
||||
// Perform sequence post-processing for where original assets are malformed.
|
||||
fixSeqs();
|
||||
|
||||
nShadowPic = getSequence("shadow").getFirstFrameTexture();
|
||||
nShadowWidth = (int16_t)TexMan.GetGameTexture(nShadowPic)->GetDisplayWidth();
|
||||
|
||||
|
|
Loading…
Reference in a new issue