Files
botw/src/KingSystem/ActorSystem/actASSetting.cpp
T
Léo Lam df36d65665 Revert "Add #ifdef declarations for NON_MATCHING code"
This reverts commit 42807160cf.

It makes searching for NON_MATCHING comment descriptions much less
convenient in most text editors or IDEs, and we want the function
CSV to be the single source of truth for function statuses. Having
a function marked as matching but not built because of a stray #ifdef
would be bad.
2022-02-27 12:50:52 +01:00

32 lines
930 B
C++

#include "KingSystem/ActorSystem/actASSetting.h"
#include "KingSystem/Resource/resLoadRequest.h"
#include "KingSystem/Resource/resResourceASSetting.h"
namespace ksys::act {
SEAD_SINGLETON_DISPOSER_IMPL(ASSetting)
ASSetting::~ASSetting() = default;
void ASSetting::init(const sead::SafeString& config_path, sead::Heap* heap) {
res::LoadRequest req;
req.mRequester = "ASSetting";
req._22 = true;
mHandle.load(config_path, &req);
}
// NON_MATCHING: sead::DirectResource to res::ASSetting cast nullptr check; branching for the return
res::ASParamParser* ASSetting::getBoneParams(const sead::SafeString& key) const {
auto* res = sead::DynamicCast<res::ASSetting>(mHandle.getResource());
if (!res)
return nullptr;
for (auto& bones : res->getBlenderBones()) {
if (key == bones.mKeyName.ref())
return &bones.mBoneParams;
}
return nullptr;
}
} // namespace ksys::act