Skip to content

Commit

Permalink
PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTGL committed Aug 9, 2024
1 parent 8566da6 commit add3f11
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 61 deletions.
3 changes: 2 additions & 1 deletion include/d/d_cc_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ enum CcG_Tg_HitMark {
enum dCcG_At_Spl {
/* 0x0 */ dCcG_At_Spl_UNK0 = 0,
/* 0x1 */ dCcG_At_Spl_UNK1 = 1,
/* 0x3 */ dCcG_At_Spl_UNK3 = 3,
/* 0x6 */ dCcG_At_Spl_UNK6 = 6,
/* 0x9 */ dCcG_At_Spl_UNK9 = 9,
/* 0xB */ dCcG_At_Spl_UNKB = 0xB,
Expand Down Expand Up @@ -486,4 +487,4 @@ class dCcD_Tri : public dCcD_GObjInf, public cCcD_TriAttr {

dCcD_GObjInf* dCcD_GetGObjInf(cCcD_Obj* param_0);

#endif /* D_CC_D_CC_D_H */
#endif /* D_CC_D_CC_D_H */
82 changes: 22 additions & 60 deletions src/d/actor/d_a_player_particle.inc
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ void daPy_swBlur_c::draw() {

if (mBlurColorType == NORMAL_SLASH_BLUR) {
// Normal color.
static GXColor n_color = {0xFF, 0xFF, 0xFF, 0x96};
GXSetTevColor(GX_TEVREG0, n_color);
static GXColor n_color0 = {0xFF, 0xFF, 0xFF, 0x96};
GXSetTevColor(GX_TEVREG0, n_color0);
} else if (mBlurColorType == ELIXIR_SOUP_SLASH_BLUR) {
// Elixir Soup color.
static GXColor y_color0 = {0xFF, 0xFF, 0x7B, 0x96};
Expand Down Expand Up @@ -713,9 +713,7 @@ void daPy_lk_c::setWaterRipple() {
MtxP suimenMunyaMtx = mpSuimenMunyaModel->getBaseTRMtx();

cXyz local_4c;
local_4c.x = suimenMunyaMtx[0][3];
local_4c.y = suimenMunyaMtx[1][3];
local_4c.z = suimenMunyaMtx[2][3];
mDoMtx_multVecZero(suimenMunyaMtx, &local_4c);

local_40.y = m35D0;
local_4c -= local_40;
Expand All @@ -737,9 +735,7 @@ void daPy_lk_c::setWaterRipple() {
if (dPa_control_c::isStatus(0x01)) {
MtxP mtx = mpCLModel->getAnmMtx(15);
cXyz local_5c;
local_5c.x = mtx[0][3];
local_5c.y = mtx[1][3];
local_5c.z = mtx[2][3];
mDoMtx_multVecZero(mtx, &local_5c);

cXyz local_68;
cMtx_multVec(mtx, &swim_side_offset, &local_68);
Expand Down Expand Up @@ -785,11 +781,9 @@ void daPy_lk_c::setWaterRipple() {
}

if (m34CD == 0) {
MtxP mtx = mpCLModel->getAnmMtx(0);
cXyz local_ac;
local_ac.x = mtx[0][3];
local_ac.y = mtx[1][3];
local_ac.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0), &local_ac);

dComIfGp_particle_setSingleRipple(0x3F, &local_ac, NULL, (cXyz*)&waterfall_ripple_scale);
m34CD = 15;
dComIfGp_getVibration().StartQuake(4, 1, cXyz(0.0f, 1.0f, 0.0f));
Expand Down Expand Up @@ -946,18 +940,12 @@ void daPy_lk_c::setFootEffect() {
cXyz pos;
if (getFootOnGround()) {
if (getRightFootOnGround()) {
MtxP mtx = mpCLModel->getAnmMtx(0x27);
pos.x = mtx[0][3];
pos.y = mtx[1][3];
pos.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x27), &pos);
setFootMark(&pos);
}

if (getLeftFootOnGround()) {
MtxP mtx = mpCLModel->getAnmMtx(0x22);
pos.x = mtx[0][3];
pos.y = mtx[1][3];
pos.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x22), &pos);
setFootMark(&pos);
}
}
Expand Down Expand Up @@ -1031,10 +1019,8 @@ void daPy_lk_c::setFootEffect() {
if (mCurProc == daPyProc_DEMO_LAST_COMBO_e) {
f32 rnd = cM_rndFX(17.5f);
cXyz sp44 = m370C;
MtxP mtx = mpCLModel->getAnmMtx(0x1);
m370C.x = mtx[0][3];
m370C.y = mtx[1][3];
m370C.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x1), &m370C);

if (m3570 != 0) {
current.angle.y = shape_angle.y - 0x4000;
m3570 = 0;
Expand All @@ -1057,40 +1043,26 @@ void daPy_lk_c::setFootEffect() {

} else if (m34BE == 3) {
if (mCurrAttributeCode == dBgS_Attr_GRASS_e || mCurrAttributeCode == dBgS_Attr_WATER_e) {
MtxP mtx = mpCLModel->getAnmMtx(0x27);
pos.x = mtx[0][3];
pos.y = mtx[1][3];
pos.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x27), &pos);
setFootEffectType(temp_r3_4, &pos, 0, var_r29);

mtx = mpCLModel->getAnmMtx(0x22);
pos.x = mtx[0][3];
pos.y = mtx[1][3];
pos.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x22), &pos);
setFootEffectType(temp_r3_4, &pos, 1, var_r29);

} else {
setFootEffectType(temp_r3_4, &current.pos, 0, var_r29);
}
} else if (m34BE == 1) {
MtxP mtx = mpCLModel->getAnmMtx(0x22);
pos.x = mtx[0][3];
pos.y = mtx[1][3];
pos.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x22), &pos);
setFootEffectType(temp_r3_4, &pos, 0, var_r29);
} else if (m34BE == 2) {
MtxP mtx = mpCLModel->getAnmMtx(0x27);
pos.x = mtx[0][3];
pos.y = mtx[1][3];
pos.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x27), &pos);
setFootEffectType(temp_r3_4, &pos, 0, var_r29);
} else if (m34BE == 5) {
setFootEffectType(temp_r3_4, &current.pos, 0, 1);
} else if (m34BE == 6) {
MtxP mtx = mpCLModel->getAnmMtx(0);
pos.x = mtx[0][3];
pos.y = mtx[1][3];
pos.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0), &pos);


mGndChk.SetPos(&pos);

Expand Down Expand Up @@ -1137,11 +1109,8 @@ void daPy_lk_c::setSwimTail() {
/* 8012C2A4-8012C330 .text setCutWaterSplash__9daPy_lk_cFv */
void daPy_lk_c::setCutWaterSplash() {
if (m336C.getEmitter() != NULL) {
MtxP mtx = mpCLModel->getAnmMtx(4);
cXyz pos;
pos.x = mtx[0][3];
pos.y = mtx[1][3];
pos.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(4), &pos);

dComIfGp_particle_setP1(0x39, &pos);
}
Expand Down Expand Up @@ -1173,15 +1142,10 @@ void daPy_lk_c::setSwimWaterDrop(daPy_waterDropEcallBack_c* callBack) {
void daPy_lk_c::setWaterDrop() {
MtxP mtx = mpCLModel->getAnmMtx(0x0E);
cXyz tmp;
tmp.x = mtx[0][3];
tmp.y = mtx[1][3];
tmp.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x0E), &tmp);
m334C.setPos(&tmp);

mtx = mpCLModel->getAnmMtx(0x02);
tmp.x = mtx[0][3];
tmp.y = mtx[1][3];
tmp.z = mtx[2][3];
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x02), &tmp);
m336C.setPos(&tmp);

if (checkModeFlg(ModeFlg_00000001)) {
Expand Down Expand Up @@ -1282,9 +1246,9 @@ void daPy_lk_c::setDamageElecEmitter() {
void daPy_lk_c::setDamageEmitter() {
dCcD_GObjInf* tgHitGObj = mCyl.GetTgHitGObj();
if (tgHitGObj != NULL) {
if (tgHitGObj->GetAtSpl() == 0x3) {
if (tgHitGObj->GetAtSpl() == dCcG_At_Spl_UNK3) {
setDamageCurseEmitter();
} else if (tgHitGObj->GetAtSpl() == 0xB) {
} else if (tgHitGObj->GetAtSpl() == dCcG_At_Spl_UNKB) {
setDamageElecEmitter();
} else if (tgHitGObj->ChkAtType(AT_TYPE_FIRE)) {
setDamageFlameEmitter();
Expand All @@ -1299,9 +1263,7 @@ void daPy_lk_c::endFlameDamageEmitter() {
if (current.pos.y < m35D0 - 10.0f) {
for (int i = 0; i < (s32)ARRAY_SIZE(mDmEcallBack); i++) {
cXyz pos;
pos.x = mDmEcallBack[i].mpMtx[0][3];
pos.y = mDmEcallBack[i].mpMtx[1][3];
pos.z = mDmEcallBack[i].mpMtx[2][3];
mDoMtx_multVecZero(mDmEcallBack[i].mpMtx, &pos);
pos.y = m35D0;

dComIfGp_particle_set(0x35A, &pos);
Expand Down

0 comments on commit add3f11

Please sign in to comment.