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.

fix(gameengine): build on macOS again

Hüseyin Mert7b46673d6385
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp b/GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp
index 9543770a0..e4ad886bc 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp
@@ -663,7 +663,7 @@ void ModNamespace::finishScan( Int mod )
{
Bool reserved = FALSE;
for (size_t i = 0; i < ARRAY_SIZE( Reserved ) && !reserved; ++i)
- reserved = stricmp( it->c_str(), Reserved[ i ] ) == 0;
+ reserved = strcasecmp( it->c_str(), Reserved[ i ] ) == 0;
if (reserved)
it = names.all.erase( it );
else
@@ -739,7 +739,7 @@ Bool ModNamespace::isAssetField( const std::string &field )
};
for (size_t i = 0; i < ARRAY_SIZE( AssetFields ); ++i)
{
- if (stricmp( field.c_str(), AssetFields[ i ] ) == 0)
+ if (strcasecmp( field.c_str(), AssetFields[ i ] ) == 0)
return TRUE;
}
return FALSE;
diff --git a/GeneralsMD/Code/Tests/test_bigfilesystem_stubs.cpp b/GeneralsMD/Code/Tests/test_bigfilesystem_stubs.cpp
index 1b18215d4..99b4bebf0 100644
--- a/GeneralsMD/Code/Tests/test_bigfilesystem_stubs.cpp
+++ b/GeneralsMD/Code/Tests/test_bigfilesystem_stubs.cpp
@@ -66,6 +66,12 @@ void INI::load(AsciiString, INILoadType, Xfer *) { unreachable("INI::load"); }
FileSystem *TheFileSystem = NULL;
File *FileSystem::openFile(const Char *, Int) { unreachable("FileSystem::openFile"); return NULL; }
+// The mod path checks ArchiveFileSystem grew (a mod's Maps.big never wins and a mod never brings the
+// interface). This test mounts no mods, so neither is reached; they are here because addToTree,
+// collectUITextures and getFileListInDirectory name them and the test does not link FileSystem.cpp.
+Bool FileSystem::isMapPath(const AsciiString &) { unreachable("FileSystem::isMapPath"); return FALSE; }
+Bool FileSystem::isForkUIPath(const AsciiString &) { unreachable("FileSystem::isForkUIPath"); return FALSE; }
+
// GameDataGone (Common/Debug.h): an archive read failed because its drive went away. Every archive this
// test opens is on the local install and stays there, so that never happens here.
extern "C" void GameDataGone(const char *what) { fprintf(stderr, "GameDataGone(%s)\n", what); unreachable("GameDataGone"); }