Fixed display issues when highlighting a multiline dialogue option

(ref. alexbatalov/fallout2-ce#418)
This commit is contained in:
NovaRain
2025-02-12 13:22:48 +08:00
parent 115e71543b
commit 345815ec88
+12
View File
@@ -596,6 +596,15 @@ skip:
}
}
static __declspec(naked) void gdProcessUpdate_hook() {
__asm {
pop edi; // ret addr
call fo::funcoffs::text_to_rect_func_; // return _optionRect.y
mov [ebp + 0x39C], eax; // dialogOptionEntry->bottom = _optionRect.y
jmp edi;
}
}
static __declspec(naked) void invenWieldFunc_item_get_type_hook() {
__asm {
mov edx, esi;
@@ -3609,6 +3618,9 @@ void BugFixes::init() {
MakeCall(0x447021, gdProcessUpdate_hack, 1);
//}
// Fix for display issues when highlighting a multiline dialogue option
HookCall(0x447071, gdProcessUpdate_hook);
// Fix for "Unlimited Ammo" exploit
dlogr("Applying fix for Unlimited Ammo exploit.", DL_FIX);
HookCall(0x472957, invenWieldFunc_item_get_type_hook); // hooks item_get_type_()