Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

feat(gameengine): let ReforgedUI.big claim over the interface pages

Olcay Seygancbf300f4a9bd
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/ArchiveFileSystem.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/ArchiveFileSystem.cpp
index ebd4b8449..765f0db83 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/System/ArchiveFileSystem.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/System/ArchiveFileSystem.cpp
@@ -297,11 +297,13 @@ void ArchiveFileSystem::loadMods() {
if (TheGlobalData->m_mods.empty())
return;
- // retail < mods < the fork: the fork's Reforged*.big already in the tree go back on top afterwards
+ // retail < mods < the fork: the fork's Reforged*.big already in the tree go back on top afterwards.
+ // ReforgedUI.big is EA's interface pages redrawn cell by cell, and a mod that ships its own copy of a
+ // page has its own cameos at its own coordinates in it, so that one stays under the mods.
std::vector<AsciiString> forkArt;
for (ArchiveFileMap::const_iterator it = m_archiveFileMap.begin(); it != m_archiveFileMap.end(); ++it)
{
- if (isReforgedArchiveName(it->first))
+ if (isReforgedArchiveName(it->first) && !it->first.endsWithNoCase("ReforgedUI.big"))
forkArt.push_back(it->first);
}
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp
index 6ff3db5c6..84e4efadc 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp
@@ -386,7 +386,9 @@ Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString
if (archiveFile != NULL) {
DEBUG_LOG(("Win32BIGFileSystem::loadBigFilesFromDirectory - loading %s into the directory tree.\n", (*it).str()));
- loadIntoDirectoryTree(archiveFile, *it, overwrite);
+ // The fork's art claims over what was mounted before it: ReforgedUI.big sorts after
+ // EnglishZH.big and has to beat its Data\English\Art\Textures interface pages.
+ loadIntoDirectoryTree(archiveFile, *it, overwrite || isReforgedArchive(*it));
m_archiveFileMap[(*it)] = archiveFile;
DEBUG_LOG(("Win32BIGFileSystem::loadBigFilesFromDirectory - %s inserted into the archive file map.\n", (*it).str()));
actuallyAdded = TRUE;