2024-04-14 20:41:45 -04:00
|
|
|
#include "Game/Player/DLchanger.hpp"
|
2024-04-14 21:20:09 -04:00
|
|
|
#include "Game/Player/J3DModelX.hpp"
|
|
|
|
|
#include "Game/Player/MarioActor.hpp"
|
2024-04-14 20:41:45 -04:00
|
|
|
#include "Game/Player/ModelHolder.hpp"
|
2024-04-14 21:20:09 -04:00
|
|
|
#include "Game/Player/TornadoMario.hpp"
|
2024-04-14 20:41:45 -04:00
|
|
|
|
2024-04-14 21:20:09 -04:00
|
|
|
void MarioActor::drawMarioModel() const
|
|
|
|
|
{
|
|
|
|
|
if (isAllHidden()) {
|
2024-04-14 20:41:45 -04:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-14 21:20:09 -04:00
|
|
|
if (mTornadoMario) {
|
2024-04-14 20:41:45 -04:00
|
|
|
|
2024-04-14 21:20:09 -04:00
|
|
|
if (mMario->mMovementStates._F) {
|
|
|
|
|
if (mMario->_544 > 2) {
|
2024-04-14 20:41:45 -04:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-14 21:20:09 -04:00
|
|
|
if (!MR::isDead(mTornadoMario) && (MR::isBckPlaying(mTornadoMario, "MarioTornadoEnd") || MR::isBckPlaying(mTornadoMario, "MarioTornadoLoop"))) {
|
2024-04-14 20:41:45 -04:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-14 21:20:09 -04:00
|
|
|
switch (mCurrModel) {
|
|
|
|
|
case 3:
|
|
|
|
|
return;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
return;
|
2024-04-14 20:41:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
drawSpinInhibit();
|
|
|
|
|
drawSphereMask();
|
|
|
|
|
bool res = drawDarkMask();
|
2024-04-14 21:20:09 -04:00
|
|
|
|
2024-04-14 20:41:45 -04:00
|
|
|
J3DModelX *model = mModels[mCurrModel];
|
2024-04-14 21:20:09 -04:00
|
|
|
|
|
|
|
|
if (res) {
|
2024-04-14 20:41:45 -04:00
|
|
|
model->mFlags._10 = true;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-14 21:20:09 -04:00
|
|
|
if (!mFlags.mIsHiddenModel) {
|
|
|
|
|
model->mFlags._1C = false;
|
|
|
|
|
if (mMario->isStatusActive(0x12)) {
|
|
|
|
|
|
|
|
|
|
if (_1A1) {
|
2024-04-14 20:41:45 -04:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mDLchanger->addDL(model);
|
|
|
|
|
|
|
|
|
|
MR::showJoint(model, "HandR0");
|
|
|
|
|
MR::showJoint(model, "HandL0");
|
|
|
|
|
MR::showJoint(model, "Face0");
|
|
|
|
|
}
|
|
|
|
|
else {
|
2024-04-14 21:20:09 -04:00
|
|
|
if (mCurrModel == 4) {
|
2024-04-14 20:41:45 -04:00
|
|
|
model->setDynamicDL(nullptr, 0);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2024-04-14 21:02:28 -04:00
|
|
|
model->setDynamicDL(mDL[mCurrDL], mDLSize);
|
2024-04-14 20:41:45 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-14 21:20:09 -04:00
|
|
|
if (mAlphaEnable) {
|
2024-04-14 20:41:45 -04:00
|
|
|
GXSetAlphaUpdate(1);
|
|
|
|
|
GXSetDstAlpha(1, 0);
|
|
|
|
|
}
|
|
|
|
|
model->setDrawView(0);
|
|
|
|
|
model->directDraw(nullptr);
|
|
|
|
|
model->mFlags.clear();
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-14 21:20:09 -04:00
|
|
|
if (mMario->isStatusActive(0x12)) {
|
2024-04-14 20:41:45 -04:00
|
|
|
MR::hideJoint(model, "HandR0");
|
|
|
|
|
MR::hideJoint(model, "HandL0");
|
|
|
|
|
MR::hideJoint(model, "Face0");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
drawHand();
|
2024-04-14 21:20:09 -04:00
|
|
|
|
|
|
|
|
if (!MR::isHiddenModel(_A5C)) {
|
2024-04-14 20:41:45 -04:00
|
|
|
J3DModelX *cool = (J3DModelX *)MR::getJ3DModel(_A5C);
|
2024-04-14 21:02:28 -04:00
|
|
|
cool->setDynamicDL(mDL[mCurrDL], mDLSize);
|
2024-04-14 20:41:45 -04:00
|
|
|
cool->directDraw(nullptr);
|
|
|
|
|
}
|
2024-04-14 21:20:09 -04:00
|
|
|
|
|
|
|
|
if (mAlphaEnable) {
|
2024-04-14 20:41:45 -04:00
|
|
|
GXSetAlphaUpdate(0);
|
|
|
|
|
GXSetDstAlpha(0, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|