Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 1 addition & 192 deletions include/vpad/input.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <wut.h>
#include <vpadbase/base.h>

/**
* \defgroup vpad_input VPAD Input
Expand Down Expand Up @@ -79,15 +80,6 @@ typedef enum VPADButtons
VPAD_STICK_L_EMULATION_DOWN = 0x08000000,
} VPADButtons;

//! Wii U GamePad channel.
typedef enum VPADChan
{
//! Channel 0.
VPAD_CHAN_0 = 0,
//! Channel 1.
VPAD_CHAN_1 = 1,
} VPADChan;

//! Touch pad validity.
typedef enum VPADTouchPadValidity
{
Expand Down Expand Up @@ -323,13 +315,6 @@ WUT_CHECK_OFFSET(VPADStatus, 0xA2, micStatus);
WUT_CHECK_OFFSET(VPADStatus, 0xA3, slideVolumeEx);
WUT_CHECK_SIZE(VPADStatus, 0xAC);

typedef enum {
//! Indicates that there is pending data which can be received
VPAD_IRC_STATUS_FLAG_HAS_DATA = 1,
//! Indicates that another device is connected
VPAD_IRC_STATUS_FLAG_CONNECTED = 2,
} VPADIRCStatusFlags;

typedef void(*VPADSamplingCallback)(VPADChan chan);

/**
Expand Down Expand Up @@ -481,40 +466,6 @@ VPADGetTPCalibratedPointEx(VPADChan chan,
VPADTouchData *calibratedData,
const VPADTouchData *uncalibratedData);

/**
* Return a count representing the amount of time left for the given Gamepad's
* rumble pattern.
*
* \note
* Retail Wii U systems have a single Gamepad on \link VPADChan::VPAD_CHAN_0
* VPAD_CHAN_0. \endlink
*
* \param chan
* Denotes which channel to get the rumble time from.
*/
int32_t
VPADBASEGetMotorOnRemainingCount(VPADChan chan);

/**
* Set a count representing the amount of time left for the given Gamepad's
* rumble pattern.
*
* \note
* Retail Wii U systems have a single Gamepad on \link VPADChan::VPAD_CHAN_0
* VPAD_CHAN_0. \endlink
*
* \param chan
* Denotes which channel to set the rumble count for.
*
* \param counter
* The value of the new rumble count.
*
* <!-- meta: I assume this affects the index into the rumble pattern? -->
*/
int32_t
VPADBASESetMotorOnRemainingCount(VPADChan chan,
int32_t counter);

void
VPADSetAccParam(VPADChan chan,
float playRadius,
Expand Down Expand Up @@ -860,120 +811,6 @@ int32_t
VPADGetLcdMode(VPADChan chan,
VPADLcdMode *outLcdMode);

void
VPADBASESetSensorBarSetting(VPADChan chan,
int8_t setting);

void
VPADBASEGetSensorBarSetting(VPADChan chan,
int8_t *outSetting);

/**
* Get the headphone status.
*
* \note
* Retail Wii U systems have a single Gamepad on \link VPADChan::VPAD_CHAN_0
* VPAD_CHAN_0. \endlink
*
* \param chan
* The channel of the Gamepad to get the headphone status from.
*
* \returns
* Returns 1 if headphones are connected, 0 otherwise.
*/
int32_t
VPADBASEGetHeadphoneStatus(VPADChan chan);

/**
* Get the controller mode.
*
* \note
* Retail Wii U systems have a single Gamepad on \link VPADChan::VPAD_CHAN_0
* VPAD_CHAN_0. \endlink
*
* \param chan
* The channel of the Gamepad to get the controller mode from.
*
* \param mode
* Pointer to write a value of the controller mode into.
*/
void
VPADBASEGetGameControllerMode(VPADChan chan,
int32_t* mode);

/**
* Set the controller mode.
*
* \note
* Retail Wii U systems have a single Gamepad on \link VPADChan::VPAD_CHAN_0
* VPAD_CHAN_0. \endlink
*
* \param chan
* The channel of the Gamepad to set the controller mode to.
*
* \param mode
* Any non-zero mode will turn off the display, like the "Display Off" button under Controller Settings.
* Inputs are not disabled.
*/
void
VPADBASESetGameControllerMode(VPADChan chan,
int32_t mode);

/**
* Get the POWER button press status.
*
* \note
* Retail Wii U systems have a single Gamepad on \link VPADChan::VPAD_CHAN_0
* VPAD_CHAN_0. \endlink
*
* \param chan
* The channel of the Gamepad to get the POWER button press status from.
*
* \param tick
* The value given by \link OSGetTick \endlink when the button was pressed.
*
* \param status
* The status is set to 0 if the POWER button is not pressed.
*/
void
VPADBASEGetPowerButtonPressStatus(VPADChan chan,
uint32_t* tick,
uint32_t *status);

/**
* Set the POWER button press status.
*
* \param chan
* The channel of the Gamepad to set the POWER button press status to.
*
* \param tick
* The tick value to set.
*
* \param status
* The status to set.
*/
void
VPADBASESetPowerButtonPressStatus(VPADChan chan,
uint32_t tick,
uint32_t status);

/**
* Set the POWER button mode.
*
* \param chan
* The channel of the Gamepad to set the POWER button disable mode to.
*
* \param mode
* Set to 0 to enable and set to 1 to disable.
*
* \sa
* - \link VPADDisablePowerButton \endlink
* - \link VPADEnablePowerButton \endlink
*/
void
VPADBASESetPowerButtonDisableMode(VPADChan chan,
uint32_t mode);

/**
* Turn the given Gamepad's sensor bar on or off. Enabling the sensor bar allows
* any Wii Remote to position itself relative to the GamePad.
Expand All @@ -999,35 +836,7 @@ VPADSamplingCallback
VPADSetSamplingCallback(VPADChan chan,
VPADSamplingCallback callback);

/**
* Checks if VPADBASE is initialized.
*
* \returns
* \c TRUE if initialized.
*/
BOOL
VPADBASEIsInit();

/**
* Clear pending IRC events.
*
* \param chan
* The channel of the Gamepad.
*/
void
VPADBASEClearIRCEvent(VPADChan chan);

/**
* Get the current IRC status.
*
* \param chan
* The channel of the Gamepad.
*
* \returns
* The current status flags (see \link VPADIRCStatusFlags \endlink).
*/
uint32_t
VPADBASEGetIRCStatus(VPADChan chan);

#ifdef __cplusplus
}
Expand Down
Loading