mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added ItemFastMoveKey and ItemCounterDefaultMax options from 4.0 develop branch (commit aaa76cb3d1)
Set ReloadReserve to be disabled by default.
This commit is contained in:
@@ -146,6 +146,9 @@ OutlineColor=0x10
|
||||
;A key to press to reload your currently equipped weapon
|
||||
ReloadWeaponKey=0
|
||||
|
||||
;A key to hold down to let you move/drop a whole stack of items at once without the 'Move Items' window
|
||||
ItemFastMoveKey=0x1d
|
||||
|
||||
;A key to press to open a debug game editor
|
||||
DebugEditorKey=0
|
||||
|
||||
@@ -556,6 +559,9 @@ StackEmptyWeapons=0
|
||||
;If the amount of ammo boxes in the inventory is less than or equal to the reserve, only one box will be used
|
||||
ReloadReserve=-1
|
||||
|
||||
;Set to 1 to change the counter in the 'Move Items' window to start at the maximum number of items
|
||||
ItemCounterDefaultMax=0
|
||||
|
||||
;Allows 9 options (lines of text) to be displayed correctly in a dialog window
|
||||
DialogOptions9Lines=1
|
||||
|
||||
|
||||
@@ -548,6 +548,7 @@ const DWORD scr_set_ext_param_ = 0x4A3B34;
|
||||
const DWORD scr_set_objs_ = 0x4A3B0C;
|
||||
const DWORD scr_write_ScriptNode_ = 0x4A5704;
|
||||
const DWORD set_game_time_ = 0x4A347C;
|
||||
const DWORD setup_move_timer_win_ = 0x476AB8;
|
||||
const DWORD SexWindow_ = 0x437664;
|
||||
const DWORD skill_check_stealing_ = 0x4ABBE4;
|
||||
const DWORD skill_dec_point_ = 0x4AA8C4;
|
||||
|
||||
@@ -727,6 +727,7 @@ extern const DWORD scr_set_ext_param_;
|
||||
extern const DWORD scr_set_objs_;
|
||||
extern const DWORD scr_write_ScriptNode_;
|
||||
extern const DWORD set_game_time_;
|
||||
extern const DWORD setup_move_timer_win_;
|
||||
extern const DWORD SexWindow_;
|
||||
extern const DWORD skill_check_stealing_;
|
||||
extern const DWORD skill_dec_point_;
|
||||
|
||||
+32
-1
@@ -31,6 +31,7 @@
|
||||
static DWORD mode;
|
||||
static DWORD MaxItemSize;
|
||||
static DWORD ReloadWeaponKey = 0;
|
||||
static DWORD ItemFastMoveKey = 0;
|
||||
|
||||
struct sMessage {
|
||||
DWORD number;
|
||||
@@ -754,6 +755,27 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) do_move_timer_hook() {
|
||||
__asm {
|
||||
cmp eax, 4;
|
||||
jnz end;
|
||||
pushad;
|
||||
}
|
||||
|
||||
KeyDown(ItemFastMoveKey);
|
||||
|
||||
__asm {
|
||||
test eax, eax;
|
||||
popad;
|
||||
jz end;
|
||||
mov dword ptr [esp], 0x476920;
|
||||
retn;
|
||||
end:
|
||||
call setup_move_timer_win_;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void InventoryInit() {
|
||||
mode=GetPrivateProfileInt("Misc", "CritterInvSizeLimitMode", 0, ini);
|
||||
@@ -808,7 +830,7 @@ void InventoryInit() {
|
||||
}
|
||||
|
||||
// Do not call the 'Move Items' window when using drap and drop to reload weapons in the inventory
|
||||
int ReloadReserve = GetPrivateProfileIntA("Misc", "ReloadReserve", 1, ini);
|
||||
int ReloadReserve = GetPrivateProfileIntA("Misc", "ReloadReserve", -1, ini);
|
||||
if (ReloadReserve >= 0) {
|
||||
SafeWrite32(0x47655F, ReloadReserve); // mov eax, ReloadReserve
|
||||
SafeWrite32(0x476563, 0x097EC139); // cmp ecx, eax; jle 0x476570
|
||||
@@ -816,6 +838,15 @@ void InventoryInit() {
|
||||
SafeWrite8(0x476569, 0x91); // xchg ecx, eax
|
||||
};
|
||||
|
||||
ItemFastMoveKey = GetPrivateProfileIntA("Input", "ItemFastMoveKey", DIK_LCONTROL, ini);
|
||||
if (ItemFastMoveKey > 0) {
|
||||
HookCall(0x476897, do_move_timer_hook);
|
||||
}
|
||||
|
||||
if (GetPrivateProfileIntA("Misc", "ItemCounterDefaultMax", 0, ini)) {
|
||||
BlockCall(0x4768A3); // mov ebx, 1
|
||||
}
|
||||
|
||||
// Move items out of bag/backpack and back into the main inventory list by dragging them to character's image
|
||||
// (similar to Fallout 1 behavior)
|
||||
HookCall(0x471457, &inven_pickup_hook);
|
||||
|
||||
Reference in New Issue
Block a user