Skip to content

Commit 6efd22e

Browse files
committed
Underworld font readiness
1 parent 4fb82e9 commit 6efd22e

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

src/Options.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ void Options::DrawOptions() noexcept
2323
{
2424
ImGui::Begin("Options", &m_show);
2525

26+
#ifndef TR8
2627
if (ImGui::CollapsingHeader("General"))
2728
{
2829
DrawComboOption("IntroSkip", "Legal screen and intros", { "Don't skip", "Skip legal", "Skip legal and intros" });
2930
DrawCheckOption("NoCinematicBars", "Disable cinematic bars");
3031
DrawCheckOption("NoMotionBlur", "Disable motion blur");
3132
}
33+
#endif
3234

3335
if (ImGui::CollapsingHeader("Camera"))
3436
{

src/game/Game.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ struct VertexPool;
1010

1111
enum MainState
1212
{
13+
#ifndef TR8
1314
MS_NONE,
1415
MS_PLAYGAME,
1516
MS_LOADLEVEL,
@@ -20,7 +21,15 @@ enum MainState
2021
MS_SHOW_STATIC_SCREEN,
2122
MS_QUITGAME,
2223
MS_PLAY_DARKCHRONICLE_CINEMATIC,
23-
MS_PLAY_DARKCHRONICLE_CINEMATICMOVIE,
24+
MS_PLAY_DARKCHRONICLE_CINEMATICMOVIE
25+
#else
26+
MS_NONE,
27+
MS_PLAYGAME,
28+
MS_LOADLEVEL,
29+
MS_PLAY_CINEMATIC = 5,
30+
MS_SHOW_STATIC_SCREEN = 6,
31+
MS_DISPLAY_MAIN_MENU = 10
32+
#endif
2433
};
2534

2635
struct WipeInfo

src/modules/MainMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ void MainMenu::OnFrame()
185185
{
186186
#ifndef TR8
187187
// Shows the watermark in th main menu
188-
auto mainState = *(int*)GET_ADDRESS(0x10E5868, 0x838838, 0x000000);
188+
auto mainState = *(int*)GET_ADDRESS(0x10E5868, 0x838838, 0xE7ED60);
189189

190190
if (mainState == MS_DISPLAY_MAIN_MENU && !m_noWatermark.GetValue())
191191
{

src/render/Font.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void Font::GetCursor(float* x, float* y) noexcept
4040

4141
void Font::SetScale(float scaleX, float scaleY) noexcept
4242
{
43-
auto addr = GET_ADDRESS(0x431860, 0x433E60, 0x000000);
43+
auto addr = GET_ADDRESS(0x431860, 0x433E60, 0x474D50);
4444

4545
Hooking::Call(addr, scaleX, scaleY);
4646
}
@@ -87,14 +87,14 @@ void Font::PrintFormatted(const char* formatted, int backdrop) const noexcept
8787

8888
float Font::GetTextWidth(const char* text) const noexcept
8989
{
90-
auto addr = GET_ADDRESS(0x431EA0, 0x434510, 0x000000);
90+
auto addr = GET_ADDRESS(0x431EA0, 0x434510, 0x4758C0);
9191

9292
return Hooking::ThisCallReturn<float>(addr, this, text);
9393
}
9494

9595
float Font::GetHeight() const noexcept
9696
{
97-
auto addr = GET_ADDRESS(0x431E20, 0x434440, 0x000000);
97+
auto addr = GET_ADDRESS(0x431E20, 0x434440, 0x475870);
9898

9999
return Hooking::ThisCallReturn<float>(addr, this);
100100
}
@@ -104,7 +104,7 @@ void Font::OnFlush(std::function<void()> callback) noexcept
104104
if (!s_callback)
105105
{
106106
// TODO pattern
107-
auto addr = GET_ADDRESS(0x432570, 0x434C40, 0x476D80);
107+
auto addr = GET_ADDRESS(0x432570, 0x434C40, 0x5C5A30);
108108

109109
MH_CreateHook((void*)addr, Flush, (void**)&s_Flush);
110110
MH_EnableHook(MH_ALL_HOOKS);

0 commit comments

Comments
 (0)