Merge branch 'main' of https://github.com/zeldaret/tww into ky2

This commit is contained in:
TakaRikka
2023-09-20 21:10:41 -07:00
55 changed files with 2033 additions and 486 deletions
+13 -13
View File
@@ -489,52 +489,52 @@ d/actor/d_a_obj.cpp:
.sbss start:0x803F6BA0 end:0x803F6BA8
.sdata2 start:0x803F84C8 end:0x803F8530
d/actor/d_a_obj_tribox_static.cpp:
d/d_a_obj_tribox_static.cpp:
.text start:0x80067D1C end:0x80067D94
.ctors start:0x803386C8 end:0x803386CC
.bss start:0x803E1F30 end:0x803E1F48
.sbss start:0x803F6BA8 end:0x803F6BC0
d/actor/d_a_ship_static.cpp:
d/d_a_ship_static.cpp:
.text start:0x80067D94 end:0x80067E78
.sdata2 start:0x803F8530 end:0x803F8538
d/actor/d_a_boko_static.cpp:
d/d_a_boko_static.cpp:
.text start:0x80067E78 end:0x80067FA0
.data start:0x80377018 end:0x80377168
.sdata start:0x803F61E0 end:0x803F61E8
d/actor/d_a_bomb_static.cpp:
d/d_a_bomb_static.cpp:
.text start:0x80067FA0 end:0x800684F4
.text start:0x800684F4 end:0x80068510
.rodata start:0x8034FC58 end:0x8034FC90
d/actor/d_a_branch_static.cpp:
d/d_a_branch_static.cpp:
.text start:0x80068510 end:0x800685F8
.rodata start:0x8034FC90 end:0x8034FCC0
d/actor/d_a_mgameboard_static.cpp:
d/d_a_mgameboard_static.cpp:
.text start:0x800685F8 end:0x80068650
d/actor/d_a_itembase_static.cpp:
d/d_a_itembase_static.cpp:
.text start:0x80068650 end:0x80068820
.rodata start:0x8034FCC0 end:0x8034FD10
d/actor/d_a_item_static.cpp:
d/d_a_item_static.cpp:
.text start:0x80068820 end:0x800689F0
.sdata2 start:0x803F8538 end:0x803F8540
d/actor/d_a_shop_item_static.cpp:
d/d_a_shop_item_static.cpp:
.text start:0x800689F0 end:0x80068A58
.rodata start:0x8034FD10 end:0x80351DF0
.sdata2 start:0x803F8540 end:0x803F8550
d/actor/d_a_race_item_static.cpp:
d/d_a_race_item_static.cpp:
.text start:0x80068A58 end:0x800690E4
.data start:0x80377168 end:0x80377228
.sdata2 start:0x803F8550 end:0x803F8558
d/actor/d_a_leaflift_static.cpp:
d/d_a_leaflift_static.cpp:
.text start:0x800690E4 end:0x800692C4
.sdata2 start:0x803F8558 end:0x803F8580
@@ -952,11 +952,11 @@ d/d_2dnumber.cpp:
.data start:0x803890C8 end:0x80389138
.sdata2 start:0x803F9488 end:0x803F9508
d/actor/d_a_npc_cb1_static.cpp:
d/d_a_npc_cb1_static.cpp:
.text start:0x800CB5C4 end:0x800CB5CC
.sbss start:0x803F6E60 end:0x803F6E68
d/actor/d_a_npc_mk_static.cpp:
d/d_a_npc_mk_static.cpp:
.text start:0x800CB5CC end:0x800CC734
.sdata2 start:0x803F9508 end:0x803F9560
+13 -13
View File
@@ -489,52 +489,52 @@ d/actor/d_a_obj.cpp:
.sbss start:0x803EA070 end:0x803EA078
.sdata2 start:0x803EB980 end:0x803EB9E8
d/actor/d_a_obj_tribox_static.cpp:
d/d_a_obj_tribox_static.cpp:
.text start:0x80065B50 end:0x80065BC8
.ctors start:0x803360C4 end:0x803360C8
.bss start:0x803D5420 end:0x803D5438
.sbss start:0x803EA078 end:0x803EA090
d/actor/d_a_ship_static.cpp:
d/d_a_ship_static.cpp:
.text start:0x80065BC8 end:0x80065CAC
.sdata2 start:0x803EB9E8 end:0x803EB9F0
d/actor/d_a_boko_static.cpp:
d/d_a_boko_static.cpp:
.text start:0x80065CAC end:0x80065DD4
.data start:0x8036A4B8 end:0x8036A608
.sdata start:0x803E96C8 end:0x803E96D0
d/actor/d_a_bomb_static.cpp:
d/d_a_bomb_static.cpp:
.text start:0x80065DD4 end:0x80066328
.text start:0x80066328 end:0x80066344
.rodata start:0x803436B8 end:0x803436F0
d/actor/d_a_branch_static.cpp:
d/d_a_branch_static.cpp:
.text start:0x80066344 end:0x8006642C
.rodata start:0x803436F0 end:0x80343720
d/actor/d_a_mgameboard_static.cpp:
d/d_a_mgameboard_static.cpp:
.text start:0x8006642C end:0x80066484
d/actor/d_a_itembase_static.cpp:
d/d_a_itembase_static.cpp:
.text start:0x80066484 end:0x80066654
.rodata start:0x80343720 end:0x80343770
d/actor/d_a_item_static.cpp:
d/d_a_item_static.cpp:
.text start:0x80066654 end:0x80066824
.sdata2 start:0x803EB9F0 end:0x803EB9F8
d/actor/d_a_shop_item_static.cpp:
d/d_a_shop_item_static.cpp:
.text start:0x80066824 end:0x8006688C
.rodata start:0x80343770 end:0x80345850
.sdata2 start:0x803EB9F8 end:0x803EBA08
d/actor/d_a_race_item_static.cpp:
d/d_a_race_item_static.cpp:
.text start:0x8006688C end:0x80066F18
.data start:0x8036A608 end:0x8036A6C8
.sdata2 start:0x803EBA08 end:0x803EBA10
d/actor/d_a_leaflift_static.cpp:
d/d_a_leaflift_static.cpp:
.text start:0x80066F18 end:0x800670F8
.sdata2 start:0x803EBA10 end:0x803EBA38
@@ -952,11 +952,11 @@ d/d_2dnumber.cpp:
.data start:0x8037C568 end:0x8037C5D8
.sdata2 start:0x803EC950 end:0x803EC9D0
d/actor/d_a_npc_cb1_static.cpp:
d/d_a_npc_cb1_static.cpp:
.text start:0x800C855C end:0x800C8564
.sbss start:0x803EA330 end:0x803EA338
d/actor/d_a_npc_mk_static.cpp:
d/d_a_npc_mk_static.cpp:
.text start:0x800C8564 end:0x800C96CC
.sdata2 start:0x803EC9D0 end:0x803ECA28
+13 -13
View File
@@ -489,52 +489,52 @@ d/actor/d_a_obj.cpp:
.sbss start:0x803FE3A0 end:0x803FE3A8
.sdata2 start:0x803FFCF0 end:0x803FFD58
d/actor/d_a_obj_tribox_static.cpp:
d/d_a_obj_tribox_static.cpp:
.text start:0x8006BAFC end:0x8006BB74
.ctors start:0x8033DC08 end:0x8033DC0C
.bss start:0x803E9858 end:0x803E9870
.sbss start:0x803FE3A8 end:0x803FE3C0
d/actor/d_a_ship_static.cpp:
d/d_a_ship_static.cpp:
.text start:0x8006BB74 end:0x8006BC58
.sdata2 start:0x803FFD58 end:0x803FFD60
d/actor/d_a_boko_static.cpp:
d/d_a_boko_static.cpp:
.text start:0x8006BC58 end:0x8006BD80
.data start:0x8037DCF8 end:0x8037DE48
.sdata start:0x803FD9E0 end:0x803FD9E8
d/actor/d_a_bomb_static.cpp:
d/d_a_bomb_static.cpp:
.text start:0x8006BD80 end:0x8006C2D4
.text start:0x8006C2D4 end:0x8006C2F0
.rodata start:0x80355FA8 end:0x80355FE0
d/actor/d_a_branch_static.cpp:
d/d_a_branch_static.cpp:
.text start:0x8006C2F0 end:0x8006C3D8
.rodata start:0x80355FE0 end:0x80356010
d/actor/d_a_mgameboard_static.cpp:
d/d_a_mgameboard_static.cpp:
.text start:0x8006C3D8 end:0x8006C430
d/actor/d_a_itembase_static.cpp:
d/d_a_itembase_static.cpp:
.text start:0x8006C430 end:0x8006C600
.rodata start:0x80356010 end:0x80356060
d/actor/d_a_item_static.cpp:
d/d_a_item_static.cpp:
.text start:0x8006C600 end:0x8006C7D0
.sdata2 start:0x803FFD60 end:0x803FFD68
d/actor/d_a_shop_item_static.cpp:
d/d_a_shop_item_static.cpp:
.text start:0x8006C7D0 end:0x8006C838
.rodata start:0x80356060 end:0x80358140
.sdata2 start:0x803FFD68 end:0x803FFD78
d/actor/d_a_race_item_static.cpp:
d/d_a_race_item_static.cpp:
.text start:0x8006C838 end:0x8006CEC4
.data start:0x8037DE48 end:0x8037DF08
.sdata2 start:0x803FFD78 end:0x803FFD80
d/actor/d_a_leaflift_static.cpp:
d/d_a_leaflift_static.cpp:
.text start:0x8006CEC4 end:0x8006D0A4
.sdata2 start:0x803FFD80 end:0x803FFDA8
@@ -952,11 +952,11 @@ d/d_2dnumber.cpp:
.data start:0x8038FDA8 end:0x8038FE18
.sdata2 start:0x80400CB0 end:0x80400D30
d/actor/d_a_npc_cb1_static.cpp:
d/d_a_npc_cb1_static.cpp:
.text start:0x800CF264 end:0x800CF26C
.sbss start:0x803FE660 end:0x803FE668
d/actor/d_a_npc_mk_static.cpp:
d/d_a_npc_mk_static.cpp:
.text start:0x800CF26C end:0x800D03D4
.sdata2 start:0x80400D30 end:0x80400D88
+3 -3
View File
@@ -413,7 +413,7 @@ config.libs = [
Object(NonMatching, "d/actor/d_a_boomerang.cpp"),
Object(NonMatching, "d/actor/d_a_dai_item.cpp"),
Object(NonMatching, "d/actor/d_a_demo00.cpp"),
Object(Matching, "d/actor/d_a_disappear.cpp"),
Object(Matching, "d/actor/d_a_disappear.cpp"),
Object(NonMatching, "d/actor/d_a_esa.cpp"),
Object(NonMatching, "d/actor/d_a_grid.cpp"),
Object(NonMatching, "d/actor/d_a_himo2.cpp"),
@@ -814,7 +814,7 @@ config.libs = [
Object(NonMatching, "JSystem/JUtility/JUTGamePad.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTException.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTDirectPrint.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTAssert.cpp"),
Object(Matching, "JSystem/JUtility/JUTAssert.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTVideo.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTXfb.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTFader.cpp"),
@@ -1199,7 +1199,7 @@ config.libs = [
},
Rel(Matching, "f_pc_profile_lst", "f_pc/f_pc_profile_lst.cpp"),
ActorRel(NonMatching, "d_a_agbsw0"),
ActorRel(NonMatching, "d_a_andsw0"),
ActorRel(Matching, "d_a_andsw0"),
ActorRel(Matching, "d_a_andsw2"),
ActorRel(NonMatching, "d_a_att"),
ActorRel(NonMatching, "d_a_bflower"),
+4 -1
View File
@@ -33,6 +33,9 @@ namespace JUTAssertion {
void setMessageCount(int);
};
extern bool sAssertVisible;
extern "C" {
void setWarningMessage_f_va(u32 device, const char* file, int line, const char* msg, va_list args);
void setLogMessage_f_va(u32 device, const char* file, int line, const char* msg, va_list args);
}
#endif /* JUTASSERT_H */
+8 -7
View File
@@ -67,6 +67,7 @@ public:
bool isVisible() const { return mVisible; }
void setVisible(bool visible) { mVisible = visible; }
u8 getLineAttr(int param_0) { return mBuf[(field_0x20 + 2) * param_0]; }
void setLineAttr(int param_0, u8 param_1) { mBuf[(field_0x20 + 2) * param_0] = param_1; }
u8* getLinePtr(int param_0) const { return &mBuf[(field_0x20 + 2) * param_0] + 1; }
int diffIndex(int param_0, int param_1) const {
@@ -77,13 +78,12 @@ public:
return diff += mMaxLines;
}
int nextIndex(int param_0) const {
int index = param_0 + 1;
if (mMaxLines <= index) {
index = 0;
}
int prevIndex(int index) const {
return --index < 0 ? index = mMaxLines - 1 : index;
}
return index;
int nextIndex(int index) const {
return ++index >= mMaxLines ? 0 : index;
}
void scrollToLastLine() { scroll(mMaxLines); }
@@ -94,7 +94,7 @@ private:
private:
/* 0x20 */ u32 field_0x20;
/* 0x24 */ u32 mMaxLines;
/* 0x24 */ int mMaxLines;
/* 0x28 */ u8* mBuf;
/* 0x2C */ bool field_0x2c;
/* 0x30 */ int field_0x30;
@@ -146,6 +146,7 @@ extern "C" JUTConsole* JUTGetWarningConsole();
extern "C" void JUTReportConsole_f_va(const char*, va_list);
extern "C" void JUTReportConsole_f(const char*, ...);
extern "C" void JUTWarningConsole(const char* message);
extern "C" void JUTWarningConsole_f_va(const char*, va_list);
extern "C" void JUTWarningConsole_f(const char* message, ...);
extern "C" void JUTReportConsole(const char* message);
@@ -21,8 +21,10 @@ public:
/* 802E4240 */ static JUTDirectPrint* start();
void* getFrameBuffer() { return field_0x00; }
bool isActive() const { return field_0x00 != 0; }
JUtility::TColor getCharColor() const { return mCharColor; }
void changeFrameBuffer(void *param_0) { changeFrameBuffer(param_0, mFrameBufferWidth, mFrameBufferHeight); }
static JUTDirectPrint* getManager() { return sDirectPrint; }
+3 -4
View File
@@ -56,7 +56,7 @@ public:
};
/* 802E1D5C */ JUTException(JUTDirectPrint*);
/* 802E40EC */ virtual ~JUTException();
/* 802E40EC */ virtual ~JUTException() {};
/* 802E22C4 */ void showFloatSub(int, f32);
/* 802E2454 */ void showFloat(OSContext*);
@@ -108,7 +108,7 @@ private:
static OSMessageQueue sMessageQueue;
static const char* sCpuExpName[17];
static JSUList<JUTException::JUTExMapFile> sMapFileList;
static u8 sMessageBuffer[4 + 4 /* padding */];
static OSMessage sMessageBuffer[1];
static JUTException* sErrorManager;
static OSErrorHandler sPreUserCallback;
static OSErrorHandler sPostUserCallback;
@@ -128,10 +128,9 @@ private:
/* 0x80 */ u32 mTraceSuppress;
/* 0x84 */ u32 field_0x98;
/* 0x88 */ u32 mPrintFlags;
/* 0x8C */ u32 mStackPointer;
};
STATIC_ASSERT(sizeof(JUTException) == 0x90);
STATIC_ASSERT(sizeof(JUTException) == 0x8C);
struct JUTWarn {
JUTWarn& operator<<(const char*) { return *this; }
+5 -1
View File
@@ -22,7 +22,11 @@ private:
/* 0x10 */ // __vtable__
public:
cBgS_Chk();
cBgS_Chk() {
mPolyPassChk = NULL;
mGrpPassChk = NULL;
unk_0x0C = 1;
}
void SetExtChk(cBgS_Chk&);
bool ChkSameActorPid(unsigned int) const;
+3 -3
View File
@@ -18,13 +18,13 @@ public:
/* 0x054 */ bool mBackFlag;
public:
cBgS_LinChk();
cBgS_LinChk() { ct(); }
void ct();
void Set2(cXyz*, cXyz*, unsigned int);
void PreCalc();
void GetCross();
virtual ~cBgS_LinChk();
virtual ~cBgS_LinChk() {}
void ClrHit() { field_0x4c &= ~16; }
void SetHit() { field_0x4c |= 16; }
@@ -37,6 +37,6 @@ public:
bool GetPreWallChk() const { return mPreWallChk; }
bool GetPreGroundChk() const { return mPreGroundChk; }
bool GetPreRoofChk() const { return mPreRoofChk; }
};
}; // Size: 0x58
#endif /* C_BG_S_LIN_CHK_H */
+1 -1
View File
@@ -87,7 +87,7 @@ public:
virtual void ClassifyPlane();
virtual void ChkPolyThrough(int, cBgS_PolyPassChk*);
virtual void ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
virtual void ChkGrpThrough(int, cBgS_GrpPassChk*, int);
virtual bool ChkGrpThrough(int, cBgS_GrpPassChk*, int);
/* 0x08 */ Mtx* mpModelMtx;
/* 0x0C */ Mtx mOldMtx;
+2 -2
View File
@@ -15,8 +15,8 @@ class cM3dGCps : public cM3dGLin {
public:
/* 0x1C */ f32 mRadius;
cM3dGCps(void);
virtual ~cM3dGCps(void);
cM3dGCps(void) {}
virtual ~cM3dGCps(void) {}
void Set(const cXyz&, const cXyz&, f32);
void Set(const cM3dGCpsS&);
void SetCps(const cM3dGCps&);
+90
View File
@@ -0,0 +1,90 @@
#include "f_op/f_op_actor_mng.h"
#include "d/d_cc_d.h"
#include "d/d_bg_s_lin_chk.h"
#include "d/d_bg_s_gnd_chk.h"
#include "d/d_particle.h"
#include "dolphin/types.h"
class daArrow_c : fopAc_ac_c {
public:
enum ArrowType {
NORMAL_ARROWS = 0,
FIRE_ARROWS = 1,
ICE_ARROWS = 2,
LIGHT_ARROWS = 3,
};
BOOL _createHeap();
void _atHit(dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*);
void checkCreater();
void setLightEffect();
void setBlur();
void createBlur();
void setArrowShootSe();
void setDrawShapeMaterial();
void arrowShooting();
void arrowUseMp();
void ShieldReflect();
void check_water_in();
BOOL changeArrowMp();
void changeArrowType();
void changeArrowTypeNotReady();
void setRoomInfo();
void setKeepMatrix();
void setStopActorMatrix();
void procWait();
void procMove();
void procReturn();
void procStop_BG();
void procStop_Actor();
void procWater();
void checkRestMp();
void setTypeByPlayer();
void createInit();
BOOL _execute();
BOOL _draw();
s32 _create();
daArrow_c();
BOOL _delete();
public:
/* 0x290 */ bool mbShotByZelda;
/* 0x291 */ u8 field_0x291[0x294 - 0x291];
/* 0x294 */ J3DModel* mpModel;
/* 0x298 */ u8 field_0x298[0x2A0 - 0x298];
/* 0x2A0 */ dBgS_ArrowLinChk mLinChk;
/* 0x30C */ dBgS_ObjGndChk mGndChk;
/* 0x360 */ dCcD_Stts mStts;
/* 0x39C */ dCcD_Cps mCps;
/* 0x4D4 */ dCcD_Sph mSph;
/* 0x600 */ u8 field_0x600[0x601 - 0x600];
/* 0x601 */ u8 mArrowType;
/* 0x602 */ s16 field_0x602;
/* 0x604 */ s16 field_0x604;
/* 0x606 */ u8 field_0x606[0x610 - 0x606];
/* 0x610 */ s32 mHitActorProcID;
/* 0x614 */ s32 mHitJointIndex;
/* 0x618 */ cXyz field_0x618;
/* 0x624 */ u8 field_0x624[0x668 - 0x624];
/* 0x668 */ dPa_followEcallBack mPtclFollowCb;
/* 0x67C */ csXyz field_0x67c;
/* 0x682 */ u8 field_0x682;
/* 0x683 */ u8 field_0x683[0x684 - 0x683];
/* 0x684 */ u32 field_0x684;
/* 0x688 */ bool field_0x688;
/* 0x689 */ u8 field_0x689[0x6A8 - 0x689];
/* 0x6A8 */ cXyz field_0x6a8;
/* 0x6B4 */ u8 field_0x6B4[0x6E6 - 0x6B4];
/* 0x6E6 */ csXyz field_0x6e6;
/* 0x6EC */ fopAc_ac_c* field_0x6ec;
/* 0x6F0 */ cXyz mNearestHitPos;
/* 0x6FC */ f32 mNearestHitDist;
/* 0x700 */ bool mbHitActor;
/* 0x701 */ u8 field_0x701[0x704 - 0x701];
static u8 m_keep_type;
static const char m_arc_name[];
};
STATIC_ASSERT(sizeof(daArrow_c) == 0x704);
+2 -2
View File
@@ -90,8 +90,8 @@ public:
/* 0x300 */ f32 field_0x300;
/* 0x304 */ daPy_demo_c mDemo;
virtual void getLeftHandMatrix();
virtual void getRightHandMatrix();
virtual MtxP getLeftHandMatrix();
virtual MtxP getRightHandMatrix();
virtual void getGroundY();
virtual void getTactMusic() const;
virtual void getTactTimerCancel() const;
+2 -2
View File
@@ -839,8 +839,8 @@ public:
void checkRopeTag();
void checkPlayerNoDraw();
void getGroundY();
void getLeftHandMatrix();
void getRightHandMatrix();
MtxP getLeftHandMatrix();
MtxP getRightHandMatrix();
void checkPlayerFly() const;
void checkFrontRoll() const;
void checkBottleSwing() const;
+2 -2
View File
@@ -7,8 +7,8 @@
class dBgS_GndChk : public cBgS_GndChk, public dBgS_Chk {
public:
/* 8007757C */ dBgS_GndChk() {
this->SetPolyPassChk(this->GetPolyPassChkInfo());
this->SetGrpPassChk(this->GetGrpPassChkInfo());
SetPolyPassChk(GetPolyPassChkInfo());
SetGrpPassChk(GetGrpPassChkInfo());
}
/* 800775F0 */ virtual ~dBgS_GndChk() {}
}; // Size: 0x54
+19 -9
View File
@@ -6,23 +6,33 @@
class dBgS_GrpPassChk : public cBgS_GrpPassChk {
public:
enum {
/* 0x1 */ NORMAL_GRP = 1,
/* 0x2 */ WATER_GRP = 2,
/* 0x3 */ FULL_GRP = NORMAL_GRP | WATER_GRP | 4 | 8,
NORMAL_GRP = 0x01,
WATER_GRP = 0x02,
YOGAN_GRP = 0x04, // Lava
DOKU_GRP = 0x08, // Unused, for poison?
SPL_GRP = WATER_GRP | YOGAN_GRP | DOKU_GRP,
FULL_GRP = NORMAL_GRP | SPL_GRP,
LIGHT_GRP = 0x10,
};
/* 80077BA0 */ dBgS_GrpPassChk() { mGrp = NORMAL_GRP; }
/* 80077BC4 */ virtual ~dBgS_GrpPassChk() {}
void OnWaterGrp() { mGrp |= WATER_GRP; }
void OnSpl() { mGrp |= WATER_GRP; }
void OnNormalGrp() { mGrp |= NORMAL_GRP; }
void OffNormalGrp() { mGrp &= ~NORMAL_GRP; }
void OffFullGrp() { mGrp &= ~FULL_GRP; }
void OnWaterGrp() { mGrp |= WATER_GRP; }
void OnYoganGrp() { mGrp |= YOGAN_GRP; }
void OnSpl() { mGrp |= SPL_GRP; }
void OnAll() { mGrp |= FULL_GRP; }
u32 MaskNormalGrp() const {return mGrp & 1; }
u32 MaskWaterGrp() const {return mGrp & 2; }
void OnLightGrp() { mGrp |= LIGHT_GRP; }
void OffNormalGrp() { mGrp &= ~NORMAL_GRP; }
void OffWaterGrp() { mGrp &= ~WATER_GRP; }
void OffFullGrp() { mGrp &= ~FULL_GRP; }
u32 MaskNormalGrp() const { return mGrp & NORMAL_GRP; }
u32 MaskWaterGrp() const { return mGrp & WATER_GRP; }
u32 MaskYoganGrp() const { return mGrp & YOGAN_GRP; }
u32 MaskDokuGrp() const { return mGrp & DOKU_GRP; }
u32 MaskLightGrp() const { return mGrp & LIGHT_GRP; }
private:
/* 0x4 */ u32 mGrp;
};
+11 -4
View File
@@ -8,10 +8,13 @@ class fopAc_ac_c;
class dBgS_LinChk : public cBgS_LinChk, public dBgS_Chk {
public:
/* 80077C68 */ dBgS_LinChk();
/* 80077C68 */ dBgS_LinChk() {
SetPolyPassChk(GetPolyPassChkInfo());
SetGrpPassChk(GetGrpPassChkInfo());
}
/* 80077D64 */ void Set(cXyz const* pi_start, cXyz const* pi_end, fopAc_ac_c const*);
/* 80077CDC */ virtual ~dBgS_LinChk();
/* 80077CDC */ virtual ~dBgS_LinChk() {}
/* 0x00 cBgS_LinChk */;
/* 0x58 dBgS_Chk */;
@@ -40,9 +43,13 @@ public:
class dBgS_ArrowLinChk : public dBgS_LinChk {
public:
/* 800781D8 */ dBgS_ArrowLinChk();
/* 800781D8 */ dBgS_ArrowLinChk() {
SetArrow(); // Don't check arrows
OnYoganGrp(); // Check lava
OnNormalGrp();
}
/* 80078240 */ virtual ~dBgS_ArrowLinChk();
/* 80078240 */ virtual ~dBgS_ArrowLinChk() {}
};
class dBgS_ObjLinChk : public dBgS_LinChk {
+11 -5
View File
@@ -10,10 +10,10 @@ public:
/* 0x4 */ u8 mbObjThrough;
/* 0x5 */ u8 mbCamThrough;
/* 0x6 */ u8 mbLinkThrough;
/* 0x7 */ u8 mbArrowsAndLightThrough;
/* 0x7 */ u8 mbArrowThrough; // Also light
/* 0x8 */ u8 mbBombThrough;
/* 0x9 */ u8 mbBoomerangThrough;
/* 0xA */ u8 mbHookshotThrough;
/* 0xA */ u8 mbRopeThrough; // Actually Hookshot?
};
class dBgS_PolyPassChk : public cBgS_PolyPassChk {
@@ -22,14 +22,20 @@ public:
mbObjThrough = 0;
mbCamThrough = 0;
mbLinkThrough = 0;
mbArrowsAndLightThrough = 0;
mbArrowThrough = 0;
mbBombThrough = 0;
mbBoomerangThrough = 0;
mbHookshotThrough = 0;
mbRopeThrough = 0;
}
virtual ~dBgS_PolyPassChk() {}
void SetObj() { mbObjThrough = 1; }
void SetObj() { mbObjThrough = true; }
void SetCam() { mbCamThrough = true; }
void SetLink() { mbLinkThrough = true; }
void SetArrow() { mbArrowThrough = true; }
void SetBomb() { mbBombThrough = true; }
void SetBoomerang() { mbBoomerangThrough = true; }
void SetRope() { mbRopeThrough = true; }
};
STATIC_ASSERT(sizeof(dBgS_PolyPassChk) == 0xC);
+2 -1
View File
@@ -2,6 +2,7 @@
#define D_BG_W_H
#include "SSystem/SComponent/c_bg_w.h"
#include "SSystem/SComponent/c_sxyz.h"
class dBgS_Acch;
class cM3dGPla;
@@ -45,7 +46,7 @@ public:
virtual ~dBgW() {}
virtual void ChkPolyThrough(int, cBgS_PolyPassChk*);
virtual void ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
virtual void ChkGrpThrough(int, cBgS_GrpPassChk*, int);
virtual bool ChkGrpThrough(int, cBgS_GrpPassChk*, int);
virtual void CrrPos(cBgS_PolyInfo&, void*, bool, cXyz*, csXyz*, csXyz*);
virtual void TransPos(cBgS_PolyInfo&, void*, bool, cXyz*, csXyz*, csXyz*);
virtual void MatrixCrrPos(cBgS_PolyInfo&, void*, bool, cXyz*, csXyz*, csXyz*);
+6 -2
View File
@@ -173,6 +173,7 @@ public:
u8 GetHitMark() { return mHitMark; }
void SetRVec(cXyz& vec) { mRVec = vec; }
void SetHitPos(cXyz& pos) { mHitPos = pos; }
cXyz* GetHitPosP() { return &mHitPos; }
// private:
/* 0x1C */ u8 mSe;
@@ -202,6 +203,7 @@ public:
void SetRVec(cXyz& vec) { mRVec = vec; }
cXyz* GetVecP() { return &mVec; }
void SetHitPos(cXyz& pos) { mHitPos = pos; }
cXyz* GetHitPosP() { return &mHitPos; }
private:
/* 0x1C */ u8 mSe;
@@ -344,6 +346,8 @@ public:
void SetAtRVec(cXyz& vec) { mGObjAt.SetRVec(vec); }
void SetTgHitPos(cXyz& pos) { mGObjTg.SetHitPos(pos); }
void SetAtHitPos(cXyz& pos) { mGObjAt.SetHitPos(pos); }
cXyz* GetAtHitPosP() { return mGObjAt.GetHitPosP(); }
cXyz* GetTgHitPosP() { return mGObjTg.GetHitPosP(); }
protected:
/* 0x050 */ dCcD_GObjAt mGObjAt;
@@ -372,7 +376,7 @@ public:
void Set(dCcD_SrcSph const&);
void StartCAt(cXyz&);
void MoveCAt(cXyz&);
virtual cCcD_ShapeAttr* GetShapeAttr();
virtual cCcD_ShapeAttr* GetShapeAttr() { return (cCcD_ShapeAttr*)this; }
virtual ~dCcD_Sph() {}
}; // Size = 0x12C
@@ -380,7 +384,7 @@ public:
class dCcD_Cps : public dCcD_GObjInf, public cCcD_CpsAttr {
public:
void Set(dCcD_SrcCps const&);
cCcD_ShapeAttr* GetShapeAttr();
cCcD_ShapeAttr* GetShapeAttr() { return (cCcD_ShapeAttr*)this; }
void CalcAtVec();
void CalcTgVec();
virtual ~dCcD_Cps() {}
+15
View File
@@ -187,6 +187,9 @@ public:
dTimer_c* getTimerPtr() { return mTimerInfo.mTimerPtr; }
s32 getTimerMode() { return mTimerInfo.mTimerMode; }
s16 getItemMagicCount() { return mItemMagicCount; }
void setItemMagicCount(s16 magic) { mItemMagicCount = magic; }
/* 0x0000 */ dBgS mBgS;
/* 0x1404 */ dCcS mCcS;
@@ -1005,6 +1008,14 @@ inline s32 dComIfGp_checkStatus(u16 flags) {
return g_dComIfG_gameInfo.play.checkStatus(flags);
}
inline s16 dComIfGp_getItemMagicCount() {
return g_dComIfG_gameInfo.play.getItemMagicCount();
}
inline void dComIfGp_setItemMagicCount(s16 magic) {
g_dComIfG_gameInfo.play.setItemMagicCount(magic);
}
/**
* === EVENT ===*/
@@ -1028,6 +1039,10 @@ inline void dComIfGp_event_offEventFlag(s16 flag) {
return g_dComIfG_gameInfo.play.getEvent().offEventFlag(flag);
}
inline void dComIfGp_event_reset() {
g_dComIfG_gameInfo.play.getEvent().reset();
}
inline u8 dComIfGp_event_getPreItemNo() {
return g_dComIfG_gameInfo.play.getEvent().getPreItemNo();
}
+1
View File
@@ -67,6 +67,7 @@ public:
u16 chkEventFlag(u16 flag) { return flag & mEventFlag; }
void onEventFlag(u16 flag) { mEventFlag |= flag; }
void offEventFlag(u16 flag) { mEventFlag &= ~flag; }
void reset() { onEventFlag(8); }
bool runCheck() { return mMode != 0; }
+30
View File
@@ -0,0 +1,30 @@
#ifndef D_JNT_HIT_H
#define D_JNT_HIT_H
#include "global.h"
#include "SSystem/SComponent/c_xyz.h"
#include "JSystem/J3DGraphAnimator/J3DModel.h"
struct __jnt_hit_data_c {
public:
/* 0x0 */ s16 mJointIndex;
/* 0x2 */ s16 field_0x2;
/* 0x4 */ f32 field_0x4;
/* 0x8 */ cXyz* field_0x8;
};
class JntHit_c {
public:
J3DModel* getModel() { return mpModel; }
/* 0x00 */ __jnt_hit_data_c* mpHitData;
/* 0x04 */ J3DModel* mpModel;
/* 0x08 */ cXyz* field_0x08;
/* 0x0C */ short* field_0x0c;
/* 0x10 */ short* field_0x10;
/* 0x14 */ short* mpJointIndexes;
/* 0x18 */ s16 mHitDataCount;
/* 0x1A */ u8 field_0x1A[0x20 - 0x1A];
};
#endif /* D_JNT_HIT_H */
+1
View File
@@ -47,6 +47,7 @@ public:
class dPa_followEcallBack : public dPa_levelEcallBack {
public:
dPa_followEcallBack(u8, u8);
virtual ~dPa_followEcallBack();
virtual void execute(JPABaseEmitter*);
+6
View File
@@ -8,6 +8,12 @@
extern "C" {
#endif
extern GXRenderModeObj GXNtsc480IntDf;
extern GXRenderModeObj GXNtsc480Int;
extern GXRenderModeObj GXMpal480IntDf;
extern GXRenderModeObj GXPal528IntDf;
extern GXRenderModeObj GXEurgb60Hz480IntDf;
void GXSetDispCopySrc(u16 left, u16 top, u16 width, u16 height);
void GXSetTexCopySrc(u16 left, u16 top, u16 width, u16 height);
void GXSetDispCopyDst(u16 arg0, u16 arg1);
+2 -2
View File
@@ -168,7 +168,7 @@ struct actor_attention_types {
/* 0x14 */ u32 mFlags;
}; // Size = 0x18
class dJntCol_c;
class JntHit_c;
struct cull_sphere {
/* 0x0 */ Vec mCenter;
@@ -211,7 +211,7 @@ public:
} mCull;
/* 0x248 */ f32 mCullSizeFar;
/* 0x24C */ J3DModel* model;
/* 0x250 */ dJntCol_c* mJntCol;
/* 0x250 */ JntHit_c* mJntHit;
/* 0x254 */ f32 speedF;
/* 0x258 */ f32 mGravity;
/* 0x25C */ f32 mMaxFallSpeed;
+4 -4
View File
@@ -119,8 +119,8 @@ inline void fopAcM_SetParam(void* p_actor, u32 param) {
fpcM_SetParam(p_actor, param);
}
inline void fopAcM_SetJntCol(fopAc_ac_c* i_actorP, dJntCol_c* i_jntColP) {
i_actorP->mJntCol = i_jntColP;
inline void fopAcM_SetJntHit(fopAc_ac_c* i_actorP, JntHit_c* i_jntHitP) {
i_actorP->mJntHit = i_jntHitP;
}
inline s16 fopAcM_GetProfName(void* pActor) {
@@ -251,8 +251,8 @@ inline f32 fopAcM_GetMaxFallSpeed(fopAc_ac_c* p_actor) {
return p_actor->mMaxFallSpeed;
}
inline dJntCol_c* fopAcM_GetJntCol(fopAc_ac_c* i_actor) {
return i_actor->mJntCol;
inline JntHit_c* fopAcM_GetJntHit(fopAc_ac_c* i_actor) {
return i_actor->mJntHit;
}
inline void fopAcM_setCullSizeFar(fopAc_ac_c* i_actor, f32 i_far) {
+11 -5
View File
@@ -135,6 +135,12 @@ public:
*/
/* 8000CD64 */ static inline void transS(cXyz const& xyz) { MTXTrans(now, xyz.x, xyz.y, xyz.z); }
/**
* Translates a new Matrix by the given cXyz and then concatenates it with the `now` matrix
* @param xyz The xyz translation vector
*/
/* 8000CD64 */ static inline void transM(cXyz const& xyz) { transM(xyz.x, xyz.y, xyz.z); }
/**
* Translates a new Matrix by the given X, Y, and Z values and then concatenates it with the `now` matrix
* @param x The x-axis translation value
@@ -153,7 +159,7 @@ public:
* Scales a new Matrix by the given cXyz and then concatenates it with the `now` matrix
* @param xyz The xyz scale vector
*/
/* 8000CE70 */ static void scaleM(cXyz const& xyz);
/* 8000CE70 */ static void scaleM(cXyz const& xyz) { scaleM(xyz.x, xyz.y, xyz.z); }
/**
* Scales a new Matrix by the given X, Y, and Z values and then concatenates it with the `now` matrix
@@ -166,7 +172,7 @@ public:
/* 8000CE9C */ static void XYZrotS(csXyz const& xyz);
/**
* Rotates the `now` matrix by the given csXyz in the order Z, Y, X
* Rotates the `now` matrix by the given csXyz in the order X, Y, Z
* @param xyz The xyz rotation vector
*/
/* 8000CED4 */ static void XYZrotM(csXyz const& xyz);
@@ -174,10 +180,10 @@ public:
/* 8000CF0C */ static void ZXYrotS(csXyz const& xyz);
/**
* Rotates the `now` matrix by the given csXyz in the order X, Y, Z
* Rotates the `now` matrix by the given csXyz in the order Z, X, Y
* @param xyz The xyz rotation vector
*/
/* 8000CF44 */ static void ZXYrotM(csXyz const& xyz);
/* 8000CF44 */ static void ZXYrotM(csXyz const& xyz) { ZXYrotM(xyz.x, xyz.y, xyz.z); }
/* 8000CF7C */ static void quatM(Quaternion const*);
@@ -232,7 +238,7 @@ public:
static void XYZrotS(s16 x, s16 y, s16 z) { mDoMtx_XYZrotS(now, x, y, z); }
/**
* Rotates the `now` matrix by the given X, Y, and Z values in the order Z, Y, X
* Rotates the `now` matrix by the given X, Y, and Z values in the order X, Y, Z
* @param x The x-axis rotation value
* @param y The y-axis rotation value
* @param z The z-axis rotation value
+139 -26
View File
@@ -4,69 +4,182 @@
//
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/types.h"
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/JUtility/JUTDbPrint.h"
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "MSL_C/stdio.h"
#include "dolphin/vi/vi.h"
/* 802C740C-802C7410 .text create__12JUTAssertionFv */
void JUTAssertion::create() {
/* Nonmatching */
namespace JUTAssertion {
namespace {
static char sMessageFileLine[64];
static char sMessageString[96];
static s32 sDisplayTime = -1;
static s32 sDevice = 3;
static bool mVisible = true;
static u32 sMessageLife;
static s32 sMessageOwner;
static u8 mSynchro;
}
}
/* 802C740C-802C7410 .text create__12JUTAssertionFv */
void JUTAssertion::create() {}
/* 802C7410-802C744C .text flush_subroutine__12JUTAssertionFv */
void JUTAssertion::flush_subroutine() {
/* Nonmatching */
u32 JUTAssertion::flush_subroutine() {
if (sMessageLife == 0) {
return 0;
}
if (sMessageLife != -1) {
sMessageLife--;
}
if (sMessageLife >= 5) {
return sMessageLife;
}
return 0;
}
/* 802C744C-802C74B0 .text flushMessage__12JUTAssertionFv */
void JUTAssertion::flushMessage() {
/* Nonmatching */
if (flush_subroutine() && mVisible == true) {
JUTDirectPrint::getManager()->drawString(16, 16, sMessageFileLine);
JUTDirectPrint::getManager()->drawString(16, 24, sMessageString);
}
}
/* 802C74B0-802C7690 .text flushMessage_dbPrint__12JUTAssertionFv */
void JUTAssertion::flushMessage_dbPrint() {
/* Nonmatching */
if (flush_subroutine() && mVisible == true && JUTDbPrint::getManager() != NULL) {
JUTFont* font = JUTDbPrint::getManager()->getFont();
if (font != NULL) {
u8 tmp = ((VIGetRetraceCount() & 0x3C) << 2) | 0xF;
font->setGX();
font->setCharColor(JUtility::TColor(255, tmp, tmp, 255));
font->drawString(30, 36, sMessageFileLine, true);
font->drawString(30, 54, sMessageString, true);
}
}
}
/* 802C7690-802C7698 .text getSDevice__12JUTAssertionFv */
void JUTAssertion::getSDevice() {
/* Nonmatching */
u32 JUTAssertion::getSDevice() {
return sDevice;
}
/* 802C7698-802C7788 .text setConfirmMessage__12JUTAssertionFUlPcibPCc */
void JUTAssertion::setConfirmMessage(unsigned long, char*, int, bool, const char*) {
/* Nonmatching */
void JUTAssertion::setConfirmMessage(u32 param_1, char* file, int line, bool param_4, const char* msg) {
if (param_4 == 1) {
return;
}
u32 r28 = sMessageLife;
if (r28 == 0 && (param_1 & 1) != 0) {
sMessageLife = sDisplayTime;
sMessageOwner = 2;
snprintf(sMessageFileLine, sizeof(sMessageFileLine) - 1, "FAILED [%s:%d]", file, line);
snprintf(sMessageString, sizeof(sMessageString) - 1, "%s", msg);
}
if ((r28 == 0 || mSynchro == 0) && (param_1 & 2) != 0) {
JUTWarningConsole_f("FAILED [%s:%d] %s\n", file, line, msg);
}
}
/* 802C7788-802C78E4 .text showAssert__12JUTAssertionFUlPCciPCc */
void JUTAssertion::showAssert(unsigned long, const char*, int, const char*) {
/* Nonmatching */
void JUTAssertion::showAssert(u32 device, const char* file, int line, const char* msg) {
OSReport("Failed assertion %s in \"%s\" on line %d\n", msg, file, line);
if ((device & 1) == 0) {
return;
}
if (!JUTDirectPrint::getManager()) {
return;
}
JUTDirectPrint::getManager()->erase(10, 0x10, 0x132, 0x18);
char buffer[0x100];
snprintf(buffer, 95, "Failed assertion: %s:%d", file, line);
JUTDirectPrint::getManager()->drawString(0x10, 0x10, buffer);
snprintf(buffer, 95, "%s", msg);
JUTDirectPrint::getManager()->drawString(0x10, 0x18, buffer);
VISetNextFrameBuffer(JUTDirectPrint::getManager()->getFrameBuffer());
VIWaitForRetrace();
VIFlush();
// busy loop for 2 seconds
OSTime var1 = OSGetTime();
while (OSTicksToMilliseconds(OSGetTime() - var1) < 2000) {}
}
/* 802C78E4-802C79FC .text setWarningMessage_f_va */
void setWarningMessage_f_va {
/* Nonmatching */
void setWarningMessage_f_va(u32 device, const char* file, int line, const char* msg, va_list args) {
u32 messageLife = JUTAssertion::sMessageLife;
bool r26 = false;
if (messageLife == 0) {
if (device & 1) {
JUTAssertion::sMessageLife = JUTAssertion::sDisplayTime;
JUTAssertion::sMessageOwner = 3;
snprintf(JUTAssertion::sMessageFileLine, sizeof(JUTAssertion::sMessageFileLine) - 1, "WARNING [%s:%d]", file, line);
}
vsnprintf(JUTAssertion::sMessageString, sizeof(JUTAssertion::sMessageString) - 1, msg, args);
r26 = true;
}
if ((messageLife == 0 || JUTAssertion::mSynchro == 0) && (device & 2)) {
JUTWarningConsole_f("WARNING [%s:%d] ", file, line);
if (!r26) {
JUTWarningConsole_f_va(msg, args);
} else {
JUTWarningConsole(JUTAssertion::sMessageString);
}
JUTWarningConsole("\n");
}
}
/* 802C79FC-802C7A7C .text setWarningMessage_f__12JUTAssertionFUlPciPCce */
void JUTAssertion::setWarningMessage_f(unsigned long, char*, int, const char*, ...) {
/* Nonmatching */
void JUTAssertion::setWarningMessage_f(u32 device, char* file, int line, const char* msg, ...) {
va_list args;
va_start(args, msg);
setWarningMessage_f_va(device, file, line, msg, args);
va_end(args);
}
/* 802C7A7C-802C7B94 .text setLogMessage_f_va */
void setLogMessage_f_va {
/* Nonmatching */
void setLogMessage_f_va(u32 device, const char* file, int line, const char* msg, va_list args) {
u32 messageLife = JUTAssertion::sMessageLife;
bool r26 = false;
if (messageLife == 0) {
if (device & 1) {
JUTAssertion::sMessageLife = JUTAssertion::sDisplayTime;
JUTAssertion::sMessageOwner = 4;
snprintf(JUTAssertion::sMessageFileLine, sizeof(JUTAssertion::sMessageFileLine) - 1, "[%s:%d]", file, line);
}
vsnprintf(JUTAssertion::sMessageString, sizeof(JUTAssertion::sMessageString) - 1, msg, args);
r26 = true;
}
if ((messageLife == 0 || JUTAssertion::mSynchro == 0) && (device & 2)) {
JUTReportConsole_f("[%s:%d] ", file, line);
if (!r26) {
JUTReportConsole_f_va(msg, args);
} else {
JUTReportConsole(JUTAssertion::sMessageString);
}
JUTReportConsole("\n");
}
}
/* 802C7B94-802C7C14 .text setLogMessage_f__12JUTAssertionFUlPciPCce */
void JUTAssertion::setLogMessage_f(unsigned long, char*, int, const char*, ...) {
/* Nonmatching */
void JUTAssertion::setLogMessage_f(u32 device, char* file, int line, const char* msg, ...) {
va_list args;
va_start(args, msg);
setLogMessage_f_va(device, file, line, msg, args);
va_end(args);
}
/* 802C7C14-802C7C1C .text setVisible__12JUTAssertionFb */
void JUTAssertion::setVisible(bool) {
/* Nonmatching */
void JUTAssertion::setVisible(bool visible) {
mVisible = visible;
}
/* 802C7C1C-802C7C34 .text setMessageCount__12JUTAssertionFi */
void JUTAssertion::setMessageCount(int) {
/* Nonmatching */
void JUTAssertion::setMessageCount(int msg_count) {
sMessageLife = msg_count <= 0 ? 0 : msg_count;
}
+375 -55
View File
@@ -4,100 +4,376 @@
//
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "JSystem/JUtility/JUTVideo.h"
#include "MSL_C/stdio.h"
#include "dolphin/types.h"
JUTConsoleManager* JUTConsoleManager::sManager;
/* 802CA2FC-802CA3CC .text create__10JUTConsoleFUiUiP7JKRHeap */
void JUTConsole::create(unsigned int, unsigned int, JKRHeap*) {
/* Nonmatching */
JUTConsole* JUTConsole::create(unsigned int param_0, unsigned int maxLines, JKRHeap* p_heap) {
JUTConsoleManager* pManager = JUTConsoleManager::getManager();
JUT_ASSERT(33, pManager != 0);
void* buffer = JKRAllocFromHeap(p_heap, getObjectSizeFromBufferSize(param_0, maxLines), 0);
u8* tmpBuf = (u8*)buffer;
JUTConsole* newConsole = new (tmpBuf) JUTConsole(param_0, maxLines, true);
newConsole->mBuf = tmpBuf + sizeof(JUTConsole);
newConsole->clear();
pManager->appendConsole(newConsole);
return newConsole;
}
/* 802CA3CC-802CA4C8 .text create__10JUTConsoleFUiPvUl */
void JUTConsole::create(unsigned int, void*, unsigned long) {
/* Nonmatching */
JUTConsole* JUTConsole::create(unsigned int param_0, void* buffer, u32 bufferSize) {
JUTConsoleManager* pManager = JUTConsoleManager::getManager();
JUT_ASSERT(59, pManager != 0);
JUT_ASSERT(62, ( (u32)buffer & 0x3 ) == 0);
u32 maxLines = getLineFromObjectSize(bufferSize, param_0);
JUTConsole* newConsole = new (buffer) JUTConsole(param_0, maxLines, false);
newConsole->mBuf = (u8*)buffer + sizeof(JUTConsole);
newConsole->clear();
pManager->appendConsole(newConsole);
return newConsole;
}
/* 802CA4C8-802CA5AC .text __ct__10JUTConsoleFUiUib */
JUTConsole::JUTConsole(unsigned int, unsigned int, bool) {
/* Nonmatching */
JUTConsole::JUTConsole(unsigned int param_0, unsigned int maxLines, bool param_2) {
field_0x2c = param_2;
field_0x20 = param_0;
mMaxLines = maxLines;
mPositionX = 30;
mPositionY = 50;
mHeight = 20;
if (mHeight > mMaxLines) {
mHeight = mMaxLines;
}
mFont = NULL;
mVisible = true;
field_0x65 = false;
field_0x66 = false;
mOutput = 1;
field_0x5c.set(0, 0, 0, 100);
field_0x60.set(0, 0, 0, 230);
}
static void dummy1() {
OSReport("console != 0");
}
/* 802CA5AC-802CA658 .text __dt__10JUTConsoleFv */
JUTConsole::~JUTConsole() {
/* Nonmatching */
JUT_ASSERT(150, JUTConsoleManager::getManager());
JUTConsoleManager::getManager()->removeConsole(this);
}
/* 802CA658-802CA668 .text getObjectSizeFromBufferSize__10JUTConsoleFUiUi */
void JUTConsole::getObjectSizeFromBufferSize(unsigned int, unsigned int) {
/* Nonmatching */
size_t JUTConsole::getObjectSizeFromBufferSize(unsigned int param_0, unsigned int maxLines) {
return (param_0 + 2) * maxLines + sizeof(JUTConsole);
}
/* 802CA668-802CA678 .text getLineFromObjectSize__10JUTConsoleFUlUi */
void JUTConsole::getLineFromObjectSize(unsigned long, unsigned int) {
/* Nonmatching */
size_t JUTConsole::getLineFromObjectSize(u32 bufferSize, unsigned int param_1) {
return (bufferSize - sizeof(JUTConsole)) / (param_1 + 2);
}
/* 802CA678-802CA6D4 .text clear__10JUTConsoleFv */
void JUTConsole::clear() {
/* Nonmatching */
field_0x30 = 0;
field_0x34 = 0;
field_0x38 = 0;
field_0x3c = 0;
for (u32 i = 0; i < mMaxLines; i++) {
setLineAttr(i, 0);
}
setLineAttr(0, -1);
*getLinePtr(0) = 0;
}
/* 802CA6D4-802CAC1C .text doDraw__10JUTConsoleCFQ210JUTConsole12EConsoleType */
void JUTConsole::doDraw(JUTConsole::EConsoleType) const {
void JUTConsole::doDraw(JUTConsole::EConsoleType consoleType) const {
/* Nonmatching */
f32 font_yOffset;
s32 changeLine_1;
s32 changeLine_2;
if (mVisible && (mFont != NULL || consoleType == CONSOLE_TYPE_2)) {
if (mHeight != 0) {
bool temp_r30 = consoleType == CONSOLE_TYPE_0;
font_yOffset = 2.0f + mFontSizeY;
if (consoleType != CONSOLE_TYPE_2) {
if (JUTVideo::getManager() == NULL) {
J2DOrthoGraph ortho(0.0f, 0.0f, 640.0f, 480.0f, -1.0f, 1.0f);
ortho.setPort();
} else {
J2DOrthoGraph ortho(0.0f, 0.0f, JUTVideo::getManager()->getFbWidth(),
JUTVideo::getManager()->getEfbHeight(), -1.0f, 1.0f);
ortho.setPort();
}
const JUtility::TColor* color;
if (temp_r30) {
color = &field_0x60;
} else {
color = &field_0x5c;
}
J2DFillBox(mPositionX - 2, (int)(mPositionY - font_yOffset),
(int)((mFontSizeX * field_0x20) + 4.0f), (int)(font_yOffset * mHeight),
*color);
mFont->setGX();
if (temp_r30) {
s32 s = (diffIndex(field_0x30, field_0x38) - mHeight) + 1;
if (s <= 0) {
mFont->setCharColor(JUtility::TColor(255, 255, 255, 255));
} else if (field_0x30 == field_0x34) {
mFont->setCharColor(JUtility::TColor(255, 230, 230, 255));
} else {
mFont->setCharColor(JUtility::TColor(230, 230, 255, 255));
}
} else {
mFont->setCharColor(JUtility::TColor(230, 230, 230, 255));
}
} else {
JUTDirectPrint::getManager()->erase(mPositionX - 3, mPositionY - 2,
(field_0x20 * 6) + 6,
(int)(font_yOffset * mHeight) + 4);
}
char* linePtr;
s32 curLine = field_0x30;
s32 yFactor = 0;
do {
linePtr = (char*)getLinePtr(curLine);
if ((u8)linePtr[-1] != NULL) {
if (consoleType != CONSOLE_TYPE_2) {
mFont->drawString_scale(mPositionX, ((yFactor * font_yOffset) + mPositionY),
mFontSizeX, mFontSizeY, linePtr, true);
} else {
JUTDirectPrint::getManager()->drawString(
mPositionX, ((yFactor * font_yOffset) + mPositionY), linePtr);
}
changeLine_1 = curLine + 1;
yFactor += 1;
changeLine_2 = changeLine_1 & ~(-((s32)mMaxLines <= (s32)changeLine_1));
curLine = changeLine_2;
} else {
break;
}
} while (yFactor < mHeight && changeLine_2 != field_0x34);
}
}
}
/* 802CAC1C-802CAC9C .text print_f__10JUTConsoleFPCce */
void JUTConsole::print_f(const char*, ...) {
/* Nonmatching */
void JUTConsole::print_f(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
JUTConsole_print_f_va_(this, fmt, args);
va_end(args);
}
/* 802CAC9C-802CAFB0 .text print__10JUTConsoleFPCc */
void JUTConsole::print(const char*) {
/* Nonmatching */
void JUTConsole::print(const char* param_0) {
if (mOutput & 2) {
OSReport("%s", param_0);
}
if (mOutput & 1) {
const u8* r29 = (const u8*)param_0;
u8* r28 = getLinePtr(field_0x38) + field_0x3c;
while (*r29) {
if (field_0x66 && field_0x34 == nextIndex(field_0x38)) {
break;
}
if (*r29 == '\n') {
r29++;
field_0x3c = field_0x20;
} else if (*r29 == '\t') {
r29++;
while (field_0x3c < field_0x20) {
*(r28++) = ' ';
field_0x3c++;
if (field_0x3c % 8 == 0) {
break;
}
}
} else if (mFont && mFont->isLeadByte(*r29)) {
if (field_0x3c + 1 < field_0x20) {
*(r28++) = *(r29++);
*(r28++) = *(r29++);
field_0x3c++;
field_0x3c++;
} else {
*(r28++) = 0;
field_0x3c++;
}
} else {
*(r28++) = *(r29++);
field_0x3c++;
}
if (field_0x3c < field_0x20) {
continue;
}
*r28 = 0;
field_0x38 = nextIndex(field_0x38);
field_0x3c = 0;
setLineAttr(field_0x38, 0xff);
r28 = getLinePtr(field_0x38);
*r28 = 0;
int local_28 = diffIndex(field_0x30, field_0x38);
if (local_28 == mHeight) {
field_0x30 = nextIndex(field_0x30);
}
if (field_0x38 == field_0x34) {
field_0x34 = nextIndex(field_0x34);
}
if (field_0x38 == field_0x30) {
field_0x30 = nextIndex(field_0x30);
}
}
*r28 = 0;
}
}
/* 802CAFB0-802CB03C .text JUTConsole_print_f_va_ */
void JUTConsole_print_f_va_ {
/* Nonmatching */
void JUTConsole_print_f_va_(JUTConsole* console, const char* fmt, va_list args) {
JUT_ASSERT(561, console!=0);
char buf[1024];
vsnprintf(buf, sizeof(buf), fmt, args);
console->print(buf);
}
/* 802CB03C-802CB19C .text dumpToTerminal__10JUTConsoleFUi */
void JUTConsole::dumpToTerminal(unsigned int) {
void JUTConsole::dumpToTerminal(unsigned int param_0) {
/* Nonmatching */
if (param_0 == 0) {
return;
}
u32 r29 = field_0x34;
if (param_0 != -1) {
r29 = field_0x38;
for (int i = 0; i != param_0; i++) {
int r25 = prevIndex(r29);
if (getLineAttr(r25) == 0) {
break;
}
r29 = r25;
if (r25 == field_0x34) {
break;
}
}
}
int r27 = 0;
OSReport("\n:::dump of console[%x]--------------------------------\n",this);
do {
u8* r28 = getLinePtr(r29);
u8 r24 = r28[-1];
if (r24 == 0) {
break;
}
if (field_0x65) {
OSReport("[%03d] %s\n", r27, r28);
} else {
OSReport("%s\n", r28);
}
r29 = nextIndex(r29);
r27++;
} while (r27 != field_0x34);
OSReport(":::dump of console[%x] END----------------------------\n",this);
}
/* 802CB19C-802CB278 .text scroll__10JUTConsoleFi */
void JUTConsole::scroll(int) {
/* Nonmatching */
void JUTConsole::scroll(int scrollAmnt) {
if (scrollAmnt < 0) {
int diff = diffIndex(field_0x34, field_0x30);
if (scrollAmnt < -diff) {
scrollAmnt = -diff;
}
} else {
if (scrollAmnt > 0) {
int diff = diffIndex(field_0x34, field_0x38);
if (diff + 1 <= mHeight) {
scrollAmnt = 0;
} else {
diff = diffIndex(field_0x30, field_0x38);
if (scrollAmnt > (int)(diff - mHeight) + 1) {
scrollAmnt = (int)(diff - mHeight) + 1;
}
}
}
}
field_0x30 += scrollAmnt;
if (field_0x30 < 0) {
field_0x30 += mMaxLines;
}
if (field_0x30 >= mMaxLines) {
field_0x30 -= mMaxLines;
}
}
/* 802CB278-802CB29C .text getUsedLine__10JUTConsoleCFv */
void JUTConsole::getUsedLine() const {
/* Nonmatching */
int JUTConsole::getUsedLine() const {
return diffIndex(field_0x34, field_0x38);
}
/* 802CB29C-802CB2C0 .text getLineOffset__10JUTConsoleCFv */
void JUTConsole::getLineOffset() const {
/* Nonmatching */
int JUTConsole::getLineOffset() const {
return diffIndex(field_0x34, field_0x30);
}
/* 802CB2C0-802CB2E8 .text __ct__17JUTConsoleManagerFv */
JUTConsoleManager::JUTConsoleManager() {
/* Nonmatching */
mActiveConsole = NULL;
mDirectConsole = NULL;
}
static void dummy2() {
OSReport("console != this && console != 0");
OSReport("\n:::dump of console[%x]----------------\n");
OSReport(":::dump of console[%x] END------------\n");
}
/* 802CB2E8-802CB380 .text createManager__17JUTConsoleManagerFP7JKRHeap */
void JUTConsoleManager::createManager(JKRHeap*) {
/* Nonmatching */
JUTConsoleManager* JUTConsoleManager::createManager(JKRHeap* pHeap) {
JUT_ASSERT(922, sManager == 0);
if (pHeap == NULL) {
pHeap = JKRHeap::sCurrentHeap;
}
JUTConsoleManager* manager = new (pHeap, 0) JUTConsoleManager();
sManager = manager;
return manager;
}
/* 802CB380-802CB4C4 .text appendConsole__17JUTConsoleManagerFP10JUTConsole */
void JUTConsoleManager::appendConsole(JUTConsole*) {
void JUTConsoleManager::appendConsole(JUTConsole* console) {
/* Nonmatching */
}
/* 802CB4C4-802CB674 .text removeConsole__17JUTConsoleManagerFP10JUTConsole */
void JUTConsoleManager::removeConsole(JUTConsole*) {
void JUTConsoleManager::removeConsole(JUTConsole* console) {
/* Nonmatching */
}
@@ -107,61 +383,105 @@ void JUTConsoleManager::draw() const {
}
/* 802CB740-802CB7B4 .text drawDirect__17JUTConsoleManagerCFb */
void JUTConsoleManager::drawDirect(bool) const {
/* Nonmatching */
void JUTConsoleManager::drawDirect(bool waitRetrace) const {
if (mDirectConsole != NULL) {
if (waitRetrace) {
s32 interrupt_status = OSEnableInterrupts();
u32 retrace_count = VIGetRetraceCount();
u32 new_count;
do {
new_count = VIGetRetraceCount();
} while (retrace_count == new_count);
OSRestoreInterrupts(interrupt_status);
}
mDirectConsole->doDraw(JUTConsole::CONSOLE_TYPE_2);
}
}
/* 802CB7B4-802CB810 .text setDirectConsole__17JUTConsoleManagerFP10JUTConsole */
void JUTConsoleManager::setDirectConsole(JUTConsole*) {
/* Nonmatching */
void JUTConsoleManager::setDirectConsole(JUTConsole* p_console) {
if (mDirectConsole != NULL) {
appendConsole(mDirectConsole);
}
if (p_console != NULL) {
removeConsole(p_console);
}
mDirectConsole = p_console;
}
static JUTConsole* sReportConsole;
/* 802CB810-802CB818 .text JUTSetReportConsole */
void JUTSetReportConsole {
/* Nonmatching */
void JUTSetReportConsole(JUTConsole* p_console) {
sReportConsole = p_console;
}
/* 802CB818-802CB820 .text JUTGetReportConsole */
void JUTGetReportConsole {
/* Nonmatching */
JUTConsole* JUTGetReportConsole() {
return sReportConsole;
}
static JUTConsole* sWarningConsole;
/* 802CB820-802CB828 .text JUTSetWarningConsole */
void JUTSetWarningConsole {
/* Nonmatching */
void JUTSetWarningConsole(JUTConsole* p_console) {
sWarningConsole = p_console;
}
/* 802CB828-802CB830 .text JUTGetWarningConsole */
void JUTGetWarningConsole {
/* Nonmatching */
JUTConsole* JUTGetWarningConsole() {
return sWarningConsole;
}
/* 802CB830-802CB8D0 .text JUTReportConsole_f_va */
void JUTReportConsole_f_va {
/* Nonmatching */
void JUTReportConsole_f_va(const char* fmt, va_list args) {
char buf[256];
if (JUTGetReportConsole() == NULL) {
vsnprintf(buf, sizeof(buf), fmt, args);
OSReport("%s", buf);
} else if (JUTGetReportConsole()->getOutput() & (JUTConsole::OUTPUT_CONSOLE | JUTConsole::OUTPUT_OSREPORT)) {
vsnprintf(buf, sizeof(buf), fmt, args);
JUTGetReportConsole()->print(buf);
}
}
/* 802CB8D0-802CB950 .text JUTReportConsole_f */
void JUTReportConsole_f {
/* Nonmatching */
void JUTReportConsole_f(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
JUTReportConsole_f_va(fmt, args);
va_end(args);
}
/* 802CB950-802CB984 .text JUTReportConsole */
void JUTReportConsole {
/* Nonmatching */
void JUTReportConsole(const char* message) {
JUTReportConsole_f("%s", message);
}
/* 802CB984-802CBA24 .text JUTWarningConsole_f_va */
void JUTWarningConsole_f_va {
/* Nonmatching */
void JUTWarningConsole_f_va(const char* fmt, va_list args) {
char buf[256];
if (JUTGetWarningConsole() == NULL) {
vsnprintf(buf, sizeof(buf), fmt, args);
OSReport("%s", buf);
} else if (JUTGetWarningConsole()->getOutput() & (JUTConsole::OUTPUT_CONSOLE | JUTConsole::OUTPUT_OSREPORT)) {
vsnprintf(buf, sizeof(buf), fmt, args);
JUTGetWarningConsole()->print(buf);
}
}
/* 802CBA24-802CBAA4 .text JUTWarningConsole_f */
void JUTWarningConsole_f {
/* Nonmatching */
void JUTWarningConsole_f(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
JUTReportConsole_f_va(fmt, args);
va_end(args);
}
/* 802CBAA4-802CBAD8 .text JUTWarningConsole */
void JUTWarningConsole {
/* Nonmatching */
void JUTWarningConsole(const char* message) {
JUTReportConsole_f("%s", message);
}
File diff suppressed because it is too large Load Diff
+55 -31
View File
@@ -31,25 +31,39 @@ public:
/* 0x2A3 */ s8 mEventState;
};
// Bokoblin. TODO: Include d_a_bk.h once implemented.
struct bk_class : public fopAc_ac_c {
u8 temp[0x121C - 0x290];
u8 field_0x121C;
};
// Kargaroc. TODO: Include d_a_bb.h once implemented.
struct bb_class : public fopAc_ac_c {};
static s32 daAndsw0_Draw(andsw0_class*) {
return 1;
}
static void daAndsw0_check(andsw0_class* i_this) {
/* Nonmatching */
u8 numToCheck = i_this->mNumSwitchesToCheck;
u32 switchIdxToCheck = i_this->mFirstSwitchToCheck ? i_this->mFirstSwitchToCheck : i_this->mSwitchToSet + 1;
s32 numToCheck = i_this->mNumSwitchesToCheck;
u32 switchIdxToCheck;
if (i_this->mFirstSwitchToCheck) {
switchIdxToCheck = i_this->mFirstSwitchToCheck;
} else {
switchIdxToCheck = i_this->mSwitchToSet + 1;
}
switch(i_this->mAction) {
case ACT_ON_ALL:
for(int i = 0; i < numToCheck; i++) {
if(dComIfGs_isSwitch(switchIdxToCheck, i_this->current.roomNo) == false) {
if(dComIfGs_isSwitch(switchIdxToCheck, fopAcM_GetRoomNo(i_this)) == false) {
break;
}
if(i == numToCheck - 1) {
if(i_this->mBehaviorType != 3) {
dComIfGs_onSwitch(i_this->mSwitchToSet, i_this->current.roomNo);
dComIfGs_onSwitch(i_this->mSwitchToSet, fopAcM_GetRoomNo(i_this));
}
switch(i_this->mBehaviorType) {
@@ -71,16 +85,16 @@ static void daAndsw0_check(andsw0_class* i_this) {
break;
case ACT_OFF_ALL:
switchIdxToCheck = i_this->mFirstSwitchToCheck ? i_this->mFirstSwitchToCheck : i_this->mSwitchToSet + 1;
u32 switchIdxToCheck2 = i_this->mFirstSwitchToCheck ? i_this->mFirstSwitchToCheck : i_this->mSwitchToSet + 1;
for(int i = 0; i < numToCheck; i++) {
if(dComIfGs_isSwitch(switchIdxToCheck, i_this->current.roomNo) == false) {
dComIfGs_offSwitch(i_this->mSwitchToSet, i_this->current.roomNo);
if(dComIfGs_isSwitch(switchIdxToCheck2, fopAcM_GetRoomNo(i_this)) == false) {
dComIfGs_offSwitch(i_this->mSwitchToSet, fopAcM_GetRoomNo(i_this));
i_this->mAction = ACT_ON_ALL;
break;
}
switchIdxToCheck += 1;
switchIdxToCheck2 += 1;
}
break;
@@ -147,7 +161,7 @@ static void* ac[7];
static s32 check_count;
static void* bk_s_sub1(void* i_this, void*) {
if(fopAcM_IsActor(i_this) && fopAcM_GetName(i_this) == 0xBE && (fopAcM_GetParam(i_this) & 0xF) == 7) {
if(fopAcM_IsActor(i_this) && fopAcM_GetName(i_this) == PROC_BK && (fopAcM_GetParam(i_this) & 0xF) == 7) {
s32 count = check_count; //regswaps without this
if(count < 2) {
ac[check_count] = i_this;
@@ -161,7 +175,7 @@ static void* bk_s_sub1(void* i_this, void*) {
}
static void* bk_s_sub2(void* i_this, void*) {
if(fopAcM_IsActor(i_this) && fopAcM_GetName(i_this) == 0xBE && (fopAcM_GetParam(i_this) & 0xF) == 4) {
if(fopAcM_IsActor(i_this) && fopAcM_GetName(i_this) == PROC_BK && (fopAcM_GetParam(i_this) & 0xF) == 4) {
s32 count = check_count; //regswaps without this
if(count == 2) {
ac[check_count] = i_this;
@@ -175,7 +189,7 @@ static void* bk_s_sub2(void* i_this, void*) {
}
static void* bk_s_sub3(void* i_this, void*) {
if(fopAcM_IsActor(i_this) && fopAcM_GetName(i_this) == 0xBE && (fopAcM_GetParam(i_this) & 0xF) == 5) {
if(fopAcM_IsActor(i_this) && fopAcM_GetName(i_this) == PROC_BK && (fopAcM_GetParam(i_this) & 0xF) == 5) {
s32 count = check_count; //regswaps without this
if(count < 5) {
ac[check_count] = i_this;
@@ -189,7 +203,7 @@ static void* bk_s_sub3(void* i_this, void*) {
}
static void* bb_s_sub(void* i_this, void*) {
if(fopAcM_IsActor(i_this) && fopAcM_GetName(i_this) == 0xB6) {
if(fopAcM_IsActor(i_this) && fopAcM_GetName(i_this) == PROC_BB) {
s32 count = check_count; //regswaps without this
if(count < 7) {
ac[check_count] = i_this;
@@ -224,7 +238,7 @@ static s32 hajimari_actor_entry(andsw0_class* i_this) {
}
static void hajimarinomori_check(andsw0_class* i_this) {
/* Nonmatching */
fopAc_ac_c* actor = i_this;
if (i_this->mBehaviorType == 0) {
if (hajimari_actor_entry(i_this)) {
i_this->mBehaviorType = 1;
@@ -233,52 +247,62 @@ static void hajimarinomori_check(andsw0_class* i_this) {
else {
for(int i = 0; i < 7; i++) {}
//looks like these have something to do with bk_class and bb_class (based on the 0xB6/0xBE proc names earlier)
//finishing this probably needs some work on those
if (dComIfGs_isEventBit(4)) {
fopAcM_delete((fopAc_ac_c*)ac[5]);
fopAcM_delete((fopAc_ac_c*)ac[6]);
//ac[3]->field_0x121C = 1;
//ac[4]->field_0x121C = 1;
bb_class* kargaroc = (bb_class*)ac[5];
fopAcM_delete(kargaroc);
kargaroc = (bb_class*)ac[6];
fopAcM_delete(kargaroc);
bk_class* bokoblin = (bk_class*)ac[3];
bokoblin->field_0x121C = 1;
bokoblin = (bk_class*)ac[4];
bokoblin->field_0x121C = 1;
if (dComIfGs_isEventBit(0x301)) {
//ac[0]->field_0x121C = 1;
bokoblin = (bk_class*)ac[0];
bokoblin->field_0x121C = 1;
}
if (dComIfGs_isEventBit(0x480)) {
//ac[1]->field_0x121C = 1;
bokoblin = (bk_class*)ac[1];
bokoblin->field_0x121C = 1;
}
if (dComIfGs_isEventBit(0x301) && dComIfGs_isEventBit(0x480)) {
//ac[2]->field_0x121C = 1;
bokoblin = (bk_class*)ac[2];
bokoblin->field_0x121C = 1;
}
}
else {
//ac[0]->field_0x121C = 1;
//ac[1]->field_0x121C = 1;
bk_class* bokoblin = (bk_class*)ac[0];
bokoblin->field_0x121C = 1;
bokoblin = (bk_class*)ac[1];
bokoblin->field_0x121C = 1;
}
fopAcM_delete(actor);
}
fopAcM_delete(i_this);
}
static void event_start_check(andsw0_class* i_this) {
/* Nonmatching */
fopAc_ac_c* actor = i_this;
switch (i_this->mEventState) {
case 0:
if (i_this->mEventIdx != -1 && fopAcM_isSwitch(i_this, i_this->mSwitchToSet)) {
if (i_this->mEvtInfo.i_checkCommandDemoAccrpt()) {
if (i_this->mEventIdx != -1 && fopAcM_isSwitch(actor, i_this->mSwitchToSet)) {
if (actor->mEvtInfo.checkCommandDemoAccrpt()) {
i_this->mEventState++;
} else {
fopAcM_orderOtherEventId(i_this, i_this->mEventIdx, i_this->mEventNo, 0xFFFF, 0, 1);
fopAcM_orderOtherEventId(actor, i_this->mEventIdx, i_this->mEventNo, 0xFFFF, 0, 1);
}
}
break;
case 1:
if (dComIfGp_evmng_endCheck(i_this->mEventIdx)) {
dComIfGp_event_onEventFlag(8);
dComIfGp_event_reset();
i_this->mEventState++;
}
break;
case 2:
break;
}
}
+1 -1
View File
@@ -170,7 +170,7 @@ static s32 daAndsw2_actionEvent(daAndsw2_c* i_this) {
} else {
i_this->mAction = ACT_WAIT;
}
dComIfGp_event_onEventFlag(8);
dComIfGp_event_reset();
}
return 1;
}
+245 -189
View File
@@ -3,47 +3,128 @@
// Translation Unit: d_a_arrow.cpp
//
#include "d_a_arrow.h"
#include "d/actor/d_a_arrow.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "m_Do/m_Do_mtx.h"
#include "d/d_com_inf_game.h"
#include "d/d_procname.h"
#include "d/d_npc.h"
#include "d/actor/d_a_player.h"
#include "d/d_jnt_hit.h"
#include "dolphin/types.h"
const char daArrow_c::m_arc_name[] = "Link";
/* 800D455C-800D457C .text createHeap_CB__FP10fopAc_ac_c */
void createHeap_CB(fopAc_ac_c*) {
/* Nonmatching */
static BOOL createHeap_CB(fopAc_ac_c* i_this) {
return ((daArrow_c*)i_this)->_createHeap();
}
/* 800D457C-800D4648 .text _createHeap__9daArrow_cFv */
void daArrow_c::_createHeap() {
/* Nonmatching */
BOOL daArrow_c::_createHeap() {
// arrowglitter.bdl for Light Arrows, arrow.bdl otherwise.
s32 modelFileIndex = (mArrowType == LIGHT_ARROWS ? 0x38 : 0x37) & 0xFFFF;
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(m_arc_name, modelFileIndex);
JUT_ASSERT(190, modelData != 0);
mpModel = mDoExt_J3DModel__create(modelData, 0x00080000, 0x11000022);
if (!mpModel) {
return FALSE;
}
return TRUE;
}
/* 800D4648-800D4668 .text atHit_CB__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */
void atHit_CB(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*) {
/* Nonmatching */
void atHit_CB(fopAc_ac_c* i_this, dCcD_GObjInf* thisObjInf, fopAc_ac_c* hitActor, dCcD_GObjInf* hitObjInf) {
((daArrow_c*)i_this)->_atHit(thisObjInf, hitActor, hitObjInf);
}
/* 800D4668-800D47C0 .text _atHit__9daArrow_cFP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */
void daArrow_c::_atHit(dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*) {
/* Nonmatching */
void daArrow_c::_atHit(dCcD_GObjInf* thisObjInf, fopAc_ac_c* hitActor, dCcD_GObjInf* hitObjInf) {
// Keep track of which actor this arrow hit as well as the position the hit occurred at.
if (!hitActor) {
return;
}
if (!fopAc_IsActor(hitActor)) {
return;
}
if (!fopAcM_GetJntHit(hitActor)) {
return;
}
cXyz hitPos(*thisObjInf->GetAtHitPosP());
f32 hitDist = (hitPos - current.pos).abs();
if (hitDist < mNearestHitDist) {
mNearestHitDist = hitDist;
mHitActorProcID = fpcM_GetID(hitActor);
if (hitObjInf->ChkTgShield()) {
mbHitActor = false;
field_0x6ec = NULL;
} else {
mbHitActor = true;
field_0x6ec = hitActor;
}
mNearestHitPos = *thisObjInf->GetAtHitPosP();
}
}
/* 800D47C0-800D4814 .text checkCreater__9daArrow_cFv */
void daArrow_c::checkCreater() {
/* Nonmatching */
// Check if this arrow was fired by Princess Zelda (during the Ganondorf fight).
fopAc_ac_c* archer;
if (fopAcM_SearchByID(mParentPcId, &archer)) {
if (fpcM_GetName(archer) == PROC_PZ) {
mbShotByZelda = true;
}
}
}
/* 800D4814-800D48E8 .text setLightEffect__9daArrow_cFv */
void daArrow_c::setLightEffect() {
/* Nonmatching */
if (field_0x682 == mArrowType) {
if (mArrowType == NORMAL_ARROWS) {
return;
}
if (!field_0x688) {
field_0x684 = fopAcM_createChild(
PROC_ARROW_LIGHTEFF, fpcM_GetID(this),
mArrowType, &field_0x6a8,
current.roomNo, &shape_angle, NULL, -1, NULL
);
if (field_0x684 != -1) {
field_0x688 = true;
}
}
} else {
fopAcM_delete(fopAcM_SearchByID(field_0x684));
field_0x688 = false;
}
field_0x682 = mArrowType;
}
/* 800D48E8-800D4994 .text setBlur__9daArrow_cFv */
void daArrow_c::setBlur() {
/* Nonmatching */
JPABaseEmitter* emitter = mPtclFollowCb.getEmitter();
if (!emitter) {
return;
}
s32 alpha = emitter->getGlobalAlpha();
if (alpha - 50 <= 0) {
mPtclFollowCb.end();
} else {
emitter->setGlobalAlpha(alpha - 50);
}
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(field_0x67c);
emitter->setGlobalRTMatrix(mDoMtx_stack_c::get());
}
/* 800D4994-800D4A04 .text createBlur__9daArrow_cFv */
void daArrow_c::createBlur() {
/* Nonmatching */
if (!mPtclFollowCb.getEmitter()) {
dComIfGp_particle_setToon(0x48, &current.pos, NULL, NULL, 0xFF, &mPtclFollowCb, -1, NULL, NULL, NULL);
}
}
/* 800D4A04-800D4ADC .text setArrowShootSe__9daArrow_cFv */
@@ -63,7 +144,15 @@ void daArrow_c::arrowShooting() {
/* 800D4D98-800D4DC0 .text arrowUseMp__9daArrow_cFv */
void daArrow_c::arrowUseMp() {
/* Nonmatching */
static const s16 use_mp[4] = {
-0, // Normal Arrows
-1, // Fire Arrows
-1, // Ice Arrows
-2, // Light Arrows
};
s32 magic = dComIfGp_getItemMagicCount();
dComIfGp_setItemMagicCount(magic + use_mp[mArrowType]);
}
/* 800D4DC0-800D50A0 .text ShieldReflect__9daArrow_cFv */
@@ -77,8 +166,9 @@ void daArrow_c::check_water_in() {
}
/* 800D5388-800D53AC .text changeArrowMp__9daArrow_cFv */
void daArrow_c::changeArrowMp() {
/* Nonmatching */
BOOL daArrow_c::changeArrowMp() {
u8 magic = dComIfGs_getMagic();
return magic >= 1;
}
/* 800D53AC-800D553C .text changeArrowType__9daArrow_cFv */
@@ -93,17 +183,101 @@ void daArrow_c::changeArrowTypeNotReady() {
/* 800D560C-800D56B0 .text setRoomInfo__9daArrow_cFv */
void daArrow_c::setRoomInfo() {
/* Nonmatching */
u32 roomNo;
mGndChk.SetPos(&current.pos);
f32 groundY = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (groundY != -1000000000.0f) {
roomNo = dComIfG_Bgsp()->GetRoomId(mGndChk);
mTevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mGndChk);
} else {
roomNo = dComIfGp_roomControl_getStayNo();
}
mTevStr.mRoomNo = roomNo;
mStts.SetRoomId(roomNo);
current.roomNo = roomNo;
}
/* 800D56B0-800D5854 .text setKeepMatrix__9daArrow_cFv */
void daArrow_c::setKeepMatrix() {
/* Nonmatching */
// Transform the arrow onto its archer's hand.
if (mbShotByZelda) {
fopNpc_npc_c* zelda;
fopAcM_SearchByID(mParentPcId, (fopAc_ac_c**)&zelda);
mDoMtx_stack_c::transS(0.7f, -0.07f, -0.2f);
mDoMtx_stack_c::XYZrotM(0x238E, 0x2CDF, 0x29BE);
// Copy the matrix of Zelda's hand_R1 joint to the arrow model.
// TODO: After daPz_c is implemented, this should use her daPz_c::getRightHandMatrix() inline method.
MtxP handMtx = zelda->mpMcaMorf->getModel()->mpNodeMtx[0x13];
cMtx_concat(handMtx, mDoMtx_stack_c::get(), mDoMtx_stack_c::get());
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
MtxP mtx = mDoMtx_stack_c::get();
current.pos.set(mtx[0][3], mtx[1][3], mtx[2][3]);
mDoMtx_MtxToRot(mDoMtx_stack_c::get(), &shape_angle);
current.angle.y = shape_angle.y;
current.angle.x = -shape_angle.x;
} else {
daPy_py_c* player = daPy_getPlayerActorClass();
mDoMtx_stack_c::transS(0.7f, -0.07f, -0.2f);
// TODO: How did they pass an unsigned short (0xB0B6) to a function that takes a signed short?
mDoMtx_stack_c::XYZrotM(0xB0B6, 0x238E, -0x6333);
MtxP handMtx = player->getLeftHandMatrix();
cMtx_concat(handMtx, mDoMtx_stack_c::get(), mDoMtx_stack_c::get());
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
MtxP mtx = mDoMtx_stack_c::get();
current.pos.set(mtx[0][3], mtx[1][3], mtx[2][3]);
mDoMtx_MtxToRot(mDoMtx_stack_c::get(), &shape_angle);
current.angle.y = shape_angle.y;
current.angle.x = -shape_angle.x;
}
}
/* 800D5854-800D5A70 .text setStopActorMatrix__9daArrow_cFv */
void daArrow_c::setStopActorMatrix() {
/* Nonmatching */
s16 xRot = 0;
if (cLib_calcTimer(&field_0x604) != 0) {
f32 temp = (field_0x604 / 40.0f);
xRot = 1024.0f * temp*temp * cM_ssin(field_0x604 * 0x52FB);
}
fopAc_ac_c* hitActor = fopAcM_SearchByID(mHitActorProcID);
if (!hitActor) {
return;
}
JntHit_c* jntHit = fopAcM_GetJntHit(hitActor);
if (!jntHit) {
return;
}
J3DModel* hitModel = jntHit->getModel();
static cXyz offset_arrow_pos(0.0f, 0.0f, -50.0f);
mDoMtx_stack_c::copy(hitModel->mpNodeMtx[mHitJointIndex]);
csXyz hitJointRot;
mDoMtx_MtxToRot(mDoMtx_stack_c::get(), &hitJointRot);
mDoMtx_stack_c::transM(field_0x618);
mDoMtx_stack_c::ZXYrotM(field_0x6e6);
cXyz pos(0.0f, 0.0f, 0.0f);
mDoMtx_stack_c::multVecZero(&pos);
current.pos = pos;
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(hitJointRot);
mDoMtx_stack_c::ZXYrotM(field_0x6e6);
mDoMtx_stack_c::XrotM(xRot);
mDoMtx_stack_c::transM(offset_arrow_pos);
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
/* 800D5A70-800D5B20 .text procWait__9daArrow_cFv */
@@ -138,12 +312,23 @@ void daArrow_c::procWater() {
/* 800D72BC-800D72EC .text checkRestMp__9daArrow_cFv */
void daArrow_c::checkRestMp() {
/* Nonmatching */
static const s16 use_mp[4] = {
0, // Normal Arrows
1, // Fire Arrows
1, // Ice Arrows
2, // Light Arrows
};
u8 currMagic = dComIfGs_getMagic();
if (currMagic < use_mp[m_keep_type]) {
m_keep_type = 0;
}
}
/* 800D72EC-800D7320 .text setTypeByPlayer__9daArrow_cFv */
void daArrow_c::setTypeByPlayer() {
/* Nonmatching */
checkRestMp();
mArrowType = m_keep_type;
}
/* 800D7320-800D74FC .text createInit__9daArrow_cFv */
@@ -152,207 +337,78 @@ void daArrow_c::createInit() {
}
/* 800D74FC-800D7820 .text _execute__9daArrow_cFv */
void daArrow_c::_execute() {
BOOL daArrow_c::_execute() {
/* Nonmatching */
}
/* 800D7820-800D7960 .text _draw__9daArrow_cFv */
void daArrow_c::_draw() {
BOOL daArrow_c::_draw() {
/* Nonmatching */
}
/* 800D7960-800D7A38 .text _create__9daArrow_cFv */
void daArrow_c::_create() {
s32 daArrow_c::_create() {
/* Nonmatching */
}
/* 800D7A38-800D7DB4 .text __ct__9daArrow_cFv */
daArrow_c::daArrow_c() {
/* Nonmatching */
}
/* 800D7DB4-800D7E80 .text __dt__8dCcD_SphFv */
dCcD_Sph::~dCcD_Sph() {
/* Nonmatching */
}
/* 800D7E80-800D7F0C .text __dt__12cCcD_SphAttrFv */
cCcD_SphAttr::~cCcD_SphAttr() {
/* Nonmatching */
}
/* 800D7F0C-800D7F54 .text __dt__8cM3dGSphFv */
cM3dGSph::~cM3dGSph() {
/* Nonmatching */
}
/* 800D7F54-800D8034 .text __dt__8dCcD_CpsFv */
dCcD_Cps::~dCcD_Cps() {
/* Nonmatching */
}
/* 800D8034-800D807C .text __dt__9cCcD_SttsFv */
cCcD_Stts::~cCcD_Stts() {
/* Nonmatching */
}
/* 800D807C-800D81D0 .text __dt__16dBgS_ArrowLinChkFv */
dBgS_ArrowLinChk::~dBgS_ArrowLinChk() {
/* Nonmatching */
}
daArrow_c::daArrow_c() : mPtclFollowCb(0, 0) {}
/* 800D81D0-800D8200 .text _delete__9daArrow_cFv */
void daArrow_c::_delete() {
/* Nonmatching */
BOOL daArrow_c::_delete() {
mPtclFollowCb.end();
return TRUE;
}
/* 800D8200-800D8220 .text daArrowCreate__FPv */
void daArrowCreate(void*) {
s32 daArrowCreate(void* i_this) {
/* Nonmatching */
return ((daArrow_c*)i_this)->_create();
}
/* 800D8220-800D8240 .text daArrowDelete__FPv */
void daArrowDelete(void*) {
BOOL daArrowDelete(void* i_this) {
/* Nonmatching */
return ((daArrow_c*)i_this)->_delete();
}
/* 800D8240-800D8260 .text daArrowExecute__FPv */
void daArrowExecute(void*) {
BOOL daArrowExecute(void* i_this) {
/* Nonmatching */
return ((daArrow_c*)i_this)->_execute();
}
/* 800D8260-800D8280 .text daArrowDraw__FPv */
void daArrowDraw(void*) {
/* Nonmatching */
BOOL daArrowDraw(void* i_this) {
return ((daArrow_c*)i_this)->_draw();
}
/* 800D8280-800D8288 .text daArrowIsDelete__FPv */
void daArrowIsDelete(void*) {
/* Nonmatching */
BOOL daArrowIsDelete(void* i_this) {
return TRUE;
}
/* 800D8288-800D8298 .text GetShapeAttr__8dCcD_SphFv */
void dCcD_Sph::GetShapeAttr() {
/* Nonmatching */
}
/* 800D8298-800D82A0 .text GetCoCP__12cCcD_SphAttrCFv */
void cCcD_SphAttr::GetCoCP() const {
/* Nonmatching */
}
/* 800D82A0-800D82A8 .text CrossAtTg__12cCcD_SphAttrCFRC12cCcD_AabAttrP4cXyz */
void cCcD_SphAttr::CrossAtTg(const cCcD_AabAttr&, cXyz*) const {
/* Nonmatching */
}
/* 800D82A8-800D82B0 .text CrossAtTg__12cCcD_SphAttrCFRC12cCcD_PntAttrP4cXyz */
void cCcD_SphAttr::CrossAtTg(const cCcD_PntAttr&, cXyz*) const {
/* Nonmatching */
}
/* 800D82B0-800D82E8 .text CrossAtTg__12cCcD_SphAttrCFRC14cCcD_ShapeAttrP4cXyz */
void cCcD_SphAttr::CrossAtTg(const cCcD_ShapeAttr&, cXyz*) const {
/* Nonmatching */
}
/* 800D82E8-800D82F0 .text CrossCo__12cCcD_SphAttrCFRC12cCcD_AabAttrPf */
void cCcD_SphAttr::CrossCo(const cCcD_AabAttr&, float*) const {
/* Nonmatching */
}
/* 800D82F0-800D82F8 .text CrossCo__12cCcD_SphAttrCFRC12cCcD_TriAttrPf */
void cCcD_SphAttr::CrossCo(const cCcD_TriAttr&, float*) const {
/* Nonmatching */
}
/* 800D82F8-800D8300 .text CrossCo__12cCcD_SphAttrCFRC12cCcD_PntAttrPf */
void cCcD_SphAttr::CrossCo(const cCcD_PntAttr&, float*) const {
/* Nonmatching */
}
/* 800D8300-800D8338 .text CrossCo__12cCcD_SphAttrCFRC14cCcD_ShapeAttrPf */
void cCcD_SphAttr::CrossCo(const cCcD_ShapeAttr&, float*) const {
/* Nonmatching */
}
/* 800D8338-800D8348 .text GetShapeAttr__8dCcD_CpsFv */
void dCcD_Cps::GetShapeAttr() {
/* Nonmatching */
}
/* 800D8348-800D8350 .text CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_AabAttrP4cXyz */
void cCcD_CpsAttr::CrossAtTg(const cCcD_AabAttr&, cXyz*) const {
/* Nonmatching */
}
/* 800D8350-800D8358 .text CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_PntAttrP4cXyz */
void cCcD_CpsAttr::CrossAtTg(const cCcD_PntAttr&, cXyz*) const {
/* Nonmatching */
}
/* 800D8358-800D8390 .text CrossAtTg__12cCcD_CpsAttrCFRC14cCcD_ShapeAttrP4cXyz */
void cCcD_CpsAttr::CrossAtTg(const cCcD_ShapeAttr&, cXyz*) const {
/* Nonmatching */
}
/* 800D8390-800D8398 .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_AabAttrPf */
void cCcD_CpsAttr::CrossCo(const cCcD_AabAttr&, float*) const {
/* Nonmatching */
}
/* 800D8398-800D83A0 .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_TriAttrPf */
void cCcD_CpsAttr::CrossCo(const cCcD_TriAttr&, float*) const {
/* Nonmatching */
}
/* 800D83A0-800D83A8 .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_PntAttrPf */
void cCcD_CpsAttr::CrossCo(const cCcD_PntAttr&, float*) const {
/* Nonmatching */
}
/* 800D83A8-800D83E0 .text CrossCo__12cCcD_CpsAttrCFRC14cCcD_ShapeAttrPf */
void cCcD_CpsAttr::CrossCo(const cCcD_ShapeAttr&, float*) const {
/* Nonmatching */
}
/* 800D83E0-800D83FC .text cLib_calcTimer<s>__FPs */
void cLib_calcTimer<short>(short*) {
/* Nonmatching */
}
/* 800D83FC-800D8404 .text @20@__dt__16dBgS_ArrowLinChkFv */
void @20@__dt__16dBgS_ArrowLinChkFv {
/* Nonmatching */
}
/* 800D8404-800D840C .text @100@__dt__16dBgS_ArrowLinChkFv */
void @100@__dt__16dBgS_ArrowLinChkFv {
/* Nonmatching */
}
/* 800D840C-800D8414 .text @88@__dt__16dBgS_ArrowLinChkFv */
void @88@__dt__16dBgS_ArrowLinChkFv {
/* Nonmatching */
}
/* 800D8414-800D841C .text @280@__dt__8dCcD_CpsFv */
void @280@__dt__8dCcD_CpsFv {
/* Nonmatching */
}
/* 800D841C-800D8424 .text @248@__dt__8dCcD_CpsFv */
void @248@__dt__8dCcD_CpsFv {
/* Nonmatching */
}
/* 800D8424-800D842C .text @280@__dt__8dCcD_SphFv */
void @280@__dt__8dCcD_SphFv {
/* Nonmatching */
}
/* 800D842C-800D8434 .text @248@__dt__8dCcD_SphFv */
void @248@__dt__8dCcD_SphFv {
/* Nonmatching */
}
actor_method_class daArrowMethodTable = {
(process_method_func)daArrowCreate,
(process_method_func)daArrowDelete,
(process_method_func)daArrowExecute,
(process_method_func)daArrowIsDelete,
(process_method_func)daArrowDraw,
};
extern actor_process_profile_definition g_profile_ARROW = {
/* LayerID */ fpcLy_CURRENT_e,
/* ListID */ 9,
/* ListPrio */ fpcLy_CURRENT_e,
/* ProcName */ PROC_ARROW,
/* Proc SubMtd */ &g_fpcLf_Method.mBase,
/* Size */ sizeof(daArrow_c),
/* SizeOther */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Priority */ 0x01BF,
/* Actor SubMtd */ &daArrowMethodTable,
/* Status */ 0x00044000,
/* Group */ fopAc_ACTOR_e,
/* CullType */ fopAc_CULLBOX_CUSTOM_e,
};
+1 -1
View File
@@ -241,7 +241,7 @@ s32 daBranch_Create(fopAc_ac_c* i_this) {
J3DMaterial* mat = modelData->getMaterialNodePointer(j);
if (mat) {
J3DFog* fog = mat->getPEBlock()->getFog();
fog->field_0x0 = 2;
fog->mType = 2;
}
}
}
+2 -2
View File
@@ -65,7 +65,7 @@ s32 daKaji_c::_create() {
if (fopAcM_entrySolidHeap(this, (heapCallbackFunc)&CheckCreateHeap, 0x660)) {
mDoMtx_stack_c::transS(getPosition());
mDoMtx_stack_c::YrotM(shape_angle.y);
mDoMtx_stack_c::scaleM(mScale.x, mScale.y, mScale.z);
mDoMtx_stack_c::scaleM(mScale);
MTXCopy(mDoMtx_stack_c::get(), mMtx);
l_p_ship = (daObjPirateship::Act_c*)fopAcM_SearchByID(mParentPcId);
@@ -102,7 +102,7 @@ BOOL daKaji_c::_execute() {
mpMorf->getModel()->setBaseScale(mScale);
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
mDoMtx_stack_c::ZXYrotM(shape_angle);
mpMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get());
MTXCopy(mDoMtx_stack_c::get(), mMtx);
+3 -8
View File
@@ -202,9 +202,9 @@ void daNh_c::setBaseMtx() {
glowOffset.y = l_HIO.prm.mGlowOffsetY;
cXyz glowPos;
cMtx_multVec(mDoMtx_stack_c::get(), &glowOffset, &glowPos);
PSMTXTrans(mDoMtx_stack_c::get(), glowPos.x, glowPos.y, glowPos.z);
mDoMtx_stack_c::transS(glowPos);
mDoMtx_stack_c::scaleM(l_HIO.prm.mGlowScale, l_HIO.prm.mGlowScale, l_HIO.prm.mGlowScale);
MTXCopy(mDoMtx_stack_c::get(), mGlowMtx);
cMtx_copy(mDoMtx_stack_c::get(), mGlowMtx);
}
/* 800F9980-800F9A54 .text createHeap__6daNh_cFv */
@@ -229,12 +229,7 @@ static BOOL checkCreateHeap(fopAc_ac_c* i_this) {
/* 800F9A74-800F9C8C .text create__6daNh_cFv */
s32 daNh_c::create() {
static u32 a_heap_size_tbl;
static s8 init;
if (!init) {
a_heap_size_tbl = 0x4000;
init = 1;
}
static u32 a_heap_size_tbl = 0x4000;
s32 phase_state = cPhs_COMPLEATE_e;
+2 -2
View File
@@ -467,8 +467,8 @@ namespace daObjMovebox {
}
daObj::quat_rotBaseY(&temp2, temp3);
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
mDoMtx_stack_c::quatM(&temp2);
mDoMtx_stack_c::ZXYrotM(shape_angle);
if (isFloating) {
mDoMtx_stack_c::transM(0.0f, -mUnknown624, 0.0f);
}
+1 -1
View File
@@ -291,7 +291,7 @@ namespace daObjPaper {
/* 000008DC-00000948 .text set_mtx__Q210daObjPaper5Act_cFv */
void daObjPaper::Act_c::set_mtx() {
mDoMtx_stack_c::transS(getPosition());
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
mDoMtx_stack_c::ZXYrotM(shape_angle);
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
+3 -3
View File
@@ -41,10 +41,10 @@ s32 daSceneChgCreate(void* i_this) {
fopAcM_SetupActor(scnChg, d_a_scene_change_c);
MTXTrans(mDoMtx_stack_c::now, scnChg->current.pos.x, scnChg->current.pos.y, scnChg->current.pos.z);
mDoMtx_ZXYrotM(mDoMtx_stack_c::now, scnChg->shape_angle.x, scnChg->shape_angle.y, scnChg->shape_angle.z);
mDoMtx_stack_c::transS(scnChg->current.pos);
mDoMtx_stack_c::ZXYrotM(scnChg->shape_angle);
MTXCopy(mDoMtx_stack_c::now, scnChg->mTransformMtx);
cMtx_copy(mDoMtx_stack_c::get(), scnChg->mTransformMtx);
return cPhs_COMPLEATE_e;
}
+4 -4
View File
@@ -41,10 +41,10 @@ int daSpotbox_c::draw() {
}
int daSpotbox_c::execute() {
PSMTXTrans(mDoMtx_stack_c::now, this->current.pos.x, this->current.pos.y, this->current.pos.z);
mDoMtx_YrotM(mDoMtx_stack_c::now, this->current.angle.y);
mDoMtx_stack_c::scaleM(this->mScale.x, this->mScale.y, this->mScale.z);
PSMTXCopy(mDoMtx_stack_c::now, this->mtx);
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::YrotM(current.angle.y);
mDoMtx_stack_c::scaleM(mScale);
cMtx_copy(mDoMtx_stack_c::get(), mtx);
return TRUE;
}