SSBM Decomp
Loading...
Searching...
No Matches
controller.h File Reference
#include <platform.h>
#include "baselib/forward.h"
#include <dolphin/pad.h>
#include <baselib/rumble.h>

Go to the source code of this file.

Data Structures

struct  HSD_PadData
struct  HSD_PadStatus
struct  PadLibData

Macros

#define HSD_PAD_DPADLEFT   (1 << 0)
#define HSD_PAD_DPADRIGHT   (1 << 1)
#define HSD_PAD_DPADDOWN   (1 << 2)
#define HSD_PAD_DPADUP   (1 << 3)
#define HSD_PAD_Z   (1 << 4)
#define HSD_PAD_R   (1 << 5)
#define HSD_PAD_L   (1 << 6)
#define HSD_PAD_7   (1 << 7)
#define HSD_PAD_A   (1 << 8)
#define HSD_PAD_B   (1 << 9)
#define HSD_PAD_X   (1 << 10)
#define HSD_PAD_Y   (1 << 11)
#define HSD_PAD_START   (1 << 12)
#define HSD_PAD_LR   (1 << 31)
 Digital input of either L or R.
#define HSD_PAD_AB   (HSD_PAD_A | HSD_PAD_B)
#define HSD_PAD_XY   (HSD_PAD_X | HSD_PAD_Y)
#define PAD_ERR_NO_CONTROLLER   -1

Typedefs

typedef u32 HSD_Pad

Enumerations

enum  HSD_FlushType {
  HSD_PAD_FLUSH_QUEUE_MERGE ,
  HSD_PAD_FLUSH_QUEUE_THROWAWAY ,
  HSD_PAD_FLUSH_QUEUE_LEAVE1 ,
  HSD_PAD_FLUSH_QUEUE_TERMINATE
}

Functions

static float HSD_PadGetNmlStickY (u8 slot)
static float HSD_PadGetNmlSubStickY (u8 slot)
void HSD_PadFlushQueue (HSD_FlushType)
u8 HSD_PadGetRawQueueCount (void)
s32 HSD_PadGetResetSwitch (void)
void HSD_PadRenewRawStatus (bool)
void HSD_PadRenewMasterStatus (void)
void HSD_PadRenewCopyStatus (void)
void HSD_PadRenewGameStatus (void)
void HSD_PadRenewStatus (void)
void HSD_PadReset (void)
void HSD_PadInit (u8, HSD_PadData *, u16, HSD_PadRumbleListData *)

Variables

HSD_PadStatus HSD_PadMasterStatus [4]
HSD_PadStatus HSD_PadGameStatus [4]
HSD_PadStatus HSD_PadCopyStatus [4]

Macro Definition Documentation

◆ HSD_PAD_DPADLEFT

#define HSD_PAD_DPADLEFT   (1 << 0)

◆ HSD_PAD_DPADRIGHT

#define HSD_PAD_DPADRIGHT   (1 << 1)

◆ HSD_PAD_DPADDOWN

#define HSD_PAD_DPADDOWN   (1 << 2)

◆ HSD_PAD_DPADUP

#define HSD_PAD_DPADUP   (1 << 3)

◆ HSD_PAD_Z

#define HSD_PAD_Z   (1 << 4)

◆ HSD_PAD_R

#define HSD_PAD_R   (1 << 5)

◆ HSD_PAD_L

#define HSD_PAD_L   (1 << 6)

◆ HSD_PAD_7

#define HSD_PAD_7   (1 << 7)

◆ HSD_PAD_A

#define HSD_PAD_A   (1 << 8)
Remarks
Also covers Z-Button macro in-game.

◆ HSD_PAD_B

#define HSD_PAD_B   (1 << 9)

◆ HSD_PAD_X

#define HSD_PAD_X   (1 << 10)

◆ HSD_PAD_Y

#define HSD_PAD_Y   (1 << 11)

◆ HSD_PAD_START

#define HSD_PAD_START   (1 << 12)

◆ HSD_PAD_LR

#define HSD_PAD_LR   (1 << 31)

Digital input of either L or R.

◆ HSD_PAD_AB

#define HSD_PAD_AB   (HSD_PAD_A | HSD_PAD_B)

◆ HSD_PAD_XY

#define HSD_PAD_XY   (HSD_PAD_X | HSD_PAD_Y)

◆ PAD_ERR_NO_CONTROLLER

#define PAD_ERR_NO_CONTROLLER   -1

Typedef Documentation

◆ HSD_Pad

typedef u32 HSD_Pad

Enumeration Type Documentation

◆ HSD_FlushType

Enumerator
HSD_PAD_FLUSH_QUEUE_MERGE 
HSD_PAD_FLUSH_QUEUE_THROWAWAY 
HSD_PAD_FLUSH_QUEUE_LEAVE1 
HSD_PAD_FLUSH_QUEUE_TERMINATE 

Function Documentation

◆ HSD_PadGetNmlStickY()

float HSD_PadGetNmlStickY ( u8 slot)
inlinestatic

◆ HSD_PadGetNmlSubStickY()

float HSD_PadGetNmlSubStickY ( u8 slot)
inlinestatic

◆ HSD_PadFlushQueue()

void HSD_PadFlushQueue ( HSD_FlushType ftype)

◆ HSD_PadGetRawQueueCount()

u8 HSD_PadGetRawQueueCount ( void )

◆ HSD_PadGetResetSwitch()

s32 HSD_PadGetResetSwitch ( void )

◆ HSD_PadRenewRawStatus()

void HSD_PadRenewRawStatus ( bool err_check)

◆ HSD_PadRenewMasterStatus()

void HSD_PadRenewMasterStatus ( void )

◆ HSD_PadRenewCopyStatus()

void HSD_PadRenewCopyStatus ( void )

◆ HSD_PadRenewGameStatus()

void HSD_PadRenewGameStatus ( void )

◆ HSD_PadRenewStatus()

void HSD_PadRenewStatus ( void )

◆ HSD_PadReset()

void HSD_PadReset ( void )

◆ HSD_PadInit()

void HSD_PadInit ( u8 qnum,
HSD_PadData * queue,
u16 nb_list,
HSD_PadRumbleListData * listdatap )

Variable Documentation

◆ HSD_PadMasterStatus

HSD_PadStatus HSD_PadMasterStatus[4]
extern

◆ HSD_PadGameStatus

HSD_PadStatus HSD_PadGameStatus[4]
extern

◆ HSD_PadCopyStatus

HSD_PadStatus HSD_PadCopyStatus[4]
extern