1#pragma once
2
3#include <math/seadVector.h>
4
5namespace al {
6
7class JoyPadAccelPoseAnalyzer {
8public:
9 class HistoryInfo {
10 public:
11 void calcHistory(const sead::Vector3f&, const sead::Vector3f&, f32);
12
13 unsigned char padding_0[0x60];
14 f32 hist0;
15 unsigned char padding_1[0x70 - 0x64];
16 f32 hist1;
17 unsigned char padding_2[0x1c];
18 };
19
20 class PoseAxisDir {
21 public:
22 void calcHistory(const sead::Vector3f&, const sead::Vector3f&);
23
24 unsigned char padding_1[0x88];
25 sead::Vector2f unkVec0;
26 unsigned char padding_0[0x98 - (0x88 + 0x8)];
27 };
28
29 bool isSwingAnyHand() const;
30 bool isSwingDoubleHandSameDir() const;
31 bool isSwingDoubleHand() const;
32 bool isSwingDoubleHandReverseDir() const;
33 bool isSwingDoubleHandReverseInsideDir() const;
34 bool isSwingDoubleHandReverseOutsideDir() const;
35 bool isSwingLeftHand() const;
36 bool isSwingRightHand() const;
37 void setSwingBorder(f32, f32);
38 void update();
39 JoyPadAccelPoseAnalyzer getSwingDirDoubleHandSameDir() const;
40
41 s32 mControllerPort; // port of the controller
42 s32 mAccelDeviceNum; // number of accelerometers
43 bool gap00; // unknown
44 bool mSwingLeft; // shaking the left joycon
45 bool mSwingRight; // shaking the right joycon
46 bool mSwingAny; // shaking anything
47 sead::Vector2f mSwingBorder; // Border to trigger a motion shake
48 sead::Vector2f mAccelLeftVel; // Accelerometer of the Left Joycon
49 sead::Vector2f mAccelRightVel; // Accelerometer of the Right Joycon
50 sead::Vector2f mAccelCombinedVel; // Combined vectors of the left and right joycons
51 sead::Vector2f mAccelLeftAccel; // Acceleration of the left joycon
52 sead::Vector2f mAccelRightAccel; // Acceleration of the right joycon
53 sead::Vector2f mGyroRoll; // Roll of the gyroscope, each component is left/right joycon.
54 unsigned char padding_0[0x4]; // padding because there is nothing here
55 HistoryInfo mHistoryLeft; // History info of the left joycon
56 HistoryInfo mHistoryRight; // History info of the right joycon
57 bool gap01; // unknown bool
58 unsigned char padding_1[0x7]; // padding because there is nothing here
59 PoseAxisDir unknown0;
60 PoseAxisDir unknown1;
61 PoseAxisDir unknown2;
62};
63
64} // namespace al
65