diff --git a/configure.py b/configure.py index 87825e42d..80d4ca02b 100644 --- a/configure.py +++ b/configure.py @@ -417,7 +417,7 @@ config.libs = [ Object(Matching, "d/d_a_npc_cb1_static.cpp"), Object(NonMatching, "d/d_a_npc_mk_static.cpp"), Object(NonMatching, "d/d_salvage.cpp"), - Object(NonMatching, "d/d_snap.cpp"), + Object(Matching, "d/d_snap.cpp"), Object(Matching, "d/d_point_wind.cpp"), Object(NonMatching, "d/actor/d_a_agb.cpp"), Object(Matching, "d/actor/d_a_arrow.cpp", extra_cflags=["-sym off"]), diff --git a/include/SSystem/SComponent/c_math.h b/include/SSystem/SComponent/c_math.h index 60ff8da27..d6be45a79 100644 --- a/include/SSystem/SComponent/c_math.h +++ b/include/SSystem/SComponent/c_math.h @@ -43,10 +43,6 @@ inline s16 cM_deg2s(f32 deg) { return deg * 182.04445f; } -inline s16 i_cM_deg2s(f32 deg) { - return deg; -} - inline f32 cM_fcos(f32 x) { return JMASCos(cM_rad2s(x)); } diff --git a/include/d/d_snap.h b/include/d/d_snap.h index 632978bfc..d9011b390 100644 --- a/include/d/d_snap.h +++ b/include/d/d_snap.h @@ -4,20 +4,232 @@ #include "JSystem/J3DGraphBase/J3DPacket.h" #include "f_op/f_op_actor.h" +enum { + /* 0x00 */ DSNAP_TYPE_UNK00, + /* 0x01 */ DSNAP_TYPE_UNK01, + /* 0x02 */ DSNAP_TYPE_UNK02, + /* 0x03 */ DSNAP_TYPE_UNK03, + /* 0x04 */ DSNAP_TYPE_UNK04, + /* 0x05 */ DSNAP_TYPE_UNK05, + /* 0x06 */ DSNAP_TYPE_UNK06, + /* 0x07 */ DSNAP_TYPE_UNK07, + /* 0x08 */ DSNAP_TYPE_UNK08, + /* 0x09 */ DSNAP_TYPE_UNK09, + /* 0x0A */ DSNAP_TYPE_UNK0A, + /* 0x0B */ DSNAP_TYPE_UNK0B, + /* 0x0C */ DSNAP_TYPE_UNK0C, + /* 0x0D */ DSNAP_TYPE_UNK0D, + /* 0x0E */ DSNAP_TYPE_UNK0E, + /* 0x0F */ DSNAP_TYPE_UNK0F, + /* 0x10 */ DSNAP_TYPE_UNK10, + /* 0x11 */ DSNAP_TYPE_UNK11, + /* 0x12 */ DSNAP_TYPE_UNK12, + /* 0x13 */ DSNAP_TYPE_UNK13, + /* 0x14 */ DSNAP_TYPE_UNK14, + /* 0x15 */ DSNAP_TYPE_UNK15, + /* 0x16 */ DSNAP_TYPE_UNK16, + /* 0x17 */ DSNAP_TYPE_UNK17, + /* 0x18 */ DSNAP_TYPE_UNK18, + /* 0x19 */ DSNAP_TYPE_UNK19, + /* 0x1A */ DSNAP_TYPE_UNK1A, + /* 0x1B */ DSNAP_TYPE_UNK1B, + /* 0x1C */ DSNAP_TYPE_UNK1C, + /* 0x1D */ DSNAP_TYPE_UNK1D, + /* 0x1E */ DSNAP_TYPE_UNK1E, + /* 0x1F */ DSNAP_TYPE_UNK1F, + /* 0x20 */ DSNAP_TYPE_UNK20, + /* 0x21 */ DSNAP_TYPE_UNK21, + /* 0x22 */ DSNAP_TYPE_UNK22, + /* 0x23 */ DSNAP_TYPE_UNK23, + /* 0x24 */ DSNAP_TYPE_UNK24, + /* 0x25 */ DSNAP_TYPE_UNK25, + /* 0x26 */ DSNAP_TYPE_UNK26, + /* 0x27 */ DSNAP_TYPE_UNK27, + /* 0x28 */ DSNAP_TYPE_UNK28, + /* 0x29 */ DSNAP_TYPE_UNK29, + /* 0x2A */ DSNAP_TYPE_UNK2A, + /* 0x2B */ DSNAP_TYPE_UNK2B, + /* 0x2C */ DSNAP_TYPE_UNK2C, + /* 0x2D */ DSNAP_TYPE_UNK2D, + /* 0x2E */ DSNAP_TYPE_UNK2E, + /* 0x2F */ DSNAP_TYPE_UNK2F, + /* 0x30 */ DSNAP_TYPE_UNK30, + /* 0x31 */ DSNAP_TYPE_UNK31, + /* 0x32 */ DSNAP_TYPE_UNK32, + /* 0x33 */ DSNAP_TYPE_UNK33, + /* 0x34 */ DSNAP_TYPE_UNK34, + /* 0x35 */ DSNAP_TYPE_UNK35, + /* 0x36 */ DSNAP_TYPE_UNK36, + /* 0x37 */ DSNAP_TYPE_UNK37, + /* 0x38 */ DSNAP_TYPE_UNK38, + /* 0x39 */ DSNAP_TYPE_UNK39, + /* 0x3A */ DSNAP_TYPE_UNK3A, + /* 0x3B */ DSNAP_TYPE_UNK3B, + /* 0x3C */ DSNAP_TYPE_UNK3C, + /* 0x3D */ DSNAP_TYPE_UNK3D, + /* 0x3E */ DSNAP_TYPE_UNK3E, + /* 0x3F */ DSNAP_TYPE_UNK3F, + /* 0x40 */ DSNAP_TYPE_UNK40, + /* 0x41 */ DSNAP_TYPE_UNK41, + /* 0x42 */ DSNAP_TYPE_UNK42, + /* 0x43 */ DSNAP_TYPE_UNK43, + /* 0x44 */ DSNAP_TYPE_UNK44, + /* 0x45 */ DSNAP_TYPE_UNK45, + /* 0x46 */ DSNAP_TYPE_UNK46, + /* 0x47 */ DSNAP_TYPE_UNK47, + /* 0x48 */ DSNAP_TYPE_UNK48, + /* 0x49 */ DSNAP_TYPE_UNK49, + /* 0x4A */ DSNAP_TYPE_UNK4A, + /* 0x4B */ DSNAP_TYPE_UNK4B, + /* 0x4C */ DSNAP_TYPE_UNK4C, + /* 0x4D */ DSNAP_TYPE_UNK4D, + /* 0x4E */ DSNAP_TYPE_UNK4E, + /* 0x4F */ DSNAP_TYPE_UNK4F, + /* 0x50 */ DSNAP_TYPE_UNK50, + /* 0x51 */ DSNAP_TYPE_UNK51, + /* 0x52 */ DSNAP_TYPE_UNK52, + /* 0x53 */ DSNAP_TYPE_UNK53, + /* 0x54 */ DSNAP_TYPE_UNK54, + /* 0x55 */ DSNAP_TYPE_KAMOME, + /* 0x56 */ DSNAP_TYPE_UNK56, + /* 0x57 */ DSNAP_TYPE_UNK57, + /* 0x58 */ DSNAP_TYPE_UNK58, + /* 0x59 */ DSNAP_TYPE_UNK59, + /* 0x5A */ DSNAP_TYPE_UNK5A, + /* 0x5B */ DSNAP_TYPE_UNK5B, + /* 0x5C */ DSNAP_TYPE_UNK5C, + /* 0x5D */ DSNAP_TYPE_UNK5D, + /* 0x5E */ DSNAP_TYPE_UNK5E, + /* 0x5F */ DSNAP_TYPE_UNK5F, + /* 0x60 */ DSNAP_TYPE_UNK60, + /* 0x61 */ DSNAP_TYPE_UNK61, + /* 0x62 */ DSNAP_TYPE_UNK62, + /* 0x63 */ DSNAP_TYPE_UNK63, + /* 0x64 */ DSNAP_TYPE_UNK64, + /* 0x65 */ DSNAP_TYPE_UNK65, + /* 0x66 */ DSNAP_TYPE_UNK66, + /* 0x67 */ DSNAP_TYPE_UNK67, + /* 0x68 */ DSNAP_TYPE_UNK68, + /* 0x69 */ DSNAP_TYPE_UNK69, + /* 0x6A */ DSNAP_TYPE_UNK6A, + /* 0x6B */ DSNAP_TYPE_UNK6B, + /* 0x6C */ DSNAP_TYPE_UNK6C, + /* 0x6D */ DSNAP_TYPE_UNK6D, + /* 0x6E */ DSNAP_TYPE_UNK6E, + /* 0x6F */ DSNAP_TYPE_UNK6F, + /* 0x70 */ DSNAP_TYPE_UNK70, + /* 0x71 */ DSNAP_TYPE_UNK71, + /* 0x72 */ DSNAP_TYPE_UNK72, + /* 0x73 */ DSNAP_TYPE_UNK73, + /* 0x74 */ DSNAP_TYPE_UNK74, + /* 0x75 */ DSNAP_TYPE_UNK75, + /* 0x76 */ DSNAP_TYPE_UNK76, + /* 0x77 */ DSNAP_TYPE_UNK77, + /* 0x78 */ DSNAP_TYPE_UNK78, + /* 0x79 */ DSNAP_TYPE_UNK79, + /* 0x7A */ DSNAP_TYPE_UNK7A, + /* 0x7B */ DSNAP_TYPE_UNK7B, + /* 0x7C */ DSNAP_TYPE_UNK7C, + /* 0x7D */ DSNAP_TYPE_UNK7D, + /* 0x7E */ DSNAP_TYPE_UNK7E, + /* 0x7F */ DSNAP_TYPE_UNK7F, + /* 0x80 */ DSNAP_TYPE_UNK80, + /* 0x81 */ DSNAP_TYPE_UNK81, + /* 0x82 */ DSNAP_TYPE_UNK82, + /* 0x83 */ DSNAP_TYPE_UNK83, + /* 0x84 */ DSNAP_TYPE_UNK84, + /* 0x85 */ DSNAP_TYPE_UNK85, + /* 0x86 */ DSNAP_TYPE_UNK86, + /* 0x87 */ DSNAP_TYPE_UNK87, + /* 0x88 */ DSNAP_TYPE_UNK88, + /* 0x89 */ DSNAP_TYPE_UNK89, + /* 0x8A */ DSNAP_TYPE_MD, + /* 0x8B */ DSNAP_TYPE_UNK8B, + /* 0x8C */ DSNAP_TYPE_UNK8C, + /* 0x8D */ DSNAP_TYPE_UNK8D, + /* 0x8E */ DSNAP_TYPE_UNK8E, + /* 0x8F */ DSNAP_TYPE_UNK8F, + /* 0x90 */ DSNAP_TYPE_UNK90, + /* 0x91 */ DSNAP_TYPE_UNK91, + /* 0x92 */ DSNAP_TYPE_UNK92, + /* 0x93 */ DSNAP_TYPE_UNK93, + /* 0x94 */ DSNAP_TYPE_UNK94, + /* 0x95 */ DSNAP_TYPE_UNK95, + /* 0x96 */ DSNAP_TYPE_UNK96, + /* 0x97 */ DSNAP_TYPE_UNK97, + /* 0x98 */ DSNAP_TYPE_UNK98, + /* 0x99 */ DSNAP_TYPE_DR, + /* 0x9A */ DSNAP_TYPE_UNK9A, + /* 0x9B */ DSNAP_TYPE_UNK9B, + /* 0x9C */ DSNAP_TYPE_UNK9C, + /* 0x9D */ DSNAP_TYPE_UNK9D, + /* 0x9E */ DSNAP_TYPE_UNK9E, + /* 0x9F */ DSNAP_TYPE_UNK9F, + /* 0xA0 */ DSNAP_TYPE_UNKA0, + /* 0xA1 */ DSNAP_TYPE_UNKA1, + /* 0xA2 */ DSNAP_TYPE_UNKA2, + /* 0xA3 */ DSNAP_TYPE_UNKA3, + /* 0xA4 */ DSNAP_TYPE_UNKA4, + /* 0xA5 */ DSNAP_TYPE_UNKA5, + /* 0xA6 */ DSNAP_TYPE_UNKA6, + /* 0xA7 */ DSNAP_TYPE_UNKA7, + /* 0xA8 */ DSNAP_TYPE_UNKA8, + /* 0xA9 */ DSNAP_TYPE_UNKA9, + /* 0xAA */ DSNAP_TYPE_UNKAA, + /* 0xAB */ DSNAP_TYPE_UNKAB, + /* 0xAC */ DSNAP_TYPE_UNKAC, + /* 0xAD */ DSNAP_TYPE_UNKAD, + /* 0xAE */ DSNAP_TYPE_UNKAE, + /* 0xAF */ DSNAP_TYPE_UNKAF, + /* 0xB0 */ DSNAP_TYPE_UNKB0, + /* 0xB1 */ DSNAP_TYPE_UNKB1, + /* 0xB2 */ DSNAP_TYPE_UNKB2, + /* 0xB3 */ DSNAP_TYPE_UNKB3, + /* 0xB4 */ DSNAP_TYPE_UNKB4, + /* 0xB5 */ DSNAP_TYPE_UNKB5, + /* 0xB6 */ DSNAP_TYPE_AM2, + /* 0xB7 */ DSNAP_TYPE_AM, + /* 0xB8 */ DSNAP_TYPE_UNKB8, + /* 0xB9 */ DSNAP_TYPE_RD, + /* 0xBA */ DSNAP_TYPE_UNKBA, + /* 0xBB */ DSNAP_TYPE_UNKBB, + /* 0xBC */ DSNAP_TYPE_UNKBC, + /* 0xBD */ DSNAP_TYPE_UNKBD, + /* 0xBE */ DSNAP_TYPE_UNKBE, + /* 0xBF */ DSNAP_TYPE_UNKBF, + /* 0xC0 */ DSNAP_TYPE_UNKC0, + /* 0xC1 */ DSNAP_TYPE_UNKC1, + /* 0xC2 */ DSNAP_TYPE_UNKC2, + /* 0xC3 */ DSNAP_TYPE_UNKC3, + /* 0xC4 */ DSNAP_TYPE_UNKC4, + /* 0xC5 */ DSNAP_TYPE_UNKC5, + /* 0xC6 */ DSNAP_TYPE_UNKC6, + /* 0xC7 */ DSNAP_TYPE_UNKC7, + /* 0xC8 */ DSNAP_TYPE_UNKC8, + /* 0xC9 */ DSNAP_TYPE_UNKC9, + /* 0xCA */ DSNAP_TYPE_UNKCA, + /* 0xCB */ DSNAP_TYPE_UNKCB, + /* 0xCC */ DSNAP_TYPE_UNKCC, + /* 0xCD */ DSNAP_TYPE_UNKCD, + /* 0xCE */ DSNAP_TYPE_UNKCE, + /* 0xCF */ DSNAP_TYPE_UNKCF, + /* 0xD0 */ DSNAP_TYPE_LAST_INDEX, +}; + class dSnap_Obj { public: /* 0x00 */ cXyz mCenter; /* 0x0C */ f32 mRadius; /* 0x10 */ f32 mHeight; - /* 0x14 */ s32 mActorPID; + /* 0x14 */ u32 mActorPID; /* 0x18 */ u8 mPhoto; /* 0x19 */ u8 field_0x19; /* 0x1A */ u8 field_0x1a; /* 0x1B */ u8 field_0x1b; - /* 0x1C */ s16 field_0x1c; + /* 0x1C */ s16 mCullAngle; /* 0x1E */ s16 mAngleY; - /* 0x20 */ s32 field_0x20; - /* 0x24 */ f32 field_0x24; + /* 0x20 */ s32 mCapturedPixels; + /* 0x24 */ f32 mCapturedRatio; /* 0x28 */ s16 mMinX; /* 0x2A */ s16 mMinY; /* 0x2C */ s16 mMaxX; diff --git a/include/dolphin/gx/GX.h b/include/dolphin/gx/GX.h index 244b146ab..9e4dc1bfc 100644 --- a/include/dolphin/gx/GX.h +++ b/include/dolphin/gx/GX.h @@ -116,7 +116,7 @@ inline void GXTexCoord2s8(s8 x, s8 y) { GFX_FIFO(s8) = y; } -inline void i_GXTexCoord2u16(u16 x, u16 y) { +inline void GXTexCoord2u16(u16 x, u16 y) { GFX_FIFO(u16) = x; GFX_FIFO(u16) = y; } diff --git a/src/d/actor/d_a_am.cpp b/src/d/actor/d_a_am.cpp index c84cf490b..ee0d984a1 100644 --- a/src/d/actor/d_a_am.cpp +++ b/src/d/actor/d_a_am.cpp @@ -138,7 +138,7 @@ static void draw_SUB(am_class* i_this) { static BOOL daAM_Draw(am_class* i_this) { g_env_light.setLightTevColorType(i_this->mpMorf->getModel(), &i_this->mTevStr); - dSnap_RegistFig(0xB7, i_this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_AM, i_this, 1.0f, 1.0f, 1.0f); i_this->mpMorf->entryDL(); diff --git a/src/d/actor/d_a_am2.cpp b/src/d/actor/d_a_am2.cpp index 802d45123..dffdf2711 100644 --- a/src/d/actor/d_a_am2.cpp +++ b/src/d/actor/d_a_am2.cpp @@ -117,7 +117,7 @@ static BOOL daAM2_Draw(am2_class* i_this) { J3DModel* model = i_this->mpMorf->getModel(); g_env_light.setLightTevColorType(model, &i_this->mTevStr); - dSnap_RegistFig(0xB6, i_this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_AM2, i_this, 1.0f, 1.0f, 1.0f); i_this->mpBrkAnm->entry(model->getModelData()); i_this->mpBtkAnm->entry(model->getModelData()); diff --git a/src/d/actor/d_a_dr.cpp b/src/d/actor/d_a_dr.cpp index 7d2d03a3c..c79690f30 100644 --- a/src/d/actor/d_a_dr.cpp +++ b/src/d/actor/d_a_dr.cpp @@ -53,7 +53,7 @@ static BOOL daDr_Draw(dr_class* i_this) { g_env_light.settingTevStruct(TEV_TYPE_ACTOR, &i_this->current.pos, &i_this->mTevStr); g_env_light.setLightTevColorType(model, &i_this->mTevStr); i_this->mpMorf->entryDL(); - dSnap_RegistFig(0x99, i_this, i_this->mEyePos, i_this->shape_angle.y, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_DR, i_this, i_this->mEyePos, i_this->shape_angle.y, 1.0f, 1.0f, 1.0f); return TRUE; } diff --git a/src/d/actor/d_a_npc_kamome.cpp b/src/d/actor/d_a_npc_kamome.cpp index 5d9a47e68..30fc5e904 100644 --- a/src/d/actor/d_a_npc_kamome.cpp +++ b/src/d/actor/d_a_npc_kamome.cpp @@ -1401,7 +1401,7 @@ BOOL daNpc_kam_c::draw() { 0, 1.0f, dDlst_shadowControl_c::getSimpleTex() ); - dSnap_RegistFig(0x55, this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_KAMOME, this, 1.0f, 1.0f, 1.0f); return TRUE; } diff --git a/src/d/actor/d_a_npc_md.cpp b/src/d/actor/d_a_npc_md.cpp index ee3062f11..c15c06e23 100644 --- a/src/d/actor/d_a_npc_md.cpp +++ b/src/d/actor/d_a_npc_md.cpp @@ -2338,7 +2338,7 @@ BOOL daNpc_Md_c::draw() { } } - dSnap_RegistFig(0x8A, this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_MD, this, 1.0f, 1.0f, 1.0f); return TRUE; } diff --git a/src/d/actor/d_a_rd.cpp b/src/d/actor/d_a_rd.cpp index e6f2f3a56..bef1153e7 100644 --- a/src/d/actor/d_a_rd.cpp +++ b/src/d/actor/d_a_rd.cpp @@ -1757,7 +1757,7 @@ bool daRd_c::_draw() { 0, 1.0f, dDlst_shadowControl_c::getSimpleTex() ); - dSnap_RegistFig(0xB9, this, 1.0f, 1.0f, 1.0f); + dSnap_RegistFig(DSNAP_TYPE_RD, this, 1.0f, 1.0f, 1.0f); return true; } diff --git a/src/d/d_snap.cpp b/src/d/d_snap.cpp index 23f44098a..2876e7e84 100644 --- a/src/d/d_snap.cpp +++ b/src/d/d_snap.cpp @@ -35,27 +35,1407 @@ struct CharaData { /* 0x00 */ SVec offset; /* 0x06 */ s16 radius; /* 0x08 */ s16 height; - /* 0x0A */ u16 m0A; - /* 0x0C */ s16 m0C; - /* 0x0E */ u16 m0E; - /* 0x10 */ u8 room; + /* 0x0A */ u16 minRatio; + /* 0x0C */ s16 cullAngle; + /* 0x0E */ u16 minPixels; + /* 0x10 */ u8 figRoom; + /* 0x11 */ u8 m11; }; // Size: 0x12 -static const CharaData l_CharaData[0x86] = { - // TODO +static const CharaData l_CharaData[] = { + + { // 0x00 + /* offset */ {0, 10, 0}, + /* radius */ 25, + /* height */ 80, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x01 + /* offset */ {0, 20, 20}, + /* radius */ 40, + /* height */ 90, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x02 + /* offset */ {0, 10, 0}, + /* radius */ 35, + /* height */ 130, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x03 + /* offset */ {0, 10, 10}, + /* radius */ 50, + /* height */ 130, + /* minRatio */ 300, + /* cullAngle */ 0x7FFF, + /* minPixels */ 3000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x04 + /* offset */ {0, 20, 0}, + /* radius */ 45, + /* height */ 160, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 2000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x05 + /* offset */ {0, -30, 0}, + /* radius */ 30, + /* height */ 60, + /* minRatio */ 500, + /* cullAngle */ 0x3FFF, + /* minPixels */ 2000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x06 + /* offset */ {0, 20, 20}, + /* radius */ 55, + /* height */ 140, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x07 + /* offset */ {0, 20, 20}, + /* radius */ 35, + /* height */ 150, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x08 + /* offset */ {0, 10, 0}, + /* radius */ 25, + /* height */ 70, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x09 + /* offset */ {0, 10, 0}, + /* radius */ 25, + /* height */ 70, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x03, + /* m11 */ 0x02, + }, + { // 0x0A + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x03, + /* m11 */ 0x0C, + }, + { // 0x0B + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 60, + /* minRatio */ 400, + /* cullAngle */ 0x3E80, + /* minPixels */ 4000, + /* figRoom */ 0x03, + /* m11 */ 0x00, + }, + { // 0x0C + /* offset */ {0, -40, 0}, + /* radius */ 60, + /* height */ 80, + /* minRatio */ 300, + /* cullAngle */ 0x7FFF, + /* minPixels */ 3000, + /* figRoom */ 0x03, + /* m11 */ 0x00, + }, + { // 0x0D + /* offset */ {0, 0, 0}, + /* radius */ 20, + /* height */ 20, + /* minRatio */ 400, + /* cullAngle */ 0x7D00, + /* minPixels */ 3000, + /* figRoom */ 0x03, + /* m11 */ 0x00, + }, + { // 0x0E + /* offset */ {0, 30, 0}, + /* radius */ 50, + /* height */ 120, + /* minRatio */ 200, + /* cullAngle */ 0x4650, + /* minPixels */ 3000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x0F + /* offset */ {0, 10, 0}, + /* radius */ 35, + /* height */ 120, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x10 + /* offset */ {0, 10, 20}, + /* radius */ 60, + /* height */ 160, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x11 + /* offset */ {0, 10, 0}, + /* radius */ 50, + /* height */ 140, + /* minRatio */ 500, + /* cullAngle */ 0x55F0, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x12 + /* offset */ {0, 10, 20}, + /* radius */ 60, + /* height */ 200, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x13 + /* offset */ {0, 90, 30}, + /* radius */ 60, + /* height */ 120, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x14 + /* offset */ {0, 75, 30}, + /* radius */ 40, + /* height */ 80, + /* minRatio */ 550, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x15 + /* offset */ {0, 20, 0}, + /* radius */ 80, + /* height */ 180, + /* minRatio */ 550, + /* cullAngle */ 0x4A38, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x16 + /* offset */ {0, 15, 0}, + /* radius */ 60, + /* height */ 135, + /* minRatio */ 550, + /* cullAngle */ 0x32C8, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x17 + /* offset */ {0, 15, 0}, + /* radius */ 50, + /* height */ 155, + /* minRatio */ 550, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x18 + /* offset */ {0, 10, 0}, + /* radius */ 30, + /* height */ 80, + /* minRatio */ 550, + /* cullAngle */ 0x32C8, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x19 + /* offset */ {0, 5, 0}, + /* radius */ 30, + /* height */ 80, + /* minRatio */ 550, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x1A + /* offset */ {0, 5, 10}, + /* radius */ 45, + /* height */ 180, + /* minRatio */ 550, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x1B + /* offset */ {0, 20, 0}, + /* radius */ 45, + /* height */ 160, + /* minRatio */ 550, + /* cullAngle */ 0x5208, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x1C + /* offset */ {0, 10, 10}, + /* radius */ 45, + /* height */ 130, + /* minRatio */ 550, + /* cullAngle */ 0x2AF8, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x1D + /* offset */ {0, 80, 0}, + /* radius */ 35, + /* height */ 80, + /* minRatio */ 500, + /* cullAngle */ 0x4650, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x1E + /* offset */ {0, 80, 0}, + /* radius */ 40, + /* height */ 85, + /* minRatio */ 550, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x1F + /* offset */ {0, 30, 10}, + /* radius */ 45, + /* height */ 115, + /* minRatio */ 550, + /* cullAngle */ 0x55F0, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x20 + /* offset */ {0, 10, 0}, + /* radius */ 45, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x4268, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x21 + /* offset */ {0, 10, 10}, + /* radius */ 45, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2710, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x22 + /* offset */ {0, 10, 10}, + /* radius */ 45, + /* height */ 145, + /* minRatio */ 550, + /* cullAngle */ 0x3A98, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x23 + /* offset */ {0, 20, 10}, + /* radius */ 45, + /* height */ 145, + /* minRatio */ 550, + /* cullAngle */ 0x3E80, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x24 + /* offset */ {0, 20, 10}, + /* radius */ 45, + /* height */ 145, + /* minRatio */ 550, + /* cullAngle */ 0x3E80, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x25 + /* offset */ {0, 30, 35}, + /* radius */ 80, + /* height */ 160, + /* minRatio */ 550, + /* cullAngle */ 0x3A98, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x26 + /* offset */ {0, 30, 30}, + /* radius */ 75, + /* height */ 170, + /* minRatio */ 550, + /* cullAngle */ 0x2328, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x27 + /* offset */ {0, 30, 30}, + /* radius */ 75, + /* height */ 170, + /* minRatio */ 550, + /* cullAngle */ 0x2328, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x28 + /* offset */ {0, 30, 30}, + /* radius */ 75, + /* height */ 170, + /* minRatio */ 550, + /* cullAngle */ 0x2328, + /* minPixels */ 5000, + /* figRoom */ 0x02, + /* m11 */ 0x02, + }, + { // 0x29 + /* offset */ {0, 20, 0}, + /* radius */ 30, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 4000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x2A + /* offset */ {0, 30, 0}, + /* radius */ 50, + /* height */ 160, + /* minRatio */ 500, + /* cullAngle */ 0x2EE0, + /* minPixels */ 4500, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x2B + /* offset */ {0, 30, 0}, + /* radius */ 50, + /* height */ 160, + /* minRatio */ 500, + /* cullAngle */ 0x2EE0, + /* minPixels */ 4500, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x2C + /* offset */ {0, 30, 0}, + /* radius */ 50, + /* height */ 160, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 4500, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x2D + /* offset */ {0, 20, 10}, + /* radius */ 50, + /* height */ 80, + /* minRatio */ 500, + /* cullAngle */ 0x2EE0, + /* minPixels */ 4500, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x2E + /* offset */ {0, 10, 0}, + /* radius */ 50, + /* height */ 90, + /* minRatio */ 500, + /* cullAngle */ 0x32C8, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x2F + /* offset */ {0, 20, 10}, + /* radius */ 50, + /* height */ 80, + /* minRatio */ 500, + /* cullAngle */ 0x2EE0, + /* minPixels */ 4500, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x30 + /* offset */ {0, 10, 0}, + /* radius */ 55, + /* height */ 120, + /* minRatio */ 550, + /* cullAngle */ 0x55F0, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x31 + /* offset */ {0, 10, 0}, + /* radius */ 55, + /* height */ 120, + /* minRatio */ 550, + /* cullAngle */ 0x55F0, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x32 + /* offset */ {0, 10, 0}, + /* radius */ 55, + /* height */ 120, + /* minRatio */ 550, + /* cullAngle */ 0x55F0, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x33 + /* offset */ {0, 10, 0}, + /* radius */ 55, + /* height */ 120, + /* minRatio */ 550, + /* cullAngle */ 0x55F0, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x34 + /* offset */ {0, 0, 0}, + /* radius */ 80, + /* height */ 120, + /* minRatio */ 200, + /* cullAngle */ 0x7FFF, + /* minPixels */ 2000, + /* figRoom */ 0x01, + /* m11 */ 0x00, + }, + { // 0x35 + /* offset */ {0, 30, 10}, + /* radius */ 80, + /* height */ 150, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 3000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x36 + /* offset */ {0, 20, 20}, + /* radius */ 40, + /* height */ 120, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x37 + /* offset */ {0, 20, 30}, + /* radius */ 40, + /* height */ 90, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x38 + /* offset */ {0, 100, 40}, + /* radius */ 50, + /* height */ 60, + /* minRatio */ 500, + /* cullAngle */ 0x4268, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x39 + /* offset */ {0, 10, 0}, + /* radius */ 65, + /* height */ 200, + /* minRatio */ 550, + /* cullAngle */ 0x2AF8, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x3A + /* offset */ {0, 50, 0}, + /* radius */ 300, + /* height */ 400, + /* minRatio */ 100, + /* cullAngle */ 0x7FFF, + /* minPixels */ 4000, + /* figRoom */ 0x01, + /* m11 */ 0x00, + }, + { // 0x3B + /* offset */ {0, 0, 0}, + /* radius */ 25, + /* height */ 25, + /* minRatio */ 550, + /* cullAngle */ 0x2AF8, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x00, + }, + { // 0x3C + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x0C, + }, + { // 0x3D + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x0C, + }, + { // 0x3E + /* offset */ {0, 10, 0}, + /* radius */ 35, + /* height */ 120, + /* minRatio */ 550, + /* cullAngle */ 0x2AF8, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x02, + }, + { // 0x3F + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x0E, + }, + { // 0x40 + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x01, + /* m11 */ 0x0C, + }, + { // 0x41 + /* offset */ {0, 20, 0}, + /* radius */ 30, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2710, + /* minPixels */ 4000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x42 + /* offset */ {0, 10, 0}, + /* radius */ 30, + /* height */ 60, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 2000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x43 + /* offset */ {0, 20, 0}, + /* radius */ 60, + /* height */ 200, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x44 + /* offset */ {0, 20, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 500, + /* cullAngle */ 0x2EE0, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x45 + /* offset */ {0, 20, 25}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x46 + /* offset */ {0, 20, 25}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x47 + /* offset */ {0, 20, 25}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x48 + /* offset */ {0, 20, 25}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x49 + /* offset */ {0, 20, 25}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x4A + /* offset */ {0, 20, 25}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x4B + /* offset */ {0, 20, 10}, + /* radius */ 50, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x4C + /* offset */ {0, 20, 10}, + /* radius */ 50, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x4D + /* offset */ {0, 90, 30}, + /* radius */ 60, + /* height */ 90, + /* minRatio */ 500, + /* cullAngle */ VERSION_SELECT(0x2000, 0x6000, 0x6000), + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x4E + /* offset */ {0, 20, 25}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x4F + /* offset */ {0, 30, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x02, + }, + { // 0x50 + /* offset */ {0, -300, 0}, + /* radius */ 870, + /* height */ 700, + /* minRatio */ 100, + /* cullAngle */ 0x6000, + /* minPixels */ 3000, + /* figRoom */ 0x06, + /* m11 */ 0x00, + }, + { // 0x51 + /* offset */ {0, 0, 0}, + /* radius */ 1000, + /* height */ 800, + /* minRatio */ 100, + /* cullAngle */ 0x4650, + /* minPixels */ 1000, + /* figRoom */ 0x06, + /* m11 */ 0x00, + }, + { // 0x52 + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x06, + /* m11 */ 0x0E, + }, + { // 0x53 + /* offset */ {0, 0, 0}, + /* radius */ 40, + /* height */ 55, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x54 + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x55 + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x56 + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x57 + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x58 + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x59 + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x5A + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x5B + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x5C + /* offset */ {0, 15, 0}, + /* radius */ 40, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x5D + /* offset */ {0, 700, 800}, + /* radius */ 200, + /* height */ 200, + /* minRatio */ 300, + /* cullAngle */ 0x7FFF, + /* minPixels */ 3000, + /* figRoom */ 0x07, + /* m11 */ 0x00, + }, + { // 0x5E + /* offset */ {0, 85, 0}, + /* radius */ 70, + /* height */ 80, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x07, + /* m11 */ 0x02, + }, + { // 0x5F + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x07, + /* m11 */ 0x06, + }, + { // 0x60 + /* offset */ {0, 0, 0}, + /* radius */ 50, + /* height */ 150, + /* minRatio */ 550, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x07, + /* m11 */ 0x0E, + }, + { // 0x61 + /* offset */ {0, 20, 80}, + /* radius */ 60, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 5000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x62 + /* offset */ {0, 10, 20}, + /* radius */ 60, + /* height */ 100, + /* minRatio */ 400, + /* cullAngle */ 0x3E80, + /* minPixels */ 4000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x63 + /* offset */ {0, 20, 20}, + /* radius */ 40, + /* height */ 50, + /* minRatio */ 500, + /* cullAngle */ 0x2000, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x64 + /* offset */ {0, 0, 0}, + /* radius */ 60, + /* height */ 60, + /* minRatio */ 200, + /* cullAngle */ 0x7530, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x65 + /* offset */ {0, -25, 30}, + /* radius */ 40, + /* height */ 60, + /* minRatio */ 300, + /* cullAngle */ 0x4E20, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x66 + /* offset */ {0, -40, 50}, + /* radius */ 50, + /* height */ 80, + /* minRatio */ 300, + /* cullAngle */ 0x2EE0, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x67 + /* offset */ {0, -50, 0}, + /* radius */ 50, + /* height */ 100, + /* minRatio */ 200, + /* cullAngle */ 0x4000, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x68 + /* offset */ {0, -80, 0}, + /* radius */ 80, + /* height */ 120, + /* minRatio */ 300, + /* cullAngle */ 0x7FFF, + /* minPixels */ 2000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x69 + /* offset */ {0, 30, 0}, + /* radius */ 120, + /* height */ 50, + /* minRatio */ 100, + /* cullAngle */ 0x2AF8, + /* minPixels */ 2000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x6A + /* offset */ {0, -30, 0}, + /* radius */ 30, + /* height */ 60, + /* minRatio */ 300, + /* cullAngle */ 0x7FFF, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x6B + /* offset */ {0, -20, 0}, + /* radius */ 60, + /* height */ 100, + /* minRatio */ 400, + /* cullAngle */ 0x7FFF, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x6C + /* offset */ {10, -50, 0}, + /* radius */ 60, + /* height */ 100, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x6D + /* offset */ {0, 10, 10}, + /* radius */ 60, + /* height */ 130, + /* minRatio */ 500, + /* cullAngle */ 0x2AF8, + /* minPixels */ 4000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x6E + /* offset */ {0, 20, 20}, + /* radius */ 130, + /* height */ 300, + /* minRatio */ 500, + /* cullAngle */ 0x2EE0, + /* minPixels */ 5000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x6F + /* offset */ {0, 20, 20}, + /* radius */ 80, + /* height */ 160, + /* minRatio */ 400, + /* cullAngle */ 0x2EE0, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x70 + /* offset */ {0, 20, 50}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 300, + /* cullAngle */ 0x4650, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x71 + /* offset */ {0, 20, 50}, + /* radius */ 70, + /* height */ 170, + /* minRatio */ 200, + /* cullAngle */ 0x4650, + /* minPixels */ 2000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x72 + /* offset */ {0, 0, 0}, + /* radius */ 400, + /* height */ 400, + /* minRatio */ 200, + /* cullAngle */ 0x7530, + /* minPixels */ 3000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x73 + /* offset */ {0, 0, 0}, + /* radius */ 200, + /* height */ 170, + /* minRatio */ 300, + /* cullAngle */ 0x7FBC, + /* minPixels */ 2000, + /* figRoom */ 0x05, + /* m11 */ 0x00, + }, + { // 0x74 + /* offset */ {0, 20, 50}, + /* radius */ 100, + /* height */ 140, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x75 + /* offset */ {0, -120, 0}, + /* radius */ 100, + /* height */ 100, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x76 + /* offset */ {0, 10, 10}, + /* radius */ 100, + /* height */ 200, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x77 + /* offset */ {0, 10, 10}, + /* radius */ 100, + /* height */ 200, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x78 + /* offset */ {0, 10, 10}, + /* radius */ 100, + /* height */ 200, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x79 + /* offset */ {0, 10, 10}, + /* radius */ 100, + /* height */ 250, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x7A + /* offset */ {0, 20, 10}, + /* radius */ 70, + /* height */ 210, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 3000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x7B + /* offset */ {0, 20, 30}, + /* radius */ 70, + /* height */ 150, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 3000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x7C + /* offset */ {0, 20, 30}, + /* radius */ 70, + /* height */ 150, + /* minRatio */ 300, + /* cullAngle */ 0x2AF8, + /* minPixels */ 3000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x7D + /* offset */ {0, 200, 0}, + /* radius */ 1000, + /* height */ 1200, + /* minRatio */ 100, + /* cullAngle */ 0x6D60, + /* minPixels */ 1000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x7E + /* offset */ {0, -200, 0}, + /* radius */ 360, + /* height */ 450, + /* minRatio */ 500, + /* cullAngle */ 0x4E20, + /* minPixels */ 500, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x7F + /* offset */ {0, 0, 0}, + /* radius */ 400, + /* height */ 380, + /* minRatio */ 300, + /* cullAngle */ 0x7D00, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x80 + /* offset */ {0, 0, 50}, + /* radius */ 350, + /* height */ 400, + /* minRatio */ 100, + /* cullAngle */ 0x4650, + /* minPixels */ 1000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x81 + /* offset */ {0, 200, 50}, + /* radius */ 300, + /* height */ 550, + /* minRatio */ 200, + /* cullAngle */ 0x3E80, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x82 + /* offset */ {0, 200, 50}, + /* radius */ 350, + /* height */ 400, + /* minRatio */ 200, + /* cullAngle */ 0x3E80, + /* minPixels */ 4000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x83 + /* offset */ {0, 100, 30}, + /* radius */ 500, + /* height */ 300, + /* minRatio */ 200, + /* cullAngle */ 0x3E80, + /* minPixels */ 2000, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x84 + /* offset */ {0, 400, 0}, + /* radius */ 800, + /* height */ 800, + /* minRatio */ 200, + /* cullAngle */ 0x4650, + /* minPixels */ 1500, + /* figRoom */ 0x04, + /* m11 */ 0x00, + }, + { // 0x85 + /* offset */ {0, 10, 0}, + /* radius */ 130, + /* height */ 280, + /* minRatio */ 200, + /* cullAngle */ 0x4650, + /* minPixels */ 1200, + /* figRoom */ 0x04, + /* m11 */ 0x0A, + }, }; -static const int CharaDataTblSize = 0x86; -static const int DSNAP_TYPE_LAST_INDEX = 0xD0; +static const int CharaDataTblSize = ARRAY_SIZE(l_CharaData); -static const Vec cylvtx[5] = { - // TODO +// The coordinates in pixels on the screen representing where the player can see while looking through the Picto Box. +static const int DSNAP_SHUTTER_LEFT = 174; +static const int DSNAP_SHUTTER_RIGHT = 468; +static const int DSNAP_SHUTTER_TOP = 86; +static const int DSNAP_SHUTTER_BOTTOM = 284; + +static const Vec cylvtx[] = { + {0.0f, 0.0f, 1.0f}, + {0.707099974155426f, 0.0f, 0.707099974155426f}, + {1.0f, 0.0f, 0.0f}, + {0.707099974155426f, 0.0f, -0.707099974155426f}, + {0.0f, 0.0f, -1.0f}, }; -static const Vec vdata[12] = { - // TODO +static const Vec vdata[] = { + {-0.525731086730957f, 0.0f, 0.8506507873535156f}, + {0.525731086730957f, 0.0f, 0.8506507873535156f}, + {-0.525731086730957f, 0.0f, -0.8506507873535156f}, + {0.525731086730957f, 0.0f, -0.8506507873535156f}, + {0.0f, 0.8506507873535156f, 0.525731086730957f}, + {0.0f, 0.8506507873535156f, -0.525731086730957f}, + {0.0f, -0.8506507873535156f, 0.525731086730957f}, + {0.0f, -0.8506507873535156f, -0.525731086730957f}, + {0.8506507873535156f, 0.525731086730957f, 0.0f}, + {-0.8506507873535156f, 0.525731086730957f, 0.0f}, + {0.8506507873535156f, -0.525731086730957f, 0.0f}, + {-0.8506507873535156f, -0.525731086730957f, 0.0f}, }; -static const int tindices[20][3] = { - // TODO +static const int tindices[][3] = { + {0x0, 0x4, 0x1}, + {0x0, 0x9, 0x4}, + {0x9, 0x5, 0x4}, + {0x4, 0x5, 0x8}, + {0x4, 0x8, 0x1}, + {0x8, 0xA, 0x1}, + {0x8, 0x3, 0xA}, + {0x5, 0x3, 0x8}, + {0x5, 0x2, 0x3}, + {0x2, 0x7, 0x3}, + {0x7, 0xA, 0x3}, + {0x7, 0x6, 0xA}, + {0x7, 0xB, 0x6}, + {0xB, 0x0, 0x6}, + {0x0, 0x1, 0x6}, + {0x6, 0x1, 0xA}, + {0x9, 0x0, 0xB}, + {0x9, 0xB, 0x2}, + {0x9, 0x2, 0x5}, + {0x7, 0x2, 0xB}, }; /* 800CCF6C-800CCFE4 .text dSnap_PhotoIndex2TableIndex__Fi */ @@ -70,7 +1450,7 @@ u8 dSnap_GetFigRoomId(int r3) { if (r3 >= 0x86) { return 0xFF; } - return l_CharaData[r3].room; + return l_CharaData[r3].figRoom; } /* 800CD00C-800CD068 .text __ct__9dSnap_ObjFv */ @@ -80,10 +1460,10 @@ dSnap_Obj::dSnap_Obj() { field_0x19 = 4; field_0x1a = -1; field_0x1b = 0; - field_0x1c = 0x7FFF; + mCullAngle = 0x7FFF; mAngleY = 0; - field_0x20 = 0; - field_0x24 = 0.0f; + mCapturedPixels = 0; + mCapturedRatio = 0.0f; mMinX = 0; mMinY = 0; mMaxX = 0; @@ -208,7 +1588,7 @@ f32 dSnap_Obj::CalcArea2D() { mDoMtx_stack_c::transS(mCenter); mDoMtx_stack_c::scaleM(f29, f29, f29); - for (int i = 0; i < 0x14; i++) { + for (int i = 0; i < (s32)ARRAY_SIZE(tindices); i++) { sp8c.x = vdata[tindices[i][0]].x; sp8c.y = vdata[tindices[i][0]].y; sp8c.z = vdata[tindices[i][0]].z; @@ -294,7 +1674,7 @@ void dSnap_Obj::draw() { GXLoadPosMtxImm(mDoMtx_stack_c::get(), GX_PNMTX0); GXSetCurrentMtx(GX_PNMTX0); - for (int i = 0; i < 0x14; i++) { + for (int i = 0; i < (s32)ARRAY_SIZE(tindices); i++) { GXBegin(GX_TRIANGLES, GX_VTXFMT0, 3); GXPosition3f32(vdata[tindices[i][0]].x, vdata[tindices[i][0]].y, vdata[tindices[i][0]].z); GXPosition3f32(vdata[tindices[i][1]].x, vdata[tindices[i][1]].y, vdata[tindices[i][1]].z); @@ -322,12 +1702,12 @@ 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 r8) { +void dSnap_Obj::SetInf(u8 r4, const fopAc_ac_c* r5, u8 r6, u8 r7, s16 cullAngle) { mPhoto = r4; mActorPID = fpcM_GetID(r5); field_0x1a = r6; field_0x19 = r7; - field_0x1c = r8; + mCullAngle = cullAngle; } /* 800CDB94-800CDBB0 .text SetAreaClear__9dSnap_ObjFv */ @@ -360,8 +1740,8 @@ bool dSnap_Obj::ChkPhoto(int r4) { } /* 800CDC18-800CDC40 .text ChkSuccess__9dSnap_ObjFlf */ -bool dSnap_Obj::ChkSuccess(s32 r4, f32 f1) { - if (field_0x20 > r4 && field_0x24 > f1) { +bool dSnap_Obj::ChkSuccess(s32 minPixels, f32 minRatio) { + if (mCapturedPixels > minPixels && mCapturedRatio > minRatio) { return true; } return false; @@ -369,12 +1749,12 @@ bool dSnap_Obj::ChkSuccess(s32 r4, f32 f1) { /* 800CDC40-800CDCD8 .text ChkCamCull__9dSnap_ObjCFv */ bool dSnap_Obj::ChkCamCull() const { - if (!(field_0x1b & 1) && field_0x1c != 0x7FFF) { + if (!(field_0x1b & 1) && mCullAngle != 0x7FFF) { // TODO: is this VECSubtract supposed to be an inline? dSnap_Obj::GetLen? cXyz sp8; VECSubtract(&dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0))->mLookat.mEye, &mCenter, &sp8); s16 angle = cM_atan2s(sp8.x, sp8.z); - if (cLib_distanceAngleS(angle, mAngleY) > field_0x1c) { + if (cLib_distanceAngleS(angle, mAngleY) > mCullAngle) { return true; } } @@ -510,7 +1890,9 @@ void dSnap_packet::draw() { if (!ChkReleaseShutter()) { return; } +#if VERSION != VERSION_JPN j3dSys.reinitGX(); +#endif ClearAlphaBuffer(); dSnap_MatDl(); for (int col = 0; col < field_0x14; col++) { @@ -560,30 +1942,30 @@ void dSnap_packet::Judge() { GXDrawDone(); GXPokeAlphaRead(GX_READ_NONE); for (int col = 0; col < (s32)ARRAY_SIZE(m_tbl); col++) { - m_tbl[col].m_obj.field_0x20 = 0; + m_tbl[col].m_obj.mCapturedPixels = 0; m_tbl[col].m_obj.SetAreaClear(); } - for (int y = 0x56; y < 0x11C; y++) { - for (int x = 0xAE; x < 0x1D4; x++) { + for (int y = DSNAP_SHUTTER_TOP; y < DSNAP_SHUTTER_BOTTOM; y++) { + for (int x = DSNAP_SHUTTER_LEFT; x < DSNAP_SHUTTER_RIGHT; x++) { u32 sp8; GXPeekARGB(x, y, &sp8); int r0 = sp8 >> 26; if (r0 >= 0x3F) { continue; } - m_tbl[r0].m_obj.field_0x20++; + m_tbl[r0].m_obj.mCapturedPixels++; m_tbl[r0].m_obj.SetArea(x, y); } } for (int col = 0; col < field_0x14; col++) { - if (m_tbl[col].m_obj.field_0x20 == 0) { + if (m_tbl[col].m_obj.mCapturedPixels == 0) { continue; } f32 area = m_tbl[col].m_obj.CalcArea2D(); if (cM3d_IsZero(area)) { continue; } - m_tbl[col].m_obj.field_0x24 = m_tbl[col].m_obj.field_0x20 / area; + m_tbl[col].m_obj.mCapturedRatio = m_tbl[col].m_obj.mCapturedPixels / area; } SetResult(); mFlag &= ~1; @@ -723,21 +2105,21 @@ int dSnap_packet::JudgeFigure(int col) { return 0; } - int r5; - f32 f1; + int minPixels; + f32 minRatio; if (field_0x10 > 0x48) { int tableIndex = dSnap_PhotoIndex2TableIndex(field_0x10); - r5 = l_CharaData[tableIndex].m0E; - f1 = l_CharaData[tableIndex].m0A / 1000.0f; + minPixels = l_CharaData[tableIndex].minPixels; + minRatio = l_CharaData[tableIndex].minRatio / 1000.0f; } else { return 0; } - if (m_tbl[col].m_obj.field_0x20 < r5) { + if (m_tbl[col].m_obj.mCapturedPixels < minPixels) { return 0; } - if (m_tbl[col].m_obj.field_0x24 < f1) { + if (m_tbl[col].m_obj.mCapturedRatio < minRatio) { mResultDetail |= 2; } @@ -758,10 +2140,10 @@ void dSnap_packet::SetResult() { } int r30 = -1; for (int col = 0; col < field_0x14; col++) { - if (m_tbl[col].m_obj.field_0x20 == 0 || m_tbl[col].m_obj.GetPhoto() == 0) { + if (m_tbl[col].m_obj.mCapturedPixels == 0 || m_tbl[col].m_obj.GetPhoto() == 0) { continue; } - JUT_ASSERT(2327, 0 <= m_tbl[col].m_obj.GetPhoto() && m_tbl[col].m_obj.GetPhoto() < DSNAP_TYPE_LAST_INDEX); + JUT_ASSERT(VERSION_SELECT(2325, 2327, 2327), 0 <= m_tbl[col].m_obj.GetPhoto() && m_tbl[col].m_obj.GetPhoto() < DSNAP_TYPE_LAST_INDEX); if (m_tbl[col].m_obj.GetPhoto() < (s32)ARRAY_SIZE(sp8)) { if (sp8[m_tbl[col].m_obj.GetPhoto()] != 0) { continue; @@ -769,17 +2151,17 @@ void dSnap_packet::SetResult() { if (m_judge_tbl[m_tbl[col].m_obj.GetPhoto()] != NULL) { field_0x10 = m_tbl[col].m_obj.GetPhoto(); mResult = (this->*m_judge_tbl[m_tbl[col].m_obj.GetPhoto()])(); - r30 = m_tbl[col].m_obj.field_0x20; + r30 = m_tbl[col].m_obj.mCapturedPixels; if (mResult != 0) { return; } } sp8[m_tbl[col].m_obj.GetPhoto()] = 1; } else { - if (r30 < m_tbl[col].m_obj.field_0x20) { + if (r30 < m_tbl[col].m_obj.mCapturedPixels) { field_0x10 = m_tbl[col].m_obj.GetPhoto(); mResult = JudgeFigure(col); - r30 = m_tbl[col].m_obj.field_0x20; + r30 = m_tbl[col].m_obj.mCapturedPixels; } } } @@ -845,7 +2227,7 @@ void dSnap_RegistFig(u8 r3, fopAc_ac_c* actor, const Vec& pos, s16 angleY, f32 f dSnap_Obj sp20; sp20.SetGeo(sp14, chara.radius*f2, chara.height*f1, (int)angleY); - sp20.SetInf(r3, actor, 0, 4, chara.m0C); + sp20.SetInf(r3, actor, 0, 4, chara.cullAngle); dSnap_RegistSnapObj(sp20); }