mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
Fix incorrect small font rendering with Hexen Mac IWAD
Unused high resolution font lumps broke composite font logic Small font had doubled height because of that, at least alternate HUD and inter-hub text messages had noticeable visual issues
This commit is contained in:
parent
7c6237e134
commit
9176d75580
2 changed files with 37 additions and 0 deletions
|
@ -184,6 +184,7 @@ void FWadCollection::InitMultipleFiles (TArray<FString> &filenames)
|
|||
}
|
||||
RenameNerve();
|
||||
RenameSprites();
|
||||
FixMacHexen();
|
||||
|
||||
// [RH] Set up hash table
|
||||
FirstLumpIndex = new DWORD[NumLumps];
|
||||
|
@ -956,6 +957,41 @@ void FWadCollection::RenameNerve ()
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FixMacHexen
|
||||
//
|
||||
// Rename unused high resolution font lumps because they are incorrectly
|
||||
// treated as extended characters
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FWadCollection::FixMacHexen()
|
||||
{
|
||||
if (GAME_Hexen != gameinfo.gametype)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = GetFirstLump(IWAD_FILENUM), last = GetLastLump(IWAD_FILENUM); i <= last; ++i)
|
||||
{
|
||||
assert(IWAD_FILENUM == LumpInfo[i].wadnum);
|
||||
|
||||
FResourceLump* const lump = LumpInfo[i].lump;
|
||||
char* const name = lump->Name;
|
||||
|
||||
// Unwanted lumps are named like FONTA??1
|
||||
|
||||
if (8 == strlen(name)
|
||||
&& MAKE_ID('F', 'O', 'N', 'T') == lump->dwName
|
||||
&& 'A' == name[4] && '1' == name[7]
|
||||
&& isdigit(name[5]) && isdigit(name[6]))
|
||||
{
|
||||
name[0] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// W_FindLump
|
||||
|
|
|
@ -238,6 +238,7 @@ protected:
|
|||
private:
|
||||
void RenameSprites();
|
||||
void RenameNerve();
|
||||
void FixMacHexen();
|
||||
void DeleteAll();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue