mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-24 20:36:19 +02:00
48 lines
3.8 KiB
C++
48 lines
3.8 KiB
C++
#pragma once
|
|
#include "engine.h"
|
|
#include "Engine/Game/Build/fingerprint.h"
|
|
namespace dingosdk::game::build::v20260929::named_settings {
|
|
// Named getter/setter callers at 0x2d6dfe0..0x2d6e277 and the preset
|
|
// parser at 0x5f77ef independently establish these ABIs. The typed setter
|
|
// increments DdcDirtyVersion and calls registered setting listeners.
|
|
inline constexpr std::uintptr_t named_settings_manager = engine::settings_manager;
|
|
inline constexpr std::uintptr_t named_settings_get = 0x18d95e0;
|
|
inline constexpr std::uintptr_t named_settings_set = 0x18d9c50;
|
|
inline constexpr std::uintptr_t native_bool = engine::bool_type;
|
|
inline constexpr std::uintptr_t native_int32 = engine::int32_type;
|
|
inline constexpr std::uintptr_t native_uint32 = engine::uint32_type;
|
|
inline constexpr std::uintptr_t native_float32 = engine::float_type;
|
|
inline constexpr std::uintptr_t native_cstring = engine::string_type;
|
|
// Pointer to the reflection symbol registry (count at +0xd0); populated before
|
|
// named lookups are attempted.
|
|
inline constexpr std::uintptr_t symbol_registry = 0x765d318;
|
|
// Enumeration (reads only). The manager's group map (FUN_1418d2630 registers,
|
|
// FUN_1418d2d30 walks it): buckets +0xa0, bucket count u32 +0xa8, element count
|
|
// u32 +0xac; node {char* name, object*, ..., next +0x40}; object +8 = class
|
|
// TypeInfo. A second map of raw structs (FUN_1418d2930): buckets +0xf0, count
|
|
// +0xf8, elements +0xfc; node {char* name, TypeInfo*, data*, ..., next +0x48}.
|
|
// The manager lock is the critical section at +0x70.
|
|
inline constexpr std::size_t group_buckets = 0xa0, group_bucket_count = 0xa8, group_count = 0xac, group_next = 0x40;
|
|
inline constexpr std::size_t raw_buckets = 0xf0, raw_bucket_count = 0xf8, raw_count = 0xfc, raw_next = 0x48;
|
|
inline constexpr std::size_t manager_lock = 0x70;
|
|
// Registry name map (FUN_143dabc00): buckets +0x78, count u32 +0x80; node
|
|
// {u64 key, char* name, next +0x10}, keyed by field-data or descriptor address.
|
|
inline constexpr std::size_t name_buckets = 0x78, name_bucket_count = 0x80;
|
|
// TypeInfo: +0 descriptor, +0x20 super TypeInfo (FUN_143dc4960). Descriptor:
|
|
// +4 u16 flags (kind = bits 5..9; 3 class, 2 value type), +0x2a u16 own field
|
|
// count, fields at +0x38 (class) or +0x60 (value type, FUN_143dd70a0); 0x18-byte
|
|
// field data {u32 name hash, u16 offset @8, TypeInfo* @0x10} (FUN_143db7ac0).
|
|
inline constexpr std::size_t type_super = 0x20, descriptor_field_count = 0x2a,
|
|
class_fields = 0x38, value_fields = 0x60, field_size = 0x18, field_type = 0x10;
|
|
// SystemSettings: every group inherits its "Platform" field; not a setting.
|
|
inline constexpr std::uintptr_t system_settings_type = 0x7490460;
|
|
inline constexpr std::array<Fingerprint, 6> named_settings_sites{{
|
|
{named_settings_get, {0x48,0x83,0xec,0x48,0x44,0x88,0x4c,0x24,0x20,0x4d,0x8b,0xc8,0x4c,0x8b,0xc2,0x48,0x8d,0x54,0x24,0x30,0xe8,0x87,0xda,0xff,0xff,0x48,0x8b,0x00,0x48,0x83,0xc4,0x48}},
|
|
{0x18d7080, {0x40,0x53,0x55,0x56,0x57,0x41,0x56,0x48,0x81,0xec,0x60,0x01,0x00,0x00,0x48,0x8b,0x05,0x2b,0xd3,0x8e,0x05,0x48,0x33,0xc4,0x48,0x89,0x84,0x24,0x58,0x01,0x00,0x00}},
|
|
{named_settings_set, {0x40,0x55,0x53,0x56,0x57,0x41,0x56,0x41,0x57,0x48,0x8d,0xac,0x24,0x48,0xff,0xff,0xff,0x48,0x81,0xec,0xb8,0x01,0x00,0x00,0x48,0x8b,0x05,0x51,0xa7,0x8e,0x05,0x48}},
|
|
{0x18d5850, {0x4c,0x8b,0xdc,0x55,0x57,0x41,0x54,0x49,0x8d,0xab,0xc8,0xfb,0xff,0xff,0x48,0x81,0xec,0x20,0x05,0x00,0x00,0x48,0x8b,0x05,0x54,0xeb,0x8e,0x05,0x48,0x33,0xc4,0x48}},
|
|
{0x3db5290, {0x48,0x8b,0x01,0x4d,0x8b,0xd0,0x44,0x0f,0xb7,0x40,0x04,0x41,0xc1,0xe8,0x05,0x41,0x83,0xe0,0x1f,0x41,0x83,0xf8,0x1c,0x0f,0x87,0xe8,0x00,0x00,0x00,0x49,0x63,0xc0}},
|
|
{0x3daa880, {0x48,0x89,0x5c,0x24,0x08,0x48,0x89,0x74,0x24,0x10,0x57,0x48,0x83,0xec,0x20,0x49,0x8b,0x18,0x49,0x8b,0xf9,0x48,0x8b,0xcb,0x48,0x8b,0xf2,0xe8,0x7c,0x31,0x6c,0x01}},
|
|
}};
|
|
} // namespace dingosdk::game::build::v20260929::named_settings
|