mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_a_obj_swpropeller OK, work on d_kankyo / misc
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
|
||||
struct J3DGXColorS10 {
|
||||
/* 8000E460 */ J3DGXColorS10();
|
||||
/* 8000E460 */ J3DGXColorS10() {}
|
||||
|
||||
_GXColorS10 mColor;
|
||||
};
|
||||
|
||||
struct J3DGXColor : public _GXColor {
|
||||
/* 8000E538 */ J3DGXColor();
|
||||
/* 8000E538 */ J3DGXColor() {}
|
||||
};
|
||||
|
||||
struct J3DNBTScaleInfo {
|
||||
|
||||
@@ -23,6 +23,8 @@ class J3DLightObj {
|
||||
public:
|
||||
/* 80018C0C */ J3DLightObj() : mInfo(j3dDefaultLightInfo) {}
|
||||
|
||||
J3DLightInfo& getLightInfo() { return mInfo; }
|
||||
|
||||
/* 0x00 */ J3DLightInfo mInfo;
|
||||
/* 0x34 */ u8 field_0x34[64];
|
||||
}; // Size = 0x74
|
||||
|
||||
@@ -29,6 +29,7 @@ enum cCcD_ObjAtType {
|
||||
/* 0x00000008 */ AT_TYPE_THROW_OBJ = (1 << 3),
|
||||
/* 0x00000010 */ AT_TYPE_SHIELD_ATTACK = (1 << 4),
|
||||
/* 0x00000020 */ AT_TYPE_BOMB = (1 << 5),
|
||||
/* 0x00000040 */ AT_TYPE_40 = (1 << 6),
|
||||
/* 0x00000080 */ AT_TYPE_SLINGSHOT = (1 << 7),
|
||||
/* 0x00000200 */ AT_TYPE_LANTERN_SWING = (1 << 9),
|
||||
/* 0x00000400 */ AT_TYPE_CSTATUE_SWING = (1 << 10),
|
||||
@@ -272,25 +273,33 @@ public:
|
||||
|
||||
STATIC_ASSERT(0x40 == sizeof(cCcD_DivideArea));
|
||||
|
||||
struct cCcD_SrcObjCommonBase {
|
||||
/* 0x0 */ s32 mSPrm;
|
||||
};
|
||||
|
||||
struct cCcD_SrcObjTg {
|
||||
/* 0x0 */ s32 mType;
|
||||
/* 0x4 */ s32 mSPrm;
|
||||
/* 0x4 */ cCcD_SrcObjCommonBase mBase;
|
||||
}; // Size: 0x8
|
||||
|
||||
struct cCcD_SrcObjAt {
|
||||
/* 0x0 */ s32 mType;
|
||||
/* 0x4 */ u8 mAtp;
|
||||
/* 0x8 */ s32 mSPrm;
|
||||
/* 0x8 */ cCcD_SrcObjCommonBase mBase;
|
||||
}; // Size: 0xC
|
||||
|
||||
struct cCcD_SrcObjCo {
|
||||
/* 0x0 */ cCcD_SrcObjCommonBase mBase;
|
||||
}; // Size: 0x4
|
||||
|
||||
struct cCcD_SrcObjHitInf {
|
||||
/* 0x00 */ cCcD_SrcObjAt mObjAt;
|
||||
/* 0x0C */ cCcD_SrcObjTg mObjTg;
|
||||
/* 0x14 */ s32 mSPrm;
|
||||
/* 0x14 */ cCcD_SrcObjCo mObjCo;
|
||||
}; // Size: 0x18
|
||||
|
||||
struct cCcD_SrcObj {
|
||||
/* 0x0 */ int field_0x0;
|
||||
/* 0x0 */ int mFlags;
|
||||
/* 0x4 */ cCcD_SrcObjHitInf mSrcObjHitInf;
|
||||
}; // Size: 0x1C
|
||||
|
||||
@@ -345,6 +354,13 @@ protected:
|
||||
/* 0x08 */ cCcD_Obj* mHitObj;
|
||||
/* 0x0C vtable */
|
||||
public:
|
||||
enum CoSPrm_e {
|
||||
CO_SPRM_SET = 1,
|
||||
CO_SPRM_NO_CRR = 0x100,
|
||||
CO_SPRM_NO_CO_HIT_INF_SET = 0x200,
|
||||
CO_SPRM_SAME_ACTOR_HIT = 0x400,
|
||||
};
|
||||
|
||||
cCcD_ObjCommonBase() { ct(); }
|
||||
/* 8008409C */ virtual ~cCcD_ObjCommonBase() {}
|
||||
/* 802639B0 */ void ct();
|
||||
@@ -357,6 +373,10 @@ public:
|
||||
u32 MskRPrm(u32 mask) { return mRPrm & mask; }
|
||||
void OnSPrmBit(u32 flag) { mSPrm |= flag; }
|
||||
void OffSPrmBit(u32 flag) { mSPrm &= ~flag; }
|
||||
|
||||
void Set(cCcD_SrcObjCommonBase const& src) {
|
||||
mSPrm = src.mSPrm;
|
||||
}
|
||||
};
|
||||
|
||||
STATIC_ASSERT(0x10 == sizeof(cCcD_ObjCommonBase));
|
||||
@@ -421,6 +441,10 @@ public:
|
||||
u32 ChkSph3DCrr() const { return MskSPrm(0x80); }
|
||||
void ClrSet() { OffSPrmBit(1); }
|
||||
u32 ChkHit() { return MskRPrm(1); }
|
||||
|
||||
void Set(cCcD_SrcObjCo const& src) {
|
||||
cCcD_ObjCommonBase::Set(src.mBase);
|
||||
}
|
||||
};
|
||||
|
||||
STATIC_ASSERT(0x10 == sizeof(cCcD_ObjCo));
|
||||
@@ -510,10 +534,10 @@ public:
|
||||
void SetStts(cCcD_Stts* stts) { mStts = stts; }
|
||||
cCcD_DivideInfo& GetDivideInfo() { return mDivideInfo; }
|
||||
cCcD_DivideInfo* GetPDivideInfo() { return &mDivideInfo; }
|
||||
int ChkBsRevHit() const { return field_0x40 & 2; }
|
||||
int ChkBsRevHit() const { return mFlags & 2; }
|
||||
|
||||
private:
|
||||
/* 0x040 */ int field_0x40;
|
||||
/* 0x040 */ int mFlags;
|
||||
/* 0x044 */ cCcD_Stts* mStts;
|
||||
/* 0x048 */ cCcD_DivideInfo mDivideInfo;
|
||||
}; // Size = 0x58
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct counter_class {
|
||||
s32 mCounter0;
|
||||
u32 mCounter0;
|
||||
s32 mCounter1;
|
||||
s32 mTimer;
|
||||
};
|
||||
|
||||
@@ -1789,6 +1789,12 @@ inline u8 dComIfGp_att_getCatchChgItem() {
|
||||
return dComIfGp_getAttention().getCatchChgItem();
|
||||
}
|
||||
|
||||
inline void dComIfGp_att_LookRequest(fopAc_ac_c* param_0, f32 i_horizontalDist, f32 i_upDist,
|
||||
f32 i_downDist, s16 i_angle, int param_5) {
|
||||
dComIfGp_getAttention().LookRequest(param_0, i_horizontalDist, i_upDist, i_downDist, i_angle,
|
||||
param_5);
|
||||
}
|
||||
|
||||
inline J2DGrafContext* dComIfGp_getCurrentGrafPort() {
|
||||
return g_dComIfG_gameInfo.play.getCurrentGrafPort();
|
||||
}
|
||||
|
||||
@@ -219,6 +219,11 @@ public:
|
||||
return mZHintTarget.request(param_1, param_2);
|
||||
}
|
||||
|
||||
void LookRequest(fopAc_ac_c* param_0, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist,
|
||||
s16 i_angle, int param_5) {
|
||||
mLookTarget.request(param_0, i_horizontalDist, i_upDist, i_downDist, i_angle, param_5);
|
||||
}
|
||||
|
||||
static dist_entry& i_getDistTable(int i_no) { return dist_table[i_no]; }
|
||||
|
||||
static type_tbl_entry loc_type_tbl[3];
|
||||
|
||||
+2
-2
@@ -782,7 +782,7 @@ public:
|
||||
/* 80024954 */ static bool resetArchiveBank(int);
|
||||
/* 80024DB0 */ static void SetTimePass(int);
|
||||
/* 8025BAAC */ static void setZoneNo(int, int);
|
||||
static s32 GetTimePass();
|
||||
static s8 GetTimePass();
|
||||
|
||||
static s8 getStayNo() { return mStayNo; }
|
||||
static u8 getRegionNo(int i_roomNo) { return mStatus[i_roomNo].mRegionNo; }
|
||||
@@ -1031,7 +1031,7 @@ inline s32 i_dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
|
||||
}
|
||||
|
||||
inline s8 dStage_stagInfo_GetTimeH(stage_stag_info_class* p_info) {
|
||||
return p_info->field_0x0c >> 8;
|
||||
return (p_info->field_0x0c >> 8) & 0xFF;
|
||||
}
|
||||
|
||||
inline BOOL dStage_staginfo_GetArchiveHeap(stage_stag_info_class* p_info) {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
class JPABaseEmitter;
|
||||
class cBgS_PolyInfo;
|
||||
class color_RGB_class;
|
||||
|
||||
void dKankyo_DayProc();
|
||||
void dKy_set_nexttime(f32);
|
||||
@@ -44,6 +45,11 @@ void dKy_setLight();
|
||||
cXyz dKy_plight_near_pos();
|
||||
void dKy_BossSpotLight_set(cXyz* param_0, f32 param_1, f32 param_2, f32 param_3, _GXColor* param_4,
|
||||
f32 param_5, u8 param_6, u8 param_7);
|
||||
static void dKy_calc_color_set(_GXColorS10* param_0, color_RGB_class* param_1,
|
||||
color_RGB_class* param_2, color_RGB_class* param_3,
|
||||
color_RGB_class* param_4, f32 param_5, f32 param_6,
|
||||
_GXColorS10 param_7, f32 param_8);
|
||||
static void dKy_twilight_camelight_set();
|
||||
|
||||
struct LIGHT_INFLUENCE {
|
||||
/* 800CFC7C */ ~LIGHT_INFLUENCE() {}
|
||||
@@ -203,7 +209,7 @@ public:
|
||||
/* 0x367 */ u8 field_0x367;
|
||||
/* 0x368 */ f32 mFogStartZ;
|
||||
/* 0x36C */ f32 mFogEndZ;
|
||||
/* 0x370 */ f32 field_0x370;
|
||||
/* 0x370 */ f32 mColpatBlend;
|
||||
/* 0x374 */ f32 field_0x374;
|
||||
/* 0x378 */ u16 field_0x378;
|
||||
/* 0x37A */ u8 field_0x37a;
|
||||
@@ -379,9 +385,7 @@ public:
|
||||
/* 0x1058 */ dKankyo_evil_Packet* mpEvilPacket;
|
||||
/* 0x105C */ mDoExt_btkAnm* field_0x105c;
|
||||
/* 0x1060 */ fopAc_ac_c* field_0x1060;
|
||||
/* 0x1064 */ f32 field_0x1064;
|
||||
/* 0x1068 */ f32 field_0x1068;
|
||||
/* 0x106C */ f32 field_0x106c;
|
||||
/* 0x1064 */ Vec field_0x1064;
|
||||
/* 0x1070 */ cXyz mSunPos2;
|
||||
/* 0x107C */ cXyz mPLightNearPos;
|
||||
/* 0x1088 */ cXyz mSunPos;
|
||||
@@ -394,10 +398,7 @@ public:
|
||||
/* 0x10D8 */ GXColorS10 mUnderCloudShadowColor;
|
||||
/* 0x10E0 */ GXColorS10 mCloudOuterHazeColor;
|
||||
/* 0x10E8 */ GXColorS10 mCloudInnerHazeColor;
|
||||
/* 0x10F0 */ s16 field_0x10f0;
|
||||
/* 0x10F2 */ s16 field_0x10f2;
|
||||
/* 0x10F4 */ s16 field_0x10f4;
|
||||
/* 0x10F6 */ s16 field_0x10f6;
|
||||
/* 0x10F0 */ GXColorS10 field_0x10f0;
|
||||
/* 0x10F8 */ s16 field_0x10f8;
|
||||
/* 0x10FA */ s16 field_0x10fa;
|
||||
/* 0x10FC */ s16 field_0x10fc;
|
||||
@@ -493,7 +494,7 @@ public:
|
||||
/* 0x12B8 */ u8 field_0x12b8[4];
|
||||
/* 0x12BC */ u16 mFogAdjCenter;
|
||||
/* 0x12BE */ u16 mDate;
|
||||
/* 0x12C0 */ u16 mActorLightEffect;
|
||||
/* 0x12C0 */ s16 mActorLightEffect;
|
||||
/* 0x12C2 */ u8 mColPatPrev;
|
||||
/* 0x12C3 */ u8 mColPatCurr;
|
||||
/* 0x12C4 */ u8 mColpatPrevGather;
|
||||
|
||||
@@ -237,7 +237,6 @@ public:
|
||||
virtual void draw();
|
||||
virtual ~dKankyo_vrkumo_Packet();
|
||||
|
||||
private:
|
||||
/* 0x0010 */ GXColor mColor;
|
||||
/* 0x0014 */ u8* mpResCloudtx_01;
|
||||
/* 0x0018 */ u8* mpResCloudtx_02;
|
||||
|
||||
@@ -119,6 +119,10 @@ inline void mDoAud_mEnvse_framework() {
|
||||
g_mEnvSeMgr.framework();
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_resetScene() {
|
||||
g_mEnvSeMgr.resetScene();
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvSe_startFarThunderSe(const Vec* param_0) {
|
||||
g_mEnvSeMgr.startFarThunderSe((Vec*)param_0, 0);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,49 @@
|
||||
#ifndef D_A_OBJ_SWPROPELLER_H
|
||||
#define D_A_OBJ_SWPROPELLER_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "d/cc/d_cc_d.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
class daObjSwPr_c : public fopAc_ac_c {
|
||||
public:
|
||||
/* 8059A5E8 */ void initBaseMtx();
|
||||
/* 8059A624 */ void setBaseMtx();
|
||||
/* 8059A670 */ int Create();
|
||||
/* 8059A808 */ int CreateHeap();
|
||||
/* 8059A888 */ int create();
|
||||
/* 8059AB04 */ int setRotateTime();
|
||||
/* 8059AB14 */ void switchCtrl();
|
||||
/* 8059AB9C */ void execute_type_boomerang();
|
||||
/* 8059ADCC */ void execute_type_wind();
|
||||
/* 8059B014 */ int execute();
|
||||
/* 8059B148 */ int draw();
|
||||
/* 8059B1AC */ int _delete();
|
||||
|
||||
u8 getNameArg() { return fopAcM_GetParamBit(this, 8, 8); }
|
||||
u8 getMdlType() { return fopAcM_GetParamBit(this, 0x10, 4); }
|
||||
int getSwbit() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
u32 getSwbit2() { return fopAcM_GetParamBit(this, 0x18, 8); }
|
||||
|
||||
/* 0x568 */ request_of_phase_process_class mPhase;
|
||||
/* 0x570 */ J3DModel* mpModel;
|
||||
/* 0x574 */ dCcD_Stts mCcStts;
|
||||
/* 0x5B0 */ dCcD_Cyl mCyl1;
|
||||
/* 0x6EC */ dCcD_Cyl mCyl2;
|
||||
/* 0x828 */ s16 mRotateSpeed;
|
||||
/* 0x82A */ s16 mRotateInitSpeed;
|
||||
/* 0x82C */ s16 field_0x82c; // rotate angle?
|
||||
/* 0x82E */ s16 mRotateTime;
|
||||
/* 0x830 */ u16 mKaitenJntID;
|
||||
/* 0x832 */ s16 mSwDelayTimer;
|
||||
/* 0x834 */ u16 field_0x834;
|
||||
/* 0x836 */ u16 mSwOffDelayTimer;
|
||||
/* 0x838 */ u8 field_0x838;
|
||||
/* 0x839 */ u8 field_0x839;
|
||||
/* 0x83A */ u8 field_0x83a;
|
||||
/* 0x83B */ u8 field_0x83b;
|
||||
/* 0x83C */ u8 mNameArg;
|
||||
/* 0x83D */ u8 field_0x83d;
|
||||
/* 0x83E */ u8 mModelType;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_SWPROPELLER_H */
|
||||
|
||||
@@ -257,17 +257,17 @@ void cCcD_ObjCommonBase::ct() {
|
||||
void cCcD_ObjHitInf::Set(cCcD_SrcObjHitInf const& src) {
|
||||
mObjAt.Set(src.mObjAt);
|
||||
mObjTg.Set(src.mObjTg);
|
||||
mObjCo.SetSPrm(src.mSPrm);
|
||||
mObjCo.Set(src.mObjCo);
|
||||
}
|
||||
|
||||
/* 80263A10-80263A1C 25E350 000C+00 0/0 1/1 0/0 .text ct__8cCcD_ObjFv */
|
||||
void cCcD_Obj::ct() {
|
||||
field_0x40 = 0;
|
||||
mFlags = 0;
|
||||
}
|
||||
|
||||
/* 80263A1C-80263A48 25E35C 002C+00 0/0 1/1 0/0 .text Set__8cCcD_ObjFRC11cCcD_SrcObj */
|
||||
void cCcD_Obj::Set(cCcD_SrcObj const& src) {
|
||||
field_0x40 = src.field_0x0;
|
||||
mFlags = src.mFlags;
|
||||
cCcD_ObjHitInf::Set(src.mSrcObjHitInf);
|
||||
}
|
||||
|
||||
@@ -725,7 +725,7 @@ void cCcD_ObjAt::SetHit(cCcD_Obj* pObj) {
|
||||
/* 8026484C-80264868 25F18C 001C+00 1/1 0/0 0/0 .text Set__10cCcD_ObjAtFRC13cCcD_SrcObjAt
|
||||
*/
|
||||
void cCcD_ObjAt::Set(cCcD_SrcObjAt const& src) {
|
||||
mSPrm = src.mSPrm;
|
||||
cCcD_ObjCommonBase::Set(src.mBase);
|
||||
mType = src.mType;
|
||||
mAtp = src.mAtp;
|
||||
}
|
||||
@@ -739,7 +739,7 @@ void cCcD_ObjAt::ClrHit() {
|
||||
/* 80264880-80264894 25F1C0 0014+00 1/1 0/0 0/0 .text Set__10cCcD_ObjTgFRC13cCcD_SrcObjTg
|
||||
*/
|
||||
void cCcD_ObjTg::Set(cCcD_SrcObjTg const& src) {
|
||||
mSPrm = src.mSPrm;
|
||||
cCcD_ObjCommonBase::Set(src.mBase);
|
||||
mType = src.mType;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "dol2asm.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
@@ -618,11 +619,11 @@ int daBg_c::createHeap() {
|
||||
const char* name = modelData->getMaterialName()->getName(j);
|
||||
|
||||
if (name[3] == 'M' && name[4] == 'A') {
|
||||
if (!memcmp(&name[5], &"00", 2)) {
|
||||
if (!memcmp(&name[5], "00", 2)) {
|
||||
modelFlags |= 0x1200;
|
||||
} else if (!memcmp(&name[5], &"01", 2)) {
|
||||
} else if (!memcmp(&name[5], "01", 2)) {
|
||||
modelFlags |= 0x20000000;
|
||||
} else if (!memcmp(&name[5], &"12", 2) || !memcmp(&name[5], &"18", 2)) {
|
||||
} else if (!memcmp(&name[5], "12", 2) || !memcmp(&name[5], "18", 2)) {
|
||||
field_0x5f0 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1127
-111
File diff suppressed because it is too large
Load Diff
+70
-36
@@ -14,15 +14,16 @@
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "MSL_C/stdio.h"
|
||||
#include "MSL_C/string.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "SSystem/SComponent/c_lib.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "Z2AudioLib/Z2Creature.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/kankyo/d_kankyo.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/gx/GXDraw.h"
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
#include "dolphin/os/OS.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "d/kankyo/d_kankyo.h"
|
||||
#include "global.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
|
||||
@@ -36,16 +37,8 @@ struct J3DDrawBuffer {
|
||||
/* 8032548C */ void entryImm(J3DPacket*, u16);
|
||||
};
|
||||
|
||||
struct dDlst_list_c {
|
||||
/* 800565EC */ void entryZSortXluDrawList(J3DDrawBuffer*, J3DPacket*, cXyz&);
|
||||
};
|
||||
|
||||
struct ResFONT {};
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {};
|
||||
};
|
||||
|
||||
struct JUTResFont {
|
||||
/* 802DEF94 */ JUTResFont(ResFONT const*, JKRHeap*);
|
||||
};
|
||||
@@ -435,11 +428,9 @@ extern "C" extern u8 const j3dDefaultTevStageInfo[20];
|
||||
extern "C" extern u8 const j3dDefaultIndTevStageInfo[12];
|
||||
extern "C" extern void* __vt__9J3DPacket[5];
|
||||
extern "C" extern void* __vt__8J3DModel[9];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" u8 mCurrentMtx__6J3DSys[48];
|
||||
extern "C" f32 mParentS__6J3DSys[3];
|
||||
extern "C" u8 sGDLObj__17J3DDisplayListObj[16];
|
||||
extern "C" extern f32 G_CM3D_F_ABS_MIN[1 + 1 /* padding */];
|
||||
extern "C" u8 sCurrentHeap__7JKRHeap[4];
|
||||
extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
|
||||
extern "C" u8 mJoint__10J3DMtxCalc[4];
|
||||
@@ -1532,7 +1523,8 @@ void mDoExt_modelUpdate(J3DModel* i_model) {
|
||||
J3DModelData* model_data = i_model->getModelData();
|
||||
|
||||
if (model_data->getMaterialNodePointer(0)->getSharedDisplayListObj() != NULL &&
|
||||
!model_data->isLocked()) {
|
||||
!model_data->isLocked())
|
||||
{
|
||||
i_model->calc();
|
||||
mDoExt_modelDiff(i_model);
|
||||
} else {
|
||||
@@ -1548,7 +1540,8 @@ void mDoExt_modelUpdateDL(J3DModel* i_model) {
|
||||
J3DModelData* model_data = i_model->getModelData();
|
||||
|
||||
if (model_data->getMaterialNodePointer(0)->getSharedDisplayListObj() != NULL &&
|
||||
!model_data->isLocked()) {
|
||||
!model_data->isLocked())
|
||||
{
|
||||
i_model->calc();
|
||||
mDoExt_modelDiff(i_model);
|
||||
} else {
|
||||
@@ -1566,7 +1559,8 @@ void mDoExt_modelEntryDL(J3DModel* i_model) {
|
||||
J3DModelData* model_data = i_model->getModelData();
|
||||
|
||||
if (model_data->getMaterialNodePointer(0)->getSharedDisplayListObj() != NULL &&
|
||||
!model_data->isLocked()) {
|
||||
!model_data->isLocked())
|
||||
{
|
||||
mDoExt_modelDiff(i_model);
|
||||
} else {
|
||||
i_model->unlock();
|
||||
@@ -1980,7 +1974,8 @@ asm void J3DTevStage::setTevStageInfo(J3DTevStageInfo const& param_0) {
|
||||
#pragma pop
|
||||
|
||||
/* 8000E460-8000E464 008DA0 0004+00 0/0 3/3 0/0 .text __ct__13J3DGXColorS10Fv */
|
||||
J3DGXColorS10::J3DGXColorS10() {
|
||||
// J3DGXColorS10::J3DGXColorS10() {
|
||||
extern "C" void __ct__13J3DGXColorS10Fv() {
|
||||
/* empty function */
|
||||
}
|
||||
|
||||
@@ -2005,7 +2000,8 @@ asm J3DColorChan::J3DColorChan() {
|
||||
#pragma pop
|
||||
|
||||
/* 8000E538-8000E53C 008E78 0004+00 0/0 3/3 0/0 .text __ct__10J3DGXColorFv */
|
||||
J3DGXColor::J3DGXColor() {
|
||||
// J3DGXColor::J3DGXColor() {
|
||||
extern "C" void __ct__10J3DGXColorFv() {
|
||||
/* empty function */
|
||||
}
|
||||
|
||||
@@ -2144,24 +2140,63 @@ asm void mDoExt_setupShareTexture(J3DModelData* i_modelData, J3DModelData* i_sha
|
||||
#pragma force_active on
|
||||
// MWCC ignores mapping of some japanese characters using the
|
||||
// byte 0x5C (ASCII '\'). This is why this string is hex-encoded.
|
||||
|
||||
// "ソリッドヒープちゃうがな!\n"
|
||||
// "This isn't a solid heap! \n"
|
||||
SECTION_DEAD static char const* const stringBase_803740FC =
|
||||
"\x83\x5C\x83\x8A\x83\x62\x83\x68\x83\x71\x81\x5B\x83\x76\x82\xBF\x82\xE1\x82\xA4\x82\xAA\x82"
|
||||
"\xC8\x81\x49\x0A";
|
||||
SECTION_DEAD static char const* const stringBase_80374118 = "%s.bti";
|
||||
#pragma pop
|
||||
|
||||
/* 8000EA80-8000ECC0 0093C0 0240+00 0/0 0/0 6/6 .text mDoExt_setupStageTexture__FP12J3DModelData
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void mDoExt_setupStageTexture(J3DModelData* param_0) {
|
||||
nofralloc
|
||||
#include "asm/m_Do/m_Do_ext/mDoExt_setupStageTexture__FP12J3DModelData.s"
|
||||
void mDoExt_setupStageTexture(J3DModelData* i_modelData) {
|
||||
J3DTexture* texture_p = i_modelData->getTexture();
|
||||
|
||||
if (texture_p != NULL) {
|
||||
JUTNameTab* tex_name_p = i_modelData->getTextureName();
|
||||
if (tex_name_p != NULL) {
|
||||
bool set_timg = false;
|
||||
|
||||
for (u16 i = 0; i < texture_p->getNum(); i++) {
|
||||
ResTIMG* img = texture_p->getResTIMG(i);
|
||||
if (img->imageOffset == 0) {
|
||||
char res_name[64];
|
||||
snprintf(res_name, sizeof(res_name), "%s.bti", tex_name_p->getName(i));
|
||||
|
||||
ResTIMG* timg = (ResTIMG*)dComIfG_getStageRes(res_name);
|
||||
texture_p->setResTIMG(i, *timg);
|
||||
set_timg = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (set_timg) {
|
||||
j3dSys.setTexture(texture_p);
|
||||
|
||||
for (u16 i = 0; i < i_modelData->getMaterialNum(); i++) {
|
||||
J3DMaterial* mat_p = i_modelData->getMaterialNodePointer(i);
|
||||
J3DTevBlock* block_p = mat_p->getTevBlock();
|
||||
|
||||
if (block_p != NULL) {
|
||||
J3DDisplayListObj* dlObj_p = mat_p->getSharedDisplayListObj();
|
||||
|
||||
if (dlObj_p != NULL) {
|
||||
BOOL state = OSDisableInterrupts();
|
||||
|
||||
GDInitGDLObj(&J3DDisplayListObj::sGDLObj, dlObj_p->getDisplayList(0),
|
||||
dlObj_p->getDisplayListSize());
|
||||
GDSetCurrent(&J3DDisplayListObj::sGDLObj);
|
||||
block_p->patchTexNoAndTexCoordScale();
|
||||
|
||||
OSRestoreInterrupts(state);
|
||||
GDSetCurrent(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450C20-80450C24 000120 0004+00 2/1 0/0 0/0 .sbss AssertHeap */
|
||||
@@ -2773,7 +2808,8 @@ int mDoExt_McaMorfSO::create(J3DModelData* i_modelData, mDoExt_McaMorfCallBack1_
|
||||
|
||||
for (int i = 0; i < modelData->getJointNum(); i++) {
|
||||
transInfo = &modelData->getJointNodePointer(i)->getTransformInfo();
|
||||
JMAEulerToQuat(transInfo->mRotation.x, transInfo->mRotation.y, transInfo->mRotation.z, quat);
|
||||
JMAEulerToQuat(transInfo->mRotation.x, transInfo->mRotation.y,
|
||||
transInfo->mRotation.z, quat);
|
||||
|
||||
transInfo++;
|
||||
quat++;
|
||||
@@ -3291,7 +3327,8 @@ void drawCube(MtxP mtx, cXyz* pos, const GXColor& color) {
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
GXSetNumChans(1);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_DISABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT_NULL, GX_DF_CLAMP, GX_AF_NONE);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_DISABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT_NULL, GX_DF_CLAMP,
|
||||
GX_AF_NONE);
|
||||
GXSetNumTexGens(0);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetTevColor(GX_TEVREG0, color);
|
||||
@@ -3328,14 +3365,9 @@ void drawCube(MtxP mtx, cXyz* pos, const GXColor& color) {
|
||||
|
||||
void mDoExt_cubePacket::draw() {
|
||||
static cXyz l_pos[8] = {
|
||||
cXyz(-1.0f, 1.0f, -1.0f),
|
||||
cXyz(1.0f, 1.0f, -1.0f),
|
||||
cXyz(-1.0f, 1.0f, 1.0f),
|
||||
cXyz(1.0f, 1.0f, 1.0f),
|
||||
cXyz(-1.0f, -1.0f, -1.0f),
|
||||
cXyz(1.0f, -1.0f, -1.0f),
|
||||
cXyz(-1.0f, -1.0f, 1.0f),
|
||||
cXyz(1.0f, -1.0f, 1.0f),
|
||||
cXyz(-1.0f, 1.0f, -1.0f), cXyz(1.0f, 1.0f, -1.0f), cXyz(-1.0f, 1.0f, 1.0f),
|
||||
cXyz(1.0f, 1.0f, 1.0f), cXyz(-1.0f, -1.0f, -1.0f), cXyz(1.0f, -1.0f, -1.0f),
|
||||
cXyz(-1.0f, -1.0f, 1.0f), cXyz(1.0f, -1.0f, 1.0f),
|
||||
};
|
||||
|
||||
mDoMtx_stack_c::transS(mPosition.x, mPosition.y, mPosition.z);
|
||||
@@ -3554,7 +3586,9 @@ J3DModel* mDoExt_J3DModel__create(J3DModelData* i_modelData, u32 modelFlag, u32
|
||||
|
||||
// Set up the model
|
||||
if (!model->entryModelData(i_modelData, modelFlag, 1)) {
|
||||
if (modelFlag == J3DMdlFlag_Unk80000 && model->newDifferedDisplayList(differedDlistFlag)) {
|
||||
if (modelFlag == J3DMdlFlag_Unk80000 &&
|
||||
model->newDifferedDisplayList(differedDlistFlag))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user