d_a_ship 95% (#706)

* Initial Progress

Basic functions at 100% matching

100% Matching:
- `daShip_Draw`
- `daShip_Execute`
- `daShip_IsDelete`
- `daShip_Delete`
- `daShip_createHeap`
- `daShip_Create`

* implemented `getJointPos` inlines in `daTornado_c` needed for d_a_ship

* implemented `Center()` inline in `dCamera_c` needed for d_a_ship

* added `setTranslationX` inline to `J3DTexMtx` needed for match in d_a_ship

* parameters set to `const` for certain inlines in `m_Do_mtx.h`

* added `dComIfGp_onMenuCollect` inline

* changed `shipSpecialDemoStart` return type to `BOOL`

* added member functions to `dPa_waveEcallBack`, `dPa_splashEcallBack `, `dPa_trackEcallBack`

also modified member type of `mRotMtx` of `dPa_waveEcallBack`  and `mPos` of `dPa_trackEcallBack`

* added member to `daGrid_c` that is used in d_a_ship

* added `mDoAud_setShipSailState` and `mDoAud_shipCruiseSePlay` inline functions

* added `fopAcM_seenPlayerAngleY` inline

* d_a_ship mostly matching

approx. 90% matching, mostly regalloc issues. , `checkNextMode`, `setRopePos`, `setHeadAnm`, and `execute` need to have their logic fixer

* replace `unknown_inline_TODO ` from `daShip_c` with `checkForceMove`

* .data match

* .rodata matching

* more inline return type changes from `bool` to `BOOL`

Also changed the array size of `mPlayerStatus`

* implemented `force_calc_wind_rel_angle` inline in `daGrid_c`

* fix `d_a_ship_static`

* fixed `getEmitterAxis`, might need review but works for now

* more progress

* reverted change to `getEmitterAxis`, moved casts to function call in `dPa_waveEcallBack::executeAfter`

* more progress

* change return types of certain inlines from `BOOL` to `u32`

`dComIfGp_checkCameraAttentionStatus`, `dComIfGp_checkPlayerStatus0`, `dComIfGp_checkPlayerStatus1` needed for match in d_a_ship

* fixed memory addresses in `daGrid_c`

* more progress

* resolving symbols

* Initial PR changes

* Removed unnecessary cast

* replaced instances of `PSVECSquareMag` with corresponding inline functions

* update memory layout in `d_a_grid` for consistency

* More PR changes

`checkNextMode` and `procZevDemo` now at 100% matching
This commit is contained in:
mattias-blum
2025-03-28 14:17:21 -04:00
committed by GitHub
parent 4a2d7dd320
commit d945c14cac
17 changed files with 4706 additions and 297 deletions
@@ -68,6 +68,7 @@ public:
void setEffectMtx(Mtx effectMtx) { mTexMtxInfo.setEffectMtx(effectMtx); }
Mtx& getViewMtx() { return mViewMtx; }
void setViewMtx(const Mtx viewMtx) { MTXCopy(viewMtx, mViewMtx); }
void setTranslationX(f32 translationX){ mTexMtxInfo.mSRT.mTranslationX = translationX; } // Fakematch
// TODO
void getTextureSRT() {}
+6 -2
View File
@@ -14,7 +14,7 @@ public:
class daGrid_c : public fopAc_ac_c {
public:
void force_calc_wind_rel_angle(short) {}
void force_calc_wind_rel_angle(short param_1) { m2216 = param_1; m2218 = 1; }
cPhs_State _create();
bool _delete();
@@ -22,7 +22,11 @@ public:
bool _draw();
public:
/* Place member variables here */
/* 0x0290 */ u8 m0290[0x2216 - 0x290];
/* 0x2216 */ s16 m2216;
/* 0x2218 */ u8 m2218;
/* 0x2219 */ u8 m2219[0x2220 - 0x2219];
/* 0x2220 */ f32 m2220;
};
class daHo_HIO_c {
+3 -3
View File
@@ -464,10 +464,10 @@ public:
return dComIfGs_getSelectEquip(0) == dItem_SWORD_e ||
dComIfGp_getMiniGameType() == 2;
}
bool checkMasterSwordEquip() const {
BOOL checkMasterSwordEquip() const {
return dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_1_e ||
dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_2_e ||
dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_3_e;
dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_2_e ||
dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_3_e;
}
void setFace(daPy_FACE face) { mFace = face; }
+2 -2
View File
@@ -1432,7 +1432,7 @@ public:
BOOL procBtVerticalJumpCut();
BOOL procBtVerticalJumpLand_init();
BOOL procBtVerticalJumpLand();
void shipSpecialDemoStart();
BOOL shipSpecialDemoStart();
BOOL checkJumpRideShip();
BOOL checkShipNotNormalMode();
void setShipRideArmAngle(int, J3DTransformInfo*);
@@ -1726,7 +1726,7 @@ public:
mCurProc == daPyProc_GRAB_UP_e ||
mCurProc == daPyProc_GRAB_THROW_e;
}
bool checkNoControll() const { return dComIfGp_getPlayer(0) != this; }
BOOL checkNoControll() const { return dComIfGp_getPlayer(0) != this; }
void clearDamageWait() {}
void exchangeGrabActor(fopAc_ac_c* actor) { mActorKeepGrab.setData(actor); }
void getDekuLeafWindPos() const {}
+227 -104
View File
@@ -8,27 +8,69 @@
#include "SSystem/SComponent/c_phase.h"
#include "f_op/f_op_msg.h"
class camera_class;
class daGrid_c;
class daTornado_c;
class daPy_FLG1;
class daBomb_c;
class daShip_c : public fopAc_ac_c {
public:
enum daSHIP_SFLG {
daSFLG_UNK1_e = 0x00000001,
daSFLG_UNK2_e = 0x00000002,
daSFLG_UNK4_e = 0x00000004,
daSFLG_UNK8_e = 0x00000008,
daSFLG_UNK10_e = 0x00000010,
daSFLG_UNK20_e = 0x00000020,
daSFLG_UNK40_e = 0x00000040,
daSFLG_UNK80_e = 0x00000080,
daSFLG_UNK100_e = 0x00000100,
daSFLG_UNK200_e = 0x00000200,
daSFLG_UNK400_e = 0x00000400,
daSFLG_UNK800_e = 0x00000800,
daSFLG_UNK1000_e = 0x00001000,
daSFLG_UNK2000_e = 0x00002000,
daSFLG_UNK4000_e = 0x00004000,
daSFLG_UNK8000_e = 0x00008000,
daSFLG_UNK10000_e = 0x00010000,
daSFLG_UNK20000_e = 0x00020000,
daSFLG_UNK40000_e = 0x00040000,
daSFLG_UNK80000_e = 0x00080000,
daSFLG_UNK100000_e = 0x00100000,
daSFLG_HEAD_NO_DRAW_e = 0x00200000,
daSFLG_UNK400000_e = 0x00400000,
daSFLG_UNK800000_e = 0x00800000,
daSFLG_UNK1000000_e = 0x01000000,
daSFLG_UNK2000000_e = 0x02000000,
daSFLG_UNK4000000_e = 0x04000000,
daSFLG_UNK8000000_e = 0x08000000,
daSFLG_UNK10000000_e = 0x10000000,
daSFLG_UNK20000000_e = 0x20000000,
daSFLG_UNK40000000_e = 0x40000000,
daSFLG_UNK80000000_e = 0x80000000
};
enum daShip_c__ShipMode {
Idle = 0,
Sailing = 1,
UsingCannon = 2,
UsingSalvageArm = 3,
};
typedef BOOL (daShip_c::*ProcFunc)();
bool checkStateFlg(daSHIP_SFLG flag) const { return m0358 & flag; }
bool checkStateFlg(daSHIP_SFLG flag) const { return mStateFlag & flag; }
bool checkHeadNoDraw() const { return checkStateFlg(daSFLG_HEAD_NO_DRAW_e); }
int getTactWarpPosNum() const { return mTactWarpPosNum; }
void setTactWarpPosNum(int num) { mTactWarpPosNum = num; }
u32 getTactWarpID() { return mTactWarpID; }
void setTactWarpID(u32 warpID) { mTactWarpID = warpID; }
bool unknown_inline_TODO() const { return mTornadoActor || m0424; }
void checkCraneMode() const {}
void checkCraneUpEnd() const {}
void checkForceMove() {}
BOOL checkForceMove() const { return getTornadoActor() || getWhirlActor(); }
void checkJumpOkFlg() const {}
void checkRopeCntMax() const {}
void checkRopeDownStart() const {}
@@ -38,7 +80,7 @@ public:
void checkTornadoUp() const {}
void getBeltSpeed() const {}
void getBodyMtx() {}
void getCannonAngleX() const {}
s16 getCannonAngleX() const { return shape_angle.x + m0396 - 0x4000; }
void getCannonAngleY() const {}
void getCraneAngle() const {}
void getCraneBaseAngle() const {}
@@ -59,16 +101,20 @@ public:
void getTactJntMtx() {}
void getTillerAngleRate() {}
void getTillerTopPosP() {}
fopAc_ac_c* getTornadoActor() { return mTornadoActor; }
void getWhirlActor() {}
daTornado_c* getTornadoActor() const { return mTornadoActor; }
fopAc_ac_c* getWhirlActor() const { return mWhirlActor; }
void offCraneHookFlg() {}
void offFantomGanonBattle() {}
void offStateFlg(daSHIP_SFLG) {}
void offStateFlg(daSHIP_SFLG flag) { mStateFlag &= ~flag;}
void offTornadoFlg() {
mTornadoID = fpcM_ERROR_PROCESS_ID_e;
mTornadoActor = NULL;
}
void offWhirlFlg() {}
void offWhirlFlg() {
mWhirlID = fpcM_ERROR_PROCESS_ID_e;
mWhirlActor = NULL;
}
void onCb1Ride() {}
void onCraneHookFlg() {}
void onCrashFlg() {}
@@ -77,7 +123,7 @@ public:
void onLinkSit() {}
void onSceneChange() {}
void onShortHitFlg() {}
void onStateFlg(daSHIP_SFLG) {}
void onStateFlg(daSHIP_SFLG flag) { mStateFlag |= flag; }
void onTornadoFlg(u32 tornadoID) { mTornadoID = tornadoID; }
void onWhirlFlg(unsigned long, short) {}
void onWhirlFlgDirect(unsigned long, short) {}
@@ -94,185 +140,262 @@ public:
void setSteerMove() {}
void setTactWarp() {}
void bodyJointCallBack(int);
void cannonJointCallBack(int);
void craneJointCallBack();
void headJointCallBack0();
void headJointCallBack1(int);
BOOL bodyJointCallBack(int);
BOOL cannonJointCallBack(int);
BOOL craneJointCallBack();
BOOL headJointCallBack0();
BOOL headJointCallBack1(int);
BOOL draw();
void checkForceMessage();
BOOL checkForceMessage();
void setInitMessage();
void setNextMessage(msg_class*);
BOOL setNextMessage(msg_class*);
void seStart(u32, cXyz*);
void setSailAngle();
void setControllAngle(s16);
void getMaxWaterY(cXyz*);
void setWaveAngle(s16*, s16*);
void getWaterY();
f32 getWaterY();
void setYPos();
void checkOutRange();
BOOL checkOutRange();
void decrementShipSpeed(f32);
void firstDecrementShipSpeed(f32);
void getAimControllAngle(s16);
s16 getAimControllAngle(s16);
void setMoveAngle(s16);
void changeDemoEndProc();
void setCrashData(s16);
void checkNextMode(int);
BOOL checkNextMode(int);
void setPartOnAnime(u8);
void setPartOffAnime();
void setPartAnimeInit(u8);
void setSelfMove(int);
void procWait_init();
void procWait();
void procReady_init();
void procReady();
void procGetOff_init();
void procGetOff();
void procPaddleMove_init();
void procPaddleMove();
void procSteerMove_init();
void procSteerMove();
void procCannonReady_init();
void procCannonReady();
void procCannon_init();
void procCannon();
void procCraneReady_init();
void procCraneReady();
void procCrane_init();
void procCrane();
void procCraneUp_init();
void procCraneUp();
void procToolDemo_init();
void procToolDemo();
void procZevDemo_init();
void procZevDemo();
void procTalkReady_init();
void procTalkReady();
void procTalk_init();
void procTalk();
void procTurn_init();
void procTurn();
void procTornadoUp_init();
void procTornadoUp();
void procStartModeWarp_init();
void procStartModeWarp();
void procTactWarp_init();
void procTactWarp();
void procWhirlDown_init();
void procWhirlDown();
void procStartModeThrow_init();
void procStartModeThrow();
BOOL procWait_init();
BOOL procWait();
BOOL procReady_init();
BOOL procReady();
BOOL procGetOff_init();
BOOL procGetOff();
BOOL procPaddleMove_init();
BOOL procPaddleMove();
BOOL procSteerMove_init();
BOOL procSteerMove();
BOOL procCannonReady_init();
BOOL procCannonReady();
BOOL procCannon_init();
BOOL procCannon();
BOOL procCraneReady_init();
BOOL procCraneReady();
BOOL procCrane_init();
BOOL procCrane();
BOOL procCraneUp_init();
BOOL procCraneUp();
BOOL procToolDemo_init();
BOOL procToolDemo();
BOOL procZevDemo_init();
BOOL procZevDemo();
BOOL procTalkReady_init();
BOOL procTalkReady();
BOOL procTalk_init();
BOOL procTalk();
BOOL procTurn_init();
BOOL procTurn();
BOOL procTornadoUp_init();
BOOL procTornadoUp();
BOOL procStartModeWarp_init();
BOOL procStartModeWarp();
BOOL procTactWarp_init();
BOOL procTactWarp();
BOOL procWhirlDown_init();
BOOL procWhirlDown();
BOOL procStartModeThrow_init();
BOOL procStartModeThrow();
void setEffectData(f32, s16);
void setRoomInfo();
void incRopeCnt(int, int);
void setRopePos();
void getAnglePartRate();
f32 getAnglePartRate();
void setTornadoActor();
void setWhirlActor();
void setHeadAnm();
BOOL execute();
void shipDelete();
void createHeap();
BOOL shipDelete();
BOOL createHeap();
cPhs_State create();
void checkForceMove() const;
void initStartPos(cXyz const*, s16);
static cXyz l_rope_base_vec;
public:
/* 0x0290 */ request_of_phase_process_class mPhs;
/* 0x0298 */ mDoExt_McaMorf* m0298;
/* 0x029C */ mDoExt_McaMorf* m029C;
/* 0x02A0 */ u8 m02A0[0x02A8 - 0x02A0];
/* 0x02A0 */ J3DTexMtx* m02A0;
/* 0x02A4 */ J3DTexMtx* m02A4;
/* 0x02A8 */ Mtx m02A8;
/* 0x02D8 */ u8 m02D8[0x02EC - 0x02D8];
/* 0x02D8 */ u8 m02D8[0x02E8 - 0x02D8];
/* 0x02E8 */ J3DAnmTransform* mAnmTransform;
/* 0x02EC */ J3DFrameCtrl mFrameCtrl;
/* 0x0300 */ J3DModel* mpCannonModel;
/* 0x0304 */ J3DModel* mpSalvageArmModel;
/* 0x0308 */ J3DModel* m0308;
/* 0x0308 */ J3DModel* mpLinkModel;
/* 0x030C */ mDoExt_3DlineMat1_c mRopeLine;
/* 0x0348 */ u8 m0348[0x034D - 0x0348];
/* 0x0348 */ u8 m0348[0x034A - 0x0348];
/* 0x034A */ s8 m034A;
/* 0x034B */ u8 m034B;
/* 0x034C */ u8 m034C;
/* 0x034D */ u8 m034D;
/* 0x034E */ u8 mShipMode;
/* 0x034F */ u8 m034F[0x0354 - 0x034F];
/* 0x034F */ u8 m034F;
/* 0x0350 */ u8 m0350;
/* 0x0351 */ u8 m0351;
/* 0x0352 */ u8 m0352;
/* 0x0353 */ u8 m0353;
/* 0x0354 */ int mEvtStaffId;
/* 0x0358 */ u32 m0358;
/* 0x035C */ int mNextMessageID;
/* 0x0358 */ u32 mStateFlag;
/* 0x035C */ u32 mNextMessageNo;
/* 0x0360 */ u32 mShadowId;
/* 0x0364 */ u8 m0364[0x036C - 0x0364];
/* 0x0364 */ s16 m0364;
/* 0x0366 */ s16 m0366;
/* 0x0368 */ u8 m0368[0x036C - 0x0368];
/* 0x036C */ s16 m036C;
/* 0x036E */ u8 m036E[0x0370 - 0x036E];
/* 0x036E */ s16 m036E;
/* 0x0370 */ s16 m0370;
/* 0x0372 */ s16 m0372;
/* 0x0374 */ u8 m0374[0x037A - 0x0374];
/* 0x0374 */ s16 m0374;
/* 0x0376 */ s16 m0376;
/* 0x0378 */ s16 m0378;
/* 0x037A */ s16 m037A;
/* 0x037C */ s16 m037C;
/* 0x037E */ s16 m037E;
/* 0x0380 */ u8 m0380[0x0384 - 0x0380];
/* 0x0380 */ s16 m0380;
/* 0x0382 */ s16 m0382;
/* 0x0384 */ s16 m0384;
/* 0x0386 */ s16 m0386;
/* 0x0388 */ s16 m0388;
/* 0x038A */ u8 m038A[0x0392 - 0x038A];
/* 0x0392 */ s16 m0392;
/* 0x038A */ u16 m038A;
/* 0x038C */ s16 m038C;
/* 0x038E */ s16 m038E;
/* 0x0390 */ u16 m0390;
/* 0x0392 */ u16 m0392;
/* 0x0394 */ s16 m0394;
/* 0x0396 */ s16 m0396;
/* 0x0398 */ s16 m0398;
/* 0x039A */ s16 m039A;
/* 0x039C */ s16 m039C;
/* 0x039E */ u16 m039E;
/* 0x03A0 */ u8 m03A0[0x03A4 - 0x03A0];
/* 0x039E */ s16 mCurrentRopeSegmentIndex;
/* 0x03A0 */ s16 m03A0;
/* 0x03A2 */ s16 m03A2;
/* 0x03A4 */ s16 mStickMAng;
/* 0x03A6 */ u8 m03A6[0x03B4 - 0x03A6];
/* 0x03B4 */ s16 m03B4;
/* 0x03B6 */ u8 m03B6[0x03B8 - 0x03B6];
/* 0x03A6 */ s16 m03A6;
/* 0x03A8 */ s16 m03A8;
/* 0x03AA */ s16 m03AA;
/* 0x03AC */ s16 m03AC;
/* 0x03AE */ s16 m03AE;
/* 0x03B0 */ s16 m03B0;
/* 0x03B2 */ s16 m03B2;
/* 0x03B4 */ u16 m03B4;
/* 0x03B6 */ s16 m03B6;
/* 0x03B8 */ s16 m03B8;
/* 0x03BA */ u8 m03BA[0x03C8 - 0x03BA];
/* 0x03BA */ s16 m03BA;
/* 0x03BC */ csXyz m03BC;
/* 0x03C2 */ s16 m03C2;
/* 0x03C4 */ int m03C4;
/* 0x03C8 */ int mTactWarpPosNum;
/* 0x03CC */ int m03CC;
/* 0x03D0 */ u8 m03D0[0x03D8 - 0x03D0];
/* 0x03D0 */ f32 m03D0;
/* 0x03D4 */ f32 m03D4;
/* 0x03D8 */ f32 m03D8;
/* 0x03DC */ u8 m03DC[0x03E8 - 0x03DC];
/* 0x03DC */ f32 m03DC;
/* 0x03E0 */ f32 m03E0;
/* 0x03E4 */ f32 m03E4;
/* 0x03E8 */ f32 m03E8;
/* 0x03EC */ f32 mStickMVal;
/* 0x03F0 */ u8 m03F0[0x03F4 - 0x03F0];
/* 0x03F4 */ f32 m03F4;
/* 0x03F8 */ u8 m03F8[0x03FC - 0x03F8];
/* 0x03F8 */ f32 m03F8;
/* 0x03FC */ f32 mFwdVel;
/* 0x0400 */ f32 m0400;
/* 0x0404 */ f32 m0404;
/* 0x0408 */ f32 m0408;
/* 0x040C */ f32 m040C;
/* 0x0410 */ int mGridId;
/* 0x0410 */ fpc_ProcID mGridID;
/* 0x0414 */ daGrid_c* mpGrid;
/* 0x0418 */ u32 mTornadoID;
/* 0x041C */ fopAc_ac_c* mTornadoActor;
/* 0x0420 */ u32 m0420;
/* 0x0424 */ fopAc_ac_c* m0424;
/* 0x0428 */ u8 m0428[0x042C - 0x0428];
/* 0x042C */ u32 mTactWarpID;
/* 0x0430 */ u8 m0430[0x0434 - 0x0430];
/* 0x0418 */ fpc_ProcID mTornadoID;
/* 0x041C */ daTornado_c* mTornadoActor;
/* 0x0420 */ fpc_ProcID mWhirlID;
/* 0x0424 */ fopAc_ac_c* mWhirlActor;
/* 0x0428 */ cXyz* m0428;
/* 0x042C */ fpc_ProcID mTactWarpID;
/* 0x0430 */ fpc_ProcID m0430;
/* 0x0434 */ cXyz* m0434;
/* 0x0438 */ cXyz m0438;
/* 0x0444 */ cXyz m0444;
/* 0x0450 */ u8 m0450[0x045C - 0x0450];
/* 0x0450 */ cXyz m0450;
/* 0x045C */ cXyz m045C;
/* 0x0468 */ u8 m0468[0x1044 - 0x0468];
/* 0x0468 */ cXyz mRopeLineSegments[250];
/* 0x1020 */ cXyz m1020;
/* 0x102C */ cXyz m102C;
/* 0x1038 */ cXyz m1038;
/* 0x1044 */ cXyz m1044;
/* 0x1050 */ u8 m1050[0x105C - 0x1050];
/* 0x1050 */ cXyz m1050;
/* 0x105C */ cXyz mEffPos;
/* 0x1068 */ u8 m1068[0x1180 - 0x1068];
/* 0x1180 */ dBgS_Acch mAcch;
/* 0x1068 */ cXyz m1068;
/* 0x1074 */ cXyz m1074;
/* 0x1080 */ dBgS_AcchCir mAcchCir[4];
/* 0x1180 */ dBgS_ObjAcch mAcch;
/* 0x1344 */ dCcD_Stts mStts;
/* 0x1380 */ dCcD_Cyl mCyl[3];
/* 0x1710 */ dCcD_Sph m1710;
/* 0x1710 */ dCcD_Sph mSph;
/* 0x183C */ dPa_waveEcallBack mWaveR;
/* 0x18A0 */ dPa_waveEcallBack mWaveL;
/* 0x1904 */ dPa_splashEcallBack mSplash;
/* 0x1920 */ dPa_trackEcallBack mTrack;
/* 0x1970 */ dPa_rippleEcallBack m1970;
/* 0x1970 */ dPa_rippleEcallBack mRipple;
/* 0x1984 */ dPa_followEcallBack m1984;
/* 0x1998 */ dPa_followEcallBack m1998;
/* 0x19AC */ dPa_followEcallBack m19AC;
/* 0x19C0 */ dPa_rippleEcallBack m19C0;
/* 0x19D4 */ int (daShip_c::*mProc)();
/* 0x19D4 */ ProcFunc mProc;
};
class daShip_HIO_c0 {
public:
~daShip_HIO_c0(){}
/* 0x00 */ static const s16 tiller_speed;
/* 0x02 */ static const s16 cannon_no_gravity_timer;
/* 0x04 */ static const s16 throw_start_angle_speed;
/* 0x06 */ static const s16 throw_return_angle_speed;
/* 0x08 */ static const f32 paddle_speed;
/* 0x0C */ static const f32 min_speed;
/* 0x10 */ static const f32 wind_inc_speed;
/* 0x14 */ static const f32 r_inc_speed;
/* 0x18 */ static const f32 r_wind_inc_speed;
/* 0x1C */ static const f32 fly_rate;
/* 0x20 */ static const f32 wind_rate;
/* 0x24 */ static const f32 ef_dis_speed;
/* 0x28 */ static const f32 ef_speed_rate;
/* 0x2C */ static const f32 ef_front_x;
/* 0x30 */ static const f32 ef_front_y;
/* 0x34 */ static const f32 ef_front_z;
/* 0x38 */ static const f32 ef_back_x;
/* 0x3C */ static const f32 ef_back_y;
/* 0x40 */ static const f32 ef_back_z;
/* 0x44 */ static const f32 ef_sp_max_speed;
/* 0x48 */ static const f32 ef_pitch;
/* 0x4C */ static const f32 ef_ind_scroll;
/* 0x50 */ static const f32 ef_ind_scale;
/* 0x54 */ static const f32 cannon_speed;
/* 0x58 */ static const f32 cannon_gravity;
/* 0x5C */ static const f32 whirl_init_speed;
/* 0x60 */ static const f32 whirl_inc_speed;
/* 0x64 */ static const f32 whirl_distance;
/* 0x68 */ static const f32 tornado_init_speed;
/* 0x6C */ static const f32 tornado_inc_speed;
/* 0x70 */ static const f32 tornado_distance;
/* 0x74 */ static const f32 tornado_pull_speed;
/* 0x78 */ static const f32 throw_start_speedF;
/* 0x7C */ static const f32 throw_start_speed_y;
public:
};
#endif /* D_A_SHIP_H */
+18 -3
View File
@@ -14,9 +14,24 @@ class daTornado_HIO_c0 {
class daTornado_c : public fopAc_ac_c {
public:
void getJointXPos(int) const {}
void getJointYPos(int) const {}
void getJointZPos(int) const {}
float getJointXPos(int jno) const {
if (mpModel)
return mpModel->getAnmMtx(jno)[0][3];
else
return current.pos.x;
}
float getJointYPos(int jno) const {
if (mpModel)
return mpModel->getAnmMtx(jno)[1][3];
else
return current.pos.y;
}
float getJointZPos(int jno) const {
if (mpModel)
return mpModel->getAnmMtx(jno)[2][3];
else
return current.pos.z;
}
void getScaleEnd() {}
void getSmallScaleEnd() {}
void setScaleOn() {}
+1 -1
View File
@@ -359,7 +359,7 @@ public:
void Bank() {}
void Up() {}
void Center() {}
cXyz Center() { return mCenter + mCenterShake; }
void StartEventCamera(int, int, ...);
void EndEventCamera(int);
+12 -5
View File
@@ -52,7 +52,9 @@ enum daPy__PlayerStatus0 {
daPyStts0_TELESCOPE_LOOK_e = 0x00200000,
daPyStts0_BOOMERANG_WAIT_e = 0x00400000,
daPyStts0_UNK800000_e = 0x00800000,
daPyStts0_UNK1000000_e = 0x01000000,
daPyStts0_UNK2000000_e = 0x02000000,
daPyStts0_UNK4000000_e = 0x04000000,
daPyStts0_CRAWL_e = 0x08000000,
daPyStts0_UNK20000000_e = 0x20000000,
daPyStts0_SPIN_ATTACK_e = 0x40000000,
@@ -394,7 +396,7 @@ public:
void setPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[param_0][i] |= flag; }
void clearPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[param_0][i] &= ~flag; }
bool checkPlayerStatus(int param_0, int i, u32 flag) { return flag & mPlayerStatus[param_0][i]; }
BOOL checkPlayerStatus(int param_0, int i, u32 flag) { return mPlayerStatus[param_0][i] & flag; }
u8 getSelectItem(int idx) { return mSelectItem[idx]; }
void setSelectItem(int idx, u8 itemNo) { mSelectItem[idx] = itemNo; }
@@ -721,7 +723,7 @@ public:
/* 0x49B0 */ u8 mPlayerInfoBuffer[sizeof(dSv_player_status_c_c)];
/* 0x4A20 */ u8 mPlayerInfoBufferStageNo;
/* 0x4A24 */ daAgb_c* mpAgb;
/* 0x4A28 */ u32 mPlayerStatus[2][2];
/* 0x4A28 */ u32 mPlayerStatus[1][4];
/* 0x4A38 */ u16 mMinigameFlags;
/* 0x4A3A */ u8 mMiniGameType;
/* 0x4A3C */ s16 mMiniGameRupee;
@@ -771,6 +773,7 @@ extern GXColor g_blackColor;
extern GXColor g_whiteColor;
extern GXColor g_saftyWhiteColor;
/**
* === SAVE ===
*/
@@ -1848,6 +1851,10 @@ void dComIfGs_revPlayerRecollectionData();
* === PLAY ===
*/
inline void dComIfGp_onMenuCollect() {
g_dComIfG_gameInfo.play.field_0x495a = 1;
}
inline void dComIfGp_init() { g_dComIfG_gameInfo.play.init(); }
void dComIfGp_setNextStage(const char* i_stageName, s16 i_point, s8 i_roomNo, s8 i_layer = -1,
@@ -2169,7 +2176,7 @@ inline int dComIfGp_getPlayerCameraID(int idx) {
return g_dComIfG_gameInfo.play.getPlayerCameraID(idx);
}
inline BOOL dComIfGp_checkCameraAttentionStatus(int idx, u32 flag) {
inline u32 dComIfGp_checkCameraAttentionStatus(int idx, u32 flag) {
return g_dComIfG_gameInfo.play.checkCameraAttentionStatus(idx, flag);
}
@@ -2309,11 +2316,11 @@ inline u8 dComIfGp_checkMesgCancelButton() {
return g_dComIfG_gameInfo.play.checkMesgCancelButton();
}
inline bool dComIfGp_checkPlayerStatus0(int param_0, u32 flag) {
inline u32 dComIfGp_checkPlayerStatus0(int param_0, u32 flag) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 0, flag);
}
inline bool dComIfGp_checkPlayerStatus1(int param_0, u32 flag) {
inline u32 dComIfGp_checkPlayerStatus1(int param_0, u32 flag) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 1, flag);
}
+18 -2
View File
@@ -120,6 +120,14 @@ public:
void executeAfter(JPABaseEmitter*);
void draw(JPABaseEmitter*);
JPABaseEmitter* getEmitter() { return mpBaseEmitter; }
void setTimer (s16 timerVal) { mFadeTimer = timerVal; }
void setSpeed (f32 vel) { mVelFade1 = vel; }
void setPitch (f32 pitch) { mVelFade2 = pitch; }
void setMaxSpeed (f32 vel) { mMaxParticleVelocity = vel; }
void setMaxDisSpeed (f32 vel) { mVelSpeed = vel; }
void setAnchor (cXyz* anchorPos1, cXyz* anchorPos2) { mCollapsePos[0].set(*anchorPos1); mCollapsePos[1].set(*anchorPos2); }
virtual ~dPa_waveEcallBack() {}
/* 0x04 */ s16 mState;
@@ -132,7 +140,7 @@ public:
/* 0x1C */ cXyz mCollapsePos[2];
/* 0x34 */ const cXyz* mpPos;
/* 0x38 */ const csXyz* mpRot;
/* 0x3C */ JGeometry::TVec3<f32> mRotMtx[3];
/* 0x3C */ Vec mRotMtx[3];
/* 0x60 */ JPABaseEmitter* mpBaseEmitter;
};
@@ -142,6 +150,10 @@ public:
void remove();
void execute(JPABaseEmitter*);
JPABaseEmitter* getEmitter() { return mpBaseEmitter; }
void setSpeed (f32 vel) { mScaleTimer = vel; }
void setMaxSpeed (f32 vel) { mMaxScaleTimer = vel; }
virtual ~dPa_splashEcallBack() {}
/* 0x04 */ s16 mState;
@@ -160,12 +172,16 @@ public:
void execute(JPABaseEmitter*);
void draw(JPABaseEmitter*);
JPABaseEmitter* getEmitter() { return mpBaseEmitter; }
void setIndirectTexData (f32 exTransY, f32 exScaleY) { mExTransY = exTransY; mExScaleY = exScaleY; }
void setSpeed (f32 vel) { mVel = vel; }
virtual ~dPa_trackEcallBack() {}
/* 0x04 */ s16 mState;
/* 0x08 */ f32 mBaseY;
/* 0x0C */ f32 mMinY;
/* 0x10 */ Vec mPos[3];
/* 0x10 */ JGeometry::TVec3<f32> mPos[3];
/* 0x34 */ const cXyz* mpPos;
/* 0x38 */ const csXyz* mpRot;
/* 0x3C */ f32 mExTransY;
+4
View File
@@ -645,6 +645,10 @@ inline s16 fopAcM_searchPlayerAngleY(fopAc_ac_c* actor) {
return fopAcM_searchActorAngleY(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
inline s32 fopAcM_seenPlayerAngleY(fopAc_ac_c* actor) {
return fopAcM_seenActorAngleY(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
inline f32 fopAcM_searchPlayerDistanceY(fopAc_ac_c* actor) {
return fopAcM_searchActorDistanceY(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
+8
View File
@@ -179,6 +179,14 @@ inline void mDoAud_setLinkHp(s32 param_0, s32 param_1) {
mDoAud_zelAudio_c::getInterface()->setLinkHp(param_0, param_1);
}
inline void mDoAud_setShipSailState(s32 state) {
mDoAud_zelAudio_c::getInterface()->setShipSailState(state);
}
inline void mDoAud_shipCruiseSePlay(Vec* i_sePos, f32 param_1) {
mDoAud_zelAudio_c::getInterface()->shipCruiseSePlay(i_sePos, param_1);
}
inline void mDoAud_monsSeInit() {
mDoAud_zelAudio_c::getInterface()->monsSeInit();
}
+3 -3
View File
@@ -37,7 +37,7 @@ inline void cMtx_scale(Mtx m, f32 x, f32 y, f32 z) {
MTXScale(m, x, y, z);
}
inline void mDoMtx_multVec(Mtx m, const Vec* src, Vec* dst) {
inline void mDoMtx_multVec(const Mtx m, const Vec* src, Vec* dst) {
MTXMultVec(m, src, dst);
}
@@ -81,7 +81,7 @@ inline void cMtx_lookAt(Mtx param_0, const Vec* param_1, const Vec* param_2, s16
mDoMtx_lookAt(param_0, param_1, param_2, param_3);
}
inline void cMtx_multVec(Mtx mtx, const Vec* src, Vec* dst) {
inline void cMtx_multVec(const Mtx mtx, const Vec* src, Vec* dst) {
mDoMtx_multVec(mtx, src, dst);
}
@@ -97,7 +97,7 @@ inline void cMtx_multVecArray(Mtx mtx, const Vec* src, Vec* dst, u32 count) {
mDoMtx_multVecArray(mtx, src, dst, count);
}
inline void mDoMtx_multVecZero(MtxP param_0, Vec* param_1) {
inline void mDoMtx_multVecZero(CMtxP param_0, Vec* param_1) {
param_1->x = param_0[0][3];
param_1->y = param_0[1][3];
param_1->z = param_0[2][3];
+1 -1
View File
@@ -1815,7 +1815,7 @@ BOOL daPy_lk_c::changeDamageProc() {
mCurProc == daPyProc_SHIP_READY_e ||
(
dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e) &&
ship && ship->unknown_inline_TODO()
ship && ship->checkForceMove()
)
) {
offNoResetFlg0(daPyFlg0_SHIP_DROP);
+1 -1
View File
@@ -15,7 +15,7 @@
#include "d/d_com_inf_game.h"
/* 8013F848-8013F8AC .text shipSpecialDemoStart__9daPy_lk_cFv */
void daPy_lk_c::shipSpecialDemoStart() {
BOOL daPy_lk_c::shipSpecialDemoStart() {
/* Nonmatching */
}
+4398 -167
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -11,14 +11,14 @@ void daShip_c::initStartPos(const cXyz* pos, short rotY) {
old.pos = *pos;
shape_angle.y = rotY;
current.angle.y = shape_angle.y;
m0358 &= ~0x10;
offStateFlg(daSFLG_UNK10_e);
gravity = -2.5f;
mWaveL.remove();
mWaveR.remove();
mSplash.remove();
mTrack.remove();
m1970.end();
mRipple.end();
m1984.end();
m1998.end();
m19AC.end();
+1 -1
View File
@@ -984,7 +984,7 @@ void dPa_waveEcallBack::remove() {
/* 8007E2BC-8007E484 .text executeAfter__17dPa_waveEcallBackFP14JPABaseEmitter */
void dPa_waveEcallBack::executeAfter(JPABaseEmitter* emitter) {
emitter->getEmitterAxis(mRotMtx[0], mRotMtx[1], mRotMtx[2]);
emitter->getEmitterAxis(reinterpret_cast<JGeometry::TVec3<f32>&>(mRotMtx[0]), reinterpret_cast<JGeometry::TVec3<f32>&>(mRotMtx[1]), reinterpret_cast<JGeometry::TVec3<f32>&>(mRotMtx[2]));
if (mState != 0) {
emitter->setDirectionalSpeed(0.0f);