From 57f4deb5cfc59c2ffcf9ae5158d767edcd5cb9b9 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Sat, 22 Aug 2020 10:51:07 +0800 Subject: [PATCH] Minor edits to Interface.cpp and ddraw.ini --- artifacts/ddraw.ini | 2 +- sfall/Interface.cpp | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 05aea999..7d08cc34 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -688,7 +688,7 @@ NumbersInDialogue=0 WorldMapFontPatch=0 ;Set to 1 to use Fallout's normal text font for death screen subtitles -;Requires changing the color of subtitles in death.pal palette (color index 220) to display the text correctly +;Requires changing the color of subtitles in death.pal palette to white color (index 220) to display the text correctly DeathScreenFontPatch=0 ;Set to 1 to display full item description for weapon/ammo in the barter screen diff --git a/sfall/Interface.cpp b/sfall/Interface.cpp index fb03cb83..d9ad92b6 100644 --- a/sfall/Interface.cpp +++ b/sfall/Interface.cpp @@ -359,20 +359,13 @@ static void __declspec(naked) wmInterfaceRefreshCarFuel_hack() { } } -static void __declspec(naked) main_death_scene_hook() { - __asm { - mov eax, 101; - call text_font_; - jmp debug_printf_; - } -} - static void WorldMapInterfacePatch() { if (GetConfigInt("Misc", "WorldMapFontPatch", 0)) { dlog("Applying world map font patch.", DL_INIT); HookCall(0x4C2343, wmInterfaceInit_text_font_hook); dlogr(" Done", DL_INIT); } + // Fix images for up/down buttons SafeWrite32(0x4C2C0A, 199); // index of UPARWOFF.FRM SafeWrite8(0x4C2C7C, 0x43); // dec ebx > inc ebx @@ -509,6 +502,14 @@ static void __declspec(naked) gmouse_bk_process_hook() { } } +static void __declspec(naked) main_death_scene_hook() { + __asm { + mov eax, 101; + call text_font_; + jmp debug_printf_; + } +} + void InterfaceGmouseHandleHook() { if (hrpVersionValid) IFACE_BAR_MODE = *(BYTE*)HRPAddress(0x1006EB0C) != 0; HookCall(0x44C018, gmouse_handle_event_hook); // replaces hack function from HRP @@ -537,7 +538,7 @@ void InterfaceInit() { } // Corrects the height of the black background for death screen subtitles - if (hrpIsEnabled == false) SafeWrite32(0x48134D, -602 - (640 * 2)); // main_death_scene_ (shift y-offset 2px up, w/o HRP) + if (hrpIsEnabled == false) SafeWrite32(0x48134D, 38 - (640 * 3)); // main_death_scene_ (shift y-offset 2px up, w/o HRP) if (hrpIsEnabled == false || hrpVersionValid) SafeWrite8(0x481345, 4); // main_death_scene_ if (hrpVersionValid) SafeWrite8(HRPAddress(0x10011738), 10); }