mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
al: Fix param name mismatches between declarations and definitions (#661)
This commit is contained in:
parent
08102131bb
commit
4a6fe58477
|
|
@ -73,27 +73,27 @@ void ActorActionKeeper::init() {
|
|||
mFlagCtrl->initPost();
|
||||
}
|
||||
|
||||
bool ActorActionKeeper::startAction(const char* name) {
|
||||
bool ActorActionKeeper::startAction(const char* action) {
|
||||
mIsActionRunning = true;
|
||||
if (!mNerveActionCtrl)
|
||||
tryStartActionNoAnim(name);
|
||||
tryStartActionNoAnim(action);
|
||||
|
||||
return mAnimCtrl && mAnimCtrl->start(name);
|
||||
return mAnimCtrl && mAnimCtrl->start(action);
|
||||
}
|
||||
|
||||
void ActorActionKeeper::tryStartActionNoAnim(const char* string) {
|
||||
void ActorActionKeeper::tryStartActionNoAnim(const char* action) {
|
||||
if (mFlagCtrl)
|
||||
mFlagCtrl->start(string);
|
||||
mFlagCtrl->start(action);
|
||||
if (mEffectCtrl)
|
||||
mEffectCtrl->startAction(string);
|
||||
mEffectCtrl->startAction(action);
|
||||
if (mSeCtrl)
|
||||
mSeCtrl->startAction(string);
|
||||
mSeCtrl->startAction(action);
|
||||
if (mBgmCtrl)
|
||||
mBgmCtrl->startAction(string);
|
||||
mBgmCtrl->startAction(action);
|
||||
if (mPadAndCameraCtrl)
|
||||
mPadAndCameraCtrl->startAction(string);
|
||||
mPadAndCameraCtrl->startAction(action);
|
||||
if (mScreenEffectCtrl)
|
||||
mScreenEffectCtrl->startAction(string);
|
||||
mScreenEffectCtrl->startAction(action);
|
||||
}
|
||||
|
||||
void ActorActionKeeper::updatePrev() {}
|
||||
|
|
|
|||
|
|
@ -16,14 +16,18 @@ class NerveActionCtrl;
|
|||
|
||||
class ActorActionKeeper {
|
||||
public:
|
||||
static ActorActionKeeper* tryCreate(LiveActor*, const ActorResource*, const char*, const char*);
|
||||
// TODO: rename `string0` and `string1`
|
||||
static ActorActionKeeper* tryCreate(LiveActor* actor, const ActorResource* actorRes,
|
||||
const char* string0, const char* string1);
|
||||
|
||||
ActorActionKeeper(LiveActor*, const char*, ActionAnimCtrl*, NerveActionCtrl*, ActionFlagCtrl*,
|
||||
ActionEffectCtrl*, ActionSeCtrl*, ActionBgmCtrl*, ActionPadAndCameraCtrl*,
|
||||
ActionScreenEffectCtrl*);
|
||||
ActorActionKeeper(LiveActor* parentActor, const char* actorName, ActionAnimCtrl* animCtrl,
|
||||
NerveActionCtrl* nrvActionCtrl, ActionFlagCtrl* flagCtrl,
|
||||
ActionEffectCtrl* effectCtrl, ActionSeCtrl* seCtrl, ActionBgmCtrl* bgmCtrl,
|
||||
ActionPadAndCameraCtrl* padAndCamCtrl,
|
||||
ActionScreenEffectCtrl* screenEffectCtrl);
|
||||
|
||||
bool startAction(const char* actionName);
|
||||
void tryStartActionNoAnim(const char* actionName);
|
||||
bool startAction(const char* action);
|
||||
void tryStartActionNoAnim(const char* action);
|
||||
void init();
|
||||
void updatePost();
|
||||
void updatePrev();
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ void AreaObj::initStageSwitchKeeper() {
|
|||
mStageSwitchKeeper = new StageSwitchKeeper();
|
||||
}
|
||||
|
||||
void AreaObj::init(const AreaInitInfo& initInfo) {
|
||||
void AreaObj::init(const AreaInitInfo& info) {
|
||||
using AreaObjFunctor = FunctorV0M<AreaObj*, void (AreaObj::*)()>;
|
||||
|
||||
mPlacementInfo = new PlacementInfo(initInfo);
|
||||
mSceneObjHolder = initInfo.getSceneObjHolder();
|
||||
mPlacementInfo = new PlacementInfo(info);
|
||||
mSceneObjHolder = info.getSceneObjHolder();
|
||||
tryGetMatrixTR(&mAreaTR, *mPlacementInfo);
|
||||
tryGetArg(&mPriority, *mPlacementInfo, "Priority");
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ void AreaObj::init(const AreaInitInfo& initInfo) {
|
|||
tryGetScale(&scale, *mPlacementInfo);
|
||||
mAreaShape->setScale(scale);
|
||||
|
||||
initStageSwitch(this, initInfo.getStageSwitchDirector(), initInfo);
|
||||
initStageSwitch(this, info.getStageSwitchDirector(), info);
|
||||
if (listenStageSwitchOnOffAppear(this, AreaObjFunctor(this, &AreaObj::invalidate),
|
||||
AreaObjFunctor(this, &AreaObj::validate)))
|
||||
invalidate();
|
||||
|
|
@ -47,16 +47,16 @@ void AreaObj::init(const AreaInitInfo& initInfo) {
|
|||
validate();
|
||||
}
|
||||
|
||||
bool AreaObj::isInVolume(const sead::Vector3f& position) const {
|
||||
bool AreaObj::isInVolume(const sead::Vector3f& pos) const {
|
||||
if (!mIsValid)
|
||||
return false;
|
||||
return mAreaShape->isInVolume(position);
|
||||
return mAreaShape->isInVolume(pos);
|
||||
}
|
||||
|
||||
bool AreaObj::isInVolumeOffset(const sead::Vector3f& position, f32 offset) const {
|
||||
bool AreaObj::isInVolumeOffset(const sead::Vector3f& pos, f32 offset) const {
|
||||
if (!mIsValid)
|
||||
return false;
|
||||
return mAreaShape->isInVolumeOffset(position, offset);
|
||||
return mAreaShape->isInVolumeOffset(pos, offset);
|
||||
}
|
||||
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public:
|
|||
void endInit();
|
||||
void update();
|
||||
void placement(const AreaInitInfo& initInfo);
|
||||
void placement(const AreaInitInfo* initInfo, s32 initInfoCount);
|
||||
void placement(const AreaInitInfo* initInfoArray, s32 initInfoCount);
|
||||
void createAreaObjGroup(const AreaInitInfo& initInfo);
|
||||
void createAreaObjGroupBuffer();
|
||||
void placementAreaObj(const AreaInitInfo& initInfo);
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ namespace al {
|
|||
|
||||
AreaShapeCube::AreaShapeCube(AreaShapeCube::OriginType originType) : mOriginType(originType) {}
|
||||
|
||||
bool AreaShapeCube::isInVolume(const sead::Vector3f& trans) const {
|
||||
bool AreaShapeCube::isInVolume(const sead::Vector3f& pos) const {
|
||||
sead::Vector3f localPos = sead::Vector3f::zero;
|
||||
calcLocalPos(&localPos, trans);
|
||||
calcLocalPos(&localPos, pos);
|
||||
|
||||
return isInLocalVolume(localPos);
|
||||
}
|
||||
|
||||
bool AreaShapeCube::isInLocalVolume(const sead::Vector3f& trans) const {
|
||||
bool AreaShapeCube::isInLocalVolume(const sead::Vector3f& pos) const {
|
||||
f32 bottom = mOriginType == OriginType::Base ?
|
||||
0.0f :
|
||||
(mOriginType == OriginType::Top ? -1000.0f : 500.0f);
|
||||
|
|
@ -21,8 +21,8 @@ bool AreaShapeCube::isInLocalVolume(const sead::Vector3f& trans) const {
|
|||
sead::Vector3f min = {-500.0f, bottom, -500.0f};
|
||||
sead::Vector3f max = {500.0f, top, 500.0f};
|
||||
|
||||
if ((trans.y < min.y || max.y < trans.y) || (trans.x < min.x || max.x < trans.x) ||
|
||||
(trans.z < min.z || max.z < trans.z))
|
||||
if ((pos.y < min.y || max.y < pos.y) || (pos.x < min.x || max.x < pos.x) ||
|
||||
(pos.z < min.z || max.z < pos.z))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ class AreaShapeCube : public AreaShape {
|
|||
public:
|
||||
enum class OriginType { Center, Base, Top };
|
||||
|
||||
AreaShapeCube(AreaShapeCube::OriginType);
|
||||
AreaShapeCube(AreaShapeCube::OriginType originType);
|
||||
|
||||
bool isInVolume(const sead::Vector3f&) const override;
|
||||
bool isInVolume(const sead::Vector3f& pos) const override;
|
||||
bool isInVolumeOffset(const sead::Vector3f&, f32) const override;
|
||||
bool calcNearestEdgePoint(sead::Vector3f*, const sead::Vector3f&) const override;
|
||||
bool checkArrowCollision(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&,
|
||||
const sead::Vector3f&) const override;
|
||||
bool calcLocalBoundingBox(sead::BoundBox3f*) const override;
|
||||
|
||||
bool isInLocalVolume(const sead::Vector3f&) const;
|
||||
bool isInLocalVolume(const sead::Vector3f& pos) const;
|
||||
|
||||
private:
|
||||
AreaShapeCube::OriginType mOriginType;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class AreaShapeCylinder : public AreaShape {
|
|||
public:
|
||||
enum class OriginType { Center, Base, Top };
|
||||
|
||||
AreaShapeCylinder(AreaShapeCylinder::OriginType);
|
||||
AreaShapeCylinder(AreaShapeCylinder::OriginType originType);
|
||||
|
||||
bool isInVolume(const sead::Vector3f&) const override;
|
||||
bool isInVolumeOffset(const sead::Vector3f&, f32) const override;
|
||||
|
|
|
|||
|
|
@ -8,33 +8,33 @@ namespace al {
|
|||
|
||||
AreaShapeOval::AreaShapeOval() {}
|
||||
|
||||
bool AreaShapeOval::isInVolume(const sead::Vector3f& trans) const {
|
||||
bool AreaShapeOval::isInVolume(const sead::Vector3f& pos) const {
|
||||
sead::Vector3f localPos = sead::Vector3f::zero;
|
||||
calcLocalPos(&localPos, trans);
|
||||
calcLocalPos(&localPos, pos);
|
||||
|
||||
return localPos.squaredLength() <= sead::Mathf::square(500.0f);
|
||||
}
|
||||
|
||||
bool AreaShapeOval::isInVolumeOffset(const sead::Vector3f& trans, f32 offset) const {
|
||||
bool AreaShapeOval::isInVolumeOffset(const sead::Vector3f& pos, f32 offset) const {
|
||||
sead::Vector3f scale = getScale();
|
||||
|
||||
// has to be this way around to match
|
||||
if (scale.x == scale.y && scale.y == scale.z) {
|
||||
sead::Vector3f baseTrans;
|
||||
calcTrans(&baseTrans);
|
||||
sead::Vector3f offsetTrans = trans - baseTrans;
|
||||
sead::Vector3f diff = pos - baseTrans;
|
||||
f32 radius = scale.x * 500.0f + offset;
|
||||
|
||||
return offsetTrans.squaredLength() <= sead::Mathf::square(radius);
|
||||
return diff.squaredLength() <= sead::Mathf::square(radius);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AreaShapeOval::calcNearestEdgePoint(sead::Vector3f* edgePoint,
|
||||
const sead::Vector3f& trans) const {
|
||||
const sead::Vector3f& pos) const {
|
||||
sead::Vector3f localPos = sead::Vector3f::zero;
|
||||
calcLocalPos(&localPos, trans);
|
||||
calcLocalPos(&localPos, pos);
|
||||
f32 length = localPos.length();
|
||||
|
||||
if (length > 0.0f)
|
||||
|
|
|
|||
|
|
@ -8,11 +8,12 @@ class AreaShapeOval : public AreaShape {
|
|||
public:
|
||||
AreaShapeOval();
|
||||
|
||||
bool isInVolume(const sead::Vector3f&) const override;
|
||||
bool isInVolumeOffset(const sead::Vector3f&, f32) const override;
|
||||
bool calcNearestEdgePoint(sead::Vector3f*, const sead::Vector3f&) const override;
|
||||
bool checkArrowCollision(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&,
|
||||
const sead::Vector3f&) const override;
|
||||
bool isInVolume(const sead::Vector3f& pos) const override;
|
||||
bool isInVolumeOffset(const sead::Vector3f& pos, f32 offset) const override;
|
||||
bool calcNearestEdgePoint(sead::Vector3f* edgePoint, const sead::Vector3f& pos) const override;
|
||||
// TODO: rename parameters
|
||||
bool checkArrowCollision(sead::Vector3f* a2, sead::Vector3f* a3, const sead::Vector3f& a4,
|
||||
const sead::Vector3f& a5) const override;
|
||||
|
||||
bool calcLocalBoundingBox(sead::BoundBox3f*) const override { return false; }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,28 +6,28 @@ namespace al {
|
|||
|
||||
AreaShapeSphere::AreaShapeSphere() {}
|
||||
|
||||
bool AreaShapeSphere::isInVolume(const sead::Vector3f& trans) const {
|
||||
bool AreaShapeSphere::isInVolume(const sead::Vector3f& pos) const {
|
||||
sead::Vector3f baseTrans;
|
||||
calcTrans(&baseTrans);
|
||||
sead::Vector3f offsetTrans = trans - baseTrans;
|
||||
sead::Vector3f diff = pos - baseTrans;
|
||||
f32 radius = getScale().x * 500.0f;
|
||||
|
||||
return offsetTrans.squaredLength() <= sead::Mathf::square(radius);
|
||||
return diff.squaredLength() <= sead::Mathf::square(radius);
|
||||
}
|
||||
|
||||
bool AreaShapeSphere::isInVolumeOffset(const sead::Vector3f& trans, f32 offset) const {
|
||||
bool AreaShapeSphere::isInVolumeOffset(const sead::Vector3f& pos, f32 offset) const {
|
||||
sead::Vector3f baseTrans;
|
||||
calcTrans(&baseTrans);
|
||||
sead::Vector3f offsetTrans = trans - baseTrans;
|
||||
sead::Vector3f diff = pos - baseTrans;
|
||||
f32 radius = getScale().x * 500.0f + offset;
|
||||
|
||||
return offsetTrans.squaredLength() <= sead::Mathf::square(radius);
|
||||
return diff.squaredLength() <= sead::Mathf::square(radius);
|
||||
}
|
||||
|
||||
bool AreaShapeSphere::calcNearestEdgePoint(sead::Vector3f* edgePoint,
|
||||
const sead::Vector3f& trans) const {
|
||||
const sead::Vector3f& pos) const {
|
||||
sead::Vector3f localPos = sead::Vector3f::zero;
|
||||
calcLocalPos(&localPos, trans);
|
||||
calcLocalPos(&localPos, pos);
|
||||
f32 length = localPos.length();
|
||||
|
||||
if (length > 0.0f)
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ class AreaShapeSphere : public AreaShape {
|
|||
public:
|
||||
AreaShapeSphere();
|
||||
|
||||
bool isInVolume(const sead::Vector3f&) const override;
|
||||
bool isInVolumeOffset(const sead::Vector3f&, f32) const override;
|
||||
bool calcNearestEdgePoint(sead::Vector3f*, const sead::Vector3f&) const override;
|
||||
bool isInVolume(const sead::Vector3f& pos) const override;
|
||||
bool isInVolumeOffset(const sead::Vector3f& pos, f32 offset) const override;
|
||||
bool calcNearestEdgePoint(sead::Vector3f* edgePoint, const sead::Vector3f& pos) const override;
|
||||
bool checkArrowCollision(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&,
|
||||
const sead::Vector3f&) const override;
|
||||
bool calcLocalBoundingBox(sead::BoundBox3f*) const override;
|
||||
bool calcLocalBoundingBox(sead::BoundBox3f* boundingBox) const override;
|
||||
};
|
||||
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@
|
|||
#include "Library/Player/PlayerUtil.h"
|
||||
|
||||
namespace al {
|
||||
SwitchAreaTargetInfo::SwitchAreaTargetInfo(s32 playerPositionCount, s32 cameraLookAtPositionSize)
|
||||
: mPlayerTargetPositionSize(playerPositionCount), mPlayerPositionSize(playerPositionCount),
|
||||
mCameraLookAtPositionSize(cameraLookAtPositionSize) {
|
||||
SwitchAreaTargetInfo::SwitchAreaTargetInfo(s32 maxPlayerPositions, s32 maxCameraLookAtPositions)
|
||||
: mPlayerTargetPositionSize(maxPlayerPositions), mPlayerPositionSize(maxPlayerPositions),
|
||||
mCameraLookAtPositionSize(maxCameraLookAtPositions) {
|
||||
mPlayerTargetPositions = new sead::Vector3f[mPlayerTargetPositionSize];
|
||||
mPlayerPositions = new sead::Vector3f[mPlayerPositionSize];
|
||||
mCameraLookAtPositions = new sead::Vector3f[mCameraLookAtPositionSize];
|
||||
}
|
||||
|
||||
SwitchAreaTargetInfo::SwitchAreaTargetInfo(sead::Vector3f* playerPositions, s32 playerPositionCount)
|
||||
: mPlayerTargetPositions(playerPositions), mPlayerTargetPositionCount(playerPositionCount),
|
||||
mPlayerTargetPositionSize(playerPositionCount), mPlayerPositions(playerPositions),
|
||||
mPlayerPositionCount(playerPositionCount), mPlayerPositionSize(playerPositionCount) {}
|
||||
SwitchAreaTargetInfo::SwitchAreaTargetInfo(sead::Vector3f* playerPositions, s32 maxPlayerPositions)
|
||||
: mPlayerTargetPositions(playerPositions), mPlayerTargetPositionCount(maxPlayerPositions),
|
||||
mPlayerTargetPositionSize(maxPlayerPositions), mPlayerPositions(playerPositions),
|
||||
mPlayerPositionCount(maxPlayerPositions), mPlayerPositionSize(maxPlayerPositions) {}
|
||||
|
||||
void SwitchAreaTargetInfo::update(const PlayerHolder* playerHolder,
|
||||
const SceneCameraInfo* sceneCameraInfo) {
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ public:
|
|||
* @info mCameraLookAtPositions will be set to an array of cameraLookAtPositionMaxCount
|
||||
* sead::Vector3f but only one is used/updated.
|
||||
*/
|
||||
SwitchAreaTargetInfo(s32 playerPositionSize, s32 cameraLookAtPositionSize);
|
||||
SwitchAreaTargetInfo(s32 maxPlayerPositions, s32 maxCameraLookAtPositions);
|
||||
/**
|
||||
* @warning Using this ctor will cause a crash when calling update because
|
||||
* mCameraLookAtPositions is nullptr by default.
|
||||
*/
|
||||
SwitchAreaTargetInfo(sead::Vector3f* playerPositions, s32 playerPositionCount);
|
||||
SwitchAreaTargetInfo(sead::Vector3f* playerPositions, s32 maxPlayerPositions);
|
||||
|
||||
void update(const PlayerHolder* playerHolder, const SceneCameraInfo* sceneCameraInfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,12 @@ struct BgmUserInfo;
|
|||
|
||||
class BgmKeeper {
|
||||
public:
|
||||
static BgmKeeper* create(const AudioSystemInfo*, BgmDirector*, const char*);
|
||||
// TODO: rename `string`
|
||||
static BgmKeeper* create(const AudioSystemInfo* audioInfo, BgmDirector* director,
|
||||
const char* string);
|
||||
|
||||
BgmKeeper(const AudioSystemInfo*, BgmDirector*, const char*);
|
||||
// TODO: rename `string`
|
||||
BgmKeeper(const AudioSystemInfo* audioInfo, BgmDirector* director, const char* string);
|
||||
|
||||
const char* getUserName() const;
|
||||
void update();
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public:
|
|||
: CameraInterpoleStep({CameraInterpoleStepType::ByCameraDistance}) {}
|
||||
|
||||
inline void load(const ByamlIter& iter);
|
||||
inline void set(CameraInterpoleStepType type, s32 step, bool isInterpolate);
|
||||
inline void set(CameraInterpoleStepType type, s32 step, bool is_interpolate_by_step);
|
||||
|
||||
s8 isEaseOut = false;
|
||||
bool isInterpolateByStep = false;
|
||||
|
|
@ -116,7 +116,7 @@ public:
|
|||
|
||||
static_assert(sizeof(OrthoProjectionParam) == 0xC);
|
||||
|
||||
CameraPoser(const char* poserName);
|
||||
CameraPoser(const char* name);
|
||||
virtual AreaObjDirector* getAreaObjDirector() const override;
|
||||
|
||||
virtual void init() {}
|
||||
|
|
@ -161,8 +161,8 @@ public:
|
|||
|
||||
virtual bool requestTurnToDirection(const CameraTurnInfo* info) { return false; }
|
||||
|
||||
void appear(const CameraStartInfo& startInfo);
|
||||
bool receiveRequestFromObjectCore(const CameraObjectRequestInfo& objRequestInfo);
|
||||
void appear(const CameraStartInfo& info);
|
||||
bool receiveRequestFromObjectCore(const CameraObjectRequestInfo& info);
|
||||
|
||||
bool isInterpoleByCameraDistance() const;
|
||||
bool isInterpoleEaseOut() const;
|
||||
|
|
@ -172,11 +172,12 @@ public:
|
|||
void initNerve(const Nerve* nerve, s32 maxStates);
|
||||
void initArrowCollider(CameraArrowCollider* arrowCollider);
|
||||
void initAudioKeeper(const char* name);
|
||||
void initRail(const PlacementInfo& placementInfo);
|
||||
void initRail(const PlacementInfo& info);
|
||||
void initLocalInterpole();
|
||||
void initLookAtInterpole(f32);
|
||||
// TODO: rename `v`
|
||||
void initLookAtInterpole(f32 v);
|
||||
void initOrthoProjectionParam();
|
||||
void tryInitAreaLimitter(const PlacementInfo& placementInfo);
|
||||
void tryInitAreaLimitter(const PlacementInfo& info);
|
||||
bool tryCalcOrthoProjectionInfo(OrthoProjectionInfo* projectionInfo) const;
|
||||
|
||||
void makeLookAtCameraPrev(sead::LookAtCamera* cam) const;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class CameraStopJudge : public HioNode, public IUseAreaObj {
|
|||
public:
|
||||
CameraStopJudge();
|
||||
bool isStop() const;
|
||||
void update(const sead::Vector3f&);
|
||||
void update(const sead::Vector3f& position);
|
||||
|
||||
AreaObjDirector* getAreaObjDirector() const override { return mAreaObjDirector; }
|
||||
|
||||
|
|
|
|||
|
|
@ -13,9 +13,12 @@ public:
|
|||
CameraSwitchRequester();
|
||||
|
||||
void init(CameraSwitchRequestInfo* start, CameraSwitchRequestInfo* end);
|
||||
void requestStart(CameraTicket* ticket, s32);
|
||||
void requestEnd(CameraTicket* ticket, s32, bool);
|
||||
void requestEndWithNextCameraPose(CameraTicket* ticket, const CameraPoseInfo* poseInfo, s32);
|
||||
// TODO: rename `i`
|
||||
void requestStart(CameraTicket* ticket, s32 i);
|
||||
// TODO: rename `i`, `b`
|
||||
void requestEnd(CameraTicket* ticket, s32 i, bool b);
|
||||
// TODO: rename `i`
|
||||
void requestEndWithNextCameraPose(CameraTicket* ticket, const CameraPoseInfo* poseInfo, s32 i);
|
||||
|
||||
private:
|
||||
CameraSwitchRequestInfo* mStart = nullptr;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class CameraViewInfo;
|
|||
|
||||
class SceneCameraInfo {
|
||||
public:
|
||||
SceneCameraInfo(s32 num);
|
||||
SceneCameraInfo(s32 maxViewNum);
|
||||
|
||||
void initViewInfo(CameraViewInfo* cameraViewInfo);
|
||||
const char* getViewName(s32 num) const;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class SnapShotCameraCtrl : public NerveExecutor, public IUseAudioKeeper {
|
|||
public:
|
||||
SnapShotCameraCtrl(const SnapShotCameraSceneInfo*);
|
||||
void start(f32);
|
||||
void load(const ByamlIter&);
|
||||
void load(const ByamlIter& iter);
|
||||
void startReset(s32);
|
||||
void update(const sead::LookAtCamera&, const IUseCollision*, const ICameraInput*);
|
||||
void makeLookAtCameraPost(sead::LookAtCamera*) const;
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ public:
|
|||
const sead::Vector3f& calcAndGetFaceNormal();
|
||||
const sead::Vector3f& calcAndGetEdgeNormal(s32 index);
|
||||
const sead::Vector3f& calcAndGetPos(s32 index);
|
||||
void getLocalPos(sead::Vector3f* localPos, s32 index) const;
|
||||
void calcForceMovePower(sead::Vector3f* movePower, const sead::Vector3f& pos) const;
|
||||
void calcForceRotatePower(sead::Quatf* rotatePower) const;
|
||||
void getLocalPos(sead::Vector3f* pos, s32 index) const;
|
||||
void calcForceMovePower(sead::Vector3f* power, const sead::Vector3f& pos) const;
|
||||
void calcForceRotatePower(sead::Quatf* power) const;
|
||||
bool getAttributes(ByamlIter* iter) const;
|
||||
const HitSensor* getSensor() const;
|
||||
const sead::Matrix34f& getBaseMtx() const;
|
||||
|
|
@ -50,8 +50,8 @@ public:
|
|||
const sead::Matrix34f& getPrevBaseMtx() const;
|
||||
|
||||
// clang-format off
|
||||
friend bool ::operator==(const Triangle& tri1, const Triangle& tri2);
|
||||
friend bool ::operator!=(const Triangle& tri1, const Triangle& tri2);
|
||||
friend bool ::operator==(const Triangle& lhs, const Triangle& rhs);
|
||||
friend bool ::operator!=(const Triangle& lhs, const Triangle& rhs);
|
||||
// clang-format on
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -569,37 +569,37 @@ const sead::Vector2f& getRightStick(s32 port) {
|
|||
return getController(port)->getRightStick();
|
||||
}
|
||||
|
||||
void getPadCrossDir(sead::Vector2f* vec, s32 port) {
|
||||
vec->x = 0;
|
||||
vec->y = 0;
|
||||
void getPadCrossDir(sead::Vector2f* dir, s32 port) {
|
||||
dir->x = 0;
|
||||
dir->y = 0;
|
||||
if (isPadHoldUp(port))
|
||||
vec->y = 1;
|
||||
dir->y = 1;
|
||||
if (isPadHoldDown(port))
|
||||
vec->y = -1;
|
||||
dir->y = -1;
|
||||
if (isPadHoldLeft(port))
|
||||
vec->x = -1;
|
||||
dir->x = -1;
|
||||
if (isPadHoldRight(port))
|
||||
vec->x = 1;
|
||||
dir->x = 1;
|
||||
}
|
||||
|
||||
void getPadCrossDirSideways(sead::Vector2f* vec, s32 port) {
|
||||
vec->x = 0;
|
||||
vec->y = 0;
|
||||
void getPadCrossDirSideways(sead::Vector2f* dir, s32 port) {
|
||||
dir->x = 0;
|
||||
dir->y = 0;
|
||||
if (isPadHoldUp(port))
|
||||
vec->x = -1;
|
||||
dir->x = -1;
|
||||
if (isPadHoldDown(port))
|
||||
vec->x = 1;
|
||||
dir->x = 1;
|
||||
if (isPadHoldLeft(port))
|
||||
vec->y = -1;
|
||||
dir->y = -1;
|
||||
if (isPadHoldRight(port))
|
||||
vec->y = 1;
|
||||
dir->y = 1;
|
||||
}
|
||||
|
||||
void calcTouchScreenPos(sead::Vector2f* vec) {
|
||||
vec->set(getController(getTouchPanelPort())->getPointer());
|
||||
void calcTouchScreenPos(sead::Vector2f* pos) {
|
||||
pos->set(getController(getTouchPanelPort())->getPointer());
|
||||
}
|
||||
|
||||
void calcTouchLayoutPos(sead::Vector2f*) {}
|
||||
void calcTouchLayoutPos(sead::Vector2f* pos) {}
|
||||
|
||||
bool isTouchPosInRect(const sead::Vector2f& rect_pos, const sead::Vector2f& size) {
|
||||
sead::Vector2f pos;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ bool isPadRepeatUiCursorRight(s32 port = -1);
|
|||
|
||||
bool isPadHoldPressLeftStick(s32 port = -1);
|
||||
bool isPadHoldPressRightStick(s32 port = -1);
|
||||
bool isPadHold(s32, s32);
|
||||
bool isPadHold(s32 port, s32 button);
|
||||
bool isPadHoldA(s32 port = -1);
|
||||
bool isPadHoldB(s32 port = -1);
|
||||
bool isPadHoldX(s32 port = -1);
|
||||
|
|
@ -132,7 +132,7 @@ bool isPadHoldUiCursorDown(s32 port = -1);
|
|||
bool isPadHoldUiCursorLeft(s32 port = -1);
|
||||
bool isPadHoldUiCursorRight(s32 port = -1);
|
||||
|
||||
bool isPadRelease(s32, s32);
|
||||
bool isPadRelease(s32 port, s32 button);
|
||||
bool isPadReleaseA(s32 port = -1);
|
||||
bool isPadReleaseB(s32 port = -1);
|
||||
bool isPadReleaseX(s32 port = -1);
|
||||
|
|
@ -169,20 +169,21 @@ bool isPadReleaseUiCursorRight(s32 port = -1);
|
|||
const sead::Vector2f& getLeftStick(s32 port = -1);
|
||||
const sead::Vector2f& getRightStick(s32 port = -1);
|
||||
|
||||
void getPadCrossDir(sead::Vector2f*, s32);
|
||||
void getPadCrossDirSideways(sead::Vector2f*, s32);
|
||||
void getPadCrossDir(sead::Vector2f* dir, s32 port);
|
||||
void getPadCrossDirSideways(sead::Vector2f* dir, s32 port);
|
||||
|
||||
void calcTouchScreenPos(sead::Vector2f*);
|
||||
void calcTouchLayoutPos(sead::Vector2f*);
|
||||
void calcTouchScreenPos(sead::Vector2f* pos);
|
||||
void calcTouchLayoutPos(sead::Vector2f* pos);
|
||||
|
||||
bool isTouchPosInRect(const sead::Vector2f&, const sead::Vector2f&);
|
||||
bool isTouchPosInRect(const sead::Vector2f& rect_pos, const sead::Vector2f& size);
|
||||
bool isTouchPosInCircle(const sead::Vector2f&, f32);
|
||||
bool isTouchPosInCircleByWorldPos(const sead::Vector2f&, const IUseCamera*, f32, f32);
|
||||
bool isPadTouchRect(f32, f32, f32, f32);
|
||||
|
||||
void setPadRepeat(s32, s32, s32, s32);
|
||||
// TODO: rename parameters
|
||||
void setPadRepeat(s32 a1, s32 a2, s32 a3, s32 port);
|
||||
|
||||
s32 getPlayerControllerPort(s32 index);
|
||||
s32 getPlayerControllerPort(s32 playerNo);
|
||||
s32 getTouchPanelPort();
|
||||
s32 getMainControllerPort();
|
||||
s32 getMainJoyPadDoublePort();
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ u32 getFileSize(const sead::SafeString& fileName);
|
|||
u32 calcFileAlignment(const sead::SafeString& fileName);
|
||||
u32 calcBufferSizeAlignment(const sead::SafeString& fileName);
|
||||
u8* loadFile(const sead::SafeString& fileName, s32 size);
|
||||
bool tryLoadFileToBuffer(const sead::SafeString& fileName, u8*, u32 bufferSize, s32 size);
|
||||
bool tryLoadFileToBuffer(const sead::SafeString& fileName, u8* buffer, u32 bufferSize, s32 size);
|
||||
sead::ArchiveRes* loadArchive(const sead::SafeString& fileName);
|
||||
sead::ArchiveRes* loadArchiveWithExt(const sead::SafeString& fileName, const char* ext);
|
||||
bool tryRequestLoadArchive(const sead::SafeString& fileName, sead::Heap* heap);
|
||||
|
|
@ -29,7 +29,7 @@ bool tryRequestLoadArchive(const sead::SafeString& fileName, sead::Heap* heap);
|
|||
void loadSoundItem(u32 soundEntryId, u32 unknown, IAudioResourceLoader* resLoader);
|
||||
|
||||
bool tryRequestLoadSoundItem(u32 soundEntryId);
|
||||
bool tryRequestPreLoadFile(const Resource* res, s32, sead::Heap* heap,
|
||||
bool tryRequestPreLoadFile(const Resource* res, s32 id, sead::Heap* heap,
|
||||
IAudioResourceLoader* resLoader);
|
||||
bool tryRequestPreLoadFile(const Resource* res, const sead::SafeString& fileName, sead::Heap* heap,
|
||||
IAudioResourceLoader* resLoader);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class LiveActor;
|
|||
|
||||
class HitSensorKeeper {
|
||||
public:
|
||||
HitSensorKeeper(s32 sensorCount);
|
||||
HitSensorKeeper(s32 maxSensors);
|
||||
|
||||
HitSensor* addSensor(LiveActor* parentActor, const char* name, u32 hitSensorType, f32 radius,
|
||||
u16 maxSensorCount, const sead::Vector3f* followPos,
|
||||
|
|
|
|||
|
|
@ -68,13 +68,13 @@ public:
|
|||
|
||||
virtual void control() {}
|
||||
|
||||
void initLayoutKeeper(LayoutKeeper*);
|
||||
void initLayoutKeeper(LayoutKeeper* layoutKeeper);
|
||||
void initActionKeeper();
|
||||
void initTextPaneAnimator(LayoutTextPaneAnimator*);
|
||||
void initExecuteInfo(LayoutExecuteInfo*);
|
||||
void initHitReactionKeeper(HitReactionKeeper*);
|
||||
void initSceneInfo(LayoutSceneInfo*);
|
||||
void initLayoutPartsActorKeeper(s32);
|
||||
void initLayoutPartsActorKeeper(s32 capacity);
|
||||
void initEffectKeeper(EffectKeeper*);
|
||||
void initAudioKeeper(AudioKeeper*);
|
||||
void initNerve(const Nerve*, s32);
|
||||
|
|
|
|||
|
|
@ -62,234 +62,238 @@ inline void createMat(const LiveActor* actor, s32 programType) {
|
|||
|
||||
// All
|
||||
|
||||
void setAllAnimFrame(LiveActor*, f32);
|
||||
void setAllAnimFrame(LiveActor* actor, f32 frame);
|
||||
void setAllAnimFrameRate(LiveActor* f32);
|
||||
|
||||
// Skl
|
||||
|
||||
bool tryStartSklAnimIfExist(LiveActor*, const char*);
|
||||
bool tryStartSklAnimIfNotPlaying(LiveActor*, const char*);
|
||||
bool tryStartSklAnimIfExist(LiveActor* actor, const char* animName);
|
||||
bool tryStartSklAnimIfNotPlaying(LiveActor* actor, const char* animName);
|
||||
|
||||
void startSklAnim(LiveActor*, const char*);
|
||||
void startSklAnimInterpole(LiveActor*, const char*, const char*);
|
||||
void startSklAnimBlend(LiveActor*, const char*, const char*, const char*, const char*, const char*,
|
||||
const char*);
|
||||
void startSklAnimBlendInterpole(LiveActor*, const char*, const char*, const char*, const char*,
|
||||
const char*, const char*, const char*);
|
||||
void startSklAnim(LiveActor* actor, const char* animName);
|
||||
void startSklAnimInterpole(LiveActor* actor, const char* animName0, const char* animName1);
|
||||
void startSklAnimBlend(LiveActor* actor, const char* animName0, const char* animName1,
|
||||
const char* animName2, const char* animName3, const char* animName4,
|
||||
const char* animName5);
|
||||
void startSklAnimBlendInterpole(LiveActor* actor, const char* animName0, const char* animName1,
|
||||
const char* animName2, const char* animName3, const char* animName4,
|
||||
const char* animName5, const char* animName6);
|
||||
|
||||
void clearSklAnimInterpole(LiveActor*);
|
||||
void clearSklAnimInterpole(LiveActor* actor);
|
||||
void validateSklAnimRetargetting(const LiveActor*);
|
||||
void invalidateSklAnimRetargetting(const LiveActor*);
|
||||
void copySklAnim(LiveActor*, const LiveActor*);
|
||||
|
||||
void setSklAnimFrame(LiveActor*, f32, s32);
|
||||
void setSklAnimFrameRate(LiveActor*, f32, s32);
|
||||
void setSklAnimFrameAndStop(LiveActor*, f32, s32);
|
||||
void setSklAnimBlendWeight(LiveActor*, f32, s32);
|
||||
void setSklAnimBlendWeightDouble(LiveActor*, f32);
|
||||
void setSklAnimBlendWeightDouble(LiveActor*, f32, f32);
|
||||
void setSklAnimBlendWeightTriple(LiveActor*, f32, f32, f32);
|
||||
void setSklAnimBlendWeightQuad(LiveActor*, f32, f32, f32, f32);
|
||||
void setSklAnimBlendWeightFivefold(LiveActor*, f32, f32, f32, f32, f32);
|
||||
void setSklAnimFrame(LiveActor* actor, f32 frame, s32 index);
|
||||
void setSklAnimFrameRate(LiveActor* actor, f32 frameRate, s32 index);
|
||||
void setSklAnimFrameAndStop(LiveActor* actor, f32 frame, s32 index);
|
||||
void setSklAnimBlendWeight(LiveActor* actor, f32 weight, s32 index);
|
||||
void setSklAnimBlendWeightDouble(LiveActor* actor, f32 weight);
|
||||
void setSklAnimBlendWeightDouble(LiveActor* actor, f32 weight0, f32 weight1);
|
||||
void setSklAnimBlendWeightTriple(LiveActor* actor, f32 weight0, f32 weight1, f32 weight2);
|
||||
void setSklAnimBlendWeightQuad(LiveActor* actor, f32 weight0, f32 weight1, f32 weight2,
|
||||
f32 weight3);
|
||||
void setSklAnimBlendWeightFivefold(LiveActor* actor, f32 weight0, f32 weight1, f32 weight2,
|
||||
f32 weight3, f32 weight4);
|
||||
void setSklAnimBlendWeightSixfold(LiveActor*, f32, f32, f32, f32, f32);
|
||||
void setSklAnimBlendFrameAll(LiveActor*, f32, bool);
|
||||
void setSklAnimBlendFrameRateAll(LiveActor*, f32, bool);
|
||||
void setSklAnimBlendFrameAll(LiveActor* actor, f32 frame, bool isSync);
|
||||
void setSklAnimBlendFrameRateAll(LiveActor* actor, f32 frameRate, bool isSync);
|
||||
|
||||
const char* getPlayingSklAnimName(const LiveActor*, s32);
|
||||
f32 getSklAnimFrame(const LiveActor*, s32);
|
||||
f32 getSklAnimFrameRate(const LiveActor*, s32);
|
||||
f32 getSklAnimFrameMax(const LiveActor*, s32);
|
||||
f32 getSklAnimFrameMax(const LiveActor*, const char*);
|
||||
s32 getSklAnimBlendNum(const LiveActor*);
|
||||
f32 getSklAnimBlendWeight(const LiveActor*, s32);
|
||||
const char* getPlayingSklAnimName(const LiveActor* actor, s32 index);
|
||||
f32 getSklAnimFrame(const LiveActor* actor, s32 index);
|
||||
f32 getSklAnimFrameRate(const LiveActor* actor, s32 index);
|
||||
f32 getSklAnimFrameMax(const LiveActor* actor, s32 index);
|
||||
f32 getSklAnimFrameMax(const LiveActor* actor, const char* animName);
|
||||
s32 getSklAnimBlendNum(const LiveActor* actor);
|
||||
f32 getSklAnimBlendWeight(const LiveActor* actor, s32 index);
|
||||
|
||||
bool isSklAnimExist(const LiveActor*, const char*);
|
||||
bool isSklAnimPlaying(const LiveActor*, const char*, s32);
|
||||
bool isSklAnimExist(const LiveActor* actor, const char* animName);
|
||||
bool isSklAnimPlaying(const LiveActor* actor, const char* animName, s32 index);
|
||||
bool isExistSklAnimRetargetting(const LiveActor*);
|
||||
bool isSklAnimRetargettingValid(const LiveActor*);
|
||||
bool isSklAnimExist(const LiveActor*);
|
||||
bool isSklAnimEnd(const LiveActor*, s32);
|
||||
bool isSklAnimOneTime(const LiveActor*, const char*);
|
||||
bool isSklAnimOneTime(const LiveActor*, s32);
|
||||
bool isSklAnimPlaying(const LiveActor*, s32);
|
||||
bool isSklAnimExist(const LiveActor* actor);
|
||||
bool isSklAnimEnd(const LiveActor* actor, s32 index);
|
||||
bool isSklAnimOneTime(const LiveActor* actor, const char* animName);
|
||||
bool isSklAnimOneTime(const LiveActor* actor, s32 index);
|
||||
bool isSklAnimPlaying(const LiveActor* actor, s32 index);
|
||||
|
||||
// Mtp
|
||||
|
||||
bool tryStartMtpAnimIfExist(LiveActor*, const char*);
|
||||
bool tryStartMtpAnimIfNotPlaying(LiveActor*, const char*);
|
||||
bool tryStartMtpAnimIfExist(LiveActor* actor, const char* animName);
|
||||
bool tryStartMtpAnimIfNotPlaying(LiveActor* actor, const char* animName);
|
||||
|
||||
void startMtpAnim(LiveActor*, const char*);
|
||||
void startMtpAnimAndSetFrameAndStop(LiveActor*, const char*, f32);
|
||||
void startMtpAnim(LiveActor* actor, const char* animName);
|
||||
void startMtpAnimAndSetFrameAndStop(LiveActor* actor, const char* animName, f32 frame);
|
||||
|
||||
void clearMtpAnim(LiveActor*);
|
||||
void clearMtpAnim(LiveActor* actor);
|
||||
|
||||
void setMtpAnimFrame(LiveActor*, f32);
|
||||
void setMtpAnimFrameRate(LiveActor*, f32);
|
||||
void setMtpAnimFrameAndStop(LiveActor*, f32);
|
||||
void setMtpAnimFrameAndStopEnd(LiveActor*);
|
||||
void setMtpAnimFrame(LiveActor* actor, f32 frame);
|
||||
void setMtpAnimFrameRate(LiveActor* actor, f32 frameRate);
|
||||
void setMtpAnimFrameAndStop(LiveActor* actor, f32 frame);
|
||||
void setMtpAnimFrameAndStopEnd(LiveActor* actor);
|
||||
|
||||
const char* getPlayingMtpAnimName(const LiveActor*);
|
||||
f32 getMtpAnimFrame(const LiveActor*);
|
||||
f32 getMtpAnimFrameRate(const LiveActor*);
|
||||
f32 getMtpAnimFrameMax(const LiveActor*);
|
||||
f32 getMtpAnimFrameMax(const LiveActor*, const char*);
|
||||
const char* getPlayingMtpAnimName(const LiveActor* actor);
|
||||
f32 getMtpAnimFrame(const LiveActor* actor);
|
||||
f32 getMtpAnimFrameRate(const LiveActor* actor);
|
||||
f32 getMtpAnimFrameMax(const LiveActor* actor);
|
||||
f32 getMtpAnimFrameMax(const LiveActor* actor, const char* animName);
|
||||
|
||||
bool isMtpAnimExist(const LiveActor*, const char*);
|
||||
bool isMtpAnimPlaying(const LiveActor*, const char*);
|
||||
bool isMtpAnimExist(const LiveActor*);
|
||||
bool isMtpAnimEnd(const LiveActor*);
|
||||
bool isMtpAnimOneTime(const LiveActor*, const char*);
|
||||
bool isMtpAnimOneTime(const LiveActor*);
|
||||
bool isMtpAnimPlaying(const LiveActor*);
|
||||
bool isMtpAnimExist(const LiveActor* actor, const char* animName);
|
||||
bool isMtpAnimPlaying(const LiveActor* actor, const char* animName);
|
||||
bool isMtpAnimExist(const LiveActor* actor);
|
||||
bool isMtpAnimEnd(const LiveActor* actor);
|
||||
bool isMtpAnimOneTime(const LiveActor* actor, const char* animName);
|
||||
bool isMtpAnimOneTime(const LiveActor* actor);
|
||||
bool isMtpAnimPlaying(const LiveActor* actor);
|
||||
|
||||
// Mcl
|
||||
|
||||
bool tryStartMclAnimIfExist(LiveActor*, const char*);
|
||||
bool tryStartMclAnimIfNotPlaying(LiveActor*, const char*);
|
||||
bool tryStartMclAnimIfExist(LiveActor* actor, const char* animName);
|
||||
bool tryStartMclAnimIfNotPlaying(LiveActor* actor, const char* animName);
|
||||
|
||||
void startMclAnim(LiveActor*, const char*);
|
||||
void startMclAnimAndSetFrameAndStop(LiveActor*, const char*, f32);
|
||||
void startMclAnim(LiveActor* actor, const char* animName);
|
||||
void startMclAnimAndSetFrameAndStop(LiveActor* actor, const char* animName, f32 frame);
|
||||
|
||||
void clearMclAnim(LiveActor*);
|
||||
void clearMclAnim(LiveActor* actor);
|
||||
|
||||
void setMclAnimFrame(LiveActor*, f32);
|
||||
void setMclAnimFrameRate(LiveActor*, f32);
|
||||
void setMclAnimFrameAndStop(LiveActor*, f32);
|
||||
void setMclAnimNormalFrameAndStop(LiveActor*, f32);
|
||||
void setMclAnimFrameAndStopEnd(LiveActor*);
|
||||
void setMclAnimFrame(LiveActor* actor, f32 frame);
|
||||
void setMclAnimFrameRate(LiveActor* actor, f32 frameRate);
|
||||
void setMclAnimFrameAndStop(LiveActor* actor, f32 frame);
|
||||
void setMclAnimNormalFrameAndStop(LiveActor* actor, f32 frame);
|
||||
void setMclAnimFrameAndStopEnd(LiveActor* actor);
|
||||
|
||||
const char* getPlayingMclAnimName(const LiveActor*);
|
||||
f32 getMclAnimFrame(const LiveActor*);
|
||||
f32 getMclAnimFrameRate(const LiveActor*);
|
||||
f32 getMclAnimFrameMax(const LiveActor*);
|
||||
f32 getMclAnimFrameMax(const LiveActor*, const char*);
|
||||
const char* getPlayingMclAnimName(const LiveActor* actor);
|
||||
f32 getMclAnimFrame(const LiveActor* actor);
|
||||
f32 getMclAnimFrameRate(const LiveActor* actor);
|
||||
f32 getMclAnimFrameMax(const LiveActor* actor);
|
||||
f32 getMclAnimFrameMax(const LiveActor* actor, const char* animName);
|
||||
|
||||
bool isMclAnimExist(const LiveActor*, const char*);
|
||||
bool isMclAnimPlaying(const LiveActor*, const char*);
|
||||
bool isMclAnimExist(const LiveActor*);
|
||||
bool isMclAnimEnd(const LiveActor*);
|
||||
bool isMclAnimOneTime(const LiveActor*, const char*);
|
||||
bool isMclAnimOneTime(const LiveActor*);
|
||||
bool isMclAnimPlaying(const LiveActor*);
|
||||
bool isMclAnimExist(const LiveActor* actor, const char* animName);
|
||||
bool isMclAnimPlaying(const LiveActor* actor, const char* animName);
|
||||
bool isMclAnimExist(const LiveActor* actor);
|
||||
bool isMclAnimEnd(const LiveActor* actor);
|
||||
bool isMclAnimOneTime(const LiveActor* actor, const char* animName);
|
||||
bool isMclAnimOneTime(const LiveActor* actor);
|
||||
bool isMclAnimPlaying(const LiveActor* actor);
|
||||
|
||||
// Mts
|
||||
|
||||
bool tryStartMtsAnimIfExist(LiveActor*, const char*);
|
||||
bool tryStartMtsAnimIfNotPlaying(LiveActor*, const char*);
|
||||
bool tryStartMtsAnimIfExist(LiveActor* actor, const char* animName);
|
||||
bool tryStartMtsAnimIfNotPlaying(LiveActor* actor, const char* animName);
|
||||
|
||||
void startMtsAnim(LiveActor*, const char*);
|
||||
void startMtsAnimAndSetFrameAndStop(LiveActor*, const char*, f32);
|
||||
void startMtsAnim(LiveActor* actor, const char* animName);
|
||||
void startMtsAnimAndSetFrameAndStop(LiveActor* actor, const char* animName, f32 frame);
|
||||
|
||||
void clearMtsAnim(LiveActor*);
|
||||
void clearMtsAnim(LiveActor* actor);
|
||||
|
||||
void setMtsAnimFrame(LiveActor*, f32);
|
||||
void setMtsAnimFrameRate(LiveActor*, f32);
|
||||
void setMtsAnimFrameAndStop(LiveActor*, f32);
|
||||
void setMtsAnimFrameAndStopEnd(LiveActor*);
|
||||
void setMtsAnimFrame(LiveActor* actor, f32 frame);
|
||||
void setMtsAnimFrameRate(LiveActor* actor, f32 frameRate);
|
||||
void setMtsAnimFrameAndStop(LiveActor* actor, f32 frame);
|
||||
void setMtsAnimFrameAndStopEnd(LiveActor* actor);
|
||||
|
||||
const char* getPlayingMtsAnimName(const LiveActor*);
|
||||
f32 getMtsAnimFrame(const LiveActor*);
|
||||
f32 getMtsAnimFrameRate(const LiveActor*);
|
||||
f32 getMtsAnimFrameMax(const LiveActor*);
|
||||
f32 getMtsAnimFrameMax(const LiveActor*, const char*);
|
||||
const char* getPlayingMtsAnimName(const LiveActor* actor);
|
||||
f32 getMtsAnimFrame(const LiveActor* actor);
|
||||
f32 getMtsAnimFrameRate(const LiveActor* actor);
|
||||
f32 getMtsAnimFrameMax(const LiveActor* actor);
|
||||
f32 getMtsAnimFrameMax(const LiveActor* actor, const char* animName);
|
||||
|
||||
bool isMtsAnimExist(const LiveActor*, const char*);
|
||||
bool isMtsAnimPlaying(const LiveActor*, const char*);
|
||||
bool isMtsAnimExist(const LiveActor*);
|
||||
bool isMtsAnimEnd(const LiveActor*);
|
||||
bool isMtsAnimOneTime(const LiveActor*, const char*);
|
||||
bool isMtsAnimOneTime(const LiveActor*);
|
||||
bool isMtsAnimPlaying(const LiveActor*);
|
||||
bool isMtsAnimExist(const LiveActor* actor, const char* animName);
|
||||
bool isMtsAnimPlaying(const LiveActor* actor, const char* animName);
|
||||
bool isMtsAnimExist(const LiveActor* actor);
|
||||
bool isMtsAnimEnd(const LiveActor* actor);
|
||||
bool isMtsAnimOneTime(const LiveActor* actor, const char* animName);
|
||||
bool isMtsAnimOneTime(const LiveActor* actor);
|
||||
bool isMtsAnimPlaying(const LiveActor* actor);
|
||||
|
||||
// Mat
|
||||
|
||||
bool tryStartMatAnimIfExist(LiveActor*, const char*);
|
||||
bool tryStartMatAnimIfNotPlaying(LiveActor*, const char*);
|
||||
bool tryStartMatAnimIfExist(LiveActor* actor, const char* animName);
|
||||
bool tryStartMatAnimIfNotPlaying(LiveActor* actor, const char* animName);
|
||||
|
||||
void createMatAnimSlotForMcl(LiveActor*);
|
||||
void createMatAnimSlotForMtp(LiveActor*);
|
||||
void createMatAnimSlotForMts(LiveActor*);
|
||||
void createMatAnimSlotForMcl(LiveActor* actor);
|
||||
void createMatAnimSlotForMtp(LiveActor* actor);
|
||||
void createMatAnimSlotForMts(LiveActor* actor);
|
||||
|
||||
void startMatAnim(LiveActor, const char*);
|
||||
void startMatAnimAndSetFrameAndStop(LiveActor, const char*, f32);
|
||||
void clearMatAnim(LiveActor*);
|
||||
void clearMatAnim(LiveActor* actor);
|
||||
|
||||
void setMatAnimFrame(LiveActor*, f32);
|
||||
void setMatAnimFrameRate(LiveActor*, f32);
|
||||
void setMatAnimFrameAndStop(LiveActor*, f32);
|
||||
void setMatAnimFrameAndStopEnd(LiveActor*);
|
||||
void setMatAnimFrame(LiveActor* actor, f32 frame);
|
||||
void setMatAnimFrameRate(LiveActor* actor, f32 frameRate);
|
||||
void setMatAnimFrameAndStop(LiveActor* actor, f32 frame);
|
||||
void setMatAnimFrameAndStopEnd(LiveActor* actor);
|
||||
|
||||
const char* getPlayingMatAnimName(const LiveActor*);
|
||||
f32 getMatAnimFrame(const LiveActor*);
|
||||
f32 getMatAnimFrameRate(const LiveActor*);
|
||||
f32 getMatAnimFrameMax(const LiveActor*);
|
||||
f32 getMatAnimFrameMax(const LiveActor*, const char*);
|
||||
const char* getPlayingMatAnimName(const LiveActor* actor);
|
||||
f32 getMatAnimFrame(const LiveActor* actor);
|
||||
f32 getMatAnimFrameRate(const LiveActor* actor);
|
||||
f32 getMatAnimFrameMax(const LiveActor* actor);
|
||||
f32 getMatAnimFrameMax(const LiveActor* actor, const char* animName);
|
||||
|
||||
bool isMatAnimExist(const LiveActor*, const char*);
|
||||
bool isMatAnimPlaying(const LiveActor*, const char*);
|
||||
bool isMatAnimExist(const LiveActor*);
|
||||
bool isMatAnimEnd(const LiveActor*);
|
||||
bool isMatAnimOneTime(const LiveActor*, const char*);
|
||||
bool isMatAnimOneTime(const LiveActor*);
|
||||
bool isMatAnimPlaying(const LiveActor*);
|
||||
bool isMatAnimExist(const LiveActor* actor, const char* animName);
|
||||
bool isMatAnimPlaying(const LiveActor* actor, const char* animName);
|
||||
bool isMatAnimExist(const LiveActor* actor);
|
||||
bool isMatAnimEnd(const LiveActor* actor);
|
||||
bool isMatAnimOneTime(const LiveActor* actor, const char* animName);
|
||||
bool isMatAnimOneTime(const LiveActor* actor);
|
||||
bool isMatAnimPlaying(const LiveActor* actor);
|
||||
|
||||
// Vis
|
||||
|
||||
bool tryStartVisAnimIfExist(LiveActor*, const char*);
|
||||
bool tryStartVisAnimIfNotPlaying(LiveActor*, const char*);
|
||||
bool tryStartVisAnimIfExist(LiveActor* actor, const char* animName);
|
||||
bool tryStartVisAnimIfNotPlaying(LiveActor* actor, const char* animName);
|
||||
|
||||
void startVisAnim(LiveActor*, const char*);
|
||||
void startVisAnimAndSetFrameAndStop(LiveActor*, const char*, f32);
|
||||
void startVisAnim(LiveActor* actor, const char* animName);
|
||||
void startVisAnimAndSetFrameAndStop(LiveActor* actor, const char* animName, f32 frame);
|
||||
|
||||
void clearVisAnim(LiveActor*);
|
||||
void clearVisAnim(LiveActor* actor);
|
||||
|
||||
void setVisAnimFrame(LiveActor*, f32);
|
||||
void setVisAnimFrameRate(LiveActor*, f32);
|
||||
void setVisAnimFrameAndStop(LiveActor*, f32);
|
||||
void setVisAnimFrameAndStopEnd(LiveActor*);
|
||||
void setVisAnimFrame(LiveActor* actor, f32 frame);
|
||||
void setVisAnimFrameRate(LiveActor* actor, f32 frameRate);
|
||||
void setVisAnimFrameAndStop(LiveActor* actor, f32 frame);
|
||||
void setVisAnimFrameAndStopEnd(LiveActor* actor);
|
||||
|
||||
const char* getPlayingVisAnimName(const LiveActor*);
|
||||
f32 getVisAnimFrame(const LiveActor*);
|
||||
f32 getVisAnimFrameRate(const LiveActor*);
|
||||
f32 getVisAnimFrameMax(const LiveActor*);
|
||||
f32 getVisAnimFrameMax(const LiveActor*, const char*);
|
||||
const char* getPlayingVisAnimName(const LiveActor* actor);
|
||||
f32 getVisAnimFrame(const LiveActor* actor);
|
||||
f32 getVisAnimFrameRate(const LiveActor* actor);
|
||||
f32 getVisAnimFrameMax(const LiveActor* actor);
|
||||
f32 getVisAnimFrameMax(const LiveActor* actor, const char* animName);
|
||||
|
||||
bool isVisAnimExist(const LiveActor*, const char*);
|
||||
bool isVisAnimPlaying(const LiveActor*, const char*);
|
||||
bool isVisAnimExist(const LiveActor*);
|
||||
bool isVisAnimEnd(const LiveActor*);
|
||||
bool isVisAnimOneTime(const LiveActor*, const char*);
|
||||
bool isVisAnimOneTime(const LiveActor*);
|
||||
bool isVisAnimPlaying(const LiveActor*);
|
||||
bool isVisAnimExist(const LiveActor* actor, const char* animName);
|
||||
bool isVisAnimPlaying(const LiveActor* actor, const char* animName);
|
||||
bool isVisAnimExist(const LiveActor* actor);
|
||||
bool isVisAnimEnd(const LiveActor* actor);
|
||||
bool isVisAnimOneTime(const LiveActor* actor, const char* animName);
|
||||
bool isVisAnimOneTime(const LiveActor* actor);
|
||||
bool isVisAnimPlaying(const LiveActor* actor);
|
||||
|
||||
// Vis for Action
|
||||
|
||||
bool tryStartVisAnimIfExistForAction(LiveActor*, const char*);
|
||||
bool tryStartVisAnimIfNotPlayingForAction(LiveActor*, const char*);
|
||||
bool tryStartVisAnimIfExistForAction(LiveActor* actor, const char* animName);
|
||||
bool tryStartVisAnimIfNotPlayingForAction(LiveActor* actor, const char* animName);
|
||||
|
||||
void startVisAnimForAction(LiveActor*, const char*);
|
||||
void startVisAnimAndSetFrameAndStopForAction(LiveActor*, const char*, f32);
|
||||
void startVisAnimForAction(LiveActor* actor, const char* animName);
|
||||
void startVisAnimAndSetFrameAndStopForAction(LiveActor* actor, const char* animName, f32 frame);
|
||||
|
||||
void clearVisAnimForAction(LiveActor*);
|
||||
void clearVisAnimForAction(LiveActor* actor);
|
||||
|
||||
void setVisAnimFrameForAction(LiveActor*, f32);
|
||||
void setVisAnimFrameRateForAction(LiveActor*, f32);
|
||||
void setVisAnimFrameAndStopForAction(LiveActor*, f32);
|
||||
void setVisAnimFrameAndStopEndForAction(LiveActor*);
|
||||
void setVisAnimFrameForAction(LiveActor* actor, f32 frame);
|
||||
void setVisAnimFrameRateForAction(LiveActor* actor, f32 frameRate);
|
||||
void setVisAnimFrameAndStopForAction(LiveActor* actor, f32 frame);
|
||||
void setVisAnimFrameAndStopEndForAction(LiveActor* actor);
|
||||
|
||||
const char* getPlayingVisAnimNameForAction(const LiveActor*);
|
||||
f32 getVisAnimFrameForAction(const LiveActor*);
|
||||
f32 getVisAnimFrameRateForAction(const LiveActor*);
|
||||
f32 getVisAnimFrameMaxForAction(const LiveActor*);
|
||||
const char* getPlayingVisAnimNameForAction(const LiveActor* actor);
|
||||
f32 getVisAnimFrameForAction(const LiveActor* actor);
|
||||
f32 getVisAnimFrameRateForAction(const LiveActor* actor);
|
||||
f32 getVisAnimFrameMaxForAction(const LiveActor* actor);
|
||||
f32 getVisAnimFrameMaxForAction(const LiveActor*, const char*);
|
||||
|
||||
bool isVisAnimExistForAction(const LiveActor*, const char*);
|
||||
bool isVisAnimPlayingForAction(const LiveActor*, const char*);
|
||||
bool isVisAnimPlayingForAction(const LiveActor* actor, const char* animName);
|
||||
bool isVisAnimExistForAction(const LiveActor*);
|
||||
bool isVisAnimEndForAction(const LiveActor*);
|
||||
bool isVisAnimOneTimeForAction(const LiveActor*, const char*);
|
||||
bool isVisAnimOneTimeForAction(const LiveActor*);
|
||||
bool isVisAnimPlayingForAction(const LiveActor*);
|
||||
bool isVisAnimEndForAction(const LiveActor* actor);
|
||||
bool isVisAnimOneTimeForAction(const LiveActor* actor, const char* animName);
|
||||
bool isVisAnimOneTimeForAction(const LiveActor* actor);
|
||||
bool isVisAnimPlayingForAction(const LiveActor* actor);
|
||||
|
||||
// Skl Retargetting
|
||||
|
||||
|
|
@ -303,28 +307,31 @@ void unbindSklAnimRetargetting(const LiveActor*);
|
|||
|
||||
// Partial Skl
|
||||
|
||||
void startPartialSklAnim(LiveActor*, const char*, s32, s32, const SklAnimRetargettingInfo*);
|
||||
void startPartialSklAnimWithInterpolate(LiveActor*, const char*, s32, s32, s32,
|
||||
const SklAnimRetargettingInfo*);
|
||||
void startPartialSklAnim(LiveActor* actor, const char* animName, s32 partCount, s32 value,
|
||||
const SklAnimRetargettingInfo* info);
|
||||
void startPartialSklAnimWithInterpolate(LiveActor* actor, const char* animName, s32 partCount,
|
||||
s32 value, s32 interpol,
|
||||
const SklAnimRetargettingInfo* info);
|
||||
void initPartialSklAnim(LiveActor*, s32, s32, s32);
|
||||
void clearPartialSklAnim(LiveActor*, s32);
|
||||
void clearPartialSklAnimWithInterpolate(LiveActor*, s32, s32);
|
||||
void clearPartialSklAnim(LiveActor* actor, s32 index);
|
||||
void clearPartialSklAnimWithInterpolate(LiveActor* actor, s32 partIndex, s32 interpol);
|
||||
|
||||
void addPartialSklAnimPartsList(LiveActor*, const char*, const char*, s32);
|
||||
void addPartialSklAnimPartsListRecursive(LiveActor*, const char*, s32);
|
||||
void setPartialSklAnimFrame(LiveActor*, s32, f32);
|
||||
void setPartialSklAnimFrameRate(LiveActor*, s32, f32);
|
||||
void setBaseMtxAndCalcAnim(LiveActor*, const sead::Matrix34f&, const sead::Vector3f&);
|
||||
void setPartialSklAnimFrame(LiveActor* actor, s32 index, f32 frame);
|
||||
void setPartialSklAnimFrameRate(LiveActor* actor, s32 index, f32 frameRate);
|
||||
void setBaseMtxAndCalcAnim(LiveActor* actor, const sead::Matrix34f& matrix,
|
||||
const sead::Vector3f& vector);
|
||||
|
||||
const char* getPlayingPartialSklAnimName(const LiveActor*, s32);
|
||||
f32 getPartialSklAnimFrame(const LiveActor*, s32);
|
||||
f32 getPartialSklAnimFrameRate(const LiveActor*, s32);
|
||||
const char* getPlayingPartialSklAnimName(const LiveActor* actor, s32 index);
|
||||
f32 getPartialSklAnimFrame(const LiveActor* actor, s32 index);
|
||||
f32 getPartialSklAnimFrameRate(const LiveActor* actor, s32 index);
|
||||
s32 getPartialSklAnimSlotNum(LiveActor*);
|
||||
s32 calcJoitsAmountFromJoint(LiveActor*, const char*);
|
||||
|
||||
bool isPartialSklAnimEnd(const LiveActor*, s32);
|
||||
bool isPartialSklAnimOneTime(const LiveActor*, s32);
|
||||
bool isPartialSklAnimAttached(const LiveActor*, s32);
|
||||
bool isPartialSklAnimEnd(const LiveActor* actor, s32 index);
|
||||
bool isPartialSklAnimOneTime(const LiveActor* actor, s32 index);
|
||||
bool isPartialSklAnimAttached(const LiveActor* actor, s32 index);
|
||||
bool isPartialAnimPlaying(const LiveActor*, s32);
|
||||
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ bool isInAreaObjPlayerAll(const LiveActor* actor, const AreaObjGroup* areaGroup)
|
|||
bool isInAreaObjPlayerAnyOne(const LiveActor* actor, const AreaObj* areaObj);
|
||||
bool isInAreaObjPlayerAnyOne(const LiveActor* actor, const AreaObjGroup* areaGroup);
|
||||
AreaObj* createAreaObj(const ActorInitInfo& actorInitInfo, const char* name);
|
||||
void initAreaInitInfo(AreaInitInfo* areaInfo, const ActorInitInfo& actorInfo);
|
||||
void initAreaInitInfo(AreaInitInfo* areaInitInfo, const ActorInitInfo& actorInitInfo);
|
||||
AreaObj* createLinkArea(const ActorInitInfo& initInfo, const char* name, const char* areaName);
|
||||
void initAreaInitInfo(AreaInitInfo* areaInfo, const PlacementInfo& placementInfo,
|
||||
const ActorInitInfo& actorInfo);
|
||||
void initAreaInitInfo(AreaInitInfo* areaInitInfo, const PlacementInfo& placementInfo,
|
||||
const ActorInitInfo& actorInitInfo);
|
||||
AreaObj* tryCreateLinkArea(const ActorInitInfo& initInfo, const char* name, const char* areaName);
|
||||
AreaObjGroup* createLinkAreaGroup(const ActorInitInfo& initInfo, const char* name,
|
||||
const char* groupName, const char* areaName);
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ bool tryExpandClippingToGround(LiveActor* actor, sead::Vector3f*, f32);
|
|||
bool tryExpandClippingByShadowMaskLength(LiveActor* actor, sead::Vector3f*);
|
||||
bool tryExpandClippingByDepthShadowLength(LiveActor* actor, sead::Vector3f*);
|
||||
bool tryExpandClippingByExpandObject(LiveActor*, const ActorInitInfo& initInfo);
|
||||
bool isClipped(const LiveActor*);
|
||||
bool isInvalidClipping(const LiveActor*);
|
||||
bool isClipped(const LiveActor* actor);
|
||||
bool isInvalidClipping(const LiveActor* actor);
|
||||
void invalidateClipping(LiveActor* actor);
|
||||
void validateClipping(LiveActor* actor);
|
||||
void onDrawClipping(LiveActor* actor);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using ActorCreatorFunction = LiveActor* (*)(const char* actorName);
|
|||
|
||||
class ActorFactory : public Factory<ActorCreatorFunction> {
|
||||
public:
|
||||
ActorFactory(const char* factoryName);
|
||||
ActorFactory(const char* pName);
|
||||
};
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -40,19 +40,27 @@ class ViewIdHolder;
|
|||
struct ActorInitInfo {
|
||||
ActorInitInfo();
|
||||
|
||||
void initNew(const PlacementInfo*, const LayoutInitInfo*, LiveActorGroup*, const ActorFactory*,
|
||||
ActorResourceHolder*, AreaObjDirector*, AudioDirector*, CameraDirector*,
|
||||
ClippingDirector*, CollisionDirector*, DemoDirector*, EffectSystemInfo*,
|
||||
ExecuteDirector*, GameDataHolderBase*, GravityHolder*, HitSensorDirector*,
|
||||
ItemDirectorBase*, NatureDirector*, const GamePadSystem*, PadRumbleDirector*,
|
||||
PlayerHolder*, SceneObjHolder*, SceneMsgCtrl*, SceneStopCtrl*, ScreenCoverCtrl*,
|
||||
ScreenPointDirector*, ShadowDirector*, StageSwitchDirector*, ModelGroup*,
|
||||
GraphicsSystemInfo*, ModelDrawBufferCounter*, LiveActorGroup*);
|
||||
void initViewIdSelf(const PlacementInfo*, const ActorInitInfo&);
|
||||
void copyHostInfo(const ActorInitInfo&, const PlacementInfo*);
|
||||
void initViewIdHost(const PlacementInfo*, const ActorInitInfo&);
|
||||
void initViewIdHostActor(const ActorInitInfo&, const LiveActor*);
|
||||
void initNoViewId(const PlacementInfo*, const ActorInitInfo&);
|
||||
void initNew(const PlacementInfo* pPlacementInfo, const LayoutInitInfo* pLayoutInitInfo,
|
||||
LiveActorGroup* pAllActorsGroup, const ActorFactory* pActorFactory,
|
||||
ActorResourceHolder* pActorResourceHolder, AreaObjDirector* pAreaObjDirector,
|
||||
AudioDirector* pAudioDirector, CameraDirector* pCameraDirector,
|
||||
ClippingDirector* pClippingDirector, CollisionDirector* pCollisionDirector,
|
||||
DemoDirector* pDemoDirector, EffectSystemInfo* pEffectSystemInfo,
|
||||
ExecuteDirector* pExecuteDirector, GameDataHolderBase* pGameDataHolder,
|
||||
GravityHolder* pGravityHolder, HitSensorDirector* pHitSensorDirector,
|
||||
ItemDirectorBase* pItemDirector, NatureDirector* pNatureDirector,
|
||||
const GamePadSystem* pGamePadSystem, PadRumbleDirector* pPadRumbleDirector,
|
||||
PlayerHolder* pPlayerHolder, SceneObjHolder* pSceneObjHolder,
|
||||
SceneMsgCtrl* pSceneMsgCtrl, SceneStopCtrl* pSceneStopCtrl,
|
||||
ScreenCoverCtrl* pScreenCoverCtrl, ScreenPointDirector* pScreenPointDirector,
|
||||
ShadowDirector* pShadowDirector, StageSwitchDirector* pStageSwitchDirector,
|
||||
ModelGroup* pModelGroup, GraphicsSystemInfo* pGraphicsSystemInfo,
|
||||
ModelDrawBufferCounter* pModelDrawBufferCounter, LiveActorGroup* pKitDrawingGroup);
|
||||
void initViewIdSelf(const PlacementInfo* pInfo, const ActorInitInfo& actorInfo);
|
||||
void copyHostInfo(const ActorInitInfo& actorInfo, const PlacementInfo* pInfo);
|
||||
void initViewIdHost(const PlacementInfo* pInfo, const ActorInitInfo& actorInfo);
|
||||
void initViewIdHostActor(const ActorInitInfo& actorInfo, const LiveActor* actor);
|
||||
void initNoViewId(const PlacementInfo* pInfo, const ActorInitInfo& actorInfo);
|
||||
|
||||
LiveActorGroup* kitDrawingGroup = nullptr;
|
||||
const PlacementInfo* placementInfo = nullptr;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class Resource;
|
|||
|
||||
class ActorInitResourceData {
|
||||
public:
|
||||
ActorInitResourceData(Resource*);
|
||||
ActorInitResourceData(Resource* res);
|
||||
|
||||
InitResourceDataAction* getDataAction() const { return mResDataAction; }
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ void getActorRecourseDataString(const char** val, LiveActor* actor, const char*
|
|||
const char* entryName);
|
||||
void getActorRecourseDataV3f(sead::Vector3f* val, LiveActor* actor, const char* fileName,
|
||||
const char* entryName);
|
||||
void getActorRecourseDataBox3f(sead::BoundBox3f* val, LiveActor* actor, const char* fileName,
|
||||
void getActorRecourseDataBox3f(sead::BoundBox3f* box, LiveActor* actor, const char* fileName,
|
||||
const char* entryName);
|
||||
PartsEffectGroup* createPartsEffectGroup(LiveActor* actor, const ActorInitInfo& initInfo,
|
||||
s32 maxEffects);
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ bool turnDirectionToTargetDegree(const LiveActor* actor, sead::Vector3f* vec,
|
|||
const sead::Vector3f& target, f32 deg);
|
||||
bool turnDirectionFromTargetDegree(const LiveActor* actor, sead::Vector3f* vec,
|
||||
const sead::Vector3f& target, f32 deg);
|
||||
void turnDirectionAlongGround(const LiveActor* actor, sead::Vector3f* vec);
|
||||
void turnDirectionAlongGround(const LiveActor* actor, sead::Vector3f* dir);
|
||||
void turnDirectionAlongGround(LiveActor* actor);
|
||||
bool turnToDirectionAxis(LiveActor* actor, const sead::Vector3f& horizontal,
|
||||
const sead::Vector3f& vertical, f32 deg);
|
||||
|
|
@ -249,7 +249,7 @@ void calcDirClockwiseToDir(sead::Vector3f* out, const LiveActor* actor, const se
|
|||
void calcDirClockwiseToPos(sead::Vector3f* out, const LiveActor* actor,
|
||||
const sead::Vector3f& target);
|
||||
void calcDirToActorH(sead::Vector3f* out, const LiveActor* actor, const LiveActor* target);
|
||||
void calcDirToActorH(sead::Vector3f* out, const LiveActor* actor, const sead::Vector3f& dir);
|
||||
void calcDirToActorH(sead::Vector3f* out, const LiveActor* actor, const sead::Vector3f& target);
|
||||
f32 calcAngleToTargetH(const LiveActor* actor, const sead::Vector3f& target);
|
||||
f32 calcAngleToTargetV(const LiveActor* actor, const sead::Vector3f& target);
|
||||
bool isFaceToTargetDegree(const LiveActor* actor, const sead::Vector3f& target,
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ class LiveActor;
|
|||
|
||||
class LiveActorGroup : public HioNode {
|
||||
public:
|
||||
LiveActorGroup(const char*, s32);
|
||||
LiveActorGroup(const char* groupName, s32 maxActors);
|
||||
|
||||
virtual s32 registerActor(LiveActor*);
|
||||
virtual s32 registerActor(LiveActor* pActor);
|
||||
|
||||
void removeActor(const LiveActor*);
|
||||
void removeActor(const LiveActor* pActor);
|
||||
void removeActorAll();
|
||||
bool isExistActor(const LiveActor*) const;
|
||||
bool isExistActor(const LiveActor* pActor) const;
|
||||
bool isFull() const;
|
||||
s32 calcAliveActorNum() const;
|
||||
LiveActor* getDeadActor() const;
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ struct SubActorInfo;
|
|||
|
||||
class SubActorKeeper {
|
||||
public:
|
||||
SubActorKeeper(LiveActor*);
|
||||
void registerSubActor(LiveActor*, u32);
|
||||
void init(const ActorInitInfo&, const char*, s32);
|
||||
SubActorKeeper(LiveActor* rootActor);
|
||||
void registerSubActor(LiveActor* subActor, u32 syncType);
|
||||
void init(const ActorInitInfo& initInfo, const char* suffix, s32 maxSubActors);
|
||||
|
||||
static SubActorKeeper* create(LiveActor*);
|
||||
static SubActorKeeper* tryCreate(LiveActor*, const char*, s32);
|
||||
static SubActorKeeper* create(LiveActor* rootActor);
|
||||
static SubActorKeeper* tryCreate(LiveActor* rootActor, const char* suffix, s32 maxSubActors);
|
||||
|
||||
s32 getCurActorCount() const { return mCurActorCount; }
|
||||
|
||||
|
|
|
|||
|
|
@ -189,14 +189,14 @@ void LiveActorKit::endInit() {
|
|||
mExecuteDirector->createExecutorListTable();
|
||||
}
|
||||
|
||||
void LiveActorKit::update(const char* unk) {
|
||||
void LiveActorKit::update(const char* tableName) {
|
||||
clearGraphicsRequest();
|
||||
|
||||
if (mPadRumbleDirector)
|
||||
mPadRumbleDirector->update();
|
||||
|
||||
if (mExecuteDirector)
|
||||
mExecuteDirector->execute(unk);
|
||||
mExecuteDirector->execute(tableName);
|
||||
|
||||
updateGraphics();
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,11 @@ public:
|
|||
void initGravityHolder();
|
||||
void initShadowDirector();
|
||||
void initEffectSystem();
|
||||
void initSwitchAreaDirector(s32, s32);
|
||||
// TODO: rename parameters
|
||||
void initSwitchAreaDirector(s32 val1, s32 val2);
|
||||
void initNatureDirector();
|
||||
void endInit();
|
||||
void update(const char*);
|
||||
void update(const char* tableName);
|
||||
void clearGraphicsRequest();
|
||||
void updateGraphics();
|
||||
void preDrawGraphics();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ f32 calcAngleRadian(const sead::Vector3f& a, const sead::Vector3f& b);
|
|||
f32 calcAngleDegree(const sead::Vector3f& a, const sead::Vector3f& b);
|
||||
f32 calcAngleDegree(const sead::Vector2f& a, const sead::Vector2f& b);
|
||||
bool isNearZero(const sead::Vector2f& vec, f32 tolerance = 0.001f);
|
||||
bool tryCalcAngleDegree(f32* angle, const sead::Vector3f& a, const sead::Vector3f& b);
|
||||
bool tryCalcAngleDegree(f32* out, const sead::Vector3f& a, const sead::Vector3f& b);
|
||||
bool isNearZero(const sead::Vector3f& vec, f32 tolerance = 0.001f);
|
||||
f32 calcAngleOnPlaneRadian(const sead::Vector3f& a, const sead::Vector3f& b,
|
||||
const sead::Vector3f& vertical);
|
||||
|
|
@ -56,8 +56,9 @@ bool isNearAngleRadianHV(const sead::Vector3f&, const sead::Vector3f&, const sea
|
|||
f32);
|
||||
bool tryNormalizeOrZero(sead::Vector3f* out, const sead::Vector3f& vec);
|
||||
bool tryNormalizeOrZero(sead::Vector3f* out);
|
||||
// TODO: rename parameters
|
||||
bool isNearAngleDegreeHV(const sead::Vector3f& a, const sead::Vector3f& b, const sead::Vector3f& c,
|
||||
f32 toleranceH, f32 toleranceV);
|
||||
f32 d, f32 e);
|
||||
bool isInAngleOnPlaneDegreeHV(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&,
|
||||
f32, f32, f32, f32);
|
||||
bool isNear(f32 value, f32 target, f32 tolerance = 0.001f);
|
||||
|
|
@ -65,7 +66,7 @@ bool isNear(const sead::Vector2f& value, const sead::Vector2f& target, f32 toler
|
|||
bool isNear(const sead::Vector3f& value, const sead::Vector3f& target, f32 tolerance = 0.001f);
|
||||
bool isNear(const sead::Color4f& value, const sead::Color4f& target, f32 tolerance = 0.001f);
|
||||
bool isNearZero(f32 value, f32 tolerance = 0.001f);
|
||||
bool isNearZero(const sead::Matrix34f& mtx, f32 tolerance = 0.001f);
|
||||
bool isNearZero(const sead::Matrix34f& value, f32 tolerance = 0.001f);
|
||||
bool isNearZeroOrGreater(f32 value, f32 tolerance = 0.001f);
|
||||
bool isNearZeroOrLess(f32 value, f32 tolerance = 0.001f);
|
||||
bool isExistNearZeroVal(const sead::Vector3f& vec, f32 tolerance);
|
||||
|
|
@ -112,10 +113,10 @@ f32 exponentIn(f32 t, f32 exp);
|
|||
f32 exponentOut(f32 t, f32 exp);
|
||||
f32 hermiteRate(f32 t, f32 m0, f32 m1);
|
||||
f32 calcFourthOrderRate(f32 t, f32 scale);
|
||||
f32 calcTriangleWave01(f32, f32);
|
||||
f32 calcTriangleWave(f32, f32, f32, f32);
|
||||
f32 calcTriangleWave01(f32 t, f32 period);
|
||||
f32 calcTriangleWave(f32 t, f32 min, f32 max, f32 period);
|
||||
f32 lerpValue(f32 a, f32 b, f32 t);
|
||||
f32 calcRate01(f32, f32, f32);
|
||||
f32 calcRate01(f32 t, f32 min, f32 max);
|
||||
f32 easeByType(f32 t, s32 easeType);
|
||||
f32 lerpValue(f32, f32, f32, f32, f32);
|
||||
f32 lerpDegree(f32, f32, f32);
|
||||
|
|
@ -163,11 +164,11 @@ s32 findMinFromArray(const s32*, s32);
|
|||
f32 getRandom();
|
||||
f32 getRandom(f32 max);
|
||||
f32 getRandom(f32 min, f32 max);
|
||||
s32 getRandom(s32 max);
|
||||
s32 getRandom(s32 factor);
|
||||
s32 getRandom(s32 min, s32 max);
|
||||
f32 getRandomDegree();
|
||||
f32 getRandomRadian();
|
||||
void getRandomVector(sead::Vector3f* vec, f32 maxComponent);
|
||||
void getRandomVector(sead::Vector3f* vec, f32 factor);
|
||||
void getRandomDir(sead::Vector3f* vec);
|
||||
void getRandomDirH(sead::Vector3f*, const sead::Vector3f&);
|
||||
void rotateVectorDegree(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32);
|
||||
|
|
@ -297,19 +298,22 @@ void calcQuatRotateDegree(sead::Vector3f*, const sead::Quatf&);
|
|||
void calcQuatRotateRadian(sead::Vector3f*, const sead::Quatf&);
|
||||
void calcQuatRotateAxisAndDegree(sead::Vector3f*, f32*, const sead::Quatf&);
|
||||
void calcQuatRotateAxisAndDegree(sead::Vector3f*, f32*, const sead::Quatf&, const sead::Quatf&);
|
||||
void rotateQuatRadian(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32);
|
||||
void rotateQuatRadian(sead::Quatf* outQuat, const sead::Quatf& quat, const sead::Vector3f& vec,
|
||||
f32 angle);
|
||||
void makeQuatXDegree(sead::Quatf* outQuat, f32 angle);
|
||||
void makeQuatYDegree(sead::Quatf* outQuat, f32 angle);
|
||||
void makeQuatZDegree(sead::Quatf* outQuat, f32 angle);
|
||||
void rotateQuatXDirDegree(sead::Quatf*, const sead::Quatf&, f32);
|
||||
void rotateQuatYDirDegree(sead::Quatf*, const sead::Quatf&, f32);
|
||||
void rotateQuatZDirDegree(sead::Quatf*, const sead::Quatf&, f32);
|
||||
void rotateQuatLocalDirDegree(sead::Quatf*, const sead::Quatf&, s32, f32);
|
||||
void rotateQuatMoment(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&);
|
||||
void rotateQuatMomentDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&);
|
||||
void rotateQuatRollBall(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&,
|
||||
const sead::Vector3f&, f32);
|
||||
void calcMomentRollBall(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32);
|
||||
void rotateQuatXDirDegree(sead::Quatf* outQuat, const sead::Quatf& quat, f32 angle);
|
||||
void rotateQuatYDirDegree(sead::Quatf* outQuat, const sead::Quatf& quat, f32 angle);
|
||||
void rotateQuatZDirDegree(sead::Quatf* outQuat, const sead::Quatf& quat, f32 angle);
|
||||
void rotateQuatLocalDirDegree(sead::Quatf* outQuat, const sead::Quatf& quat, s32 axis, f32 angle);
|
||||
void rotateQuatMoment(sead::Quatf* outQuat, const sead::Quatf& quat, const sead::Vector3f& vec);
|
||||
void rotateQuatMomentDegree(sead::Quatf* outQuat, const sead::Quatf& quat,
|
||||
const sead::Vector3f& vec);
|
||||
void rotateQuatRollBall(sead::Quatf* outQuat, const sead::Quatf& quat, const sead::Vector3f& vecA,
|
||||
const sead::Vector3f& vecB, f32 scale);
|
||||
void calcMomentRollBall(sead::Vector3f* outVec, const sead::Vector3f& vecA,
|
||||
const sead::Vector3f& vecB, f32 scale);
|
||||
bool turnQuat(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, const sead::Vector3f&, f32);
|
||||
bool turnQuatXDirRadian(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32);
|
||||
bool turnQuatYDirRadian(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32);
|
||||
|
|
@ -438,7 +442,8 @@ bool calcBetweenTwoLinkPos(sead::Vector3f*, const sead::Vector3f&, const sead::V
|
|||
const sead::Vector3f&);
|
||||
bool calcReflectionVector(sead::Vector3f*, const sead::Vector3f&, f32, f32);
|
||||
void calcReverseVector(sead::Vector3f*, const sead::Vector3f&, f32);
|
||||
void calcParabolicFunctionParam(f32*, f32*, f32, f32 verticalDistance);
|
||||
void calcParabolicFunctionParam(f32* gravity, f32* initialVelY, f32 maxHeight,
|
||||
f32 verticalDistance);
|
||||
f32 calcConvergeVibrationValue(f32, f32, f32, f32, f32);
|
||||
bool calcSphericalPolarCoordPY(sead::Vector2f*, const sead::Vector3f&, const sead::Vector3f&,
|
||||
const sead::Vector3f&);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ void ParabolicPath::calcPositionEaseOutH(sead::Vector3f* pos, f32 prog) const {
|
|||
calcPositionHV(pos, easeOut(prog), prog);
|
||||
}
|
||||
|
||||
void ParabolicPath::calcDirection(sead::Vector3f* pos, f32 prog, f32 stepSize) const {
|
||||
void ParabolicPath::calcDirection(sead::Vector3f* dir, f32 prog, f32 stepSize) const {
|
||||
f32 prog1, prog2;
|
||||
if (prog < stepSize) {
|
||||
prog1 = 0.0f;
|
||||
|
|
@ -92,8 +92,8 @@ void ParabolicPath::calcDirection(sead::Vector3f* pos, f32 prog, f32 stepSize) c
|
|||
sead::Vector3f pos1, pos2;
|
||||
calcPosition(&pos1, prog1);
|
||||
calcPosition(&pos2, prog2);
|
||||
*pos = pos2 - pos1;
|
||||
tryNormalizeOrZero(pos);
|
||||
*dir = pos2 - pos1;
|
||||
tryNormalizeOrZero(dir);
|
||||
}
|
||||
|
||||
f32 ParabolicPath::calcPathSpeedFromGravityAccel(f32 frames) const {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ EnemyStateBlowDown::EnemyStateBlowDown(LiveActor* actor, const EnemyStateBlowDow
|
|||
mParam = &sEnemyStateBlowDownParam;
|
||||
}
|
||||
|
||||
void EnemyStateBlowDown::start(const HitSensor* sensor) {
|
||||
sead::Vector3f dir = getSensorPos(sensor) - getTrans(mActor);
|
||||
void EnemyStateBlowDown::start(const HitSensor* other) {
|
||||
sead::Vector3f dir = getSensorPos(other) - getTrans(mActor);
|
||||
|
||||
verticalizeVec(&dir, getGravity(mActor), dir);
|
||||
|
||||
|
|
@ -41,8 +41,8 @@ void EnemyStateBlowDown::start(const sead::Vector3f& dir) {
|
|||
setVelocity(actor, direction - velocity);
|
||||
}
|
||||
|
||||
void EnemyStateBlowDown::start(const HitSensor* sensor1, const HitSensor* sensor2) {
|
||||
sead::Vector3f dir = getSensorPos(sensor1) - getSensorPos(sensor2);
|
||||
void EnemyStateBlowDown::start(const HitSensor* other, const HitSensor* self) {
|
||||
sead::Vector3f dir = getSensorPos(other) - getSensorPos(self);
|
||||
|
||||
verticalizeVec(&dir, getGravity(mActor), dir);
|
||||
|
||||
|
|
@ -52,9 +52,9 @@ void EnemyStateBlowDown::start(const HitSensor* sensor1, const HitSensor* sensor
|
|||
start(-dir);
|
||||
}
|
||||
|
||||
void EnemyStateBlowDown::start(const LiveActor* actor) {
|
||||
void EnemyStateBlowDown::start(const LiveActor* attacker) {
|
||||
sead::Vector3f dir;
|
||||
calcFrontDir(&dir, actor);
|
||||
calcFrontDir(&dir, attacker);
|
||||
|
||||
start(-dir);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ public:
|
|||
|
||||
class EnemyStateBlowDown : public ActorStateBase {
|
||||
public:
|
||||
EnemyStateBlowDown(LiveActor*, const EnemyStateBlowDownParam*, const char*);
|
||||
void start(const HitSensor*);
|
||||
void start(const sead::Vector3f&);
|
||||
void start(const HitSensor*, const HitSensor*);
|
||||
void start(const LiveActor*);
|
||||
EnemyStateBlowDown(LiveActor* actor, const EnemyStateBlowDownParam* param, const char* name);
|
||||
void start(const HitSensor* other);
|
||||
void start(const sead::Vector3f& dir);
|
||||
void start(const HitSensor* other, const HitSensor* self);
|
||||
void start(const LiveActor* attacker);
|
||||
|
||||
void appear() override;
|
||||
void kill() override;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ struct FireSurfaceProperties {
|
|||
|
||||
class FireSurfaceFinder {
|
||||
public:
|
||||
FireSurfaceFinder(const LiveActor* player);
|
||||
FireSurfaceFinder(const LiveActor* actor);
|
||||
|
||||
void update(const sead::Vector3f& position, const sead::Vector3f& gravity, f32 distance);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ struct WaterSurfaceProperties {
|
|||
|
||||
class WaterSurfaceFinder {
|
||||
public:
|
||||
WaterSurfaceFinder(const LiveActor* player);
|
||||
WaterSurfaceFinder(const LiveActor* actor);
|
||||
|
||||
void update(const sead::Vector3f& position, const sead::Vector3f& gravity, f32 distance);
|
||||
void updateLocal(const sead::Vector3f& position, const sead::Vector3f& gravity, f32 maxDistance,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class LiveActor;
|
|||
|
||||
class ActorStateBase : public NerveStateBase {
|
||||
public:
|
||||
ActorStateBase(const char* stateName, LiveActor* actor);
|
||||
ActorStateBase(const char* name, LiveActor* actor);
|
||||
|
||||
protected:
|
||||
LiveActor* mActor;
|
||||
|
|
|
|||
|
|
@ -72,10 +72,8 @@ f32 calcNerveJumpValue(const IUseNerve* user, s32 inMax, s32 upDuration, s32 rel
|
|||
f32 calcNerveStartEndValue(const IUseNerve* user, s32 inMax, s32 upDuration, s32 release, f32 start,
|
||||
f32 end);
|
||||
|
||||
void initNerveState(IUseNerve* user, NerveStateBase* state, const Nerve* nerve,
|
||||
const char* hostName);
|
||||
void addNerveState(IUseNerve* user, NerveStateBase* state, const Nerve* nerve,
|
||||
const char* hostName);
|
||||
void initNerveState(IUseNerve* user, NerveStateBase* state, const Nerve* nerve, const char* name);
|
||||
void addNerveState(IUseNerve* user, NerveStateBase* state, const Nerve* nerve, const char* name);
|
||||
bool updateNerveState(IUseNerve* user);
|
||||
bool updateNerveStateAndNextNerve(IUseNerve* user, const Nerve* nerve);
|
||||
bool isStateEnd(const IUseNerve* user);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ bool isEqualCharacterIdBase(const NfpInfo& nfpInfo, NfpCharacterId characterId);
|
|||
bool isEqualNumberingId(const NfpInfo& nfpInfo, s32 numberingId);
|
||||
bool isEqualNumberingId(const nn::nfp::ModelInfo& modelInfo, s32 numberingId);
|
||||
bool tryGetCharacterId(NfpCharacterId* characterId, const NfpInfo& nfpInfo);
|
||||
bool tryGetNumberingId(s32*, const NfpInfo& nfpInfo);
|
||||
bool tryGetNumberingId(s32* numberingId, const NfpInfo& nfpInfo);
|
||||
bool isCharacterIdBaseMario(const NfpInfo& nfpInfo);
|
||||
bool isCharacterIdBaseDrMario(const NfpInfo& nfpInfo);
|
||||
bool isCharacterIdBasePeach(const NfpInfo& nfpInfo);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public:
|
|||
BreakModel(const LiveActor* rootActor, const char* objName, const char* modelName,
|
||||
const char* fileSuffixName, const sead::Matrix34f* rootMtx,
|
||||
const char* breakActionName);
|
||||
void init(const ActorInitInfo&);
|
||||
void init(const ActorInitInfo& initInfo);
|
||||
void appear();
|
||||
void exeWait();
|
||||
void exeBreak();
|
||||
|
|
|
|||
|
|
@ -9,20 +9,25 @@ namespace al {
|
|||
|
||||
class PartsModel : public LiveActor {
|
||||
public:
|
||||
PartsModel(const char*);
|
||||
PartsModel(const char* name);
|
||||
void endClipped() override;
|
||||
void calcAnim() override;
|
||||
void attackSensor(HitSensor* self, HitSensor* other) override;
|
||||
bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override;
|
||||
|
||||
void initPartsDirect(LiveActor*, const ActorInitInfo&, const char*, const sead::Matrix34f*,
|
||||
const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, bool);
|
||||
void initPartsSuffix(LiveActor*, const ActorInitInfo&, const char*, const char*,
|
||||
const sead::Matrix34f*, bool);
|
||||
void initPartsMtx(LiveActor*, const ActorInitInfo&, const char*, const sead::Matrix34f*, bool);
|
||||
void initPartsFixFile(LiveActor*, const ActorInitInfo&, const char*, const char*, const char*);
|
||||
void initPartsFixFileNoRegister(LiveActor*, const ActorInitInfo&, const char*, const char*,
|
||||
const char*);
|
||||
void initPartsDirect(LiveActor* parent, const ActorInitInfo& initInfo, const char* arcName,
|
||||
const sead::Matrix34f* jointMtx, const sead::Vector3f& localTrans,
|
||||
const sead::Vector3f& localRotate, const sead::Vector3f& localScale,
|
||||
bool useFollowMtxScale);
|
||||
void initPartsSuffix(LiveActor* parent, const ActorInitInfo& initInfo, const char* arcName,
|
||||
const char* suffix, const sead::Matrix34f* jointMtx,
|
||||
bool useFollowMtxScale);
|
||||
void initPartsMtx(LiveActor* parent, const ActorInitInfo& initInfo, const char* arcName,
|
||||
const sead::Matrix34f* jointMtx, bool useFollowMtxScale);
|
||||
void initPartsFixFile(LiveActor* parent, const ActorInitInfo& initInfo, const char* arcName,
|
||||
const char* arcSuffix, const char* suffix);
|
||||
void initPartsFixFileNoRegister(LiveActor* parent, const ActorInitInfo& initInfo,
|
||||
const char* arcName, const char* arcSuffix, const char* suffix);
|
||||
|
||||
void updatePose();
|
||||
void offSyncAppearAndHide();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace al {
|
|||
|
||||
class SilhouetteModel : public LiveActor {
|
||||
public:
|
||||
SilhouetteModel(LiveActor*, const ActorInitInfo&, const char*);
|
||||
SilhouetteModel(LiveActor* parent, const ActorInitInfo& initInfo, const char* category);
|
||||
void movement() override;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -992,7 +992,7 @@ void getChildLinkTR(sead::Vector3f* trans, sead::Vector3f* rotate, const ActorIn
|
|||
getRotate(rotate, info);
|
||||
}
|
||||
|
||||
s32 calcMatchNameLinkCount(const PlacementInfo& placementInfo, const char* linkName) {
|
||||
s32 calcMatchNameLinkCount(const PlacementInfo& placementInfo, const char* match) {
|
||||
PlacementInfo links;
|
||||
if (!tryGetPlacementInfoByKey(&links, placementInfo, "Links"))
|
||||
return 0;
|
||||
|
|
@ -1002,13 +1002,13 @@ s32 calcMatchNameLinkCount(const PlacementInfo& placementInfo, const char* linkN
|
|||
PlacementInfo item;
|
||||
const char* key = nullptr;
|
||||
getPlacementInfoAndKeyNameByIndex(&item, &key, links, i);
|
||||
if (isMatchString(key, {linkName}))
|
||||
if (isMatchString(key, {match}))
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
s32 calcLinkCountClassName(const PlacementInfo& placementInfo, const char* linkName) {
|
||||
s32 calcLinkCountClassName(const PlacementInfo& placementInfo, const char* className) {
|
||||
PlacementInfo links;
|
||||
if (!tryGetPlacementInfoByKey(&links, placementInfo, "Links"))
|
||||
return false;
|
||||
|
|
@ -1020,8 +1020,8 @@ s32 calcLinkCountClassName(const PlacementInfo& placementInfo, const char* linkN
|
|||
PlacementInfo first;
|
||||
getPlacementInfoByIndex(&first, item, 0);
|
||||
|
||||
const char* className = nullptr;
|
||||
if (tryGetClassName(&className, first) && isEqualString(className, linkName))
|
||||
const char* classNameFirst = nullptr;
|
||||
if (tryGetClassName(&classNameFirst, first) && isEqualString(classNameFirst, className))
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
|
|
|
|||
|
|
@ -144,9 +144,9 @@ void getPlacementInfoByIndex(PlacementInfo* outPlacementInfo, const PlacementInf
|
|||
bool tryGetPlacementInfoByIndex(PlacementInfo* outPlacementInfo, const PlacementInfo& placementInfo,
|
||||
s32 index);
|
||||
void getPlacementInfoAndKeyNameByIndex(PlacementInfo* outPlacementInfo, const char** outKey,
|
||||
const PlacementInfo&, s32 index);
|
||||
const PlacementInfo& placementInfo, s32 index);
|
||||
bool tryGetPlacementInfoAndKeyNameByIndex(PlacementInfo* outPlacementInfo, const char** outKey,
|
||||
const PlacementInfo&, s32 index);
|
||||
const PlacementInfo& placementInfo, s32 index);
|
||||
|
||||
PlacementId* createPlacementId(const ActorInitInfo& initInfo);
|
||||
PlacementId* createPlacementId(const PlacementInfo& placementInfo);
|
||||
|
|
@ -208,10 +208,10 @@ void getLinksQT(sead::Quatf* quat, sead::Vector3f* trans, const ActorInitInfo& i
|
|||
void getLinksQT(sead::Quatf* quat, sead::Vector3f* trans, const PlacementInfo& placementInfo,
|
||||
const char* linkName);
|
||||
|
||||
bool tryGetLinksQT(sead::Quatf*, sead::Vector3f*, const ActorInitInfo& initInfo,
|
||||
bool tryGetLinksQT(sead::Quatf* quat, sead::Vector3f* trans, const ActorInitInfo& initInfo,
|
||||
const char* linkName);
|
||||
bool tryGetLinksQTS(sead::Quatf*, sead::Vector3f*, sead::Vector3f*, const ActorInitInfo& initInfo,
|
||||
const char* linkName);
|
||||
bool tryGetLinksQTS(sead::Quatf* quat, sead::Vector3f* trans, sead::Vector3f* scale,
|
||||
const ActorInitInfo& initInfo, const char* linkName);
|
||||
bool tryGetLinksMatrixTR(sead::Matrix34f* matrix, const ActorInitInfo& initInfo,
|
||||
const char* linkName);
|
||||
bool tryGetLinksMatrixTR(sead::Matrix34f* matrix, const AreaInitInfo& initInfo,
|
||||
|
|
@ -233,7 +233,7 @@ void getChildLinkT(sead::Vector3f* trans, const ActorInitInfo& initInfo, const c
|
|||
void getChildLinkTR(sead::Vector3f* trans, sead::Vector3f* rotate, const ActorInitInfo& initInfo,
|
||||
const char* linkName, s32 index);
|
||||
|
||||
s32 calcMatchNameLinkCount(const PlacementInfo& placementInfo, const char* matchName);
|
||||
s32 calcMatchNameLinkCount(const PlacementInfo& placementInfo, const char* match);
|
||||
s32 calcLinkCountClassName(const PlacementInfo& placementInfo, const char* className);
|
||||
|
||||
bool tryGetZoneMatrixTR(sead::Matrix34f* matrix, const ActorInitInfo& initInfo);
|
||||
|
|
|
|||
|
|
@ -63,9 +63,9 @@ void CameraVerticalAbsorber::start(const sead::Vector3f& pos, const CameraStartI
|
|||
setNerve(this, &NrvCameraVerticalAbsorber.Absorb);
|
||||
}
|
||||
|
||||
void CameraVerticalAbsorber::load(const ByamlIter& data) {
|
||||
void CameraVerticalAbsorber::load(const ByamlIter& iter) {
|
||||
ByamlIter it;
|
||||
if (!data.tryGetIterByKey(&it, "VerticalAbsorb"))
|
||||
if (!iter.tryGetIterByKey(&it, "VerticalAbsorb"))
|
||||
return;
|
||||
|
||||
tryGetByamlF32(&mAbsorbScreenPosUp, it, "AbsorbScreenPosUp");
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ public:
|
|||
bool isAbsorbing() const;
|
||||
bool isValid() const;
|
||||
void liberateAbsorb();
|
||||
void load(const ByamlIter&);
|
||||
void load(const ByamlIter& iter);
|
||||
void makeLookAtCamera(sead::LookAtCamera*) const;
|
||||
void start(const sead::Vector3f&, const CameraStartInfo&);
|
||||
void start(const sead::Vector3f& pos, const CameraStartInfo& info);
|
||||
void tryResetAbsorbVecIfInCollision(const sead::Vector3f&);
|
||||
void update();
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace al {
|
||||
|
||||
PlayerHolder::PlayerHolder(s32 count) {
|
||||
mBufferSize = count;
|
||||
mPlayers = new Player[count];
|
||||
PlayerHolder::PlayerHolder(s32 maxPlayers) {
|
||||
mBufferSize = maxPlayers;
|
||||
mPlayers = new Player[maxPlayers];
|
||||
clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,23 +9,23 @@ class PadRumbleKeeper;
|
|||
class PlayerHolder;
|
||||
|
||||
s32 getPlayerNumMax(const LiveActor*);
|
||||
s32 getPlayerNumMax(const PlayerHolder*);
|
||||
s32 getPlayerNumMax(const PlayerHolder* holder);
|
||||
s32 getAlivePlayerNum(const LiveActor*);
|
||||
s32 getAlivePlayerNum(const PlayerHolder*);
|
||||
s32 getAlivePlayerNum(const PlayerHolder* holder);
|
||||
LiveActor* getPlayerActor(const LiveActor*, s32);
|
||||
LiveActor* getPlayerActor(const PlayerHolder*, s32);
|
||||
LiveActor* getPlayerActor(const PlayerHolder* holder, s32 index);
|
||||
const sead::Vector3f& getPlayerPos(const LiveActor*, s32);
|
||||
const sead::Vector3f& getPlayerPos(const PlayerHolder*, s32);
|
||||
const sead::Vector3f& getPlayerPos(const PlayerHolder* holder, s32 index);
|
||||
LiveActor* tryGetPlayerActor(const LiveActor*, s32);
|
||||
LiveActor* tryGetPlayerActor(const PlayerHolder*, s32);
|
||||
LiveActor* tryGetPlayerActor(const PlayerHolder* holder, s32 index);
|
||||
bool isPlayerDead(const LiveActor*, s32);
|
||||
bool isPlayerDead(const PlayerHolder*, s32);
|
||||
bool isPlayerDead(const PlayerHolder* holder, s32 index);
|
||||
bool isPlayerAreaTarget(const LiveActor*, s32);
|
||||
bool isPlayerAreaTarget(const PlayerHolder*, s32);
|
||||
bool isPlayerAreaTarget(const PlayerHolder* holder, s32 index);
|
||||
LiveActor* tryFindAlivePlayerActorFirst(const LiveActor*);
|
||||
LiveActor* tryFindAlivePlayerActorFirst(const PlayerHolder*);
|
||||
LiveActor* tryFindAlivePlayerActorFirst(const PlayerHolder* holder);
|
||||
LiveActor* findAlivePlayerActorFirst(const LiveActor*);
|
||||
LiveActor* findAlivePlayerActorFirst(const PlayerHolder*);
|
||||
LiveActor* findAlivePlayerActorFirst(const PlayerHolder* holder);
|
||||
PadRumbleKeeper* getPlayerPadRumbleKeeper(const LiveActor*, s32);
|
||||
s32 getPlayerPort(const PlayerHolder*, s32);
|
||||
s32 getPlayerPort(const LiveActor*, s32);
|
||||
|
|
|
|||
|
|
@ -51,16 +51,16 @@ public:
|
|||
|
||||
static_assert(sizeof(Edge) == 0x20);
|
||||
|
||||
Graph(s32 verticesSize, s32 edgesSize);
|
||||
Graph(s32 vertices_size, s32 edges_size);
|
||||
void appendVertex(s32 size);
|
||||
void appendVertex(Vertex* vertex);
|
||||
void removeVertex(const Vertex* vertex);
|
||||
void removeEdge(const Edge* edge);
|
||||
Edge* tryFindEdge(s32 indexVertex1, s32 indexVertex2) const;
|
||||
Edge* tryFindEdge(s32 index_vertex1, s32 index_vertex2) const;
|
||||
void appendEdge(Edge* edge);
|
||||
bool tryAppendEdge(Edge* edge);
|
||||
void appendEdge(s32 indexVertex1, s32 indexVertex2, f32 weight);
|
||||
bool tryAppendEdge(s32 indexVertex1, s32 indexVertex2, f32 weight);
|
||||
void appendEdge(s32 index_vertex1, s32 index_vertex2, f32 weight);
|
||||
bool tryAppendEdge(s32 index_vertex1, s32 index_vertex2, f32 weight);
|
||||
|
||||
private:
|
||||
sead::PtrArray<Vertex> mVertices;
|
||||
|
|
|
|||
|
|
@ -11,28 +11,29 @@ class RailPart;
|
|||
class Rail {
|
||||
public:
|
||||
Rail();
|
||||
void init(const PlacementInfo&);
|
||||
void calcPos(sead::Vector3f*, f32) const;
|
||||
s32 getIncludedSection(const RailPart**, f32*, f32) const;
|
||||
void calcDirection(sead::Vector3f*, f32) const;
|
||||
void calcPosDir(sead::Vector3f*, sead::Vector3f*, f32) const;
|
||||
void init(const PlacementInfo& info);
|
||||
void calcPos(sead::Vector3f* pos, f32 distance) const;
|
||||
s32 getIncludedSection(const RailPart** part, f32* partDistance, f32 distance) const;
|
||||
void calcDirection(sead::Vector3f* direction, f32 distance) const;
|
||||
void calcPosDir(sead::Vector3f* position, sead::Vector3f* direction, f32 distance) const;
|
||||
f32 getTotalLength() const;
|
||||
f32 getPartLength(s32) const;
|
||||
f32 getLengthToPoint(s32) const;
|
||||
void calcRailPointPos(sead::Vector3f*, s32) const;
|
||||
void calcNearestRailPointPosFast(sead::Vector3f*, u32*, const sead::Vector3f&) const;
|
||||
void calcNearestRailPointNo(s32*, const sead::Vector3f&) const;
|
||||
void calcNearestRailPointPos(sead::Vector3f*, const sead::Vector3f&) const;
|
||||
f32 normalizeLength(f32) const;
|
||||
f32 calcNearestRailPosCoord(const sead::Vector3f&, f32) const;
|
||||
f32 calcNearestRailPosCoord(const sead::Vector3f&, f32, f32*) const;
|
||||
f32 calcNearestRailPos(sead::Vector3f*, const sead::Vector3f&, f32) const;
|
||||
bool isNearRailPoint(f32, f32) const;
|
||||
s32 calcRailPointNum(f32, f32) const;
|
||||
f32 getIncludedSectionLength(f32*, f32*, f32) const;
|
||||
s32 getIncludedSectionIndex(f32) const;
|
||||
f32 getPartLength(s32 index) const;
|
||||
f32 getLengthToPoint(s32 index) const;
|
||||
void calcRailPointPos(sead::Vector3f* pos, s32 index) const;
|
||||
void calcNearestRailPointPosFast(sead::Vector3f* rail_pos, u32* index,
|
||||
const sead::Vector3f& pos) const;
|
||||
void calcNearestRailPointNo(s32* index, const sead::Vector3f& pos) const;
|
||||
void calcNearestRailPointPos(sead::Vector3f* rail_pos, const sead::Vector3f& pos) const;
|
||||
f32 normalizeLength(f32 distance) const;
|
||||
f32 calcNearestRailPosCoord(const sead::Vector3f& pos, f32 interval) const;
|
||||
f32 calcNearestRailPosCoord(const sead::Vector3f& pos, f32 interval, f32* distance) const;
|
||||
f32 calcNearestRailPos(sead::Vector3f* rail_pos, const sead::Vector3f& pos, f32 interval) const;
|
||||
bool isNearRailPoint(f32 distance, f32 epsilon) const;
|
||||
s32 calcRailPointNum(f32 distance1, f32 distance2) const;
|
||||
f32 getIncludedSectionLength(f32* partDistance, f32* length, f32 distance) const;
|
||||
s32 getIncludedSectionIndex(f32 distance) const;
|
||||
bool isIncludeBezierRailPart() const;
|
||||
bool isBezierRailPart(s32) const;
|
||||
bool isBezierRailPart(s32 index) const;
|
||||
|
||||
private:
|
||||
PlacementInfo** mRailPoints = nullptr;
|
||||
|
|
|
|||
|
|
@ -9,18 +9,18 @@ class LinearCurve;
|
|||
class RailPart {
|
||||
public:
|
||||
RailPart();
|
||||
void init(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&,
|
||||
const sead::Vector3f&);
|
||||
void calcPos(sead::Vector3f*, f32) const;
|
||||
void calcVelocity(sead::Vector3f*, f32) const;
|
||||
void calcDir(sead::Vector3f*, f32) const;
|
||||
void calcStartPos(sead::Vector3f*) const;
|
||||
void calcEndPos(sead::Vector3f*) const;
|
||||
f32 calcLength(f32, f32, s32) const;
|
||||
f32 calcCurveParam(f32) const;
|
||||
f32 calcNearestParam(const sead::Vector3f&, f32) const;
|
||||
void calcNearestPos(sead::Vector3f*, const sead::Vector3f&, f32) const;
|
||||
f32 calcNearestLength(f32*, const sead::Vector3f&, f32, f32) const;
|
||||
void init(const sead::Vector3f& start, const sead::Vector3f& startHandle,
|
||||
const sead::Vector3f& endHandle, const sead::Vector3f& end);
|
||||
void calcPos(sead::Vector3f* pos, f32 param) const;
|
||||
void calcVelocity(sead::Vector3f* vel, f32 param) const;
|
||||
void calcDir(sead::Vector3f* dir, f32 param) const;
|
||||
void calcStartPos(sead::Vector3f* pos) const;
|
||||
void calcEndPos(sead::Vector3f* pos) const;
|
||||
f32 calcLength(f32 startParam, f32 endParam, s32 stepCount) const;
|
||||
f32 calcCurveParam(f32 param) const;
|
||||
f32 calcNearestParam(const sead::Vector3f& pos, f32 interval) const;
|
||||
void calcNearestPos(sead::Vector3f* nearest, const sead::Vector3f& pos, f32 interval) const;
|
||||
f32 calcNearestLength(f32* param, const sead::Vector3f& pos, f32 max, f32 interval) const;
|
||||
f32 getPartLength() const;
|
||||
|
||||
void setTotalDistance(f32 len) { mTotalDistance = len; }
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ private:
|
|||
static const char* sSceneObjName;
|
||||
};
|
||||
|
||||
ISceneObj* createSceneObj(const IUseSceneObjHolder* objHolder, s32 type);
|
||||
ISceneObj* createSceneObj(const IUseSceneObjHolder* user, s32 sceneObjId);
|
||||
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class Scene : public NerveExecutor,
|
|||
public IUseCamera,
|
||||
public IUseSceneObjHolder {
|
||||
public:
|
||||
Scene(const char*);
|
||||
Scene(const char* name);
|
||||
|
||||
virtual ~Scene();
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ struct ActorInitInfo;
|
|||
|
||||
class SceneObjHolder {
|
||||
public:
|
||||
SceneObjHolder(ISceneObj* (*)(s32), s32);
|
||||
ISceneObj* create(s32);
|
||||
ISceneObj* tryGetObj(s32) const;
|
||||
ISceneObj* getObj(s32) const;
|
||||
bool isExist(s32) const;
|
||||
void setSceneObj(ISceneObj*, s32);
|
||||
void initAfterPlacementSceneObj(const ActorInitInfo&);
|
||||
SceneObjHolder(ISceneObj* (*creator)(s32), s32 size);
|
||||
ISceneObj* create(s32 index);
|
||||
ISceneObj* tryGetObj(s32 index) const;
|
||||
ISceneObj* getObj(s32 index) const;
|
||||
bool isExist(s32 index) const;
|
||||
void setSceneObj(ISceneObj* obj, s32 index);
|
||||
void initAfterPlacementSceneObj(const ActorInitInfo& info);
|
||||
|
||||
template <typename T>
|
||||
inline T* tryGetObj() const {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class IUseSceneObjHolder;
|
|||
class ISceneObj;
|
||||
|
||||
ISceneObj* createSceneObj(const IUseSceneObjHolder* user, s32 sceneObjId);
|
||||
void setSceneObj(const IUseSceneObjHolder* user, ISceneObj*, s32 sceneObjId);
|
||||
void setSceneObj(const IUseSceneObjHolder* user, ISceneObj* obj, s32 sceneObjId);
|
||||
ISceneObj* getSceneObj(const IUseSceneObjHolder* user, s32 sceneObjId);
|
||||
ISceneObj* tryGetSceneObj(const IUseSceneObjHolder* user, s32 sceneObjId);
|
||||
bool isExistSceneObj(const IUseSceneObjHolder* user, s32 sceneObjId);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class DepthShadowMapCtrl;
|
|||
class ShadowKeeper {
|
||||
public:
|
||||
ShadowKeeper();
|
||||
void initAfterPlacement(GraphicsSystemInfo*);
|
||||
void initAfterPlacement(GraphicsSystemInfo* info);
|
||||
void update();
|
||||
bool isHide() const;
|
||||
void hide();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ s32 ByamlHashPair::getValue(bool isRev) const {
|
|||
return isRev ? bswap_32(mValue) : mValue;
|
||||
}
|
||||
|
||||
ByamlHashIter::ByamlHashIter(const u8* data, bool isRev_) : mData(data), mIsRev(isRev_) {}
|
||||
ByamlHashIter::ByamlHashIter(const u8* data, bool isRev) : mData(data), mIsRev(isRev) {}
|
||||
|
||||
ByamlHashIter::ByamlHashIter() : mData(nullptr), mIsRev(false) {}
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ u32 ByamlHashIter::getSize() const {
|
|||
return mIsRev ? bswap_24(val >> 8) : val >> 8;
|
||||
}
|
||||
|
||||
ByamlArrayIter::ByamlArrayIter(const u8* data, bool isRev_) : mData(data), mIsRev(isRev_) {}
|
||||
ByamlArrayIter::ByamlArrayIter(const u8* data, bool isRev) : mData(data), mIsRev(isRev) {}
|
||||
|
||||
ByamlArrayIter::ByamlArrayIter() : mData(nullptr), mIsRev(false) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,11 +52,11 @@ const u32* ByamlStringTableIter::getAddressTable() const {
|
|||
return reinterpret_cast<const u32*>(mData + 4);
|
||||
}
|
||||
|
||||
u32 ByamlStringTableIter::getStringAddress(s32 idx) const {
|
||||
u32 ByamlStringTableIter::getStringAddress(s32 index) const {
|
||||
if (mIsRev)
|
||||
return bswap_32(getAddressTable()[idx]);
|
||||
return bswap_32(getAddressTable()[index]);
|
||||
|
||||
return getAddressTable()[idx];
|
||||
return getAddressTable()[index];
|
||||
}
|
||||
|
||||
// NON_MATCHING: regalloc (https://decomp.me/scratch/AdRVH)
|
||||
|
|
|
|||
|
|
@ -28,33 +28,33 @@ public:
|
|||
bool tryGetIterByIndex(ByamlIter* iter, s32 index) const;
|
||||
bool tryGetIterAndKeyNameByIndex(ByamlIter* iter, const char** key, s32 index) const;
|
||||
bool tryGetIterByKey(ByamlIter* iter, const char* key) const;
|
||||
bool tryGetStringByKey(const char** string, const char* key) const;
|
||||
bool tryConvertString(const char** string, const ByamlData* data) const;
|
||||
bool tryGetBinaryByKey(const u8** binary, s32* size, const char* key) const;
|
||||
bool tryConvertBinary(const u8** binary, s32* size, const ByamlData* data) const;
|
||||
bool tryGetBoolByKey(bool* val, const char* key) const;
|
||||
bool tryConvertBool(bool* val, const ByamlData* data) const;
|
||||
bool tryGetIntByKey(s32* val, const char* key) const;
|
||||
bool tryConvertInt(s32* val, const ByamlData* data) const;
|
||||
bool tryGetUIntByKey(u32* val, const char* key) const;
|
||||
bool tryConvertUInt(u32* val, const ByamlData* data) const;
|
||||
bool tryGetFloatByKey(f32* val, const char* key) const;
|
||||
bool tryConvertFloat(f32* val, const ByamlData* data) const;
|
||||
bool tryGetInt64ByKey(s64* val, const char* key) const;
|
||||
bool tryConvertInt64(s64* val, const ByamlData* data) const;
|
||||
bool tryGetUInt64ByKey(u64* val, const char* key) const;
|
||||
bool tryConvertUInt64(u64* val, const ByamlData* data) const;
|
||||
bool tryGetDoubleByKey(f64* val, const char* key) const;
|
||||
bool tryConvertDouble(f64* val, const ByamlData* data) const;
|
||||
bool tryGetStringByIndex(const char** string, s32 index) const;
|
||||
bool tryGetBinaryByIndex(const u8** binary, s32* size, s32 index) const;
|
||||
bool tryGetBoolByIndex(bool* val, s32 index) const;
|
||||
bool tryGetIntByIndex(s32* val, s32 index) const;
|
||||
bool tryGetUIntByIndex(u32* val, s32 index) const;
|
||||
bool tryGetFloatByIndex(f32* val, s32 index) const;
|
||||
bool tryGetInt64ByIndex(s64* val, s32 index) const;
|
||||
bool tryGetUInt64ByIndex(u64* val, s32 index) const;
|
||||
bool tryGetDoubleByIndex(f64* val, s32 index) const;
|
||||
bool tryGetStringByKey(const char** value, const char* key) const;
|
||||
bool tryConvertString(const char** value, const ByamlData* data) const;
|
||||
bool tryGetBinaryByKey(const u8** value, s32* size, const char* key) const;
|
||||
bool tryConvertBinary(const u8** value, s32* size, const ByamlData* data) const;
|
||||
bool tryGetBoolByKey(bool* value, const char* key) const;
|
||||
bool tryConvertBool(bool* value, const ByamlData* data) const;
|
||||
bool tryGetIntByKey(s32* value, const char* key) const;
|
||||
bool tryConvertInt(s32* value, const ByamlData* data) const;
|
||||
bool tryGetUIntByKey(u32* value, const char* key) const;
|
||||
bool tryConvertUInt(u32* value, const ByamlData* data) const;
|
||||
bool tryGetFloatByKey(f32* value, const char* key) const;
|
||||
bool tryConvertFloat(f32* value, const ByamlData* data) const;
|
||||
bool tryGetInt64ByKey(s64* value, const char* key) const;
|
||||
bool tryConvertInt64(s64* value, const ByamlData* data) const;
|
||||
bool tryGetUInt64ByKey(u64* value, const char* key) const;
|
||||
bool tryConvertUInt64(u64* value, const ByamlData* data) const;
|
||||
bool tryGetDoubleByKey(f64* value, const char* key) const;
|
||||
bool tryConvertDouble(f64* value, const ByamlData* data) const;
|
||||
bool tryGetStringByIndex(const char** value, s32 index) const;
|
||||
bool tryGetBinaryByIndex(const u8** value, s32* size, s32 index) const;
|
||||
bool tryGetBoolByIndex(bool* value, s32 index) const;
|
||||
bool tryGetIntByIndex(s32* value, s32 index) const;
|
||||
bool tryGetUIntByIndex(u32* value, s32 index) const;
|
||||
bool tryGetFloatByIndex(f32* value, s32 index) const;
|
||||
bool tryGetInt64ByIndex(s64* value, s32 index) const;
|
||||
bool tryGetUInt64ByIndex(u64* value, s32 index) const;
|
||||
bool tryGetDoubleByIndex(f64* value, s32 index) const;
|
||||
bool tryConvertIter(ByamlIter* iter, const ByamlData* data) const;
|
||||
bool isEqualData(const ByamlIter& other) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,359 +4,359 @@
|
|||
#include "Library/Yaml/ByamlIter.h"
|
||||
|
||||
namespace al {
|
||||
bool tryGetByamlU8(u8* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
bool tryGetByamlU8(u8* out, const ByamlIter& iter, const char* key) {
|
||||
s32 value = 0;
|
||||
if (rIter.tryGetIntByKey(&value, pKey)) {
|
||||
*pOut = value;
|
||||
if (iter.tryGetIntByKey(&value, key)) {
|
||||
*out = value;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool tryGetByamlU16(u16* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
bool tryGetByamlU16(u16* out, const ByamlIter& iter, const char* key) {
|
||||
s32 value = 0;
|
||||
if (rIter.tryGetIntByKey(&value, pKey)) {
|
||||
*pOut = value;
|
||||
if (iter.tryGetIntByKey(&value, key)) {
|
||||
*out = value;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool tryGetByamlS16(s16* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
bool tryGetByamlS16(s16* out, const ByamlIter& iter, const char* key) {
|
||||
s32 value = 0;
|
||||
if (rIter.tryGetIntByKey(&value, pKey)) {
|
||||
*pOut = value;
|
||||
if (iter.tryGetIntByKey(&value, key)) {
|
||||
*out = value;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool tryGetByamlS32(s32* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
return rIter.tryGetIntByKey(pOut, pKey);
|
||||
bool tryGetByamlS32(s32* out, const ByamlIter& iter, const char* key) {
|
||||
return iter.tryGetIntByKey(out, key);
|
||||
}
|
||||
|
||||
bool tryGetByamlU32(u32* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
bool tryGetByamlU32(u32* out, const ByamlIter& iter, const char* key) {
|
||||
s32 value = 0;
|
||||
bool res = rIter.tryGetIntByKey(&value, pKey);
|
||||
bool res = iter.tryGetIntByKey(&value, key);
|
||||
if (res)
|
||||
*pOut = value;
|
||||
*out = value;
|
||||
return res;
|
||||
}
|
||||
|
||||
bool tryGetByamlS64(s64* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
return rIter.tryGetInt64ByKey(pOut, pKey);
|
||||
bool tryGetByamlS64(s64* out, const ByamlIter& iter, const char* key) {
|
||||
return iter.tryGetInt64ByKey(out, key);
|
||||
}
|
||||
|
||||
bool tryGetByamlU64(u64* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
bool tryGetByamlU64(u64* out, const ByamlIter& iter, const char* key) {
|
||||
u64 value = 0;
|
||||
bool res = rIter.tryGetUInt64ByKey(&value, pKey);
|
||||
bool res = iter.tryGetUInt64ByKey(&value, key);
|
||||
if (res)
|
||||
*pOut = value;
|
||||
*out = value;
|
||||
return res;
|
||||
}
|
||||
|
||||
bool tryGetByamlF32(f32* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
bool tryGetByamlF32(f32* out, const ByamlIter& iter, const char* key) {
|
||||
f32 value = 0;
|
||||
if (rIter.tryGetFloatByKey(&value, pKey)) {
|
||||
*pOut = value;
|
||||
if (iter.tryGetFloatByKey(&value, key)) {
|
||||
*out = value;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool tryGetByamlV2f(sead::Vector2f* pOut, const ByamlIter& rIter) {
|
||||
bool tryGetByamlV2f(sead::Vector2f* out, const ByamlIter& iter) {
|
||||
f32 x = 0;
|
||||
bool x_ret = rIter.tryGetFloatByKey(&x, "X");
|
||||
bool x_ret = iter.tryGetFloatByKey(&x, "X");
|
||||
f32 y = 0;
|
||||
bool y_ret = rIter.tryGetFloatByKey(&y, "Y");
|
||||
bool y_ret = iter.tryGetFloatByKey(&y, "Y");
|
||||
|
||||
*pOut = {x, y};
|
||||
*out = {x, y};
|
||||
return x_ret || y_ret;
|
||||
}
|
||||
|
||||
bool tryGetByamlV3f(sead::Vector3f* pOut, const ByamlIter& rIter) {
|
||||
bool tryGetByamlV3f(sead::Vector3f* out, const ByamlIter& iter) {
|
||||
bool result = false;
|
||||
f32 x = 0;
|
||||
result = rIter.tryGetFloatByKey(&x, "X");
|
||||
result = iter.tryGetFloatByKey(&x, "X");
|
||||
f32 y = 0;
|
||||
result |= rIter.tryGetFloatByKey(&y, "Y");
|
||||
result |= iter.tryGetFloatByKey(&y, "Y");
|
||||
f32 z = 0;
|
||||
result |= rIter.tryGetFloatByKey(&z, "Z");
|
||||
result |= iter.tryGetFloatByKey(&z, "Z");
|
||||
|
||||
*pOut = {x, y, z};
|
||||
*out = {x, y, z};
|
||||
return result;
|
||||
}
|
||||
|
||||
bool tryGetByamlV4f(sead::Vector4f* pOut, const ByamlIter& rIter) {
|
||||
bool tryGetByamlV4f(sead::Vector4f* out, const ByamlIter& iter) {
|
||||
bool result = false;
|
||||
f32 x = 0;
|
||||
result = rIter.tryGetFloatByKey(&x, "X");
|
||||
result = iter.tryGetFloatByKey(&x, "X");
|
||||
f32 y = 0;
|
||||
result |= rIter.tryGetFloatByKey(&y, "Y");
|
||||
result |= iter.tryGetFloatByKey(&y, "Y");
|
||||
f32 z = 0;
|
||||
result |= rIter.tryGetFloatByKey(&z, "Z");
|
||||
result |= iter.tryGetFloatByKey(&z, "Z");
|
||||
f32 w = 0;
|
||||
result |= rIter.tryGetFloatByKey(&w, "W");
|
||||
result |= iter.tryGetFloatByKey(&w, "W");
|
||||
|
||||
*pOut = {x, y, z, w};
|
||||
*out = {x, y, z, w};
|
||||
return result;
|
||||
}
|
||||
|
||||
bool tryGetByamlScale(sead::Vector3f* pOut, const ByamlIter& rIter) {
|
||||
bool tryGetByamlScale(sead::Vector3f* out, const ByamlIter& iter) {
|
||||
bool result = false;
|
||||
f32 x = 1;
|
||||
result = rIter.tryGetFloatByKey(&x, "X");
|
||||
result = iter.tryGetFloatByKey(&x, "X");
|
||||
f32 y = 1;
|
||||
result |= rIter.tryGetFloatByKey(&y, "Y");
|
||||
result |= iter.tryGetFloatByKey(&y, "Y");
|
||||
f32 z = 1;
|
||||
result |= rIter.tryGetFloatByKey(&z, "Z");
|
||||
result |= iter.tryGetFloatByKey(&z, "Z");
|
||||
|
||||
*pOut = {x, y, z};
|
||||
*out = {x, y, z};
|
||||
return result;
|
||||
}
|
||||
|
||||
bool tryGetByamlV2s32(sead::Vector2i* pOut, const ByamlIter& rIter) {
|
||||
bool tryGetByamlV2s32(sead::Vector2i* out, const ByamlIter& iter) {
|
||||
s32 x = 0;
|
||||
bool x_ret = rIter.tryGetIntByKey(&x, "X");
|
||||
bool x_ret = iter.tryGetIntByKey(&x, "X");
|
||||
s32 y = 0;
|
||||
bool y_ret = rIter.tryGetIntByKey(&y, "Y");
|
||||
bool y_ret = iter.tryGetIntByKey(&y, "Y");
|
||||
|
||||
*pOut = {x, y};
|
||||
*out = {x, y};
|
||||
return x_ret || y_ret;
|
||||
}
|
||||
|
||||
bool tryGetByamlV3s32(sead::Vector3i* pOut, const ByamlIter& rIter) {
|
||||
bool tryGetByamlV3s32(sead::Vector3i* out, const ByamlIter& iter) {
|
||||
bool result = false;
|
||||
s32 x = 0;
|
||||
result = rIter.tryGetIntByKey(&x, "X");
|
||||
result = iter.tryGetIntByKey(&x, "X");
|
||||
s32 y = 0;
|
||||
result |= rIter.tryGetIntByKey(&y, "Y");
|
||||
result |= iter.tryGetIntByKey(&y, "Y");
|
||||
s32 z = 0;
|
||||
result |= rIter.tryGetIntByKey(&z, "Z");
|
||||
result |= iter.tryGetIntByKey(&z, "Z");
|
||||
|
||||
*pOut = {x, y, z};
|
||||
*out = {x, y, z};
|
||||
return result;
|
||||
}
|
||||
|
||||
bool tryGetByamlBox3f(sead::BoundBox3f* pOut, const ByamlIter& rIter) {
|
||||
bool tryGetByamlBox3f(sead::BoundBox3f* out, const ByamlIter& iter) {
|
||||
sead::Vector3f min, max;
|
||||
if (!tryGetByamlV3f(&min, rIter, "Min"))
|
||||
if (!tryGetByamlV3f(&min, iter, "Min"))
|
||||
return false;
|
||||
if (!tryGetByamlV3f(&max, rIter, "Max"))
|
||||
if (!tryGetByamlV3f(&max, iter, "Max"))
|
||||
return false;
|
||||
*pOut = {min, max};
|
||||
*out = {min, max};
|
||||
return true;
|
||||
}
|
||||
|
||||
bool tryGetByamlV3f(sead::Vector3f* pOut, const ByamlIter& sIter, const char* key) {
|
||||
ByamlIter rIter;
|
||||
if (!sIter.tryGetIterByKey(&rIter, key))
|
||||
bool tryGetByamlV3f(sead::Vector3f* out, const ByamlIter& iter, const char* key) {
|
||||
ByamlIter child;
|
||||
if (!iter.tryGetIterByKey(&child, key))
|
||||
return false;
|
||||
|
||||
return tryGetByamlV3f(pOut, rIter);
|
||||
return tryGetByamlV3f(out, child);
|
||||
}
|
||||
|
||||
bool tryGetByamlV2f(sead::Vector2f* pOut, const ByamlIter& sIter, const char* key) {
|
||||
ByamlIter rIter;
|
||||
if (!sIter.tryGetIterByKey(&rIter, key))
|
||||
bool tryGetByamlV2f(sead::Vector2f* out, const ByamlIter& iter, const char* key) {
|
||||
ByamlIter child;
|
||||
if (!iter.tryGetIterByKey(&child, key))
|
||||
return false;
|
||||
|
||||
return tryGetByamlV2f(pOut, rIter);
|
||||
return tryGetByamlV2f(out, child);
|
||||
}
|
||||
|
||||
bool tryGetByamlV4f(sead::Vector4f* pOut, const ByamlIter& sIter, const char* key) {
|
||||
ByamlIter rIter;
|
||||
if (!sIter.tryGetIterByKey(&rIter, key))
|
||||
bool tryGetByamlV4f(sead::Vector4f* out, const ByamlIter& iter, const char* key) {
|
||||
ByamlIter child;
|
||||
if (!iter.tryGetIterByKey(&child, key))
|
||||
return false;
|
||||
|
||||
return tryGetByamlV4f(pOut, rIter);
|
||||
return tryGetByamlV4f(out, child);
|
||||
}
|
||||
|
||||
bool tryGetByamlScale(sead::Vector3f* pOut, const ByamlIter& sIter, const char* key) {
|
||||
ByamlIter rIter;
|
||||
if (!sIter.tryGetIterByKey(&rIter, key))
|
||||
bool tryGetByamlScale(sead::Vector3f* out, const ByamlIter& iter, const char* key) {
|
||||
ByamlIter child;
|
||||
if (!iter.tryGetIterByKey(&child, key))
|
||||
return false;
|
||||
|
||||
return tryGetByamlScale(pOut, rIter);
|
||||
return tryGetByamlScale(out, child);
|
||||
}
|
||||
|
||||
bool tryGetByamlV2s32(sead::Vector2i* pOut, const ByamlIter& sIter, const char* key) {
|
||||
ByamlIter rIter;
|
||||
if (!sIter.tryGetIterByKey(&rIter, key))
|
||||
bool tryGetByamlV2s32(sead::Vector2i* out, const ByamlIter& iter, const char* key) {
|
||||
ByamlIter child;
|
||||
if (!iter.tryGetIterByKey(&child, key))
|
||||
return false;
|
||||
|
||||
return tryGetByamlV2s32(pOut, rIter);
|
||||
return tryGetByamlV2s32(out, child);
|
||||
}
|
||||
|
||||
bool tryGetByamlV3s32(sead::Vector3i* pOut, const ByamlIter& sIter, const char* key) {
|
||||
ByamlIter rIter;
|
||||
if (!sIter.tryGetIterByKey(&rIter, key))
|
||||
bool tryGetByamlV3s32(sead::Vector3i* out, const ByamlIter& iter, const char* key) {
|
||||
ByamlIter child;
|
||||
if (!iter.tryGetIterByKey(&child, key))
|
||||
return false;
|
||||
|
||||
return tryGetByamlV3s32(pOut, rIter);
|
||||
return tryGetByamlV3s32(out, child);
|
||||
}
|
||||
|
||||
bool tryGetByamlBox3f(sead::BoundBox3f* pOut, const ByamlIter& sIter, const char* key) {
|
||||
ByamlIter rIter;
|
||||
if (!sIter.tryGetIterByKey(&rIter, key))
|
||||
bool tryGetByamlBox3f(sead::BoundBox3f* out, const ByamlIter& iter, const char* key) {
|
||||
ByamlIter child;
|
||||
if (!iter.tryGetIterByKey(&child, key))
|
||||
return false;
|
||||
|
||||
return tryGetByamlBox3f(pOut, rIter);
|
||||
return tryGetByamlBox3f(out, child);
|
||||
}
|
||||
|
||||
bool tryGetByamlString(const char** pOut, const ByamlIter& rIter, const char* key) {
|
||||
return rIter.tryGetStringByKey(pOut, key);
|
||||
bool tryGetByamlString(const char** out, const ByamlIter& iter, const char* key) {
|
||||
return iter.tryGetStringByKey(out, key);
|
||||
}
|
||||
|
||||
bool tryGetByamlColor(sead::Color4f* pOut, const ByamlIter& rIter) {
|
||||
bool tryGetByamlColor(sead::Color4f* out, const ByamlIter& iter) {
|
||||
bool result = false;
|
||||
f32 r = 0;
|
||||
result = rIter.tryGetFloatByKey(&r, "R");
|
||||
result = iter.tryGetFloatByKey(&r, "R");
|
||||
f32 g = 0;
|
||||
result |= rIter.tryGetFloatByKey(&g, "G");
|
||||
result |= iter.tryGetFloatByKey(&g, "G");
|
||||
f32 b = 0;
|
||||
result |= rIter.tryGetFloatByKey(&b, "B");
|
||||
result |= iter.tryGetFloatByKey(&b, "B");
|
||||
f32 a = 0;
|
||||
result |= rIter.tryGetFloatByKey(&a, "A");
|
||||
result |= iter.tryGetFloatByKey(&a, "A");
|
||||
|
||||
*pOut = {r, g, b, a};
|
||||
*out = {r, g, b, a};
|
||||
return result;
|
||||
}
|
||||
|
||||
bool tryGetByamlColor(sead::Color4f* pOut, const ByamlIter& sIter, const char* key) {
|
||||
ByamlIter rIter;
|
||||
if (!sIter.tryGetIterByKey(&rIter, key))
|
||||
bool tryGetByamlColor(sead::Color4f* out, const ByamlIter& iter, const char* key) {
|
||||
ByamlIter child;
|
||||
if (!iter.tryGetIterByKey(&child, key))
|
||||
return false;
|
||||
|
||||
return tryGetByamlColor(pOut, rIter);
|
||||
return tryGetByamlColor(out, child);
|
||||
}
|
||||
|
||||
bool tryGetByamlBool(bool* pOut, const ByamlIter& rIter, const char* key) {
|
||||
return rIter.tryGetBoolByKey(pOut, key);
|
||||
bool tryGetByamlBool(bool* out, const ByamlIter& iter, const char* key) {
|
||||
return iter.tryGetBoolByKey(out, key);
|
||||
}
|
||||
|
||||
const char* tryGetByamlKeyStringOrNULL(const ByamlIter& rIter, const char* key) {
|
||||
const char* tryGetByamlKeyStringOrNULL(const ByamlIter& iter, const char* key) {
|
||||
const char* val = nullptr;
|
||||
if (rIter.tryGetStringByKey(&val, key))
|
||||
if (iter.tryGetStringByKey(&val, key))
|
||||
return val;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
s32 tryGetByamlKeyIntOrZero(const ByamlIter& rIter, const char* key) {
|
||||
s32 tryGetByamlKeyIntOrZero(const ByamlIter& iter, const char* key) {
|
||||
s32 val = 0;
|
||||
if (rIter.tryGetIntByKey(&val, key))
|
||||
if (iter.tryGetIntByKey(&val, key))
|
||||
return val;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 tryGetByamlKeyU32OrZero(const ByamlIter& rIter, const char* key) {
|
||||
u32 tryGetByamlKeyU32OrZero(const ByamlIter& iter, const char* key) {
|
||||
u32 val = 0;
|
||||
if (rIter.tryGetUIntByKey(&val, key))
|
||||
if (iter.tryGetUIntByKey(&val, key))
|
||||
return val;
|
||||
return 0;
|
||||
}
|
||||
|
||||
f32 tryGetByamlKeyFloatOrZero(const ByamlIter& rIter, const char* key) {
|
||||
f32 tryGetByamlKeyFloatOrZero(const ByamlIter& iter, const char* key) {
|
||||
f32 val = 0;
|
||||
if (rIter.tryGetFloatByKey(&val, key))
|
||||
if (iter.tryGetFloatByKey(&val, key))
|
||||
return val;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool tryGetByamlKeyBoolOrFalse(const ByamlIter& rIter, const char* key) {
|
||||
bool tryGetByamlKeyBoolOrFalse(const ByamlIter& iter, const char* key) {
|
||||
bool val = false;
|
||||
if (rIter.tryGetBoolByKey(&val, key))
|
||||
if (iter.tryGetBoolByKey(&val, key))
|
||||
return val;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool tryGetByamlIterByKey(ByamlIter* pOut, const ByamlIter& rIter, const char* key) {
|
||||
return rIter.tryGetIterByKey(pOut, key);
|
||||
bool tryGetByamlIterByKey(ByamlIter* out, const ByamlIter& iter, const char* key) {
|
||||
return iter.tryGetIterByKey(out, key);
|
||||
}
|
||||
|
||||
bool tryGetByamlKeyAndIntByIndex(const char** key, s32* pOut, const ByamlIter& rIter, s32 index) {
|
||||
bool tryGetByamlKeyAndIntByIndex(const char** key, s32* out, const ByamlIter& iter, s32 index) {
|
||||
ByamlData data;
|
||||
if (!rIter.getByamlDataAndKeyName(&data, key, index))
|
||||
if (!iter.getByamlDataAndKeyName(&data, key, index))
|
||||
return false;
|
||||
if (!rIter.tryConvertInt(pOut, &data))
|
||||
if (!iter.tryConvertInt(out, &data))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
const char* getByamlKeyString(const ByamlIter& rIter, const char* key) {
|
||||
return tryGetByamlKeyStringOrNULL(rIter, key);
|
||||
const char* getByamlKeyString(const ByamlIter& iter, const char* key) {
|
||||
return tryGetByamlKeyStringOrNULL(iter, key);
|
||||
}
|
||||
|
||||
s32 getByamlKeyInt(const ByamlIter& rIter, const char* key) {
|
||||
return tryGetByamlKeyIntOrZero(rIter, key);
|
||||
s32 getByamlKeyInt(const ByamlIter& iter, const char* key) {
|
||||
return tryGetByamlKeyIntOrZero(iter, key);
|
||||
}
|
||||
|
||||
f32 getByamlKeyFloat(const ByamlIter& rIter, const char* key) {
|
||||
return tryGetByamlKeyFloatOrZero(rIter, key);
|
||||
f32 getByamlKeyFloat(const ByamlIter& iter, const char* key) {
|
||||
return tryGetByamlKeyFloatOrZero(iter, key);
|
||||
}
|
||||
|
||||
bool getByamlKeyBool(const ByamlIter& rIter, const char* key) {
|
||||
return tryGetByamlKeyBoolOrFalse(rIter, key);
|
||||
bool getByamlKeyBool(const ByamlIter& iter, const char* key) {
|
||||
return tryGetByamlKeyBoolOrFalse(iter, key);
|
||||
}
|
||||
|
||||
void getByamlIterByKey(ByamlIter* pOut, const ByamlIter& rIter, const char* pKey) {
|
||||
rIter.tryGetIterByKey(pOut, pKey);
|
||||
void getByamlIterByKey(ByamlIter* out, const ByamlIter& iter, const char* key) {
|
||||
iter.tryGetIterByKey(out, key);
|
||||
}
|
||||
|
||||
void getByamlIterByIndex(ByamlIter* pOut, const ByamlIter& rIter, s32 index) {
|
||||
rIter.tryGetIterByIndex(pOut, index);
|
||||
void getByamlIterByIndex(ByamlIter* out, const ByamlIter& iter, s32 index) {
|
||||
iter.tryGetIterByIndex(out, index);
|
||||
}
|
||||
|
||||
bool isTypeBoolByIndex(const ByamlIter& rIter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_BOOL>(rIter, index);
|
||||
bool isTypeBoolByIndex(const ByamlIter& iter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_BOOL>(iter, index);
|
||||
}
|
||||
|
||||
bool isTypeBoolByKey(const ByamlIter& rIter, const char* pKey) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_BOOL>(rIter, pKey);
|
||||
bool isTypeBoolByKey(const ByamlIter& iter, const char* key) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_BOOL>(iter, key);
|
||||
}
|
||||
|
||||
bool isTypeIntByIndex(const ByamlIter& rIter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_INT>(rIter, index);
|
||||
bool isTypeIntByIndex(const ByamlIter& iter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_INT>(iter, index);
|
||||
}
|
||||
|
||||
bool isTypeIntByKey(const ByamlIter& rIter, const char* pKey) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_INT>(rIter, pKey);
|
||||
bool isTypeIntByKey(const ByamlIter& iter, const char* key) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_INT>(iter, key);
|
||||
}
|
||||
|
||||
bool isTypeFloatByIndex(const ByamlIter& rIter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_FLOAT>(rIter, index);
|
||||
bool isTypeFloatByIndex(const ByamlIter& iter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_FLOAT>(iter, index);
|
||||
}
|
||||
|
||||
bool isTypeFloatByKey(const ByamlIter& rIter, const char* pKey) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_FLOAT>(rIter, pKey);
|
||||
bool isTypeFloatByKey(const ByamlIter& iter, const char* key) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_FLOAT>(iter, key);
|
||||
}
|
||||
|
||||
bool isTypeStringByIndex(const ByamlIter& rIter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_STRING>(rIter, index);
|
||||
bool isTypeStringByIndex(const ByamlIter& iter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_STRING>(iter, index);
|
||||
}
|
||||
|
||||
bool isTypeStringByKey(const ByamlIter& rIter, const char* pKey) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_STRING>(rIter, pKey);
|
||||
bool isTypeStringByKey(const ByamlIter& iter, const char* key) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_STRING>(iter, key);
|
||||
}
|
||||
|
||||
bool isTypeArrayByIndex(const ByamlIter& rIter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_ARRAY>(rIter, index);
|
||||
bool isTypeArrayByIndex(const ByamlIter& iter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_ARRAY>(iter, index);
|
||||
}
|
||||
|
||||
bool isTypeArrayByKey(const ByamlIter& rIter, const char* pKey) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_ARRAY>(rIter, pKey);
|
||||
bool isTypeArrayByKey(const ByamlIter& iter, const char* key) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_ARRAY>(iter, key);
|
||||
}
|
||||
|
||||
bool isTypeHashByIndex(const ByamlIter& rIter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_HASH>(rIter, index);
|
||||
bool isTypeHashByIndex(const ByamlIter& iter, s32 index) {
|
||||
return isTypeByIndex<ByamlDataType::TYPE_HASH>(iter, index);
|
||||
}
|
||||
|
||||
bool isTypeHashByKey(const ByamlIter& rIter, const char* pKey) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_HASH>(rIter, pKey);
|
||||
bool isTypeHashByKey(const ByamlIter& iter, const char* key) {
|
||||
return isTypeByKey<ByamlDataType::TYPE_HASH>(iter, key);
|
||||
}
|
||||
|
||||
s32 getByamlIterDataNum(const ByamlIter& rIter) {
|
||||
return rIter.getSize();
|
||||
s32 getByamlIterDataNum(const ByamlIter& iter) {
|
||||
return iter.getSize();
|
||||
}
|
||||
|
||||
void printByamlIter(const u8* data) {
|
||||
|
|
|
|||
|
|
@ -12,77 +12,77 @@ class WriteStream;
|
|||
}
|
||||
|
||||
namespace al {
|
||||
bool tryGetByamlU8(u8*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlU16(u16*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlS16(s16*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlS32(s32*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlU32(u32*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlS64(s64*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlU64(u64*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlF32(f32*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlV2f(sead::Vector2f*, const ByamlIter&);
|
||||
bool tryGetByamlV3f(sead::Vector3f*, const ByamlIter&);
|
||||
bool tryGetByamlV4f(sead::Vector4f*, const ByamlIter&);
|
||||
bool tryGetByamlScale(sead::Vector3f*, const ByamlIter&);
|
||||
bool tryGetByamlV2s32(sead::Vector2i*, const ByamlIter&);
|
||||
bool tryGetByamlV3s32(sead::Vector3i*, const ByamlIter&);
|
||||
bool tryGetByamlBox3f(sead::BoundBox3f*, const ByamlIter&);
|
||||
bool tryGetByamlV3f(sead::Vector3f*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlV2f(sead::Vector2f*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlV4f(sead::Vector4f*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlScale(sead::Vector3f*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlV2s32(sead::Vector2i*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlV3s32(sead::Vector3i*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlBox3f(sead::BoundBox3f*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlString(const char**, const ByamlIter&, const char*);
|
||||
bool tryGetByamlColor(sead::Color4f*, const ByamlIter&);
|
||||
bool tryGetByamlColor(sead::Color4f*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlBool(bool*, const ByamlIter&, const char*);
|
||||
const char* tryGetByamlKeyStringOrNULL(const ByamlIter&, const char*);
|
||||
s32 tryGetByamlKeyIntOrZero(const ByamlIter&, const char*);
|
||||
u32 tryGetByamlKeyU32OrZero(const ByamlIter&, const char*);
|
||||
f32 tryGetByamlKeyFloatOrZero(const ByamlIter&, const char*);
|
||||
bool tryGetByamlKeyBoolOrFalse(const ByamlIter&, const char*);
|
||||
bool tryGetByamlIterByKey(ByamlIter*, const ByamlIter&, const char*);
|
||||
bool tryGetByamlKeyAndIntByIndex(const char**, s32*, const ByamlIter&, s32);
|
||||
bool tryGetByamlU8(u8* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlU16(u16* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlS16(s16* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlS32(s32* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlU32(u32* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlS64(s64* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlU64(u64* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlF32(f32* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlV2f(sead::Vector2f* out, const ByamlIter& iter);
|
||||
bool tryGetByamlV3f(sead::Vector3f* out, const ByamlIter& iter);
|
||||
bool tryGetByamlV4f(sead::Vector4f* out, const ByamlIter& iter);
|
||||
bool tryGetByamlScale(sead::Vector3f* out, const ByamlIter& iter);
|
||||
bool tryGetByamlV2s32(sead::Vector2i* out, const ByamlIter& iter);
|
||||
bool tryGetByamlV3s32(sead::Vector3i* out, const ByamlIter& iter);
|
||||
bool tryGetByamlBox3f(sead::BoundBox3f* out, const ByamlIter& iter);
|
||||
bool tryGetByamlV3f(sead::Vector3f* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlV2f(sead::Vector2f* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlV4f(sead::Vector4f* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlScale(sead::Vector3f* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlV2s32(sead::Vector2i* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlV3s32(sead::Vector3i* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlBox3f(sead::BoundBox3f* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlString(const char** out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlColor(sead::Color4f* out, const ByamlIter& iter);
|
||||
bool tryGetByamlColor(sead::Color4f* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlBool(bool* out, const ByamlIter& iter, const char* key);
|
||||
const char* tryGetByamlKeyStringOrNULL(const ByamlIter& iter, const char* key);
|
||||
s32 tryGetByamlKeyIntOrZero(const ByamlIter& iter, const char* key);
|
||||
u32 tryGetByamlKeyU32OrZero(const ByamlIter& iter, const char* key);
|
||||
f32 tryGetByamlKeyFloatOrZero(const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlKeyBoolOrFalse(const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlIterByKey(ByamlIter* out, const ByamlIter& iter, const char* key);
|
||||
bool tryGetByamlKeyAndIntByIndex(const char** key, s32* out, const ByamlIter& iter, s32 index);
|
||||
|
||||
const char* getByamlKeyString(const ByamlIter&, const char*);
|
||||
s32 getByamlKeyInt(const ByamlIter&, const char*);
|
||||
f32 getByamlKeyFloat(const ByamlIter&, const char*);
|
||||
bool getByamlKeyBool(const ByamlIter&, const char*);
|
||||
void getByamlIterByKey(ByamlIter*, const ByamlIter&, const char*);
|
||||
void getByamlIterByIndex(ByamlIter*, const ByamlIter&, s32);
|
||||
const char* getByamlKeyString(const ByamlIter& iter, const char* key);
|
||||
s32 getByamlKeyInt(const ByamlIter& iter, const char* key);
|
||||
f32 getByamlKeyFloat(const ByamlIter& iter, const char* key);
|
||||
bool getByamlKeyBool(const ByamlIter& iter, const char* key);
|
||||
void getByamlIterByKey(ByamlIter* out, const ByamlIter& iter, const char* key);
|
||||
void getByamlIterByIndex(ByamlIter* out, const ByamlIter& iter, s32 index);
|
||||
|
||||
template <ByamlDataType T>
|
||||
bool isTypeByIndex(const ByamlIter& rIter, s32 index) {
|
||||
bool isTypeByIndex(const ByamlIter& iter, s32 index) {
|
||||
ByamlData data;
|
||||
if (rIter.getByamlDataByIndex(&data, index))
|
||||
if (iter.getByamlDataByIndex(&data, index))
|
||||
return data.getType() == T;
|
||||
return false;
|
||||
}
|
||||
|
||||
template <ByamlDataType T>
|
||||
bool isTypeByKey(const ByamlIter& rIter, const char* key) {
|
||||
bool isTypeByKey(const ByamlIter& iter, const char* key) {
|
||||
ByamlData data;
|
||||
if (rIter.getByamlDataByKey(&data, key))
|
||||
if (iter.getByamlDataByKey(&data, key))
|
||||
return data.getType() == T;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isTypeBoolByIndex(const ByamlIter&, s32);
|
||||
bool isTypeBoolByKey(const ByamlIter&, const char*);
|
||||
bool isTypeIntByIndex(const ByamlIter&, s32);
|
||||
bool isTypeIntByKey(const ByamlIter&, const char*);
|
||||
bool isTypeFloatByIndex(const ByamlIter&, s32);
|
||||
bool isTypeFloatByKey(const ByamlIter&, const char*);
|
||||
bool isTypeStringByIndex(const ByamlIter&, s32);
|
||||
bool isTypeStringByKey(const ByamlIter&, const char*);
|
||||
bool isTypeArrayByIndex(const ByamlIter&, s32);
|
||||
bool isTypeArrayByKey(const ByamlIter&, const char*);
|
||||
bool isTypeHashByIndex(const ByamlIter&, s32);
|
||||
bool isTypeHashByKey(const ByamlIter&, const char*);
|
||||
bool isTypeBoolByIndex(const ByamlIter& iter, s32 index);
|
||||
bool isTypeBoolByKey(const ByamlIter& iter, const char* key);
|
||||
bool isTypeIntByIndex(const ByamlIter& iter, s32 index);
|
||||
bool isTypeIntByKey(const ByamlIter& iter, const char* key);
|
||||
bool isTypeFloatByIndex(const ByamlIter& iter, s32 index);
|
||||
bool isTypeFloatByKey(const ByamlIter& iter, const char* key);
|
||||
bool isTypeStringByIndex(const ByamlIter& iter, s32 index);
|
||||
bool isTypeStringByKey(const ByamlIter& iter, const char* key);
|
||||
bool isTypeArrayByIndex(const ByamlIter& iter, s32 index);
|
||||
bool isTypeArrayByKey(const ByamlIter& iter, const char* key);
|
||||
bool isTypeHashByIndex(const ByamlIter& iter, s32 index);
|
||||
bool isTypeHashByKey(const ByamlIter& iter, const char* key);
|
||||
|
||||
s32 getByamlIterDataNum(const ByamlIter&);
|
||||
s32 getByamlIterDataNum(const ByamlIter& iter);
|
||||
|
||||
struct PrintParams {
|
||||
s32 depth;
|
||||
|
|
@ -90,7 +90,7 @@ struct PrintParams {
|
|||
PrintParams* parent;
|
||||
};
|
||||
|
||||
void printByamlIter(const u8*);
|
||||
void printByamlIter(const ByamlIter&);
|
||||
void printByamlIter_(const ByamlIter&, PrintParams*);
|
||||
void printByamlIter(const u8* data);
|
||||
void printByamlIter(const ByamlIter& iter);
|
||||
void printByamlIter_(const ByamlIter& iter, PrintParams* param);
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -20,43 +20,43 @@ class ByamlIter;
|
|||
|
||||
class ByamlWriter {
|
||||
public:
|
||||
ByamlWriter(sead::Heap*, bool);
|
||||
ByamlWriter(sead::Heap* heap, bool _alwaysFalse);
|
||||
virtual ~ByamlWriter();
|
||||
|
||||
void addBool(bool);
|
||||
void addInt(s32);
|
||||
void addUInt(u32);
|
||||
void addFloat(f32);
|
||||
void addInt64(s64);
|
||||
void addUInt64(u64);
|
||||
void addDouble(f64);
|
||||
void addString(const char*);
|
||||
void addBool(bool value);
|
||||
void addInt(s32 value);
|
||||
void addUInt(u32 value);
|
||||
void addFloat(f32 value);
|
||||
void addInt64(s64 value);
|
||||
void addUInt64(u64 value);
|
||||
void addDouble(f64 value);
|
||||
void addString(const char* value);
|
||||
void addNull();
|
||||
void addBool(const char*, bool);
|
||||
void addInt(const char*, s32);
|
||||
void addUInt(const char*, u32);
|
||||
void addFloat(const char*, f32);
|
||||
void addInt64(const char*, s64);
|
||||
void addUInt64(const char*, u64);
|
||||
void addDouble(const char*, f64);
|
||||
void addString(const char*, const char*);
|
||||
void addNull(const char*);
|
||||
void addBool(const char* key, bool value);
|
||||
void addInt(const char* key, s32 value);
|
||||
void addUInt(const char* key, u32 value);
|
||||
void addFloat(const char* key, f32 value);
|
||||
void addInt64(const char* key, s64 value);
|
||||
void addUInt64(const char* key, u64 value);
|
||||
void addDouble(const char* key, f64 value);
|
||||
void addString(const char* key, const char* value);
|
||||
void addNull(const char* key);
|
||||
|
||||
ByamlWriterArray* getArrayCurrentContainer();
|
||||
ByamlWriterHash* getHashCurrentContainer();
|
||||
ByamlWriterContainer* getCurrentContainer();
|
||||
void pushHash();
|
||||
void pushContainer(ByamlWriterContainer*);
|
||||
void pushContainer(ByamlWriterContainer* container);
|
||||
void pushArray();
|
||||
void pushArray(const char*);
|
||||
void pushHash(const char*);
|
||||
void pushIter(const ByamlIter&);
|
||||
void pushIter(const char*, const ByamlIter&);
|
||||
void pushLocalIter(const ByamlIter&, const char*);
|
||||
void pushArray(const char* key);
|
||||
void pushHash(const char* key);
|
||||
void pushIter(const ByamlIter& iter);
|
||||
void pushIter(const char* key, const ByamlIter& iter);
|
||||
void pushLocalIter(const ByamlIter& iter, const char* iterKey);
|
||||
void pop();
|
||||
u32 calcHeaderSize() const;
|
||||
u32 calcPackSize() const;
|
||||
void write(sead::WriteStream*);
|
||||
void write(sead::WriteStream* stream);
|
||||
void print() const;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ public:
|
|||
ByamlWriterBigDataList();
|
||||
virtual ~ByamlWriterBigDataList();
|
||||
u32 calcPackSize() const;
|
||||
void addData(ByamlWriterBigData*);
|
||||
s32 setOffset(s32);
|
||||
void write(sead::WriteStream*);
|
||||
void addData(ByamlWriterBigData* data);
|
||||
s32 setOffset(s32 offset);
|
||||
void write(sead::WriteStream* stream);
|
||||
|
||||
private:
|
||||
sead::TList<ByamlWriterBigData*> mList;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ u8 ByamlWriterBool::getTypeCode() const {
|
|||
return 0xD0;
|
||||
}
|
||||
|
||||
void ByamlWriterBool::print(s32) const {}
|
||||
void ByamlWriterBool::print(s32 recursionDepth) const {}
|
||||
|
||||
void ByamlWriterBool::write(sead::WriteStream* stream) const {
|
||||
stream->writeU32(mValue);
|
||||
|
|
@ -28,7 +28,7 @@ u8 ByamlWriterInt::getTypeCode() const {
|
|||
return 0xD1;
|
||||
}
|
||||
|
||||
void ByamlWriterInt::print(s32) const {}
|
||||
void ByamlWriterInt::print(s32 recursionDepth) const {}
|
||||
|
||||
void ByamlWriterInt::write(sead::WriteStream* stream) const {
|
||||
stream->writeS32(mValue);
|
||||
|
|
@ -40,7 +40,7 @@ u8 ByamlWriterFloat::getTypeCode() const {
|
|||
return 0xD2;
|
||||
}
|
||||
|
||||
void ByamlWriterFloat::print(s32) const {}
|
||||
void ByamlWriterFloat::print(s32 recursionDepth) const {}
|
||||
|
||||
void ByamlWriterFloat::write(sead::WriteStream* stream) const {
|
||||
stream->writeF32(mValue);
|
||||
|
|
@ -52,7 +52,7 @@ u8 ByamlWriterUInt::getTypeCode() const {
|
|||
return 0xD3;
|
||||
}
|
||||
|
||||
void ByamlWriterUInt::print(s32) const {}
|
||||
void ByamlWriterUInt::print(s32 recursionDepth) const {}
|
||||
|
||||
void ByamlWriterUInt::write(sead::WriteStream* stream) const {
|
||||
stream->writeU32(mValue);
|
||||
|
|
@ -64,7 +64,7 @@ u8 ByamlWriterNull::getTypeCode() const {
|
|||
return 0xFF;
|
||||
}
|
||||
|
||||
void ByamlWriterNull::print(s32) const {}
|
||||
void ByamlWriterNull::print(s32 recursionDepth) const {}
|
||||
|
||||
void ByamlWriterNull::write(sead::WriteStream* stream) const {
|
||||
stream->writeU32(0);
|
||||
|
|
@ -79,7 +79,7 @@ u8 ByamlWriterString::getTypeCode() const {
|
|||
return 0xA0;
|
||||
}
|
||||
|
||||
void ByamlWriterString::print(s32) const {}
|
||||
void ByamlWriterString::print(s32 recursionDepth) const {}
|
||||
|
||||
void ByamlWriterString::write(sead::WriteStream* stream) const {
|
||||
stream->writeU32(mStringTable->calcIndex(mString));
|
||||
|
|
@ -104,7 +104,7 @@ void ByamlWriterInt64::writeBigData(sead::WriteStream* stream) const {
|
|||
stream->writeS64(mValue);
|
||||
}
|
||||
|
||||
void ByamlWriterInt64::print(s32) const {}
|
||||
void ByamlWriterInt64::print(s32 recursionDepth) const {}
|
||||
|
||||
ByamlWriterUInt64::ByamlWriterUInt64(u64 value, ByamlWriterBigDataList* list)
|
||||
: ByamlWriterBigData(list), mValue(value) {}
|
||||
|
|
@ -117,7 +117,7 @@ void ByamlWriterUInt64::writeBigData(sead::WriteStream* stream) const {
|
|||
stream->writeU64(mValue);
|
||||
}
|
||||
|
||||
void ByamlWriterUInt64::print(s32) const {}
|
||||
void ByamlWriterUInt64::print(s32 recursionDepth) const {}
|
||||
|
||||
ByamlWriterDouble::ByamlWriterDouble(f64 value, ByamlWriterBigDataList* list)
|
||||
: ByamlWriterBigData(list), mValue(value) {}
|
||||
|
|
@ -130,7 +130,7 @@ void ByamlWriterDouble::writeBigData(sead::WriteStream* stream) const {
|
|||
stream->writeU64(*reinterpret_cast<const u64*>(&mValue));
|
||||
}
|
||||
|
||||
void ByamlWriterDouble::print(s32) const {}
|
||||
void ByamlWriterDouble::print(s32 recursionDepth) const {}
|
||||
|
||||
ByamlWriterArray::ByamlWriterArray(ByamlWriterStringTable* stringTable)
|
||||
: mStringTable(stringTable) {}
|
||||
|
|
@ -227,9 +227,9 @@ void ByamlWriterArray::write(sead::WriteStream* stream) const {
|
|||
stream->writeU32(getOffset());
|
||||
}
|
||||
|
||||
void ByamlWriterArray::print(s32 unknown) const {
|
||||
void ByamlWriterArray::print(s32 recursionDepth) const {
|
||||
for (auto node : mList)
|
||||
node->print(unknown + 1);
|
||||
node->print(recursionDepth + 1);
|
||||
}
|
||||
|
||||
ByamlWriterHashPair::ByamlWriterHashPair(const char* key, ByamlWriterData* value)
|
||||
|
|
|
|||
|
|
@ -23,17 +23,17 @@ public:
|
|||
|
||||
virtual void write(sead::WriteStream*) const;
|
||||
|
||||
virtual void print(s32) const {}
|
||||
virtual void print(s32 recursionDepth) const {}
|
||||
|
||||
void printIndent(s32) const;
|
||||
};
|
||||
|
||||
class ByamlWriterBool : public ByamlWriterData {
|
||||
public:
|
||||
ByamlWriterBool(bool);
|
||||
ByamlWriterBool(bool value);
|
||||
u8 getTypeCode() const override;
|
||||
void write(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
private:
|
||||
bool mValue;
|
||||
|
|
@ -41,10 +41,10 @@ private:
|
|||
|
||||
class ByamlWriterInt : public ByamlWriterData {
|
||||
public:
|
||||
ByamlWriterInt(s32);
|
||||
ByamlWriterInt(s32 value);
|
||||
u8 getTypeCode() const override;
|
||||
void write(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
private:
|
||||
s32 mValue;
|
||||
|
|
@ -52,10 +52,10 @@ private:
|
|||
|
||||
class ByamlWriterFloat : public ByamlWriterData {
|
||||
public:
|
||||
ByamlWriterFloat(f32);
|
||||
ByamlWriterFloat(f32 value);
|
||||
u8 getTypeCode() const override;
|
||||
void write(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
private:
|
||||
f32 mValue;
|
||||
|
|
@ -63,10 +63,10 @@ private:
|
|||
|
||||
class ByamlWriterUInt : public ByamlWriterData {
|
||||
public:
|
||||
ByamlWriterUInt(u32);
|
||||
ByamlWriterUInt(u32 value);
|
||||
u8 getTypeCode() const override;
|
||||
void write(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
private:
|
||||
u32 mValue;
|
||||
|
|
@ -76,18 +76,18 @@ class ByamlWriterNull : public ByamlWriterData {
|
|||
public:
|
||||
ByamlWriterNull();
|
||||
u8 getTypeCode() const override;
|
||||
void write(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
};
|
||||
|
||||
class ByamlWriterStringTable;
|
||||
|
||||
class ByamlWriterString : public ByamlWriterData {
|
||||
public:
|
||||
ByamlWriterString(const char*, ByamlWriterStringTable*);
|
||||
ByamlWriterString(const char* string, ByamlWriterStringTable* stringTable);
|
||||
u8 getTypeCode() const override;
|
||||
void write(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
private:
|
||||
const char* mString;
|
||||
|
|
@ -98,9 +98,9 @@ class ByamlWriterBigDataList;
|
|||
|
||||
class ByamlWriterBigData : public ByamlWriterData {
|
||||
public:
|
||||
ByamlWriterBigData(ByamlWriterBigDataList*);
|
||||
ByamlWriterBigData(ByamlWriterBigDataList* list);
|
||||
~ByamlWriterBigData() = default;
|
||||
void write(sead::WriteStream*) const override;
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
|
||||
virtual u32 calcBigDataSize() const { return 8; }
|
||||
|
||||
|
|
@ -115,11 +115,11 @@ private:
|
|||
|
||||
class ByamlWriterInt64 : public ByamlWriterBigData {
|
||||
public:
|
||||
ByamlWriterInt64(s64, ByamlWriterBigDataList*);
|
||||
ByamlWriterInt64(s64 value, ByamlWriterBigDataList* list);
|
||||
~ByamlWriterInt64() = default;
|
||||
u8 getTypeCode() const override;
|
||||
void writeBigData(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void writeBigData(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
private:
|
||||
s64 mValue;
|
||||
|
|
@ -127,11 +127,11 @@ private:
|
|||
|
||||
class ByamlWriterUInt64 : public ByamlWriterBigData {
|
||||
public:
|
||||
ByamlWriterUInt64(u64, ByamlWriterBigDataList*);
|
||||
ByamlWriterUInt64(u64 value, ByamlWriterBigDataList* list);
|
||||
~ByamlWriterUInt64() = default;
|
||||
u8 getTypeCode() const override;
|
||||
void writeBigData(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void writeBigData(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
private:
|
||||
u64 mValue;
|
||||
|
|
@ -139,11 +139,11 @@ private:
|
|||
|
||||
class ByamlWriterDouble : public ByamlWriterBigData {
|
||||
public:
|
||||
ByamlWriterDouble(f64, ByamlWriterBigDataList*);
|
||||
ByamlWriterDouble(f64 value, ByamlWriterBigDataList* list);
|
||||
~ByamlWriterDouble() = default;
|
||||
u8 getTypeCode() const override;
|
||||
void writeBigData(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void writeBigData(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
private:
|
||||
f64 mValue;
|
||||
|
|
@ -219,29 +219,29 @@ private:
|
|||
|
||||
class ByamlWriterArray : public ByamlWriterContainer {
|
||||
public:
|
||||
ByamlWriterArray(ByamlWriterStringTable*);
|
||||
ByamlWriterArray(ByamlWriterStringTable* stringTable);
|
||||
~ByamlWriterArray();
|
||||
|
||||
void deleteData() override;
|
||||
u32 calcPackSize() const override;
|
||||
|
||||
void addData(ByamlWriterData*);
|
||||
void addBool(bool) override;
|
||||
void addInt(s32) override;
|
||||
void addUInt(u32) override;
|
||||
void addFloat(f32) override;
|
||||
void addInt64(s64, ByamlWriterBigDataList*) override;
|
||||
void addUInt64(u64, ByamlWriterBigDataList*) override;
|
||||
void addDouble(f64, ByamlWriterBigDataList*) override;
|
||||
void addString(const char*) override;
|
||||
void addHash(ByamlWriterHash*) override;
|
||||
void addArray(ByamlWriterArray*) override;
|
||||
void addData(ByamlWriterData* data);
|
||||
void addBool(bool value) override;
|
||||
void addInt(s32 value) override;
|
||||
void addUInt(u32 value) override;
|
||||
void addFloat(f32 value) override;
|
||||
void addInt64(s64 value, ByamlWriterBigDataList* list) override;
|
||||
void addUInt64(u64 value, ByamlWriterBigDataList* list) override;
|
||||
void addDouble(f64 value, ByamlWriterBigDataList* list) override;
|
||||
void addString(const char* value) override;
|
||||
void addHash(ByamlWriterHash* hash) override;
|
||||
void addArray(ByamlWriterArray* array) override;
|
||||
void addNull() override;
|
||||
|
||||
u8 getTypeCode() const override;
|
||||
void writeContainer(sead::WriteStream*) const override;
|
||||
void write(sead::WriteStream*) const override;
|
||||
void print(s32) const override;
|
||||
void writeContainer(sead::WriteStream* stream) const override;
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override;
|
||||
|
||||
bool isArray() const override { return true; }
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ static_assert(sizeof(ByamlWriterArray) == 0x30);
|
|||
|
||||
class ByamlWriterHashPair : public sead::ListNode {
|
||||
public:
|
||||
ByamlWriterHashPair(const char*, ByamlWriterData*);
|
||||
ByamlWriterHashPair(const char* key, ByamlWriterData* value);
|
||||
|
||||
const char* getKey() { return mKey; }
|
||||
|
||||
|
|
@ -271,29 +271,29 @@ static_assert(sizeof(ByamlWriterHashPair) == 0x30);
|
|||
|
||||
class ByamlWriterHash : public ByamlWriterContainer {
|
||||
public:
|
||||
ByamlWriterHash(ByamlWriterStringTable*, ByamlWriterStringTable*);
|
||||
ByamlWriterHash(ByamlWriterStringTable* stringTable1, ByamlWriterStringTable* stringTable2);
|
||||
~ByamlWriterHash();
|
||||
|
||||
void deleteData() override; // TODO implementation missing
|
||||
u32 calcPackSize() const override;
|
||||
|
||||
void addData(const char*, ByamlWriterData*); // TODO implementation missing
|
||||
void addBool(const char*, bool) override;
|
||||
void addInt(const char*, s32) override;
|
||||
void addUInt(const char*, u32) override;
|
||||
void addFloat(const char*, f32) override;
|
||||
void addInt64(const char*, s64, ByamlWriterBigDataList*) override;
|
||||
void addUInt64(const char*, u64, ByamlWriterBigDataList*) override;
|
||||
void addDouble(const char*, f64, ByamlWriterBigDataList*) override;
|
||||
void addString(const char*, const char*) override;
|
||||
void addHash(const char*, ByamlWriterHash*) override;
|
||||
void addArray(const char*, ByamlWriterArray*) override;
|
||||
void addNull(const char*) override;
|
||||
void addBool(const char* key, bool value) override;
|
||||
void addInt(const char* key, s32 value) override;
|
||||
void addUInt(const char* key, u32 value) override;
|
||||
void addFloat(const char* key, f32 value) override;
|
||||
void addInt64(const char* key, s64 value, ByamlWriterBigDataList* list) override;
|
||||
void addUInt64(const char* key, u64 value, ByamlWriterBigDataList* list) override;
|
||||
void addDouble(const char* key, f64 value, ByamlWriterBigDataList* list) override;
|
||||
void addString(const char* key, const char* value) override;
|
||||
void addHash(const char* key, ByamlWriterHash* value) override;
|
||||
void addArray(const char* key, ByamlWriterArray* value) override;
|
||||
void addNull(const char* key) override;
|
||||
|
||||
u8 getTypeCode() const override;
|
||||
void writeContainer(sead::WriteStream*) const override; // TODO implementation missing
|
||||
void write(sead::WriteStream*) const override;
|
||||
void print(s32) const override; // TODO implementation missing
|
||||
void write(sead::WriteStream* stream) const override;
|
||||
void print(s32 recursionDepth) const override; // TODO implementation missing
|
||||
|
||||
bool isHash() const override { return true; }
|
||||
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ bool ByamlWriterStringTable::isEmpty() const {
|
|||
return mList.size() == 0;
|
||||
}
|
||||
|
||||
u32 ByamlWriterStringTable::calcIndex(const char* data) const {
|
||||
u32 ByamlWriterStringTable::calcIndex(const char* string) const {
|
||||
s32 i = 0;
|
||||
for (auto& node : mList) {
|
||||
if (!strcmp(data, node))
|
||||
if (!strcmp(string, node))
|
||||
return i;
|
||||
i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ class ByamlWriterStringTable {
|
|||
public:
|
||||
ByamlWriterStringTable();
|
||||
virtual ~ByamlWriterStringTable();
|
||||
const char* tryAdd(const char*);
|
||||
const char* tryAdd(const char* string);
|
||||
u32 calcHeaderSize() const;
|
||||
u32 calcContentSize() const;
|
||||
u32 calcPackSize() const;
|
||||
bool isEmpty() const;
|
||||
u32 calcIndex(const char*) const;
|
||||
void write(sead::WriteStream*) const;
|
||||
u32 calcIndex(const char* string) const;
|
||||
void write(sead::WriteStream* stream) const;
|
||||
void print() const;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class ActionAnimCtrl {
|
|||
public:
|
||||
static ActionAnimCtrl* tryCreate(LiveActor*, const ActorResource*, const char*, const char*);
|
||||
|
||||
ActionAnimCtrl(LiveActor*);
|
||||
ActionAnimCtrl(LiveActor* actor);
|
||||
|
||||
void init(const ActorResource*, const char*, const char*);
|
||||
bool start(const char*);
|
||||
|
|
|
|||
|
|
@ -17,16 +17,16 @@ struct ActionFlagCtrlInfo {
|
|||
|
||||
class ActionFlagCtrl {
|
||||
public:
|
||||
static ActionFlagCtrl* tryCreate(LiveActor*, const char*);
|
||||
static ActionFlagCtrl* tryCreate(LiveActor* actor, const char* name);
|
||||
|
||||
ActionFlagCtrl(LiveActor*, const char*);
|
||||
ActionFlagCtrl(LiveActor* actor, const char* name);
|
||||
|
||||
ActionFlagCtrlInfo* findFlagInfo(const char*) const;
|
||||
ActionFlagCtrlInfo* findFlagInfo(const char* name) const;
|
||||
void initPost();
|
||||
void start(const char*);
|
||||
void start(const char* name);
|
||||
void startCtrlFlag();
|
||||
void startCtrlSensor();
|
||||
void update(f32, f32, f32, bool);
|
||||
void update(f32 frame, f32 frameRate, f32 frameMax, bool isStop);
|
||||
void updateCtrlSensor(f32, f32, f32, bool);
|
||||
bool isFlagValidOn(s32, bool);
|
||||
bool isFlagValidOff(s32, bool);
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ class BgmChangeableParams {
|
|||
public:
|
||||
BgmChangeableParams();
|
||||
|
||||
void operator=(const BgmChangeableParams&);
|
||||
void operator=(const BgmChangeableParams& value);
|
||||
|
||||
void calcPitch(f32);
|
||||
void calcPitch(f32 value);
|
||||
|
||||
private:
|
||||
f32 mVolume = 1.0;
|
||||
|
|
@ -40,8 +40,8 @@ struct BgmUserInfo {
|
|||
|
||||
BgmUserInfo();
|
||||
|
||||
static s32 compareInfo(const BgmUserInfo*, const BgmUserInfo*);
|
||||
static s32 compareInfoByKey(const BgmUserInfo*, const char*);
|
||||
static s32 compareInfo(const BgmUserInfo* info_1, const BgmUserInfo* info_2);
|
||||
static s32 compareInfoByKey(const BgmUserInfo* info, const char* string);
|
||||
|
||||
const char* name = nullptr;
|
||||
AudioInfoListWithParts<BgmActionInfo>* bgmActionInfoList = nullptr;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public:
|
|||
bool isExistArchive(const sead::SafeString& path, sead::FileDevice* device) const;
|
||||
bool isExistDirectory(const sead::SafeString& path, sead::FileDevice* device) const;
|
||||
u32 getFileSize(const sead::SafeString& path, sead::FileDevice* device) const;
|
||||
u8* loadFile(const sead::SafeString&, s32, sead::FileDevice*);
|
||||
u8* loadFile(const sead::SafeString& path, s32 alignment, sead::FileDevice* device);
|
||||
bool tryLoadFileToBuffer(const sead::SafeString& path, u8* buffer, u32 bufferSize,
|
||||
s32 alignment, sead::FileDevice* device);
|
||||
sead::ArchiveRes* loadArchive(const sead::SafeString& path, sead::FileDevice* device);
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
#include "Project/HitSensor/SensorHitGroup.h"
|
||||
|
||||
namespace al {
|
||||
void HitSensor::setFollowPosPtr(const sead::Vector3f* pFollowPos) {
|
||||
mFollowPos = pFollowPos;
|
||||
void HitSensor::setFollowPosPtr(const sead::Vector3f* followPos) {
|
||||
mFollowPos = followPos;
|
||||
mFollowMtx = nullptr;
|
||||
}
|
||||
|
||||
void HitSensor::setFollowMtxPtr(const sead::Matrix34f* pFollowMtx) {
|
||||
mFollowPos = nullptr, mFollowMtx = pFollowMtx;
|
||||
void HitSensor::setFollowMtxPtr(const sead::Matrix34f* followMtx) {
|
||||
mFollowPos = nullptr, mFollowMtx = followMtx;
|
||||
}
|
||||
|
||||
void HitSensor::validate() {
|
||||
|
|
@ -42,10 +42,10 @@ void HitSensor::invalidate() {
|
|||
// HitSensor::invalidateBySystem
|
||||
// HitSensor::update (requires some more LiveActor research)
|
||||
|
||||
void HitSensor::addHitSensor(HitSensor* pSensor) {
|
||||
void HitSensor::addHitSensor(HitSensor* sensor) {
|
||||
// todo -- registers are different
|
||||
if (mSensorCount < mMaxSensorCount) {
|
||||
mSensors[mSensorCount] = pSensor;
|
||||
mSensors[mSensorCount] = sensor;
|
||||
++mSensorCount;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ public:
|
|||
const sead::Matrix34f* followMatrix, const sead::Vector3f& offset);
|
||||
|
||||
bool trySensorSort();
|
||||
void setFollowPosPtr(const sead::Vector3f*);
|
||||
void setFollowMtxPtr(const sead::Matrix34f*);
|
||||
void setFollowPosPtr(const sead::Vector3f* followPos);
|
||||
void setFollowMtxPtr(const sead::Matrix34f* followMtx);
|
||||
void validate();
|
||||
void invalidate();
|
||||
void validateBySystem();
|
||||
void invalidateBySystem();
|
||||
void update();
|
||||
void addHitSensor(HitSensor*);
|
||||
void addHitSensor(HitSensor* sensor);
|
||||
|
||||
void clearSensors() { mSensorCount = 0; }
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ SensorHitGroup::SensorHitGroup(s32 maxSensors, const char* groupName) : mMaxSens
|
|||
mSensors[i] = nullptr;
|
||||
}
|
||||
|
||||
void SensorHitGroup::add(HitSensor* pSensor) {
|
||||
mSensors[mSensorCount] = pSensor;
|
||||
void SensorHitGroup::add(HitSensor* sensor) {
|
||||
mSensors[mSensorCount] = sensor;
|
||||
mSensorCount++;
|
||||
}
|
||||
|
||||
|
|
@ -25,8 +25,8 @@ void SensorHitGroup::remove(HitSensor* sensor) {
|
|||
}
|
||||
}
|
||||
|
||||
HitSensor* SensorHitGroup::getSensor(s32 idx) const {
|
||||
return mSensors[idx];
|
||||
HitSensor* SensorHitGroup::getSensor(s32 index) const {
|
||||
return mSensors[index];
|
||||
}
|
||||
|
||||
void SensorHitGroup::clear() const {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ RollingCubePoseKeeper* createRollingCubePoseKeeper(const sead::BoundBox3f& cubeS
|
|||
const ActorInitInfo& initInfo);
|
||||
bool nextRollingCubeKey(RollingCubePoseKeeper* keeper);
|
||||
void setStartRollingCubeKey(RollingCubePoseKeeper* keeper);
|
||||
void setRollingCubeKeyIndex(RollingCubePoseKeeper* keeper, s32);
|
||||
void setRollingCubeKeyIndex(RollingCubePoseKeeper* keeper, s32 index);
|
||||
bool isMoveTypeLoopRollingCube(const RollingCubePoseKeeper* keeper);
|
||||
void fittingToCurrentKeyBoundingBox(sead::Quatf* outQuat, sead::Vector3f* outTrans,
|
||||
const RollingCubePoseKeeper* keeper);
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ public:
|
|||
f32 calcNearestParam(const sead::Vector3f& pos) const;
|
||||
f32 calcNearestLength(f32* length, const sead::Vector3f& pos, f32 param) const;
|
||||
void calcNearestPos(sead::Vector3f* nearest, const sead::Vector3f& pos) const;
|
||||
void calcStartPos(sead::Vector3f* start) const;
|
||||
void calcEndPos(sead::Vector3f* end) const;
|
||||
void calcStartPos(sead::Vector3f* pos) const;
|
||||
void calcEndPos(sead::Vector3f* pos) const;
|
||||
|
||||
f32 getLength() const { return mDistance; }
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ public:
|
|||
|
||||
// somewhere here at 0xE0: stageName
|
||||
|
||||
unsigned char padding_to_2D0[0x1F8];
|
||||
unsigned char padding_d8[0x1F8];
|
||||
GameDataHolderAccessor* mHolder;
|
||||
unsigned char padding_2F8[0x20];
|
||||
unsigned char padding_2f8[0x20];
|
||||
StageSceneLayout* stageSceneLayout;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ def header_no_offset_comments(c, path):
|
|||
|
||||
def header_lowercase_member_offset_vars(c, path):
|
||||
for line in c.splitlines():
|
||||
if re.search(r"\s(field|gap|filler|pad)?_[0-9a-z]*[A-Z]", line):
|
||||
if re.search(r"\s(field|gap|filler|pad|padding)?_[0-9a-z]*[A-Z]", line) and "," not in line and not line.endswith(");"):
|
||||
CHECK(lambda a: "#define" in a, line, "Characters in the names of offset variables need to be lowercase!", path)
|
||||
|
||||
def header_bool_getter_name_prefix(c, path):
|
||||
|
|
|
|||
Loading…
Reference in a new issue