SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
XanimeCore.cpp
1#include "Game/Animation/XanimeCore.hpp"
2
3void XanimeTrack::init() {
4 _0 = 0;
5 mWeight = 0.0f;
6 _C = 0;
7 _8 = 0.0f;
8}
9
10XjointInfo::XjointInfo() {
11 _0._0.set(1.0f, 1.0f, 1.0f);
12 _0._C.x = 0.0f;
13 _0._C.y = 0.0f;
14 _0._C.z = 0.0f;
15 _0._20 = 0.0f;
16 _0._1C = 0.0f;
17 _0._18 = 0.0f;
18 _0._24 = 1.0f;
19 _28 = _0;
20 _5C = 1.0f;
21 _60 = 1.0f;
22 _50.zero();
23}
24
25void XanimeCore::shareJointTransform(const XanimeCore *pOther) {
26 mTransformList = pOther->mTransformList;
27}
28
29#ifdef NON_MATCHING
30// missing new array call
31void XanimeCore::initMember(u32 trackCount) {
32 _1C = 1.0f;
33 _20 = 1.0f;
34 _24 = 0.0f;
35 _28 = 0;
36 _29 = 0;
37 _6 = 0;
38 _C = 0;
39 mTrackList = new XanimeTrack[trackCount];
40
41 s32 curTrack = 0;
42
43 while (curTrack < trackCount) {
44 mTrackList[curTrack].init();
45 curTrack++;
46 }
47
48 setWeight(0, 1.0f);
49}
50#endif
51
52XanimeCore::XanimeCore(u32 trackCount, u32 jointCount, u8 a3) {
53 _4 = a3;
54 mTrackCount = trackCount;
55 mJointCount = jointCount;
56 mJointList = new XjointInfo[jointCount];
57 mTransformList = 0;
58 initMember(trackCount);
59}
60
61XanimeCore::XanimeCore(u32 trackCount, XanimeCore *pOtherCore) {
62 mTrackCount = trackCount;
63 mJointCount = pOtherCore->mJointCount;
64 _4 = pOtherCore->_4;
65 mJointList = pOtherCore->mJointList;
66 mTransformList = pOtherCore->mTransformList;
67 initMember(trackCount);
68}
69
70void XanimeCore::doFreeze() {
71 _28 = 1;
72 _1C = 0.0f;
73}
74
75// XanimeCore::setBck
76
77void XanimeCore::setWeight(u8 idx, f32 weight) {
78 mTrackList[idx].mWeight = weight;
79}
80
81XanimeCore::~XanimeCore() {
82
83}
84
85XtransformInfo::XtransformInfo() {
86 _0.zero();
87 _C.zero();
88 _20 = 0.0f;
89 _1C = 0.0f;
90 _18 = 0.0f;
91 _24 = 1.0f;
92}