From e251cbabc2e6f68f4b6c92d8244061c3472d3590 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Fri, 22 Dec 2023 14:24:50 -0500 Subject: [PATCH] get some more d TUs to compile --- include/d/actor/d_a_leaflift.h | 7 +++++ include/d/d_cam_param.h | 56 +++++++++++++++++++++++++++++++--- include/d/d_magma.h | 9 ++++++ src/d/d_a_leaflift_static.cpp | 6 +++- src/d/d_att_dist.cpp | 1 + src/d/d_boss_magma.cpp | 6 ++-- src/d/d_cam_param.cpp | 43 +++++++++++--------------- src/d/d_cam_style.cpp | 3 +- src/d/d_cam_type.cpp | 3 +- src/d/d_cam_type2.cpp | 3 +- src/d/d_camera.cpp | 2 +- src/d/d_demo.cpp | 8 ++--- src/d/d_vib_pattern.cpp | 3 +- 13 files changed, 102 insertions(+), 48 deletions(-) diff --git a/include/d/actor/d_a_leaflift.h b/include/d/actor/d_a_leaflift.h index 188175a80..1e2237d2e 100644 --- a/include/d/actor/d_a_leaflift.h +++ b/include/d/actor/d_a_leaflift.h @@ -16,6 +16,13 @@ public: void MoveDownLift(); BOOL _draw(); + void checkEndDownLift(); + void MoveUpLift(); + + static const f32 m_height; + static const f32 m_max_speed; + static const f32 m_min_speed; + public: /* Place member variables here */ }; diff --git a/include/d/d_cam_param.h b/include/d/d_cam_param.h index dcc8de2d4..8db69ab78 100644 --- a/include/d/d_cam_param.h +++ b/include/d/d_cam_param.h @@ -2,18 +2,28 @@ #define D_CAM_PARAM_H #include "dolphin/types.h" +#include "SSystem/SComponent/c_angle.h" struct dCamera__Style; class dCstick_c { +public: /* 0x00 */ f32 m00; /* 0x04 */ f32 m04; /* 0x08 */ u32 m08; /* 0x0C */ u8 m0C[0x10 - 0x0C]; - /* 0x10 */ void* vtbl; +public: + dCstick_c(); + virtual ~dCstick_c() {} + + void Shift(u32); }; class dCamBGChk_c { +public: + dCamBGChk_c(); + +public: /* 0x00 */ f32 m00; /* 0x04 */ f32 m04; /* 0x08 */ f32 m08; @@ -41,6 +51,7 @@ class dCamBGChk_c { }; class dCamSetup_c { +public: /* 0x000 */ f32 m000; /* 0x004 */ f32 m004; /* 0x008 */ u16 m008; @@ -92,17 +103,52 @@ class dCamSetup_c { /* 0x0C0 */ f32 m0C0; /* 0x0C4 */ f32 m0C4; /* 0x0C8 */ u32 m0C8; - /* 0x0CC */ void* vtbl; + +public: + dCamSetup_c(); + virtual ~dCamSetup_c(); + + void CheckLatitudeRange(s16*); + void FanBank(); + +public: /* 0x0D0 */ dCstick_c mCstick; /* 0x0E4 */ dCamBGChk_c mBGChk; }; class dCamParam_c { - void Flag(s32, u16); - void Val(s32, int); +public: /* 0x0 */ dCamera__Style* mpStyle; /* 0x4 */ int mStyleIdx; - /* 0x8 */ void* vtbl; + +public: + dCamParam_c(s32); + virtual ~dCamParam_c(); + + void Flag(s32, u16); + void Val(s32, int); + void Change(s32); + void SearchStyle(u32); + void ratiof(f32, f32, f32, f32); + void DefaultRadius(f32*); + void RadiusRatio(f32); + void CenterHeight(f32); + void Fovy(f32); + void LockonLongitude(f32); + void LockonLatitude(f32); + void LockonFovy(f32); + void LockonCenterHeight(f32); +}; + +class dCamMath { +public: + void rationalBezierRatio(f32, f32); + void customRBRatio(f32, f32); + void zoomFovy(f32, f32); + void xyzRotateX(cXyz&, cSAngle); + void xyzRotateY(cXyz&, cSAngle); + void xyzHorizontalDistance(cXyz&, cXyz&); + void xyzProjPosOnYZ(cSAngle, cXyz&, cXyz&); }; #endif /* D_CAM_PARAM_H */ diff --git a/include/d/d_magma.h b/include/d/d_magma.h index 7c0ef1ccd..1a03ae4c9 100644 --- a/include/d/d_magma.h +++ b/include/d/d_magma.h @@ -26,6 +26,15 @@ public: virtual void setup(f32, u8, int); }; +class dMagma_ballBoss_c : public dMagma_ball_c { +public: + dMagma_ballBoss_c(); + virtual ~dMagma_ballBoss_c(); + virtual void calc(f32, u8, int); + virtual void update(); + virtual void setup(f32, u8, int); +}; + class dMagma_floor_c { public: ~dMagma_floor_c(); diff --git a/src/d/d_a_leaflift_static.cpp b/src/d/d_a_leaflift_static.cpp index 4411d521e..0dc8c996b 100644 --- a/src/d/d_a_leaflift_static.cpp +++ b/src/d/d_a_leaflift_static.cpp @@ -3,9 +3,13 @@ // Translation Unit: d_a_leaflift_static.cpp // -#include "d/actor/d_a_leaflift_static.h" +#include "d/actor/d_a_leaflift.h" #include "dolphin/types.h" +const f32 daLlift_c::m_height = 560.0f; +const f32 daLlift_c::m_max_speed = 10.0f; +const f32 daLlift_c::m_min_speed = 5.0f; + /* 800690E4-80069100 .text checkEndDownLift__9daLlift_cFv */ void daLlift_c::checkEndDownLift() { /* Nonmatching */ diff --git a/src/d/d_att_dist.cpp b/src/d/d_att_dist.cpp index 2f3fef0a2..2148d810f 100644 --- a/src/d/d_att_dist.cpp +++ b/src/d/d_att_dist.cpp @@ -3,3 +3,4 @@ // Translation Unit: d_att_dist.cpp // +#include "d/d_attention.h" diff --git a/src/d/d_boss_magma.cpp b/src/d/d_boss_magma.cpp index 64d401b38..05d420e67 100644 --- a/src/d/d_boss_magma.cpp +++ b/src/d/d_boss_magma.cpp @@ -3,11 +3,11 @@ // Translation Unit: d_boss_magma.cpp // -#include "d_boss_magma.h" +#include "d/d_magma.h" #include "dolphin/types.h" /* 80076B00-80076CDC .text calc__17dMagma_ballBoss_cFfUci */ -void dMagma_ballBoss_c::calc(float, unsigned char, int) { +void dMagma_ballBoss_c::calc(f32, u8, int) { /* Nonmatching */ } @@ -22,7 +22,7 @@ void b_a_sub(void*, void*) { } /* 80076D9C-80076FEC .text setup__17dMagma_ballBoss_cFfUci */ -void dMagma_ballBoss_c::setup(float, unsigned char, int) { +void dMagma_ballBoss_c::setup(f32, u8, int) { /* Nonmatching */ } diff --git a/src/d/d_cam_param.cpp b/src/d/d_cam_param.cpp index f9b69a4f1..ce74b5a62 100644 --- a/src/d/d_cam_param.cpp +++ b/src/d/d_cam_param.cpp @@ -3,21 +3,20 @@ // Translation Unit: d_cam_param.cpp // -#include "d_cam_param.h" -#include "dolphin/types.h" +#include "d/d_cam_param.h" /* 800AF384-800AF4F4 .text rationalBezierRatio__8dCamMathFff */ -void dCamMath::rationalBezierRatio(float, float) { +void dCamMath::rationalBezierRatio(f32, f32) { /* Nonmatching */ } /* 800AF4F4-800AF544 .text customRBRatio__8dCamMathFff */ -void dCamMath::customRBRatio(float, float) { +void dCamMath::customRBRatio(f32, f32) { /* Nonmatching */ } /* 800AF544-800AF5A0 .text zoomFovy__8dCamMathFff */ -void dCamMath::zoomFovy(float, float) { +void dCamMath::zoomFovy(f32, f32) { /* Nonmatching */ } @@ -47,7 +46,7 @@ dCstick_c::dCstick_c() { } /* 800AF838-800AF840 .text Shift__9dCstick_cFUl */ -void dCstick_c::Shift(unsigned long) { +void dCstick_c::Shift(u32) { /* Nonmatching */ } @@ -57,7 +56,7 @@ dCamBGChk_c::dCamBGChk_c() { } /* 800AF8F4-800AF930 .text __ct__11dCamParam_cFl */ -dCamParam_c::dCamParam_c(long) { +dCamParam_c::dCamParam_c(s32) { /* Nonmatching */ } @@ -67,57 +66,57 @@ dCamParam_c::~dCamParam_c() { } /* 800AF978-800AF9BC .text Change__11dCamParam_cFl */ -void dCamParam_c::Change(long) { +void dCamParam_c::Change(s32) { /* Nonmatching */ } /* 800AF9BC-800AFA04 .text SearchStyle__11dCamParam_cFUl */ -void dCamParam_c::SearchStyle(unsigned long) { +void dCamParam_c::SearchStyle(u32) { /* Nonmatching */ } /* 800AFA04-800AFAA4 .text ratiof__11dCamParam_cFffff */ -void dCamParam_c::ratiof(float, float, float, float) { +void dCamParam_c::ratiof(f32, f32, f32, f32) { /* Nonmatching */ } /* 800AFAA4-800AFB00 .text DefaultRadius__11dCamParam_cFPf */ -void dCamParam_c::DefaultRadius(float*) { +void dCamParam_c::DefaultRadius(f32*) { /* Nonmatching */ } /* 800AFB00-800AFB88 .text RadiusRatio__11dCamParam_cFf */ -void dCamParam_c::RadiusRatio(float) { +void dCamParam_c::RadiusRatio(f32) { /* Nonmatching */ } /* 800AFB88-800AFBB8 .text CenterHeight__11dCamParam_cFf */ -void dCamParam_c::CenterHeight(float) { +void dCamParam_c::CenterHeight(f32) { /* Nonmatching */ } /* 800AFBB8-800AFBE8 .text Fovy__11dCamParam_cFf */ -void dCamParam_c::Fovy(float) { +void dCamParam_c::Fovy(f32) { /* Nonmatching */ } /* 800AFBE8-800AFC74 .text LockonLongitude__11dCamParam_cFf */ -void dCamParam_c::LockonLongitude(float) { +void dCamParam_c::LockonLongitude(f32) { /* Nonmatching */ } /* 800AFC74-800AFD00 .text LockonLatitude__11dCamParam_cFf */ -void dCamParam_c::LockonLatitude(float) { +void dCamParam_c::LockonLatitude(f32) { /* Nonmatching */ } /* 800AFD00-800AFD20 .text LockonFovy__11dCamParam_cFf */ -void dCamParam_c::LockonFovy(float) { +void dCamParam_c::LockonFovy(f32) { /* Nonmatching */ } /* 800AFD20-800AFD40 .text LockonCenterHeight__11dCamParam_cFf */ -void dCamParam_c::LockonCenterHeight(float) { +void dCamParam_c::LockonCenterHeight(f32) { /* Nonmatching */ } @@ -132,7 +131,7 @@ dCamSetup_c::~dCamSetup_c() { } /* 800AFF40-800AFFB0 .text CheckLatitudeRange__11dCamSetup_cFPs */ -void dCamSetup_c::CheckLatitudeRange(short*) { +void dCamSetup_c::CheckLatitudeRange(s16*) { /* Nonmatching */ } @@ -140,9 +139,3 @@ void dCamSetup_c::CheckLatitudeRange(short*) { void dCamSetup_c::FanBank() { /* Nonmatching */ } - -/* 800B0004-800B004C .text __dt__9dCstick_cFv */ -dCstick_c::~dCstick_c() { - /* Nonmatching */ -} - diff --git a/src/d/d_cam_style.cpp b/src/d/d_cam_style.cpp index d1d1135dc..7fdca529d 100644 --- a/src/d/d_cam_style.cpp +++ b/src/d/d_cam_style.cpp @@ -3,6 +3,5 @@ // Translation Unit: d_cam_style.cpp // -#include "d_cam_style.h" -#include "dolphin/types.h" +#include "d/d_cam_param.h" diff --git a/src/d/d_cam_type.cpp b/src/d/d_cam_type.cpp index 7468cac8c..9e34af1c6 100644 --- a/src/d/d_cam_type.cpp +++ b/src/d/d_cam_type.cpp @@ -3,6 +3,5 @@ // Translation Unit: d_cam_type.cpp // -#include "d_cam_type.h" -#include "dolphin/types.h" +#include "d/d_camera.h" diff --git a/src/d/d_cam_type2.cpp b/src/d/d_cam_type2.cpp index f97057f44..1bf325975 100644 --- a/src/d/d_cam_type2.cpp +++ b/src/d/d_cam_type2.cpp @@ -3,6 +3,5 @@ // Translation Unit: d_cam_type2.cpp // -#include "d_cam_type2.h" -#include "dolphin/types.h" +#include "d/d_camera.h" diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index 68be33ce1..acfed513f 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -13,7 +13,7 @@ class camera_process_class; /* 80161790-801618B8 .text __ct__9dCamera_cFP12camera_class */ -dCamera_c::dCamera_c(camera_class*) { +dCamera_c::dCamera_c(camera_class*) : mCamParam(0) { /* Nonmatching */ } diff --git a/src/d/d_demo.cpp b/src/d/d_demo.cpp index 9f2176abc..c66bb882f 100644 --- a/src/d/d_demo.cpp +++ b/src/d/d_demo.cpp @@ -324,11 +324,9 @@ dDemo_manager_c::~dDemo_manager_c() { } /* 8006AEFC-8006AF5C .text __dt__14dMesg_tControlFv */ -/* -dMesg_tControl::~dMesg_tControl() { - /* Nonmatching */ -} -*/ +// dMesg_tControl::~dMesg_tControl() { +// /* Nonmatching */ +// } /* 8006AF5C-8006AFBC .text __dt__14dDemo_system_cFv */ dDemo_system_c::~dDemo_system_c() {} diff --git a/src/d/d_vib_pattern.cpp b/src/d/d_vib_pattern.cpp index 2d73d450b..e1b5bd8da 100644 --- a/src/d/d_vib_pattern.cpp +++ b/src/d/d_vib_pattern.cpp @@ -3,5 +3,4 @@ // Translation Unit: d_vib_pattern.cpp // -#include "d_vib_pattern.h" -#include "dolphin/types.h" +#include "d/d_vibration.h"