Removed the version check of external HRP for ActionPointsBar

(tested on v4.1.7 and v3.0.6)
This commit is contained in:
NovaRain
2024-05-12 11:22:22 +08:00
parent 2d7c49a1fb
commit b9fade9732
4 changed files with 6 additions and 19 deletions
+1 -2
View File
@@ -110,8 +110,7 @@ FadeMultiplier=100
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Interface] [Interface]
;Set to 1 to expand the number of action points displayed on the interface bar ;Set to 1 to expand the number of action points displayed on the interface bar
;Requires new iface_apbar_e.frm in art\intrface\ (included in sfall.dat) to display correctly ;Requires a new IFACE_APBAR_E.frm in art\intrface\ (included in sfall.dat) to display correctly
;The minimum supported version of the hi-res patch is v4.1.8
ActionPointsBar=0 ActionPointsBar=0
;Set to 1 to use the expanded barter/trade interface with 4 item slots per table instead of 3 ;Set to 1 to use the expanded barter/trade interface with 4 item slots per table instead of 3
-1
View File
@@ -18,7 +18,6 @@
#include "..\main.h" #include "..\main.h"
#include "..\FalloutEngine\Fallout2.h" #include "..\FalloutEngine\Fallout2.h"
#include "..\FalloutEngine\Structs.h"
#include "LoadGameHook.h" #include "LoadGameHook.h"
#include "ExtraArt.h" #include "ExtraArt.h"
+4 -9
View File
@@ -20,18 +20,13 @@
#include "Module.h" #include "Module.h"
namespace fo namespace sfall
{
struct FrmFile;
}
namespace sfall
{ {
struct PcxFile { struct PcxFile {
unsigned char* pixelData; BYTE* pixelData;
long width; long width;
long height; long height;
PcxFile() : pixelData(nullptr), width(0), height(0) {} PcxFile() : pixelData(nullptr), width(0), height(0) {}
}; };
+1 -7
View File
@@ -179,13 +179,8 @@ static void APBarRectPatch() {
} }
static void ActionPointsBarPatch() { static void ActionPointsBarPatch() {
dlog("Applying expanded action points bar patch.", DL_INIT); dlogr("Applying expanded action points bar patch.", DL_INIT);
if (HRP::Setting::ExternalEnabled()) { if (HRP::Setting::ExternalEnabled()) {
// check valid data
if (!HRP::Setting::VersionIsValid) {
dlogr(" Incorrect HRP version!", DL_INIT);
return;
}
LoadGameHook::OnAfterGameInit() += APBarRectPatch; LoadGameHook::OnAfterGameInit() += APBarRectPatch;
} else { } else {
APBarRectPatch(); APBarRectPatch();
@@ -200,7 +195,6 @@ static void ActionPointsBarPatch() {
HookCall(0x45D962, intface_init_hook_unlock_iface_frm); HookCall(0x45D962, intface_init_hook_unlock_iface_frm);
MakeCall(0x45E356, intface_init_hack); MakeCall(0x45E356, intface_init_hack);
MakeJump(0x45EE38, intface_update_move_points_hack, 1); MakeJump(0x45EE38, intface_update_move_points_hack, 1);
dlogr(" Done", DL_INIT);
} }
static long costAP = -1; static long costAP = -1;