From 578d45153f68342952b988be49b7fb9c5795752d Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sun, 10 May 2026 13:11:56 -0400 Subject: [PATCH] DSNAP enum cleanup --- include/d/d_snap.h | 16 ++++++++-------- src/d/actor/d_a_cc.cpp | 2 +- src/d/actor/d_a_daiocta.cpp | 2 +- src/d/actor/d_a_fm.cpp | 2 +- src/d/actor/d_a_kamome.cpp | 2 +- src/d/actor/d_a_kamome2.cpp | 2 +- src/d/actor/d_a_ki.cpp | 2 +- src/d/actor/d_a_kn.cpp | 2 +- src/d/actor/d_a_npc_ls1.cpp | 2 +- src/d/actor/d_a_npc_rsh1.cpp | 2 +- src/d/actor/d_a_npc_zl1.cpp | 2 +- src/d/d_snap.cpp | 16 ++++++++-------- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/d/d_snap.h b/include/d/d_snap.h index 7e527fc43..b331ff6ec 100644 --- a/include/d/d_snap.h +++ b/include/d/d_snap.h @@ -78,7 +78,7 @@ enum { /* 0x46 */ DSNAP_TYPE_UNK46, /* 0x47 */ DSNAP_TYPE_UNK47, /* 0x48 */ DSNAP_TYPE_UNK48, - /* 0x49 */ DSNAP_TYPE_UNK49, + /* 0x49 */ DSNAP_TYPE_LS1, /* 0x4A */ DSNAP_TYPE_UNK4A, /* 0x4B */ DSNAP_TYPE_UNK4B, /* 0x4C */ DSNAP_TYPE_UNK4C, @@ -91,7 +91,7 @@ enum { /* 0x53 */ DSNAP_TYPE_UNK53, /* 0x54 */ DSNAP_TYPE_UNK54, /* 0x55 */ DSNAP_TYPE_KAMOME, - /* 0x56 */ DSNAP_TYPE_UNK56, + /* 0x56 */ DSNAP_TYPE_KN, /* 0x57 */ DSNAP_TYPE_UNK57, /* 0x58 */ DSNAP_TYPE_KM1, /* 0x59 */ DSNAP_TYPE_UNK59, @@ -100,7 +100,7 @@ enum { /* 0x5C */ DSNAP_TYPE_UNK5C, /* 0x5D */ DSNAP_TYPE_UNK5D, /* 0x5E */ DSNAP_TYPE_NPC_PHOTO, - /* 0x5F */ DSNAP_TYPE_UNK5F, + /* 0x5F */ DSNAP_TYPE_RSH1, /* 0x60 */ DSNAP_TYPE_UNK60, /* 0x61 */ DSNAP_TYPE_UNK61, /* 0x62 */ DSNAP_TYPE_UNK62, @@ -119,7 +119,7 @@ enum { /* 0x6F */ DSNAP_TYPE_UNK6F, /* 0x70 */ DSNAP_TYPE_UNK70, /* 0x71 */ DSNAP_TYPE_UNK71, - /* 0x72 */ DSNAP_TYPE_UNK72, + /* 0x72 */ DSNAP_TYPE_ZL1, /* 0x73 */ DSNAP_TYPE_UNK73, /* 0x74 */ DSNAP_TYPE_UNK74, /* 0x75 */ DSNAP_TYPE_UNK75, @@ -177,16 +177,16 @@ enum { /* 0xA9 */ DSNAP_TYPE_UNKA9, /* 0xAA */ DSNAP_TYPE_BK, /* 0xAB */ DSNAP_TYPE_UNKAB, - /* 0xAC */ DSNAP_TYPE_UNKAC, + /* 0xAC */ DSNAP_TYPE_CC, /* 0xAD */ DSNAP_TYPE_UNKAD, - /* 0xAE */ DSNAP_TYPE_UNKAE, + /* 0xAE */ DSNAP_TYPE_KI, /* 0xAF */ DSNAP_TYPE_UNKAF, /* 0xB0 */ DSNAP_TYPE_BB, /* 0xB1 */ DSNAP_TYPE_UNKB1, /* 0xB2 */ DSNAP_TYPE_UNKB2, /* 0xB3 */ DSNAP_TYPE_KS, /* 0xB4 */ DSNAP_TYPE_UNKB4, - /* 0xB5 */ DSNAP_TYPE_UNKB5, + /* 0xB5 */ DSNAP_TYPE_FM, /* 0xB6 */ DSNAP_TYPE_AM2, /* 0xB7 */ DSNAP_TYPE_AM, /* 0xB8 */ DSNAP_TYPE_UNKB8, @@ -203,7 +203,7 @@ enum { /* 0xC3 */ DSNAP_TYPE_UNKC3, /* 0xC4 */ DSNAP_TYPE_UNKC4, /* 0xC5 */ DSNAP_TYPE_UNKC5, - /* 0xC6 */ DSNAP_TYPE_UNKC6, + /* 0xC6 */ DSNAP_TYPE_DAIOCTA, /* 0xC7 */ DSNAP_TYPE_BTD, /* 0xC8 */ DSNAP_TYPE_BMD, /* 0xC9 */ DSNAP_TYPE_BST, diff --git a/src/d/actor/d_a_cc.cpp b/src/d/actor/d_a_cc.cpp index d4e4fb21e..bdebe0cb0 100644 --- a/src/d/actor/d_a_cc.cpp +++ b/src/d/actor/d_a_cc.cpp @@ -125,7 +125,7 @@ static BOOL daCC_Draw(cc_class* i_this) { return TRUE; } - dSnap_RegistFig(0xac, a_this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_CC, a_this, 1.0f, 1.0f, 1.0f); if (i_this->m2F5 != 0x35) { i_this->m2B8->entry(pJVar3->getModelData()); diff --git a/src/d/actor/d_a_daiocta.cpp b/src/d/actor/d_a_daiocta.cpp index 393204e7e..6ba79140a 100644 --- a/src/d/actor/d_a_daiocta.cpp +++ b/src/d/actor/d_a_daiocta.cpp @@ -1544,7 +1544,7 @@ bool daDaiocta_c::_draw() { mBrkAnm1.remove(morf_model_p->getModelData()); - dSnap_RegistFig(DSNAP_TYPE_UNKC6, this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_DAIOCTA, this, 1.0f, 1.0f, 1.0f); return true; } diff --git a/src/d/actor/d_a_fm.cpp b/src/d/actor/d_a_fm.cpp index 9baf03df8..7dc4c6e03 100644 --- a/src/d/actor/d_a_fm.cpp +++ b/src/d/actor/d_a_fm.cpp @@ -3291,7 +3291,7 @@ bool daFm_c::_draw() { if(isBodyAppear()) { bodyDraw(); - dSnap_RegistFig(DSNAP_TYPE_UNKB5, this, field_0x61C, shape_angle.y, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_FM, this, field_0x61C, shape_angle.y, 1.0f, 1.0f, 1.0f); } return true; } diff --git a/src/d/actor/d_a_kamome.cpp b/src/d/actor/d_a_kamome.cpp index bddae73de..98259e811 100644 --- a/src/d/actor/d_a_kamome.cpp +++ b/src/d/actor/d_a_kamome.cpp @@ -172,7 +172,7 @@ static BOOL daKamome_Draw(kamome_class* i_this) { &i_this->actor.tevStr ); - dSnap_RegistFig(0x55, &i_this->actor, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_KAMOME, &i_this->actor, 1.0f, 1.0f, 1.0f); return TRUE; } diff --git a/src/d/actor/d_a_kamome2.cpp b/src/d/actor/d_a_kamome2.cpp index bc127ae41..da1aa8a9e 100644 --- a/src/d/actor/d_a_kamome2.cpp +++ b/src/d/actor/d_a_kamome2.cpp @@ -59,7 +59,7 @@ static BOOL daKamome2_Draw(kamome2_class* i_this) { cXyz sp08; sp08.set(i_this->actor.current.pos.x, i_this->actor.current.pos.y + REG0_F(1) * 10.0f, i_this->actor.current.pos.z); i_this->m2A0 = dComIfGd_setRealShadow(i_this->m2A0, 1, i_this->mpModel, &sp08, REG0_F(2) * 10.0f + 500.0f, 0.0f, &i_this->actor.tevStr); - dSnap_RegistFig(0x55, &i_this->actor, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_KAMOME, &i_this->actor, 1.0f, 1.0f, 1.0f); return TRUE; } diff --git a/src/d/actor/d_a_ki.cpp b/src/d/actor/d_a_ki.cpp index aacaab6b8..0aa6f2c1e 100644 --- a/src/d/actor/d_a_ki.cpp +++ b/src/d/actor/d_a_ki.cpp @@ -211,7 +211,7 @@ static BOOL daKi_Draw(ki_class* i_this) { } a_this->model = pModel; - dSnap_RegistFig(0xae, a_this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_KI, a_this, 1.0f, 1.0f, 1.0f); pModel->getModelData()->setTexNoAnimator(i_this->m32C, i_this->m330); i_this->m32C->setFrame(i_this->m334); diff --git a/src/d/actor/d_a_kn.cpp b/src/d/actor/d_a_kn.cpp index 7ca839e7d..4a0533192 100644 --- a/src/d/actor/d_a_kn.cpp +++ b/src/d/actor/d_a_kn.cpp @@ -71,7 +71,7 @@ static BOOL daKN_Draw(kn_class* i_this) { g_env_light.settingTevStruct(TEV_TYPE_ACTOR, &a_this->current.pos, &a_this->tevStr); g_env_light.setLightTevColorType(pJVar1, &a_this->tevStr); i_this->mpMorf->updateDL(); - dSnap_RegistFig(0x56, a_this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_KN, a_this, 1.0f, 1.0f, 1.0f); return TRUE; } diff --git a/src/d/actor/d_a_npc_ls1.cpp b/src/d/actor/d_a_npc_ls1.cpp index c85808961..84d9dc281 100644 --- a/src/d/actor/d_a_npc_ls1.cpp +++ b/src/d/actor/d_a_npc_ls1.cpp @@ -2107,7 +2107,7 @@ BOOL daNpc_Ls1_c::_draw() { } shadowDraw(); - dSnap_RegistFig(DSNAP_TYPE_UNK49, this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_LS1, this, 1.0f, 1.0f, 1.0f); // Does nothing if (l_HIO.mPrm.m18) { diff --git a/src/d/actor/d_a_npc_rsh1.cpp b/src/d/actor/d_a_npc_rsh1.cpp index 75b57c260..216b06244 100644 --- a/src/d/actor/d_a_npc_rsh1.cpp +++ b/src/d/actor/d_a_npc_rsh1.cpp @@ -1683,7 +1683,7 @@ BOOL daNpc_Rsh1_c::_draw() { mpShopCursor->draw(); } - dSnap_RegistFig(DSNAP_TYPE_UNK5F, this, current.pos, current.angle.y, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_RSH1, this, current.pos, current.angle.y, 1.0f, 1.0f, 1.0f); return TRUE; } diff --git a/src/d/actor/d_a_npc_zl1.cpp b/src/d/actor/d_a_npc_zl1.cpp index 0017b77d0..895942573 100644 --- a/src/d/actor/d_a_npc_zl1.cpp +++ b/src/d/actor/d_a_npc_zl1.cpp @@ -2772,7 +2772,7 @@ BOOL daNpc_Zl1_c::_draw() { } shadowDraw(); - dSnap_RegistFig(DSNAP_TYPE_UNK72, this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_ZL1, this, 1.0f, 1.0f, 1.0f); // doesnt do anything? cXyz temp; diff --git a/src/d/d_snap.cpp b/src/d/d_snap.cpp index 39f1ba3e3..997057b6f 100644 --- a/src/d/d_snap.cpp +++ b/src/d/d_snap.cpp @@ -1703,8 +1703,8 @@ void dSnap_Obj::SetGeoSph(const Vec& center, f32 radius) { } /* 800CDB68-800CDB94 .text SetInf__9dSnap_ObjFUcPC10fopAc_ac_cUcUcs */ -void dSnap_Obj::SetInf(u8 r4, const fopAc_ac_c* r5, u8 r6, u8 r7, s16 cullAngle) { - mPhoto = r4; +void dSnap_Obj::SetInf(u8 photoIndex, const fopAc_ac_c* r5, u8 r6, u8 r7, s16 cullAngle) { + mPhoto = photoIndex; mActorPID = fopAcM_GetID(const_cast(r5)); field_0x1a = r6; field_0x19 = r7; @@ -2210,20 +2210,20 @@ void dSnap_RegistSnapObj(dSnap_Obj& obj) { } /* 800CEDD0-800CEDF8 .text dSnap_RegistFig__FUcP10fopAc_ac_cfff */ -void dSnap_RegistFig(u8 r3, fopAc_ac_c* actor, f32 f1, f32 f2, f32 f3) { - dSnap_RegistFig(r3, actor, actor->current.pos, actor->shape_angle.y, f1, f2, f3); +void dSnap_RegistFig(u8 photoIndex, fopAc_ac_c* actor, f32 f1, f32 f2, f32 f3) { + dSnap_RegistFig(photoIndex, actor, actor->current.pos, actor->shape_angle.y, f1, f2, f3); } /* 800CEDF8-800CEFD4 .text dSnap_RegistFig__FUcP10fopAc_ac_cRC3Vecsfff */ -void dSnap_RegistFig(u8 r3, fopAc_ac_c* actor, const Vec& pos, s16 angleY, f32 f1, f32 f2, f32 f3) { +void dSnap_RegistFig(u8 photoIndex, fopAc_ac_c* actor, const Vec& pos, s16 angleY, f32 f1, f32 f2, f32 f3) { if (!l_snap.ChkReleaseShutter()) { return; } - if (r3 >= 0xCF) { + if (photoIndex >= 0xCF) { return; } - int tableIndex = dSnap_PhotoIndex2TableIndex(r3); + int tableIndex = dSnap_PhotoIndex2TableIndex(photoIndex); const CharaData& chara = l_CharaData[tableIndex]; mDoMtx_stack_c::YrotS(angleY); cXyz sp14; @@ -2240,7 +2240,7 @@ void dSnap_RegistFig(u8 r3, fopAc_ac_c* actor, const Vec& pos, s16 angleY, f32 f int angY = angleY; dSnap_Obj sp20; sp20.SetGeo(sp14, chara.radius*f2, chara.height*f1, angY); - sp20.SetInf(r3, actor, 0, 4, chara.cullAngle); + sp20.SetInf(photoIndex, actor, 0, 4, chara.cullAngle); dSnap_RegistSnapObj(sp20); }