Symbol correct function/variable names

This commit is contained in:
Phillip Stephens 2016-04-27 21:52:41 -07:00
parent c55db47941
commit 0df9ffd56d
9 changed files with 28 additions and 15 deletions

View File

@ -40,7 +40,7 @@ struct EVNT : BigYAML
CharAnimTime animTime; CharAnimTime animTime;
Value<atUint32> idx; Value<atUint32> idx;
Value<bool> unk2; Value<bool> unk2;
Value<float> unk3; Value<float> weight;
Value<atUint32> unk4; Value<atUint32> unk4;
Value<atUint32> unk5; Value<atUint32> unk5;
}; };

View File

@ -2,6 +2,7 @@
namespace urde namespace urde
{ {
std::vector<s16>* CSfxManager::mpSfxTranslationTable = nullptr;
void CSfxManager::AddListener(ESfxChannels, void CSfxManager::AddListener(ESfxChannels,
const zeus::CVector3f& vec1, const zeus::CVector3f& vec2, const zeus::CVector3f& vec1, const zeus::CVector3f& vec2,
@ -16,8 +17,19 @@ void CSfxManager::UpdateListener(const zeus::CVector3f& pos, const zeus::CVector
{ {
} }
u16 CSfxManager::TranslateSFXID(u16) u16 CSfxManager::TranslateSFXID(u16 id)
{ {
if (mpSfxTranslationTable)
return 0;
u16 index = id & 0xFFFF;
if (index >= mpSfxTranslationTable->size())
return 0;
s16 ret = mpSfxTranslationTable->at(index);
if (ret == -1)
return 0;
return ret & 0xFFFF;
} }
} }

View File

@ -12,6 +12,7 @@ namespace urde
class CSfxManager class CSfxManager
{ {
static std::vector<s16>* mpSfxTranslationTable;
public: public:
enum class ESfxChannels enum class ESfxChannels
{ {
@ -118,7 +119,6 @@ public:
static rstl::reserved_vector<CSfxWrapper, 128> m_wrapperPool; static rstl::reserved_vector<CSfxWrapper, 128> m_wrapperPool;
static ESfxChannels m_currentChannel; static ESfxChannels m_currentChannel;
static bool m_doUpdate; static bool m_doUpdate;
static void* m_sfxTranslationTable;
static void* m_usedSounds; static void* m_usedSounds;
static bool m_muted; static bool m_muted;
static bool m_auxProcessingEnabled; static bool m_auxProcessingEnabled;

View File

@ -46,7 +46,7 @@ CAnimSourceReaderBase::GetUniqueParticlePOIs() const
const std::vector<CParticlePOINode>& particleNodes = x4_sourceInfo->GetParticlePOIStream(); const std::vector<CParticlePOINode>& particleNodes = x4_sourceInfo->GetParticlePOIStream();
std::map<std::string, CParticleData::EParentedMode> ret; std::map<std::string, CParticleData::EParentedMode> ret;
for (const CParticlePOINode& node : particleNodes) for (const CParticlePOINode& node : particleNodes)
ret[node.GetName()] = node.GetData().GetParentedMode(); ret[node.GetName()] = node.GetParticleData().GetParentedMode();
return ret; return ret;
} }
@ -148,7 +148,7 @@ void CAnimSourceReaderBase::UpdatePOIStates()
if (node.GetTime() > xc_curTime) if (node.GetTime() > xc_curTime)
break; break;
if (node.GetIndex() != -1) if (node.GetIndex() != -1)
x44_particleStates[node.GetIndex()].second = node.GetData().GetParentedMode(); x44_particleStates[node.GetIndex()].second = node.GetParticleData().GetParentedMode();
++x1c_passedParticleCount; ++x1c_passedParticleCount;
} }

View File

@ -5,10 +5,10 @@ namespace urde
{ {
CInt32POINode::CInt32POINode() CInt32POINode::CInt32POINode()
: CPOINode("root", 2, CCharAnimTime(), -1, false, 1.f, -1, 0), x38_val(0), x3c_boneName("root") {} : CPOINode("root", 2, CCharAnimTime(), -1, false, 1.f, -1, 0), x38_val(0), x3c_locatorName("root") {}
CInt32POINode::CInt32POINode(CInputStream& in) CInt32POINode::CInt32POINode(CInputStream& in)
: CPOINode(in), x38_val(in.readUint32Big()), x3c_boneName(in.readString()) {} : CPOINode(in), x38_val(in.readUint32Big()), x3c_locatorName(in.readString()) {}
CInt32POINode CInt32POINode::CopyNodeMinusStartTime(const CInt32POINode& node, CInt32POINode CInt32POINode::CopyNodeMinusStartTime(const CInt32POINode& node,
const CCharAnimTime& startTime) const CCharAnimTime& startTime)

View File

@ -10,12 +10,12 @@ class IAnimSourceInfo;
class CInt32POINode : public CPOINode class CInt32POINode : public CPOINode
{ {
s32 x38_val; s32 x38_val;
std::string x3c_boneName; std::string x3c_locatorName;
public: public:
CInt32POINode(); CInt32POINode();
CInt32POINode(CInputStream& in); CInt32POINode(CInputStream& in);
s32 GetValue() const {return x38_val;} s32 GetValue() const {return x38_val;}
const std::string& GetBoneName() const {return x3c_boneName;} const std::string& GetLocatorName() const {return x3c_locatorName;}
static u32 _getPOIList(const CCharAnimTime& time, static u32 _getPOIList(const CCharAnimTime& time,
CInt32POINode* listOut, CInt32POINode* listOut,

View File

@ -4,14 +4,14 @@ namespace urde
{ {
CPOINode::CPOINode(const std::string& name, u16 a, const CCharAnimTime& time, CPOINode::CPOINode(const std::string& name, u16 a, const CCharAnimTime& time,
u32 index, bool c, float d, u32 e, u32 f) u32 index, bool c, float weight, u32 e, u32 f)
: x4_(1), : x4_(1),
x8_name(name), x8_name(name),
x18_(a), x18_(a),
x1c_time(time), x1c_time(time),
x24_index(index), x24_index(index),
x28_(c), x28_(c),
x2c_(d), x2c_weight(weight),
x30_(e), x30_(e),
x34_(f) x34_(f)
{} {}
@ -23,7 +23,7 @@ CPOINode::CPOINode(CInputStream& in)
x1c_time(in), x1c_time(in),
x24_index(in.readUint32Big()), x24_index(in.readUint32Big()),
x28_(in.readBool()), x28_(in.readBool()),
x2c_(in.readFloatBig()), x2c_weight(in.readFloatBig()),
x30_(in.readUint32Big()), x30_(in.readUint32Big()),
x34_(in.readUint32Big()) x34_(in.readUint32Big())
{} {}

View File

@ -16,17 +16,18 @@ protected:
CCharAnimTime x1c_time; CCharAnimTime x1c_time;
u32 x24_index; u32 x24_index;
bool x28_; bool x28_;
float x2c_; float x2c_weight;
u32 x30_; u32 x30_;
u32 x34_; u32 x34_;
public: public:
CPOINode(const std::string& name, u16, const CCharAnimTime& time, u32 index, bool, float, u32, u32); CPOINode(const std::string& name, u16, const CCharAnimTime& time, u32 index, bool, float weight, u32, u32);
CPOINode(CInputStream& in); CPOINode(CInputStream& in);
virtual ~CPOINode() = default; virtual ~CPOINode() = default;
const std::string& GetName() const {return x8_name;} const std::string& GetName() const {return x8_name;}
const CCharAnimTime& GetTime() const {return x1c_time;} const CCharAnimTime& GetTime() const {return x1c_time;}
u32 GetIndex() const {return x24_index;} u32 GetIndex() const {return x24_index;}
float GetWeight() const { return x2c_weight; }
}; };
} }

View File

@ -14,7 +14,7 @@ class CParticlePOINode : public CPOINode
public: public:
CParticlePOINode(); CParticlePOINode();
CParticlePOINode(CInputStream& in); CParticlePOINode(CInputStream& in);
const CParticleData& GetData() const {return x38_data;} const CParticleData& GetParticleData() const {return x38_data;}
static u32 _getPOIList(const CCharAnimTime& time, static u32 _getPOIList(const CCharAnimTime& time,
CParticlePOINode* listOut, CParticlePOINode* listOut,