mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed the max text width of player name in inventory.
Added an 8 lines limit to the underline position fix.
Removed obsoleted WorldMapEncPatch* functions from Worldmap.cpp (forgot to remove during commit 0f1072c302)
Some minor ASM code edits.
This commit is contained in:
@@ -340,6 +340,7 @@ skip:
|
||||
jmp fo::funcoffs::item_get_type_
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) is_supper_bonus_hack() {
|
||||
__asm {
|
||||
add eax, ecx
|
||||
@@ -348,7 +349,7 @@ static void __declspec(naked) is_supper_bonus_hack() {
|
||||
cmp eax, 10
|
||||
jle end
|
||||
skip:
|
||||
pop eax // Destroy the return address
|
||||
add esp, 4 // Destroy the return address
|
||||
xor eax, eax
|
||||
inc eax
|
||||
pop edx
|
||||
@@ -365,7 +366,7 @@ static void __declspec(naked) PrintBasicStat_hack() {
|
||||
jle skip
|
||||
cmp eax, 10
|
||||
jg end
|
||||
pop ebx // Destroy the return address
|
||||
add esp, 4 // Destroy the return address
|
||||
push 0x434C21
|
||||
retn
|
||||
skip:
|
||||
@@ -395,7 +396,7 @@ static void __declspec(naked) StatButtonDown_hook() {
|
||||
call fo::funcoffs::stat_level_
|
||||
cmp eax, 1
|
||||
jg end
|
||||
pop eax // Destroy the return address
|
||||
add esp, 4 // Destroy the return address
|
||||
xor eax, eax
|
||||
inc eax
|
||||
mov [esp+0xC], eax
|
||||
@@ -754,7 +755,7 @@ static void __declspec(naked) set_new_results_hack() {
|
||||
inc edx // type = knockout
|
||||
jmp fo::funcoffs::queue_remove_this_ // Remove knockout from queue (if there is one)
|
||||
end:
|
||||
pop eax // Destroy the return address
|
||||
add esp, 4 // Destroy the return address
|
||||
push 0x424FC6
|
||||
retn
|
||||
}
|
||||
@@ -1426,11 +1427,16 @@ static void __declspec(naked) inven_obj_examine_func_hack() {
|
||||
ja fix;
|
||||
retn;
|
||||
fix:
|
||||
cmp edx, 9; // 8 lines (half of the display window)
|
||||
ja limit;
|
||||
dec edx;
|
||||
sub eax, 3;
|
||||
mul edx;
|
||||
add eax, 3;
|
||||
retn;
|
||||
limit:
|
||||
mov eax, 57;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1573,9 +1579,12 @@ void BugFixes::init()
|
||||
dlogr(" Done", DL_INIT);
|
||||
//}
|
||||
|
||||
// Corrects "Weight of items" text element width to be 64 (and not 80), which matches container element width
|
||||
SafeWrite8(0x475541, 64);
|
||||
SafeWrite8(0x475789, 64);
|
||||
// Corrects the max text width of item weight in trading interface to be 64 (was 80), which matches the table width
|
||||
SafeWrite32(0x475541, 64);
|
||||
SafeWrite32(0x475789, 64);
|
||||
|
||||
// Corrects the max text width of player name in inventory to be 140 (was 80), which matches the width for item name
|
||||
SafeWrite32(0x471E48, 140);
|
||||
|
||||
//if (GetConfigInt("Misc", "InventoryDragIssuesFix", 1)) {
|
||||
dlog("Applying inventory reverse order issues fix.", DL_INIT);
|
||||
|
||||
@@ -113,28 +113,6 @@ static void __declspec(naked) WorldMapHook() {
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) WorldMapEncPatch1() {
|
||||
__asm {
|
||||
inc dword ptr ds : [FO_VAR_wmLastRndTime]
|
||||
call fo::funcoffs::wmPartyWalkingStep_;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) WorldMapEncPatch2() {
|
||||
__asm {
|
||||
mov dword ptr ds : [FO_VAR_wmLastRndTime], 0;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) WorldMapEncPatch3() {
|
||||
__asm {
|
||||
mov eax, ds:[FO_VAR_wmLastRndTime];
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static DWORD WorldMapEncounterRate;
|
||||
static void __declspec(naked) wmWorldMapFunc_hook() {
|
||||
__asm {
|
||||
@@ -181,7 +159,7 @@ static void __declspec(naked) wmTownMapFunc_hack() {
|
||||
je end
|
||||
retn
|
||||
end:
|
||||
pop eax // destroy the return address
|
||||
add esp, 4 // Destroy the return address
|
||||
push 0x4C4976
|
||||
retn
|
||||
}
|
||||
@@ -220,16 +198,14 @@ static __declspec(naked) void PathfinderFix() {
|
||||
call fo::funcoffs::perk_level_;
|
||||
push eax;
|
||||
call PathfinderFix2;
|
||||
call fo::funcoffs::inc_game_time_;
|
||||
retn;
|
||||
jmp fo::funcoffs::inc_game_time_;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) wmInterfaceInit_text_font_hook() {
|
||||
__asm {
|
||||
mov eax, 0x65; // normal text font
|
||||
call fo::funcoffs::text_font_;
|
||||
retn;
|
||||
jmp fo::funcoffs::text_font_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user