mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_vibration / JUTGamePad matched + linked (#2256)
* d_vibration done * JUTGamePad done * cleanup JUTGamePad * d_menu_window cleanup
This commit is contained in:
@@ -168,7 +168,7 @@ public:
|
||||
|
||||
T& operator*() { return *this->getObject(); }
|
||||
|
||||
T* operator->() { return this->getObject(); }
|
||||
T* operator->() const { return mLink->getObject(); }
|
||||
|
||||
// private:
|
||||
JSULink<T>* mLink;
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
void setTraceSuppress(u32 param_0) { mTraceSuppress = param_0; }
|
||||
void setGamePad(JUTGamePad* gamePad) {
|
||||
mGamePad = gamePad;
|
||||
mGamePadPort = JUTGamePad::Port_Unknown;
|
||||
mGamePadPort = JUTGamePad::EPortInvalid;
|
||||
}
|
||||
|
||||
static void setMapFile(const char* map) {
|
||||
|
||||
@@ -2,38 +2,21 @@
|
||||
#define JUTGAMEPAD_H
|
||||
|
||||
#include "JSystem/JKernel/JKRDisposer.h"
|
||||
#include "dolphin/os/OSTime.h"
|
||||
#include "dolphin/pad.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <dolphin.h>
|
||||
|
||||
typedef void (*callbackFn)(int, void*);
|
||||
|
||||
namespace CButton {
|
||||
enum {
|
||||
DPAD_LEFT = 0x0001,
|
||||
DPAD_RIGHT = 0x0002,
|
||||
DPAD_DOWN = 0x0004,
|
||||
DPAD_UP = 0x0008,
|
||||
Z = 0x0010,
|
||||
R = 0x0020,
|
||||
L = 0x0040,
|
||||
A = 0x0100,
|
||||
B = 0x0200,
|
||||
X = 0x0400,
|
||||
Y = 0x0800,
|
||||
START = 0x1000,
|
||||
};
|
||||
}
|
||||
|
||||
extern bool sResetSwitchPushing__Q210JUTGamePad13C3ButtonReset;
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
*
|
||||
*/
|
||||
struct JUTGamePadRecordBase {
|
||||
virtual void unk0() {}
|
||||
virtual void unk1(PADStatus* pad) {}
|
||||
virtual void unk2() {}
|
||||
virtual ~JUTGamePadRecordBase() {}
|
||||
virtual void getStatus(PADStatus* pad) = 0;
|
||||
virtual void write(PADStatus* pad) = 0;
|
||||
|
||||
bool isActive() const { return mActive; }
|
||||
|
||||
/* 0x4 */ bool mActive;
|
||||
};
|
||||
@@ -45,35 +28,44 @@ struct JUTGamePadRecordBase {
|
||||
struct JUTGamePad : public JKRDisposer {
|
||||
public:
|
||||
enum EStickMode {
|
||||
STICK_MODE_1 = 1,
|
||||
EStickMode1 = 1,
|
||||
};
|
||||
|
||||
enum EWhichStick {
|
||||
WS_MAIN_STICK,
|
||||
WS_SUB_STICK,
|
||||
EMainStick,
|
||||
ESubStick,
|
||||
};
|
||||
|
||||
enum EPadPort {
|
||||
Port_Unknown = -1,
|
||||
Port_1,
|
||||
Port_2,
|
||||
Port_3,
|
||||
Port_4,
|
||||
EPortInvalid = -1,
|
||||
EPort1,
|
||||
EPort2,
|
||||
EPort3,
|
||||
EPort4,
|
||||
};
|
||||
|
||||
enum EClampMode {
|
||||
EClampNone,
|
||||
EClampStick,
|
||||
EClampCircle,
|
||||
};
|
||||
|
||||
JUTGamePad(JUTGamePad::EPadPort port);
|
||||
virtual ~JUTGamePad();
|
||||
|
||||
void initList();
|
||||
static s32 init();
|
||||
static BOOL init();
|
||||
void clear();
|
||||
static u32 read();
|
||||
void assign();
|
||||
void checkResetCallback(OSTime unk);
|
||||
void checkResetCallback(OSTime holdTime);
|
||||
void update();
|
||||
void stopPatternedRumble() { mRumble.stopPatternedRumble(mPortNum); }
|
||||
|
||||
static void checkResetSwitch();
|
||||
static void clearForReset();
|
||||
static JUTGamePad* getGamePad(int pad_index);
|
||||
static bool recalibrate(u32 pad_mask);
|
||||
static JUTGamePad* getGamePad(int port);
|
||||
static bool recalibrate(u32 mask);
|
||||
|
||||
static void setAnalogMode(u32 mode) {
|
||||
sAnalogMode = mode;
|
||||
@@ -82,59 +74,39 @@ public:
|
||||
|
||||
static void clearResetOccurred() { C3ButtonReset::sResetOccurred = false; }
|
||||
|
||||
static void setResetCallback(callbackFn callback, void* param_0) {
|
||||
static void setResetCallback(callbackFn callback, void* arg) {
|
||||
C3ButtonReset::sCallback = callback;
|
||||
C3ButtonReset::sCallbackArg = param_0;
|
||||
C3ButtonReset::sCallbackArg = arg;
|
||||
}
|
||||
|
||||
u32 getButton() const { return mButton.mButton; }
|
||||
|
||||
u32 getTrigger() const { return mButton.mTrigger; }
|
||||
|
||||
f32 getMainStickX() const { return mMainStick.mPosX; }
|
||||
|
||||
f32 getMainStickY() const { return mMainStick.mPosY; }
|
||||
|
||||
f32 getMainStickValue() const { return mMainStick.mValue; }
|
||||
|
||||
s16 getMainStickAngle() const { return mMainStick.mAngle; }
|
||||
|
||||
f32 getSubStickX() const { return mSubStick.mPosX; }
|
||||
|
||||
f32 getSubStickY() const { return mSubStick.mPosY; }
|
||||
|
||||
f32 getSubStickValue() const { return mSubStick.mValue; }
|
||||
|
||||
s16 getSubStickAngle() const { return mSubStick.mAngle; }
|
||||
|
||||
u8 getAnalogA() const { return mButton.mAnalogA; }
|
||||
|
||||
u8 getAnalogB() const { return mButton.mAnalogB; }
|
||||
|
||||
u8 getAnalogL() const { return mButton.mAnalogL; }
|
||||
|
||||
u8 getAnalogR() const { return mButton.mAnalogR; }
|
||||
|
||||
s8 getErrorStatus() const { return mErrorStatus; }
|
||||
|
||||
s16 getPortNum() const { return mPortNum; }
|
||||
|
||||
JUTGamePadRecordBase* getPadReplay() const { return mPadReplay; }
|
||||
|
||||
JUTGamePadRecordBase* getPadRecord() const { return mPadRecord; }
|
||||
|
||||
u32 testTrigger(u32 button) const { return mButton.mTrigger & button; }
|
||||
|
||||
bool isPushing3ButtonReset() const {
|
||||
bool isPushingReset = false;
|
||||
|
||||
if (mPortNum != -1 && mButtonReset.mReset != false) {
|
||||
isPushingReset = true;
|
||||
}
|
||||
return isPushingReset;
|
||||
return mPortNum != EPortInvalid && mButtonReset.mReset != false;
|
||||
}
|
||||
|
||||
inline void stopMotorWave() { mRumble.stopPatternedRumbleAtThePeriod(); }
|
||||
void stopMotorWave() { mRumble.stopPatternedRumbleAtThePeriod(); }
|
||||
void stopMotor() { mRumble.stopMotor(mPortNum, false); }
|
||||
void stopMotorHard() { mRumble.stopMotorHard(mPortNum); }
|
||||
|
||||
@@ -143,8 +115,8 @@ public:
|
||||
struct CButton {
|
||||
CButton() { clear(); }
|
||||
void clear();
|
||||
void update(PADStatus const*, u32 unk);
|
||||
void setRepeat(u32 unk0, u32 unk1, u32 unk2);
|
||||
void update(const PADStatus* padStatus, u32 stickStatus);
|
||||
void setRepeat(u32 mask, u32 delay, u32 rate);
|
||||
|
||||
/* 0x00 */ u32 mButton;
|
||||
/* 0x04 */ u32 mTrigger; // Pressed Buttons
|
||||
@@ -156,11 +128,11 @@ public:
|
||||
/* 0x10 */ f32 mAnalogLf;
|
||||
/* 0x14 */ f32 mAnalogRf;
|
||||
/* 0x18 */ u32 mRepeat;
|
||||
/* 0x1C */ u32 field_0x1c;
|
||||
/* 0x20 */ u32 field_0x20;
|
||||
/* 0x24 */ u32 field_0x24;
|
||||
/* 0x28 */ u32 field_0x28;
|
||||
/* 0x2C */ u32 field_0x2c;
|
||||
/* 0x1C */ u32 mRepeatCount;
|
||||
/* 0x20 */ u32 mRepeatStart;
|
||||
/* 0x24 */ u32 mRepeatMask;
|
||||
/* 0x28 */ u32 mRepeatDelay;
|
||||
/* 0x2C */ u32 mRepeatRate;
|
||||
}; // Size: 0x30
|
||||
|
||||
struct C3ButtonReset {
|
||||
@@ -185,16 +157,16 @@ public:
|
||||
CStick() { clear(); }
|
||||
void clear();
|
||||
void clear(JUTGamePad* pad);
|
||||
u32 update(s8 unk0, s8 unk1, JUTGamePad::EStickMode mode, JUTGamePad::EWhichStick stick,
|
||||
u32 unk2);
|
||||
u32 getButton(u32 unk);
|
||||
u32 update(s8 x, s8 u, JUTGamePad::EStickMode mode, JUTGamePad::EWhichStick stick,
|
||||
u32 buttons);
|
||||
u32 getButton(u32 buttons);
|
||||
|
||||
/* 0x0 */ f32 mPosX;
|
||||
/* 0x4 */ f32 mPosY;
|
||||
/* 0x8 */ f32 mValue;
|
||||
/* 0xC */ s16 mAngle;
|
||||
/* 0xE */ s8 field_0xe;
|
||||
/* 0xF */ s8 field_0xf;
|
||||
/* 0xE */ s8 mRawX;
|
||||
/* 0xF */ s8 mRawY;
|
||||
}; // Size: 0x10
|
||||
|
||||
void stopMotorWaveHard() { mRumble.stopPatternedRumble(mPortNum); }
|
||||
@@ -214,31 +186,48 @@ public:
|
||||
|
||||
void clear();
|
||||
void clear(JUTGamePad* pad);
|
||||
static void startMotor(int channel);
|
||||
static void stopMotor(int channel, bool stop);
|
||||
void update(s16 unk0);
|
||||
void triggerPatternedRumble(u32 unk0);
|
||||
void startPatternedRumble(void* unk0, ERumble rumble, u32 unk1);
|
||||
void stopPatternedRumble(s16 pad_port);
|
||||
static void startMotor(int port);
|
||||
static void stopMotor(int port, bool hard_stop);
|
||||
void update(s16 port);
|
||||
void triggerPatternedRumble(u32 length);
|
||||
void startPatternedRumble(void* data, ERumble rumble, u32 length);
|
||||
void stopPatternedRumble(s16 port);
|
||||
void stopPatternedRumbleAtThePeriod();
|
||||
static void setEnabled(u32 pad_mask);
|
||||
static void setEnabled(u32 mask);
|
||||
|
||||
void stopMotorHard(int portNo) { stopMotor(portNo, true); }
|
||||
void stopMotorHard(int port) { stopMotor(port, true); }
|
||||
|
||||
static bool isEnabled(u32 mask) { return mEnabled & mask; }
|
||||
static bool isEnabledPort(int port) { return isEnabled(sChannelMask[port]); }
|
||||
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
/* 0x04 */ u32 field_0x4;
|
||||
/* 0x08 */ u8* field_0x8;
|
||||
/* 0x0C */ u32 field_0xc;
|
||||
static bool isEnabledPort(int port) {
|
||||
JUT_ASSERT(250, 0 <= port && port < 4);
|
||||
return isEnabled(sChannelMask[port]);
|
||||
}
|
||||
|
||||
/* 0x00 */ u32 mFrame;
|
||||
/* 0x04 */ u32 mLength;
|
||||
/* 0x08 */ u8* mPattern;
|
||||
/* 0x0C */ u32 mFrameCount;
|
||||
/* 0x10 */ u8* field_0x10;
|
||||
}; // Size: 0x14
|
||||
|
||||
void startMotorWave(void* param_2, CRumble::ERumble rumble, u32 param_4) {
|
||||
mRumble.startPatternedRumble(param_2, rumble, param_4);
|
||||
void startMotorWave(void* data, CRumble::ERumble rumble, u32 length) {
|
||||
mRumble.startPatternedRumble(data, rumble, length);
|
||||
}
|
||||
|
||||
static JSUList<JUTGamePad> mPadList;
|
||||
static bool mListInitialized;
|
||||
static PADStatus mPadStatus[4];
|
||||
static CButton mPadButton[4];
|
||||
static CStick mPadMStick[4];
|
||||
static CStick mPadSStick[4];
|
||||
static EStickMode sStickMode;
|
||||
static int sClampMode;
|
||||
static u8 mPadAssign[4];
|
||||
static u32 sSuppressPadReset;
|
||||
static s32 sAnalogMode;
|
||||
static u32 sRumbleSupported;
|
||||
|
||||
/* 0x18 */ CButton mButton;
|
||||
/* 0x48 */ CStick mMainStick;
|
||||
/* 0x58 */ CStick mSubStick;
|
||||
@@ -250,21 +239,8 @@ public:
|
||||
/* 0x94 */ JUTGamePadRecordBase* mPadReplay;
|
||||
/* 0x98 */ C3ButtonReset mButtonReset;
|
||||
/* 0x9C */ u8 field_0x9c[4];
|
||||
/* 0xA0 */ OSTime mResetTime;
|
||||
/* 0xA0 */ OSTime mResetHoldStartTime;
|
||||
/* 0xA8 */ u8 field_0xa8;
|
||||
|
||||
static JSUList<JUTGamePad> mPadList;
|
||||
static bool mListInitialized;
|
||||
static PADStatus mPadStatus[4];
|
||||
static CButton mPadButton[4];
|
||||
static CStick mPadMStick[4];
|
||||
static CStick mPadSStick[4];
|
||||
static EStickMode sStickMode;
|
||||
static u32 sClampMode;
|
||||
static u8 mPadAssign[4];
|
||||
static u32 sSuppressPadReset;
|
||||
static s32 sAnalogMode;
|
||||
static u32 sRumbleSupported;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -273,19 +249,20 @@ public:
|
||||
*/
|
||||
struct JUTGamePadLongPress {
|
||||
static JSUList<JUTGamePadLongPress> sPatternList;
|
||||
void checkCallback(int port, u32 timer);
|
||||
void checkCallback(int port, u32 hold_time);
|
||||
|
||||
u32 getMaskPattern() const { return mMaskPattern; }
|
||||
u32 getPattern() const { return mPattern; }
|
||||
bool isValid() const { return mValid; }
|
||||
|
||||
/* 0x00 */ u8 field_0x0[0x10];
|
||||
/* 0x10 */ bool mValid;
|
||||
/* 0x11 */ bool field_0x11;
|
||||
/* 0x14 */ u32 mPattern;
|
||||
/* 0x18 */ u32 mMaskPattern;
|
||||
/* 0x1C */ u32 field_0x1c;
|
||||
/* 0x20 */ bool field_0x20[4];
|
||||
/* 0x28 */ OSTime mTimer[4];
|
||||
/* 0x1C */ u32 mThreshold;
|
||||
/* 0x20 */ bool mLongPressStatus[4];
|
||||
/* 0x28 */ OSTime mStartHoldTime[4];
|
||||
/* 0x48 */ bool field_0x48[4];
|
||||
/* 0x4C */ void (*mCallback)(s32, JUTGamePadLongPress*, s32);
|
||||
/* 0x50 */ s32 field_0x50;
|
||||
|
||||
+11
-15
@@ -4,6 +4,8 @@
|
||||
#include "d/d_drawlist.h"
|
||||
#include "f_op/f_op_msg.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
|
||||
struct CSTControl;
|
||||
class STControl;
|
||||
@@ -29,7 +31,7 @@ BOOL dMw_START_TRIGGER();
|
||||
|
||||
class dDlst_MENU_CAPTURE_c : public dDlst_base_c {
|
||||
public:
|
||||
/* 801FDFCC */ virtual void draw();/* {
|
||||
virtual void draw() {
|
||||
if (getDrawFlag() == 1) {
|
||||
setDrawFlag();
|
||||
dComIfGp_onPauseFlag();
|
||||
@@ -50,7 +52,7 @@ public:
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_TEXC);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXColor color = {0xFF, 0xFF, 0xFF, mAlpha};
|
||||
const GXColor color = {0, 0, 0, mAlpha};
|
||||
GXSetTevColor(GX_TEVREG0, color);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_A0);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
@@ -84,8 +86,9 @@ public:
|
||||
GXTexCoord2s8(0, 1);
|
||||
GXEnd();
|
||||
}
|
||||
} */
|
||||
/* 801FE2E8 */ virtual ~dDlst_MENU_CAPTURE_c();
|
||||
}
|
||||
|
||||
virtual ~dDlst_MENU_CAPTURE_c() {}
|
||||
|
||||
dDlst_MENU_CAPTURE_c() {
|
||||
mFlag = 0;
|
||||
@@ -256,6 +259,7 @@ public:
|
||||
|
||||
void onPauseWindow() { mPauseWindow = true; }
|
||||
void offPauseWindow() { mPauseWindow = false; }
|
||||
bool isPauseWindow() { return mPauseWindow != false; }
|
||||
void onShowFlag() { mShowFlag |= 1; }
|
||||
void offShowFlag() { mShowFlag &= ~1; }
|
||||
bool isShowFlag() { return mShowFlag & 1 != 0; }
|
||||
@@ -277,12 +281,12 @@ private:
|
||||
/* 0x12C */ dMenu_Fishing_c* mpMenuFishing;
|
||||
/* 0x130 */ dMenu_Skill_c* mpMenuSkill;
|
||||
/* 0x134 */ dMenu_Insect_c* mpMenuInsect;
|
||||
/* 0x138 */ s32 mMemSize;
|
||||
/* 0x138 */ int mMemSize;
|
||||
/* 0x13C */ f32 mFmapStageTransX;
|
||||
/* 0x140 */ f32 mFmapStageTransZ;
|
||||
/* 0x144 */ u8 field_0x144;
|
||||
/* 0x145 */ u8 mButtons;
|
||||
/* 0x146 */ u8 mMenuStatus;
|
||||
/* 0x145 */ u8 mButtonBits;
|
||||
/* 0x146 */ u8 mMenuProc;
|
||||
/* 0x147 */ u8 mShowFlag;
|
||||
/* 0x148 */ s8 field_0x148;
|
||||
/* 0x149 */ u8 field_0x149;
|
||||
@@ -302,12 +306,4 @@ private:
|
||||
BOOL dMw_LEFT_TRIGGER();
|
||||
BOOL dMw_RIGHT_TRIGGER();
|
||||
|
||||
static int dMw_Draw(dMw_c*);
|
||||
static int dMw_Execute(dMw_c*);
|
||||
static int dMw_IsDelete(dMw_c*);
|
||||
static int dMw_Delete(dMw_c*);
|
||||
static int dMw_Create(msg_class*);
|
||||
|
||||
typedef int (*dMw_Method)(dMw_c*);
|
||||
|
||||
#endif /* D_MENU_D_MENU_WINDOW_H */
|
||||
|
||||
@@ -191,6 +191,7 @@ public:
|
||||
f32 get2DHeight() { return m2DHeight; }
|
||||
u8 getTableMapRegionNo() { return mTableMapRegionNo; }
|
||||
u8 getGoldWolfMapType() { return mGoldWolfMapType; }
|
||||
bool isWindowAccept(int param_0) { return mWindowAccept & (1 << param_0); }
|
||||
|
||||
public:
|
||||
/* 0x04 */ u8 unk4[4];
|
||||
@@ -789,6 +790,10 @@ inline u8 dMeter2Info_getGoldWolfMapType() {
|
||||
return g_meter2_info.getGoldWolfMapType();
|
||||
}
|
||||
|
||||
inline bool dMeter2Info_isWindowAccept(int param_0) {
|
||||
return g_meter2_info.isWindowAccept(param_0);
|
||||
}
|
||||
|
||||
const char* dMeter2Info_getPlusTextureName();
|
||||
const char* dMeter2Info_getNumberTextureName(int pIndex);
|
||||
int dMeter2Info_recieveLetter();
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class dVibration_pattern {
|
||||
public:
|
||||
u16 field_0x00;
|
||||
u16 field_0x02;
|
||||
u32 field_0x04;
|
||||
};
|
||||
|
||||
|
||||
#endif /* D_D_VIB_PATTERN_H */
|
||||
|
||||
+76
-33
@@ -2,15 +2,59 @@
|
||||
#define D_D_VIBRATION_H
|
||||
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "d/d_vib_pattern.h"
|
||||
|
||||
struct vib_pattern {
|
||||
/* 0x0 */ u16 rounds;
|
||||
/* 0x2 */ u16 length;
|
||||
/* 0x4 */ u32 bits;
|
||||
};
|
||||
|
||||
class dVibration_c {
|
||||
public:
|
||||
enum {
|
||||
MODE_PAUSE = -1,
|
||||
MODE_WAIT,
|
||||
MODE_RUN,
|
||||
};
|
||||
|
||||
enum VIBMODE_SHOCK {
|
||||
VIBMODE_S_NONE = -1,
|
||||
VIBMODE_S_CUSTOM,
|
||||
VIBMODE_S_POWER1,
|
||||
VIBMODE_S_POWER2,
|
||||
VIBMODE_S_POWER3,
|
||||
VIBMODE_S_POWER4,
|
||||
VIBMODE_S_POWER5,
|
||||
VIBMODE_S_POWER6,
|
||||
VIBMODE_S_POWER7,
|
||||
VIBMODE_S_POWER8,
|
||||
VIBMODE_S_DOKUTT,
|
||||
VIBMODE_S_FOR2D,
|
||||
|
||||
VIBMODE_S_MAX
|
||||
};
|
||||
|
||||
enum VIBMODE_QUAKE {
|
||||
VIBMODE_Q_NONE = -1,
|
||||
VIBMODE_Q_CUSTOM,
|
||||
VIBMODE_Q_POWER1,
|
||||
VIBMODE_Q_POWER2,
|
||||
VIBMODE_Q_POWER3,
|
||||
VIBMODE_Q_POWER4,
|
||||
VIBMODE_Q_POWER5,
|
||||
VIBMODE_Q_POWER6,
|
||||
VIBMODE_Q_POWER7,
|
||||
VIBMODE_Q_POWER8,
|
||||
VIBMODE_Q_HORSE,
|
||||
|
||||
VIBMODE_Q_MAX
|
||||
};
|
||||
|
||||
/* 8006F268 */ int Run();
|
||||
/* 8006FA24 */ bool StartShock(int i_strength, int, cXyz);
|
||||
/* 8006FC0C */ bool StartQuake(u8 const*, int, int, cXyz);
|
||||
/* 8006FB10 */ bool StartQuake(int, int, cXyz);
|
||||
/* 8006FD94 */ int StopQuake(int);
|
||||
/* 8006FA24 */ bool StartShock(int i_vibmode, int i_flags, cXyz i_pos);
|
||||
/* 8006FC0C */ bool StartQuake(const u8* i_pattern, int i_rounds, int i_flags, cXyz i_pos);
|
||||
/* 8006FB10 */ bool StartQuake(int i_vibmode, int i_flags, cXyz i_pos);
|
||||
/* 8006FD94 */ int StopQuake(int i_flags);
|
||||
/* 8006FE00 */ void Kill();
|
||||
/* 8006FE5C */ bool CheckQuake();
|
||||
/* 8006FE84 */ void setDefault();
|
||||
@@ -18,10 +62,10 @@ public:
|
||||
/* 8006FF38 */ void Pause();
|
||||
/* 8006FFF8 */ void Remove();
|
||||
|
||||
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];
|
||||
static const vib_pattern MS_patt[VIBMODE_S_MAX];
|
||||
static const vib_pattern CS_patt[VIBMODE_S_MAX];
|
||||
static const vib_pattern MQ_patt[VIBMODE_Q_MAX];
|
||||
static const vib_pattern CQ_patt[VIBMODE_Q_MAX];
|
||||
|
||||
private:
|
||||
class {
|
||||
@@ -29,31 +73,30 @@ private:
|
||||
class {
|
||||
public:
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
/* 0x04 */ s32 field_0x4;
|
||||
/* 0x08 */ s32 field_0x8;
|
||||
/* 0x0C */ s32 field_0xc;
|
||||
/* 0x10 */ s32 field_0x10;
|
||||
/* 0x14 */ s32 field_0x14;
|
||||
/* 0x18 */ cXyz field_0x18;
|
||||
/* 0x24 */ s32 field_0x24;
|
||||
/* 0x04 */ int mVibMode;
|
||||
/* 0x08 */ u32 mPattern;
|
||||
/* 0x0C */ s32 mLength;
|
||||
/* 0x10 */ s32 mRounds;
|
||||
/* 0x14 */ s32 mFlags;
|
||||
/* 0x18 */ cXyz mPos;
|
||||
/* 0x24 */ s32 mFrame;
|
||||
} mShock, mQuake;
|
||||
} /* 0x00 */ field_0x0;
|
||||
/* 0x50 */ u32 field_0x50;
|
||||
/* 0x54 */ int field_0x54;
|
||||
/* 0x58 */ s32 field_0x58;
|
||||
/* 0x5C */ s32 field_0x5c;
|
||||
/* 0x60 */ s32 field_0x60;
|
||||
/* 0x64 */ s32 field_0x64;
|
||||
/* 0x68 */ s32 field_0x68;
|
||||
/* 0x6C */ u32 field_0x6c;
|
||||
/* 0x70 */ s32 field_0x70;
|
||||
/* 0x74 */ u32 field_0x74;
|
||||
/* 0x78 */ u32 field_0x78;
|
||||
/* 0x7C */ s32 field_0x7c;
|
||||
/* 0x80 */ s32 field_0x80;
|
||||
/* 0x84 */ s32 field_0x84;
|
||||
/* 0x88 */ s32 field_0x88;
|
||||
/* 0x8C */ s32 field_0x8c;
|
||||
} /* 0x00 */ mCamera;
|
||||
class {
|
||||
public:
|
||||
class {
|
||||
public:
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
/* 0x04 */ int mVibMode;
|
||||
/* 0x08 */ u32 mPattern;
|
||||
/* 0x0C */ s32 mLength;
|
||||
/* 0x10 */ s32 mRounds;
|
||||
/* 0x14 */ s32 mFrame;
|
||||
/* 0x18 */ s32 mStopFrame;
|
||||
} mShock, mQuake;
|
||||
} /* 0x50 */ mMotor;
|
||||
/* 0x88 */ s32 mFrame;
|
||||
/* 0x8C */ s32 mMode;
|
||||
}; // Size: 0x90
|
||||
|
||||
#endif /* D_D_VIBRATION_H */
|
||||
|
||||
@@ -20,32 +20,32 @@ public:
|
||||
static u32 getTrig(u32 pad) { return getCpadInfo(pad).mPressedButtonFlags; }
|
||||
static u32 getTrigLockL(u32 pad) { return getCpadInfo(pad).mTrigLockL; }
|
||||
static u32 getTrigLockR(u32 pad) { return getCpadInfo(pad).mTrigLockR; }
|
||||
static u32 getTrigUp(u32 pad) { return getTrig(pad) & CButton::DPAD_UP; }
|
||||
static u32 getTrigDown(u32 pad) { return getTrig(pad) & CButton::DPAD_DOWN; }
|
||||
static u32 getTrigLeft(u32 pad) { return getTrig(pad) & CButton::DPAD_LEFT; }
|
||||
static u32 getTrigRight(u32 pad) { return getTrig(pad) & CButton::DPAD_RIGHT; }
|
||||
static u32 getTrigL(u32 pad) { return getTrig(pad) & CButton::L; }
|
||||
static u32 getTrigR(u32 pad) { return getTrig(pad) & CButton::R; }
|
||||
static u32 getTrigA(u32 pad) { return getTrig(pad) & CButton::A; }
|
||||
static u32 getTrigB(u32 pad) { return getTrig(pad) & CButton::B; }
|
||||
static u32 getTrigZ(u32 pad) { return getTrig(pad) & CButton::Z; }
|
||||
static u32 getTrigY(u32 pad) { return getTrig(pad) & CButton::Y; }
|
||||
static u32 getTrigX(u32 pad) { return getTrig(pad) & CButton::X; }
|
||||
static u32 getTrigStart(u32 pad) { return getTrig(pad) & CButton::START; }
|
||||
static u32 getTrigUp(u32 pad) { return getTrig(pad) & PAD_BUTTON_UP; }
|
||||
static u32 getTrigDown(u32 pad) { return getTrig(pad) & PAD_BUTTON_DOWN; }
|
||||
static u32 getTrigLeft(u32 pad) { return getTrig(pad) & PAD_BUTTON_LEFT; }
|
||||
static u32 getTrigRight(u32 pad) { return getTrig(pad) & PAD_BUTTON_RIGHT; }
|
||||
static u32 getTrigL(u32 pad) { return getTrig(pad) & PAD_TRIGGER_L; }
|
||||
static u32 getTrigR(u32 pad) { return getTrig(pad) & PAD_TRIGGER_R; }
|
||||
static u32 getTrigA(u32 pad) { return getTrig(pad) & PAD_BUTTON_A; }
|
||||
static u32 getTrigB(u32 pad) { return getTrig(pad) & PAD_BUTTON_B; }
|
||||
static u32 getTrigZ(u32 pad) { return getTrig(pad) & PAD_TRIGGER_Z; }
|
||||
static u32 getTrigY(u32 pad) { return getTrig(pad) & PAD_BUTTON_Y; }
|
||||
static u32 getTrigX(u32 pad) { return getTrig(pad) & PAD_BUTTON_X; }
|
||||
static u32 getTrigStart(u32 pad) { return getTrig(pad) & PAD_BUTTON_START; }
|
||||
static u32 getHold(u32 pad) { return getCpadInfo(pad).mButtonFlags; }
|
||||
static u32 getHoldLockL(u32 pad) { return getCpadInfo(pad).mHoldLockL; }
|
||||
static u32 getHoldLockR(u32 pad) { return getCpadInfo(pad).mHoldLockR; }
|
||||
static u32 getHoldUp(u32 pad) { return getHold(pad) & CButton::DPAD_UP; }
|
||||
static u32 getHoldDown(u32 pad) { return getHold(pad) & CButton::DPAD_DOWN; }
|
||||
static u32 getHoldLeft(u32 pad) { return getHold(pad) & CButton::DPAD_LEFT; }
|
||||
static u32 getHoldRight(u32 pad) { return getHold(pad) & CButton::DPAD_RIGHT; }
|
||||
static u32 getHoldL(u32 pad) { return getHold(pad) & CButton::L; }
|
||||
static u32 getHoldR(u32 pad) { return getHold(pad) & CButton::R; }
|
||||
static u32 getHoldA(u32 pad) { return getHold(pad) & CButton::A; }
|
||||
static u32 getHoldB(u32 pad) { return getHold(pad) & CButton::B; }
|
||||
static u32 getHoldZ(u32 pad) { return getHold(pad) & CButton::Z; }
|
||||
static u32 getHoldY(u32 pad) { return getHold(pad) & CButton::Y; }
|
||||
static u32 getHoldX(u32 pad) { return getHold(pad) & CButton::X; }
|
||||
static u32 getHoldUp(u32 pad) { return getHold(pad) & PAD_BUTTON_UP; }
|
||||
static u32 getHoldDown(u32 pad) { return getHold(pad) & PAD_BUTTON_DOWN; }
|
||||
static u32 getHoldLeft(u32 pad) { return getHold(pad) & PAD_BUTTON_LEFT; }
|
||||
static u32 getHoldRight(u32 pad) { return getHold(pad) & PAD_BUTTON_RIGHT; }
|
||||
static u32 getHoldL(u32 pad) { return getHold(pad) & PAD_TRIGGER_L; }
|
||||
static u32 getHoldR(u32 pad) { return getHold(pad) & PAD_TRIGGER_R; }
|
||||
static u32 getHoldA(u32 pad) { return getHold(pad) & PAD_BUTTON_A; }
|
||||
static u32 getHoldB(u32 pad) { return getHold(pad) & PAD_BUTTON_B; }
|
||||
static u32 getHoldZ(u32 pad) { return getHold(pad) & PAD_TRIGGER_Z; }
|
||||
static u32 getHoldY(u32 pad) { return getHold(pad) & PAD_BUTTON_Y; }
|
||||
static u32 getHoldX(u32 pad) { return getHold(pad) & PAD_BUTTON_X; }
|
||||
static f32 getStickX(u32 pad) { return getCpadInfo(pad).mMainStickPosX; }
|
||||
static f32 getStickY(u32 pad) { return getCpadInfo(pad).mMainStickPosY; }
|
||||
static f32 getStickX3D(u32 pad) { return getCpadInfo(pad).mMainStickPosX; }
|
||||
@@ -60,8 +60,8 @@ 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 startMotorWave(u32 pad, void* param_2, JUTGamePad::CRumble::ERumble param_3, u32 param_4) {
|
||||
m_gamePad[pad]->startMotorWave(param_2, param_3, param_4);
|
||||
static void startMotorWave(u32 pad, void* data, JUTGamePad::CRumble::ERumble rumble, u32 length) {
|
||||
m_gamePad[pad]->startMotorWave(data, rumble, length);
|
||||
}
|
||||
static void stopMotor(u32 pad) { m_gamePad[pad]->stopMotor(); }
|
||||
static void stopMotorWave(u32 pad) { m_gamePad[pad]->stopMotorWave(); }
|
||||
|
||||
Reference in New Issue
Block a user