SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
MarioAnimator.cpp
1#include "Game/Player/MarioAnimator.hpp"
2#include "Game/Animation/XanimeResource.hpp"
3#include "Game/Player/MarioActor.hpp"
4
5#include "Game/Animation/XanimePlayer.hpp"
6#include "Game/Player/MarioAnimatorData.hpp"
7
8MarioAnimator::MarioAnimator(MarioActor *actor) : MarioModule(actor)
9{
10 init();
11}
12
13void MarioAnimator::init()
14{
15 XanimeSwapTable *luigiAnimations = nullptr;
16 if (gIsLuigi) {
17 luigiAnimations = luigiAnimeSwapTable;
18 }
19 _8 = new XanimeResourceTable(MR::getResourceHolder(mActor), marioAnimeTable, marioAnimeAuxTable, marioAnimeOfsTable, &singleAnimeTable[0].parent, &doubleAnimeTable[0].parent, &tripleAnimeTable[0].parent, &quadAnimeTable[0].parent, luigiAnimations);
20
21 _14 = 0;
22 _15 = 0;
23 _16 = 1;
24
25 _18 = 0.0f;
26 _1C = 0.0f;
27 _20 = 0.0f;
28 _24 = 1.0f;
29
30 PSMTXIdentity(_28.toMtxPtr());
31 PSMTXIdentity(_7C.toMtxPtr());
32 PSMTXIdentity(_AC.toMtxPtr());
33
34 _58 = 0.0f;
35 _5C = 0.0f;
36 _60.zero();
37
38 _6C = 0;
39 _10C = 0;
40 _10D = 0;
41 _10E = 0;
42 _114 = 0;
43 _118 = 0.0f;
44 _70 = 0.0f;
45 _74 = 0;
46 _78 = 0;
47 _110 = 0.0f;
48
49 initCallbackTable();
50
51 _C = new XanimePlayer(MR::getJ3DModel(mActor), _8);
52
53 f1("基本");
54
55 _C->getCore()->enableJointTransform(MR::getJ3DModelData(mActor));
56
57 mActor->mModelManager->mXanimePlayer = _C;
58 _10 = new XanimePlayer(MR::getJ3DModel(mActor), _8, _C);
59 changeDefaultUpper("基本");
60 _10->changeAnimation("基本");
61 _10->mCore->shareJointTransform(_C->mCore);
62 PSMTXCopy(MR::tmpMtxRotYRad(3.14159274101f), _DC.toMtxPtr());
63}
ModelManager * mModelManager
A pointer to a ModelManager instance, used for drawing a 3D model.