diff options
| author | Elijah Thomas <42302100+elijah-thomas774@users.noreply.github.com> | 2024-05-31 20:10:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-31 20:10:22 -0400 |
| commit | fda931e2aead6b77c099f0e09d34ebd17c2d238c (patch) | |
| tree | 513414b3df3ead1c84b02e72808253d2069728ac /include/egg | |
| parent | bc9eaa1ca985315386ceed621c9fb64fc88d4eac (diff) | |
| parent | 35a4b294a158286fb1b44241914b780abecde9d2 (diff) | |
Merge pull request #47 from robojumper/m_pad
m_pad
Diffstat (limited to 'include/egg')
| -rw-r--r-- | include/egg/core/eggController.h | 17 | ||||
| -rw-r--r-- | include/egg/math/eggVector.h | 4 |
2 files changed, 16 insertions, 5 deletions
diff --git a/include/egg/core/eggController.h b/include/egg/core/eggController.h index b3b4c024..ba983622 100644 --- a/include/egg/core/eggController.h +++ b/include/egg/core/eggController.h @@ -25,12 +25,15 @@ class CoreStatus { public: /* 0x00 */ u8 field_0x00[0x0C]; /* 0x0C */ f32 accel[3]; - /* 0x18 */ u8 field_0x01[0x08]; + /* 0x18 */ u8 field_0x01[0x20 - 0x18]; /* 0x20 */ f32 dpdRawX; /* 0x24 */ f32 dpdRawY; - /* 0x28 */ u8 field_0x02[0x36]; - /* 0x58 */ s8 dpdDistance; - /* 0x5C */ s8 unknown; + /* 0x28 */ u8 field_0x02[0x54 - 0x28]; + /* 0x54 */ f32 float_0x54; + /* 0x58 */ f32 float_0x58; + /* 0x5C */ u8 field_0x5C[0x5E - 0x5C]; + /* 0x5E */ s8 dpdDistance; + /* 0x5F */ s8 unknown; /* 0x60 */ f32 fsStickButton; /* 0x60 */ f32 fsStickButton2; /* 0x64 */ u8 field_0x03[0x88]; @@ -38,6 +41,10 @@ public: public: /* 80498f90 */ void init(); /* 80498fa0 */ u32 getFSStickButton() const; + + inline Vector2f getUnk() { + return Vector2f(float_0x54, float_0x58); + } }; class CoreController { @@ -128,7 +135,7 @@ public: public: /* 80499b80 */ static CoreControllerMgr *createInstance(); /* 80499bd0 */ static void deleteInstance(); - /* 80499be0 */ CoreController *getNthController(s32); + /* 80499be0 */ CoreController *getNthController(int); static void *allocThunk(size_t size); static int deleteThunk(void *ptr); diff --git a/include/egg/math/eggVector.h b/include/egg/math/eggVector.h index 0d8735ee..2090b5b7 100644 --- a/include/egg/math/eggVector.h +++ b/include/egg/math/eggVector.h @@ -117,6 +117,10 @@ public: /* 805767c0 */ static const Vector2f zero; /* 805767c8 */ static const Vector2f ex; /* 805767d0 */ static const Vector2f ey; + + Vector2f operator-(const Vector2f &v) { + return Vector2f(x - v.x, y - v.y); + } }; struct Vector3s { |
