mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 15:01:53 -04:00
992cf48c7f
* JUTGamePad.o: elaborate classes, split * JUTGamePad::CButton: decompile functions: - clear() - clear(JUTGamePad*) - setRepeat() * elaborate PAD* types in new header * decompile getNumBit() * elaborate JUTGamePad fields * move retyped externs from variables.h to JUTGamePad.h * elaborate JUTGamePadLongPress * JUTGamePad: decompile functions - initList() - init() - clear() - assign() - checkResetCallback() - checkResetSwitch() - clearForReset() - recalibrate() JUTGamePad: decompile * JUTGamePad::CStick::clear(): decompile * JUTGamePad::CRumble: decompile functions - startMotor() - stopMotor() - triggerPatternedRumble() - startPatternedRumble() - stopPatternedRumbleAtThePeriod() - setEnabled() * JUTGamePadLongPress::checkCallback(): decompile * nonmatching: JUTGamePad::CRumble::update() and JUTGamePad::getGamePad * JSUList<T>: allow access to JSUPtrList functions * functions.h: clear out some func decls that are no longer used * add notes in JUTGamePad.cpp * clang-format + add back extern funcs * fix some more extern labels Co-authored-by: Pheenoh <pheenoh@gmail.com>
38 lines
776 B
C
38 lines
776 B
C
#ifndef __PAD_H__
|
|
#define __PAD_H__
|
|
|
|
typedef enum PADMask {
|
|
PAD_CHAN3_BIT = (1 << 28),
|
|
PAD_CHAN2_BIT = (1 << 29),
|
|
PAD_CHAN1_BIT = (1 << 30),
|
|
PAD_CHAN0_BIT = (1 << 31),
|
|
|
|
__PAD_MASK_FORCE_ENUM_U32 = 0xffffffff,
|
|
} PADMask;
|
|
|
|
typedef struct PADStatus {
|
|
u16 button;
|
|
s8 stick_x;
|
|
s8 stick_y;
|
|
s8 substick_x;
|
|
s8 substick_y;
|
|
u8 trigger_left;
|
|
u8 trigger_right;
|
|
u8 analog_a;
|
|
u8 analog_b;
|
|
s8 error;
|
|
} PADStatus;
|
|
|
|
extern "C" {
|
|
u32 PADInit(void);
|
|
void PADSetAnalogMode(u32 mode);
|
|
void PADSetSpec(int spec);
|
|
s32 PADReset(PADMask mask);
|
|
void PADClampCircle(PADStatus* status);
|
|
void PADClamp(PADStatus* status);
|
|
u32 PADRead(PADStatus* status);
|
|
void PADControlMotor(s32 channel, u32 command);
|
|
s32 PADRecalibrate(PADMask mask);
|
|
}
|
|
|
|
#endif |