MCPcopy Create free account
hub / github.com/doldecomp/mkdd / update

Method update

src/Shiraiwa/AnmPlayer.cpp:81–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void TAnmPlayer::update() {
82 if (mAnmInfo == nullptr || !_10) {
83 return;
84 }
85
86 u8 anmNumber = getCurAnmNumber();
87 if (!mController->IsTransAnm2()) {
88 if (_e & 1 || _e & 2 && isCurAnmReachEnd()) {
89 s8 anmNo = (_11 != -1) ? _11 : mAnmInfo[getCurAnmNumber()].get_12();
90
91 _11 = -1;
92
93 if (anmNo != -1 && anmNo < mMaxAnm) {
94 _d = 1;
95
96 if (mAnmInfo[anmNumber].mBlendFrameCnt) {
97 mController->ChangeBlendTransAnm(anmNo, mAnmInfo[anmNumber].mBlendFrameCnt, 1);
98 }
99 else {
100 mController->ChangeTransAnm(anmNo);
101 }
102 _e = 0;
103 firstEndCheck(anmNo);
104 }
105 else {
106 _10 = 0;
107 }
108 }
109 else {
110#line 190
111 JUT_MINMAX_ASSERT(0, anmNumber, mMaxAnm);
112
113 u8 anmNo = mAnmInfo[anmNumber]._11;
114 if (anmNo != 0 && isGoArroundLoop()) {
115 ++_d;
116 if (_d >= anmNo - 1) {
117 _10 = 1;
118 _e |= 2;
119 }
120 }
121 }
122 }
123
124 _14 = mController->getFrameCtrl(getCurAnmNumber())->getFrame();
125}
126
127void TAnmPlayer::firstEndCheck(u8 anmNumber) {
128#line 210

Callers

nothing calls this directly

Calls 6

IsTransAnm2Method · 0.80
get_12Method · 0.80
ChangeBlendTransAnmMethod · 0.80
ChangeTransAnmMethod · 0.80
getFrameMethod · 0.45
getFrameCtrlMethod · 0.45

Tested by

no test coverage detected