Introduce the core/platform/host header seam under include/gk/ (portable value
types in core/, Kinect/PE mirror layouts in platform/, the camera-elevation
service interface in host/); the existing include/gk/structs/* paths become
compatibility forwards so no definition is duplicated. Add include/gk/fp.h with
gk::fp::round32 (binary32 rounding barrier) and gk::fp::ExtendedAcc (long double
faithful / double portable), and a GK_FIDELITY=faithful|portable CMake knob
paired with -mfpmath; faithful stays the drop-in differential target. i386-gate
GK_CDECL/STDCALL/THISCALL so non-i386 GNU builds get empty macros (native
-Werror). Migrate the three proven slice functions onto the seam without
behaviour change: box_distance expresses FP through gk/fp.h while keeping the
volatile spill the differential pins; the bodies stay in src/game/*.cpp where
prove_t11.py compiles and greps them. Add tools/seam_symbol_check.py (G5) and
re/game/seam_symbols.json asserting each flagged seam RVA ships as a
non-inlined, addressable symbol.
Verified: prove_t11.py exit 0 / ALL DIFFERENTIALS PASS (faithful, exact-FP from
df1620e); native GK_FIDELITY=portable validity compile under -Werror; macro
cross-check; G5 tool reports all three seam symbols addressable.
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
#pragma once
|
|
|
|
// Platform-quarantine mirror layout: Kinect NUI v1 wire structs copied verbatim
|
|
// from the sensor runtime. Layout pinned by gk/offsets_assert.h. See
|
|
// docs/conventions.md ("Module ownership and the portability seam").
|
|
#include "gk/core/math.h"
|
|
|
|
namespace gk {
|
|
|
|
constexpr std::size_t kSkeletonCount = 6;
|
|
constexpr std::size_t kSkeletonJointCount = 20;
|
|
|
|
enum class SkeletonTrackingState : std::uint32_t {
|
|
not_tracked = 0,
|
|
position_only = 1,
|
|
tracked = 2,
|
|
};
|
|
|
|
enum class JointTrackingState : std::uint32_t {
|
|
not_tracked = 0,
|
|
inferred = 1,
|
|
tracked = 2,
|
|
};
|
|
|
|
// Kinect NUI v1 wire layout recovered at manager+0x1d0. FUN_100e4140 advances
|
|
// through candidates by 0x1b4 bytes, exactly sizeof(SkeletonData).
|
|
GK_PACK_PUSH(8)
|
|
struct SkeletonData {
|
|
SkeletonTrackingState tracking_state;
|
|
std::uint32_t tracking_id;
|
|
std::uint32_t enrollment_index;
|
|
std::uint32_t user_index;
|
|
Vec4 position;
|
|
Vec4 joint_positions[kSkeletonJointCount];
|
|
JointTrackingState joint_tracking_states[kSkeletonJointCount];
|
|
std::uint32_t quality_flags;
|
|
};
|
|
|
|
// NUI_SKELETON_FRAME copied into the live manager at +0x1a0.
|
|
struct SkeletonFrame {
|
|
std::int64_t timestamp;
|
|
std::uint32_t frame_number;
|
|
std::uint32_t flags;
|
|
Vec4 floor_clip_plane;
|
|
Vec4 normal_to_gravity;
|
|
SkeletonData skeletons[kSkeletonCount];
|
|
};
|
|
GK_PACK_POP
|
|
|
|
} // namespace gk
|