diff --git a/asm/J3DU/J3DUDL.s b/asm/J3DU/J3DUDL.s index 008696ea56c..0264c1e3156 100644 --- a/asm/J3DU/J3DUDL.s +++ b/asm/J3DU/J3DUDL.s @@ -2,7 +2,9 @@ .section .text, "ax" # 80273e08 - +/* only pointed at from vtables afaict, and mislabeled */ +.global getUseMtxNum__11J3DShapeMtxCFv +getUseMtxNum__11J3DShapeMtxCFv: /* 80273E08 00270D48 38 60 00 01 */ li r3, 1 /* 80273E0C 00270D4C 4E 80 00 20 */ blr diff --git a/asm/JAudio2/JASSeqParser.s b/asm/JAudio2/JASSeqParser.s index 197093c271c..f5a5c7aed79 100644 --- a/asm/JAudio2/JASSeqParser.s +++ b/asm/JAudio2/JASSeqParser.s @@ -1166,7 +1166,7 @@ lbl_80294D5C: /* 80294E70 00291DB0 40 82 00 18 */ bne lbl_80294E88 /* 80294E74 00291DB4 38 6D 8C C8 */ addi r3, r13, lbl_80451248-_SDA_BASE_ /* 80294E78 00291DB8 38 80 00 00 */ li r4, 0 -/* 80294E7C 00291DBC 48 0A 4C 69 */ bl JMath_NS_TRandom_fast_ +/* 80294E7C 00291DBC 48 0A 4C 69 */ bl __ct__Q25JMath13TRandom_fast_FUl /* 80294E80 00291DC0 38 00 00 01 */ li r0, 1 /* 80294E84 00291DC4 98 0D 8C C4 */ stb r0, lbl_80451244-_SDA_BASE_(r13) lbl_80294E88: diff --git a/asm/JAudio2/JAUClusterSound.s b/asm/JAudio2/JAUClusterSound.s deleted file mode 100644 index d687f70f1f0..00000000000 --- a/asm/JAudio2/JAUClusterSound.s +++ /dev/null @@ -1,11 +0,0 @@ -.include "macros.inc" - -.section .text, "ax" # 802a4ac4 - - -.global JAISoundHandle -JAISoundHandle: -/* 802A4AC4 002A1A04 38 00 00 00 */ li r0, 0 -/* 802A4AC8 002A1A08 90 03 00 00 */ stw r0, 0(r3) -/* 802A4ACC 002A1A0C 4E 80 00 20 */ blr - diff --git a/asm/JMath/random.s b/asm/JMath/random.s deleted file mode 100644 index 98aa8ad52bf..00000000000 --- a/asm/JMath/random.s +++ /dev/null @@ -1,9 +0,0 @@ -.include "macros.inc" - -.section .text, "ax" # 80339ae4 - - -.global JMath_NS_TRandom_fast_ -JMath_NS_TRandom_fast_: -/* 80339AE4 00336A24 90 83 00 00 */ stw r4, 0(r3) -/* 80339AE8 00336A28 4E 80 00 20 */ blr diff --git a/asm/JSupport/JSUList.s b/asm/JSupport/JSUList.s deleted file mode 100644 index dc797e35360..00000000000 --- a/asm/JSupport/JSUList.s +++ /dev/null @@ -1,3 +0,0 @@ -.include "macros.inc" - -.section .text, "ax" # 802dbdfc diff --git a/asm/SComponent/c/API/controller/c_API_controller_pad.s b/asm/SComponent/c/API/controller/c_API_controller_pad.s deleted file mode 100644 index b0997011591..00000000000 --- a/asm/SComponent/c/API/controller/c_API_controller_pad.s +++ /dev/null @@ -1,26 +0,0 @@ -.include "macros.inc" - -.section .text, "ax" # 8026328c - - -.global cAPICPad_recalibrate -cAPICPad_recalibrate: -/* 8026328C 002601CC 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80263290 002601D0 7C 08 02 A6 */ mflr r0 -/* 80263294 002601D4 90 01 00 14 */ stw r0, 0x14(r1) -/* 80263298 002601D8 4B DA 4A DD */ bl recalibrate__8mDoCPd_cFv -/* 8026329C 002601DC 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802632A0 002601E0 7C 08 03 A6 */ mtlr r0 -/* 802632A4 002601E4 38 21 00 10 */ addi r1, r1, 0x10 -/* 802632A8 002601E8 4E 80 00 20 */ blr - -.global cAPICPad_ANY_BUTTON -cAPICPad_ANY_BUTTON: -/* 802632AC 002601EC 54 64 30 32 */ slwi r4, r3, 6 -/* 802632B0 002601F0 3C 60 80 3E */ lis r3, m_cpadInfo@ha -/* 802632B4 002601F4 38 03 D2 E8 */ addi r0, r3, m_cpadInfo@l -/* 802632B8 002601F8 7C 60 22 14 */ add r3, r0, r4 -/* 802632BC 002601FC 80 03 00 34 */ lwz r0, 0x34(r3) -/* 802632C0 00260200 70 03 13 00 */ andi. r3, r0, 0x1300 -/* 802632C4 00260204 4E 80 00 20 */ blr - diff --git a/asm/Z2AudioLib/Z2SpeechMgr2.s b/asm/Z2AudioLib/Z2SpeechMgr2.s index 74807466766..6e108be2fda 100644 --- a/asm/Z2AudioLib/Z2SpeechMgr2.s +++ b/asm/Z2AudioLib/Z2SpeechMgr2.s @@ -16,7 +16,7 @@ Z2SpeechMgr2: /* 802CBC80 002C8BC0 90 03 00 04 */ stw r0, 4(r3) /* 802CBC84 002C8BC4 38 7F 00 08 */ addi r3, r31, 8 /* 802CBC88 002C8BC8 38 80 00 00 */ li r4, 0 -/* 802CBC8C 002C8BCC 48 06 DE 59 */ bl JMath_NS_TRandom_fast_ +/* 802CBC8C 002C8BCC 48 06 DE 59 */ bl __ct__Q25JMath13TRandom_fast_FUl /* 802CBC90 002C8BD0 38 7F 00 0C */ addi r3, r31, 0xc /* 802CBC94 002C8BD4 48 00 13 25 */ bl Z2SpeechStarter /* 802CBC98 002C8BD8 38 00 00 00 */ li r0, 0 diff --git a/asm/d/file/d_file_select.s b/asm/d/file/d_file_select.s index ec6e75a76d8..86c8b747386 100644 --- a/asm/d/file/d_file_select.s +++ b/asm/d/file/d_file_select.s @@ -8132,7 +8132,7 @@ lbl_8018AD20: /* 8018AD5C 00187C9C B0 1F 03 AC */ sth r0, 0x3ac(r31) lbl_8018AD60: /* 8018AD60 00187CA0 38 60 00 00 */ li r3, 0 -/* 8018AD64 00187CA4 48 0D 85 49 */ bl cAPICPad_ANY_BUTTON +/* 8018AD64 00187CA4 48 0D 85 49 */ bl cAPICPad_ANY_BUTTON__FUl /* 8018AD68 00187CA8 28 03 00 00 */ cmplwi r3, 0 /* 8018AD6C 00187CAC 40 82 00 10 */ bne lbl_8018AD7C /* 8018AD70 00187CB0 A8 1F 03 AC */ lha r0, 0x3ac(r31) @@ -12180,7 +12180,7 @@ lbl_8018E928: /* 8018E948 0018B888 93 E1 00 0C */ stw r31, 0xc(r1) /* 8018E94C 0018B88C 7C 7F 1B 78 */ mr r31, r3 /* 8018E950 0018B890 38 60 00 00 */ li r3, 0 -/* 8018E954 0018B894 48 0D 49 59 */ bl cAPICPad_ANY_BUTTON +/* 8018E954 0018B894 48 0D 49 59 */ bl cAPICPad_ANY_BUTTON__FUl /* 8018E958 0018B898 28 03 00 00 */ cmplwi r3, 0 /* 8018E95C 0018B89C 41 82 00 40 */ beq lbl_8018E99C /* 8018E960 0018B8A0 3C 60 80 43 */ lis r3, lbl_80430188@ha diff --git a/asm/d/menu/d_menu_save.s b/asm/d/menu/d_menu_save.s index 7b219acb10e..0b8e23336fe 100644 --- a/asm/d/menu/d_menu_save.s +++ b/asm/d/menu/d_menu_save.s @@ -2395,7 +2395,7 @@ lbl_801F1908: /* 801F1928 001EE868 93 E1 00 0C */ stw r31, 0xc(r1) /* 801F192C 001EE86C 7C 7F 1B 78 */ mr r31, r3 /* 801F1930 001EE870 38 60 00 00 */ li r3, 0 -/* 801F1934 001EE874 48 07 19 79 */ bl cAPICPad_ANY_BUTTON +/* 801F1934 001EE874 48 07 19 79 */ bl cAPICPad_ANY_BUTTON__FUl /* 801F1938 001EE878 28 03 00 00 */ cmplwi r3, 0 /* 801F193C 001EE87C 41 82 00 58 */ beq lbl_801F1994 /* 801F1940 001EE880 3C 60 80 43 */ lis r3, lbl_80430188@ha diff --git a/asm/d/save/d_save_init.s b/asm/d/save/d_save_init.s deleted file mode 100644 index 966388af66a..00000000000 --- a/asm/d/save/d_save_init.s +++ /dev/null @@ -1,9 +0,0 @@ -.include "macros.inc" - -.section .text, "ax" # 80035c88 - - -.global setInitEventBit -setInitEventBit: -/* 80035C88 00032BC8 4E 80 00 20 */ blr - diff --git a/asm/m/Do/m_Do_machine.s b/asm/m/Do/m_Do_machine.s index f6782f536d0..bb8b7893d72 100644 --- a/asm/m/Do/m_Do_machine.s +++ b/asm/m/Do/m_Do_machine.s @@ -448,7 +448,7 @@ myExceptionCallback: /* 8000B7DC 0000871C 90 8D 85 94 */ stw r4, lbl_80450B14-_SDA_BASE_(r13) /* 8000B7E0 00008720 90 6D 85 90 */ stw r3, lbl_80450B10-_SDA_BASE_(r13) /* 8000B7E4 00008724 4B FF B0 BD */ bl OSReportEnable -/* 8000B7E8 00008728 48 25 7A A5 */ bl cAPICPad_recalibrate +/* 8000B7E8 00008728 48 25 7A A5 */ bl cAPICPad_recalibrate__Fv /* 8000B7EC 0000872C 3C 60 80 37 */ lis r3, lbl_80373DE8@ha /* 8000B7F0 00008730 38 63 3D E8 */ addi r3, r3, lbl_80373DE8@l /* 8000B7F4 00008734 38 63 01 19 */ addi r3, r3, 0x119 diff --git a/include/JSystem/JAudio2/JAUClusterSound/JAUClusterSound.h b/include/JSystem/JAudio2/JAUClusterSound/JAUClusterSound.h index 6048eec2ae4..918035371d4 100644 --- a/include/JSystem/JAudio2/JAUClusterSound/JAUClusterSound.h +++ b/include/JSystem/JAudio2/JAUClusterSound/JAUClusterSound.h @@ -1,8 +1,12 @@ #ifndef JAUCLUSTERSOUND_H_ #define JAUCLUSTERSOUND_H_ -#include "global.h" +#include "dolphin/types.h" -struct JAISoundHandle {}; +struct JAISoundHandle { + void* unk; // probably JAISound* + + JAISoundHandle(); +}; #endif \ No newline at end of file diff --git a/include/JSystem/JMath/random.h b/include/JSystem/JMath/random.h new file mode 100644 index 00000000000..ffe0f3b1419 --- /dev/null +++ b/include/JSystem/JMath/random.h @@ -0,0 +1,19 @@ +#ifndef __JSYSTEM_JMATH_RANDOM_H__ +#define __JSYSTEM_JMATH_RANDOM_H__ + +#include "dolphin/types.h" + +namespace JMath { +struct TRandom_fast_ { + u32 value; + + TRandom_fast_(u32 value); +}; +} // namespace JMath + +// needed for Z2Calc.cpp +extern "C" { +void __ct__Q25JMath13TRandom_fast_FUl(JMath::TRandom_fast_*, u32); +}; + +#endif \ No newline at end of file diff --git a/include/SComponent/c_API_controller_pad.h b/include/SComponent/c_API_controller_pad.h new file mode 100644 index 00000000000..b200ba825b2 --- /dev/null +++ b/include/SComponent/c_API_controller_pad.h @@ -0,0 +1,37 @@ +#ifndef __C_API_CONTROLLER_PAD__ +#define __C_API_CONTROLLER_PAD__ + +#include "global.h" + +struct interface_of_controller_pad { + f32 mMainStickPosX; + f32 mMainStickPosY; + f32 mMainStickValue; + s16 mMainStickAngle; + u8 field_0xe; + u8 field_0xf; + f32 mCStickPosX; + f32 mCStickPosY; + f32 mCStickValue; + s16 mCStickAngle; + u8 field_0x1e; + u8 field_0x1f; + f32 mAnalogA; + f32 mAnalogB; + f32 mTriggerLeft; + f32 mTriggerRight; + u32 mButtonFlags; + u32 mPressedButtonFlags; + s8 mGamepadErrorFlags; + u8 field_0x39; + u8 field_0x3a; + u8 field_0x3b; + u8 field_0x3c; + u8 field_0x3d; + u8 field_0x3e; + u8 field_0x3f; +}; + +void cAPICPad_recalibrate(void); + +#endif \ No newline at end of file diff --git a/include/Z2AudioLib/Z2Calc/asm/func_802A98D4.s b/include/Z2AudioLib/Z2Calc/asm/func_802A98D4.s index b45098ff846..5f793720492 100644 --- a/include/Z2AudioLib/Z2Calc/asm/func_802A98D4.s +++ b/include/Z2AudioLib/Z2Calc/asm/func_802A98D4.s @@ -6,7 +6,7 @@ /* 802A98E8 002A6828 40 82 00 18 */ bne lbl_802A9900 /* 802A98EC 002A682C 38 6D 8D B4 */ subi r3, r13, 0x724c /* 802A98F0 002A6830 38 80 00 00 */ li r4, 0 -/* 802A98F4 002A6834 48 09 01 F1 */ bl JMath_NS_TRandom_fast_ +/* 802A98F4 002A6834 48 09 01 F1 */ bl __ct__Q25JMath13TRandom_fast_FUl /* 802A98F8 002A6838 38 00 00 01 */ li r0, 1 /* 802A98FC 002A683C 98 0D 8D B0 */ stb r0, lbl_80451330-_SDA_BASE_(r13) lbl_802A9900: diff --git a/include/Z2AudioLib/Z2SeMgr/Z2SeMgr.h b/include/Z2AudioLib/Z2SeMgr/Z2SeMgr.h index 1744b17b771..b722ceeb37c 100644 --- a/include/Z2AudioLib/Z2SeMgr/Z2SeMgr.h +++ b/include/Z2AudioLib/Z2SeMgr/Z2SeMgr.h @@ -76,6 +76,8 @@ void registMultiSePos__12Z2MultiSeMgrFP3Vec(Vec*); void resetMultiSePos__12Z2MultiSeMgrFv(void); float getPanPower__12Z2MultiSeMgrFv(void); float getDolbyPower__12Z2MultiSeMgrFv(void); + +void __ct__14JAISoundHandleFv(void); } extern Z2SeMgr* lbl_80450B88; // Z2SeMgr sInstance diff --git a/include/Z2AudioLib/Z2SeMgr/asm/func_802AB64C.s b/include/Z2AudioLib/Z2SeMgr/asm/func_802AB64C.s index e047f08c651..038eacedfd6 100644 --- a/include/Z2AudioLib/Z2SeMgr/asm/func_802AB64C.s +++ b/include/Z2AudioLib/Z2SeMgr/asm/func_802AB64C.s @@ -4,8 +4,8 @@ /* 802AB658 002A8598 93 E1 00 0C */ stw r31, 0xc(r1) /* 802AB65C 002A859C 7C 7F 1B 78 */ mr r31, r3 /* 802AB660 002A85A0 93 ED 86 08 */ stw r31, lbl_80450B88-_SDA_BASE_(r13) -/* 802AB664 002A85A4 3C 80 80 2A */ lis r4, JAISoundHandle@ha -/* 802AB668 002A85A8 38 84 4A C4 */ addi r4, r4, JAISoundHandle@l +/* 802AB664 002A85A4 3C 80 80 2A */ lis r4, __ct__14JAISoundHandleFv@ha +/* 802AB668 002A85A8 38 84 4A C4 */ addi r4, r4, __ct__14JAISoundHandleFv@l /* 802AB66C 002A85AC 3C A0 80 00 */ lis r5, JAISoundHandle_NS_dtor@ha /* 802AB670 002A85B0 38 A5 78 38 */ addi r5, r5, JAISoundHandle_NS_dtor@l /* 802AB674 002A85B4 38 C0 00 04 */ li r6, 4 diff --git a/include/d/d_lib/d_lib.h b/include/d/d_lib/d_lib.h index bc7e249f2c8..a0ca4366c36 100644 --- a/include/d/d_lib/d_lib.h +++ b/include/d/d_lib/d_lib.h @@ -1,5 +1,6 @@ #include "JSystem/JKernel/JKRAramArchive/JKRAramArchive.h" #include "SComponent/c_xyz.h" +#include "f/f_op/f_op_actor.h" #include "global.h" struct STControl_vtable { @@ -56,8 +57,6 @@ struct CSTControl { u32 dLib_getEventSwitchNo(int param_1); -struct fopAc_ac_c; - bool dLib_checkActorInRectangle(fopAc_ac_c* param_1, fopAc_ac_c* param_2, cXyz const* param_3, cXyz const* param_4); diff --git a/include/d/d_save/d_save_init/d_save_init.h b/include/d/d_save/d_save_init/d_save_init.h new file mode 100644 index 00000000000..ec2217cee53 --- /dev/null +++ b/include/d/d_save/d_save_init/d_save_init.h @@ -0,0 +1,8 @@ +#ifndef __D_SAVE_INIT_H__ +#define __D_SAVE_INIT_H__ + +extern "C" { +void setInitEventBit(); +} + +#endif \ No newline at end of file diff --git a/include/functions.h b/include/functions.h index ce2b01f85fa..9db64d5c199 100644 --- a/include/functions.h +++ b/include/functions.h @@ -505,7 +505,7 @@ void DVDReadDir(void); class mDoCPd_c; extern "C" { -void cAPICPad_recalibrate(void); +void mDoCPd_c_NS_recalibrate(void); } // JSystem/JSupport/JSUList @@ -705,7 +705,6 @@ void func_8036C740(void); void func_8036C780(void); void getRandom_0_1__6Z2CalcFv(void); void getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign(void); -void JMath_NS_TRandom_fast_(void); } // d_a_horse_static diff --git a/include/m_Do/m_Do_controller_pad/m_Do_controller_pad.h b/include/m_Do/m_Do_controller_pad/m_Do_controller_pad.h index fd4d7d0b6a1..05b8f1d7731 100644 --- a/include/m_Do/m_Do_controller_pad/m_Do_controller_pad.h +++ b/include/m_Do/m_Do_controller_pad/m_Do_controller_pad.h @@ -2,7 +2,10 @@ #define __M_DO_CONTROLLER_PAD_H_ #include "JSystem/JUtility/JUTGamePad/JUTGamePad.h" -#include "global.h" +#include "SComponent/c_API_controller_pad.h" + +extern JUTGamePad* lbl_803DD2D8[4]; // m_Do_controller_pad::mDoCPd_c::m_gamePad +extern interface_of_controller_pad m_cpadInfo[4]; // m_Do_controller_pad::mDoCPd_c::m_cpadInfo struct g_HIO_struct { u32 field_0x0; @@ -66,49 +69,12 @@ struct g_HIO_struct { u8 field_0x43; }; -struct interface_of_controller_pad { - float stick_x; - float stick_y; - float length_from_neutral; - s16 controlStick_angle; - u8 field_0xe; - u8 field_0xf; - float cStick_x; - float cStick_y; - float cStick_length_from_neutral; - s16 cStick_angle; - u8 field_0x1e; - u8 field_0x1f; - float analog_a; - float analog_b; - float trigger_left; - float trigger_right; - u32 button_flags; - u32 field_0x34; - s8 error_value; - bool field_0x39; - bool field_0x3a; - bool field_0x3b; - bool field_0x3c; -}; - -struct cpadInfo { - interface_of_controller_pad interface; - cpadInfo* unk1; - f32 stickValue; - s16 stickAngle; - u8 p2[0x8]; - f32 CstickValue; - s16 CstickAngle; - u8 p3[0xE2]; -}; - struct mDoCPd_c { void create(); void read(); static void convert(interface_of_controller_pad* controllerInteface, JUTGamePad* gamePad); static void LRlockCheck(interface_of_controller_pad* controllerInterface); - void recalibrate(void); + static void recalibrate(void); JUTGamePad* gamePad; }; diff --git a/include/os/OS.h b/include/os/OS.h index de2a2191e3b..8af2c821a11 100644 --- a/include/os/OS.h +++ b/include/os/OS.h @@ -4,6 +4,8 @@ #ifndef __OS_H__ #define __OS_H__ +#include "dolphin/types.h" + /* TODO: more structs, and get rid of the ones that are faked! */ struct OSMutex { diff --git a/include/variables.h b/include/variables.h index 0a02af6bcec..1fb1e4445c6 100644 --- a/include/variables.h +++ b/include/variables.h @@ -10,8 +10,6 @@ extern char lbl_803739A0[0x310]; extern void* lbl_80451368; extern u32 _sRumbleSupported; extern u8 lbl_803C3384; -struct cpadInfo; -extern cpadInfo m_cpadInfo; extern u8 lbl_803A2EF4; extern u8 lbl_803A2EE0; extern u8 lbl_80450B19; diff --git a/libs/JSystem/JAudio2/JAUClusterSound.cpp b/libs/JSystem/JAudio2/JAUClusterSound.cpp index 4bf93c8658d..0d868243519 100644 --- a/libs/JSystem/JAudio2/JAUClusterSound.cpp +++ b/libs/JSystem/JAudio2/JAUClusterSound.cpp @@ -1 +1,5 @@ -// ok +#include "JSystem/JAudio2/JAUClusterSound/JAUClusterSound.h" + +JAISoundHandle::JAISoundHandle() { + this->unk = NULL; +} \ No newline at end of file diff --git a/libs/JSystem/JMath/random.cpp b/libs/JSystem/JMath/random.cpp index 4bf93c8658d..e23de54a1f4 100644 --- a/libs/JSystem/JMath/random.cpp +++ b/libs/JSystem/JMath/random.cpp @@ -1 +1,5 @@ -// ok +#include "JSystem/JMath/random.h" + +JMath::TRandom_fast_::TRandom_fast_(u32 value) { + this->value = value; +} \ No newline at end of file diff --git a/libs/SSystem/SComponent/c_API_controller_pad.cpp b/libs/SSystem/SComponent/c_API_controller_pad.cpp index 4bf93c8658d..537c488030e 100644 --- a/libs/SSystem/SComponent/c_API_controller_pad.cpp +++ b/libs/SSystem/SComponent/c_API_controller_pad.cpp @@ -1 +1,11 @@ -// ok +#include "SComponent/c_API_controller_pad.h" +#include "m_Do/m_Do_controller_pad/m_Do_controller_pad.h" + +void cAPICPad_recalibrate() { + mDoCPd_c::recalibrate(); +} + +u32 cAPICPad_ANY_BUTTON(u32 pPadId) { + interface_of_controller_pad* pad = &m_cpadInfo[pPadId]; + return pad->mPressedButtonFlags & 0x1300; // TODO: flag +} diff --git a/libs/Z2AudioLib/Z2Calc.cpp b/libs/Z2AudioLib/Z2Calc.cpp index 4ea0436fb3b..27985db4b34 100644 --- a/libs/Z2AudioLib/Z2Calc.cpp +++ b/libs/Z2AudioLib/Z2Calc.cpp @@ -1,4 +1,5 @@ #include "Z2AudioLib/Z2Calc/Z2calc.h" +#include "JSystem/JMath/random.h" // 1 instruction off #ifdef NONMATCHING diff --git a/obj_files.mk b/obj_files.mk index 4874cf065ea..94bb84056f4 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -88,7 +88,7 @@ TEXT_O_FILES := \ $(BUILD_DIR)/src/d/d_bomb.o \ $(BUILD_DIR)/src/d/d_lib.o \ $(BUILD_DIR)/src/d/d_save/d_save.o \ - $(BUILD_DIR)/asm/d/save/d_save_init.o \ + $(BUILD_DIR)/src/d/d_save/d_save_init.o \ $(BUILD_DIR)/asm/d/jnt/d_jnt_col.o \ $(BUILD_DIR)/asm/d/a/d_a_obj.o \ $(BUILD_DIR)/asm/d/a/itembase/d_a_itembase_static.o \ @@ -240,7 +240,7 @@ TEXT_O_FILES := \ $(BUILD_DIR)/asm/d/k/d_k_wpillar.o \ $(BUILD_DIR)/asm/DynamicLink.o \ $(BUILD_DIR)/asm/SComponent/c/c_malloc.o \ - $(BUILD_DIR)/asm/SComponent/c/API/controller/c_API_controller_pad.o \ + $(BUILD_DIR)/libs/SSystem/SComponent/c_API_controller_pad.o \ $(BUILD_DIR)/asm/SComponent/c/API/c_API_graphic.o \ $(BUILD_DIR)/asm/SComponent/c/cc/c_cc_d.o \ $(BUILD_DIR)/asm/SComponent/c/cc/c_cc_s.o \ @@ -384,7 +384,7 @@ TEXT_O_FILES := \ $(BUILD_DIR)/asm/JAudio2/JAUAudioArcLoader.o \ $(BUILD_DIR)/asm/JAudio2/JAUAudioMgr.o \ $(BUILD_DIR)/asm/JAudio2/JAUBankTable.o \ - $(BUILD_DIR)/asm/JAudio2/JAUClusterSound.o \ + $(BUILD_DIR)/libs/JSystem/JAudio2/JAUClusterSound.o \ $(BUILD_DIR)/asm/JAudio2/JAUInitializer.o \ $(BUILD_DIR)/asm/JAudio2/JAUSectionHeap.o \ $(BUILD_DIR)/asm/JAudio2/JAUSeqCollection.o \ @@ -459,7 +459,6 @@ TEXT_O_FILES := \ $(BUILD_DIR)/libs/JSystem/JKernel/JKRDvdAramRipper.o \ $(BUILD_DIR)/asm/JKernel/JKRDvdAramRipper.o \ $(BUILD_DIR)/libs/JSystem/JKernel/JKRDecomp.o \ - $(BUILD_DIR)/asm/JSupport/JSUList.o \ $(BUILD_DIR)/libs/JSystem/JSupport/JSUList.o \ $(BUILD_DIR)/asm/JSupport/JSUInputStream.o \ $(BUILD_DIR)/asm/JSupport/JSUMemoryStream.o \ @@ -540,7 +539,7 @@ TEXT_O_FILES := \ $(BUILD_DIR)/asm/J3DGraphLoader/J3DShapeFactory.o \ $(BUILD_DIR)/asm/J3DGraphLoader/J3DAnmLoader.o \ $(BUILD_DIR)/asm/JMath/JMath.o \ - $(BUILD_DIR)/asm/JMath/random.o \ + $(BUILD_DIR)/libs/JSystem/JMath/random.o \ $(BUILD_DIR)/asm/JMath/JMATrigonometric.o \ $(BUILD_DIR)/asm/base/PPCArch.o \ $(BUILD_DIR)/asm/os/OS.o \ diff --git a/src/d/d_a/d_a_alink.cpp b/src/d/d_a/d_a_alink.cpp index fe0e09956fc..1c71ed79426 100644 --- a/src/d/d_a/d_a_alink.cpp +++ b/src/d/d_a/d_a_alink.cpp @@ -6,6 +6,7 @@ #include "Z2AudioLib/Z2SeqMgr/Z2SeqMgr.h" #include "f/f_pc/f_pc_manager.h" #include "f/f_pc/f_pc_searcher.h" +#include "m_Do/m_Do_controller_pad/m_Do_controller_pad.h" u32 daAlink_c::getE3Zhint(void) { return 0; diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index f84860ad825..f64c11b78c1 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -5,6 +5,7 @@ #include "d/d_com/d_com_inf_game/d_com_inf_game.h" #include "f/f_pc/f_pc_searcher.h" #include "global.h" +#include "m_Do/m_Do_controller_pad/m_Do_controller_pad.h" extern "C" { // padLockButton__25@unnamed@d_attention_cpp@Fl diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index 5c7148f9e2b..45c0cb84bc3 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -7,6 +7,7 @@ #include "d/d_com/d_com_inf_game/d_com_inf_game.h" #include "f/f_pc/f_pc_searcher.h" #include "global.h" +#include "m_Do/m_Do_controller_pad/m_Do_controller_pad.h" extern "C" { // limitf__22@unnamed@d_camera_cpp@Ffff diff --git a/src/d/d_lib.cpp b/src/d/d_lib.cpp index a341f4a5561..6e4faf05759 100644 --- a/src/d/d_lib.cpp +++ b/src/d/d_lib.cpp @@ -1,6 +1,7 @@ #include "d/d_lib/d_lib.h" #include "JSystem/JUtility/JUTGamePad/JUTGamePad.h" #include "d/d_event/d_event/d_event.h" +#include "global.h" #include "m_Do/m_Do_controller_pad/m_Do_controller_pad.h" #include "os/OS.h" @@ -63,19 +64,19 @@ asm void STControl::Yinit(void) { #endif double STControl::getValueStick() { - return m_cpadInfo.interface.length_from_neutral; + return (double)m_cpadInfo[0].mMainStickValue; } s16 STControl::getAngleStick() { - return m_cpadInfo.interface.controlStick_angle; + return m_cpadInfo[0].mMainStickAngle; } double CSTControl::getValueStick() { - return m_cpadInfo.interface.cStick_length_from_neutral; + return (double)m_cpadInfo[0].mCStickValue; } s16 CSTControl::getAngleStick() { - return m_cpadInfo.interface.cStick_angle; + return m_cpadInfo[0].mCStickAngle; } asm u32 STControl::checkTrigger() { diff --git a/src/d/d_meter/d_meter_map.cpp b/src/d/d_meter/d_meter_map.cpp index 0987b7bc1a7..0b80e488596 100644 --- a/src/d/d_meter/d_meter_map.cpp +++ b/src/d/d_meter/d_meter_map.cpp @@ -3,6 +3,7 @@ #include "Z2AudioLib/Z2SeMgr/Z2SeMgr.h" #include "d/d_com/d_com_inf_game/d_com_inf_game.h" #include "global.h" +#include "m_Do/m_Do_controller_pad/m_Do_controller_pad.h" extern "C" { // isEnableDispMap__11dMeterMap_cFv diff --git a/src/d/d_save/d_save.cpp b/src/d/d_save/d_save.cpp index 146a8d9411a..731b006853f 100644 --- a/src/d/d_save/d_save.cpp +++ b/src/d/d_save/d_save.cpp @@ -1,6 +1,7 @@ #include "d/d_save/d_save/d_save.h" #include "d/d_com/d_com_inf_game/d_com_inf_game.h" +#include "d/d_save/d_save_init/d_save_init.h" #include "os/OS.h" u8 dSv_item_rename(u8 item_id) { diff --git a/src/d/d_save/d_save_init.cpp b/src/d/d_save/d_save_init.cpp index 4bf93c8658d..a6abb16008a 100644 --- a/src/d/d_save/d_save_init.cpp +++ b/src/d/d_save/d_save_init.cpp @@ -1 +1,5 @@ -// ok +#include "d/d_save/d_save_init/d_save_init.h" + +void setInitEventBit() { + return; +} \ No newline at end of file diff --git a/src/m_Do/m_Do_Reset.cpp b/src/m_Do/m_Do_Reset.cpp index fc2e52f7936..cd4123a5958 100644 --- a/src/m_Do/m_Do_Reset.cpp +++ b/src/m_Do/m_Do_Reset.cpp @@ -1,5 +1,6 @@ #include "m_Do/m_Do_reset/m_Do_reset.h" #include "JSystem/JUtility/JUTXfb/JUTXfb.h" +#include "SComponent/c_API_controller_pad.h" #include "dvd/dvd.h" #include "global.h" diff --git a/src/m_Do/m_Do_controller_pad.cpp b/src/m_Do/m_Do_controller_pad.cpp index a79db0473e1..649bd560444 100644 --- a/src/m_Do/m_Do_controller_pad.cpp +++ b/src/m_Do/m_Do_controller_pad.cpp @@ -6,6 +6,7 @@ #include "pad/pad.h" #ifdef NONMATCHING +// TODO: change the cpadinfo stuff to use the new type of m_cpadInfo void mDoCPd_c::create() { JUTGamePad* JUTGamePad_ptr; cpadInfo* m_cpadInfo_addr; diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index 46c3e9ac4bc..3d0babdfa87 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -1,4 +1,5 @@ #include "m_Do/m_Do_main/m_Do_main.h" +#include "SComponent/c_API_controller_pad.h" #include "d/d_com/d_com_inf_game/d_com_inf_game.h" #include "dvd/dvd.h" #include "global.h"