From b8c2c4db32158ac856cb3425bc3053412f31f8b2 Mon Sep 17 00:00:00 2001 From: Kristopher Early <1191258+MrPolymorph@users.noreply.github.com> Date: Sun, 15 Oct 2023 21:32:25 +0100 Subject: [PATCH] d_a_ship_static 100% match --- configure.py | 2 +- include/d/actor/d_a_ship.h | 28 ++++++++++++++++++---------- src/d/d_a_ship_static.cpp | 35 ++++++++++++++++++++++++++--------- 3 files changed, 45 insertions(+), 20 deletions(-) diff --git a/configure.py b/configure.py index e83a428ad..b7e09116f 100644 --- a/configure.py +++ b/configure.py @@ -346,7 +346,7 @@ config.libs = [ Object(NonMatching, "d/d_cloth_packet.cpp"), Object(NonMatching, "d/actor/d_a_obj.cpp"), Object(NonMatching, "d/d_a_obj_tribox_static.cpp"), - Object(NonMatching, "d/d_a_ship_static.cpp"), + Object(Matching, "d/d_a_ship_static.cpp"), Object(Matching, "d/d_a_boko_static.cpp"), Object(Matching, "d/d_a_bomb_static.cpp"), Object(NonMatching, "d/d_a_branch_static.cpp"), diff --git a/include/d/actor/d_a_ship.h b/include/d/actor/d_a_ship.h index 3535baa27..cd2f3dedb 100644 --- a/include/d/actor/d_a_ship.h +++ b/include/d/actor/d_a_ship.h @@ -94,24 +94,32 @@ public: void getCannonAngleX() const; void checkForceMove() const; - /* 0x0290 */ u8 field_0x0290[0x0300 - 0x0290]; + /* 0x0290 */ u8 field_0x0290[0x02EC - 0x0290]; + /* 0x02EC */ J3DFrameCtrl mFrameCtrl; /* 0x0300 */ J3DModel* mpCannonModel; /* 0x0304 */ J3DModel* mpSalvageArmModel; - /* 0x0308 */ u8 field_0x0308[0x034D - 0x0308]; - /* 0x034D */ u8 field_0x034d; + /* 0x0308 */ J3DModel* field_0x308; + /* 0x030C */ mDoExt_3DlineMat1_c mRopeLine; + /* 0x0341 */ u8 field_0x0348[0x034d - 0x0341]; + /* 0x034d */ u8 field_0x034d; /* 0x034E */ u8 mShipMode; - /* 0x034F */ u8 field_0x034F[0x0358 - 0x034F]; - /* 0x0358 */ u32 field_0x0358; + /* 0x0358 */ u32 field_0x0358; //showing 390 /* 0x035C */ int mNextMessageID; /* 0x0360 */ int mShadowId; /* 0x0364 */ u8 field_0x0364[0x183C - 0x0364]; - /* 0x183C */ dPa_waveEcallBack field_0x183c; - /* 0x18A0 */ dPa_waveEcallBack field_0x18a0; - /* 0x1904 */ dPa_splashEcallBack field_0x1904; - /* 0x1920 */ dPa_trackEcallBack field_0x1920; + /* 0x183C */ dPa_waveEcallBack mWaveL; + /* 0x187C */ u8 field_0x187C[0x18A0 - 0x187C]; + /* 0x18A0 */ dPa_waveEcallBack mWaveR; + /* 0x18E0 */ u8 field_0x18E0[0x1904 - 0x18E0]; + /* 0x1904 */ dPa_splashEcallBack mSplash; + /* 0x1920 */ dPa_trackEcallBack mTrack; + /* 0x194C */ u8 field_0x194C[0x1970 - 0x194C]; /* 0x1970 */ dPa_rippleEcallBack field_0x1970; - /* 0x1984 */ u8 field_0x1984[0x19C0 - 0x1984]; + /* 0x1984 */ dPa_followEcallBack field_0x1984; + /* 0x1984 */ dPa_followEcallBack field_0x1998; + /* 0x1984 */ dPa_followEcallBack field_0x19ac; /* 0x19C0 */ dPa_rippleEcallBack field_0x19c0; + }; #endif /* D_A_SHIP_H */ diff --git a/src/d/d_a_ship_static.cpp b/src/d/d_a_ship_static.cpp index 8bac0eae8..cc7ae92e7 100644 --- a/src/d/d_a_ship_static.cpp +++ b/src/d/d_a_ship_static.cpp @@ -1,13 +1,30 @@ -// -// Generated by dtk -// Translation Unit: d_a_ship_static.cpp -// +/* + * d_a_ship_static.cpp + */ +#include "d/actor/d_a_ship.h" -#include "d_a_ship_static.h" -#include "dolphin/types.h" +void daShip_c::initStartPos(const cXyz* pos, short rotY) { + current.pos.x = pos->x; + current.pos.y = pos->y; + current.pos.z = pos->z; + next.pos.x = pos->x; + next.pos.y = pos->y; + next.pos.z = pos->z; + shape_angle.y = rotY; + current.angle.y = shape_angle.y; + field_0x0358 &= 0xffffffef; + mGravity = -2.5; -/* 80067D94-80067E78 .text initStartPos__8daShip_cFPC4cXyzs */ -void daShip_c::initStartPos(const cXyz*, short) { - /* Nonmatching */ + + mWaveR.remove(); + mWaveL.remove(); + + mSplash.remove(); + mTrack.remove(); + field_0x1970.end(); + field_0x1984.end(); + field_0x1998.end(); + field_0x19ac.end(); + field_0x19c0.end(); }