mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Expanded UI bug fixes
- HRP compatibility: disable ExpandedBarter patch with external HRP due to hack conflict leading to crash (fixes_dialog.cpp:904) - Main inventory: fix dropping items from armor/hand slots into expanded area not registering - Loot/barter: fix mouse wheel scroll feature not registering expanded area of target windows
This commit is contained in:
@@ -169,6 +169,7 @@
|
||||
#define FO_VAR_intface_full_width 0x56FB4C
|
||||
#define FO_VAR_intfaceEnabled 0x518F10
|
||||
#define FO_VAR_intotal 0x43E95C
|
||||
#define FO_VAR_inven_cur_disp 0x519054
|
||||
#define FO_VAR_inven_dude 0x519058
|
||||
#define FO_VAR_inven_pid 0x51905C
|
||||
#define FO_VAR_inven_scroll_dn_bid 0x5190E8
|
||||
|
||||
@@ -867,7 +867,7 @@ next:
|
||||
pop eax;
|
||||
jnz found;
|
||||
inc edx;
|
||||
cmp edx, 6;
|
||||
cmp edx, ds:[FO_VAR_inven_cur_disp];
|
||||
jb next;
|
||||
end:
|
||||
push 0x47125C;
|
||||
|
||||
@@ -1274,7 +1274,10 @@ static void ExpandedBarterPatch() {
|
||||
dlog_f("Skipping expanded barter screen patch. Screen height = %d < %d\n", DL_INIT, Graphics::GetGameHeightRes(), dialogWindowHeight);
|
||||
return;
|
||||
}
|
||||
|
||||
if (HRP::Setting::ExternalEnabled()) {
|
||||
dlogr("Skipping expanded barter screen patch. Not compatible with external HRP.", DL_INIT);
|
||||
return;
|
||||
}
|
||||
if (!barterTallFrm.ArtExists() || !tradeTallFrm.ArtExists()) {
|
||||
dlog_f("Skipping expanded barter screen patch. Missing required FRM files: %s, %s.\n", DL_INIT,
|
||||
barterTallFrm.frmName, tradeTallFrm.frmName);
|
||||
|
||||
@@ -414,10 +414,13 @@ scroll:
|
||||
push ebx;
|
||||
mov ebx, [eax + 8 + 0]; // ebx = _i_wid.rect.x
|
||||
mov ecx, [eax + 8 + 4]; // ecx = _i_wid.rect.y
|
||||
mov eax, 48;
|
||||
mul ds:[FO_VAR_inven_cur_disp];
|
||||
add ecx, 37;
|
||||
mov edx, ecx; // y_start
|
||||
add ecx, eax; // y_end
|
||||
lea eax, [ebx + 297]; // x_start
|
||||
add ebx, 297 + 64; // x_end
|
||||
lea edx, [ecx + 37]; // y_start
|
||||
add ecx, 37 + 6 * 48; // y_end
|
||||
call fo::funcoffs::mouse_click_in_;
|
||||
pop ebx;
|
||||
pop ecx;
|
||||
@@ -455,10 +458,13 @@ scroll:
|
||||
mov edi, [eax + 8 + 4];
|
||||
mov ebx, ebp; // ebx = _i_wid.rect.x
|
||||
mov ecx, edi; // ecx = _i_wid.rect.y
|
||||
mov eax, 48;
|
||||
mul ds:[FO_VAR_inven_cur_disp];
|
||||
add ecx, 35;
|
||||
mov edx, ecx; // y_start
|
||||
add ecx, eax; // y_end
|
||||
lea eax, [ebp + 395]; // x_start
|
||||
add ebx, 395 + 64; // x_end
|
||||
lea edx, [edi + 35]; // y_start
|
||||
add ecx, 35 + 3 * 48; // y_end
|
||||
call fo::funcoffs::mouse_click_in_;
|
||||
test eax, eax;
|
||||
jz notTargetScroll;
|
||||
|
||||
Reference in New Issue
Block a user