diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 195eac38..0620d724 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -114,6 +114,16 @@ FadeMultiplier=100 ;The minimum supported version of the hi-res patch is v4.1.8 ActionPointsBar=0 +;Set to 1 to use the expanded barter/trade interface with 4 item slots per table instead of 3 +;Requires the hi-res patch/mode and new BARTER_E.frm and TRADE_E.frm files in art\intrface\ (included in sfall.dat) +;The resolution of the hi-res patch must be set to at least 640x528 +;The only supported version of the hi-res patch is v4.1.8 +ExpandBarter=0 + +;Set to 1 to use the expanded inventory/loot screens with 8 vertical slots instead of 6 +;Requires new INVBOX_E.frm, LOOT_E.frm, and USE_E.frm files in art\intrface\ (included in sfall.dat) +ExpandInventory=0 + ;Set to 1 to use the expanded world map interface ;Set to 2 to skip correcting the position of entrance markers on town maps ;You can use resized FRMs in 700x682 for town maps in the expanded world map interface @@ -133,15 +143,6 @@ WorldMapTravelMarkers=0 ;Set to 1 to display terrain types when hovering the cursor over the player's marker on the world map WorldMapTerrainInfo=0 -;Set to 1 to enable tall trade/barter window with 4 item slots per table instead of 3 -;Requires the high-res mode with resolution of at least 640x528 -;Requires new frm files in art\intrface\: barter_e.frm (640x239), trade_e.frm (640x238) (included in sfall.dat) -ExpandedBarter=0 - -;Set to 1 to enable tall inventory/loot/item select windows with 8 vertical slots instead of 6 -;Requires new frm files in art\intrface\: invbox_e.frm (499x467), loot_e.frm (537x464) and use_e.frm (292x464) files (included in sfall.dat) -ExpandedInventory=0 - ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [Sound] ;Sets the number of allowed simultaneous sound effects diff --git a/artifacts/sfall_dat/dat_en/art/intrface/barter_e.frm b/artifacts/sfall_dat/dat_en/art/intrface/BARTER_E.frm similarity index 100% rename from artifacts/sfall_dat/dat_en/art/intrface/barter_e.frm rename to artifacts/sfall_dat/dat_en/art/intrface/BARTER_E.frm diff --git a/artifacts/sfall_dat/dat_en/art/intrface/invbox_e.frm b/artifacts/sfall_dat/dat_en/art/intrface/INVBOX_E.frm similarity index 100% rename from artifacts/sfall_dat/dat_en/art/intrface/invbox_e.frm rename to artifacts/sfall_dat/dat_en/art/intrface/INVBOX_E.frm diff --git a/artifacts/sfall_dat/dat_en/art/intrface/loot_e.frm b/artifacts/sfall_dat/dat_en/art/intrface/LOOT_E.frm similarity index 100% rename from artifacts/sfall_dat/dat_en/art/intrface/loot_e.frm rename to artifacts/sfall_dat/dat_en/art/intrface/LOOT_E.frm diff --git a/artifacts/sfall_dat/dat_en/art/intrface/trade_e.frm b/artifacts/sfall_dat/dat_en/art/intrface/TRADE_E.frm similarity index 100% rename from artifacts/sfall_dat/dat_en/art/intrface/trade_e.frm rename to artifacts/sfall_dat/dat_en/art/intrface/TRADE_E.frm diff --git a/artifacts/sfall_dat/dat_en/art/intrface/use_e.frm b/artifacts/sfall_dat/dat_en/art/intrface/USE_E.frm similarity index 100% rename from artifacts/sfall_dat/dat_en/art/intrface/use_e.frm rename to artifacts/sfall_dat/dat_en/art/intrface/USE_E.frm diff --git a/artifacts/sfall_dat/dat_ru/art/intrface/INVBOX_E.frm b/artifacts/sfall_dat/dat_ru/art/intrface/INVBOX_E.frm index 230060c7..463c169e 100644 Binary files a/artifacts/sfall_dat/dat_ru/art/intrface/INVBOX_E.frm and b/artifacts/sfall_dat/dat_ru/art/intrface/INVBOX_E.frm differ diff --git a/artifacts/sfall_dat/dat_zh/art/intrface/BARTER_E.frm b/artifacts/sfall_dat/dat_zh/art/intrface/BARTER_E.frm new file mode 100644 index 00000000..6c34555f Binary files /dev/null and b/artifacts/sfall_dat/dat_zh/art/intrface/BARTER_E.frm differ diff --git a/artifacts/sfall_dat/dat_zh/art/intrface/INVBOX_E.frm b/artifacts/sfall_dat/dat_zh/art/intrface/INVBOX_E.frm new file mode 100644 index 00000000..d166943a Binary files /dev/null and b/artifacts/sfall_dat/dat_zh/art/intrface/INVBOX_E.frm differ diff --git a/artifacts/sfall_dat/dat_zh/art/intrface/LOOT_E.frm b/artifacts/sfall_dat/dat_zh/art/intrface/LOOT_E.frm new file mode 100644 index 00000000..444581fc Binary files /dev/null and b/artifacts/sfall_dat/dat_zh/art/intrface/LOOT_E.frm differ diff --git a/artifacts/sfall_dat/dat_zh/art/intrface/TRADE_E.frm b/artifacts/sfall_dat/dat_zh/art/intrface/TRADE_E.frm new file mode 100644 index 00000000..e5fed556 Binary files /dev/null and b/artifacts/sfall_dat/dat_zh/art/intrface/TRADE_E.frm differ diff --git a/artifacts/sfall_dat/dat_zh/art/intrface/USE_E.frm b/artifacts/sfall_dat/dat_zh/art/intrface/USE_E.frm new file mode 100644 index 00000000..10dc0e4d Binary files /dev/null and b/artifacts/sfall_dat/dat_zh/art/intrface/USE_E.frm differ diff --git a/artifacts/sfall_dat/sfall.dat b/artifacts/sfall_dat/sfall.dat index d5e23c74..0edc673e 100644 Binary files a/artifacts/sfall_dat/sfall.dat and b/artifacts/sfall_dat/sfall.dat differ diff --git a/artifacts/sfall_dat/sfall_ru.dat b/artifacts/sfall_dat/sfall_ru.dat index c261e0bf..abe6c042 100644 Binary files a/artifacts/sfall_dat/sfall_ru.dat and b/artifacts/sfall_dat/sfall_ru.dat differ diff --git a/artifacts/sfall_dat/sfall_zh.dat b/artifacts/sfall_dat/sfall_zh.dat index 05f80d34..505f8c83 100644 Binary files a/artifacts/sfall_dat/sfall_zh.dat and b/artifacts/sfall_dat/sfall_zh.dat differ diff --git a/sfall/Modules/Interface.cpp b/sfall/Modules/Interface.cpp index ea127fd2..551bb60a 100644 --- a/sfall/Modules/Interface.cpp +++ b/sfall/Modules/Interface.cpp @@ -1267,15 +1267,15 @@ static void __declspec(naked) gdialog_barter_destroy_win__gdialog_scroll_subwin_ // Expands barter/trade window vertically with 4 slots per table instead of 3. static void ExpandedBarterPatch() { - if (IniReader::GetConfigInt("Interface", "ExpandedBarter", 0) == 0) return; + if (IniReader::GetConfigInt("Interface", "ExpandBarter", 0) == 0) return; const int dialogWindowHeight = 480 + extraBarterHeight; if (Graphics::GetGameHeightRes() < dialogWindowHeight) { - dlog_f("Skipping expanded barter screen patch. Screen height = %d < %d\n", DL_INIT, Graphics::GetGameHeightRes(), dialogWindowHeight); + dlog_f("Skipping expanded barter screen patch. Screen height < %d\n", DL_INIT, dialogWindowHeight); return; } if (HRP::Setting::ExternalEnabled() && !HRP::Setting::VersionIsValid) { - dlogr("Skipping expanded barter screen patch. Incompatible version of High-Resolution Patch (f2_res.dll) found.", DL_INIT); + dlogr("Skipping expanded barter screen patch. Incompatible version of Hi-Res Patch found.", DL_INIT); return; } if (!barterTallFrm.ArtExists() || !tradeTallFrm.ArtExists()) { @@ -1313,7 +1313,7 @@ static void ExpandedBarterPatch() { // Expands inventory/loot/item select windows vertically with 8 vertical slots instead of 6 static void ExpandedInventoryPatch() { - if (IniReader::GetConfigInt("Interface", "ExpandedInventory", 0) == 0) return; + if (IniReader::GetConfigInt("Interface", "ExpandInventory", 0) == 0) return; for (size_t i = 0; i < inventoryTallFrms.size(); i++) { if (!inventoryTallFrms[i].ArtExists()) { diff --git a/sfall/Modules/Inventory.cpp b/sfall/Modules/Inventory.cpp index 277eedad..e1d04519 100644 --- a/sfall/Modules/Inventory.cpp +++ b/sfall/Modules/Inventory.cpp @@ -415,7 +415,7 @@ scroll: 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]; + imul dword ptr ds:[FO_VAR_inven_cur_disp]; add ecx, 37; mov edx, ecx; // y_start add ecx, eax; // y_end @@ -459,7 +459,7 @@ scroll: 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]; + imul dword ptr ds:[FO_VAR_inven_cur_disp]; add ecx, 35; mov edx, ecx; // y_start add ecx, eax; // y_end @@ -479,7 +479,7 @@ notTargetScroll: mov ebx, ebp; mov ecx, edi; mov eax, 48; - mul ds:[FO_VAR_inven_cur_disp]; + imul dword ptr ds:[FO_VAR_inven_cur_disp]; add ecx, 20; mov edx, ecx; // y_start add ecx, eax; // y_end @@ -499,7 +499,7 @@ notTargetBarter: mov ebx, ebp; mov ecx, edi; mov eax, 48; - mul ds:[FO_VAR_inven_cur_disp]; + imul dword ptr ds:[FO_VAR_inven_cur_disp]; add ecx, 20; mov edx, ecx; // y_start add ecx, eax; // y_end