2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 17:44:56 +00:00

Fix doors and various area streaming bugs

This commit is contained in:
2018-05-01 17:43:31 -07:00
parent 711c3e0d2c
commit 734b25cad3
35 changed files with 189 additions and 284 deletions

View File

@@ -114,13 +114,13 @@ private:
std::shared_ptr<CTransitionManager> x1fc_transMgr;
float x200_speedScale = 1.f;
u32 x204_charIdx;
s32 x204_charIdx;
u16 x208_defaultAnim;
u32 x20c_passedBoolCount = 0;
u32 x210_passedIntCount = 0;
u32 x214_passedParticleCount = 0;
u32 x218_passedSoundCount = 0;
u32 x21c_particleLightIdx = 0;
s32 x21c_particleLightIdx = 0;
union
{
@@ -251,7 +251,7 @@ public:
u32 GetPassedParticlePOICount() const { return x214_passedParticleCount; }
u32 GetPassedSoundPOICount() const { return x218_passedSoundCount; }
u32 GetCharacterIndex() const { return x204_charIdx; }
s32 GetCharacterIndex() const { return x204_charIdx; }
};
}

View File

@@ -79,7 +79,7 @@ CCharacterInfo::CCharacterInfo(CInputStream& in)
std::vector<CEffectComponent>& comps = x98_effects.back().second;
u32 compCount = in.readUint32Big();
comps.reserve(compCount);
for (u32 j=0 ; j<compCount ; ++i)
for (u32 j=0 ; j<compCount ; ++j)
comps.emplace_back(in);
}
}
@@ -95,7 +95,7 @@ CCharacterInfo::CCharacterInfo(CInputStream& in)
u32 aidxCount = in.readUint32Big();
xb0_animIdxs.reserve(aidxCount);
for (u32 i=0 ; i<aidxCount ; ++i)
xb0_animIdxs.push_back(in.readUint32Big());
xb0_animIdxs.push_back(in.readInt32Big());
}
}

View File

@@ -39,7 +39,7 @@ private:
CAssetId xa8_cmdlOverlay = 0;
CAssetId xac_cskrOverlay = 0;
std::vector<u32> xb0_animIdxs;
std::vector<s32> xb0_animIdxs;
public:
CCharacterInfo(CInputStream& in);
@@ -59,7 +59,7 @@ public:
CAssetId GetIceSkinRulesId() const { return xac_cskrOverlay; }
const CParticleResData& GetParticleResData() const { return x44_partRes; }
u32 GetAnimationIndex(u32 idx) const { return xb0_animIdxs.at(idx); }
s32 GetAnimationIndex(s32 idx) const { return xb0_animIdxs.at(idx); }
const CPASDatabase& GetPASDatabase() const { return x30_pasDatabase; }
};
}

View File

@@ -9,7 +9,7 @@ namespace urde
{
CPOINode::CPOINode(std::string_view name, EPOIType type, const CCharAnimTime& time,
u32 index, bool c, float weight, u32 e, u32 f)
u32 index, bool c, float weight, s32 e, s32 f)
: x4_(1),
x8_name(name),
x18_type(type),
@@ -29,8 +29,8 @@ CPOINode::CPOINode(CInputStream& in)
x24_index(in.readUint32Big()),
x28_(in.readBool()),
x2c_weight(in.readFloatBig()),
x30_charIdx(in.readUint32Big()),
x34_flags(in.readUint32Big())
x30_charIdx(in.readInt32Big()),
x34_flags(in.readInt32Big())
{}
bool CPOINode::operator>(const CPOINode& other) const

View File

@@ -30,11 +30,11 @@ protected:
u32 x24_index;
bool x28_;
float x2c_weight;
u32 x30_charIdx = -1;
u32 x34_flags;
s32 x30_charIdx = -1;
s32 x34_flags;
public:
CPOINode(std::string_view name, EPOIType type, const CCharAnimTime& time,
u32 index, bool, float weight, u32 charIdx, u32 flags);
u32 index, bool, float weight, s32 charIdx, s32 flags);
CPOINode(CInputStream& in);
virtual ~CPOINode() = default;
@@ -44,8 +44,8 @@ public:
EPOIType GetPoiType() const { return x18_type; }
u32 GetIndex() const {return x24_index;}
float GetWeight() const { return x2c_weight; }
u32 GetCharacterIndex() const { return x30_charIdx; }
u32 GetFlags() const { return x34_flags; }
s32 GetCharacterIndex() const { return x30_charIdx; }
s32 GetFlags() const { return x34_flags; }
bool operator>(const CPOINode& other) const;
bool operator<(const CPOINode& other) const;