summaryrefslogtreecommitdiff
path: root/include/d
diff options
context:
space:
mode:
authorPheenoh <pheenoh@gmail.com>2022-12-26 10:45:03 -0700
committerGitHub <noreply@github.com>2022-12-26 10:45:03 -0700
commit8516f01f79086c0efce77ab12f8dba23a62b3e54 (patch)
tree4a1ca9f2ea857fb70893ce10a406bc6957404298 /include/d
parentf79e4e04f3a369d59e1f3c2c11195f03148e6d5c (diff)
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
Diffstat (limited to 'include/d')
-rw-r--r--include/d/com/d_com_inf_game.h4
-rw-r--r--include/d/d_vib_pattern.h7
-rw-r--r--include/d/d_vibration.h31
3 files changed, 27 insertions, 15 deletions
diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h
index ca67de5fdc..72fad43697 100644
--- a/include/d/com/d_com_inf_game.h
+++ b/include/d/com/d_com_inf_game.h
@@ -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);
}
diff --git a/include/d/d_vib_pattern.h b/include/d/d_vib_pattern.h
index b85628791b..00d5727326 100644
--- a/include/d/d_vib_pattern.h
+++ b/include/d/d_vib_pattern.h
@@ -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 */
diff --git a/include/d/d_vibration.h b/include/d/d_vibration.h
index b24ff7248d..140b1b7189 100644
--- a/include/d/d_vibration.h
+++ b/include/d/d_vibration.h
@@ -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 */