mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Restored the position of the ammo bar when ALTERNATE_AMMO_METRE=0
This commit is contained in:
@@ -389,7 +389,7 @@ static void GetAmmoMetreColors(long yPercent, BYTE &outClr1, BYTE &outClr2) {
|
||||
static void __fastcall DrawAlternateAmmoMetre(long x, long y) {
|
||||
fo::Window* win = fo::func::GNW_find(fo::var::interfaceWindow);
|
||||
|
||||
x += xOffset + 1;
|
||||
x += xOffset - 1;
|
||||
long startOffset = x + (25 * win->width);
|
||||
BYTE* surface = win->surface + startOffset;
|
||||
|
||||
@@ -445,7 +445,7 @@ static void __fastcall DrawAlternateAmmoMetre(long x, long y) {
|
||||
fo::BoundRect rect;
|
||||
rect.x = x;
|
||||
rect.y = 26;
|
||||
rect.offx = x + 4;
|
||||
rect.offx = x + 3;
|
||||
rect.offy = 26 + 70;
|
||||
|
||||
fo::func::win_draw_rect(fo::var::interfaceWindow, (RECT*)&rect);
|
||||
|
||||
@@ -1043,7 +1043,7 @@ static __declspec(naked) void gmouse_bk_process_hook() {
|
||||
}
|
||||
}
|
||||
|
||||
static long ammoBarXPos = 461; // move ammo bar away from rivets (was 463)
|
||||
static long ammoBarXPos = 463; // default position
|
||||
|
||||
static __declspec(naked) void intface_update_ammo_lights_hack() {
|
||||
__asm {
|
||||
@@ -1407,9 +1407,9 @@ void Interface::init() {
|
||||
MakeCall(0x45F94F, intface_update_ammo_lights_hack);
|
||||
// Tweak for ammo bar position with HRP by Mash
|
||||
if (HRP::Setting::ExternalEnabled()) {
|
||||
ammoBarXPos = 465;
|
||||
if (IniReader::GetInt("IFACE", "ALTERNATE_AMMO_METRE", 0, ".\\f2_res.ini")) {
|
||||
ammoBarXPos -= 2;
|
||||
//ammoBarXPos = 467;
|
||||
if (!IniReader::GetInt("IFACE", "ALTERNATE_AMMO_METRE", 0, ".\\f2_res.ini")) {
|
||||
ammoBarXPos += 4;
|
||||
}
|
||||
}
|
||||
LoadGameHook::OnGameInit() += []() {
|
||||
|
||||
Reference in New Issue
Block a user