mirror of
https://github.com/MonsterDruide1/OdysseyDecomp.git
synced 2024-11-26 23:00:25 +00:00
Library/Execute: Cleanup (#150)
This commit is contained in:
parent
50aa6ab85b
commit
7d1dc687ad
@ -53968,7 +53968,7 @@ Address,Quality,Size,Name
|
||||
0x0000007100891a28,O,000136,_ZNK2al15ExecuteDirector4drawEPKc
|
||||
0x0000007100891ab0,O,000128,_ZNK2al15ExecuteDirector8drawListEPKcS2_
|
||||
0x0000007100891b30,O,000140,_ZNK2al15ExecuteDirector12isActiveDrawEPKc
|
||||
0x0000007100891bbc,M,000064,_ZN2al16ActorExecuteInfoC2EPNS_20ExecuteRequestKeeperE
|
||||
0x0000007100891bbc,O,000064,_ZN2al16ActorExecuteInfoC2EPNS_20ExecuteRequestKeeperE
|
||||
0x0000007100891bfc,O,000028,_ZN2al16ActorExecuteInfo10addUpdaterEPNS_24ExecutorActorExecuteBaseE
|
||||
0x0000007100891c18,O,000028,_ZN2al16ActorExecuteInfo9addDrawerEPNS_15ModelDrawerBaseE
|
||||
0x0000007100891c34,U,000008,_ZN2al18ExecuteRequestInfoC2Ev
|
||||
|
Can't render this file because it is too large.
|
@ -20,12 +20,10 @@ ViewIdHolder* ViewIdHolder::tryCreate(const PlacementInfo& placementInfo) {
|
||||
void ViewIdHolder::init(const PlacementInfo& placementInfo) {
|
||||
mNumPlacements = calcLinkChildNum(placementInfo, "ViewGroup");
|
||||
mPlacementIds = new PlacementId[mNumPlacements];
|
||||
if (mNumPlacements >= 1) {
|
||||
for (s32 i = 0; i < mNumPlacements; ++i) {
|
||||
PlacementInfo info;
|
||||
getLinksInfoByIndex(&info, placementInfo, "ViewGroup", i);
|
||||
mPlacementIds[i].init(info);
|
||||
}
|
||||
for (s32 i = 0; i < mNumPlacements; ++i) {
|
||||
PlacementInfo info;
|
||||
getLinksInfoByIndex(&info, placementInfo, "ViewGroup", i);
|
||||
mPlacementIds[i].init(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "Library/Execute/ActorExecuteInfo.h"
|
||||
|
||||
namespace al {
|
||||
ActorExecuteInfo::ActorExecuteInfo(ExecuteRequestKeeper* keeper) {
|
||||
mRequestKeeper = keeper;
|
||||
}
|
||||
ActorExecuteInfo::ActorExecuteInfo(ExecuteRequestKeeper* keeper) : mRequestKeeper(keeper) {}
|
||||
|
||||
void ActorExecuteInfo::addUpdater(ExecutorActorExecuteBase* updater) {
|
||||
mUpdaters[mUpdaterCount] = updater;
|
||||
|
@ -14,7 +14,7 @@ public:
|
||||
void addDrawer(ModelDrawerBase* drawer);
|
||||
|
||||
private:
|
||||
ExecuteRequestKeeper* mRequestKeeper;
|
||||
ExecuteRequestKeeper* mRequestKeeper = nullptr;
|
||||
s32 mUpdaterCount = 0;
|
||||
ExecutorActorExecuteBase* mUpdaters[4] = {};
|
||||
s32 mDrawerCount = 0;
|
||||
|
@ -10,11 +10,9 @@
|
||||
|
||||
namespace al {
|
||||
|
||||
ExecuteDirector::ExecuteDirector(s32 count) {
|
||||
mRequestCount = count;
|
||||
}
|
||||
ExecuteDirector::ExecuteDirector(s32 count) : mUpdateTableCount(count){};
|
||||
|
||||
ExecuteDirector::~ExecuteDirector() {}
|
||||
ExecuteDirector::~ExecuteDirector() = default;
|
||||
|
||||
void ExecuteDirector::init(const ExecuteSystemInitInfo& initInfo) {
|
||||
mUpdateTableCount = UpdateTableSize;
|
||||
@ -38,80 +36,75 @@ void ExecuteDirector::init(const ExecuteSystemInitInfo& initInfo) {
|
||||
mRequestKeeper = new ExecuteRequestKeeper(mRequestCount);
|
||||
}
|
||||
|
||||
void ExecuteDirector::registerActorUpdate(LiveActor* actor, const char* tableName) {
|
||||
void ExecuteDirector::registerActorUpdate(LiveActor* actor, const char* listName) {
|
||||
if (!actor->getExecuteInfo())
|
||||
actor->initExecuteInfo(new ActorExecuteInfo(mRequestKeeper));
|
||||
if (mUpdateTableCount >= 1)
|
||||
for (s32 i = 0; i < mUpdateTableCount; ++i)
|
||||
mUpdateTables[i]->tryRegisterActor(actor, tableName);
|
||||
|
||||
for (s32 i = 0; i < mUpdateTableCount; i++)
|
||||
mUpdateTables[i]->tryRegisterActor(actor, listName);
|
||||
}
|
||||
|
||||
void ExecuteDirector::registerActorDraw(LiveActor* actor, const char* tableName) {
|
||||
void ExecuteDirector::registerActorDraw(LiveActor* actor, const char* listName) {
|
||||
if (!actor->getExecuteInfo())
|
||||
actor->initExecuteInfo(new ActorExecuteInfo(mRequestKeeper));
|
||||
if (mDrawTableCount >= 1) {
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i) {
|
||||
mDrawTables[i]->tryRegisterActor(actor, tableName);
|
||||
mDrawTables[i]->tryRegisterActorModel(actor, tableName);
|
||||
}
|
||||
|
||||
for (s32 i = 0; i < mDrawTableCount; i++) {
|
||||
mDrawTables[i]->tryRegisterActor(actor, listName);
|
||||
mDrawTables[i]->tryRegisterActorModel(actor, listName);
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteDirector::registerActorModelDraw(LiveActor* actor, const char* tableName) {
|
||||
void ExecuteDirector::registerActorModelDraw(LiveActor* actor, const char* listName) {
|
||||
if (!actor->getExecuteInfo())
|
||||
actor->initExecuteInfo(new ActorExecuteInfo(mRequestKeeper));
|
||||
if (mDrawTableCount >= 1)
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i)
|
||||
mDrawTables[i]->tryRegisterActorModel(actor, tableName);
|
||||
|
||||
for (s32 i = 0; i < mDrawTableCount; i++)
|
||||
mDrawTables[i]->tryRegisterActorModel(actor, listName);
|
||||
}
|
||||
|
||||
void ExecuteDirector::registerLayoutUpdate(LayoutActor* lyt, const char* tableName) {
|
||||
if (!lyt->getExecuteInfo())
|
||||
lyt->initExecuteInfo(new LayoutExecuteInfo());
|
||||
if (mUpdateTableCount >= 1)
|
||||
for (s32 i = 0; i < mUpdateTableCount; ++i)
|
||||
mUpdateTables[i]->tryRegisterLayout(lyt, tableName);
|
||||
void ExecuteDirector::registerLayoutUpdate(LayoutActor* layout, const char* listName) {
|
||||
if (!layout->getExecuteInfo())
|
||||
layout->initExecuteInfo(new LayoutExecuteInfo());
|
||||
|
||||
for (s32 i = 0; i < mUpdateTableCount; i++)
|
||||
mUpdateTables[i]->tryRegisterLayout(layout, listName);
|
||||
}
|
||||
|
||||
void ExecuteDirector::registerLayoutDraw(LayoutActor* lyt, const char* tableName) {
|
||||
if (!lyt->getExecuteInfo())
|
||||
lyt->initExecuteInfo(new LayoutExecuteInfo());
|
||||
if (mDrawTableCount >= 1)
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i)
|
||||
mDrawTables[i]->tryRegisterLayout(lyt, tableName);
|
||||
void ExecuteDirector::registerLayoutDraw(LayoutActor* layout, const char* listName) {
|
||||
if (!layout->getExecuteInfo())
|
||||
layout->initExecuteInfo(new LayoutExecuteInfo());
|
||||
|
||||
for (s32 i = 0; i < mDrawTableCount; i++)
|
||||
mDrawTables[i]->tryRegisterLayout(layout, listName);
|
||||
}
|
||||
|
||||
void ExecuteDirector::registerUser(IUseExecutor* user, const char* tableName) {
|
||||
if (mUpdateTableCount >= 1)
|
||||
for (s32 i = 0; i < mUpdateTableCount; ++i)
|
||||
mUpdateTables[i]->tryRegisterUser(user, tableName);
|
||||
if (mDrawTableCount >= 1)
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i)
|
||||
mDrawTables[i]->tryRegisterUser(user, tableName);
|
||||
void ExecuteDirector::registerUser(IUseExecutor* user, const char* listName) {
|
||||
for (s32 i = 0; i < mUpdateTableCount; i++)
|
||||
mUpdateTables[i]->tryRegisterUser(user, listName);
|
||||
|
||||
for (s32 i = 0; i < mDrawTableCount; i++)
|
||||
mDrawTables[i]->tryRegisterUser(user, listName);
|
||||
}
|
||||
|
||||
void ExecuteDirector::registerFunctor(const FunctorBase& functor, const char* tableName) {
|
||||
if (mUpdateTableCount >= 1)
|
||||
for (s32 i = 0; i < mUpdateTableCount; ++i)
|
||||
mUpdateTables[i]->tryRegisterFunctor(functor, tableName);
|
||||
if (mDrawTableCount >= 1)
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i)
|
||||
mDrawTables[i]->tryRegisterFunctor(functor, tableName);
|
||||
void ExecuteDirector::registerFunctor(const FunctorBase& functor, const char* listName) {
|
||||
for (s32 i = 0; i < mUpdateTableCount; i++)
|
||||
mUpdateTables[i]->tryRegisterFunctor(functor, listName);
|
||||
|
||||
for (s32 i = 0; i < mDrawTableCount; i++)
|
||||
mDrawTables[i]->tryRegisterFunctor(functor, listName);
|
||||
}
|
||||
|
||||
void ExecuteDirector::registerFunctorDraw(const FunctorBase& functor, const char* tableName) {
|
||||
if (mDrawTableCount >= 1)
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i)
|
||||
mDrawTables[i]->tryRegisterFunctor(functor, tableName);
|
||||
void ExecuteDirector::registerFunctorDraw(const FunctorBase& functor, const char* listName) {
|
||||
for (s32 i = 0; i < mDrawTableCount; i++)
|
||||
mDrawTables[i]->tryRegisterFunctor(functor, listName);
|
||||
}
|
||||
|
||||
void ExecuteDirector::createExecutorListTable() {
|
||||
if (mUpdateTableCount >= 1)
|
||||
for (s32 i = 0; i < mUpdateTableCount; ++i)
|
||||
mUpdateTables[i]->createExecutorListTable();
|
||||
if (mDrawTableCount >= 1)
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i)
|
||||
mDrawTables[i]->createExecutorListTable();
|
||||
for (s32 i = 0; i < mUpdateTableCount; i++)
|
||||
mUpdateTables[i]->createExecutorListTable();
|
||||
|
||||
for (s32 i = 0; i < mDrawTableCount; i++)
|
||||
mDrawTables[i]->createExecutorListTable();
|
||||
}
|
||||
|
||||
void ExecuteDirector::execute(const char* tableName) const {
|
||||
@ -123,36 +116,28 @@ void ExecuteDirector::execute(const char* tableName) const {
|
||||
|
||||
mRequestKeeper->executeRequestActorMovementAllOff();
|
||||
mRequestKeeper->executeRequestActorDrawAllOff();
|
||||
} else {
|
||||
bool isActorEnabled;
|
||||
|
||||
if (isEqualString(tableName, mUpdateTables[0]->getName())) {
|
||||
mRequestKeeper->executeRequestActorMovementAllOn();
|
||||
mRequestKeeper->executeRequestActorDrawAllOn();
|
||||
isActorEnabled = true;
|
||||
} else {
|
||||
isActorEnabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
bool isActorEnabled = false;
|
||||
|
||||
if (isEqualString(tableName, mUpdateTables[0]->getName())) {
|
||||
mRequestKeeper->executeRequestActorMovementAllOn();
|
||||
mRequestKeeper->executeRequestActorDrawAllOn();
|
||||
isActorEnabled = true;
|
||||
}
|
||||
|
||||
for (s32 i = 0; i < mUpdateTableCount; i++) {
|
||||
if (isEqualString(tableName, mUpdateTables[i]->getName())) {
|
||||
mUpdateTables[i]->execute();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (mUpdateTableCount >= 1) {
|
||||
for (s32 i = 0; i < mUpdateTableCount; ++i) {
|
||||
if (isEqualString(tableName, mUpdateTables[i]->getName())) {
|
||||
mUpdateTables[i]->execute();
|
||||
|
||||
if (isActorEnabled) {
|
||||
mRequestKeeper->executeRequestActorMovementAllOff();
|
||||
mRequestKeeper->executeRequestActorDrawAllOff();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isActorEnabled) {
|
||||
mRequestKeeper->executeRequestActorMovementAllOff();
|
||||
mRequestKeeper->executeRequestActorDrawAllOff();
|
||||
}
|
||||
if (isActorEnabled) {
|
||||
mRequestKeeper->executeRequestActorMovementAllOff();
|
||||
mRequestKeeper->executeRequestActorDrawAllOff();
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,11 +145,9 @@ void ExecuteDirector::executeList(const char* tableName, const char* listName) c
|
||||
mRequestKeeper->executeRequestActorMovementAllOn();
|
||||
mRequestKeeper->executeRequestActorDrawAllOn();
|
||||
if (tableName) {
|
||||
if (mUpdateTableCount >= 1) {
|
||||
for (s32 i = 0; i < mUpdateTableCount; ++i)
|
||||
if (isEqualString(tableName, mUpdateTables[i]->getName()))
|
||||
mUpdateTables[i]->executeList(listName);
|
||||
}
|
||||
for (s32 i = 0; i < mUpdateTableCount; ++i)
|
||||
if (isEqualString(tableName, mUpdateTables[i]->getName()))
|
||||
mUpdateTables[i]->executeList(listName);
|
||||
} else {
|
||||
mUpdateTables[0]->executeList(listName);
|
||||
}
|
||||
@ -173,41 +156,37 @@ void ExecuteDirector::executeList(const char* tableName, const char* listName) c
|
||||
}
|
||||
|
||||
void ExecuteDirector::draw(const char* tableName) const {
|
||||
if (tableName) {
|
||||
if (mDrawTableCount >= 1) {
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i) {
|
||||
if (isEqualString(tableName, mDrawTables[i]->getName())) {
|
||||
mDrawTables[i]->execute();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!tableName) {
|
||||
mDrawTables[0]->execute();
|
||||
return;
|
||||
}
|
||||
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i) {
|
||||
if (isEqualString(tableName, mDrawTables[i]->getName())) {
|
||||
mDrawTables[i]->execute();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteDirector::drawList(const char* tableName, const char* listName) const {
|
||||
if (mDrawTableCount >= 1) {
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i) {
|
||||
if (isEqualString(tableName, mDrawTables[i]->getName())) {
|
||||
mDrawTables[i]->executeList(listName);
|
||||
return;
|
||||
}
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i) {
|
||||
if (isEqualString(tableName, mDrawTables[i]->getName())) {
|
||||
mDrawTables[i]->executeList(listName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ExecuteDirector::isActiveDraw(const char* tableName) const {
|
||||
if (tableName) {
|
||||
if (mDrawTableCount >= 1) {
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i)
|
||||
if (isEqualString(tableName, mDrawTables[i]->getName()))
|
||||
return mDrawTables[i]->isActive();
|
||||
}
|
||||
} else {
|
||||
if (!tableName)
|
||||
return mDrawTables[0]->isActive();
|
||||
}
|
||||
|
||||
for (s32 i = 0; i < mDrawTableCount; ++i)
|
||||
if (isEqualString(tableName, mDrawTables[i]->getName()))
|
||||
return mDrawTables[i]->isActive();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace al
|
||||
|
@ -16,21 +16,21 @@ class ExecuteDirector {
|
||||
public:
|
||||
ExecuteDirector(s32 count);
|
||||
virtual ~ExecuteDirector();
|
||||
void init(const ExecuteSystemInitInfo&);
|
||||
void registerActorUpdate(LiveActor*, const char*);
|
||||
void registerActorDraw(LiveActor*, const char*);
|
||||
void registerActorModelDraw(LiveActor*, const char*);
|
||||
void registerLayoutUpdate(LayoutActor*, const char*);
|
||||
void registerLayoutDraw(LayoutActor*, const char*);
|
||||
void registerUser(IUseExecutor*, const char*);
|
||||
void registerFunctor(const FunctorBase&, const char*);
|
||||
void registerFunctorDraw(const FunctorBase&, const char*);
|
||||
void init(const ExecuteSystemInitInfo& initInfo);
|
||||
void registerActorUpdate(LiveActor* actor, const char* listName);
|
||||
void registerActorDraw(LiveActor* actor, const char* listName);
|
||||
void registerActorModelDraw(LiveActor* actor, const char* listName);
|
||||
void registerLayoutUpdate(LayoutActor* layout, const char* listName);
|
||||
void registerLayoutDraw(LayoutActor* layout, const char* listName);
|
||||
void registerUser(IUseExecutor* user, const char* listName);
|
||||
void registerFunctor(const FunctorBase& functor, const char* listName);
|
||||
void registerFunctorDraw(const FunctorBase& functor, const char* listName);
|
||||
void createExecutorListTable();
|
||||
void execute(const char*) const;
|
||||
void executeList(const char*, const char*) const;
|
||||
void draw(const char*) const;
|
||||
void drawList(const char*, const char*) const;
|
||||
bool isActiveDraw(const char*) const;
|
||||
void execute(const char* tableName) const;
|
||||
void executeList(const char* tableName, const char* listName) const;
|
||||
void draw(const char* tableName) const;
|
||||
void drawList(const char* tableName, const char* listName) const;
|
||||
bool isActiveDraw(const char* tableName) const;
|
||||
|
||||
private:
|
||||
s32 mRequestCount = 0;
|
||||
@ -40,4 +40,7 @@ private:
|
||||
ExecuteTableHolderDraw** mDrawTables = nullptr;
|
||||
ExecuteRequestKeeper* mRequestKeeper = nullptr;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteDirector) == 0x30);
|
||||
|
||||
} // namespace al
|
||||
|
@ -7,4 +7,7 @@ struct ExecuteOrder {
|
||||
s32 mListMaxSize;
|
||||
const char* mGroupType;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteOrder) == 0x20);
|
||||
|
||||
} // namespace al
|
||||
|
@ -11,15 +11,20 @@ private:
|
||||
u64 _0;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteRequestInfo) == 0x8);
|
||||
|
||||
class ExecuteRequestTable {
|
||||
public:
|
||||
ExecuteRequestTable(s32 size);
|
||||
ExecuteRequestTable(s32 maxSize);
|
||||
|
||||
private:
|
||||
s32 mRequestCount;
|
||||
LiveActor** mRequestArray;
|
||||
s32 mCount;
|
||||
s32 mMaxSize;
|
||||
LiveActor** mRequests;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteRequestTable) == 0x10);
|
||||
|
||||
class ExecuteRequestKeeper {
|
||||
public:
|
||||
enum Request : s32 {
|
||||
@ -29,13 +34,13 @@ public:
|
||||
Request_RemoveFromDraw = 0x3
|
||||
};
|
||||
|
||||
ExecuteRequestKeeper(s32 size);
|
||||
ExecuteRequestKeeper(s32 maxSize);
|
||||
|
||||
void executeRequestActorMovementAllOn();
|
||||
void executeRequestActorMovementAllOff();
|
||||
void executeRequestActorDrawAllOn();
|
||||
void executeRequestActorDrawAllOff();
|
||||
void request(LiveActor* actor, Request request_type);
|
||||
void request(LiveActor* actor, Request requestType);
|
||||
|
||||
private:
|
||||
ExecuteRequestTable* mMovementOn;
|
||||
@ -43,4 +48,7 @@ private:
|
||||
ExecuteRequestTable* mDrawOn;
|
||||
ExecuteRequestTable* mDrawOff;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteRequestKeeper) == 0x20);
|
||||
|
||||
} // namespace al
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
// TODO: add DrawContext Header to agl
|
||||
namespace agl {
|
||||
class DrawContext;
|
||||
}
|
||||
@ -11,4 +10,7 @@ struct ExecuteSystemInitInfo {
|
||||
|
||||
agl::DrawContext* mDrawCtx;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteSystemInitInfo) == 0x8);
|
||||
|
||||
} // namespace al
|
||||
|
@ -8,4 +8,7 @@ struct ExecuteTable {
|
||||
const ExecuteOrder* mExecuteOrders = nullptr;
|
||||
s32 mExecuteOrderCount = 0;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteTable) == 0x18);
|
||||
|
||||
} // namespace al
|
||||
|
@ -20,21 +20,22 @@ class ExecuteTableHolderDraw {
|
||||
public:
|
||||
ExecuteTableHolderDraw();
|
||||
virtual ~ExecuteTableHolderDraw();
|
||||
void init(const char*, const ExecuteSystemInitInfo&, const ExecuteOrder*, s32);
|
||||
void registerExecutorListActorModel(ExecutorListActorModelDrawBase*);
|
||||
void registerExecutorListActor(ExecutorListActorDraw*);
|
||||
void registerExecutorListLayout(ExecutorListLayoutDrawBase*);
|
||||
void registerExecutorListUser(ExecutorListIUseExecutorDraw*);
|
||||
void registerExecutorListFunctor(ExecutorListFunctor*);
|
||||
void registerExecutorListAll(ExecutorListBase*);
|
||||
void tryRegisterActor(LiveActor*, const char*);
|
||||
void tryRegisterActorModel(LiveActor*, const char*);
|
||||
void tryRegisterLayout(LayoutActor*, const char*);
|
||||
void tryRegisterUser(IUseExecutor*, const char*);
|
||||
void tryRegisterFunctor(const FunctorBase&, const char*);
|
||||
void init(const char* name, const ExecuteSystemInitInfo& initInfo, const ExecuteOrder* orders,
|
||||
s32 orderCount);
|
||||
void registerExecutorListActorModel(ExecutorListActorModelDrawBase* listActorModel);
|
||||
void registerExecutorListActor(ExecutorListActorDraw* listActor);
|
||||
void registerExecutorListLayout(ExecutorListLayoutDrawBase* listLayout);
|
||||
void registerExecutorListUser(ExecutorListIUseExecutorDraw* listUser);
|
||||
void registerExecutorListFunctor(ExecutorListFunctor* listFunctor);
|
||||
void registerExecutorListAll(ExecutorListBase* list);
|
||||
void tryRegisterActor(LiveActor* actor, const char* listName);
|
||||
void tryRegisterActorModel(LiveActor* actor, const char* listName);
|
||||
void tryRegisterLayout(LayoutActor* layout, const char* listName);
|
||||
void tryRegisterUser(IUseExecutor* user, const char* listName);
|
||||
void tryRegisterFunctor(const FunctorBase& functor, const char* listName);
|
||||
void createExecutorListTable();
|
||||
void execute() const;
|
||||
void executeList(const char*) const;
|
||||
void executeList(const char* listName) const;
|
||||
bool isActive() const;
|
||||
|
||||
const char* getName() { return mName; }
|
||||
@ -49,4 +50,7 @@ private:
|
||||
sead::PtrArray<ExecutorListIUseExecutorDraw> mExecutorsUser;
|
||||
sead::PtrArray<ExecutorListFunctor> mExecutorsFunctor;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteTableHolderDraw) == 0x80);
|
||||
|
||||
} // namespace al
|
||||
|
@ -21,19 +21,20 @@ class ExecuteTableHolderUpdate {
|
||||
public:
|
||||
ExecuteTableHolderUpdate();
|
||||
virtual ~ExecuteTableHolderUpdate();
|
||||
void init(const char*, const ExecuteSystemInitInfo&, const ExecuteOrder*, s32);
|
||||
void registerExecutorListActor(ExecutorListActorExecuteBase*);
|
||||
void registerExecutorListLayout(ExecutorListLayoutUpdate*);
|
||||
void registerExecutorListUser(ExecutorListIUseExecutorUpdate*);
|
||||
void registerExecutorListFunctor(ExecutorListFunctor*);
|
||||
void registerExecutorListAll(ExecutorListBase*);
|
||||
void tryRegisterActor(LiveActor*, const char*);
|
||||
void tryRegisterLayout(LayoutActor*, const char*);
|
||||
void tryRegisterUser(IUseExecutor*, const char*);
|
||||
void tryRegisterFunctor(const FunctorBase&, const char*);
|
||||
void init(const char* name, const ExecuteSystemInitInfo& initInfo, const ExecuteOrder* orders,
|
||||
s32 orderCount);
|
||||
void registerExecutorListActor(ExecutorListActorExecuteBase* listActor);
|
||||
void registerExecutorListLayout(ExecutorListLayoutUpdate* listLayout);
|
||||
void registerExecutorListUser(ExecutorListIUseExecutorUpdate* listUser);
|
||||
void registerExecutorListFunctor(ExecutorListFunctor* listFunctor);
|
||||
void registerExecutorListAll(ExecutorListBase* list);
|
||||
void tryRegisterActor(LiveActor* actor, const char* listName);
|
||||
void tryRegisterLayout(LayoutActor* layout, const char* listName);
|
||||
void tryRegisterUser(IUseExecutor* user, const char* listName);
|
||||
void tryRegisterFunctor(const FunctorBase& functor, const char* listName);
|
||||
void createExecutorListTable();
|
||||
void execute() const;
|
||||
void executeList(const char*) const;
|
||||
void executeList(const char* listName) const;
|
||||
|
||||
const char* getName() { return mName; }
|
||||
|
||||
@ -47,13 +48,15 @@ private:
|
||||
sead::PtrArray<ExecutorListFunctor> mExecutorsFunctor;
|
||||
};
|
||||
|
||||
void registerExecutorUser(IUseExecutor*, ExecuteDirector*, const char*);
|
||||
static_assert(sizeof(ExecuteTableHolderUpdate) == 0x70);
|
||||
|
||||
void registerExecutorUser(IUseExecutor* user, ExecuteDirector* director, const char* listName);
|
||||
} // namespace al
|
||||
|
||||
namespace alActorSystemFunction {
|
||||
void addToExecutorMovement(al::LiveActor*);
|
||||
void addToExecutorDraw(al::LiveActor*);
|
||||
void removeFromExecutorMovement(al::LiveActor*);
|
||||
void removeFromExecutorDraw(al::LiveActor*);
|
||||
void updateExecutorDraw(al::LiveActor*);
|
||||
void addToExecutorMovement(al::LiveActor* actor);
|
||||
void addToExecutorDraw(al::LiveActor* actor);
|
||||
void removeFromExecutorMovement(al::LiveActor* actor);
|
||||
void removeFromExecutorDraw(al::LiveActor* actor);
|
||||
void updateExecutorDraw(al::LiveActor* actor);
|
||||
} // namespace alActorSystemFunction
|
||||
|
@ -384,7 +384,7 @@ constexpr bool strings_equal(const char* a, const char* b) {
|
||||
}
|
||||
|
||||
static constexpr s32 getUpdateTableIndex(const char* listName) {
|
||||
for (s32 i = 0; i < sizeof(updateTableArr) / sizeof(updateTableArr[0]); i++)
|
||||
for (u64 i = 0; i < sizeof(updateTableArr) / sizeof(updateTableArr[0]); i++)
|
||||
if (strings_equal(updateTableArr[i].mListName, listName))
|
||||
return i;
|
||||
return 0;
|
||||
@ -401,7 +401,7 @@ createUpdateTable(const char* tableName, const char* startListName, const char*
|
||||
}
|
||||
|
||||
static constexpr s32 getDrawTableIndex(const char* listName, const char* groupName) {
|
||||
for (s32 i = 0; i < sizeof(drawTableArr) / sizeof(drawTableArr[0]); i++)
|
||||
for (u64 i = 0; i < sizeof(drawTableArr) / sizeof(drawTableArr[0]); i++)
|
||||
if (strings_equal(drawTableArr[i].mListName, listName) &&
|
||||
strings_equal(drawTableArr[i].mExecuteGroup, groupName))
|
||||
return i;
|
||||
|
@ -4,7 +4,7 @@ namespace al {
|
||||
|
||||
class ExecutorListBase {
|
||||
public:
|
||||
ExecutorListBase(const char*);
|
||||
ExecutorListBase(const char* name);
|
||||
|
||||
virtual ~ExecutorListBase();
|
||||
virtual void executeList() const;
|
||||
@ -14,4 +14,6 @@ private:
|
||||
const char* mName;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecutorListBase) == 0x10);
|
||||
|
||||
} // namespace al
|
||||
|
@ -8,4 +8,6 @@ public:
|
||||
virtual void draw() const;
|
||||
};
|
||||
|
||||
static_assert(sizeof(IUseExecutor) == 0x8);
|
||||
|
||||
} // namespace al
|
||||
|
@ -9,8 +9,8 @@ class ExecutorListLayoutDrawBase;
|
||||
class LayoutExecuteInfo {
|
||||
public:
|
||||
LayoutExecuteInfo();
|
||||
void addUpdater(ExecutorListLayoutUpdate*);
|
||||
void addDrawer(ExecutorListLayoutDrawBase*);
|
||||
void addUpdater(ExecutorListLayoutUpdate* updater);
|
||||
void addDrawer(ExecutorListLayoutDrawBase* drawer);
|
||||
|
||||
private:
|
||||
s32 mUpdaterCount = 0;
|
||||
@ -19,4 +19,6 @@ private:
|
||||
ExecutorListLayoutDrawBase* mDrawers[4] = {};
|
||||
};
|
||||
|
||||
static_assert(sizeof(LayoutExecuteInfo) == 0x40);
|
||||
|
||||
} // namespace al
|
||||
|
@ -5,12 +5,17 @@
|
||||
|
||||
#include "Library/HostIO/HioNode.h"
|
||||
|
||||
namespace sead {
|
||||
class Event;
|
||||
class DelegateThread;
|
||||
} // namespace sead
|
||||
|
||||
namespace al {
|
||||
class ExecuteDirector;
|
||||
|
||||
class ExecuteAsyncExecutor : public HioNode {
|
||||
public:
|
||||
ExecuteAsyncExecutor(const ExecuteDirector*, const char*, sead::CoreId);
|
||||
ExecuteAsyncExecutor(const ExecuteDirector* director, const char* name, sead::CoreId coreId);
|
||||
virtual ~ExecuteAsyncExecutor();
|
||||
|
||||
virtual void execute() = 0;
|
||||
@ -20,9 +25,14 @@ public:
|
||||
void waitAsync();
|
||||
|
||||
private:
|
||||
void* filler[4];
|
||||
ExecuteDirector* mDirector = nullptr;
|
||||
const char* mName = nullptr;
|
||||
sead::Event* mEvent = nullptr;
|
||||
sead::DelegateThread* mDelegateThread = nullptr;
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteAsyncExecutor) == 0x28);
|
||||
|
||||
class ExecuteAsyncExecutorUpdate : public ExecuteAsyncExecutor {
|
||||
public:
|
||||
ExecuteAsyncExecutorUpdate(const ExecuteDirector* director, const char* name,
|
||||
@ -31,9 +41,6 @@ public:
|
||||
|
||||
~ExecuteAsyncExecutorUpdate() override;
|
||||
void execute() override;
|
||||
|
||||
private:
|
||||
// missing
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteAsyncExecutorUpdate) == 0x28);
|
||||
@ -45,9 +52,8 @@ public:
|
||||
|
||||
~ExecuteAsyncExecutorDraw() override;
|
||||
void execute() override;
|
||||
|
||||
private:
|
||||
// missing
|
||||
};
|
||||
|
||||
static_assert(sizeof(ExecuteAsyncExecutorUpdate) == 0x28);
|
||||
|
||||
} // namespace al
|
||||
|
Loading…
Reference in New Issue
Block a user