Minor edits to Interface.cpp and ddraw.ini

This commit is contained in:
NovaRain
2020-08-22 10:51:07 +08:00
parent c6da5169b8
commit 57f4deb5cf
2 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -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
+10 -9
View File
@@ -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);
}