mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added missing click sound to the buttons in the combat control panel
Updated version number.
This commit is contained in:
@@ -1057,6 +1057,24 @@ static __declspec(naked) void intface_update_ammo_lights_hack() {
|
||||
}
|
||||
}
|
||||
|
||||
static __declspec(naked) void gdCustomSelect_hack_done() {
|
||||
__asm {
|
||||
mov eax, 0x503E14; // 'ib1p1xx1'
|
||||
call fo::funcoffs::gsound_play_sfx_file_;
|
||||
mov ecx, 1; // overwritten engine code
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static __declspec(naked) void gdCustomSelect_hack_cancel() {
|
||||
__asm {
|
||||
mov eax, 0x503E14; // 'ib1p1xx1'
|
||||
call fo::funcoffs::gsound_play_sfx_file_;
|
||||
mov dword ptr [esp + 0x84 - 0x20 + 4], 1; // overwritten engine code
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static __declspec(naked) void display_body_hook() {
|
||||
__asm {
|
||||
mov ebx, [esp + 0x60 - 0x28 + 8];
|
||||
@@ -1412,6 +1430,11 @@ void Interface::init() {
|
||||
ammoBarXPos += 4;
|
||||
}
|
||||
}
|
||||
|
||||
// Add a click sound to the buttons in component menus under the 'Custom' disposition in the combat control panel
|
||||
MakeCall(0x44A47D, gdCustomSelect_hack_done);
|
||||
MakeCall(0x44A495, gdCustomSelect_hack_cancel, 3);
|
||||
|
||||
LoadGameHook::OnGameInit() += []() {
|
||||
// Needs to be invoked in OnGameInit when screen height is already known and db is initialized.
|
||||
ExpandedBarterPatch();
|
||||
|
||||
+2
-2
@@ -25,6 +25,6 @@
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 4
|
||||
#define VERSION_BUILD 6
|
||||
#define VERSION_REV 1
|
||||
#define VERSION_REV 2
|
||||
|
||||
#define VERSION_STRING "4.4.6.1"
|
||||
#define VERSION_STRING "4.4.6.2"
|
||||
|
||||
Reference in New Issue
Block a user