Move all header files to proper paths

Co-authored-by: Sanae <atmatm6000@outlook.com>
This commit is contained in:
MonsterDruide1 2023-08-08 18:37:31 +02:00
parent 91b8c9a6ce
commit 2d093584f2
221 changed files with 331 additions and 343 deletions

View File

@ -124,13 +124,13 @@ Before opening a PR, please format your code with clang-format 12 and ensure the
* Use `#include "..."` when including `al` and `rs` (SMO) header files.
* Include paths should be relative to lib/.
* OK: `#include "al/LiveActor/LiveActor.h"`
* OK: `#include "al/Library/LiveActor/LiveActor.h"`
* Not OK: `#include "LiveActor.h"`
* Use `#include <...>` for system or library includes. Examples:
* Standard C++ library headers (e.g. `<optional>`, `<type_traits>`, `<limits>`, ...)
* sead (e.g. `<prim/seadSafeString.h>`)
* Other Nintendo libraries like agl, evfl, eui, ...
* Other Nintendo libraries like agl, eui, ...
### Naming

View File

@ -85,6 +85,8 @@ Anyone is welcome to contribute to this project, just send a pull request!
- Library/Stage: Proper place for StageInfo
- Library/Math: Split up into multiple files
- Library/Player: Re-organize Util
- cleanup/remove al/util
- game/Util/ResourceUtil remove/cleanup
# Credits
This decompilation uses [this](https://github.com/open-ead/sead) as a reference for the sead library used. Big thanks to their research!

View File

@ -2,8 +2,8 @@
#include <container/seadPtrArray.h>
#include "al/audio/IAudioSystemPause.h"
#include "al/hio/HioNode.h"
#include "al/iuse/IUseAreaObj.h"
#include "al/Library/HostIO/HioNode.h"
#include "al/Library/Area/IUseAreaObj.h"
#include "al/util/OtherUtil.h"
namespace aal {

View File

@ -3,19 +3,6 @@
#include <prim/seadSafeString.h>
namespace al {
template <s32 L>
class StringTmp : public sead::FixedSafeString<L> { // equal to WFormatFixedSafeString
public:
StringTmp(const char* format, ...) : sead::FixedSafeString<L>() {
std::va_list args;
va_start(args, format);
this->formatV(format, args);
va_end(args);
}
~StringTmp() = default;
};
bool isEqualString(const char16_t*, const char16_t*);
bool isEqualSubString(const char*, const char*);
bool isEqualSubString(const sead::SafeStringBase<char>&, const sead::SafeStringBase<char>&);
@ -23,4 +10,4 @@ bool isStartWithString(const char*, const char*);
bool isEndWithString(const char*, const char*);
bool isEqualString(const char*, const char*) __attribute__((noinline));
bool isEqualString(const sead::SafeString&, const sead::SafeString&);
}; // namespace al
}; // namespace al

View File

@ -0,0 +1,19 @@
#pragma once
#include <prim/seadSafeString.h>
namespace al {
template <s32 L>
class StringTmp : public sead::FixedSafeString<L> { // equal to WFormatFixedSafeString
public:
StringTmp(const char* format, ...) : sead::FixedSafeString<L>() {
std::va_list args;
va_start(args, format);
this->formatV(format, args);
va_end(args);
}
~StringTmp() = default;
};
} // namespace al

View File

@ -1,7 +1,7 @@
#pragma once
#include "al/hio/HioNode.h"
#include "al/iuse/IUseExecutor.h"
#include "al/Library/HostIO/HioNode.h"
#include "al/Library/Execute/IUseExecutor.h"
namespace al {
class SceneCameraInfo;

View File

@ -1,8 +1,6 @@
#pragma once
namespace al {
class LiveActor;
struct FactoryEntry {
const char* mName;
void* mCreationFunction;
@ -24,7 +22,9 @@ public:
mNumFactoryEntries = N;
}
virtual const char* convertName(const char*) const;
virtual const char* convertName(const char* pName) const {
return pName;
}
private:
const char* mFactoryName;
@ -32,8 +32,4 @@ private:
int mNumFactoryEntries;
};
class ActorFactory : public al::Factory<al::LiveActor* (*)(char const*)> {
public:
ActorFactory(const char*);
};
} // namespace al

View File

@ -2,7 +2,7 @@
#include <math/seadMatrix.h>
#include <math/seadVector.h>
#include "al/sensor/SensorHitGroup.h"
#include "al/Library/HitSensor/SensorHitGroup.h"
namespace al {
class LiveActor;

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/sensor/HitSensor.h"
#include "al/Library/HitSensor/HitSensor.h"
namespace al {
class HitSensorKeeper {
@ -15,4 +15,4 @@ public:
int mSensorCount; // _04
al::HitSensor** mSensors; // _8
};
}; // namespace al
}; // namespace al

View File

@ -3,11 +3,11 @@
#include "al/audio/AudioKeeper.h"
#include "al/camera/CameraDirector.h"
#include "al/effect/EffectKeeper.h"
#include "al/hio/HioNode.h"
#include "al/Library/HostIO/HioNode.h"
#include "al/layout/IUseLayout.h"
#include "al/message/IUseMessageSystem.h"
#include "al/nerve/Nerve.h"
#include "al/scene/SceneObjHolder.h"
#include "al/Library/Nerve/Nerve.h"
#include "al/Library/Scene/SceneObjHolder.h"
namespace al {
@ -22,4 +22,4 @@ class LayoutActor : public al::IUseHioNode,
public al::IUseAudioKeeper,
public al::IUseEffectKeeper,
public al::IUseSceneObjHolder {};
} // namespace al
} // namespace al

View File

@ -0,0 +1,12 @@
#pragma once
#include "al/Library/Factory/Factory.h"
namespace al {
class LiveActor;
class ActorFactory : public al::Factory<al::LiveActor* (*)(char const*)> {
public:
ActorFactory(const char*);
};
} // namespace al

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/actor/Placement.h"
#include "al/Library/Placement/Placement.h"
namespace al {
class LiveActor;
@ -92,4 +92,4 @@ private:
al::ScreenPointDirector* mScreenPointDirector;
al::ViewIdHolder* mViewIdHolder;
};
} // namespace al
} // namespace al

View File

@ -1,20 +1,20 @@
#pragma once
#include "al/byaml/ByamlIter.h"
#include "al/Library/Yaml/ByamlIter.h"
#include "al/hio/HioNode.h"
#include "al/iuse/IUseAreaObj.h"
#include "al/iuse/IUseAudioKeeper.h"
#include "al/iuse/IUseCamera.h"
#include "al/iuse/IUseCollision.h"
#include "al/iuse/IUseEffectKeeper.h"
#include "al/nerve/Nerve.h"
#include "al/rail/RailKeeper.h"
#include "al/rail/RailRider.h"
#include "al/scene/SceneObjHolder.h"
#include "al/screen/ScreenPointKeeper.h"
#include "al/sensor/HitSensorKeeper.h"
#include "al/switch/StageSwitchKeeper.h"
#include "al/Library/HostIO/HioNode.h"
#include "al/Library/Area/IUseAreaObj.h"
#include "al/Library/Audio/IUseAudioKeeper.h"
#include "al/Library/Camera/IUseCamera.h"
#include "al/Library/Collision/IUseCollision.h"
#include "al/Library/Effect/IUseEffectKeeper.h"
#include "al/Library/Nerve/Nerve.h"
#include "al/Library/Rail/RailKeeper.h"
#include "al/Library/Rail/RailRider.h"
#include "al/Library/Scene/SceneObjHolder.h"
#include "al/Library/Screen/ScreenPointKeeper.h"
#include "al/Library/HitSensor/HitSensorKeeper.h"
#include "al/Library/Stage/StageSwitchKeeper.h"
namespace al {
class ActorScoreKeeper {
@ -147,4 +147,4 @@ public:
al::ActorSceneInfo* mSceneInfo;
al::LiveActorFlag* mLiveActorFlag;
};
}; // namespace al
}; // namespace al

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/hio/HioNode.h"
#include "al/Library/HostIO/HioNode.h"
namespace al {
class LiveActor;
@ -28,4 +28,4 @@ public:
int mActorCount; // _14
al::LiveActor** mActors; // _18
};
}; // namespace al
}; // namespace al

View File

@ -4,7 +4,7 @@
#include <math/seadQuat.h>
#include <math/seadVector.h>
#include <prim/seadSafeString.h>
#include "al/LiveActor/LiveActor.h"
#include "al/Library/LiveActor/LiveActor.h"
namespace al {

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/LiveActor/LiveActor.h"
#include "al/Library/LiveActor/LiveActor.h"
namespace al {
class FixMapParts : public LiveActor {
public:

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/hio/HioNode.h"
#include "al/Library/HostIO/HioNode.h"
namespace al {
class ActorResource;
@ -13,4 +13,4 @@ public:
void initResource()
};
}; // namespace al
}; // namespace al

View File

@ -2,7 +2,7 @@
#include <math/seadMatrix.h>
#include <math/seadVector.h>
#include "al/LiveActor/LiveActor.h"
#include "al/Library/LiveActor/LiveActor.h"
namespace al {

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/nerve/Nerve.h"
#include "al/Library/Nerve/Nerve.h"
namespace al {
class NerveAction : public al::Nerve {
@ -27,4 +27,4 @@ public:
static alNerveFunction::NerveActionCollector* sCurrentCollector;
};
}; // namespace alNerveFunction
}; // namespace alNerveFunction

View File

@ -1,8 +1,8 @@
#pragma once
#include "al/hio/HioNode.h"
#include "al/nerve/Nerve.h"
#include "al/nerve/NerveKeeper.h"
#include "al/Library/HostIO/HioNode.h"
#include "al/Library/Nerve/Nerve.h"
#include "al/Library/Nerve/NerveKeeper.h"
namespace al {
class NerveExecutor : public IUseNerve, public al::HioNode {
@ -17,4 +17,4 @@ public:
al::NerveKeeper* mKeeper; // _8
};
}; // namespace al
}; // namespace al

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/nerve/Nerve.h"
#include "al/Library/Nerve/Nerve.h"
namespace al {
class NerveStateCtrl;
@ -23,4 +23,4 @@ public:
al::NerveStateCtrl* mStateCtrl; // _20
unsigned long _28;
};
}; // namespace al
}; // namespace al

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/nerve/NerveExecutor.h"
#include "al/Library/Nerve/NerveExecutor.h"
namespace al {
class NerveStateBase : public NerveExecutor {
@ -26,4 +26,4 @@ public:
private:
LiveActor* mLiveActor;
};
}; // namespace al
}; // namespace al

View File

@ -1,7 +1,7 @@
#pragma once
#include "al/nerve/Nerve.h"
#include "al/nerve/NerveStateBase.h"
#include "al/Library/Nerve/Nerve.h"
#include "al/Library/Nerve/NerveStateBase.h"
namespace al {
struct State {
@ -28,4 +28,4 @@ public:
State* mStates; // _8
State* mCurrentState; // _10
};
}; // namespace al
}; // namespace al

View File

@ -1,7 +1,7 @@
#pragma once
#include "al/nerve/Nerve.h"
#include "al/nerve/NerveStateBase.h"
#include "al/Library/Nerve/Nerve.h"
#include "al/Library/Nerve/NerveStateBase.h"
#define NERVE_HEADER(Class, Action) \
class Class##Nrv##Action : public al::Nerve { \
@ -44,4 +44,4 @@ void addNerveState(al::IUseNerve*, al::NerveStateBase*, const al::Nerve*, const
void updateNerveState(al::IUseNerve*);
bool updateNerveStateAndNextNerve(al::IUseNerve*, const al::Nerve*);
bool isStateEnd(const al::IUseNerve*);
}; // namespace al
}; // namespace al

View File

@ -1,7 +1,7 @@
#pragma once
#include <resource/seadResource.h>
#include "al/byaml/ByamlIter.h"
#include "al/Library/Yaml/ByamlIter.h"
namespace al {
class PlacementInfo {

View File

@ -1,7 +1,7 @@
#pragma once
#include "al/actor/ActorInitInfo.h"
#include "al/actor/Placement.h"
#include "al/Library/LiveActor/ActorInitInfo.h"
#include "al/Library/Placement/Placement.h"
#include "math/seadVector.h"
namespace al {

View File

@ -1,7 +1,7 @@
#pragma once
#include <math/seadVector.h>
#include "al/rail/RailPart.h"
#include "al/Library/Rail/RailPart.h"
namespace al {
class PlacementInfo;

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/rail/RailRider.h"
#include "al/Library/Rail/RailRider.h"
namespace al {
class RailKeeper {
@ -9,4 +9,4 @@ public:
al::RailRider* mRailRider; // _8
};
}; // namespace al
}; // namespace al

View File

@ -0,0 +1,10 @@
#pragma once
#include <prim/seadSafeString.h>
#include "al/Library/Resource/Resource.h"
namespace al {
Resource* findOrCreateResource(const sead::SafeString&, const char*);
}

View File

@ -2,9 +2,9 @@
#include "al/audio/AudioKeeper.h"
#include "al/camera/CameraDirector.h"
#include "al/nerve/NerveExecutor.h"
#include "al/Library/Nerve/NerveExecutor.h"
#include "al/scene/SceneInitInfo.h"
#include "al/scene/SceneObjHolder.h"
#include "al/Library/Scene/SceneObjHolder.h"
namespace al {
class Scene : public al::NerveExecutor,
@ -41,4 +41,4 @@ public:
virtual void control();
virtual void drawMain();
};
}; // namespace al
}; // namespace al

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/iuse/IUseName.h"
#include "al/Library/Base/IUseName.h"
namespace al {
class StageSwitchKeeper;
@ -15,4 +15,4 @@ class StageSwitchKeeper {
public:
StageSwitchKeeper();
};
}; // namespace al
}; // namespace al

View File

@ -3,7 +3,7 @@
#include <basis/seadTypes.h>
#include <mc/seadCoreInfo.h>
#include <prim/seadSafeString.h>
#include "al/async/FunctorV0M.h"
#include "al/Library/Thread/FunctorV0M.h"
namespace sead {
class DelegateThread;

View File

@ -1,7 +1,7 @@
#pragma once
#include "al/byaml/ByamlData.h"
#include "al/byaml/ByamlHeader.h"
#include "al/Library/Yaml/ByamlData.h"
#include "al/Library/Yaml/ByamlHeader.h"
namespace al {
class ByamlIter {

View File

@ -3,8 +3,8 @@
#include <gfx/seadColor.h>
#include <math/seadBoundBox.h>
#include <math/seadVector.h>
#include "al/byaml/ByamlData.h"
#include "al/byaml/ByamlIter.h"
#include "al/Library/Yaml/ByamlData.h"
#include "al/Library/Yaml/ByamlIter.h"
namespace sead {
class WriteStream;

View File

@ -2,8 +2,8 @@
#include <container/seadPtrArray.h>
#include <gfx/seadColor.h>
#include "al/actor/ActorInitInfo.h"
#include "al/resource/Resource.h"
#include "al/Library/LiveActor/ActorInitInfo.h"
#include "al/Library/Resource/Resource.h"
namespace al {
class PrePassLightBase;

View File

@ -1,11 +0,0 @@
#pragma once
#include "game/Layouts/CoinCounter.h"
class StageSceneLayout {
public:
unsigned char padding_18[0x18];
CoinCounter* coinCounter; // 0x18
unsigned char padding_12[0x10];
CoinCounter* coinCollectCounter; // 0x30
};

View File

@ -1,12 +0,0 @@
#pragma once
namespace al {
template <int T>
class StringTmp : public sead::BufferedSafeStringBase<char> {
public:
inline StringTmp() : sead::BufferedSafeStringBase<char>(this->mTop, T) {
assureTerminationImpl_();
}
};
} // namespace al

View File

@ -4,7 +4,7 @@
#include <math/seadVector.h>
#include <prim/seadSafeString.h>
#include "al/util/InputUtil.h"
#include "al/Library/Controller/InputFunction.h"
namespace sead {
class Heap;

View File

@ -2,8 +2,8 @@
#include <math/seadQuat.h>
#include <math/seadVector.h>
#include "al/LiveActor/LiveActor.h"
#include "al/util/NerveUtil.h"
#include "al/Library/LiveActor/LiveActor.h"
#include "al/Library/Nerve/NerveUtil.h"
class MofumofuWarpHole : public al::LiveActor {
public:

View File

@ -1,11 +1,11 @@
#pragma once
#include "al/LiveActor/LiveActor.h"
#include "al/actor/ActorInitInfo.h"
#include "al/Library/LiveActor/LiveActor.h"
#include "al/Library/LiveActor/ActorInitInfo.h"
class Coin : public al::LiveActor {
public:
void init(al::ActorInitInfo const&);
void control(void);
};
};

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/nerve/NerveStateBase.h"
#include "al/Library/Nerve/NerveStateBase.h"
namespace al {
class PlayerHolder;

View File

@ -1,8 +1,8 @@
#pragma once
#include "al/LiveActor/LiveActor.h"
#include "al/util/NerveUtil.h"
#include "game/iuse/IUseDimension.h"
#include "al/Library/LiveActor/LiveActor.h"
#include "al/Library/Nerve/NerveUtil.h"
#include "game/Util/IUseDimension.h"
namespace al {
class ActorInitInfo;

View File

@ -1,6 +1,6 @@
#pragma once
#include "al/resource/GameDataHolderAccessor.h"
#include "game/System/GameDataHolderAccessor.h"
class AchievementInfo;

View File

@ -2,7 +2,7 @@
#include <basis/seadTypes.h>
#include <container/seadPtrArray.h>
#include "al/resource/GameDataHolderAccessor.h"
#include "game/System/GameDataHolderAccessor.h"
namespace al {
class ActorInitInfo;

View File

@ -2,7 +2,7 @@
#include <container/seadPtrArray.h>
#include "al/util/StringUtil.h"
#include "al/Library/Base/String.h"
class AchievementInfo {
public:

Some files were not shown because too many files have changed in this diff Show More