90 lines
3.9 KiB
C
90 lines
3.9 KiB
C
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
#include "gk/structs/manager.h"
|
|
#include "gk/structs/validity.h"
|
|
|
|
#define GK_OFFSET_ASSERT(type, field, offset) \
|
|
static_assert(offsetof(type, field) == (offset), #type "::" #field " offset")
|
|
|
|
GK_OFFSET_ASSERT(gk::Vec3, x, 0x00);
|
|
GK_OFFSET_ASSERT(gk::Vec3, y, 0x04);
|
|
GK_OFFSET_ASSERT(gk::Vec3, z, 0x08);
|
|
static_assert(sizeof(gk::Vec3) == 0x0c, "gk::Vec3 size");
|
|
|
|
GK_OFFSET_ASSERT(gk::Vec4, x, 0x00);
|
|
GK_OFFSET_ASSERT(gk::Vec4, y, 0x04);
|
|
GK_OFFSET_ASSERT(gk::Vec4, z, 0x08);
|
|
GK_OFFSET_ASSERT(gk::Vec4, w, 0x0c);
|
|
static_assert(sizeof(gk::Vec4) == 0x10, "gk::Vec4 size");
|
|
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m00, 0x00);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m01, 0x04);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m02, 0x08);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m03, 0x0c);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m10, 0x10);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m11, 0x14);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m12, 0x18);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m13, 0x1c);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m20, 0x20);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m21, 0x24);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m22, 0x28);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m23, 0x2c);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m30, 0x30);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m31, 0x34);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m32, 0x38);
|
|
GK_OFFSET_ASSERT(gk::Matrix4x4, m33, 0x3c);
|
|
static_assert(sizeof(gk::Matrix4x4) == 0x40, "gk::Matrix4x4 size");
|
|
|
|
GK_OFFSET_ASSERT(gk::SkeletonData, tracking_state, 0x000);
|
|
GK_OFFSET_ASSERT(gk::SkeletonData, tracking_id, 0x004);
|
|
GK_OFFSET_ASSERT(gk::SkeletonData, enrollment_index, 0x008);
|
|
GK_OFFSET_ASSERT(gk::SkeletonData, user_index, 0x00c);
|
|
GK_OFFSET_ASSERT(gk::SkeletonData, position, 0x010);
|
|
GK_OFFSET_ASSERT(gk::SkeletonData, joint_positions, 0x020);
|
|
GK_OFFSET_ASSERT(gk::SkeletonData, joint_tracking_states, 0x160);
|
|
GK_OFFSET_ASSERT(gk::SkeletonData, quality_flags, 0x1b0);
|
|
static_assert(sizeof(gk::SkeletonData) == 0x1b4, "gk::SkeletonData size");
|
|
|
|
GK_OFFSET_ASSERT(gk::SkeletonFrame, timestamp, 0x000);
|
|
GK_OFFSET_ASSERT(gk::SkeletonFrame, frame_number, 0x008);
|
|
GK_OFFSET_ASSERT(gk::SkeletonFrame, flags, 0x00c);
|
|
GK_OFFSET_ASSERT(gk::SkeletonFrame, floor_clip_plane, 0x010);
|
|
GK_OFFSET_ASSERT(gk::SkeletonFrame, normal_to_gravity, 0x020);
|
|
GK_OFFSET_ASSERT(gk::SkeletonFrame, skeletons, 0x030);
|
|
static_assert(sizeof(gk::SkeletonFrame) == 0xa68, "gk::SkeletonFrame size");
|
|
|
|
GK_OFFSET_ASSERT(gk::ValidityBox, minimum, 0x00);
|
|
GK_OFFSET_ASSERT(gk::ValidityBox, maximum, 0x0c);
|
|
static_assert(sizeof(gk::ValidityBox) == 0x18, "gk::ValidityBox size");
|
|
|
|
GK_OFFSET_ASSERT(gk::ValidityCandidate, source_position, 0x00);
|
|
GK_OFFSET_ASSERT(gk::ValidityCandidate, transformed_position, 0x0c);
|
|
GK_OFFSET_ASSERT(gk::ValidityCandidate, tracking_id, 0x18);
|
|
GK_OFFSET_ASSERT(gk::ValidityCandidate, valid, 0x1c);
|
|
GK_OFFSET_ASSERT(gk::ValidityCandidate, reserved, 0x1d);
|
|
static_assert(sizeof(gk::ValidityCandidate) == 0x20,
|
|
"gk::ValidityCandidate size");
|
|
|
|
GK_OFFSET_ASSERT(gk::LiveManager, nui_thread_address, 0x0000);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, committed_subsystems, 0x000c);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, subsystem_mask, 0x0010);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, flags, 0x0014);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, reference_direction, 0x0020);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, gravity, 0x002c);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, skeleton_frame, 0x01a0);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, requested_tracking_ids, 0x15f0);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, skeleton_tracking_enabled, 0x15f8);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, nui_sensor_address, 0x15fc);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, selected_tracking_ids, 0x1684);
|
|
GK_OFFSET_ASSERT(gk::LiveManager, synthetic_tracking_mode, 0x17f4);
|
|
|
|
GK_OFFSET_ASSERT(gk::CursorControllerState, inner_address, 0x000);
|
|
GK_OFFSET_ASSERT(gk::CursorControllerState, player1_x, 0x108);
|
|
GK_OFFSET_ASSERT(gk::CursorControllerState, player1_y, 0x10c);
|
|
GK_OFFSET_ASSERT(gk::CursorControllerState, player2_x, 0x110);
|
|
GK_OFFSET_ASSERT(gk::CursorControllerState, player2_y, 0x114);
|
|
|
|
#undef GK_OFFSET_ASSERT
|