NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
KPAD.h
1#ifndef RVL_SDK_KPAD_H
2#define RVL_SDK_KPAD_H
3#include <types.h>
4
5#include <revolution/MTX.h>
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#define KPAD_MAX_SAMPLES 16
11
12typedef union KPADEXStatus {
13 struct {
14 Vec2 stick; // at 0x0
15 Vec acc; // at 0x8
16 f32 acc_value; // at 0x14
17 f32 acc_speed; // at 0x18
18 } fs; // at 0x0
19
20 struct {
21 u32 hold; // at 0x0
22 u32 trig; // at 0x4
23 u32 release; // at 0x8
24 Vec2 lstick; // at 0xC
25 Vec2 rstick; // at 0x14
26 f32 ltrigger; // at 0x1C
27 f32 rtrigger; // at 0x20
28 } cl; // at 0x0
30
31typedef struct KPADStatus {
32 u32 hold; // at 0x0
33 u32 trig; // at 0x4
34 u32 release; // at 0x8
35 Vec acc; // at 0xC
36 f32 acc_value; // at 0x18
37 f32 acc_speed; // at 0x1C
38 Vec2 pos; // at 0x20
39 Vec2 vec; // at 0x28
40 f32 speed; // at 0x30
41 Vec2 horizon; // at 0x34
42 Vec2 hori_vec; // at 0x3C
43 f32 hori_speed; // at 0x44
44 f32 dist; // at 0x48
45 f32 dist_vec; // at 0x4C
46 f32 dist_speed; // at 0x50
47 Vec2 acc_vertical; // at 0x54
48 u8 dev_type; // at 0x5C
49 s8 wpad_err; // at 0x5D
50 s8 dpd_valid_fg; // at 0x5E
51 u8 data_format; // at 0x5F
52 KPADEXStatus ex_status; // at 0x60
54
55void KPADSetBtnRepeat(s32 chan, f32, f32);
56
57void KPADSetPosParam(s32 chan, f32 playRadius, f32 sensitivity);
58void KPADSetHoriParam(s32 chan, f32 playRadius, f32 sensitivity);
59void KPADSetDistParam(s32 chan, f32 playRadius, f32 sensitivity);
60void KPADSetAccParam(s32 chan, f32 playRadius, f32 sensitivity);
61
62s32 KPADRead(s32 chan, KPADStatus* pSamples, s32 numSamples);
63
64void KPADInit(void);
65
66#ifdef __cplusplus
67}
68#endif
69#endif
Definition mtxtypes.h:11