clean up some inline parameters

This commit is contained in:
LagoLunatic
2024-04-18 23:16:38 -04:00
parent c93901ce2c
commit 459cf6caa7
28 changed files with 60 additions and 62 deletions
+10 -9
View File
@@ -2699,16 +2699,19 @@ inline u8 dComIfGp_evmng_getEventEndSound(s16 eventIdx) {
int dComIfGd_setShadow(u32 id, s8 param_2, J3DModel* pModel, cXyz* pPos, f32 param_5, f32 param_6,
f32 y, f32 param_8, cBgS_PolyInfo& pFloorPoly, dKy_tevstr_c* param_10,
s16 rotY, f32 param_12, GXTexObj* pTexObj);
s16 rotY = 0, f32 param_12 = 1.0f,
GXTexObj* pTexObj = dDlst_shadowControl_c::getSimpleTex());
inline int dComIfGd_setSimpleShadow(cXyz* pPos, f32 param_1, f32 param_2, cXyz* param_3, s16 angle,
f32 param_5, GXTexObj* pTex) {
return g_dComIfG_gameInfo.drawlist.setSimpleShadow(pPos, param_1, param_2, param_3, angle,
param_5, pTex);
inline int dComIfGd_setSimpleShadow(cXyz* i_pos, f32 param_1, f32 param_2, cXyz* param_3,
s16 i_angle = 0, f32 param_5 = 1.0f,
GXTexObj* i_tex = dDlst_shadowControl_c::getSimpleTex()) {
return g_dComIfG_gameInfo.drawlist.setSimpleShadow(i_pos, param_1, param_2, param_3, i_angle,
param_5, i_tex);
}
int dComIfGd_setSimpleShadow2(cXyz* pPos, f32 param_1, f32 param_2, cBgS_PolyInfo& pPolyInfo,
s16 param_4, f32 param_5, GXTexObj* pTex);
int dComIfGd_setSimpleShadow2(cXyz* i_pos, f32 param_1, f32 param_2, cBgS_PolyInfo& i_floorPoly,
s16 i_angle = 0, f32 param_5 = 1.0f,
GXTexObj* i_tex = dDlst_shadowControl_c::getSimpleTex());
inline int dComIfGd_setRealShadow(u32 id, s8 param_2, J3DModel* pModel, cXyz* pPos, f32 param_5,
f32 param_6, dKy_tevstr_c* pTevStr) {
@@ -2730,8 +2733,6 @@ inline void dComIfGd_imageDrawShadow(Mtx mtx) {
g_dComIfG_gameInfo.drawlist.imageDrawShadow(mtx);
}
int dComIfGd_setSimpleShadow2(cXyz* i_pos, f32 param_1, f32 param_2, cBgS_PolyInfo& i_floorPoly, s16 i_angle, f32 param_5, GXTexObj* i_tex);
inline void dComIfGd_set3DlineMat(mDoExt_3DlineMat_c* mat) {
g_dComIfG_gameInfo.drawlist.set3DlineMat(mat);
}
+4 -4
View File
@@ -550,10 +550,10 @@ public:
void drawXluListInvisible() { drawXluDrawList(mpXluListInvisible); }
void drawOpaList2D() { drawOpaDrawList(mpOpaList2D); }
int setSimpleShadow(cXyz* param_0, f32 param_1, f32 param_2, cXyz* param_3, s16 param_4,
f32 param_5, GXTexObj* param_6) {
return mShadowControl.setSimple(param_0, param_1, param_2, param_3, param_4, param_5,
param_6);
int setSimpleShadow(cXyz* i_pos, f32 param_1, f32 param_2, cXyz* param_3, s16 i_angle,
f32 param_5, GXTexObj* i_tex) {
return mShadowControl.setSimple(i_pos, param_1, param_2, param_3, i_angle, param_5,
i_tex);
}
int setRealShadow(u32 id, s8 param_2, J3DModel* pModel, cXyz* pPos, f32 param_5, f32 param_6,
dKy_tevstr_c* pTevStr) {
+3 -2
View File
@@ -9,6 +9,7 @@
#include "m_Do/m_Do_audio.h"
#include "d/d_item_data.h"
#include "d/d_save.h"
#include "d/d_event.h"
#define fopAcM_SetupActor(ptr,ClassName) \
if (!fopAcM_CheckCondition(ptr, fopAcCnd_INIT_e)) { \
@@ -635,8 +636,8 @@ inline void fopAcM_offDraw(fopAc_ac_c* actor) {
fopDwTg_DrawQTo(&actor->draw_tag);
}
inline void fopAcM_orderOtherEvent(fopAc_ac_c* ac, char* event, u16 flag) {
fopAcM_orderOtherEvent2(ac, event, flag);
inline void fopAcM_orderOtherEvent(fopAc_ac_c* ac, char* event, u16 hind = -1) {
fopAcM_orderOtherEvent2(ac, event, dEvtFlag_NOPARTNER_e, hind);
}
#endif
+2 -1
View File
@@ -60,7 +60,8 @@ typedef int (*fopMsgCreateFunc)(void*);
JKRExpHeap* fopMsgM_createExpHeap(u32, JKRHeap*);
JKRExpHeap* fopMsgM_createExpHeap(u32);
u32 fopMsgM_Create(s16, fopMsgCreateFunc, void*);
s32 fopMsgM_create(s16 param_0, fopAc_ac_c* param_1, cXyz* param_2, u32* param_3, u32* param_4, fopMsgCreateFunc createFunc);
s32 fopMsgM_create(s16 param_0, fopAc_ac_c* param_1 = NULL, cXyz* param_2 = NULL,
u32* param_3 = NULL, u32* param_4 = NULL, fopMsgCreateFunc createFunc = NULL);
void fopMsgM_Delete(void* process);
fopMsg_prm_class* fopMsgM_GetAppend(void* msg);
void fopMsgM_setMessageID(uint);
+1 -1
View File
@@ -113,7 +113,7 @@ void cBgW::CalcPlane() {
} else {
for (s32 i = 0; i < pm_bgd->m_t_num; i++) {
cBgW_TriElm* tri_elm = &pm_tri[i];
cM3d_CalcPla(&pm_vtx_tbl[t_tbl[i].vtx0], &pm_vtx_tbl[t_tbl[i].vtx1], &pm_vtx_tbl[t_tbl[i].vtx2], &tri_elm->m_plane.mNormal, &tri_elm->m_plane.mD);
cM3d_CalcPla(&pm_vtx_tbl[t_tbl[i].vtx0], &pm_vtx_tbl[t_tbl[i].vtx1], &pm_vtx_tbl[t_tbl[i].vtx2], tri_elm->m_plane.GetNP(), &tri_elm->m_plane.mD);
}
}
}
+1 -1
View File
@@ -626,7 +626,7 @@ void daAgb_c::modeLookAttention() {
}
}
} else {
fopAcM_orderOtherEvent2(this, "DEFAULT_AGB_LOOK_ATTENTION", 4);
fopAcM_orderOtherEvent2(this, "DEFAULT_AGB_LOOK_ATTENTION", dEvtFlag_TALK_e);
}
}
+1 -1
View File
@@ -1073,7 +1073,7 @@ BOOL daAgbsw0_c::ExeSubMW() {
}
}
else {
fopAcM_orderOtherEvent2(this, "DEFAULT_AGB_LOOK_ATTENTION", 4);
fopAcM_orderOtherEvent2(this, "DEFAULT_AGB_LOOK_ATTENTION", dEvtFlag_TALK_e);
}
}
+2 -2
View File
@@ -844,7 +844,7 @@ BOOL daArrow_c::procMove() {
current.pos = old.pos;
field_0x69c = 0x2C00;
csXyz temp9;
cM3d_CalcVecZAngle(triPla->mNormal, &temp9);
cM3d_CalcVecZAngle(*triPla->GetNP(), &temp9);
dComIfGp_particle_setP1(dPa_name::ID_COMMON_PURPLE_HIT, &field_0x6a8, &temp9);
fopAcM_seStartCurrent(this, JA_SE_LK_ARROW_REBOUND, mtrlSndId);
@@ -910,7 +910,7 @@ BOOL daArrow_c::procReturn() {
cM3dGPla* triPla = dComIfG_Bgsp()->GetTriPla(mLinChk);
f32 temp2 = speed.abs();
cXyz temp1;
C_VECReflect(&speed, &triPla->mNormal, &temp1);
C_VECReflect(&speed, triPla->GetNP(), &temp1);
speed.x = temp1.x*temp2*0.5f;
speed.y = temp1.y*temp2*0.5f;
speed.z = temp1.z*temp2*0.5f;
+1 -2
View File
@@ -494,8 +494,7 @@ static void daBk_shadowDraw(bk_class* i_this) {
i_this->mShadowId = dComIfGd_setShadow(
i_this->mShadowId, 1, model, &shadowPos, temp, shadowSize,
i_this->current.pos.y, i_this->dr.mAcch.GetGroundH(),
i_this->dr.mAcch.m_gnd, &i_this->tevStr,
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
i_this->dr.mAcch.m_gnd, &i_this->tevStr
);
}
+4 -4
View File
@@ -203,7 +203,7 @@ BOOL daBomb_c::draw() {
if(fopAcM_GetModel(this) == 0 && mAcch.GetGroundH() != -1.0e9f) {
cM3dGPla* pNormal = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd);
if(pNormal) {
dComIfGd_setSimpleShadow(&current.pos, mAcch.GetGroundH(), 25.0f, &pNormal->mNormal, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
dComIfGd_setSimpleShadow(&current.pos, mAcch.GetGroundH(), 25.0f, pNormal->GetNP());
}
}
@@ -472,17 +472,17 @@ void daBomb_c::posMoveF() {
f32 temp2;
cXyz* norm;
if(tri) {
norm = &tri->mNormal;
norm = tri->GetNP();
mag = 0.06f;
temp2 = cM_scos(0xA4F);
}
else {
norm = 0;
norm = NULL;
mag = 0.0f;
temp2 = 0.0f;
}
daObj::posMoveF_grade(this, mStts.GetCCMoveP(), &mWindVec, 0.002f, 0.0005f, norm, mag, temp2, 0);
daObj::posMoveF_grade(this, mStts.GetCCMoveP(), &mWindVec, 0.002f, 0.0005f, norm, mag, temp2, NULL);
}
else {
fopAcM_posMoveF(this, mStts.GetCCMoveP());
+1 -1
View File
@@ -1103,7 +1103,7 @@ void daItem_c::checkWall() {
}
cM3dGPla* wallPlane = dComIfG_Bgsp()->GetTriPla(mAcchCir);
cXyz wallNorm = wallPlane->mNormal;
cXyz wallNorm = *wallPlane->GetNP();
cXyz vel;
vel.x = speedF * cM_ssin(current.angle.y);
+2 -4
View File
@@ -188,14 +188,12 @@ void daItemBase_c::setShadow() {
f32 shadowSize = scale.x * dItem_data::getShadowSize(m_itemNo);
if (!dItem_data::chkFlag(m_itemNo, 0x10)) {
dComIfGd_setSimpleShadow2(
&current.pos, mAcch.GetGroundH(), shadowSize, mAcch.m_gnd,
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
&current.pos, mAcch.GetGroundH(), shadowSize, mAcch.m_gnd
);
} else {
mShadowId = dComIfGd_setShadow(
mShadowId, 1, mpModel, &current.pos, 80.0f, shadowSize,
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr,
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr
);
}
}
+2 -2
View File
@@ -460,7 +460,7 @@ BOOL daMbdoor_actionWait(daMbdoor_c* i_this) {
BOOL daMbdoor_actionLockWait(daMbdoor_c* i_this) {
if (i_this->checkUnlock()) {
i_this->setAction(2);
fopAcM_orderOtherEvent2(i_this, "MBDOOR_STOP_OPEN", 1);
fopAcM_orderOtherEvent(i_this, "MBDOOR_STOP_OPEN");
}
return TRUE;
}
@@ -472,7 +472,7 @@ BOOL daMbdoor_actionLockOff(daMbdoor_c* i_this) {
i_this->demoProc();
i_this->setAction(3);
} else {
fopAcM_orderOtherEvent2(i_this, "MBDOOR_STOP_OPEN", 1);
fopAcM_orderOtherEvent(i_this, "MBDOOR_STOP_OPEN");
}
return TRUE;
}
+4 -3
View File
@@ -2103,9 +2103,10 @@ BOOL daNpc_Bs1_c::_draw() {
mBtpAnm.remove(pModelData);
cXyz shadowPos(current.pos.x, current.pos.y + 150.0f, current.pos.z);
m29C = dComIfGd_setShadow(m29C, 1, mpMorf->getModel(), &shadowPos, 800.0f, 20.0f, current.pos.y,
mAcch.GetGroundH(), mAcch.m_gnd, &tevStr, 0, 1.0f,
&dDlst_shadowControl_c::mSimpleTexObj);
m29C = dComIfGd_setShadow(
m29C, 1, mpMorf->getModel(), &shadowPos, 800.0f, 20.0f,
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr
);
if (mShopItems.mSelectedItemIdx >= 0) {
mpShopCursor->draw();
+1 -2
View File
@@ -678,8 +678,7 @@ BOOL daNpc_Btsw2_c::_draw() {
cXyz shadowPos(current.pos.x, current.pos.y + 130.0f, current.pos.z);
mShadowId = dComIfGd_setShadow(
mShadowId, 1, mpMorf->getModel(), &shadowPos, 800.0f, 20.0f,
current.pos.y, mObjAcch.GetGroundH(), mObjAcch.m_gnd, &tevStr,
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
current.pos.y, mObjAcch.GetGroundH(), mObjAcch.m_gnd, &tevStr
);
dSnap_RegistFig(DSNAP_TYPE_BTSW, this, current.pos, current.angle.y, 1.0f, 1.0f, 1.0f);
+4 -1
View File
@@ -3225,7 +3225,10 @@ BOOL daNpc_Ji1_c::_draw() {
field_0x3FC.entry(field_0x3F8->getModelData(), (s16)field_0x414);
mDoExt_modelUpdateDL(field_0x3F8);
cXyz temp(current.pos.x, current.pos.y + 150.0f, current.pos.z);
field_0x3F0 = dComIfGd_setShadow(field_0x3F0, 1, field_0x330->getModel(), &temp, 800.0f, 20.0f, current.pos.y, field_0x434.GetGroundH(), field_0x434.m_gnd, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
field_0x3F0 = dComIfGd_setShadow(
field_0x3F0, 1, field_0x330->getModel(), &temp, 800.0f, 20.0f,
current.pos.y, field_0x434.GetGroundH(), field_0x434.m_gnd, &tevStr
);
if(field_0x3F0 != 0 && field_0xD84 != 0) {
dComIfGd_addRealShadow(field_0x3F0, mpMorf->getModel());
}
+1 -2
View File
@@ -1401,8 +1401,7 @@ BOOL daNpc_kam_c::draw() {
cXyz shadowPos(current.pos.x, current.pos.y, current.pos.z);
mShadowId = dComIfGd_setShadow(
mShadowId, 1, model, &shadowPos, 800.0f, 20.0f,
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr,
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr
);
dSnap_RegistFig(DSNAP_TYPE_KAMOME, this, 1.0f, 1.0f, 1.0f);
+1 -2
View File
@@ -2967,8 +2967,7 @@ BOOL daNpc_Md_c::draw() {
cXyz shadowPos(current.pos.x, current.pos.y + 150.0f, current.pos.z);
mShadowId = dComIfGd_setShadow(
mShadowId, 0, mpMorf->getModel(), &shadowPos, 800.0f, 20.0f,
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr,
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr
);
if (mShadowId != 0) {
+1 -2
View File
@@ -2031,8 +2031,7 @@ BOOL daNpc_Os_c::draw() {
mShadowId = dComIfGd_setShadow(
mShadowId, 0, pModel, &shadowPos, 800.0f, 20.0f,
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr,
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr
);
}
+1 -1
View File
@@ -140,7 +140,7 @@ void daObj_Hole_c::modeEvent() {
}
}
else {
fopAcM_orderOtherEvent2(this, "DEFAULT_PITFALL", 1);
fopAcM_orderOtherEvent(this, "DEFAULT_PITFALL");
}
}
+1 -1
View File
@@ -1940,7 +1940,7 @@ namespace daObjMovebox {
f32 groundH = mBgc.mGroundY[temp];
cM3dGPla* triPla = dComIfG_Bgsp()->GetTriPla(Bgc_c::M_gnd_work[temp]);
if (triPla && groundH != -1000000000.0f) {
dComIfGd_setSimpleShadow(&current.pos, groundH, i_attr()->m10, &triPla->mNormal, shape_angle.y, 1.0f, NULL);
dComIfGd_setSimpleShadow(&current.pos, groundH, i_attr()->m10, triPla->GetNP(), shape_angle.y, 1.0f, NULL);
}
}
+1 -1
View File
@@ -525,7 +525,7 @@ void daObjTpost_c::eventOrder() {
}
}
else if(field_0x8F7 >= 3) {
fopAcM_orderOtherEvent2(this, a_demo_name_tbl[field_0x8F7 - 3], 1, 0x14F);
fopAcM_orderOtherEvent(this, a_demo_name_tbl[field_0x8F7 - 3], 0x14F);
}
}
+3 -4
View File
@@ -951,7 +951,7 @@ void daRd_c::modeCryInit() {
if (dComIfGp_evmng_startCheck("DEFAULT_RD_CRY")) {
dComIfGp_event_reset();
}
fopAcM_orderOtherEvent2(this, "DEFAULT_RD_CRY", 1);
fopAcM_orderOtherEvent(this, "DEFAULT_RD_CRY");
fopAcM_monsSeStart(this, JA_SE_CV_RD_SCREAM, 0);
mTimer1 = l_HIO.m54;
mBreakFreeCounter = l_HIO.m78;
@@ -1142,7 +1142,7 @@ void daRd_c::modeAttack() {
modeProcInit(MODE_CRY_WAIT);
}
} else if (!checkTgHit()) {
fopAcM_orderOtherEvent2(this, "DEFAULT_RD_ATTACK", 1, 0x1CF);
fopAcM_orderOtherEvent(this, "DEFAULT_RD_ATTACK", 0x1CF);
}
}
@@ -1740,8 +1740,7 @@ bool daRd_c::_draw() {
cXyz shadowPos(current.pos.x, current.pos.y + 150.0f, current.pos.z);
mShadowId = dComIfGd_setShadow(
mShadowId, 1, mpMorf->getModel(), &shadowPos, 800.0f, 40.0f,
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr,
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr
);
dSnap_RegistFig(DSNAP_TYPE_RD, this, 1.0f, 1.0f, 1.0f);
+1 -1
View File
@@ -62,7 +62,7 @@ void daTag_Gship_c::modeClearEvent() {
}
}
else {
fopAcM_orderOtherEvent2(this, "PSHIP_CLEAR", 1);
fopAcM_orderOtherEvent(this, "PSHIP_CLEAR");
}
}
+3 -3
View File
@@ -152,14 +152,14 @@ bool daTagvolcano::Act_c::_execute() {
dComIfG_TimerDeleteRequest();
field_0x2a4 = 1;
fopAcM_orderOtherEvent(this, "TAG_VOLCANO", dEvtFlag_NOPARTNER_e);
fopAcM_orderOtherEvent(this, "TAG_VOLCANO");
}
#if VERSION != VERSION_JPN
} else {
mDoAud_seStart(JA_SE_ISLE_TIMER_0);
dComIfGp_getVibration().StartShock(6, -33, cXyz(0.0f, 1.0f, 0.0f));
field_0x2a4 = 1;
fopAcM_orderOtherEvent(this, "TAG_VOLCANO", dEvtFlag_NOPARTNER_e);
fopAcM_orderOtherEvent(this, "TAG_VOLCANO");
#endif
}
@@ -171,7 +171,7 @@ bool daTagvolcano::Act_c::_execute() {
dComIfGp_setNextStage("sea", 2, 40);
}
} else {
fopAcM_orderOtherEvent(this, "TAG_VOLCANO", dEvtFlag_NOPARTNER_e);
fopAcM_orderOtherEvent(this, "TAG_VOLCANO");
}
}
}
+2 -2
View File
@@ -1066,7 +1066,7 @@ BOOL daTbox_c::actionSwOnWait() {
}
else {
if (dComIfGs_isSwitch(getSwNo(), mRoomNo)) {
fopAcM_orderOtherEvent2(this, "DEFAULT_TREASURE_APPEAR", 1);
fopAcM_orderOtherEvent(this, "DEFAULT_TREASURE_APPEAR");
eventInfo.onCondition(dEvtCnd_UNK2_e);
}
}
@@ -1098,7 +1098,7 @@ BOOL daTbox_c::actionGenocide() {
mGenocideDelayTimer--;
}
else {
fopAcM_orderOtherEvent2(this, "DEFAULT_TREASURE_APPEAR", 1);
fopAcM_orderOtherEvent(this, "DEFAULT_TREASURE_APPEAR");
eventInfo.onCondition(dEvtCnd_UNK2_e);
dComIfGs_onSwitch(getSwNo(), mRoomNo);
+1 -2
View File
@@ -562,8 +562,7 @@ int dComIfGd_setSimpleShadow2(cXyz* i_pos, f32 param_1, f32 param_2, cBgS_PolyIn
cM3dGPla* plane_p =
dComIfG_Bgsp()->GetTriPla(i_floorPoly);
return dComIfGd_setSimpleShadow(i_pos, param_1, param_2, &plane_p->mNormal, i_angle,
param_5, i_tex);
return dComIfGd_setSimpleShadow(i_pos, param_1, param_2, plane_p->GetNP(), i_angle, param_5, i_tex);
} else {
return 0;
}
+1 -1
View File
@@ -593,7 +593,7 @@ void dEvent_manager_c::exceptionProc() {
if (strcmp(eventName, "look_tetra") == 0)
dComIfGs_onEventBit(0x0280);
} else {
fopAcM_orderOtherEvent2(NULL, (char*)eventName, dEvtFlag_NOPARTNER_e);
fopAcM_orderOtherEvent(NULL, (char*)eventName);
}
break;
case 2: