Files
mtgodot-poc/extension/src/port/common/shim/sdk/granny.h
T
shenleiandClaude Opus 5 9a8e11f3dd port 2A step 4: platform skeleton + rest of the 2V3 header closure
- Mirror the remaining non-Python 2V3 closure headers (98 more, 173 total): EffectLib,
  EterGrnLib, SpeedTreeLib, SphereLib, PRTerrainLib, EterImageLib, EterBase/Poly, cipher/tea,
  EterLib Grp*/IME/Input/MSWindow/StateManager, GameLib actor/map/race headers, EterPack.
- SDK shims: granny.h, SpeedTreeRT.h, imm.h, Dimm.h (the SDK MIDL header, not mirrored),
  dinput/d3dx8 additions; D3D8 render-state enums, FVF macros and the COM resource hierarchy;
  more Win32 GDI/handle types with layout static_asserts.
- PORT edits for MSVC-permissive code (typename, friend visibility, <algorithm>, pointer→uintptr_t)
  and PRTerrainLib/StdAfx.h dropping the ScriptLib/Python include.
- port_logic links the vendored cryptopp/minilzo.
- extension/src/platform: port_platform target with 103 generated stub files (1917 function
  stubs, 146 static members) from the new platform_stub.py (clang -ast-dump-filter);
  MT_PLATFORM_STUB() marks every unimplemented body. libmtgodot links port_platform and
  port_gate.sh builds it.

Gate: macOS, Android, iOS, Windows (mingw) PASS; Linux BLOCKED (no toolchain).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 21:46:24 +09:00

71 lines
1.9 KiB
C

#pragma once
// Shim for RAD Granny 2.11 <granny.h> (40250 extern/include): the scalar types and structs that
// EterGrnLib headers name, with the SDK's layout; every other Granny object is opaque. Loading and
// skinning go through platform/ (backed by libgr2), never through these declarations.
#include <stdint.h>
typedef uint32_t granny_uint32;
typedef int32_t granny_int32;
typedef uint16_t granny_uint16;
typedef int16_t granny_int16;
typedef uint8_t granny_uint8;
typedef int8_t granny_int8;
typedef float granny_real32;
typedef granny_uint32 granny_bool32;
typedef uintptr_t granny_uintaddrx;
typedef granny_real32 granny_triple[3];
typedef granny_real32 granny_quad[4];
typedef enum granny_member_type
{
GrannyEndMember,
GrannyInlineMember,
GrannyReferenceMember,
GrannyReferenceToArrayMember,
GrannyArrayOfReferencesMember,
GrannyVariantReferenceMember,
GrannyUnsupportedMemberType_Remove,
GrannyReferenceToVariantArrayMember,
GrannyStringMember,
GrannyTransformMember,
GrannyReal32Member,
GrannyInt8Member,
GrannyUInt8Member,
GrannyBinormalInt8Member,
GrannyNormalUInt8Member,
GrannyInt16Member,
GrannyUInt16Member,
GrannyBinormalInt16Member,
GrannyNormalUInt16Member,
GrannyInt32Member,
GrannyUInt32Member,
GrannyReal16Member,
GrannyEmptyReferenceMember,
GrannyOnePastLastMemberType,
GrannyBool32Member = GrannyInt32Member,
Grannymember_type_forceint = 0x7fffffff
} granny_member_type;
struct granny_data_type_definition
{
granny_member_type Type;
char const* Name;
granny_data_type_definition* ReferenceType;
granny_int32 ArrayWidth;
granny_int32 Extra[3];
granny_uintaddrx Ignored_Ignored;
};
struct granny_animation;
struct granny_control;
struct granny_file;
struct granny_file_info;
struct granny_material;
struct granny_mesh;
struct granny_mesh_binding;
struct granny_mesh_deformer;
struct granny_model;
struct granny_model_instance;
struct granny_skeleton;
struct granny_world_pose;