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

Method nodeCallBack

src/Shiraiwa/JugemRodSignal.cpp:374–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374bool TJugemRodPukuPuku::nodeCallBack(J3DJoint* joint, int timing) {
375 if (timing == 0) {
376 int idx = joint->getJntNo();
377
378 J3DModel *model = j3dSys.getModel();
379 // FIX: This is almost certainly wrong. Need to work out correct casting.
380
381 TJugemRodPukuPuku *jugem = (TJugemRodPukuPuku *)((ExModel *)model->getUserArea())->_14;
382 if (jugem) {
383 MtxPtr anm_mtx = model->getAnmMtx(idx);
384 JGeometry::TPos3f &calc_mtx = jugem->mRotMtx;
385 calc_mtx[0][3] = jugem->mPos.x;
386 calc_mtx[1][3] = jugem->mPos.y;
387 calc_mtx[2][3] = jugem->mPos.z;
388
389
390 PSMTXCopy(calc_mtx, anm_mtx);
391 J3DSys::setCurrentMtx(anm_mtx);
392 }
393 }
394
395 return true;
396}

Callers

nothing calls this directly

Calls 3

getJntNoMethod · 0.80
getModelMethod · 0.45
getUserAreaMethod · 0.45

Tested by

no test coverage detected