Skip to content

Commit 359b746

Browse files
committed
Implemented Display2DInfo and a lot of shit to make that possible:
* Added second font (proggyVector) at higher font scale so we can adjust display2dinfo font scale without it going pixelated * Added dataStringGetters to actually get the data & convert to string for displayinfo * Added GetAggroData service * Split out getting a bipeds vehicle datum into a seperate service (GetBipedsVehicleDatum) * Added safety check to GetObjectAddress that the tagElement entry salt matches the datum salt, added isValidDatum function * Added GetObjectHealth, GetObjectTagName, GetTagName services * Added new guiElement types (GUIColourPickerAlpha, GUIComboEnum, GUIVec2, GUIInputInt, GuiFloat) * Added better debugging to multiLevelPointer::dereferencePointer * Fixed some StrideableDynamicStruct code * Fixed Datum toString method
1 parent 0d1f798 commit 359b746

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+8760
-245
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputPath_Global>__UNDEFINED__</OutputPath_Global>
44
<OutputPath_Global Condition="Exists('$(SolutionDir)OutputPath.vsmacro')">"$([System.IO.File]::ReadAllText('$(SolutionDir)OutputPath.vsmacro').trim())"</OutputPath_Global>
5-
<VersionPrefix>3.0.1.0</VersionPrefix>
5+
<VersionPrefix>3.0.2.0</VersionPrefix>
66
</PropertyGroup>
77
</Project>
88

HCMExternal/ExternalPointerData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Root>
44
<!--If current HCM version isn't one of these, the user will be prompted that an update is available-->
55
<LatestHCMVersions>
6-
<Entry>3.0.1.0</Entry>
6+
<Entry>3.0.2.0</Entry>
77
</LatestHCMVersions>
88

99
<!--If the current HCM is one of these, HCM will refuse to start and the user will be prompted to update-->

HCMInternal/AdvanceTicks.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,20 @@ class AdvanceTicksImpl
102102

103103
}
104104
public:
105-
AdvanceTicksImpl(GameState gameImpl, IDIContainer& dicon)
106-
: mGame(gameImpl),
105+
AdvanceTicksImpl(GameState game, IDIContainer& dicon)
106+
: mGame(game),
107107
mAdvanceTicksCallbackHandle(dicon.Resolve<SettingsStateAndEvents>().lock()->advanceTicksEvent, [this]() { onAdvanceTicksEvent(); }),
108108
mccStateHookWeak(dicon.Resolve<IMCCStateHook>()),
109109
messagesGUIWeak(dicon.Resolve<IMessagesGUI>()),
110110
runtimeExceptions(dicon.Resolve<RuntimeExceptionHandler>()),
111-
settingsWeak(dicon.Resolve<SettingsStateAndEvents>())
111+
settingsWeak(dicon.Resolve<SettingsStateAndEvents>()),
112+
gameTickEventHookWeak(resolveDependentCheat(GameTickEventHook))
112113
{
113114
auto csc = dicon.Resolve<ControlServiceContainer>().lock();
114115

115116
if (!csc->pauseGameService.has_value()) throw HCMInitException("Cannot advance ticks without pause service");
116117
pauseServiceWeak = csc->pauseGameService.value();
117118

118-
gameTickEventHookWeak = std::dynamic_pointer_cast<GameTickEventHook>(dicon.Resolve<IMakeOrGetCheat>().lock()->getOrMakeCheat(std::make_pair(gameImpl, OptionalCheatEnum::GameTickEventHook), dicon));
119-
120119

121120
}
122121

HCMInternal/App.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class App {
108108
// set up optional cheats and optional gui elements
109109
auto guireq = std::make_shared<GUIRequiredServices>(); PLOGV << "guireq init"; // defines the gui elements we want to build and which optional cheats they will require
110110
auto cheatfail = std::make_shared<OptionalCheatInfo>(); PLOGV << "cheatfail init"; // stores info about failed optionalCheat construction (starts empty, obviously)
111-
auto optionalCheats = std::make_shared<OptionalCheatManager>(guireq, cheatfail, settings, ptr, ver, mccStateHook, sharedMem, mes, exp, dirPath, modal, control); PLOGV << "optionalCheats init"; // constructs and stores required optional cheats. Needs a lot of dependencies, cheats will only keep what they need.
111+
auto optionalCheats = std::make_shared<OptionalCheatManager>(guireq, cheatfail, settings, ptr, ver, mccStateHook, sharedMem, mes, exp, dirPath, modal, control, imm->BackgroundRenderEvent); PLOGV << "optionalCheats init"; // constructs and stores required optional cheats. Needs a lot of dependencies, cheats will only keep what they need.
112112

113113
auto guistore = std::make_shared<GUIElementStore>(); PLOGV << "guistore init"; // collection starts empty, populated later by GUIElementConstructor
114114
auto GUICon = std::make_shared<GUIElementConstructor>(guireq, cheatfail, guistore, guifail, settings, ver->getMCCProcessType()); PLOGV << "GUIMan init"; // constructs gui elements, pushing them into guistore

HCMInternal/BottomlessClip.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ BottomlessClip::BottomlessClip(GameState gameImpl, IDIContainer& dicon)
8383
pimpl = std::make_unique<BottomlessClipImplSetFlag<GameState::Value::Halo1>>(gameImpl, dicon);
8484
break;
8585

86+
case GameState::Value::Halo2:
87+
pimpl = std::make_unique<BottomlessClipImplSetFlag<GameState::Value::Halo2>>(gameImpl, dicon);
88+
break;
89+
8690

8791
default:
8892
throw HCMInitException("not impl yet");

HCMInternal/Conduit_ITCFont.cpp

Lines changed: 763 additions & 0 deletions
Large diffs are not rendered by default.

HCMInternal/Conduit_ITCFont.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#pragma once
2+
// Conduit ITC is the font used in Halo 1's menu text. It is not monospaced, so not suitable for the overlays that want to cleanly display floats etc
3+
4+
5+
// File: 'Conduit_ITC.ttf' (48600 bytes)
6+
// Exported using binary_to_compressed_c.cpp
7+
8+
static const unsigned int Conduit_ITCFont_compressed_size = 36246;
9+
extern const unsigned int Conduit_ITCFont_compressed_data[36248 / 4];

HCMInternal/Datum.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct Datum
1515

1616
friend std::ostream& operator<<(std::ostream& os, const Datum& dt)
1717
{
18-
os << std::hex << "0x" << (uint32_t)dt;
18+
os << std::hex << "0x" << std::uppercase << (uint32_t)dt << std::nouppercase;
1919
return os;
2020
}
2121

@@ -31,7 +31,7 @@ struct Datum
3131
std::string toString()
3232
{
3333
std::stringstream ss;
34-
ss << this;
34+
ss << *this;
3535
return ss.str();
3636
}
3737

0 commit comments

Comments
 (0)