Improved the error handling for missing main .dat files

(ref. fallout2-ce/fallout2-ce#172)
This commit is contained in:
NovaRain
2025-05-31 08:52:33 +08:00
parent 3a9dcc1945
commit 930d1e8a03
+6
View File
@@ -200,6 +200,7 @@ static __declspec(naked) void game_init_databases_hack2() {
end:
mov ds:[FO_VAR_critter_db_handle], eax; // the pointer of critter_patches node will be saved here
call InitSystemPatches;
mov eax, ds:[FO_VAR_critter_db_handle]; // restore pointer for checking
retn;
}
}
@@ -648,6 +649,11 @@ void LoadOrder::init() {
// HookCall(0x44436D, game_init_databases_hook1);
//}
// Skip unnecessary directory creation for missing .dat files/folders
SafeWrite8(0x4DFA4E, 0x57); // jnz 0x4DFAA6 (xaddpath_)
// Trim error messages about missing master and critter datafiles
SafeWriteBatch<BYTE>(0, {0x50228F, 0x50234C});
femaleMsgs = IniReader::GetConfigInt("Misc", "FemaleDialogMsgs", 0);
if (femaleMsgs) {
dlogr("Applying alternative female dialog files patch.", DL_INIT);