m_Re_controller_pad mostly matching (#3099)

* Move m_Re_controller_pad to m_Re/

* m_Re_controller_pad mostly matching
This commit is contained in:
Max Roncace 2026-02-13 18:15:42 -05:00 committed by GitHub
parent 0b1cb89d69
commit 1273e633f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 1886 additions and 415 deletions

View File

@ -52,19 +52,19 @@ m_Do/m_Do_audio.cpp:
.data start:0x803BD770 end:0x803BD9E8
.bss start:0x8040C0E0 end:0x8040D498
.sdata start:0x804F78B8 end:0x804F7924
.sbss start:0x804FA92C end:0x804FA97C
.sbss start:0x804FA92C end:0x804FA978
m_Do/m_Do_controller_pad.cpp:
.text start:0x8000B698 end:0x8000BAA8
.bss start:0x8040D498 end:0x8040D5A8
.sdata2 start:0x804FBB90 end:0x804FBBA8
m_Do/m_Re_controller_pad.cpp:
m_Re/m_Re_controller_pad.cpp:
.text start:0x8000BAA8 end:0x8000F56C
.rodata start:0x803962C0 end:0x80396310
.data start:0x803BD9E8 end:0x803BDA00
.bss start:0x8040D5A8 end:0x80414E58
.sbss start:0x804FA97C end:0x804FA988
.sbss start:0x804FA978 end:0x804FA988
.sdata2 start:0x804FBBA8 end:0x804FBC50
m_Do/m_Do_graphic.cpp:

View File

@ -26912,7 +26912,7 @@ sInstance__33JASGlobalInstance<12JAUSoundInfo> = .sbss:0x804FA964; // type:objec
sInstance__32JASGlobalInstance<11Z2SoundInfo> = .sbss:0x804FA968; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__34JASGlobalInstance<13Z2SoundObjMgr> = .sbss:0x804FA96C; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__32JASGlobalInstance<11Z2FxLineMgr> = .sbss:0x804FA970; // type:object size:0x4 scope:global align:4 data:4byte
lbl_804FA978 = .sbss:0x804FA978; // type:object size:0x1 data:byte
l_reset_requested = .sbss:0x804FA978; // type:object size:0x1 data:byte
m_cal_value__6mReCPd = .sbss:0x804FA97C; // type:object size:0x4 scope:global align:4 data:4byte
wpad_heap = .sbss:0x804FA980; // type:object size:0x4 scope:global align:4 data:4byte
mFader__13mDoGph_gInf_c = .sbss:0x804FA988; // type:object size:0x4 scope:global align:4 data:4byte

View File

@ -46,19 +46,19 @@ m_Do/m_Do_audio.cpp:
.data start:0x803F5BE0 end:0x803F5E58
.bss start:0x8044A6A0 end:0x8044BA50
.sdata start:0x805375C0 end:0x8053762C
.sbss start:0x8053A780 end:0x8053A7D4
.sbss start:0x8053A780 end:0x8053A7D0
m_Do/m_Do_controller_pad.cpp:
.text start:0x80009F54 end:0x8000A364
.bss start:0x8044BA50 end:0x8044BB60
.sdata2 start:0x8053BA28 end:0x8053BA40
m_Do/m_Re_controller_pad.cpp:
m_Re/m_Re_controller_pad.cpp:
.text start:0x8000A364 end:0x8000DD80
.rodata start:0x803CE400 end:0x803CE450
.data start:0x803F5E58 end:0x803F5E70
.bss start:0x8044BB60 end:0x80453410
.sbss start:0x8053A7D4 end:0x8053A7E0
.sbss start:0x8053A7D0 end:0x8053A7E0
.sdata2 start:0x8053BA40 end:0x8053BAE8
m_Do/m_Do_graphic.cpp:

View File

@ -28080,7 +28080,7 @@ sInstance__33JASGlobalInstance<12JAUSoundInfo> = .sbss:0x8053A7BC; // type:objec
sInstance__32JASGlobalInstance<11Z2SoundInfo> = .sbss:0x8053A7C0; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__34JASGlobalInstance<13Z2SoundObjMgr> = .sbss:0x8053A7C4; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__32JASGlobalInstance<11Z2FxLineMgr> = .sbss:0x8053A7C8; // type:object size:0x4 scope:global align:4 data:4byte
lbl_8053A7D0 = .sbss:0x8053A7D0; // type:object size:0x1 data:byte
l_reset_requested = .sbss:0x8053A7D0; // type:object size:0x1 data:byte
m_cal_value__6mReCPd = .sbss:0x8053A7D4; // type:object size:0x4 scope:global align:4 data:4byte
wpad_heap = .sbss:0x8053A7D8; // type:object size:0x4 scope:global align:4 data:4byte
mFader__13mDoGph_gInf_c = .sbss:0x8053A7E0; // type:object size:0x4 scope:global align:4 data:4byte

View File

@ -47,19 +47,19 @@ m_Do/m_Do_audio.cpp:
.data start:0x803E0E70 end:0x803E10E8
.bss start:0x80431CA0 end:0x80433058
.sdata start:0x8051D660 end:0x8051D6CC
.sbss start:0x80520780 end:0x805207D4
.sbss start:0x80520780 end:0x805207D0
m_Do/m_Do_controller_pad.cpp:
.text start:0x8000A0E0 end:0x8000A4F0
.bss start:0x80433058 end:0x80433168
.sdata2 start:0x80521A28 end:0x80521A40
m_Do/m_Re_controller_pad.cpp:
m_Re/m_Re_controller_pad.cpp:
.text start:0x8000A4F0 end:0x8000DF0C
.rodata start:0x803B8E40 end:0x803B8E90
.data start:0x803E10E8 end:0x803E1100
.bss start:0x80433168 end:0x8043AA18
.sbss start:0x805207D4 end:0x805207E0
.sbss start:0x805207D0 end:0x805207E0
.sdata2 start:0x80521A40 end:0x80521AE8
m_Do/m_Do_graphic.cpp:

View File

@ -27604,7 +27604,7 @@ sInstance__33JASGlobalInstance<12JAUSoundInfo> = .sbss:0x805207BC; // type:objec
sInstance__32JASGlobalInstance<11Z2SoundInfo> = .sbss:0x805207C0; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__34JASGlobalInstance<13Z2SoundObjMgr> = .sbss:0x805207C4; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__32JASGlobalInstance<11Z2FxLineMgr> = .sbss:0x805207C8; // type:object size:0x4 scope:global align:4 data:4byte
lbl_805207D0 = .sbss:0x805207D0; // type:object size:0x1 data:byte
l_reset_requested = .sbss:0x805207D0; // type:object size:0x1 data:byte
m_cal_value__6mReCPd = .sbss:0x805207D4; // type:object size:0x4 scope:global align:4 data:4byte
wpad_heap = .sbss:0x805207D8; // type:object size:0x4 scope:global align:4 data:4byte
mFader__13mDoGph_gInf_c = .sbss:0x805207E0; // type:object size:0x4 scope:global align:4 data:4byte

View File

@ -47,19 +47,19 @@ m_Do/m_Do_audio.cpp:
.data start:0x803DEE30 end:0x803DF0A8
.bss start:0x8042FB20 end:0x80430ED8
.sdata start:0x8051B4E0 end:0x8051B54C
.sbss start:0x8051E600 end:0x8051E654
.sbss start:0x8051E600 end:0x8051E650
m_Do/m_Do_controller_pad.cpp:
.text start:0x8000A0E0 end:0x8000A4F0
.bss start:0x80430ED8 end:0x80430FE8
.sdata2 start:0x8051F8A8 end:0x8051F8C0
m_Do/m_Re_controller_pad.cpp:
m_Re/m_Re_controller_pad.cpp:
.text start:0x8000A4F0 end:0x8000DF0C
.rodata start:0x803BA900 end:0x803BA950
.data start:0x803DF0A8 end:0x803DF0C0
.bss start:0x80430FE8 end:0x80438898
.sbss start:0x8051E654 end:0x8051E660
.sbss start:0x8051E650 end:0x8051E660
.sdata2 start:0x8051F8C0 end:0x8051F968
m_Do/m_Do_graphic.cpp:

View File

@ -27610,7 +27610,7 @@ sInstance__33JASGlobalInstance<12JAUSoundInfo> = .sbss:0x8051E63C; // type:objec
sInstance__32JASGlobalInstance<11Z2SoundInfo> = .sbss:0x8051E640; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__34JASGlobalInstance<13Z2SoundObjMgr> = .sbss:0x8051E644; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__32JASGlobalInstance<11Z2FxLineMgr> = .sbss:0x8051E648; // type:object size:0x4 scope:global align:4 data:4byte
lbl_8051E650 = .sbss:0x8051E650; // type:object size:0x1 data:byte
l_reset_requested = .sbss:0x8051E650; // type:object size:0x1 data:byte
m_cal_value__6mReCPd = .sbss:0x8051E654; // type:object size:0x4 scope:global align:4 data:4byte
wpad_heap = .sbss:0x8051E658; // type:object size:0x4 scope:global align:4 data:4byte
mFader__13mDoGph_gInf_c = .sbss:0x8051E660; // type:object size:0x4 scope:global align:4 data:4byte

View File

@ -47,19 +47,19 @@ m_Do/m_Do_audio.cpp:
.data start:0x803E1B90 end:0x803E1E08
.bss start:0x804325A0 end:0x80433958
.sdata start:0x8051DF60 end:0x8051DFCC
.sbss start:0x80520F40 end:0x80520F94
.sbss start:0x80520F40 end:0x80520F90
m_Do/m_Do_controller_pad.cpp:
.text start:0x8000A0A8 end:0x8000A4B8
.bss start:0x80433958 end:0x80433A68
.sdata2 start:0x805221E8 end:0x80522200
m_Do/m_Re_controller_pad.cpp:
m_Re/m_Re_controller_pad.cpp:
.text start:0x8000A4B8 end:0x8000DED4
.rodata start:0x803B92C0 end:0x803B9310
.data start:0x803E1E08 end:0x803E1E20
.bss start:0x80433A68 end:0x8043B318
.sbss start:0x80520F94 end:0x80520FA0
.sbss start:0x80520F90 end:0x80520FA0
.sdata2 start:0x80522200 end:0x805222A8
m_Do/m_Do_graphic.cpp:

View File

@ -27495,7 +27495,7 @@ sInstance__33JASGlobalInstance<12JAUSoundInfo> = .sbss:0x80520F7C; // type:objec
sInstance__32JASGlobalInstance<11Z2SoundInfo> = .sbss:0x80520F80; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__34JASGlobalInstance<13Z2SoundObjMgr> = .sbss:0x80520F84; // type:object size:0x4 scope:global align:4 data:4byte
sInstance__32JASGlobalInstance<11Z2FxLineMgr> = .sbss:0x80520F88; // type:object size:0x4 scope:global align:4 data:4byte
lbl_80520F90 = .sbss:0x80520F90; // type:object size:0x1 data:byte
l_reset_requested = .sbss:0x80520F90; // type:object size:0x1 data:byte
m_cal_value__6mReCPd = .sbss:0x80520F94; // type:object size:0x4 scope:global align:4 data:4byte
wpad_heap = .sbss:0x80520F98; // type:object size:0x4 scope:global align:4 data:4byte
mFader__13mDoGph_gInf_c = .sbss:0x80520FA0; // type:object size:0x4 scope:global align:4 data:4byte

View File

@ -25169,7 +25169,7 @@ sInstance__32JASGlobalInstance<11Z2StatusMgr> = .sbss:0x8050898C; // type:object
sInstance__31JASGlobalInstance<10Z2SceneMgr> = .sbss:0x80508990; // type:object size:0x4 scope:global data:4byte hash:0x8511856A dhash:0xF96D5E29
sInstance__28JASGlobalInstance<8Z2SeqMgr> = .sbss:0x80508994; // type:object size:0x4 scope:global data:4byte hash:0x1FD34E42 dhash:0xF7849050
sInstance__27JASGlobalInstance<7Z2SeMgr> = .sbss:0x80508998; // type:object size:0x4 scope:global data:4byte hash:0xD70A6533 dhash:0x234E9A61
lbl_805089A0 = .sbss:0x805089A0; // type:object size:0x1 data:byte hash:0x4F2572D1 dhash:0x542D9327
l_reset_requested = .sbss:0x805089A0; // type:object size:0x1 data:byte hash:0x4F2572D1 dhash:0x542D9327
m_cal_value__6mReCPd = .sbss:0x805089A4; // type:object size:0x4 scope:global data:4byte hash:0x93E53EB6 dhash:0x3F3CB220
wpad_heap = .sbss:0x805089A8; // type:object size:0x4 scope:global data:4byte hash:0x864CEC84
mFader__13mDoGph_gInf_c = .sbss:0x805089B0; // type:object size:0x4 scope:global data:4byte hash:0x794A05E2 dhash:0xFC47A8C0

View File

@ -587,7 +587,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_printf.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_audio.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_controller_pad.cpp"),
Object(NonMatching, "m_Do/m_Re_controller_pad.cpp"),
Object(NonMatching, "m_Re/m_Re_controller_pad.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_graphic.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_machine.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_mtx.cpp"),

View File

@ -1,7 +1,7 @@
#ifndef D_CURSOR_MNG_H
#define D_CURSOR_MNG_H
#include "m_Do/m_Re_controller_pad.h"
#include "m_Re/m_Re_controller_pad.h"
// TODO: putting this here until a more appropriate place is found
extern u8 data_8053a730;

View File

@ -4,6 +4,12 @@
#include <revolution/mtx.h>
#include <revolution/kpad.h>
#if PLATFORM_SHIELD
#define RECPD_SAMPLING_BUF_COUNT 16
#else
#define RECPD_SAMPLING_BUF_COUNT 10
#endif
class mReCPd {
public:
struct Pad {
@ -22,17 +28,18 @@ public:
/* 0xB50 */ u8 field_0xb50;
/* 0xB51 */ u8 field_0xb51;
/* 0xB54 */ f32 field_0xb54;
/* 0xB58 */ u8 field_0xB58[0xB68 - 0xB58];
/* 0xB58 */ Vec field_0xb58;
/* 0xB64 */ u32 field_0xb64;
/* 0xB68 */ Mtx field_0xb68;
/* 0xB98 */ f32 field_0xb98;
/* 0xB9C */ int field_0xb9c;
/* 0xBA0 */ f32 field_0xba0;
/* 0xBA4 */ f32 field_0xba4;
/* 0xBA8 */ u8 field_0xBA8[0xBAC - 0xBA8];
/* 0xBA8 */ u8 field_0xba8[0xBAC - 0xBA8];
/* 0xBAC */ int field_0xbac;
/* 0xBB0 */ f32 field_0xbb0;
/* 0xBB4 */ f32 field_0xbb4;
/* 0xBB8 */ u8 field_0xBB8[0xBBC - 0xBB8];
/* 0xBB8 */ u8 field_0xbb8[0xBBC - 0xBB8];
/* 0xBBC */ int field_0xbbc;
/* 0xBC0 */ int field_0xbc0;
};
@ -52,27 +59,29 @@ public:
void calcDpdPlayCirPos();
void calcDpdPlayBoxPos();
/* 0x0000 */ u32 field_0x0;
/* 0x0004 */ KPADStatus field_0x4[10];
/* 0x0000 */ int field_0x0;
#if PLATFORM_SHIELD
/* 0x0004 */ u8 unk_shield_0x04[0x8 - 0x4];
#endif
/* 0x0004 */ KPADStatus field_0x4[RECPD_SAMPLING_BUF_COUNT];
/* 0x0554 */ int field_0x554;
#if PLATFORM_SHIELD
/* 0x0558 */ u8 unk_shield_0x558[0x55c - 0x558];
#endif
/* 0x0558 */ KPADStatus field_0x558;
/* 0x05E0 */ Acc m_remAcc;
/* 0x11A4 */ Acc m_FSAcc;
/* 0x1D68 */ f32 m_stick3D;
/* 0x1D6C */ f32 field_0x1d6c;
/* 0x1D68 */ Vec2 m_stick3D;
/* 0x1D70 */ f32 m_stickValue;
/* 0x1D74 */ s16 m_stickAngle;
/* 0x1D76 */ s16 m_stick3DAngle;
/* 0x1D78 */ Vec2 field_0x1d78;
/* 0x1D80 */ Vec2 field_0x1d80;
/* 0x1D88 */ f32 field_0x1d88;
/* 0x1D8C */ f32 field_0x1d8c;
/* 0x1D90 */ f32 field_0x1d90;
/* 0x1D94 */ f32 field_0x1d94;
/* 0x1D88 */ Vec2 m_dpd_2d_pos;
/* 0x1D90 */ Vec2 m_dpd_ratio_pos;
/* 0x1D98 */ f32 field_0x1d98;
/* 0x1D9C */ f32 field_0x1d9c;
/* 0x1DA0 */ f32 field_0x1da0;
/* 0x1DA4 */ f32 field_0x1da4;
/* 0x1DA0 */ Vec2 m_dpd_play_box_pos;
/* 0x1DA8 */ Vec2 field_0x1da8;
/* 0x1DB0 */ Vec2 field_0x1db0;
/* 0x1DB8 */ f32 field_0x1db8;
@ -84,7 +93,7 @@ public:
/* 0x1DD0 */ int field_0x1dd0;
/* 0x1DD4 */ u8 field_0x1dd4;
/* 0x1DD8 */ int field_0x1dd8;
/* 0x1DDC */ u8 field_0x1ddc;
/* 0x1DDC */ bool field_0x1ddc;
/* 0x1DDD */ u8 field_0x1ddd;
/* 0x1DE0 */ int field_0x1de0;
/* 0x1DE4 */ int field_0x1de4;
@ -92,7 +101,7 @@ public:
/* 0x1DEC */ int field_0x1dec;
/* 0x1DF0 */ u8 field_0x1df0;
/* 0x1DF4 */ int field_0x1df4;
/* 0x1DF8 */ u32 field_0x1df8;
/* 0x1DF8 */ u32 dev_type;
/* 0x1DFC */ u32 field_0x1dfc;
/* 0x1E00 */ int field_0x1e00;
/* 0x1E04 */ u8 field_0x1e04;
@ -118,29 +127,29 @@ public:
static void stopMoterWave(int);
static void updateMoterWave();
static void stopMoter();
static void getLowBat(u32);
static void setLowBat(u32, int);
static void onLowBatChk(u32);
static void procNoData(u32);
static BOOL getLowBat(u32 chan);
static void setLowBat(u32 chan, BOOL low_bat);
static void onLowBatChk(u32 chan);
static void procNoData(u32 chan);
static void read();
static void calibrateDist(int);
static void getDpd2DPos(u32);
static void getDpdRatioPos(u32);
static void getDpdRatioBoxPos(u32);
static void chkDpdOk(u32);
static void chkDpdValid(u32);
static void chkDpdPosIn(u32);
static void getKPADAcc(u32, Vec*, int);
static void getAngleXy(u32);
static void getAngleZy(u32);
static void getKPADAccValue(u32, int);
static void getKPADAccValueMax(u32);
static void getKPADAccSpeed(u32, int);
static void getKPADAccSpeedMax(u32);
static void getKPADFsAccValue(u32, int);
static void getKPADFsAccValueMax(u32);
static s16 getFSStickAngle3DRev(u32);
static void calcUnderVec(Pad::Acc*, f32);
static f32 calibrateDist(int);
static Vec2& getDpd2DPos(u32 chan);
static Vec2& getDpdRatioPos(u32 chan);
static Vec2& getDpdPlayBoxPos(u32 chan);
static BOOL chkDpdOk(u32 chan);
static BOOL chkDpdValid(u32 chan);
static BOOL chkDpdPosIn(u32 chan);
static void getKPADAcc(u32 chan, Vec*, int);
static s16 getAngleXy(u32 chan);
static s16 getAngleZy(u32 chan);
static f32 getKPADAccValue(u32 chan, int);
static f32 getKPADAccValueMax(u32 chan);
static f32 getKPADAccSpeed(u32 chan, int);
static f32 getKPADAccSpeedMax(u32 chan);
static f32 getKPADFSAccValue(u32 chan, int);
static f32 getKPADFSAccValueMax(u32 chan);
static s16 getFSStickAngle3DRev(u32 chan);
static void calcUnderVec(Pad::Acc* acc_p, f32);
static u32 getHoldB(u32);
static u32 getHoldMinus(u32);
@ -178,8 +187,9 @@ public:
static u32 getTrigUp(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_UP; }
static u32 getTrigStart(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_PLUS; }
static WPADInfo m_pad_info[4];
static Pad m_pad[4];
static WPADInfo m_pad_info[WPAD_MAX_CONTROLLERS];
static Pad m_pad[WPAD_MAX_CONTROLLERS];
static motorWave_t m_motorWave[WPAD_MAX_CONTROLLERS];
static int m_cal_value;
};

View File

@ -71,10 +71,21 @@ typedef struct KPADStatus {
/* 0x4C */ f32 dist_vec;
/* 0x50 */ f32 dist_speed;
/* 0x54 */ Vec2 acc_vertical;
#if PLATFORM_SHIELD
/* 0x5C */ u8 dev_type;
/* 0x5D */ s8 wpad_err;
/* 0x5E */ s8 dpd_valid_fg;
/* 0x5F */ u8 data_format;
/* 0x60 */ KPADEXStatus ex_status;
/* 0x84 */ u8 unk_shield_0x86[0xf0 - 0x84];
#else
/* 0x5C */ u32 dev_type;
/* 0x60 */ KPADEXStatus ex_status;
/* 0x84 */ s8 dpd_valid_fg;
/* 0x85 */ s8 wpad_err;
#endif
#if PLATFORM_SHIELD
#endif
} KPADStatus; // size 0x88
typedef struct KPADUnifiedWpadStatus {

View File

@ -8,7 +8,7 @@
#include "global.h"
#if PLATFORM_WII
#include "m_Do/m_Re_controller_pad.h"
#include "m_Re/m_Re_controller_pad.h"
#endif
void cAPICPad_recalibrate() {
@ -113,7 +113,7 @@ f32 cAPICPad_X_STICK(u32 i_padNo) {
}
f32 cAPICPad_X_STICK_3D(u32 i_padNo) {
return mReCPd::getPad(i_padNo).m_stick3D;
return mReCPd::getPad(i_padNo).m_stick3D.x;
}
f32 cAPICPad_Y_STICK(u32 i_padNo) {

View File

@ -8,7 +8,7 @@
#include "m_Do/m_Do_Reset.h"
#include "m_Do/m_Do_graphic.h"
#include "m_Do/m_Do_lib.h"
#include "m_Do/m_Re_controller_pad.h"
#include "m_Re/m_Re_controller_pad.h"
int SECallback(int param_0, int param_1) {
if (param_0 == 5) {

View File

@ -1,350 +0,0 @@
#include "m_Do/m_Re_controller_pad.h"
#include "Z2AudioLib/Z2AudioCS.h"
mReCPd::Pad mReCPd::m_pad[4];
WPADInfo mReCPd::m_pad_info[4];
void mReCPd::Pad::Acc::clean() {
}
void mReCPd::Pad::Acc::changeStts(u32, bool) {
}
void mReCPd::Pad::Acc::calcSwingVec() {
}
void mReCPd::Pad::Acc::calcSttsRem() {
}
void mReCPd::Pad::Acc::calcSttsFs() {
}
void mReCPd::Pad::clean() {
}
void mReCPd::Pad::cleanOneTime() {
}
void mReCPd::Pad::copyRemAcc() {
}
void mReCPd::Pad::copyFSAcc() {
}
void mReCPd::Pad::cleanTrig() {
m_remAcc.m_swing = 0;
m_FSAcc.m_swing = 0;
for (int i = 0; i < 10; i++) {
field_0x4[i].trig = 0;
}
}
void mReCPd::Pad::cleanHold() {
for (int i = 0; i < 10; i++) {
field_0x4[i].hold = 0;
}
}
void mReCPd::Pad::cleanRelease() {
for (int i = 0; i < 10; i++) {
field_0x4[i].release = 0;
}
}
void mReCPd::Pad::clearUpDown() {
}
void mReCPd::Pad::calcDpdBox(Vec2*, Vec2*, f32, f32) {
}
void mReCPd::Pad::calcDpdOld() {
}
void mReCPd::enableDpd(u32 param_0) {
KPADEnableDPD(param_0);
}
void mReCPd::disableDpd(u32 param_0) {
KPADDisableDPD(param_0);
}
void mReCPd::Pad::calcDpd2DPos() {
}
void mReCPd::Pad::calcDpdRatioPos() {
}
void mReCPd::Pad::calcDpdPlayCirPos() {
}
void mReCPd::Pad::calcDpdPlayBoxPos() {
}
void mReCPd::onConnect(u32 i_padNo) {
m_pad[i_padNo].field_0x1dd4 = 1;
m_pad[i_padNo].field_0x1e04 = 1;
}
static void l_mReCPd_extensionCallback(s32 i_padNo, s32 param_1) {
Z2AudioCS::extensionProcess(i_padNo, param_1);
mReCPd::m_pad[i_padNo].field_0x1dec = param_1;
mReCPd::m_pad[i_padNo].field_0x1df0 = 1;
}
void mReCPd::setExtensionCallback() {
WPADSetExtensionCallback(0, l_mReCPd_extensionCallback);
}
void mReCPd::onGetInfoAsync(u32 i_padNo) {
m_pad[i_padNo].field_0x1ddd = 1;
m_pad[i_padNo].field_0x1de0 = 1800;
}
void mReCPd::create() {
}
void mReCPd::startMoterWave(motorWave_t*, u8*, bool) {
}
void mReCPd::startMoterWave(int, u8*, bool) {
}
void mReCPd::stopMoterWave(motorWave_t*) {
}
void mReCPd::stopMoterWave(int) {
}
void mReCPd::updateMoterWave() {
}
void mReCPd::stopMoter() {
}
void mReCPd::getLowBat(u32) {
}
void mReCPd::setLowBat(u32, int) {
}
void mReCPd::onLowBatChk(u32) {
}
void mReCPd::procNoData(u32) {
}
void mReCPd::read() {
}
void mReCPd::calibrateDist(int) {
}
void mReCPd::getDpd2DPos(u32) {
}
void mReCPd::getDpdRatioPos(u32) {
}
void mReCPd::getDpdRatioBoxPos(u32) {
}
void mReCPd::chkDpdOk(u32) {
}
void mReCPd::chkDpdValid(u32) {
}
void mReCPd::chkDpdPosIn(u32) {
}
void mReCPd::getKPADAcc(u32, Vec*, int) {
}
void mReCPd::getAngleXy(u32) {
}
void mReCPd::getAngleZy(u32) {
}
void mReCPd::getKPADAccValue(u32, int) {
}
void mReCPd::getKPADAccValueMax(u32) {
}
void mReCPd::getKPADAccSpeed(u32, int) {
}
void mReCPd::getKPADAccSpeedMax(u32) {
}
void mReCPd::getKPADFsAccValue(u32, int) {
}
void mReCPd::getKPADFsAccValueMax(u32) {
}
s16 mReCPd::getFSStickAngle3DRev(u32) {
}
void mReCPd::calcUnderVec(Pad::Acc*, f32) {
}
u32 mReCPd::getHoldB(u32 i_padNo) {
return m_pad[i_padNo].field_0x4[0].hold & WPAD_BUTTON_B;
}
u32 mReCPd::getHoldMinus(u32 i_padNo) {
if (chkSwingBlock(i_padNo)) {
return 0;
} else {
return m_pad[i_padNo].field_0x4[0].hold & WPAD_BUTTON_MINUS;
}
}
u32 mReCPd::getHoldPlus(u32 i_padNo) {
if (chkSwingBlock(i_padNo)) {
return 0;
} else {
return m_pad[i_padNo].field_0x4[0].hold & WPAD_BUTTON_PLUS;
}
}
u32 mReCPd::getHoldZ1(u32 i_padNo) {
return m_pad[i_padNo].field_0x4[0].hold & WPAD_BUTTON_Z;
}
u32 mReCPd::getTrigB(u32 i_padNo) {
return m_pad[i_padNo].field_0x4[0].trig & WPAD_BUTTON_B;
}
u32 mReCPd::getTrigMinus(u32 i_padNo) {
if (chkSwingBlock(i_padNo)) {
return 0;
} else {
return m_pad[i_padNo].field_0x4[0].trig & WPAD_BUTTON_MINUS;
}
}
u32 mReCPd::getTrigHome(u32 i_padNo) {
if (chkSwingBlock(i_padNo)) {
return 0;
} else {
return m_pad[i_padNo].field_0x4[0].trig & WPAD_BUTTON_HOME;
}
}
u32 mReCPd::getTrigPlus(u32 i_padNo) {
if (chkSwingBlock(i_padNo)) {
return 0;
} else {
return m_pad[i_padNo].field_0x4[0].trig & WPAD_BUTTON_PLUS;
}
}
u32 mReCPd::getTrigZ1(u32 i_padNo) {
return m_pad[i_padNo].field_0x4[0].trig & WPAD_BUTTON_Z;
}
u32 mReCPd::chkSwingBlock(u32 i_padNo) {
return m_pad[i_padNo].m_swingBlock > 0;
}
u32 mReCPd::getTrigSwing(u32 i_padNo) {
return m_pad[i_padNo].m_remAcc.m_swing;
}
Vec2& mReCPd::getSwingVec(u32 i_padNo) {
return m_pad[i_padNo].m_remAcc.m_swingVec;
}
u32 mReCPd::chkSimpleProbe(u32 i_padNo) {
if (m_pad[i_padNo].field_0x1dd4 == 0) {
return 0;
} else if (m_pad[i_padNo].field_0x1dfc + 3 <= 2) {
return 0;
} else if (m_pad[i_padNo].field_0x1df8 == 0xFD || m_pad[i_padNo].field_0x1df8 == 0xFF) {
return 0;
} else {
return 1;
}
}
BOOL mReCPd::chkDevTypeValid(u32 i_padNo) {
if (!chkSimpleProbe(i_padNo)) {
return FALSE;
}
if (m_pad[i_padNo].field_0x1df4 < 20 && m_pad[i_padNo].field_0x1de4 == 0xFF && m_pad[i_padNo].field_0x1de8 != 0) {
return FALSE;
}
return TRUE;
}
u32 mReCPd::getFSTrigSwing(u32 i_padNo) {
return m_pad[i_padNo].m_FSAcc.m_swing;
}
int mReCPd::m_cal_value;
void mReCPd::plusCalValue() {
m_cal_value++;
if (m_cal_value >= 2) {
m_cal_value = 2;
}
}
void mReCPd::minusCalValue() {
m_cal_value--;
if (m_cal_value <= -2) {
m_cal_value = -2;
}
}

File diff suppressed because it is too large Load Diff