mirror of
https://github.com/zeldaret/tp
synced 2026-06-11 21:19:01 -04:00
decomp some small files, do some cleanup (#42)
* remove leftover asm: JSUList.s * d_save_init: decomp * JMath/random: decomp * J3DUDL: fixup label * JAUClusterSound: decomp * c_API_controller_pad: decomp, elaborate globals/types * clang-format * don't add guards to functions.h * semantic merge of m_cpadInfo stuff * fix undef symbols Co-authored-by: Pheenoh <pheenoh@gmail.com>
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef __D_SAVE_INIT_H__
|
||||
#define __D_SAVE_INIT_H__
|
||||
|
||||
extern "C" {
|
||||
void setInitEventBit();
|
||||
}
|
||||
|
||||
#endif
|
||||
+1
-2
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user