Skip to content

Commit

Permalink
Merge pull request #130 from Pistonight/layout_resource_mgr
Browse files Browse the repository at this point in the history
LayoutResourceMgr
  • Loading branch information
leoetlino authored Oct 20, 2024
2 parents 0f88ba6 + c4e0a55 commit aa3914c
Show file tree
Hide file tree
Showing 12 changed files with 536 additions and 43 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/lint_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/[email protected]
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: DoozyX/[email protected]
with:
source: 'src'
exclude: 'lib'
Expand Down
31 changes: 16 additions & 15 deletions data/data_symbols.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
0x0000007101e9fe68,_ZN4sead8Matrix34IfE5identE
0x0000007101e9ff18,_ZN4sead7Vector3IfE4zeroE
0x0000007101e9ff48,_ZN4sead7Vector3IfE4onesE
0x0000007101E9FE68,_ZN4sead8Matrix34IfE5identE
0x0000007101E9FF18,_ZN4sead7Vector3IfE4zeroE
0x0000007101E9FF48,_ZN4sead7Vector3IfE4onesE
0x00000071023556B0,_ZTVN4sead14SafeStringBaseIcEE
0x0000007102356AF0,_ZTVN4sead22BufferedSafeStringBaseIcEE
0x000000710246F9E0,_ZN4ksys3gdt6detail13sCommonFlags0E
Expand All @@ -20,6 +20,9 @@
0x00000071024C1600,_ZTVN3agl3utl9ParameterIN4sead15FixedSafeStringILi64EEEEE
0x00000071024C16A0,_ZTVN3agl3utl9ParameterIN4sead15FixedSafeStringILi256EEEEE
0x00000071024C1740,_ZTVN3agl3utl9ParameterIN4sead14SafeStringBaseIcEEEE
0x00000071024C6600,_ZN6xlink216ContainerCreator17sContainerSizeMaxE
0x00000071024C68A8,_ZN6xlink215sMinAddressHighE
0x00000071024C68B0,_ZN6xlink214sMinAddressLowE
0x00000071024D8D58,_ZTVN4ksys3act2ai10ActionBaseE
0x00000071025129E0,_ZTVN4ksys3act2ai6ActionE
0x0000007102513268,_ZTVN4ksys3act2ai2AiE
Expand Down Expand Up @@ -500,17 +503,15 @@
0x00000071025F8480,pfnc_nvnEventSignal
0x00000071025F8488,pfnc_nvnCommandBufferWaitEvent
0x00000071025F8490,pfnc_nvnCommandBufferSignalEvent
0x0000007102606910,_ZN4ksys12SystemTimers9sInstanceE
0x0000007102650608,_ZN4ksys3act11BaseProcMgr9sInstanceE
0x00000071025F9CB0,_ZN3agl6driver17GraphicsDriverMgr18SingletonDisposer_15sStaticDisposerE
0x00000071025F9CB8,_ZN3agl6driver17GraphicsDriverMgr9sInstanceE
0x00000071024c6600,_ZN6xlink216ContainerCreator17sContainerSizeMaxE
0x00000071024c68a8,_ZN6xlink215sMinAddressHighE
0x00000071024c68b0,_ZN6xlink214sMinAddressLowE
0x00000071025fb508,_ZN3aal6System9sInstanceE
0x00000071025fc7f0,_ZN6xlink211SystemSLink9sInstanceE
0x00000071025fc7f8,_ZN6xlink211SystemSLink10sLockProxyE
0x00000071025fc878,_ZZNK6xlink214ResourceBuffer18getEmptyUserHeaderEvE6sDummy
0x00000071025fc8b0,_ZZNK6xlink214ResourceBuffer24getEmptyRomResourceParamEvE6sDummy
0x00000071025fc948,_ZZNK6xlink214ResourceBuffer24getEmptyRomResourceParamEvE6sDummy
0x00000071025fc950,_ZN6xlink27Locator16sDataLoadedCountE
0x00000071025FB508,_ZN3aal6System9sInstanceE
0x00000071025FC7F0,_ZN6xlink211SystemSLink9sInstanceE
0x00000071025FC7F8,_ZN6xlink211SystemSLink10sLockProxyE
0x00000071025FC878,_ZZNK6xlink214ResourceBuffer18getEmptyUserHeaderEvE6sDummy
0x00000071025FC8B0,_ZZNK6xlink214ResourceBuffer24getEmptyRomResourceParamEvE6sDummy
0x00000071025FC948,_ZZNK6xlink214ResourceBuffer24getEmptyRomResourceParamEvE6sDummy
0x00000071025FC950,_ZN6xlink27Locator16sDataLoadedCountE
0x0000007102606910,_ZN4ksys12SystemTimers9sInstanceE
0x000000710261EB90,_ZN4ksys2ui17LayoutResourceMgr9sInstanceE
0x0000007102650608,_ZN4ksys3act11BaseProcMgr9sInstanceE
50 changes: 25 additions & 25 deletions data/uking_functions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -81790,7 +81790,7 @@ Address,Quality,Size,Name
0x0000007100f3a528,U,000016,
0x0000007100f3a538,U,000756,ui::init
0x0000007100f3a82c,U,000172,createRegionLanguageMgr
0x0000007100f3a8d8,U,002276,ksys::PreInitializeApp
0x0000007100f3a8d8,W,002276,_ZN4ksys16preInitializeAppERKNS_10InitParamsE
0x0000007100f3b1bc,U,000132,checkPreInitializeResourcesStillLoading
0x0000007100f3b240,U,007612,ksys::InitializeApp
0x0000007100f3cffc,O,000388,_ZN4ksys15initBaseProcMgrEPN4sead4HeapE
Expand Down Expand Up @@ -88328,31 +88328,31 @@ Address,Quality,Size,Name
0x00000071010a2294,U,000008,
0x00000071010a229c,U,000040,
0x00000071010a22c4,U,000372,
0x00000071010a2438,U,000112,
0x00000071010a24a8,U,000120,
0x00000071010a2520,U,000284,LayoutResourceMgr::createInstance
0x00000071010a263c,U,000268,LayoutResourceMgr::init
0x00000071010a2748,U,000424,LayoutResourceMgr::loadMsgPack
0x00000071010a28f0,U,000384,LayoutResourceMgr::__auto2
0x00000071010a2a70,U,000260,LayoutResourceMgr::loadLangFont
0x00000071010a2b74,U,000388,LayoutResourceMgr::__auto0
0x00000071010a2cf8,U,000680,LayoutResourceMgr::loadFonts
0x00000071010a2fa0,U,000188,LayoutResourceMgr::ready
0x00000071010a305c,U,000136,LayoutResourceMgr::ready_0
0x00000071010a30e4,U,000136,LayoutResourceMgr::loadVersion
0x00000071010a316c,U,000372,LayoutResourceMgr::ready_1
0x00000071010a32e0,U,001584,
0x00000071010a2438,O,000112,_ZN4ksys2ui17LayoutResourceMgr18SingletonDisposer_D1Ev
0x00000071010a24a8,O,000120,_ZN4ksys2ui17LayoutResourceMgr18SingletonDisposer_D0Ev
0x00000071010a2520,O,000284,_ZN4ksys2ui17LayoutResourceMgr14createInstanceEPN4sead4HeapE
0x00000071010a263c,O,000268,_ZN4ksys2ui17LayoutResourceMgr4initEPN4sead4HeapE
0x00000071010a2748,O,000424,_ZN4ksys2ui17LayoutResourceMgr11loadMsgPackEPj
0x00000071010a28f0,U,000384,LayoutResourceMgr::loadGrammarArticleMaxLen
0x00000071010a2a70,O,000260,_ZN4ksys2ui17LayoutResourceMgr12loadLangFontEPN4sead4HeapE
0x00000071010a2b74,U,000388,LayoutResourceMgr::initializeFontMgr
0x00000071010a2cf8,O,000680,_ZN4ksys2ui17LayoutResourceMgr18loadExtraLangFontsEPN4sead4HeapE
0x00000071010a2fa0,O,000188,_ZN4ksys2ui17LayoutResourceMgr18checkLangFontReadyEv
0x00000071010a305c,O,000136,_ZNK4ksys2ui17LayoutResourceMgr24checkExtraLangFontsReadyEv
0x00000071010a30e4,O,000136,_ZN4ksys2ui17LayoutResourceMgr11loadVersionEv
0x00000071010a316c,O,000372,_ZN4ksys2ui17LayoutResourceMgr17checkVersionReadyEv
0x00000071010a32e0,U,001584,LayoutResourceMgr::doSomethingWithFontTextureCache
0x00000071010a3910,W,000064,_ZN4sead12PerfJobQueue13measureEndRunEv
0x00000071010a3950,U,000072,LayoutResourceMgr::loadLayoutCommonArchive
0x00000071010a3998,U,000288,LayoutResourceMgr::loadArcResource
0x00000071010a3ab8,U,000104,
0x00000071010a3b20,U,000208,
0x00000071010a3bf0,U,000016,
0x00000071010a3c00,U,000104,
0x00000071010a3c68,U,000264,LayoutResourceMgr::x
0x00000071010a3d70,U,000076,
0x00000071010a3dbc,U,000068,
0x00000071010a3e00,U,000168,
0x00000071010a3950,O,000072,_ZN4ksys2ui17LayoutResourceMgr23loadCommonLayoutArchiveEPN4sead7ExpHeapE
0x00000071010a3998,O,000288,_ZN4ksys2ui17LayoutResourceMgr15loadArcResourceERNS1_7ArchiveEPKc
0x00000071010a3ab8,O,000104,_ZN4ksys2ui17LayoutResourceMgr8unloadA8Ev
0x00000071010a3b20,O,000208,_ZN4ksys2ui17LayoutResourceMgr15loadTitleLayoutEPN4sead4HeapE
0x00000071010a3bf0,O,000016,_ZN4ksys2ui17LayoutResourceMgr23loadTitleLayoutResourceEv
0x00000071010a3c00,O,000104,_ZN4ksys2ui17LayoutResourceMgr17unloadTitleLayoutEv
0x00000071010a3c68,O,000264,_ZN4ksys2ui17LayoutResourceMgr15loadHorseLayoutEPN4sead4HeapE
0x00000071010a3d70,O,000076,_ZN4ksys2ui17LayoutResourceMgr23loadHorseLayoutResourceEv
0x00000071010a3dbc,O,000068,_ZNK4ksys2ui17LayoutResourceMgr25hasHorseLayoutLoadFailureEv
0x00000071010a3e00,O,000168,_ZN4ksys2ui17LayoutResourceMgr17unloadHorseLayoutEv
0x00000071010a3ea8,U,000104,ScreenLoadSaveIcon::ctor
0x00000071010a3f10,U,000044,
0x00000071010a3f3c,U,000048,
Expand Down
2 changes: 1 addition & 1 deletion lib/NintendoSDK
Submodule NintendoSDK updated 140 files
5 changes: 5 additions & 0 deletions src/KingSystem/System/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
target_sources(uking PRIVATE
UI/ArcResource.h
UI/ArcResourceMgr.h
UI/LayoutResourceMgr.cpp
UI/LayoutResourceMgr.h

Account.cpp
Account.h
AutoDim.cpp
Expand Down
33 changes: 33 additions & 0 deletions src/KingSystem/System/UI/ArcResource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma once

#include <heap/seadDisposer.h>
#include <prim/seadSafeString.h>
#include "KingSystem/Utils/Types.h"

namespace ksys {
namespace res {
class Handle;
}
namespace ui {

class ArcResourceMgr;

class ArcResource : public sead::IDisposer {
public:
ArcResource() = default;

void init(ArcResourceMgr* mgr, const sead::SafeString& name, u8* data, res::Handle* handle);

private:
void* _20;
void* _28;
ArcResourceMgr* mArcResourceMgr;
sead::FixedSafeString<0x40> mName;
u8* mData;
void* mFile;
res::Handle* mHandle;
};
KSYS_CHECK_SIZE_NX150(ArcResource, 0xA8);

} // namespace ui
} // namespace ksys
34 changes: 34 additions & 0 deletions src/KingSystem/System/UI/ArcResourceMgr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#pragma once

#include <container/seadTList.h>
#include <prim/seadSafeString.h>
#include "KingSystem/System/UI/ArcResource.h"
#include "KingSystem/Utils/Types.h"

namespace sead {
class ExpHeap;
}

namespace ksys::ui {

class ArcResourceMgr {
public:
ArcResourceMgr() = default;
virtual ~ArcResourceMgr();

virtual void sub_10();
virtual void loadArchive(sead::Heap* heap, const sead::SafeString& path);
virtual void sub_20();
virtual void sub_28();
virtual void addArchive(ArcResource* archive);

private:
// TODO: fields
/* sead::TList */
char list[0x10];
int _18 = 0;
int _1c = 0x20;
};
KSYS_CHECK_SIZE_NX150(ArcResourceMgr, 0x20);

} // namespace ksys::ui
Loading

0 comments on commit aa3914c

Please sign in to comment.