From ea4ec1f856ef26da450b03e9c317aec6bd5dcfdc Mon Sep 17 00:00:00 2001 From: MonsterDruide1 <5958456@gmail.com> Date: Tue, 1 Jul 2025 14:40:32 +0200 Subject: [PATCH] all: Improvements based on `listsym` (#669) --- data/file_list.yml | 20 ++++++++++++-------- lib/al/Library/Yaml/MacroUtil.cpp | 14 -------------- lib/al/Library/Yaml/MacroUtil.h | 14 +++++++------- lib/al/Project/File/FileLoader.cpp | 2 +- src/Sequence/WorldResourceLoader.cpp | 5 +++-- 5 files changed, 23 insertions(+), 32 deletions(-) diff --git a/data/file_list.yml b/data/file_list.yml index 5dac8f76..5442f629 100644 --- a/data/file_list.yml +++ b/data/file_list.yml @@ -146028,8 +146028,9 @@ Sequence/WorldResourceLoader.o: lazy: true - offset: 0x514bf0 size: 32 - label: '' - status: NotDecompiled + label: _GLOBAL__sub_I_WorldResourceLoader.cpp + status: Matching + guess: true System/AchievementSaveData.o: '.text': - offset: 0x514c10 @@ -208090,8 +208091,9 @@ Util/YoshiUtil.o: status: Matching - offset: 0x765ca0 size: 32 - label: '' - status: NotDecompiled + label: _GLOBAL__sub_I_seadTickSpan.cpp + status: Matching + guess: true - offset: 0x765cc0 size: 80 label: _ZNK4sead10CoreIdMask11countOnBitsEv @@ -208110,8 +208112,9 @@ Util/YoshiUtil.o: status: NonMatchingMajor - offset: 0x765dec size: 192 - label: '' - status: NotDecompiled + label: _GLOBAL__sub_I_seadCoreInfo.cpp + status: NonMatchingMajor + guess: true - offset: 0x765eac size: 244 label: @@ -316863,8 +316866,9 @@ Unknown/SePlayer.o: lazy: true - offset: 0xb5a824 size: 56 - label: '' - status: NotDecompiled + label: _GLOBAL__sub_I_seadAssertConfig.cpp + status: NonMatchingMajor + guess: true - offset: 0xb5a85c size: 120 label: _ZN4sead13DelegateEventIRKNS_16ExceptionHandler11InformationEED2Ev diff --git a/lib/al/Library/Yaml/MacroUtil.cpp b/lib/al/Library/Yaml/MacroUtil.cpp index c37cd1c2..586fc4f6 100644 --- a/lib/al/Library/Yaml/MacroUtil.cpp +++ b/lib/al/Library/Yaml/MacroUtil.cpp @@ -127,8 +127,6 @@ void YamlParamGroup::readParam(const al::ByamlIter& iter) { } } -YamlParam_YamlString::YamlParam_YamlString(const char* name) : YamlParamBase(name) {} - YamlClassId YamlParam_YamlString::getClassId() const { return YamlClassId::String; } @@ -137,8 +135,6 @@ void YamlParam_YamlString::setPtr_YamlString(const char** value) { setParamPtr(value); } -YamlParam_V3f::YamlParam_V3f(const char* name) : YamlParamBase(name) {} - YamlClassId YamlParam_V3f::getClassId() const { return YamlClassId::V3f; } @@ -147,8 +143,6 @@ void YamlParam_V3f::setPtr_V3f(sead::Vector3f* value) { setParamPtr(value); } -YamlParam_YamlColor::YamlParam_YamlColor(const char* name) : YamlParamBase(name) {} - YamlClassId YamlParam_YamlColor::getClassId() const { return YamlClassId::Color; } @@ -157,8 +151,6 @@ void YamlParam_YamlColor::setPtr_YamlColor(sead::Color4f* value) { setParamPtr(value); } -YamlParam_bool::YamlParam_bool(const char* name) : YamlParamBase(name) {} - YamlClassId YamlParam_bool::getClassId() const { return YamlClassId::Bool; } @@ -167,8 +159,6 @@ void YamlParam_bool::setPtr_bool(bool* value) { setParamPtr(value); } -YamlParam_u8::YamlParam_u8(const char* name) : YamlParamBase(name) {} - YamlClassId YamlParam_u8::getClassId() const { return YamlClassId::U8; } @@ -177,8 +167,6 @@ void YamlParam_u8::setPtr_u8(u8* value) { setParamPtr(value); } -YamlParam_f32::YamlParam_f32(const char* name) : YamlParamBase(name) {} - YamlClassId YamlParam_f32::getClassId() const { return YamlClassId::F32; } @@ -187,8 +175,6 @@ void YamlParam_f32::setPtr_f32(f32* value) { setParamPtr(value); } -YamlParam_V2f::YamlParam_V2f(const char* name) : YamlParamBase(name) {} - YamlClassId YamlParam_V2f::getClassId() const { return YamlClassId::V2f; } diff --git a/lib/al/Library/Yaml/MacroUtil.h b/lib/al/Library/Yaml/MacroUtil.h index 23c2d3bf..9675b11b 100644 --- a/lib/al/Library/Yaml/MacroUtil.h +++ b/lib/al/Library/Yaml/MacroUtil.h @@ -102,7 +102,7 @@ private: class YamlParam_YamlString : public YamlParamBase { public: - YamlParam_YamlString(const char* name); + YamlParam_YamlString(const char* name) : YamlParamBase(name) {} YamlClassId getClassId() const override; void setPtr_YamlString(const char** value) override; @@ -110,7 +110,7 @@ public: class YamlParam_V3f : public YamlParamBase { public: - YamlParam_V3f(const char* name); + YamlParam_V3f(const char* name) : YamlParamBase(name) {} YamlClassId getClassId() const override; void setPtr_V3f(sead::Vector3f* value) override; @@ -118,7 +118,7 @@ public: class YamlParam_YamlColor : public YamlParamBase { public: - YamlParam_YamlColor(const char* name); + YamlParam_YamlColor(const char* name) : YamlParamBase(name) {} YamlClassId getClassId() const override; void setPtr_YamlColor(sead::Color4f* value) override; @@ -126,7 +126,7 @@ public: class YamlParam_bool : public YamlParamBase { public: - YamlParam_bool(const char* name); + YamlParam_bool(const char* name) : YamlParamBase(name) {} YamlClassId getClassId() const override; void setPtr_bool(bool* value) override; @@ -134,7 +134,7 @@ public: class YamlParam_u8 : public YamlParamBase { public: - YamlParam_u8(const char* name); + YamlParam_u8(const char* name) : YamlParamBase(name) {} YamlClassId getClassId() const override; void setPtr_u8(u8* value) override; @@ -142,7 +142,7 @@ public: class YamlParam_f32 : public YamlParamBase { public: - YamlParam_f32(const char* name); + YamlParam_f32(const char* name) : YamlParamBase(name) {} YamlClassId getClassId() const override; void setPtr_f32(f32* value) override; @@ -150,7 +150,7 @@ public: class YamlParam_V2f : public YamlParamBase { public: - YamlParam_V2f(const char* name); + YamlParam_V2f(const char* name) : YamlParamBase(name) {} YamlClassId getClassId() const override; void setPtr_V2f(sead::Vector2f* value) override; diff --git a/lib/al/Project/File/FileLoader.cpp b/lib/al/Project/File/FileLoader.cpp index 86217819..144d8262 100644 --- a/lib/al/Project/File/FileLoader.cpp +++ b/lib/al/Project/File/FileLoader.cpp @@ -14,7 +14,7 @@ #include "Project/File/SoundItemHolder.h" namespace al { -static sead::FixedSafeString<256> sDeviceName{"main"}; +static sead::SafeString sDeviceName{"main"}; FileLoader::FileLoader(s32 threadPriority) { mLoaderThread = new FileLoaderThread(threadPriority); diff --git a/src/Sequence/WorldResourceLoader.cpp b/src/Sequence/WorldResourceLoader.cpp index f7c91509..bf02bda0 100644 --- a/src/Sequence/WorldResourceLoader.cpp +++ b/src/Sequence/WorldResourceLoader.cpp @@ -9,7 +9,8 @@ #include "Library/Yaml/ByamlIter.h" #include "Library/Yaml/ByamlUtil.h" -const s32 priority = sead::Thread::cDefaultPriority; +const s32 cDefaultPriority = sead::Thread::cDefaultPriority; +const s32 cPriority = cDefaultPriority + 6; WorldResourceLoader::WorldResourceLoader(GameDataHolder* dataHolder) : mDataHolder(dataHolder) { using WorldResourceLoaderFunctor = @@ -17,7 +18,7 @@ WorldResourceLoader::WorldResourceLoader(GameDataHolder* dataHolder) : mDataHold mWorldResourceLoader = new al::AsyncFunctorThread( "WorldResourceLoader", WorldResourceLoaderFunctor{this, &WorldResourceLoader::loadResource}, - priority, 0x100000, sead::CoreId::cMain); + cPriority, 0x100000, sead::CoreId::cMain); } WorldResourceLoader::~WorldResourceLoader() {