Skip to content

Commit 5c4fae8

Browse files
GTA III/VC: Remove IVRadarScaling position changes (#1638)
These changes assumed the horizontal radar position doesn't scale, which is now not true with the upcoming SilentPatch. Therefore, those values caused the radar to move way too far to the right. For consistency, vertical position changes have been removed too, so now this option only alters the scaling, true to its name.
1 parent 4efa0bd commit 5c4fae8

File tree

3 files changed

+0
-47
lines changed

3 files changed

+0
-47
lines changed

includes/GTA/global.h

-5
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,8 @@ uint32_t ReplaceTextShadowWithOutline;
2626
bool DisableWhiteCrosshairDot;
2727
float fCustomRadarWidthIV;
2828
float fCustomRadarHeightIV;
29-
float fCustomRadarPosXIV;
30-
float fCustomRadarPosYIV;
3129
float fCustomRadarRingWidthIV;
3230
float fCustomRadarRingHeightIV;
33-
float fCustomRadarRingPosXIV;
34-
float fCustomRadarRingPosYIV;
35-
float fCustomRadarRingPosXIV2;
3631
std::string szSelectedMultisamplingLevels;
3732
uint32_t SelectedMultisamplingLevels;
3833
uint32_t* BordersVar1;

source/GTA3.WidescreenFix/dllmain.cpp

-17
Original file line numberDiff line numberDiff line change
@@ -607,35 +607,18 @@ void ApplyIniOptions()
607607

608608
if (bIVRadarScaling)
609609
{
610-
fCustomRadarPosXIV = 40.0f + 31.0f;
611-
auto pattern = hook::pattern("D8 05 ? ? ? ? DE C1 D9 19 8B 15 ? ? ? ? 89 14 24");
612-
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarPosXIV, true); //0x4A5075
613610
fCustomRadarWidthIV = 94.0f - 5.5f;
614611
pattern = hook::pattern("D8 0D ? ? ? ? DD DA D9 00 D8 CA");
615612
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarWidthIV, true); //0x4A505B
616613

617-
fCustomRadarPosYIV = 116.0f - 7.5f;
618-
pattern = hook::pattern("D9 05 ? ? ? ? 89 14 24 D8 CB DA 2C 24 DE C1 DE E1");
619-
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarPosYIV, true); //0x4A50B0
620614
fCustomRadarHeightIV = 76.0f + 5.0f;
621615
pattern = hook::pattern("D9 05 ? ? ? ? D8 C9 DD DA D9 40 04 D8 CA");
622616
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarHeightIV, true); //0x4A5093
623617

624-
fCustomRadarRingPosXIV = 34.0f + 31.0f;
625-
fCustomRadarRingPosXIV2 = fCustomRadarRingPosXIV + 6.0f;
626-
pattern = hook::pattern("FF 35 ? ? ? ? DD D8 E8 ? ? ? ? B9 ? ? ? ? 50");
627-
injector::WriteMemory(pattern.count(1).get(0).get<uint32_t>(2), &fCustomRadarRingPosXIV, true); //0x50845F
628-
pattern = hook::pattern("D8 05 ? ? ? ? D8 05 ? ? ? ? D9 1C 24 D9 C0 D8 25 ? ? ? ? 50");
629-
injector::WriteMemory(pattern.count(1).get(0).get<uint32_t>(2), &fCustomRadarRingPosXIV2, true); //0x508481
630-
631618
fCustomRadarRingWidthIV = 94.0f - 5.5f;
632619
pattern = hook::pattern("D8 0D ? ? ? ? D8 05 ? ? ? ? D8 05");
633620
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarRingWidthIV, true); //0x5FDC70
634621

635-
fCustomRadarRingPosYIV = 116.0f - 7.5f;
636-
pattern = hook::pattern("D9 05 ? ? ? ? D8 CA DA 6C 24 34 DD DA D8 C1");
637-
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarRingPosYIV); //0x508433
638-
639622
fCustomRadarRingHeightIV = 76.0f + 5.0f;
640623
pattern = hook::pattern("D9 05 ? ? ? ? D8 C9 D9 05 ? ? ? ? D8 CA DA 6C 24 34");
641624
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarRingHeightIV, true); //0x5FDC68

source/GTAVC.WidescreenFix/dllmain.cpp

-25
Original file line numberDiff line numberDiff line change
@@ -677,43 +677,18 @@ void ApplyIniOptions()
677677

678678
if (bIVRadarScaling)
679679
{
680-
fCustomRadarPosXIV = 40.0f + 31.0f;
681-
auto pattern = hook::pattern("D8 05 ? ? ? ? DE C1 D9 5C 24 28");
682-
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarPosXIV, true); //0x68FD2C
683-
static float f40 = 40.0f;
684-
pattern = hook::pattern("83 EC 50 DD D9 D9 05 ? ? ? ? D8 C9");
685-
injector::WriteMemory(pattern.count(1).get(0).get<uint32_t>(7), &f40, true); //0x4C2996
686-
injector::WriteMemory(pattern.count(1).get(0).get<uint32_t>(60), &f40, true); //0x4C29CB
687-
688680
fCustomRadarWidthIV = 94.0f - 5.5f;
689681
pattern = hook::pattern("D8 0D ? ? ? ? DD D9 D9 C2 D8 C9 D8 0D");
690682
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarWidthIV, true); //0x68FD24
691683

692-
fCustomRadarPosYIV = 116.0f - 7.5f;
693-
pattern = hook::pattern("D9 05 ? ? ? ? D8 CB DA 2C 24 DE C1");
694-
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarPosYIV, true); //0x68FD34
695684
fCustomRadarHeightIV = 76.0f + 5.0f;
696685
pattern = hook::pattern("D9 05 ? ? ? ? D8 C9 DD DB D9 C1 D8 CB");
697686
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarHeightIV, true); //0x68FD30
698687

699-
fCustomRadarRingPosXIV = 34.0f + 31.0f;
700-
fCustomRadarRingPosXIV2 = fCustomRadarRingPosXIV + 6.0f;
701-
pattern = hook::pattern("C7 84 24 80 04 00 00 00 00 08 42");
702-
injector::WriteMemory<float>(pattern.count(1).get(0).get<uint32_t>(7), fCustomRadarRingPosXIV, true); //0x55A956
703-
pattern = hook::pattern("C7 84 24 A0 04 00 00 00 00 08 42");
704-
injector::WriteMemory<float>(pattern.count(1).get(0).get<uint32_t>(7), fCustomRadarRingPosXIV, true); //0x55AA94
705-
pattern = hook::pattern("D8 05 ? ? ? ? D8 05 ? ? ? ? D9 9C 24");
706-
injector::WriteMemory(pattern.count(2).get(0).get<uint32_t>(2), &fCustomRadarRingPosXIV2, true); //0x55A9AC + 0x2
707-
injector::WriteMemory(pattern.count(2).get(1).get<uint32_t>(2), &fCustomRadarRingPosXIV2, true); //0x55AAE5 + 0x2
708-
709688
fCustomRadarRingWidthIV = 94.0f - 5.5f;
710689
pattern = hook::pattern("D8 0D ? ? ? ? D8 05 ? ? ? ? D8 05 ? ? ? ? D9 9C 24 98 04 00 00");
711690
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarRingWidthIV, true); //0x697C1C
712691

713-
fCustomRadarRingPosYIV = 116.0f - 7.5f;
714-
pattern = hook::pattern("D9 05 ? ? ? ? D8 CA DA 6C 24 74 51");
715-
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarRingPosYIV, true); //0x697C18
716-
717692
fCustomRadarRingHeightIV = 76.0f + 5.0f;
718693
pattern = hook::pattern("D9 05 ? ? ? ? D8 CA D8 C1");
719694
injector::WriteMemory<float>(*pattern.count(1).get(0).get<uint32_t*>(2), fCustomRadarRingHeightIV, true); //0x697C20

0 commit comments

Comments
 (0)