Skip to content

Commit 610aead

Browse files
Implement dynamic UI aspect ratio scaling, VERT+ and controller icons (#145)
* Dynamic UI aspect ratio and controller icons support (WIP) Lots of stuff here, just pushing everything to keep my changes focused. Will take a cautionary glance at everything before a PR is considered. Unfinished work ahead!! * Apply config controller icons first before auto * CsdManager: use Sonicteam::System::Singleton * Implement pillarboxing on loading screens and CSD repeat modifiers * Fix macOS build * Align main menu plates to bottom * Apply scaling to main HUD and radar * Fix main menu seams and boss name alignment * Clean-up, added CSD alignment for multiplayer HUDs * Fix radar and controller icons, aligned main menu titlebar effect * Truncate XNCPs with language names to redirect CSD modifiers * Results CSD adjustments * Check suffix against XNCP name case insensitive * Remove battle_result language suffix * Fix Audio/Theatre Room "pod" box fill * Implement ultrawide main menu chevron animation (WIP) TODO: - Make the last two foreground arrows on the left slightly more opaque and fade out later. - Make the background arrows fade out first before the foreground starts fading. * Added ultrawide-only CSD modifier * Improve ultrawide chevron offset and alpha motion * Improve text scaling Co-Authored-By: Skyth (Asilkan) <[email protected]> * Improve narrow UI scaling * Fixed button prompts with short strings not changing platform * Fixed 2P UI element not extending properly at ultrawide * Align CRI technology logos to the bottom right corner * Fix chevron animation offset with centred UI Alignment Mode * Remove result debug key * Scale town NPC balloon icons * Clean-up * API: radar research * API: TextBook research * Align mission timer to the top of the screen * Move Unicode string functions to Marathon.inl * Implement text entity modifiers Co-Authored-By: Skyth (Asilkan) <[email protected]> * Fix message window vertical alignment * Support letterboxing in ImGui black bar * Remove main menu vertical alignments This will only scale the main menu instead, allowing narrow aspect ratios to look a bit more proper. Needs work to extend the metal plates past 16:9. * Remove mission timer alignment for centred mode at narrow aspect ratios * Align talk window to bottom and fix loading screen scaling * Implement VERT+ * Fix NPC balloon icon scale at narrow aspect ratios * Align NPC dialogue window text to bottom * API: mapped cameras in GameImp * Scale main menu borders for narrow aspect ratios * Fix multiplayer main menu text lingering at ultrawide * Fix multiplayer gauge and itembox alignment * Draw letter/pillarbox for credits * API: remove self include from FrameObserver * API: fix camera mappings in GameImp * API: rename field in HudTextParts * Copy font picture on resource load * Only store font picture texture dimensions * Fix overlapping vertices * Only extend metal borders at aspect ratios narrower than 4:3 --------- Co-authored-by: Skyth (Asilkan) <[email protected]>
1 parent b3fe6a3 commit 610aead

File tree

106 files changed

+4055
-712
lines changed

Some content is hidden

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

106 files changed

+4055
-712
lines changed

MarathonRecomp/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ set(MARATHON_RECOMP_PATCHES_CXX_SOURCES
140140
"patches/camera_patches.cpp"
141141
"patches/fps_patches.cpp"
142142
"patches/frontend_listener.cpp"
143+
"patches/loading_patches.cpp"
144+
"patches/MainMenuTask_patches.cpp"
143145
"patches/misc_patches.cpp"
144146
"patches/player_patches.cpp"
145147
"patches/SaveDataTask_patches.cpp"

MarathonRecomp/api/CSD/Manager/csdmNode.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,5 @@ namespace Chao::CSD
1616
MARATHON_INSERT_PADDING(0x34);
1717
xpointer<CMotionPattern> m_pMotionPattern;
1818
MARATHON_INSERT_PADDING(0x18);
19-
20-
~CNode();
21-
22-
void SetText(const char* in_pText);
23-
void SetText(const wchar_t* in_pText);
24-
void SetPosition(float in_X, float in_Y);
25-
void SetHideFlag(uint32_t in_HideFlag);
26-
void SetRotation(float in_Rotation);
27-
void SetScale(float in_X, float in_Y);
28-
void SetPatternIndex(uint32_t in_PatternIndex);
2919
};
3020
}
31-
32-
#include <CSD/Manager/csdmNode.inl>

MarathonRecomp/api/CSD/Manager/csdmNode.inl

Lines changed: 0 additions & 44 deletions
This file was deleted.

MarathonRecomp/api/CSD/Manager/csdmNodeObserver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "CSD/Manager/csdmObserverBase.h"
3+
#include <CSD/Manager/csdmObserverBase.h>
44

55
namespace Chao::CSD
66
{
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "Marathon.inl"
3+
#include <Marathon.inl>
44

55
namespace Chao::CSD
66
{
@@ -10,14 +10,10 @@ namespace Chao::CSD
1010
public:
1111
struct Vftable
1212
{
13-
be<uint32_t> m_fpDtor;
13+
be<uint32_t> fpDestroy;
1414
};
1515

1616
xpointer<Vftable> m_pVftable;
1717
MARATHON_INSERT_PADDING(0x08);
18-
19-
~CObserverBase();
2018
};
2119
}
22-
23-
#include "CSD/Manager/csdmObserverBase.inl"

MarathonRecomp/api/CSD/Manager/csdmObserverBase.inl

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
#pragma once
22

3-
#include "Marathon.inl"
4-
#include "CSD/Manager/csdmBase.h"
5-
#include "CSD/Manager/csdmResourceBase.h"
3+
#include <Marathon.inl>
4+
#include <CSD/Manager/csdmBase.h>
5+
#include <CSD/Manager/csdmResourceBase.h>
66

77
namespace Chao::CSD
88
{
9-
struct Project;
9+
class SceneNode;
1010
class CProject;
1111
class CScene;
1212
class CTexList;
1313

14+
struct Project
15+
{
16+
xpointer<SceneNode> pRootNode;
17+
};
18+
1419
class CProject : public CResourceBase<Project>, CBase
1520
{
1621
public:
1722
MARATHON_INSERT_PADDING(0x1C);
1823
RCPtr<CTexList> m_rcTexList;
1924
MARATHON_INSERT_PADDING(0x1C);
20-
21-
RCPtr<CScene> CreateScene(const char* in_pName) const;
22-
RCPtr<CScene> CreateScene(const char* in_pName, const char* in_pMotionName) const;
23-
24-
void DestroyScene(CScene* in_pScene);
25-
void DestroyScene(RCPtr<CScene>& inout_rcScene);
26-
27-
static void DestroyScene(CProject* in_pProject, RCPtr<CScene>& inout_rcScene);
2825
};
2926
}
30-
31-
#include "CSD/Manager/csdmProject.inl"

MarathonRecomp/api/CSD/Manager/csdmProject.inl

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "CSD/Manager/csdmRCPtrAbs.h"
3+
#include <CSD/Manager/csdmRCPtrAbs.h>
44

55
namespace Chao::CSD
66
{
@@ -9,20 +9,14 @@ namespace Chao::CSD
99
public:
1010
struct Vftable
1111
{
12-
be<uint32_t> m_fpDtor;
13-
be<uint32_t> m_fpDeallocate;
12+
be<uint32_t> fpDestroy;
13+
be<uint32_t> fpDeallocate;
1414
};
1515

1616
xpointer<Vftable> m_pVftable;
1717
xpointer<void> m_pMemory;
1818
be<uint32_t> m_RefCount;
1919
xpointer<void> m_pDealloctor;
2020
be<uint32_t> m_eDealloctor;
21-
22-
~RCObject();
23-
void Deallocate(void* in_pMemory);
24-
void Release();
2521
};
2622
}
27-
28-
#include "CSD/Manager/csdmRCObject.inl"

MarathonRecomp/api/CSD/Manager/csdmRCObject.inl

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)