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

Method simpleDraw

src/Kaneshige/ExModel.cpp:444–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444void ExModel::simpleDraw(u32 viewNo, Mtx m, u32 p3) {
445 J3DModelData *mdlData0 = mModelData[0];
446
447#line 1345
448 JUT_ASSERT_MSG(mModel[0] == nullptr, "CREATE J3DMODEL AND CALL SIMPLEDRAW");
449 SimpleDrawer *drawer = SimpleDrawer::getDrawingDrawer();
450 if (_1a & (1 << viewNo)) {
451 return;
452 }
453
454 if (drawer->isPhaseCheckHidding()) {
455 drawer->enableDrawMaterial();
456 return;
457 }
458
459 J3DMaterial *mat = drawer->getDrawingMaterial();
460 if (sDrawingOnlyUpdZMat) {
461 if (mat->getPEBlock()->getZMode()->getUpdateEnable() != 1)
462 return;
463 }
464
465 if (tstKartBBoardOn()) {
466 switch (mdlData0->getJointNodePointer(0)->getMtxType()) {
467 case 1:
468 calcBBoardMtx(mBaseTRMtx, j3dSys.getViewMtx());
469 break;
470 }
471 }
472
473 Mtx m1, m2, m3;
474 PSMTXScale(m2, mScale.x, mScale.y, mScale.z);
475 PSMTXConcat(mBaseTRMtx, m2, m3);
476 PSMTXConcat(j3dSys.getViewMtx(), m3, m1);
477
478
479 switch (mdlData0->getJointNodePointer(0)->getMtxType()) {
480 case 1:
481 if (!tstKartBBoardOn()) {
482 J3DCalcBBoardMtx(m1);
483 }
484 break;
485 case 2:
486 J3DCalcYBBoardMtx(m1);
487 break;
488 }
489
490 if (mat->getMaterialAnm()) {
491 mat->getMaterialAnm()->calc(mat);
492 }
493
494 mat->calc(m3);
495
496 J3DTexMtx* texMtx = mat->getTexMtx(p3);
497
498 if (texMtx) {
499 Mtx m4;
500 u8 info = texMtx->getTexMtxInfo().mInfo;
501 bool b = false;

Callers

nothing calls this directly

Calls 15

isPhaseCheckHiddingMethod · 0.80
enableDrawMaterialMethod · 0.80
getDrawingMaterialMethod · 0.80
getUpdateEnableMethod · 0.80
getMtxTypeMethod · 0.80
getMaterialAnmMethod · 0.80
getMtxMethod · 0.80
getAnmTexPatternMethod · 0.80
getAnmTevRegMethod · 0.80
getPEBlockMethod · 0.45
getJointNodePointerMethod · 0.45
getViewMtxMethod · 0.45

Tested by

no test coverage detected