d_vibration first pass (#220)

* dVibration_c::StartShock

* dVibration_c::StartQuake

* dVibration_c::StopQuake

* dVibration_c::Kill()

* dVibration_c::CheckQuake

* dVibration_c::Init

* dVibration_c::Remove

* dVibration_c::setDefault

* dVibration_c::Pause

* remove asm

* switch to u8 return, remove cast
This commit is contained in:
Pheenoh
2022-12-26 10:45:03 -07:00
committed by GitHub
parent f79e4e04f3
commit 8516f01f79
14 changed files with 150 additions and 411 deletions
+4
View File
@@ -1013,6 +1013,10 @@ inline u8 dComIfGs_checkBottle(u8 i_itemNo) {
return g_dComIfG_gameInfo.info.getPlayer().getItem().checkBottle(i_itemNo);
}
inline u8 dComIfGs_checkOptVibration() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().checkVibration();
}
inline BOOL dComIfGs_isLightDropGetFlag(u8 i_nowLevel) {
return g_dComIfG_gameInfo.info.getPlayer().getLightDrop().isLightDropGetFlag(i_nowLevel);
}
+7
View File
@@ -3,4 +3,11 @@
#include "dolphin/types.h"
class dVibration_pattern {
public:
u16 field_0x00;
u16 field_0x02;
u32 field_0x04;
};
#endif /* D_D_VIB_PATTERN_H */
+16 -15
View File
@@ -2,26 +2,27 @@
#define D_D_VIBRATION_H
#include "d/save/d_save.h"
#include "d/d_vib_pattern.h"
#include "dolphin/types.h"
class dVibration_c {
public:
/* 8006F268 */ void Run();
/* 8006FA24 */ void StartShock(int, int, cXyz);
/* 8006FA24 */ bool StartShock(int, int, cXyz);
/* 8006FC0C */ void StartQuake(u8 const*, int, int, cXyz);
/* 8006FB10 */ void StartQuake(int, int, cXyz);
/* 8006FD94 */ void StopQuake(int);
/* 8006FB10 */ bool StartQuake(int, int, cXyz);
/* 8006FD94 */ int StopQuake(int);
/* 8006FE00 */ void Kill();
/* 8006FE5C */ void CheckQuake();
/* 8006FE5C */ int CheckQuake();
/* 8006FE84 */ void setDefault();
/* 8006FF04 */ void Init();
/* 8006FF38 */ void Pause();
/* 8006FFF8 */ void Remove();
static u8 const MS_patt[88];
static u8 const CS_patt[88];
static u8 const MQ_patt[80];
static u8 const CQ_patt[80];
static dVibration_pattern const MS_patt[11];
static dVibration_pattern const CS_patt[11];
static dVibration_pattern const MQ_patt[10];
static dVibration_pattern const CQ_patt[10];
private:
class {
@@ -29,13 +30,13 @@ private:
class {
public:
/* 0x00 */ u32 field_0x0;
/* 0x04 */ int field_0x4;
/* 0x04 */ s32 field_0x4;
/* 0x08 */ s32 field_0x8;
/* 0x0C */ s32 field_0xc;
/* 0x10 */ s32 field_0x10;
/* 0x14 */ int field_0x14;
/* 0x14 */ s32 field_0x14;
/* 0x18 */ cXyz field_0x18;
/* 0x24 */ u32 field_0x24;
/* 0x24 */ s32 field_0x24;
} mShock, mQuake;
} /* 0x00 */ field_0x0;
/* 0x50 */ u32 field_0x50;
@@ -43,17 +44,17 @@ private:
/* 0x58 */ s32 field_0x58;
/* 0x5C */ s32 field_0x5c;
/* 0x60 */ u32 field_0x60;
/* 0x64 */ u32 field_0x64;
/* 0x64 */ s32 field_0x64;
/* 0x68 */ u32 field_0x68;
/* 0x6C */ u32 field_0x6c;
/* 0x70 */ u32 field_0x70;
/* 0x70 */ s32 field_0x70;
/* 0x74 */ u32 field_0x74;
/* 0x78 */ u32 field_0x78;
/* 0x7C */ u32 field_0x7c;
/* 0x80 */ u32 field_0x80;
/* 0x80 */ s32 field_0x80;
/* 0x84 */ u32 field_0x84;
/* 0x88 */ s32 field_0x88;
/* 0x8C */ u32 field_0x8c;
/* 0x8C */ s32 field_0x8c;
}; // Size: 0x90
#endif /* D_D_VIBRATION_H */
+1
View File
@@ -60,6 +60,7 @@ public:
static f32 getAnalogR(u32 pad) { return getCpadInfo(pad).mTriggerRight; }
static f32 getAnalogL(u32 pad) { return getCpadInfo(pad).mTriggerLeft; }
static BOOL isConnect(u32 pad) { return JUTGamePad::getPortStatus(pad) == 0; }
static void stopMotorHard(u32 pad) { return m_gamePad[pad]->stopMotorHard(); }
static void stopMotorWaveHard(u32 pad) { return m_gamePad[pad]->stopMotorWaveHard(); }
static JUTGamePad* m_gamePad[4];