d_vibration / JUTGamePad matched + linked (#2256)

* d_vibration done

* JUTGamePad done

* cleanup JUTGamePad

* d_menu_window cleanup
This commit is contained in:
TakaRikka
2024-12-02 21:15:03 +02:00
committed by GitHub
parent 7cc32c05fa
commit e510f33414
19 changed files with 1141 additions and 2223 deletions
+2 -2
View File
@@ -476,7 +476,7 @@ config.libs = [
Object(Matching, "d/d_kankyo_data.cpp"),
Object(Matching, "d/d_kankyo_wether.cpp"),
Object(NonMatching, "d/d_kankyo_rain.cpp"),
Object(NonMatching, "d/d_vibration.cpp"),
Object(Matching, "d/d_vibration.cpp"),
Object(Matching, "d/d_vib_pattern.cpp"),
Object(NonMatching, "d/d_attention.cpp"),
Object(Matching, "d/d_bg_pc.cpp"),
@@ -942,7 +942,7 @@ config.libs = [
Object(Matching, "JSystem/JUtility/JUTFont.cpp"),
Object(Matching, "JSystem/JUtility/JUTResFont.cpp", extra_cflags=['-pragma "nosyminline off"']),
Object(Matching, "JSystem/JUtility/JUTDbPrint.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTGamePad.cpp"),
Object(Matching, "JSystem/JUtility/JUTGamePad.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTException.cpp"),
Object(Matching, "JSystem/JUtility/JUTDirectPrint.cpp"),
Object(Matching, "JSystem/JUtility/JUTAssert.cpp"),
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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) {
+82 -105
View File
@@ -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
View File
@@ -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 */
+5
View File
@@ -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();
+1 -6
View File
@@ -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
View File
@@ -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 */
+25 -25
View File
@@ -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(); }
+5 -5
View File
@@ -635,10 +635,10 @@ bool JUTException::readPad(u32* out_trigger, u32* out_button) {
} while (ms < 0x32);
if (mGamePad == (JUTGamePad*)0xffffffff) {
JUTGamePad gamePad0(JUTGamePad::Port_1);
JUTGamePad gamePad1(JUTGamePad::Port_2);
JUTGamePad gamePad2(JUTGamePad::Port_3);
JUTGamePad gamePad3(JUTGamePad::Port_4);
JUTGamePad gamePad0(JUTGamePad::EPort1);
JUTGamePad gamePad1(JUTGamePad::EPort2);
JUTGamePad gamePad2(JUTGamePad::EPort3);
JUTGamePad gamePad3(JUTGamePad::EPort4);
JUTGamePad::read();
c3bcnt[0] =
@@ -1150,4 +1150,4 @@ JUTException::~JUTException() {}
/* ##############################################################################################
*/
/* 804508F8-80450900 000378 0008+00 0/0 3/3 0/0 .sdata None */
SECTION_SDATA extern bool sAssertVisible = true;
SECTION_SDATA extern bool sAssertVisible = true;
File diff suppressed because it is too large Load Diff
@@ -13,5 +13,5 @@ void cAPICPad_recalibrate() {
/* 802632AC-802632C8 25DBEC 001C+00 0/0 3/3 1/1 .text cAPICPad_ANY_BUTTON__FUl */
u32 cAPICPad_ANY_BUTTON(u32 portNo) {
return mDoCPd_c::getTrig(portNo) & (CButton::A | CButton::B | CButton::START);
}
return mDoCPd_c::getTrig(portNo) & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_START);
}
+352 -1243
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -300,9 +300,9 @@ void dScnLogo_c::warningDispDraw() {
}
if (mTimer == 0 || mDoCPd_c::getTrig(PAD_1) &
(CButton::A | CButton::B | CButton::X | CButton::Y | CButton::START |
CButton::Z | CButton::L | CButton::R | CButton::DPAD_LEFT |
CButton::DPAD_RIGHT | CButton::DPAD_DOWN | CButton::DPAD_UP))
(PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y | PAD_BUTTON_START |
PAD_TRIGGER_Z | PAD_TRIGGER_L | PAD_TRIGGER_R | PAD_BUTTON_LEFT |
PAD_BUTTON_RIGHT | PAD_BUTTON_DOWN | PAD_BUTTON_UP))
{
mExecCommand = EXEC_WARNING_OUT;
mTimer = 30;
+51 -58
View File
@@ -1,66 +1,59 @@
//
// Generated By: dol2asm
// Translation Unit: d/d_vib_pattern
//
#include "d/d_vib_pattern.h"
#include "d/d_vibration.h"
/* ############################################################################################## */
/* 8037A620-8037A678 006C80 0058+00 0/0 1/1 0/0 .rodata MS_patt__12dVibration_c */
const dVibration_pattern dVibration_c::MS_patt[11] = {
{0x0000, 0x0000, 0x00000000},
{0x0000, 0x0003, 0xC0000000},
{0x0000, 0x0004, 0xE0000000},
{0x0000, 0x0006, 0xE8000000},
{0x0000, 0x0007, 0xEC000000},
{0x0000, 0x0008, 0xF6000000},
{0x0000, 0x0009, 0xFB000000},
{0x0000, 0x000A, 0xF6800000},
{0x0000, 0x000B, 0xFB400000},
{0x0000, 0x0008, 0xC2000000},
{0x0000, 0x0002, 0xC0000000},
// Motor Shock patterns
const vib_pattern dVibration_c::MS_patt[VIBMODE_S_MAX] = {
/* VIBMODE_S_CUSTOM */ {0, 0, 0x00000000},
/* VIBMODE_S_POWER1 */ {0, 3, 0xC0000000},
/* VIBMODE_S_POWER2 */ {0, 4, 0xE0000000},
/* VIBMODE_S_POWER3 */ {0, 6, 0xE8000000},
/* VIBMODE_S_POWER4 */ {0, 7, 0xEC000000},
/* VIBMODE_S_POWER5 */ {0, 8, 0xF6000000},
/* VIBMODE_S_POWER6 */ {0, 9, 0xFB000000},
/* VIBMODE_S_POWER7 */ {0, 10, 0xF6800000},
/* VIBMODE_S_POWER8 */ {0, 11, 0xFB400000},
/* VIBMODE_S_DOKUTT */ {0, 8, 0xC2000000},
/* VIBMODE_S_FOR2D */ {0, 2, 0xC0000000},
};
/* 8037A678-8037A6D0 006CD8 0058+00 0/0 1/1 0/0 .rodata CS_patt__12dVibration_c */
const dVibration_pattern dVibration_c::CS_patt[11] = {
{0x0000, 0x0000, 0x00000000},
{0x0000, 0x0003, 0xC0000000},
{0x0000, 0x0004, 0xE0000000},
{0x0000, 0x0006, 0xE8000000},
{0x0000, 0x0007, 0xEC000000},
{0x0000, 0x0008, 0xF6000000},
{0x0000, 0x0009, 0xFB000000},
{0x0000, 0x000A, 0xF6800000},
{0x0000, 0x000B, 0xFB400000},
{0x0000, 0x0008, 0xC2000000},
{0x0000, 0x0002, 0xC0000000},
// Camera Shock patterns
const vib_pattern dVibration_c::CS_patt[VIBMODE_S_MAX] = {
/* VIBMODE_S_CUSTOM */ {0, 0, 0x00000000},
/* VIBMODE_S_POWER1 */ {0, 3, 0xC0000000},
/* VIBMODE_S_POWER2 */ {0, 4, 0xE0000000},
/* VIBMODE_S_POWER3 */ {0, 6, 0xE8000000},
/* VIBMODE_S_POWER4 */ {0, 7, 0xEC000000},
/* VIBMODE_S_POWER5 */ {0, 8, 0xF6000000},
/* VIBMODE_S_POWER6 */ {0, 9, 0xFB000000},
/* VIBMODE_S_POWER7 */ {0, 10, 0xF6800000},
/* VIBMODE_S_POWER8 */ {0, 11, 0xFB400000},
/* VIBMODE_S_DOKUTT */ {0, 8, 0xC2000000},
/* VIBMODE_S_FOR2D */ {0, 2, 0xC0000000},
};
/* 8037A6D0-8037A720 006D30 0050+00 0/0 1/1 0/0 .rodata MQ_patt__12dVibration_c */
const dVibration_pattern dVibration_c::MQ_patt[10] = {
{0x0000, 0x0000, 0x00000000},
{0x0001, 0x0020, 0x10202020},
{0x0001, 0x0020, 0x42104208},
{0x0002, 0x0020, 0x22222222},
{0x0002, 0x0020, 0x22492249},
{0x0003, 0x0020, 0x52525252},
{0x0003, 0x0020, 0x4A94AA95},
{0x0004, 0x0020, 0x36555655},
{0x0004, 0x0020, 0x6B6D6B6D},
{0x0001, 0x001B, 0x20201000},
// Motor Quake patterns
const vib_pattern dVibration_c::MQ_patt[VIBMODE_Q_MAX] = {
/* VIBMODE_Q_CUSTOM */ {0, 0, 0x00000000},
/* VIBMODE_Q_POWER1 */ {1, 32, 0x10202020},
/* VIBMODE_Q_POWER2 */ {1, 32, 0x42104208},
/* VIBMODE_Q_POWER3 */ {2, 32, 0x22222222},
/* VIBMODE_Q_POWER4 */ {2, 32, 0x22492249},
/* VIBMODE_Q_POWER5 */ {3, 32, 0x52525252},
/* VIBMODE_Q_POWER6 */ {3, 32, 0x4A94AA95},
/* VIBMODE_Q_POWER7 */ {4, 32, 0x36555655},
/* VIBMODE_Q_POWER8 */ {4, 32, 0x6B6D6B6D},
/* VIBMODE_Q_HORSE */ {1, 27, 0x20201000},
};
/* 8037A720-8037A770 006D80 0050+00 0/0 1/1 0/0 .rodata CQ_patt__12dVibration_c */
const dVibration_pattern dVibration_c::CQ_patt[10] = {
{0x0000, 0x0000, 0x00000000},
{0x0001, 0x0020, 0x10202020},
{0x0001, 0x0020, 0x42104208},
{0x0002, 0x0020, 0x22222222},
{0x0002, 0x0020, 0x22492249},
{0x0003, 0x0020, 0x52525252},
{0x0003, 0x0020, 0x4A94AA95},
{0x0004, 0x0020, 0x36555655},
{0x0004, 0x0020, 0x6B6D6B6D},
{0x0000, 0x001B, 0x20201000},
};
// Camera Quake patterns
const vib_pattern dVibration_c::CQ_patt[VIBMODE_Q_MAX] = {
/* VIBMODE_Q_CUSTOM */ {0, 0, 0x00000000},
/* VIBMODE_Q_POWER1 */ {1, 32, 0x10202020},
/* VIBMODE_Q_POWER2 */ {1, 32, 0x42104208},
/* VIBMODE_Q_POWER3 */ {2, 32, 0x22222222},
/* VIBMODE_Q_POWER4 */ {2, 32, 0x22492249},
/* VIBMODE_Q_POWER5 */ {3, 32, 0x52525252},
/* VIBMODE_Q_POWER6 */ {3, 32, 0x4A94AA95},
/* VIBMODE_Q_POWER7 */ {4, 32, 0x36555655},
/* VIBMODE_Q_POWER8 */ {4, 32, 0x6B6D6B6D},
/* VIBMODE_Q_HORSE */ {0, 27, 0x20201000},
};
+307 -380
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -17,13 +17,13 @@ interface_of_controller_pad mDoCPd_c::m_cpadInfo[4];
/* 80007954-80007A94 002294 0140+00 0/0 1/1 0/0 .text create__8mDoCPd_cFv */
void mDoCPd_c::create() {
JUTGamePad* pad = new JUTGamePad(JUTGamePad::Port_1);
JUTGamePad* pad = new JUTGamePad(JUTGamePad::EPort1);
m_gamePad[0] = pad;
if (mDoMain::developmentMode != 0) {
m_gamePad[1] = new JUTGamePad(JUTGamePad::Port_2);
m_gamePad[2] = new JUTGamePad(JUTGamePad::Port_3);
m_gamePad[3] = new JUTGamePad(JUTGamePad::Port_4);
m_gamePad[1] = new JUTGamePad(JUTGamePad::EPort2);
m_gamePad[2] = new JUTGamePad(JUTGamePad::EPort3);
m_gamePad[3] = new JUTGamePad(JUTGamePad::EPort4);
} else {
m_gamePad[1] = NULL;
m_gamePad[2] = NULL;
@@ -126,4 +126,4 @@ void mDoCPd_c::LRlockCheck(interface_of_controller_pad* interface) {
void mDoCPd_c::recalibrate(void) {
JUTGamePad::clearForReset();
JUTGamePad::CRumble::setEnabled(PAD_CHAN3_BIT | PAD_CHAN2_BIT | PAD_CHAN1_BIT | PAD_CHAN0_BIT);
}
}
+13 -13
View File
@@ -177,8 +177,8 @@ static int developKeyCheck(u32 btnTrig, u32 btnHold) {
static u8 key_ganon;
static u8 key_zelda;
if (btnHold == (CButton::L | CButton::R | CButton::Z | CButton::DPAD_DOWN) &&
btnTrig == CButton::DPAD_DOWN) {
if (btnHold == (PAD_TRIGGER_L | PAD_TRIGGER_R | PAD_TRIGGER_Z | PAD_BUTTON_DOWN) &&
btnTrig == PAD_BUTTON_DOWN) {
if (key_link == 3 && key_ganon == 6 && key_zelda == 5) {
mDoMain::developmentMode = 1;
} else {
@@ -188,15 +188,15 @@ static int developKeyCheck(u32 btnTrig, u32 btnHold) {
}
}
if (btnHold == (CButton::L | CButton::DPAD_RIGHT) && btnTrig == CButton::L) {
if (btnHold == (PAD_TRIGGER_L | PAD_BUTTON_RIGHT) && btnTrig == PAD_TRIGGER_L) {
key_link++;
}
if (btnHold == (CButton::R | CButton::DPAD_UP) && btnTrig == CButton::R) {
if (btnHold == (PAD_TRIGGER_R | PAD_BUTTON_UP) && btnTrig == PAD_TRIGGER_R) {
key_ganon++;
}
if (btnHold == (CButton::Z | CButton::DPAD_LEFT) && btnTrig == CButton::Z) {
if (btnHold == (PAD_TRIGGER_Z | PAD_BUTTON_LEFT) && btnTrig == PAD_TRIGGER_Z) {
key_zelda++;
}
@@ -241,7 +241,7 @@ void myExceptionCallback(u16, OSContext*, u32, u32) {
} else {
manager->setTraceSuppress(0x80);
if (mDoMain::developmentMode == 0) {
JUTGamePad pad(JUTGamePad::Port_1);
JUTGamePad pad(JUTGamePad::EPort1);
manager->setGamePad(&pad);
if (manager != NULL) {
@@ -289,7 +289,7 @@ static void fault_callback_scroll(u16, OSContext* p_context, u32, u32) {
*(u32*)(srr0 - 0x8), *(u32*)(srr0 - 0x4), *(u32*)srr0);
}
JUTGamePad pad(JUTGamePad::Port_1);
JUTGamePad pad(JUTGamePad::EPort1);
manager->setGamePad(&pad);
BOOL padDisabled = manager->isEnablePad() == false;
@@ -310,12 +310,12 @@ static void fault_callback_scroll(u16, OSContext* p_context, u32, u32) {
}
bool waitRetrace = false;
if (btnTrig == CButton::START) {
if (btnTrig == PAD_BUTTON_START) {
exception_addition(exConsole);
waitRetrace = true;
}
if (btnTrig == CButton::Z) {
if (btnTrig == PAD_TRIGGER_Z) {
JUTConsole* sysConsole = JFWSystem::getSystemConsole();
if (JUTConsoleManager::getManager()->getDirectConsole() != sysConsole) {
exConsole = sysConsole;
@@ -331,22 +331,22 @@ static void fault_callback_scroll(u16, OSContext* p_context, u32, u32) {
waitRetrace = true;
}
if (btnTrig == CButton::A) {
if (btnTrig == PAD_BUTTON_A) {
exConsole->scrollToLastLine();
waitRetrace = true;
}
if (btnTrig == CButton::B) {
if (btnTrig == PAD_BUTTON_B) {
exConsole->scrollToFirstLine();
waitRetrace = true;
}
if (btnHold == CButton::DPAD_UP) {
if (btnHold == PAD_BUTTON_UP) {
exConsole->scroll(holdUpCount < 3 ? -1 : (holdUpCount < 5 ? -2 : (holdUpCount < 7 ? -4 : -8)));
waitRetrace = true;
holdDownCount = 0;
holdUpCount++;
} else if (btnHold == CButton::DPAD_DOWN) {
} else if (btnHold == PAD_BUTTON_DOWN) {
exConsole->scroll(holdDownCount < 3 ? 1 : (holdDownCount < 5 ? 2 : (holdDownCount < 7 ? 4 : 8)));
waitRetrace = true;
holdUpCount = 0;
+19 -19
View File
@@ -97,8 +97,8 @@ void CheckHeap(u32 i_padNo) {
bool comboCheck = false;
// if L + R + Z is pressed
if ((mDoCPd_c::getHold(i_padNo) & ~CButton::Z) == (CButton::L + CButton::R) &&
mDoCPd_c::getTrig(i_padNo) & CButton::Z)
if ((mDoCPd_c::getHold(i_padNo) & ~PAD_TRIGGER_Z) == (PAD_TRIGGER_L + PAD_TRIGGER_R) &&
mDoCPd_c::getTrig(i_padNo) & PAD_TRIGGER_Z)
{
comboCheck = true;
}
@@ -276,7 +276,7 @@ bool Debug_console(u32 i_padNo) {
console_scroll_init = 1;
}
if (mDoCPd_c::getTrig(i_padNo) & CButton::Z && !(mDoCPd_c::getHold(i_padNo) & ~CButton::Z))
if (mDoCPd_c::getTrig(i_padNo) & PAD_TRIGGER_Z && !(mDoCPd_c::getHold(i_padNo) & ~PAD_TRIGGER_Z))
{
console->setVisible(console->isVisible() == false);
JUTAssertion::setMessageCount(0);
@@ -284,19 +284,19 @@ bool Debug_console(u32 i_padNo) {
if (console->isVisible()) {
u32 holdButtons = mDoCPd_c::getHold(i_padNo);
if ((holdButtons & CButton::L && holdButtons & CButton::R) ||
if ((holdButtons & PAD_TRIGGER_L && holdButtons & PAD_TRIGGER_R) ||
((mDoCPd_c::getAnalogL(i_padNo) > 0.0f && mDoCPd_c::getAnalogR(i_padNo) > 0.0f)))
{
f32 stick_x = mDoCPd_c::getStickX(i_padNo);
f32 stick_y = mDoCPd_c::getStickY(i_padNo);
if (holdButtons & (CButton::Y | CButton::X) &&
mDoCPd_c::getTrig(i_padNo) & CButton::START)
if (holdButtons & (PAD_BUTTON_Y | PAD_BUTTON_X) &&
mDoCPd_c::getTrig(i_padNo) & PAD_BUTTON_START)
{
console->clear();
}
if (!(mDoCPd_c::getHold(i_padNo) & (CButton::Y | CButton::X))) {
if (!(mDoCPd_c::getHold(i_padNo) & (PAD_BUTTON_Y | PAD_BUTTON_X))) {
console_scroll -= stick_y;
int scrollAmount;
@@ -313,16 +313,16 @@ bool Debug_console(u32 i_padNo) {
console->scroll(scrollAmount);
}
} else {
if (mDoCPd_c::getHold(i_padNo) & CButton::X) {
if (mDoCPd_c::getHold(i_padNo) & PAD_BUTTON_X) {
console_position_x += stick_x;
}
if (mDoCPd_c::getHold(i_padNo) & CButton::Y) {
if (mDoCPd_c::getHold(i_padNo) & PAD_BUTTON_Y) {
console_position_y -= stick_y;
}
}
if (mDoCPd_c::getTrig(i_padNo) & CButton::A) {
if (mDoCPd_c::getTrig(i_padNo) & PAD_BUTTON_A) {
console->dumpToTerminal(0xFFFFFFFF);
console->setOutput(JUTConsole::OUTPUT_OSREPORT | JUTConsole::OUTPUT_CONSOLE);
}
@@ -335,11 +335,11 @@ bool Debug_console(u32 i_padNo) {
} else {
u32 pressButtons = mDoCPd_c::getTrig(i_padNo);
if (pressButtons & CButton::DPAD_DOWN) {
if (pressButtons & PAD_BUTTON_DOWN) {
g_HIO.mDisplayMeter ^= 1;
}
if (pressButtons & CButton::DPAD_LEFT) {
if (pressButtons & PAD_BUTTON_LEFT) {
if (JKRAram::getAramHeap()) {
JKRAram::getAramHeap()->dump();
}
@@ -349,11 +349,11 @@ bool Debug_console(u32 i_padNo) {
g_dComIfG_gameInfo.mResControl.dump();
}
if (mDoCPd_c::getTrig(i_padNo) & CButton::DPAD_RIGHT) {
if (mDoCPd_c::getTrig(i_padNo) & PAD_BUTTON_RIGHT) {
JKRHeap::getSystemHeap()->dump_sort();
}
if (mDoCPd_c::getTrig(i_padNo) & CButton::DPAD_UP) {
if (mDoCPd_c::getTrig(i_padNo) & PAD_BUTTON_UP) {
zeldaHeap->dump_sort();
gameHeap->dump_sort();
archiveHeap->dump_sort();
@@ -391,15 +391,15 @@ static void debug() {
CheckHeap(PAD_3);
}
if ((mDoCPd_c::getGamePad(PAD_3)->getButton() & ~CButton::Z) == CButton::R &&
mDoCPd_c::getGamePad(PAD_3)->testTrigger(CButton::Z))
if ((mDoCPd_c::getGamePad(PAD_3)->getButton() & ~PAD_TRIGGER_Z) == PAD_TRIGGER_R &&
mDoCPd_c::getGamePad(PAD_3)->testTrigger(PAD_TRIGGER_Z))
{
mDisplayHeapSize ^= 1;
}
if (mDisplayHeapSize) {
if ((mDoCPd_c::getGamePad(PAD_3)->getButton() & ~CButton::Z) == CButton::L &&
mDoCPd_c::getGamePad(PAD_3)->testTrigger(CButton::Z))
if ((mDoCPd_c::getGamePad(PAD_3)->getButton() & ~PAD_TRIGGER_Z) == PAD_TRIGGER_L &&
mDoCPd_c::getGamePad(PAD_3)->testTrigger(PAD_TRIGGER_Z))
{
mDoMain::mHeapBriefType < 5 ? mDoMain::mHeapBriefType++ :
mDoMain::mHeapBriefType = 1;
@@ -647,4 +647,4 @@ JASAudioThread* JASGlobalInstance<JASAudioThread>::sInstance;
/* 80450B90-80450B98 000090 0004+04 0/0 4/4 0/0 .sbss
* sInstance__40JASGlobalInstance<19JASDefaultBankTable> */
JASDefaultBankTable* JASGlobalInstance<JASDefaultBankTable>::sInstance;
JASDefaultBankTable* JASGlobalInstance<JASDefaultBankTable>::sInstance;