mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
lint: Member variable names must start with m or s
This commit is contained in:
parent
8b7f94209e
commit
e1b27fed4b
|
|
@ -98,8 +98,8 @@ private:
|
|||
CameraParamTransfer* mParamTransfer;
|
||||
const CameraResourceHolder* mCameraResourceHolder;
|
||||
CameraFlagCtrl* mFlagCtrl;
|
||||
void* customThing;
|
||||
void* unk;
|
||||
CameraInSwitchOnAreaDirector* mInSwitchOnAreaDirector;
|
||||
void* anotherCustomThing;
|
||||
void* unk2;
|
||||
};
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
#include "Library/Yaml/ByamlIter.h"
|
||||
|
||||
struct CameraParam {
|
||||
bool gotMin;
|
||||
bool gotMax;
|
||||
bool mHasMin;
|
||||
bool mHasMax;
|
||||
f32 mMinFovyDegree;
|
||||
f32 mMaxFovyDegree;
|
||||
};
|
||||
|
|
@ -37,16 +37,16 @@ private:
|
|||
CameraParam* mParam;
|
||||
bool mIsValidLookAtOffset;
|
||||
sead::Vector3f mLookAtOffset;
|
||||
sead::Vector3f vVar1;
|
||||
sead::Vector3f unk1;
|
||||
bool mIsValidZoomFovy;
|
||||
f32 mFovyDegree;
|
||||
f32 fVar2;
|
||||
f32 fVar3;
|
||||
f32 unk2;
|
||||
f32 unk3;
|
||||
f32 mMaxZoomOutFovyDegree;
|
||||
bool mIsValidRoll;
|
||||
f32 mRollDegree;
|
||||
f32 mRollTarget;
|
||||
u32 uVar2;
|
||||
bool bVar1;
|
||||
u32 unk4;
|
||||
bool unk5;
|
||||
};
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public:
|
|||
virtual void calcBaseMtx(sead::Matrix34f* mtx) const = 0;
|
||||
|
||||
protected: // protected so it's visible to all sub-classes (TFSV, TFGSV, ...)
|
||||
sead::Vector3f mTrans{0, 0, 0};
|
||||
sead::Vector3f mTrans = {0, 0, 0};
|
||||
|
||||
static sead::Vector3f sDefaultVelocity;
|
||||
};
|
||||
|
|
@ -57,8 +57,8 @@ public:
|
|||
|
||||
protected: // protected so it's visible to all sub-classes (TFGSV, TFUSV)
|
||||
sead::Vector3f mFront = sead::Vector3f::ez;
|
||||
sead::Vector3f mScale{1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mScale = {1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity = {0.0, 0.0, 0.0};
|
||||
};
|
||||
|
||||
class ActorPoseKeeperTFGSV : public ActorPoseKeeperTFSV {
|
||||
|
|
@ -74,7 +74,7 @@ public:
|
|||
void calcBaseMtx(sead::Matrix34f* mtx) const override;
|
||||
|
||||
private:
|
||||
sead::Vector3f mGravity{0.0, -1.0, 0.0};
|
||||
sead::Vector3f mGravity = {0.0, -1.0, 0.0};
|
||||
};
|
||||
|
||||
class ActorPoseKeeperTFUSV : public ActorPoseKeeperTFSV {
|
||||
|
|
@ -112,8 +112,8 @@ public:
|
|||
|
||||
private:
|
||||
sead::Quatf mQuat = sead::Quatf::unit;
|
||||
sead::Vector3f mScale{1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mScale = {1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity = {0.0, 0.0, 0.0};
|
||||
};
|
||||
|
||||
class ActorPoseKeeperTQGSV : public ActorPoseKeeperBase {
|
||||
|
|
@ -136,9 +136,9 @@ public:
|
|||
|
||||
private:
|
||||
sead::Quatf mQuat = sead::Quatf::unit;
|
||||
sead::Vector3f mGravity{0.0, -1.0, 0.0};
|
||||
sead::Vector3f mScale{1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mGravity = {0.0, -1.0, 0.0};
|
||||
sead::Vector3f mScale = {1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity = {0.0, 0.0, 0.0};
|
||||
};
|
||||
|
||||
class ActorPoseKeeperTQGMSV : public ActorPoseKeeperBase {
|
||||
|
|
@ -163,9 +163,9 @@ public:
|
|||
|
||||
private:
|
||||
sead::Quatf mQuat = sead::Quatf::unit;
|
||||
sead::Vector3f mGravity{0.0, -1.0, 0.0};
|
||||
sead::Vector3f mScale{1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mGravity = {0.0, -1.0, 0.0};
|
||||
sead::Vector3f mScale = {1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity = {0.0, 0.0, 0.0};
|
||||
sead::Matrix34f mMtx = sead::Matrix34f::ident;
|
||||
};
|
||||
|
||||
|
|
@ -186,9 +186,9 @@ public:
|
|||
void calcBaseMtx(sead::Matrix34f* mtx) const override;
|
||||
|
||||
private:
|
||||
sead::Vector3f mRotate{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mScale{1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mRotate = {0.0, 0.0, 0.0};
|
||||
sead::Vector3f mScale = {1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity = {0.0, 0.0, 0.0};
|
||||
};
|
||||
|
||||
class ActorPoseKeeperTRMSV : public ActorPoseKeeperBase {
|
||||
|
|
@ -210,9 +210,9 @@ public:
|
|||
void calcBaseMtx(sead::Matrix34f* mtx) const override;
|
||||
|
||||
private:
|
||||
sead::Vector3f mRotate{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mScale{1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mRotate = {0.0, 0.0, 0.0};
|
||||
sead::Vector3f mScale = {1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity = {0.0, 0.0, 0.0};
|
||||
sead::Matrix34f mMtx; // manually set in the ctor
|
||||
};
|
||||
|
||||
|
|
@ -237,10 +237,10 @@ public:
|
|||
void calcBaseMtx(sead::Matrix34f* mtx) const override;
|
||||
|
||||
private:
|
||||
sead::Vector3f mRotate{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mGravity{0.0, -1.0, 0.0};
|
||||
sead::Vector3f mScale{1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity{0.0, 0.0, 0.0};
|
||||
sead::Vector3f mRotate = {0.0, 0.0, 0.0};
|
||||
sead::Vector3f mGravity = {0.0, -1.0, 0.0};
|
||||
sead::Vector3f mScale = {1.0, 1.0, 1.0};
|
||||
sead::Vector3f mVelocity = {0.0, 0.0, 0.0};
|
||||
sead::Matrix34f mMtx;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ private:
|
|||
f32 mAbsorbScreenPosDown;
|
||||
bool mAdvanceAbsorbUp;
|
||||
f32 mAdvanceAbsorbScreenPosUp;
|
||||
bool isExistCollisionUnderTarget;
|
||||
bool mIsExistCollisionUnderTarget;
|
||||
sead::Vector3f mUnderTargetCollisionPos;
|
||||
sead::Vector3f mUnderTargetCollisionNormal;
|
||||
f32 mLerp2;
|
||||
|
|
@ -54,11 +54,11 @@ private:
|
|||
sead::Vector3f mPrevTargetTrans;
|
||||
sead::Vector3f mTargetFront;
|
||||
sead::Vector3f mPrevTargetFront;
|
||||
bool isNoCameraPosAbsorb;
|
||||
bool isInvalidated;
|
||||
bool unusedBool;
|
||||
bool isStopUpdate;
|
||||
bool isKeepInFrame;
|
||||
bool mIsNoCameraPosAbsorb;
|
||||
bool mIsInvalidated;
|
||||
bool mUnusedBool;
|
||||
bool mIsStopUpdate;
|
||||
bool mIsKeepInFrame;
|
||||
};
|
||||
static_assert(sizeof(CameraVerticalAbsorber) == 0x1B0);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ private:
|
|||
RailPart* mRailPart = nullptr;
|
||||
s32 mRailPartCount = 0;
|
||||
s32 mRailPointsCount = 0;
|
||||
bool isClosed = false;
|
||||
bool mIsClosed = false;
|
||||
};
|
||||
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public:
|
|||
|
||||
private:
|
||||
LiveActor* mLiveActor;
|
||||
sead::Vector3f lightDir;
|
||||
sead::Vector3f mLightDir;
|
||||
bool mIsAppendSubActor;
|
||||
sead::PtrArray<DepthShadowMapInfo> mDepthShadowMaps;
|
||||
sead::PtrArray<ModelDrawerDepthShadowMap> mModelDrawerDepthShadowMaps;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
private:
|
||||
const u8* mData;
|
||||
bool isRev;
|
||||
bool mIsRev;
|
||||
};
|
||||
|
||||
class ByamlArrayIter {
|
||||
|
|
@ -84,6 +84,6 @@ public:
|
|||
|
||||
private:
|
||||
const u8* mData;
|
||||
bool isRev;
|
||||
bool mIsRev;
|
||||
};
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public:
|
|||
|
||||
private:
|
||||
const u8* mData = nullptr;
|
||||
bool isRev = false;
|
||||
bool mIsRev = false;
|
||||
};
|
||||
} // namespace al
|
||||
|
||||
|
|
|
|||
|
|
@ -224,8 +224,8 @@ public:
|
|||
ByamlWriterData* getValue() { return mValue; }
|
||||
|
||||
private:
|
||||
void* selfReference = this;
|
||||
void* test2 = nullptr;
|
||||
void* mSelfReference = this;
|
||||
void* unk = nullptr;
|
||||
const char* mKey;
|
||||
ByamlWriterData* mValue;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ private:
|
|||
inline void allocArray();
|
||||
inline void putEntry(s32 index, const ByamlIter& iter);
|
||||
|
||||
Entry* array;
|
||||
s32 size;
|
||||
Entry* mArray;
|
||||
s32 mSize;
|
||||
};
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ void SnapShotCameraCtrl::load(ByamlIter const& iter) {
|
|||
if (!tryGetByamlIterByKey(¶m, iter, "SnapShotParam"))
|
||||
return;
|
||||
if (tryGetByamlF32(&mParam->mMinFovyDegree, param, "MinFovyDegree"))
|
||||
mParam->gotMin = true;
|
||||
mParam->mHasMin = true;
|
||||
if (tryGetByamlF32(&mParam->mMinFovyDegree, param, "MinFovyDegree"))
|
||||
mParam->gotMax = true;
|
||||
mParam->mHasMax = true;
|
||||
}
|
||||
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void CameraVerticalAbsorber::exeFollowAbsolute() {
|
|||
}
|
||||
|
||||
void CameraVerticalAbsorber::invalidate() {
|
||||
isInvalidated = true;
|
||||
mIsInvalidated = true;
|
||||
if (!isNerve(this, &NrvCameraVerticalAbsorber.FollowAbsolute))
|
||||
setNerve(this, &NrvCameraVerticalAbsorber.FollowAbsolute);
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ void CameraVerticalAbsorber::start(const sead::Vector3f& pos, const CameraStartI
|
|||
|
||||
mPrevTargetTrans = pos;
|
||||
|
||||
if (unusedBool || isInvalidated ||
|
||||
if (mUnusedBool || mIsInvalidated ||
|
||||
alCameraPoserFunction::isPlayerTypeNotTouchGround(mCameraPoser))
|
||||
return setNerve(this, &NrvCameraVerticalAbsorber.FollowAbsolute);
|
||||
if (alCameraPoserFunction::isTargetClimbPole(mCameraPoser))
|
||||
|
|
@ -91,7 +91,7 @@ void CameraVerticalAbsorber::load(const ByamlIter& data) {
|
|||
|
||||
// NON_MATCHING
|
||||
void CameraVerticalAbsorber::update() {
|
||||
if (isStopUpdate)
|
||||
if (mIsStopUpdate)
|
||||
return;
|
||||
sead::Vector3f gravity{};
|
||||
alCameraPoserFunction::calcTargetGravity(&gravity, mCameraPoser);
|
||||
|
|
@ -102,9 +102,9 @@ void CameraVerticalAbsorber::update() {
|
|||
mLookAtCamera.getUp() = mCameraPoser->getCameraUp();
|
||||
if (mLookAtCamera.getUp().length() > 0.f)
|
||||
mLookAtCamera.getUp().normalize();
|
||||
if (!unusedBool && !isInvalidated) {
|
||||
if (!mUnusedBool && !mIsInvalidated) {
|
||||
mLookAtCamera.getAt() -= mTargetInterp;
|
||||
if (!isNoCameraPosAbsorb) {
|
||||
if (!mIsNoCameraPosAbsorb) {
|
||||
mLookAtCamera.getPos() -= mTargetInterp;
|
||||
}
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ void CameraVerticalAbsorber::update() {
|
|||
}
|
||||
updateNerve();
|
||||
sead::Vector3f prevTargetTrans = sead::Vector3f::zero;
|
||||
if (!isKeepInFrame) {
|
||||
if (!mIsKeepInFrame) {
|
||||
prevTargetTrans = mTargetInterp;
|
||||
} else {
|
||||
sead::Vector3f offsetTrans = sead::Vector3f::zero;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ namespace al {
|
|||
Rail::Rail() = default;
|
||||
// NON_MATCHING: mismatch during `mRailPart`-array creation
|
||||
void Rail::init(const PlacementInfo& info) {
|
||||
isClosed = false;
|
||||
tryGetArg(&isClosed, info, "IsClosed");
|
||||
mIsClosed = false;
|
||||
tryGetArg(&mIsClosed, info, "IsClosed");
|
||||
PlacementInfo railPointsInfo;
|
||||
tryGetPlacementInfoByKey(&railPointsInfo, info, "RailPoints");
|
||||
mRailPointsCount = getCountPlacementInfo(railPointsInfo);
|
||||
|
|
@ -35,7 +35,7 @@ void Rail::init(const PlacementInfo& info) {
|
|||
return;
|
||||
}
|
||||
|
||||
mRailPartCount = (isClosed ? 1 : 0) + mRailPointsCount - 1;
|
||||
mRailPartCount = (mIsClosed ? 1 : 0) + mRailPointsCount - 1;
|
||||
mRailPart = new RailPart[mRailPartCount];
|
||||
|
||||
f32 totalLength = 0;
|
||||
|
|
@ -116,7 +116,7 @@ f32 Rail::getLengthToPoint(s32 index) const {
|
|||
return mRailPart[index - 1].getTotalDistance();
|
||||
}
|
||||
void Rail::calcRailPointPos(sead::Vector3f* pos, s32 index) const {
|
||||
if (isClosed || index != mRailPointsCount - 1)
|
||||
if (mIsClosed || index != mRailPointsCount - 1)
|
||||
return mRailPart[index].calcStartPos(pos);
|
||||
|
||||
return mRailPart[index - 1].calcEndPos(pos);
|
||||
|
|
@ -178,7 +178,7 @@ void Rail::calcNearestRailPointPos(sead::Vector3f* rail_pos, const sead::Vector3
|
|||
}
|
||||
}
|
||||
f32 Rail::normalizeLength(f32 distance) const {
|
||||
if (isClosed) {
|
||||
if (mIsClosed) {
|
||||
f32 distanceOnRail = modf(distance, getTotalLength());
|
||||
if (distanceOnRail < 0.0)
|
||||
distanceOnRail += getTotalLength();
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ s32 ByamlHashPair::getValue(bool isRev) const {
|
|||
return isRev ? bswap_32(mValue) : mValue;
|
||||
}
|
||||
|
||||
ByamlHashIter::ByamlHashIter(const u8* data, bool isRev_) : mData(data), isRev(isRev_) {}
|
||||
ByamlHashIter::ByamlHashIter() : mData(nullptr), isRev(false) {}
|
||||
ByamlHashIter::ByamlHashIter(const u8* data, bool isRev_) : mData(data), mIsRev(isRev_) {}
|
||||
ByamlHashIter::ByamlHashIter() : mData(nullptr), mIsRev(false) {}
|
||||
|
||||
const ByamlHashPair* ByamlHashIter::findPair(s32 key) const {
|
||||
const ByamlHashPair* pairTable = getPairTable();
|
||||
|
|
@ -50,7 +50,7 @@ const ByamlHashPair* ByamlHashIter::findPair(s32 key) const {
|
|||
while (lowerBound < upperBound) {
|
||||
s32 avg = (lowerBound + upperBound) / 2;
|
||||
const ByamlHashPair* pair = &pairTable[avg];
|
||||
s32 result = key - pair->getKey(isRev);
|
||||
s32 result = key - pair->getKey(mIsRev);
|
||||
if (result == 0) {
|
||||
return pair;
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ bool ByamlHashIter::getDataByIndex(ByamlData* data, s32 index) const {
|
|||
if (((s32)getSize()) < 1)
|
||||
return false;
|
||||
|
||||
data->set(&getPairTable()[index], isRev);
|
||||
data->set(&getPairTable()[index], mIsRev);
|
||||
return true;
|
||||
}
|
||||
// NON_MATCHING: minor additional instructions, probably not inlined
|
||||
|
|
@ -91,7 +91,7 @@ bool ByamlHashIter::getDataByKey(ByamlData* data, s32 key) const {
|
|||
while (true) {
|
||||
s32 avg = (lowerBound + upperBound) / 2;
|
||||
pair = &pairTable[avg];
|
||||
s32 result = key - pair->getKey(isRev);
|
||||
s32 result = key - pair->getKey(mIsRev);
|
||||
if (result == 0) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ bool ByamlHashIter::getDataByKey(ByamlData* data, s32 key) const {
|
|||
}
|
||||
if (pair == nullptr)
|
||||
return false;
|
||||
data->set(pair, isRev);
|
||||
data->set(pair, mIsRev);
|
||||
return true;
|
||||
}
|
||||
const u8* ByamlHashIter::getOffsetData(u32 off) const {
|
||||
|
|
@ -128,11 +128,11 @@ u32 ByamlHashIter::getSize() const {
|
|||
if (!mData)
|
||||
return 0;
|
||||
u32 val = *reinterpret_cast<const u32*>(mData);
|
||||
return isRev ? bswap_24(val >> 8) : val >> 8;
|
||||
return mIsRev ? bswap_24(val >> 8) : val >> 8;
|
||||
}
|
||||
|
||||
ByamlArrayIter::ByamlArrayIter(const u8* data, bool isRev_) : mData(data), isRev(isRev_) {}
|
||||
ByamlArrayIter::ByamlArrayIter() : mData(nullptr), isRev(false) {}
|
||||
ByamlArrayIter::ByamlArrayIter(const u8* data, bool isRev_) : mData(data), mIsRev(isRev_) {}
|
||||
ByamlArrayIter::ByamlArrayIter() : mData(nullptr), mIsRev(false) {}
|
||||
|
||||
bool ByamlArrayIter::getDataByIndex(ByamlData* data, s32 index) const {
|
||||
if (index < 0)
|
||||
|
|
@ -140,7 +140,7 @@ bool ByamlArrayIter::getDataByIndex(ByamlData* data, s32 index) const {
|
|||
if (((s32)getSize()) <= index)
|
||||
return false;
|
||||
|
||||
data->set(getTypeTable()[index], getDataTable()[index], isRev);
|
||||
data->set(getTypeTable()[index], getDataTable()[index], mIsRev);
|
||||
return true;
|
||||
}
|
||||
// NON_MATCHING: regalloc
|
||||
|
|
@ -152,7 +152,7 @@ const u8* ByamlArrayIter::getOffsetData(u32 off) const {
|
|||
}
|
||||
u32 ByamlArrayIter::getSize() const {
|
||||
u32 val = *reinterpret_cast<const u32*>(mData);
|
||||
return isRev ? bswap_24(val >> 8) : val >> 8;
|
||||
return mIsRev ? bswap_24(val >> 8) : val >> 8;
|
||||
}
|
||||
const u8* ByamlArrayIter::getTypeTable() const {
|
||||
return mData + 4;
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@ u32 ByamlHeader::getDataOffset() const {
|
|||
ByamlStringTableIter::ByamlStringTableIter() = default;
|
||||
|
||||
ByamlStringTableIter::ByamlStringTableIter(const u8* data, bool isRev)
|
||||
: mData(data), isRev(isRev) {}
|
||||
: mData(data), mIsRev(isRev) {}
|
||||
|
||||
s32 ByamlStringTableIter::getSize() const {
|
||||
u32 type_and_size = *reinterpret_cast<const u32*>(mData);
|
||||
return isRev ? bswap_24(type_and_size >> 8) : type_and_size >> 8;
|
||||
return mIsRev ? bswap_24(type_and_size >> 8) : type_and_size >> 8;
|
||||
}
|
||||
|
||||
const u32* ByamlStringTableIter::getAddressTable() const {
|
||||
|
|
@ -52,7 +52,7 @@ const u32* ByamlStringTableIter::getAddressTable() const {
|
|||
}
|
||||
|
||||
u32 ByamlStringTableIter::getStringAddress(s32 idx) const {
|
||||
if (isRev)
|
||||
if (mIsRev)
|
||||
return bswap_32(getAddressTable()[idx]);
|
||||
|
||||
return getAddressTable()[idx];
|
||||
|
|
@ -61,7 +61,7 @@ u32 ByamlStringTableIter::getStringAddress(s32 idx) const {
|
|||
// NON_MATCHING: regalloc
|
||||
u32 ByamlStringTableIter::getEndAddress() const {
|
||||
u32 val = getAddressTable()[getSize()];
|
||||
return isRev ? bswap_32(val) : val;
|
||||
return mIsRev ? bswap_32(val) : val;
|
||||
}
|
||||
const char* ByamlStringTableIter::getString(s32 index) const {
|
||||
return reinterpret_cast<const char*>(&mData[getStringAddress(index)]);
|
||||
|
|
|
|||
|
|
@ -7,29 +7,29 @@ ActorScoreKeeper::ActorScoreKeeper() = default;
|
|||
|
||||
void ActorScoreKeeper::init(const ByamlIter& iter) {
|
||||
if (iter.isTypeArray()) {
|
||||
size = iter.getSize();
|
||||
mSize = iter.getSize();
|
||||
allocArray();
|
||||
for (s32 i = 0; i < size; i++) {
|
||||
for (s32 i = 0; i < mSize; i++) {
|
||||
ByamlIter subIter;
|
||||
iter.tryGetIterByIndex(&subIter, i);
|
||||
putEntry(i, subIter);
|
||||
}
|
||||
} else {
|
||||
size = 1;
|
||||
mSize = 1;
|
||||
allocArray();
|
||||
putEntry(0, iter);
|
||||
}
|
||||
}
|
||||
|
||||
inline void ActorScoreKeeper::allocArray() {
|
||||
Entry* local_array = new Entry[size];
|
||||
if (size)
|
||||
memset(local_array, 0, sizeof(Entry) * size);
|
||||
array = local_array;
|
||||
Entry* local_array = new Entry[mSize];
|
||||
if (mSize)
|
||||
memset(local_array, 0, sizeof(Entry) * mSize);
|
||||
mArray = local_array;
|
||||
}
|
||||
|
||||
inline void ActorScoreKeeper::putEntry(s32 index, const ByamlIter& iter) {
|
||||
auto& entry = array[index];
|
||||
auto& entry = mArray[index];
|
||||
iter.tryGetStringByKey(&entry.factorName, "FactorName");
|
||||
iter.tryGetStringByKey(&entry.categoryName, "CategoryName");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ void AchievementInfoReader::init() { // TODO minor mismatches during loop
|
|||
al::ByamlIter achievementInfoArray;
|
||||
if (achievementInfo.tryGetIterByKey(&achievementInfoArray, "AchievementInfoArray")) {
|
||||
auto size = achievementInfoArray.getSize();
|
||||
array.allocBuffer(size, nullptr);
|
||||
mAchievements.allocBuffer(size, nullptr);
|
||||
|
||||
for (u32 i = 0; i < size; i++) {
|
||||
al::ByamlIter iter;
|
||||
|
|
@ -32,15 +32,15 @@ void AchievementInfoReader::init() { // TODO minor mismatches during loop
|
|||
s32 level = -1;
|
||||
iter.tryGetIntByKey(&level, "Level");
|
||||
|
||||
array.pushBack(new AchievementInfo(name, num, level, note));
|
||||
mAchievements.pushBack(new AchievementInfo(name, num, level, note));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 AchievementInfoReader::tryFindIndexByName(const char* name) const {
|
||||
for (s32 i = 0; i < array.size(); i++) {
|
||||
if (al::isEqualString(name, array[i]->mName))
|
||||
for (s32 i = 0; i < mAchievements.size(); i++) {
|
||||
if (al::isEqualString(name, mAchievements[i]->mName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ public:
|
|||
void init();
|
||||
s32 tryFindIndexByName(const char*) const;
|
||||
|
||||
AchievementInfo* get(s32 index) { return array[index]; }
|
||||
s32 size() { return array.size(); }
|
||||
s32 capacity() { return array.capacity(); }
|
||||
AchievementInfo* get(s32 index) { return mAchievements[index]; }
|
||||
s32 size() { return mAchievements.size(); }
|
||||
s32 capacity() { return mAchievements.capacity(); }
|
||||
|
||||
private:
|
||||
sead::PtrArray<AchievementInfo> array;
|
||||
sead::PtrArray<AchievementInfo> mAchievements;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ public:
|
|||
|
||||
private:
|
||||
char padding[0x68];
|
||||
al::LiveActor* currentHackActor;
|
||||
al::LiveActor* mCurrentHackActor;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -85,6 +85,6 @@ private:
|
|||
s32 _88;
|
||||
void* gap2[1];
|
||||
bool mDisableInput;
|
||||
void* fillToSize[20];
|
||||
void* gap3[20];
|
||||
};
|
||||
static_assert(sizeof(PlayerInput) == 0x140);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ void PlayerModelHolder::registerModel(al::LiveActor* liveActor, const char* name
|
|||
void PlayerModelHolder::changeModel(const char* name) {
|
||||
for (auto it = mBuffer.begin(), end = mBuffer.end(); it != end; ++it) {
|
||||
if (al::isEqualString(it->mName, sead::SafeString(name))) {
|
||||
currentModel = &*it;
|
||||
mCurrentModel = &*it;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ al::LiveActor* PlayerModelHolder::findModelActor(const char* name) const {
|
|||
return it->mLiveActor;
|
||||
}
|
||||
}
|
||||
return currentModel->mLiveActor;
|
||||
return mCurrentModel->mLiveActor;
|
||||
}
|
||||
|
||||
al::LiveActor* PlayerModelHolder::tryFindModelActor(const char* name) const {
|
||||
|
|
@ -38,9 +38,9 @@ al::LiveActor* PlayerModelHolder::tryFindModelActor(const char* name) const {
|
|||
}
|
||||
|
||||
bool PlayerModelHolder::isCurrentModelLabel(const char* name) const {
|
||||
return al::isEqualString(currentModel->mName.cstr(), name);
|
||||
return al::isEqualString(mCurrentModel->mName.cstr(), name);
|
||||
}
|
||||
|
||||
bool PlayerModelHolder::isCurrentModelLabelSubString(const char* name) const {
|
||||
return al::isEqualSubString(currentModel->mName.cstr(), name);
|
||||
return al::isEqualSubString(mCurrentModel->mName.cstr(), name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@ public:
|
|||
|
||||
private:
|
||||
sead::PtrArray<Entry> mBuffer;
|
||||
Entry* currentModel = nullptr;
|
||||
Entry* mCurrentModel = nullptr;
|
||||
sead::FixedSafeString<128> _10 = sead::FixedSafeString<128>("");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -63,5 +63,5 @@ private:
|
|||
unsigned char padding_6A8[0x6A8];
|
||||
GameProgressData* mGameProgressData;
|
||||
char padding_9F0[0x340];
|
||||
s32 curWorldId;
|
||||
s32 mCurWorldId;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@
|
|||
#include "Util/IUseDimension.h"
|
||||
|
||||
void ActorDimensionKeeper::validate() {
|
||||
isValid = true;
|
||||
mIsValid = true;
|
||||
}
|
||||
|
||||
void ActorDimensionKeeper::invalidate() {
|
||||
isValid = false;
|
||||
mIsValid = false;
|
||||
|
||||
if (is2D) {
|
||||
is2D = false;
|
||||
isIn2DArea = false;
|
||||
isCurrently2D = false;
|
||||
isCanChange3D = true;
|
||||
if (mIs2D) {
|
||||
mIs2D = false;
|
||||
mIsIn2DArea = false;
|
||||
mIsCurrently2D = false;
|
||||
mIsCanChange3D = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,20 +17,20 @@ public:
|
|||
void forceEndChange2DKeep();
|
||||
bool update();
|
||||
|
||||
bool getIs2D() const { return is2D; }
|
||||
bool getIsIn2DArea() const { return isIn2DArea; }
|
||||
bool getIsCurrently2D() const { return isCurrently2D; }
|
||||
bool getIsCanChange2D() const { return isCanChange2D; }
|
||||
bool getIsCanChange3D() const { return isCanChange3D; }
|
||||
bool getIs2D() const { return mIs2D; }
|
||||
bool getIsIn2DArea() const { return mIsIn2DArea; }
|
||||
bool getIsCurrently2D() const { return mIsCurrently2D; }
|
||||
bool getIsCanChange2D() const { return mIsCanChange2D; }
|
||||
bool getIsCanChange3D() const { return mIsCanChange3D; }
|
||||
|
||||
private:
|
||||
const al::LiveActor* mLiveActor;
|
||||
bool isValid = true;
|
||||
bool is2D = false;
|
||||
bool isIn2DArea = false;
|
||||
bool isCurrently2D = false;
|
||||
bool isCanChange2D = false;
|
||||
bool isCanChange3D = false;
|
||||
bool mIsValid = true;
|
||||
bool mIs2D = false;
|
||||
bool mIsIn2DArea = false;
|
||||
bool mIsCurrently2D = false;
|
||||
bool mIsCanChange2D = false;
|
||||
bool mIsCanChange3D = false;
|
||||
In2DAreaMoveControl* mIn2DAreaMoveControl = nullptr;
|
||||
};
|
||||
static_assert(sizeof(ActorDimensionKeeper) == 0x18);
|
||||
|
|
|
|||
|
|
@ -209,6 +209,8 @@ def header_sorted_visibility(c, path):
|
|||
if line in visibilities_ordered:
|
||||
i = visibilities_ordered.index(line)
|
||||
if CHECK(lambda a:i>nest_level[-1], line, "Wrong order of visibilities: Must be public, protected, private!", path): return
|
||||
if nest_level[-1] == -2: # outside of class, only seen in SubActorKeeper.h in a macro definition - ignore then
|
||||
continue
|
||||
nest_level[-1] = i
|
||||
continue
|
||||
elif "{" in line:
|
||||
|
|
@ -245,6 +247,30 @@ def header_check_line(line, path, visibility, should_start_class):
|
|||
if "(" in line: # function
|
||||
function_name = line.split("(")[-2].split(" ")[-1]
|
||||
CHECK(lambda a:not function_name.endswith("_"), line, "Functions ending with an underscore are either protected or private!", path)
|
||||
elif visibility == 2: # private
|
||||
if line == "};" or line == "" or line == "union {" or line.startswith("struct"): return
|
||||
if "(" in line and ")" in line: return
|
||||
newline = line
|
||||
if "=" in line:
|
||||
newline = line.split("=")[0].strip()
|
||||
elif line.endswith(";"):
|
||||
newline = line.split(";")[0].strip()
|
||||
else:
|
||||
FAIL("Unknown private line!", line, path)
|
||||
|
||||
if newline.endswith("]"):
|
||||
newline = newline.split("[")[0].strip()
|
||||
|
||||
var_name = newline.split(" ")[-1]
|
||||
var_type = " ".join(newline.split(" ")[0:-1])
|
||||
|
||||
PREFIXES = ["padding", "field", "unk", "gap", "_", "filler"]
|
||||
|
||||
if var_type.startswith("static"):
|
||||
CHECK(lambda a:var_name.startswith("s") and var_name[1].isupper(), line, "Static member variables must be prefixed with `s`!", path)
|
||||
else:
|
||||
allowed_name = (var_name.startswith("m") and var_name[1].isupper()) or any([var_name.startswith(p) for p in PREFIXES])
|
||||
CHECK(lambda a:allowed_name, line, "Member variables must be prefixed with `m`!", path)
|
||||
|
||||
def header_no_offset_comments(c, path):
|
||||
for line in c.splitlines():
|
||||
|
|
|
|||
Loading…
Reference in a new issue