Changes

751 bytes added ,  17:55, 4 July 2017
Filled VPADData (https://github.com/Maschell/dynamic_libs/pull/11/commits/bd0862328bf4f6adf1600418098d0bfae001a37d)
Line 40: Line 40:     
<syntaxhighlight lang="C">
 
<syntaxhighlight lang="C">
 +
typedef struct
 +
{
 +
    float x, y;
 +
} Vec2D;
 +
 +
typedef struct
 +
{
 +
    float x, y, z;
 +
} Vec3D;
 +
 
typedef struct
 
typedef struct
 
{
 
{
Line 46: Line 56:  
     uint16_t validity;          /* 0 = All valid, 1 = X invalid, 2 = Y invalid, 3 = Both invalid? */
 
     uint16_t validity;          /* 0 = All valid, 1 = X invalid, 2 = Y invalid, 3 = Both invalid? */
 
} VPADTPData;
 
} VPADTPData;
 +
 +
typedef struct
 +
{
 +
    Vec3D X,Y,Z;
 +
} VPADOrientation;
    
typedef struct
 
typedef struct
Line 53: Line 68:  
     uint32_t btn_release;        /* Released buttons */
 
     uint32_t btn_release;        /* Released buttons */
 
     Vec2D lstick, rstick;        /* Each contains 4-byte X and Y components */
 
     Vec2D lstick, rstick;        /* Each contains 4-byte X and Y components */
     char unknown1c[0x52 - 0x1c]; /* Contains accelerometer and gyroscope data somewhere */
+
     Vec3D acc;                   /* Accelerometer value */
 +
    f32 accValue;                /* Accelerometer magnitude */
 +
    f32 accSpeed;                /* Accelerometer variation */
 +
    Vec2D accVertical;          /* Vertical direction of DRC */
 +
    Vec3D gyro;                  /* Gyro data */
 +
    Vec3D angle;                /* Angle data */
 +
    s8 vpadErr;                  /* Error status */
 
     VPADTPData tpdata;          /* Normal touchscreen data */
 
     VPADTPData tpdata;          /* Normal touchscreen data */
 
     VPADTPData tpdata1;          /* Modified touchscreen data 1 */
 
     VPADTPData tpdata1;          /* Modified touchscreen data 1 */
 
     VPADTPData tpdata2;          /* Modified touchscreen data 2 */
 
     VPADTPData tpdata2;          /* Modified touchscreen data 2 */
     char unknown6a[0xa0 - 0x6a];
+
     VPADOrientation dir;        /* Orientation in three-dimensional space */
     uint8_t volume;
+
    BOOL headphoneStatus;       /* Headphone status (TRUE : headphones are inserted) */
     uint8_t battery;            /* 0 to 6 */
+
    Vec3D magnet;                /* Magnetometer value */
     uint8_t unk_volume;         /* One less than volume */
+
     u8 volume;                   /* Slide Volume value (0 - 255) */
     char unknowna4[0xac - 0xa4];
+
     u8 batteryLevel;            /* Battery level ( 0 - 6 ) */
 +
     u8 micStatus;               /* Mic status */
 +
    u8 volumeCalibrated;        /* One less than volume */
 +
     u8 __paddings__[7];
 
} VPADData;
 
} VPADData;
 
</syntaxhighlight>
 
</syntaxhighlight>
12

edits