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.
36 lines
744 B
C++
36 lines
744 B
C++
#pragma once
|
|
|
|
// Portable-core value types; layout pinned by gk/offsets_assert.h, packing
|
|
// macros from gk/types.h. See docs/conventions.md ("Module ownership").
|
|
#include "gk/types.h"
|
|
|
|
namespace gk {
|
|
|
|
// Natural x86 layout confirmed by the float-indexed accesses in
|
|
// FUN_101799b0, FUN_101ab5b0, and FUN_101ab640.
|
|
GK_PACK_PUSH(8)
|
|
struct Vec3 {
|
|
float x;
|
|
float y;
|
|
float z;
|
|
};
|
|
|
|
struct Vec4 {
|
|
float x;
|
|
float y;
|
|
float z;
|
|
float w;
|
|
};
|
|
|
|
// Row-major storage. FUN_101799b0 reads all sixteen contiguous floats and
|
|
// FUN_100e4140 applies rows 0..2 to candidate positions.
|
|
struct Matrix4x4 {
|
|
float m00, m01, m02, m03;
|
|
float m10, m11, m12, m13;
|
|
float m20, m21, m22, m23;
|
|
float m30, m31, m32, m33;
|
|
};
|
|
GK_PACK_POP
|
|
|
|
} // namespace gk
|