metaforce/Runtime/Character/CSoundPOINode.cpp

27 lines
955 B
C++
Raw Normal View History

#include "Runtime/Character/CSoundPOINode.hpp"
#include "Runtime/Character/CAnimSourceReader.hpp"
2016-04-11 00:10:28 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
2016-04-11 00:10:28 -07:00
CSoundPOINode::CSoundPOINode()
2018-12-07 21:30:43 -08:00
: CPOINode("root", EPOIType::Sound, CCharAnimTime(), -1, false, 1.f, -1, 0)
, x38_sfxId(0)
, x3c_falloff(0.f)
, x40_maxDist(0.f) {}
2016-04-11 00:10:28 -07:00
CSoundPOINode::CSoundPOINode(CInputStream& in)
: CPOINode(in), x38_sfxId(in.ReadLong()), x3c_falloff(in.ReadFloat()), x40_maxDist(in.ReadFloat()) {}
2016-04-11 00:10:28 -07:00
2018-12-07 21:30:43 -08:00
CSoundPOINode::CSoundPOINode(std::string_view name, EPOIType a, const CCharAnimTime& time, u32 b, bool c, float d,
u32 e, u32 f, u32 sfxId, float falloff, float maxDist)
: CPOINode(name, a, time, b, c, d, e, f), x38_sfxId(sfxId), x3c_falloff(falloff), x40_maxDist(maxDist) {}
2016-04-11 00:10:28 -07:00
2018-12-07 21:30:43 -08:00
CSoundPOINode CSoundPOINode::CopyNodeMinusStartTime(const CSoundPOINode& node, const CCharAnimTime& startTime) {
CSoundPOINode ret = node;
ret.x1c_time -= startTime;
return ret;
2016-04-11 23:15:32 -07:00
}
2021-04-10 01:42:06 -07:00
} // namespace metaforce