upgradeable types!
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <cassert>
|
||||
|
||||
namespace Gen
|
||||
{
|
||||
@@ -158,6 +159,7 @@ namespace Gen
|
||||
static constexpr uint16_t TypeIdx = 24;
|
||||
Vec4 TileBaseColor = {};
|
||||
Vec4 TileDotColor = {};
|
||||
Vec3 Test = {};
|
||||
Vec4 DisabledCardTint = {};
|
||||
};
|
||||
struct StaticPuzzleData
|
||||
@@ -272,6 +274,12 @@ namespace Gen
|
||||
bool Load(SavedEntityRenderData* obj, uint32_t count, Deserializer& serializer);
|
||||
|
||||
namespace Meta {
|
||||
struct StrRef
|
||||
{
|
||||
uint16_t Offset;
|
||||
uint16_t Size;
|
||||
};
|
||||
|
||||
struct TypeDef
|
||||
{
|
||||
uint32_t Size = 0;
|
||||
@@ -279,6 +287,7 @@ namespace Gen
|
||||
char Name[64]{"Dummy"};
|
||||
uint16_t ChildCount = 0;
|
||||
uint16_t ChildIndices[64]{0};
|
||||
StrRef MemberNameIndices[64]{0};
|
||||
};
|
||||
|
||||
struct EnumDef
|
||||
@@ -291,42 +300,43 @@ namespace Gen
|
||||
{
|
||||
TypeDef TypeDefinitions[30]
|
||||
{
|
||||
TypeDef{sizeof(int8_t), 0, "i8", 0, {}},
|
||||
TypeDef{sizeof(int16_t), 1, "i16", 0, {}},
|
||||
TypeDef{sizeof(int32_t), 2, "i32", 0, {}},
|
||||
TypeDef{sizeof(int64_t), 3, "i64", 0, {}},
|
||||
TypeDef{sizeof(uint8_t), 4, "u8", 0, {}},
|
||||
TypeDef{sizeof(uint16_t), 5, "u16", 0, {}},
|
||||
TypeDef{sizeof(uint32_t), 6, "u32", 0, {}},
|
||||
TypeDef{sizeof(uint64_t), 7, "u64", 0, {}},
|
||||
TypeDef{sizeof(bool), 8, "b", 0, {}},
|
||||
TypeDef{sizeof(float), 9, "f32", 0, {}},
|
||||
TypeDef{sizeof(double), 10, "f64", 0, {}},
|
||||
TypeDef{sizeof(char), 11, "str", 0, {}},
|
||||
TypeDef{sizeof(Vec2), 2667033957, "Vec2", 2, {9, 9}},
|
||||
TypeDef{sizeof(Vec3), 473740858, "Vec3", 3, {9, 9, 9}},
|
||||
TypeDef{sizeof(Vec4), 2507696603, "Vec4", 4, {9, 9, 9, 9}},
|
||||
TypeDef{sizeof(Mat3), 3364737048, "Mat3", 1, {9}},
|
||||
TypeDef{sizeof(Mat4), 1650094019, "Mat4", 1, {9}},
|
||||
TypeDef{sizeof(Transform), 4103530190, "Transform", 5, {16, 16, 13, 16, 13}},
|
||||
TypeDef{sizeof(AssetHandle), 2609735487, "AssetHandle", 1, {6}},
|
||||
TypeDef{sizeof(ModelHandle), 298089627, "ModelHandle", 2, {5, 18}},
|
||||
TypeDef{sizeof(TextureHandle), 1633273761, "TextureHandle", 2, {5, 18}},
|
||||
TypeDef{sizeof(PuzPos), 1834398141, "PuzPos", 2, {0, 0}},
|
||||
TypeDef{sizeof(StaticPuzzleCard), 3413177578, "StaticPuzzleCard", 3, {0, 19, 20}},
|
||||
TypeDef{sizeof(StaticPuzzleCardHandle), 1742502768, "StaticPuzzleCardHandle", 1, {5}},
|
||||
TypeDef{sizeof(PuzzleVisualSettings), 4208425878, "PuzzleVisualSettings", 3, {14, 14, 14}},
|
||||
TypeDef{sizeof(StaticPuzzleData), 423465540, "StaticPuzzleData", 2, {22, 24}},
|
||||
TypeDef{sizeof(PuzzleCardStack), 53538532, "PuzzleCardStack", 3, {23, 4, 4}},
|
||||
TypeDef{sizeof(PlacedPuzzleCard), 3555575973, "PlacedPuzzleCard", 4, {23, 21, 4, 8}},
|
||||
TypeDef{sizeof(PuzzleData), 3349686056, "PuzzleData", 10, {5, 11, 4, 4, 6, 26, 27, 0, 6, 21}},
|
||||
TypeDef{sizeof(SavedEntityRenderData), 3172756855, "SavedEntityRenderData", 7, {14, 14, 17, 1, 20, 19, 8}},
|
||||
TypeDef{sizeof(int8_t), 0, "i8", 0, {}, {}},
|
||||
TypeDef{sizeof(int16_t), 1, "i16", 0, {}, {}},
|
||||
TypeDef{sizeof(int32_t), 2, "i32", 0, {}, {}},
|
||||
TypeDef{sizeof(int64_t), 3, "i64", 0, {}, {}},
|
||||
TypeDef{sizeof(uint8_t), 4, "u8", 0, {}, {}},
|
||||
TypeDef{sizeof(uint16_t), 5, "u16", 0, {}, {}},
|
||||
TypeDef{sizeof(uint32_t), 6, "u32", 0, {}, {}},
|
||||
TypeDef{sizeof(uint64_t), 7, "u64", 0, {}, {}},
|
||||
TypeDef{sizeof(bool), 8, "b", 0, {}, {}},
|
||||
TypeDef{sizeof(float), 9, "f32", 0, {}, {}},
|
||||
TypeDef{sizeof(double), 10, "f64", 0, {}, {}},
|
||||
TypeDef{sizeof(char), 11, "str", 0, {}, {}},
|
||||
TypeDef{sizeof(Vec2), 2667033957, "Vec2", 2, {9, 9}, {{0, 1}, {1, 1}}},
|
||||
TypeDef{sizeof(Vec3), 473740858, "Vec3", 3, {9, 9, 9}, {{2, 1}, {3, 1}, {4, 1}}},
|
||||
TypeDef{sizeof(Vec4), 2507696603, "Vec4", 4, {9, 9, 9, 9}, {{5, 1}, {6, 1}, {7, 1}, {8, 1}}},
|
||||
TypeDef{sizeof(Mat3), 3364737048, "Mat3", 1, {9}, {{9, 1}}},
|
||||
TypeDef{sizeof(Mat4), 1650094019, "Mat4", 1, {9}, {{10, 1}}},
|
||||
TypeDef{sizeof(Transform), 4103530190, "Transform", 5, {16, 16, 13, 16, 13}, {{11, 1}, {12, 2}, {14, 8}, {22, 8}, {30, 5}}},
|
||||
TypeDef{sizeof(AssetHandle), 2609735487, "AssetHandle", 1, {6}, {{35, 3}}},
|
||||
TypeDef{sizeof(ModelHandle), 298089627, "ModelHandle", 2, {5, 18}, {{38, 8}, {46, 5}}},
|
||||
TypeDef{sizeof(TextureHandle), 1633273761, "TextureHandle", 2, {5, 18}, {{51, 10}, {61, 5}}},
|
||||
TypeDef{sizeof(PuzPos), 1834398141, "PuzPos", 2, {0, 0}, {{66, 1}, {67, 1}}},
|
||||
TypeDef{sizeof(StaticPuzzleCard), 3413177578, "StaticPuzzleCard", 3, {0, 19, 20}, {{68, 8}, {76, 11}, {87, 18}}},
|
||||
TypeDef{sizeof(StaticPuzzleCardHandle), 1742502768, "StaticPuzzleCardHandle", 1, {5}, {{105, 3}}},
|
||||
TypeDef{sizeof(PuzzleVisualSettings), 2302077481, "PuzzleVisualSettings", 4, {14, 14, 13, 14}, {{108, 13}, {121, 12}, {133, 4}, {137, 16}}},
|
||||
TypeDef{sizeof(StaticPuzzleData), 3618749873, "StaticPuzzleData", 2, {22, 24}, {{153, 5}, {158, 7}}},
|
||||
TypeDef{sizeof(PuzzleCardStack), 53538532, "PuzzleCardStack", 3, {23, 4, 4}, {{165, 7}, {172, 17}, {189, 9}}},
|
||||
TypeDef{sizeof(PlacedPuzzleCard), 3555575973, "PlacedPuzzleCard", 4, {23, 21, 4, 8}, {{198, 7}, {205, 8}, {213, 8}, {221, 8}}},
|
||||
TypeDef{sizeof(PuzzleData), 3349686056, "PuzzleData", 10, {5, 11, 4, 4, 6, 26, 27, 0, 6, 21}, {{229, 2}, {231, 10}, {241, 10}, {251, 11}, {262, 18}, {280, 14}, {294, 11}, {305, 15}, {320, 17}, {337, 13}}},
|
||||
TypeDef{sizeof(SavedEntityRenderData), 3172756855, "SavedEntityRenderData", 7, {14, 14, 17, 1, 20, 19, 8}, {{350, 9}, {359, 14}, {373, 2}, {375, 8}, {383, 7}, {390, 5}, {395, 7}}},
|
||||
};
|
||||
EnumDef EnumDefinitions[2]
|
||||
{
|
||||
EnumDef{sizeof(PuzzleElementType::Enum), 2983807453},
|
||||
EnumDef{sizeof(EMaterial::Enum), 2024002654},
|
||||
};
|
||||
char MemberNameBuffer[64*64*64]{"xyxyzxyzwMMMMIPositionRotationScaleIdxModelIdxAssetTextureIdxAssetXYElementsModelHandleBoardTextureHandleIdxTileBaseColorTileDotColorTestDisabledCardTintCardsVisualsRefCardMaxAvailableCountUsedCountRefCardPositionRotationIsLockedIDPuzzleNameWidthTilesHeightTilesAvailableCardCountAvailableCardsPlacedCardsBackgroundTilesGoalPositionCountGoalPositionsBaseColorHighlightColorTFMaterialTextureModelVisible"};
|
||||
};
|
||||
|
||||
constexpr MetadataTable Metadata;
|
||||
|
||||
Reference in New Issue
Block a user