diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index 10f8b550a..a5c1c5183 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -625,8 +625,6 @@ struct J3DBlend : public J3DBlendInfo { // void operator==(J3DBlend&) {} }; -extern const J3DFogInfo j3dDefaultFogInfo; - struct J3DFog : public J3DFogInfo { // J3DFog() { *getFogInfo() = j3dDefaultFogInfo; } // Produces the wrong codegen for mDoExt_backupMatBlock_c's constructor J3DFog() { J3DFogInfo::operator=(j3dDefaultFogInfo); } @@ -641,17 +639,6 @@ struct J3DFog : public J3DFogInfo { void setType(u8 type) { mType = type; } }; -struct J3DAlphaCompInfo { - /* 0x0 */ u8 mComp0; - /* 0x1 */ u8 mRef0; - /* 0x2 */ u8 mOp; - /* 0x3 */ u8 mComp1; - /* 0x4 */ u8 mRef1; - /* 0x5 */ u8 field_0x5; - /* 0x6 */ u8 field_0x6; - /* 0x7 */ u8 field_0x7; -}; - inline u16 calcAlphaCmpID(u8 comp0, u8 op, u8 comp1) { return (comp0 << 5) + (op << 3) + (comp1); } diff --git a/include/JSystem/J3DGraphBase/J3DStruct.h b/include/JSystem/J3DGraphBase/J3DStruct.h index 25868ce96..cfbda1b45 100644 --- a/include/JSystem/J3DGraphBase/J3DStruct.h +++ b/include/JSystem/J3DGraphBase/J3DStruct.h @@ -240,4 +240,15 @@ struct J3DZModeInfo { /* 0x03 */ u8 pad; }; +struct J3DAlphaCompInfo { + /* 0x0 */ u8 mComp0; + /* 0x1 */ u8 mRef0; + /* 0x2 */ u8 mOp; + /* 0x3 */ u8 mComp1; + /* 0x4 */ u8 mRef1; + /* 0x5 */ u8 field_0x5; + /* 0x6 */ u8 field_0x6; + /* 0x7 */ u8 field_0x7; +}; + #endif /* J3DSTRUCT_H */ diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index b67b71a35..c76bc0ab4 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -369,9 +369,12 @@ template<> struct TBox > { }; template -struct TBox2 : TBox > { +struct TBox2 : public TBox > { TBox2() {} - TBox2(const TVec2& i, const TVec2 f) { set(i, f); } + TBox2(const TVec2& _i, const TVec2& _f) { + TBox >::i.set(_i); + TBox >::f.set(_f); + } TBox2(f32 x0, f32 y0, f32 x1, f32 y1) { set(x0, y0, x1, y1); } void absolute() { diff --git a/include/JSystem/JParticle/JPAParticle.h b/include/JSystem/JParticle/JPAParticle.h index 1fb151e6e..67b396462 100644 --- a/include/JSystem/JParticle/JPAParticle.h +++ b/include/JSystem/JParticle/JPAParticle.h @@ -10,11 +10,8 @@ class JKRHeap; class JPABaseEmitter; class JPABaseParticle; -class JPAEmitterCallBack; class JPAEmitterManager; -class JPAParticleCallBack; class JPAResourceManager; -struct JPAEmitterWorkData; template class JPACallBackBase; diff --git a/include/SSystem/SComponent/c_sxyz.h b/include/SSystem/SComponent/c_sxyz.h index 82532a68f..c74f7817a 100644 --- a/include/SSystem/SComponent/c_sxyz.h +++ b/include/SSystem/SComponent/c_sxyz.h @@ -7,8 +7,7 @@ class csXyz : public SVec { public: static const csXyz Zero; ~csXyz() {} - /* inline */ csXyz() {} - /* inline */ csXyz(const csXyz& other) : SVec(other){}; + csXyz() {} csXyz(s16, s16, s16); csXyz operator+(csXyz&); void operator+=(csXyz&); diff --git a/src/d/actor/d_a_obj_pbco.cpp b/src/d/actor/d_a_obj_pbco.cpp index 399a20a1b..177d4b6c7 100644 --- a/src/d/actor/d_a_obj_pbco.cpp +++ b/src/d/actor/d_a_obj_pbco.cpp @@ -111,7 +111,7 @@ static BOOL daObj_PbcoExecute(void* i_this) { bool daObj_Pbco_c::_draw() { dKy_tevstr_c* pTevStr; - g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, pTevStr = &tevStr); + g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, pTevStr = &tevStr); // fakematch g_env_light.setLightTevColorType(mpModel, pTevStr); mDoExt_modelUpdateDL(mpModel); return TRUE; diff --git a/src/d/actor/d_a_obj_pbka.cpp b/src/d/actor/d_a_obj_pbka.cpp index 722766bed..3bffe3ec7 100644 --- a/src/d/actor/d_a_obj_pbka.cpp +++ b/src/d/actor/d_a_obj_pbka.cpp @@ -77,7 +77,7 @@ static BOOL daObjPbka_Delete(void* i_this) { bool daObjPbka_c::_draw() { dKy_tevstr_c * pTevStr; - g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, pTevStr = &tevStr); + g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, pTevStr = &tevStr); // fakematch g_env_light.setLightTevColorType(mpModel, pTevStr); dComIfGd_setListBG(); mDoExt_modelUpdateDL(mpModel); diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index 677258950..d01bbb158 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -1180,7 +1180,7 @@ u8 dSv_event_c::getEventReg(u16 i_reg) { /* 8005CB94-8005CBB0 .text init__13dSv_reserve_cFv */ void dSv_reserve_c::init() { - for (int i = 0; i < sizeof(dSv_reserve_c); i++) { + for (int i = 0; i < ARRAY_SIZE(mReserve); i++) { mReserve[i] = 0; } } diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index f45a659e3..623d80ffa 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -276,9 +276,9 @@ s32 fopAcM_createHeap(fopAc_ac_c* i_this, u32 size, u32 align) { align = 0x20; i_this->heap = mDoExt_createSolidHeapFromGameToCurrent(size, align); - if (i_this->heap == 0) { + if (i_this->heap == NULL) { OSReport_Error("fopAcM_createHeap 確保失敗\n"); - JUT_CONFIRM(0x34c, i_this->heap != 0); + JUT_CONFIRM(0x34c, i_this->heap != NULL); return FALSE; } diff --git a/src/m_Do/m_Do_MemCardRWmng.cpp b/src/m_Do/m_Do_MemCardRWmng.cpp index c4802656e..2cbad6fe1 100644 --- a/src/m_Do/m_Do_MemCardRWmng.cpp +++ b/src/m_Do/m_Do_MemCardRWmng.cpp @@ -15,6 +15,14 @@ #include #include +#if VERSION <= VERSION_JPN +#define HEADER_TITLE "ゼルダの伝説~風のタクト~" +#define HEADER_COMMENT "%d月%d日のセーブデータです" +#else +#define HEADER_TITLE "Zelda: The Wind Waker" +#define HEADER_COMMENT "%d/%d Save Data" +#endif + static u8 sTmpBuf[0x2000] ALIGN_DECL(32); static u8 sTmpBuf2[0x2000] ALIGN_DECL(32); static u32 sSaveCount; @@ -197,19 +205,11 @@ s32 mDoMemCdRWm_Restore2(CARDFileInfo* card) { /* 80019F4C-8001A0A8 .text mDoMemCdRWm_BuildHeader__FP22mDoMemCdRWm_HeaderData */ void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) { -#if VERSION <= VERSION_JPN - snprintf(header->comment, sizeof(header->comment), "ゼルダの伝説~風のタクト~"); -#else - snprintf(header->comment, sizeof(header->comment), "Zelda: The Wind Waker"); -#endif + snprintf(header->comment, sizeof(header->comment), HEADER_TITLE); OSTime time = OSGetTime(); OSCalendarTime cal; OSTicksToCalendarTime(time, &cal); -#if VERSION <= VERSION_JPN - snprintf(header->info, sizeof(header->info), "%d月%d日のセーブデータです", cal.month + 1, cal.day_of_month); -#elif VERSION == VERSION_USA - snprintf(header->info, sizeof(header->info), "%d/%d Save Data", cal.month + 1, cal.day_of_month); -#else +#if VERSION == VERSION_PAL switch (dComIfGs_getPalLanguage()) { case 0: snprintf(header->info, sizeof(header->info), "%d/%d Save Data", cal.month + 1, cal.day_of_month); @@ -227,6 +227,8 @@ void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) { snprintf(header->info, sizeof(header->info), "Dati salvati: %d/%d", cal.day_of_month, cal.month + 1); break; } +#else + snprintf(header->info, sizeof(header->info), HEADER_COMMENT, cal.month + 1, cal.day_of_month); #endif mDoDvdThd_mountArchive_c* cmd = mDoDvdThd_mountArchive_c::create("/res/CardIcon/cardicon.arc", 0, NULL); while (!cmd->sync()) ;