Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
pad.h
Go to the documentation of this file.
1
#ifndef PAD_H
2
#define PAD_H
3
4
#include "
dolphin/types.h
"
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
typedef
struct
OSContext
OSContext
;
11
12
#define PAD_CHAN0_BIT 0x80000000
13
#define PAD_CHAN1_BIT 0x40000000
14
#define PAD_CHAN2_BIT 0x20000000
15
#define PAD_CHAN3_BIT 0x10000000
16
17
#define PAD_SPEC_0 0
18
#define PAD_SPEC_1 1
19
#define PAD_SPEC_2 2
20
#define PAD_SPEC_3 3
21
#define PAD_SPEC_4 4
22
#define PAD_SPEC_5 5
23
24
#define PAD_MOTOR_STOP 0
25
#define PAD_MOTOR_RUMBLE 1
26
#define PAD_MOTOR_STOP_HARD 2
27
28
#define PAD_ERR_NONE 0
29
#define PAD_ERR_NO_CONTROLLER -1
30
#define PAD_ERR_NOT_READY -2
31
#define PAD_ERR_TRANSFER -3
32
33
#define PAD_BUTTON_LEFT 0x0001
34
#define PAD_BUTTON_RIGHT 0x0002
35
#define PAD_BUTTON_DOWN 0x0004
36
#define PAD_BUTTON_UP 0x0008
37
#define PAD_TRIGGER_Z 0x0010
38
#define PAD_TRIGGER_R 0x0020
39
#define PAD_TRIGGER_L 0x0040
40
#define PAD_BUTTON_A 0x0100
41
#define PAD_BUTTON_B 0x0200
42
#define PAD_BUTTON_X 0x0400
43
#define PAD_BUTTON_Y 0x0800
44
#define PAD_BUTTON_MENU 0x1000
45
#define PAD_BUTTON_START 0x1000
46
47
typedef
struct
PADStatus
{
48
/* 0x0 */
u16
button
;
49
/* 0x2 */
s8
stick_x
;
50
/* 0x3 */
s8
stick_y
;
51
/* 0x4 */
s8
substick_x
;
52
/* 0x5 */
s8
substick_y
;
53
/* 0x6 */
u8
trigger_left
;
54
/* 0x7 */
u8
trigger_right
;
55
/* 0x8 */
u8
analog_a
;
56
/* 0x9 */
u8
analog_b
;
57
/* 0xA */
s8
error
;
58
}
PADStatus
;
59
60
typedef
void
(*
PADSamplingCallback
)(
void
);
61
62
BOOL
PADInit
(
void
);
63
void
PADSetAnalogMode
(
u32
mode);
64
void
PADSetSpec
(
u32
spec
);
65
BOOL
PADReset
(
u32
mask
);
66
void
PADClampCircle
(
PADStatus
*
status
);
67
void
PADClamp
(
PADStatus
*
status
);
68
u32
PADRead
(
PADStatus
*
status
);
69
void
PADControlMotor
(
s32
channel,
u32
command);
70
BOOL
PADRecalibrate
(
u32
mask
);
71
72
extern
u32
__PADSpec
;
73
74
#ifdef __cplusplus
75
};
76
#endif
77
78
#endif
/* PAD_H */
cLib_calcTimer
T cLib_calcTimer(T *value)
Definition
c_lib.h:74
status
static s32 status
Definition
fstload.c:6
__PADSpec
u32 __PADSpec
Definition
Pad.c:374
PADRecalibrate
BOOL PADRecalibrate(u32 mask)
Definition
Pad.c:334
PADControlMotor
void PADControlMotor(s32 channel, u32 command)
Definition
Pad.c:515
PADClampCircle
void PADClampCircle(PADStatus *status)
Definition
Padclamp.c:163
PADSetSpec
void PADSetSpec(u32 spec)
Definition
Pad.c:537
PADInit
BOOL PADInit(void)
Definition
Pad.c:377
PADClamp
void PADClamp(PADStatus *status)
Definition
Padclamp.c:146
PADReset
BOOL PADReset(u32 mask)
Definition
Pad.c:306
PADRead
u32 PADRead(PADStatus *status)
Definition
Pad.c:411
PADSamplingCallback
void(* PADSamplingCallback)(void)
Definition
pad.h:60
PADSetAnalogMode
void PADSetAnalogMode(u32 mode)
Definition
Pad.c:736
OSContext
Definition
OSContext.h:137
PADStatus
Definition
pad.h:47
PADStatus::analog_b
u8 analog_b
Definition
pad.h:56
PADStatus::substick_y
s8 substick_y
Definition
pad.h:52
PADStatus::button
u16 button
Definition
pad.h:48
PADStatus::trigger_left
u8 trigger_left
Definition
pad.h:53
PADStatus::stick_y
s8 stick_y
Definition
pad.h:50
PADStatus::error
s8 error
Definition
pad.h:57
PADStatus::trigger_right
u8 trigger_right
Definition
pad.h:54
PADStatus::substick_x
s8 substick_x
Definition
pad.h:51
PADStatus::stick_x
s8 stick_x
Definition
pad.h:49
PADStatus::analog_a
u8 analog_a
Definition
pad.h:55
types.h
BOOL
int BOOL
Definition
types.h:27
s8
signed char s8
Definition
types.h:4
u32
unsigned long u32
Definition
types.h:10
u16
unsigned short u16
Definition
types.h:9
s32
signed long s32
Definition
types.h:6
u8
unsigned char u8
Definition
types.h:8
include
dolphin
pad.h
Generated by
1.9.8