diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ebeb847..58976fa 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: - conan-dependencies: + build-and-test: runs-on: ubuntu-latest timeout-minutes: 120 container: @@ -15,64 +15,11 @@ jobs: volumes: - /srv/romainboullard.com/caches/ccache:/ccache env: - ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }} - ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} - CCACHE_DIR: /ccache CCACHE_MAXSIZE: 10G CCACHE_BASEDIR: /root/.conan2 CCACHE_NOHASHDIR: "true" CCACHE_COMPILERCHECK: "%compiler% -dumpversion" - name: "Build And Upload Conan Dependencies to BigfootPackages" - steps: - - name: Install Node.js - run: apt-get update && apt-get install -y nodejs - - - name: Checkout repository - uses: actions/checkout@v6 - with: - submodules: recursive - - - name: Reset ccache stats - run: ccache --zero-stats - - - name: Build - run: | - for build_type in Debug RelWithDebInfo Release; do - conan install . --remote=bigfootpackages \ - -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/Tools/clang \ - --build=* \ - -s build_type=$build_type \ - -o bigfoot/*:build_tests=True \ - -o bigfoot/*:tracy=False \ - -o bigfoot/*:vulkan=True - done - conan install . --remote=bigfootpackages \ - -pr:h=./ConanProfiles/clang_asan -pr:b=./ConanProfiles/Tools/clang \ - --build=* \ - -s build_type=$build_type \ - -o bigfoot/*:build_tests=True \ - -o bigfoot/*:tracy=False \ - -o bigfoot/*:vulkan=True - - - name: Show ccache stats - run: ccache --show-stats - - - name: Upload - run: CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} conan upload "*" -r bigfootpackages --confirm - - build-and-test: - needs: conan-dependencies - runs-on: ubuntu-latest - timeout-minutes: 120 - container: - image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main - volumes: - - /srv/romainboullard.com/caches/ccache:/ccache - env: - CCACHE_DIR: /ccache - CCACHE_MAXSIZE: 10G - CCACHE_COMPILERCHECK: "%compiler% -dumpversion" strategy: matrix: build_type: ["Debug", "RelWithDebInfo", "Release"] diff --git a/.gitea/workflows/sonarqube.yml b/.gitea/workflows/sonarqube.yml index 2e2ce3f..b936c68 100644 --- a/.gitea/workflows/sonarqube.yml +++ b/.gitea/workflows/sonarqube.yml @@ -6,60 +6,6 @@ on: - main - Development - conan-dependencies: - runs-on: ubuntu-latest - timeout-minutes: 120 - container: - image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main - volumes: - - /srv/romainboullard.com/caches/ccache:/ccache - env: - ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }} - ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} - - CCACHE_DIR: /ccache - CCACHE_MAXSIZE: 10G - CCACHE_BASEDIR: /root/.conan2 - CCACHE_NOHASHDIR: "true" - CCACHE_COMPILERCHECK: "%compiler% -dumpversion" - name: "Build And Upload Conan Dependencies to BigfootPackages" - steps: - - name: Install Node.js - run: apt-get update && apt-get install -y nodejs - - - name: Checkout repository - uses: actions/checkout@v6 - with: - submodules: recursive - - - name: Reset ccache stats - run: ccache --zero-stats - - - name: Build - run: | - for build_type in Debug RelWithDebInfo Release; do - conan install . --remote=bigfootpackages \ - -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/Tools/clang \ - --build=* \ - -s build_type=$build_type \ - -o bigfoot/*:build_tests=True \ - -o bigfoot/*:tracy=False \ - -o bigfoot/*:vulkan=True - done - conan install . --remote=bigfootpackages \ - -pr:h=./ConanProfiles/clang_asan -pr:b=./ConanProfiles/Tools/clang \ - --build=* \ - -s build_type=$build_type \ - -o bigfoot/*:build_tests=True \ - -o bigfoot/*:tracy=False \ - -o bigfoot/*:vulkan=True - - - name: Show ccache stats - run: ccache --show-stats - - - name: Upload - run: CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} conan upload "*" -r bigfootpackages --confirm - jobs: build-and-test: runs-on: ubuntu-latest @@ -71,6 +17,8 @@ jobs: env: CCACHE_DIR: /ccache CCACHE_MAXSIZE: 10G + CCACHE_BASEDIR: /root/.conan2 + CCACHE_NOHASHDIR: "true" CCACHE_COMPILERCHECK: "%compiler% -dumpversion" name: "Sonarqube" steps: diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.bfbs b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.bfbs similarity index 60% rename from Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.bfbs rename to Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.bfbs index c9b0c49..8ef4efe 100644 Binary files a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.bfbs and b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.bfbs differ diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.bfbs_generated.hpp b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.bfbs_generated.hpp similarity index 79% rename from Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.bfbs_generated.hpp rename to Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.bfbs_generated.hpp index 4b1d56c..db43e55 100644 --- a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.bfbs_generated.hpp +++ b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.bfbs_generated.hpp @@ -1,36 +1,44 @@ /** - * Auto-generated header from: AssetHeader.bfbs + * Auto-generated header from: Asset.bfbs * Generated by Bin2CPP * * DO NOT TOUCH */ -#ifndef ASSETHEADER_BFBS_HPP -#define ASSETHEADER_BFBS_HPP +#ifndef ASSET_BFBS_HPP +#define ASSET_BFBS_HPP #include #include namespace Bigfoot { - inline constexpr eastl::array g_AssetHeader_bfbs = { + inline constexpr eastl::array g_Asset_bfbs = { std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x98}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x68}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xBC}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF8}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x68}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x3C}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x78}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFC}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x10}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xAC}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x20}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x90}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0xCC}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, + std::byte{0x80}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x7C}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x90}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x2C}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0xA0}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x10}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4C}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x48}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, - std::byte{0x72}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xDC}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x94}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, - std::byte{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x48}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x0B}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, + std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x5C}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x14}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0xE0}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xA0}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0xB0}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x12}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, + std::byte{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x00}, std::byte{0x00}, std::byte{0xE4}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, + std::byte{0x06}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, + std::byte{0x06}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x00}, std::byte{0x00}, std::byte{0x0E}, std::byte{0x04}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x66}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, + std::byte{0x62}, std::byte{0x75}, std::byte{0x66}, std::byte{0x66}, std::byte{0x65}, std::byte{0x72}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, + std::byte{0x05}, std::byte{0x00}, std::byte{0x0E}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, + std::byte{0x06}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x00}, std::byte{0x00}, std::byte{0x0E}, std::byte{0x0F}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, + std::byte{0x64}, std::byte{0x65}, std::byte{0x70}, std::byte{0x65}, std::byte{0x6E}, std::byte{0x64}, std::byte{0x65}, std::byte{0x6E}, std::byte{0x63}, std::byte{0x69}, std::byte{0x65}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x76}, std::byte{0x65}, std::byte{0x72}, std::byte{0x73}, @@ -76,4 +84,4 @@ namespace Bigfoot } // namespace Bigfoot -#endif // ASSETHEADER_BFBS_HPP +#endif // ASSET_BFBS_HPP diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.fbs b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.fbs new file mode 100644 index 0000000..a4fb08d --- /dev/null +++ b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.fbs @@ -0,0 +1,22 @@ +include "Engine/BigFile/Asset/AssetTypeID.fbs"; +native_include "Engine/BigFile/Asset/AssetTypeID.hpp"; + +include "System/UUID/UUID.fbs"; +native_include "System/UUID/UUID.hpp"; + +namespace Bigfoot.Flat; + +table Asset +{ + uuid: UUID (required, native_inline, id: 0); + name: string (required, id: 1); + type_id: AssetTypeID (required, native_inline, id: 2); + type_name: string (required, id: 3); + version: uint = 0 (id: 4); + + dependencies: [UUID] (required, native_inline, id: 5); + + flatbuffer: [ubyte] (required, id: 6); // The actual asset +} + +root_type Asset; \ No newline at end of file diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.hpp b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.hpp deleted file mode 100644 index e547421..0000000 --- a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/********************************************************************* - * \file Asset.hpp - * - * \author Romain BOULLARD - * \date February 2026 - *********************************************************************/ -#ifndef BIGFOOT_ENGINE_ASSET_HPP -#define BIGFOOT_ENGINE_ASSET_HPP -#include - -#include - -#include -#include - -namespace Bigfoot -{ -template -concept FlatAssetConcept = requires(FLAT_ASSET p_flatAsset) { - requires std::is_base_of_v<::flatbuffers::Table, FLAT_ASSET> && - std::derived_from; - - { FLAT_ASSET::GetFullyQualifiedName() } -> std::convertible_to; - { p_flatAsset.asset_header() } -> std::same_as; -}; - -template -class FlatAssetWrapper -{ - private: - using FLAT_ASSET_NATIVE = FLAT_ASSET::NativeTableType; - using FLAT_ASSET_BUILDER = FLAT_ASSET::Builder; - - public: - FlatAssetWrapper() - { - m_asset.asset_header = eastl::make_unique(); - m_asset.asset_header->type_id = TypeID(); - m_asset.asset_header->type_name = TypeName(); - } - - FlatAssetWrapper(const eastl::span p_flatBuffer) - { - flatbuffers::Verifier::Options verifierOptions; - flatbuffers::Verifier verifier {std::bit_cast(p_flatBuffer.data()), - p_flatBuffer.size(), - verifierOptions}; - CRITICAL_ASSERT(EngineAssertHandler, - verifier.VerifyBuffer(), - "Flatbuffer verifier failed for FLAT_ASSET!"); - - const FLAT_ASSET* flatAsset = flatbuffers::GetRoot(p_flatBuffer.data()); - CRITICAL_ASSERT(EngineAssertHandler, - flatAsset->asset_header()->type_id()->value() == TypeID() && - (std::strcmp(flatAsset->asset_header()->type_name()->c_str(), TypeName().data()) == 0), - "Mismatch between flatbufer type and actual type! flatbuffer = {}/{}; expected = {}/{}", - flatAsset->asset_header()->type_name()->c_str(), - flatAsset->asset_header()->type_id()->value(), - TypeName(), - TypeID()); - - flatAsset->UnPackTo(&m_asset); - } - - FlatAssetWrapper(const FlatAssetWrapper& p_assetWrapper) = delete; - FlatAssetWrapper(FlatAssetWrapper&& p_assetWrapper) = delete; - - ~FlatAssetWrapper() = default; - - eastl::vector Pack() const - { - flatbuffers::FlatBufferBuilder builder; - builder.Finish(FLAT_ASSET::Pack(builder, &m_asset)); - - eastl::vector result {builder.GetSize()}; - eastl::transform(builder.GetBufferSpan().begin(), - builder.GetBufferSpan().end(), - result.begin(), - [](const std::uint8_t p_value) - { - return static_cast(p_value); - }); - - return result; - } - - [[nodiscard]] - FLAT_ASSET_NATIVE& Asset() - { - return m_asset; - } - - [[nodiscard]] - const FLAT_ASSET_NATIVE& Asset() const - { - return m_asset; - } - - static AssetTypeID TypeID() - { - static eastl::string_view typeName = TypeName(); - static AssetTypeID typeID = rapidhash(typeName.data(), typeName.size()); - - return typeID; - } - - static eastl::string_view TypeName() - { - static eastl::string_view typeName {FLAT_ASSET::GetFullyQualifiedName()}; - - return typeName; - } - - FlatAssetWrapper& operator=(const FlatAssetWrapper p_assetWrapper) = delete; - FlatAssetWrapper& operator=(FlatAssetWrapper&& p_assetWrapper) = delete; - - private: - FLAT_ASSET_NATIVE m_asset; -}; -} // namespace Bigfoot - -#endif diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetContainer.hpp b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetContainer.hpp deleted file mode 100644 index 70c5930..0000000 --- a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetContainer.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/********************************************************************* - * \file AssetContainer.hpp - * - * \author Romain BOULLARD - * \date February 2026 - *********************************************************************/ -#ifndef BIGFOOT_ENGINE_ASSETCONTAINER_HPP -#define BIGFOOT_ENGINE_ASSETCONTAINER_HPP -#include -#include - -#include - -namespace Bigfoot -{ -template -concept BigfootAssetConcept = requires(ASSET p_asset, const ASSET p_constAsset) { - requires FlatAssetConcept; - requires std::constructible_from*>; - { ASSET::ReflectionInfo() } -> std::convertible_to>; -}; - -template -class AssetContainer -{ - public: - AssetContainer() = default; - - AssetContainer(const AssetContainer& p_container) = delete; - AssetContainer(AssetContainer&& p_container) = delete; - - [[nodiscard]] - bool Add(const UUID& p_uuid) - { - return m_assets.emplace(p_uuid, AssetHandle {}).second; - } - - [[nodiscard]] - bool Load(const UUID& p_uuid, const eastl::span p_flatBuffer) - { - if (!m_assets.contains(p_uuid)) - { - [[maybe_unused]] - const bool added = Add(p_uuid); - ASSERT(EngineAssertHandler, added, "{} not added to AssetContainer! Already in container ?", p_uuid); - } - - AssetHandle& assetHandle = m_assets.at(p_uuid); - if (assetHandle.m_assetPair) - { - SOFT_ASSERT(EngineAssertHandler, false, "{} already loaded!", p_uuid); - return true; - } - - assetHandle.m_assetPair = eastl::make_unique(p_flatBuffer); - CRITICAL_ASSERT(EngineAssertHandler, - assetHandle.m_assetPair->m_flatAsset.Asset().asset_header->uuid == p_uuid, - "Mismatch between expected UUID and deserialized UUID ! Got {}; Expected {}", - assetHandle.m_assetPair->m_flatAsset.Asset().asset_header->uuid, - p_uuid); - - return true; - } - - void UnloadUnreferenced() - { - for (auto& keyValue: m_assets) - { - if (keyValue.second.m_hardRefCount == 0 && keyValue.second.m_assetPair) - { - keyValue.second.m_assetPair.reset(); - } - } - } - - ~AssetContainer() = default; - - AssetContainer& operator=(const AssetContainer& p_container) = delete; - AssetContainer& operator=(AssetContainer&& p_container) = delete; - - private: - struct AssetHandle - { - struct Data - { - Data(const eastl::span p_flatBuffer): - m_flatAsset(p_flatBuffer), - m_asset(&m_flatAsset) - { - } - - FlatAssetWrapper m_flatAsset; - ASSET m_asset; - }; - - eastl::unique_ptr m_assetPair = nullptr; - - std::uint32_t m_hardRefCount = 0; - std::uint32_t m_softRefCount = 0; - }; - - // We use a segmented_map here to keep stable references - ankerl::unordered_dense::segmented_map m_assets; -}; -} // namespace Bigfoot - -#endif diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.fbs b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.fbs deleted file mode 100644 index 49e5c19..0000000 --- a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader.fbs +++ /dev/null @@ -1,18 +0,0 @@ -include "Engine/BigFile/Asset/AssetTypeID.fbs"; -native_include "Engine/BigFile/Asset/AssetTypeID.hpp"; - -include "System/UUID/UUID.fbs"; -native_include "System/UUID/UUID.hpp"; - -namespace Bigfoot.Flat; - -table AssetHeader -{ - uuid: UUID (required, native_inline); - name: string (required); - type_id: AssetTypeID (required, native_inline); - type_name: string (required); - version: uint; -} - -root_type AssetHeader; \ No newline at end of file diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader_generated.hpp b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader_generated.hpp deleted file mode 100644 index 2f2cffb..0000000 --- a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetHeader_generated.hpp +++ /dev/null @@ -1,266 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - - -#ifndef FLATBUFFERS_GENERATED_ASSETHEADER_BIGFOOT_FLAT_H_ -#define FLATBUFFERS_GENERATED_ASSETHEADER_BIGFOOT_FLAT_H_ - -#include "flatbuffers/flatbuffers.h" - -// Ensure the included flatbuffers.h is the same version as when this file was -// generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 25 && - FLATBUFFERS_VERSION_MINOR == 12 && - FLATBUFFERS_VERSION_REVISION == 19, - "Non-compatible flatbuffers version included"); - -#include "Engine/BigFile/Asset/AssetTypeID.hpp" -#include "Engine/BigFile/Asset/AssetTypeID.hpp" -#include "System/UUID/UUID.hpp" -#include "Engine/BigFile/Asset/AssetTypeID_generated.hpp" -#include "System/UUID/UUID_generated.hpp" - -#include "EASTL/unique_ptr.h" -#include "EASTL/string.h" - -namespace Bigfoot { -namespace Flat { - -struct AssetHeader; -struct AssetHeaderBuilder; -struct AssetHeaderT; - -inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable(); - -struct AssetHeaderT : public ::flatbuffers::NativeTable { - typedef AssetHeader TableType; - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetHeaderT"; - } - ::Bigfoot::UUID uuid{}; - eastl::string name{}; - ::Bigfoot::AssetTypeID type_id{}; - eastl::string type_name{}; - uint32_t version = 0; -}; - -struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef AssetHeaderT NativeTableType; - typedef AssetHeaderBuilder Builder; - struct Traits; - static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { - return AssetHeaderTypeTable(); - } - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetHeader"; - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_UUID = 4, - VT_NAME = 6, - VT_TYPE_ID = 8, - VT_TYPE_NAME = 10, - VT_VERSION = 12 - }; - const Bigfoot::Flat::UUID *uuid() const { - return GetStruct(VT_UUID); - } - const ::flatbuffers::String *name() const { - return GetPointer(VT_NAME); - } - const Bigfoot::Flat::AssetTypeID *type_id() const { - return GetStruct(VT_TYPE_ID); - } - const ::flatbuffers::String *type_name() const { - return GetPointer(VT_TYPE_NAME); - } - uint32_t version() const { - return GetField(VT_VERSION, 0); - } - template - bool Verify(::flatbuffers::VerifierTemplate &verifier) const { - return VerifyTableStart(verifier) && - VerifyFieldRequired(verifier, VT_UUID, 1) && - VerifyOffsetRequired(verifier, VT_NAME) && - verifier.VerifyString(name()) && - VerifyFieldRequired(verifier, VT_TYPE_ID, 8) && - VerifyOffsetRequired(verifier, VT_TYPE_NAME) && - verifier.VerifyString(type_name()) && - VerifyField(verifier, VT_VERSION, 4) && - verifier.EndTable(); - } - AssetHeaderT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const; - static ::flatbuffers::Offset Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct AssetHeaderBuilder { - typedef AssetHeader Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_uuid(const Bigfoot::Flat::UUID *uuid) { - fbb_.AddStruct(AssetHeader::VT_UUID, uuid); - } - void add_name(::flatbuffers::Offset<::flatbuffers::String> name) { - fbb_.AddOffset(AssetHeader::VT_NAME, name); - } - void add_type_id(const Bigfoot::Flat::AssetTypeID *type_id) { - fbb_.AddStruct(AssetHeader::VT_TYPE_ID, type_id); - } - void add_type_name(::flatbuffers::Offset<::flatbuffers::String> type_name) { - fbb_.AddOffset(AssetHeader::VT_TYPE_NAME, type_name); - } - void add_version(uint32_t version) { - fbb_.AddElement(AssetHeader::VT_VERSION, version, 0); - } - explicit AssetHeaderBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - fbb_.Required(o, AssetHeader::VT_UUID); - fbb_.Required(o, AssetHeader::VT_NAME); - fbb_.Required(o, AssetHeader::VT_TYPE_ID); - fbb_.Required(o, AssetHeader::VT_TYPE_NAME); - return o; - } -}; - -inline ::flatbuffers::Offset CreateAssetHeader( - ::flatbuffers::FlatBufferBuilder &_fbb, - const Bigfoot::Flat::UUID *uuid = nullptr, - ::flatbuffers::Offset<::flatbuffers::String> name = 0, - const Bigfoot::Flat::AssetTypeID *type_id = nullptr, - ::flatbuffers::Offset<::flatbuffers::String> type_name = 0, - uint32_t version = 0) { - AssetHeaderBuilder builder_(_fbb); - builder_.add_version(version); - builder_.add_type_name(type_name); - builder_.add_type_id(type_id); - builder_.add_name(name); - builder_.add_uuid(uuid); - return builder_.Finish(); -} - -struct AssetHeader::Traits { - using type = AssetHeader; - static auto constexpr Create = CreateAssetHeader; -}; - -::flatbuffers::Offset CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr); - -inline AssetHeaderT *AssetHeader::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const { - auto _o = std::make_unique(); - UnPackTo(_o.get(), _resolver); - return _o.release(); -} - -inline void AssetHeader::UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; - { auto _e = uuid(); if (_e) _o->uuid = ::flatbuffers::UnPack(*_e); } - { auto _e = name(); if (_e) _o->name = eastl::string(_e->c_str(), _e->size()); } - { auto _e = type_id(); if (_e) _o->type_id = ::flatbuffers::UnPack(*_e); } - { auto _e = type_name(); if (_e) _o->type_name = eastl::string(_e->c_str(), _e->size()); } - { auto _e = version(); _o->version = _e; } -} - -inline ::flatbuffers::Offset CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) { - return AssetHeader::Pack(_fbb, _o, _rehasher); -} - -inline ::flatbuffers::Offset AssetHeader::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) { - (void)_rehasher; - (void)_o; - struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetHeaderT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; - auto _uuid = ::flatbuffers::Pack(_o->uuid); - auto _name = _fbb.CreateString(_o->name); - auto _type_id = ::flatbuffers::Pack(_o->type_id); - auto _type_name = _fbb.CreateString(_o->type_name); - auto _version = _o->version; - return Bigfoot::Flat::CreateAssetHeader( - _fbb, - &_uuid, - _name, - &_type_id, - _type_name, - _version); -} - -inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable() { - static const ::flatbuffers::TypeCode type_codes[] = { - { ::flatbuffers::ET_SEQUENCE, 0, 0 }, - { ::flatbuffers::ET_STRING, 0, -1 }, - { ::flatbuffers::ET_SEQUENCE, 0, 1 }, - { ::flatbuffers::ET_STRING, 0, -1 }, - { ::flatbuffers::ET_UINT, 0, -1 } - }; - static const ::flatbuffers::TypeFunction type_refs[] = { - Bigfoot::Flat::UUIDTypeTable, - Bigfoot::Flat::AssetTypeIDTypeTable - }; - static const char * const names[] = { - "uuid", - "name", - "type_id", - "type_name", - "version" - }; - static const ::flatbuffers::TypeTable tt = { - ::flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; -} - -inline const Bigfoot::Flat::AssetHeader *GetAssetHeader(const void *buf) { - return ::flatbuffers::GetRoot(buf); -} - -inline const Bigfoot::Flat::AssetHeader *GetSizePrefixedAssetHeader(const void *buf) { - return ::flatbuffers::GetSizePrefixedRoot(buf); -} - -template -inline bool VerifyAssetHeaderBuffer( - ::flatbuffers::VerifierTemplate &verifier) { - return verifier.template VerifyBuffer(nullptr); -} - -template -inline bool VerifySizePrefixedAssetHeaderBuffer( - ::flatbuffers::VerifierTemplate &verifier) { - return verifier.template VerifySizePrefixedBuffer(nullptr); -} - -inline const char *AssetHeaderExtension() { - return "bfbs"; -} - -inline void FinishAssetHeaderBuffer( - ::flatbuffers::FlatBufferBuilder &fbb, - ::flatbuffers::Offset root) { - fbb.Finish(root); -} - -inline void FinishSizePrefixedAssetHeaderBuffer( - ::flatbuffers::FlatBufferBuilder &fbb, - ::flatbuffers::Offset root) { - fbb.FinishSizePrefixed(root); -} - -inline eastl::unique_ptr UnPackAssetHeader( - const void *buf, - const ::flatbuffers::resolver_function_t *res = nullptr) { - return eastl::unique_ptr(GetAssetHeader(buf)->UnPack(res)); -} - -inline eastl::unique_ptr UnPackSizePrefixedAssetHeader( - const void *buf, - const ::flatbuffers::resolver_function_t *res = nullptr) { - return eastl::unique_ptr(GetSizePrefixedAssetHeader(buf)->UnPack(res)); -} - -} // namespace Flat -} // namespace Bigfoot - -#endif // FLATBUFFERS_GENERATED_ASSETHEADER_BIGFOOT_FLAT_H_ diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset_generated.hpp b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset_generated.hpp new file mode 100644 index 0000000..a66975d --- /dev/null +++ b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/Asset_generated.hpp @@ -0,0 +1,302 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_ASSET_BIGFOOT_FLAT_H_ +#define FLATBUFFERS_GENERATED_ASSET_BIGFOOT_FLAT_H_ + +#include "flatbuffers/flatbuffers.h" + +// Ensure the included flatbuffers.h is the same version as when this file was +// generated, otherwise it may not be compatible. +static_assert(FLATBUFFERS_VERSION_MAJOR == 25 && + FLATBUFFERS_VERSION_MINOR == 12 && + FLATBUFFERS_VERSION_REVISION == 19, + "Non-compatible flatbuffers version included"); + +#include "Engine/BigFile/Asset/AssetTypeID.hpp" +#include "Engine/BigFile/Asset/AssetTypeID.hpp" +#include "System/UUID/UUID.hpp" +#include "Engine/BigFile/Asset/AssetTypeID_generated.hpp" +#include "System/UUID/UUID_generated.hpp" + +#include "EASTL/unique_ptr.h" +#include "EASTL/string.h" + +namespace Bigfoot { +namespace Flat { + +struct Asset; +struct AssetBuilder; +struct AssetT; + +inline const ::flatbuffers::TypeTable *AssetTypeTable(); + +struct AssetT : public ::flatbuffers::NativeTable { + typedef Asset TableType; + static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { + return "Bigfoot.Flat.AssetT"; + } + ::Bigfoot::UUID uuid{}; + eastl::string name{}; + ::Bigfoot::AssetTypeID type_id{}; + eastl::string type_name{}; + uint32_t version = 0; + std::vector<::Bigfoot::UUID> dependencies{}; + std::vector flatbuffer{}; +}; + +struct Asset FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { + typedef AssetT NativeTableType; + typedef AssetBuilder Builder; + struct Traits; + static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { + return AssetTypeTable(); + } + static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { + return "Bigfoot.Flat.Asset"; + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_UUID = 4, + VT_NAME = 6, + VT_TYPE_ID = 8, + VT_TYPE_NAME = 10, + VT_VERSION = 12, + VT_DEPENDENCIES = 14, + VT_FLATBUFFER = 16 + }; + const Bigfoot::Flat::UUID *uuid() const { + return GetStruct(VT_UUID); + } + const ::flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + const Bigfoot::Flat::AssetTypeID *type_id() const { + return GetStruct(VT_TYPE_ID); + } + const ::flatbuffers::String *type_name() const { + return GetPointer(VT_TYPE_NAME); + } + uint32_t version() const { + return GetField(VT_VERSION, 0); + } + const ::flatbuffers::Vector *dependencies() const { + return GetPointer *>(VT_DEPENDENCIES); + } + const ::flatbuffers::Vector *flatbuffer() const { + return GetPointer *>(VT_FLATBUFFER); + } + template + bool Verify(::flatbuffers::VerifierTemplate &verifier) const { + return VerifyTableStart(verifier) && + VerifyFieldRequired(verifier, VT_UUID, 1) && + VerifyOffsetRequired(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyFieldRequired(verifier, VT_TYPE_ID, 8) && + VerifyOffsetRequired(verifier, VT_TYPE_NAME) && + verifier.VerifyString(type_name()) && + VerifyField(verifier, VT_VERSION, 4) && + VerifyOffsetRequired(verifier, VT_DEPENDENCIES) && + verifier.VerifyVector(dependencies()) && + VerifyOffsetRequired(verifier, VT_FLATBUFFER) && + verifier.VerifyVector(flatbuffer()) && + verifier.EndTable(); + } + AssetT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(AssetT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const; + static ::flatbuffers::Offset Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct AssetBuilder { + typedef Asset Table; + ::flatbuffers::FlatBufferBuilder &fbb_; + ::flatbuffers::uoffset_t start_; + void add_uuid(const Bigfoot::Flat::UUID *uuid) { + fbb_.AddStruct(Asset::VT_UUID, uuid); + } + void add_name(::flatbuffers::Offset<::flatbuffers::String> name) { + fbb_.AddOffset(Asset::VT_NAME, name); + } + void add_type_id(const Bigfoot::Flat::AssetTypeID *type_id) { + fbb_.AddStruct(Asset::VT_TYPE_ID, type_id); + } + void add_type_name(::flatbuffers::Offset<::flatbuffers::String> type_name) { + fbb_.AddOffset(Asset::VT_TYPE_NAME, type_name); + } + void add_version(uint32_t version) { + fbb_.AddElement(Asset::VT_VERSION, version, 0); + } + void add_dependencies(::flatbuffers::Offset<::flatbuffers::Vector> dependencies) { + fbb_.AddOffset(Asset::VT_DEPENDENCIES, dependencies); + } + void add_flatbuffer(::flatbuffers::Offset<::flatbuffers::Vector> flatbuffer) { + fbb_.AddOffset(Asset::VT_FLATBUFFER, flatbuffer); + } + explicit AssetBuilder(::flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + ::flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = ::flatbuffers::Offset(end); + fbb_.Required(o, Asset::VT_UUID); + fbb_.Required(o, Asset::VT_NAME); + fbb_.Required(o, Asset::VT_TYPE_ID); + fbb_.Required(o, Asset::VT_TYPE_NAME); + fbb_.Required(o, Asset::VT_DEPENDENCIES); + fbb_.Required(o, Asset::VT_FLATBUFFER); + return o; + } +}; + +inline ::flatbuffers::Offset CreateAsset( + ::flatbuffers::FlatBufferBuilder &_fbb, + const Bigfoot::Flat::UUID *uuid = nullptr, + ::flatbuffers::Offset<::flatbuffers::String> name = 0, + const Bigfoot::Flat::AssetTypeID *type_id = nullptr, + ::flatbuffers::Offset<::flatbuffers::String> type_name = 0, + uint32_t version = 0, + ::flatbuffers::Offset<::flatbuffers::Vector> dependencies = 0, + ::flatbuffers::Offset<::flatbuffers::Vector> flatbuffer = 0) { + AssetBuilder builder_(_fbb); + builder_.add_flatbuffer(flatbuffer); + builder_.add_dependencies(dependencies); + builder_.add_version(version); + builder_.add_type_name(type_name); + builder_.add_type_id(type_id); + builder_.add_name(name); + builder_.add_uuid(uuid); + return builder_.Finish(); +} + +struct Asset::Traits { + using type = Asset; + static auto constexpr Create = CreateAsset; +}; + +::flatbuffers::Offset CreateAsset(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr); + +inline AssetT *Asset::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::make_unique(); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void Asset::UnPackTo(AssetT *_o, const ::flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = uuid(); if (_e) _o->uuid = ::flatbuffers::UnPack(*_e); } + { auto _e = name(); if (_e) _o->name = eastl::string(_e->c_str(), _e->size()); } + { auto _e = type_id(); if (_e) _o->type_id = ::flatbuffers::UnPack(*_e); } + { auto _e = type_name(); if (_e) _o->type_name = eastl::string(_e->c_str(), _e->size()); } + { auto _e = version(); _o->version = _e; } + { auto _e = dependencies(); if (_e) { _o->dependencies.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dependencies[_i] = ::flatbuffers::UnPack(*_e->Get(_i)); } } else { _o->dependencies.resize(0); } } + { auto _e = flatbuffer(); if (_e) { _o->flatbuffer.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->flatbuffer.begin()); } } +} + +inline ::flatbuffers::Offset CreateAsset(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) { + return Asset::Pack(_fbb, _o, _rehasher); +} + +inline ::flatbuffers::Offset Asset::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _uuid = ::flatbuffers::Pack(_o->uuid); + auto _name = _fbb.CreateString(_o->name); + auto _type_id = ::flatbuffers::Pack(_o->type_id); + auto _type_name = _fbb.CreateString(_o->type_name); + auto _version = _o->version; + auto _dependencies = _fbb.CreateVectorOfNativeStructs(_o->dependencies); + auto _flatbuffer = _fbb.CreateVector(_o->flatbuffer); + return Bigfoot::Flat::CreateAsset( + _fbb, + &_uuid, + _name, + &_type_id, + _type_name, + _version, + _dependencies, + _flatbuffer); +} + +inline const ::flatbuffers::TypeTable *AssetTypeTable() { + static const ::flatbuffers::TypeCode type_codes[] = { + { ::flatbuffers::ET_SEQUENCE, 0, 0 }, + { ::flatbuffers::ET_STRING, 0, -1 }, + { ::flatbuffers::ET_SEQUENCE, 0, 1 }, + { ::flatbuffers::ET_STRING, 0, -1 }, + { ::flatbuffers::ET_UINT, 0, -1 }, + { ::flatbuffers::ET_SEQUENCE, 1, 0 }, + { ::flatbuffers::ET_UCHAR, 1, -1 } + }; + static const ::flatbuffers::TypeFunction type_refs[] = { + Bigfoot::Flat::UUIDTypeTable, + Bigfoot::Flat::AssetTypeIDTypeTable + }; + static const char * const names[] = { + "uuid", + "name", + "type_id", + "type_name", + "version", + "dependencies", + "flatbuffer" + }; + static const ::flatbuffers::TypeTable tt = { + ::flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; +} + +inline const Bigfoot::Flat::Asset *GetAsset(const void *buf) { + return ::flatbuffers::GetRoot(buf); +} + +inline const Bigfoot::Flat::Asset *GetSizePrefixedAsset(const void *buf) { + return ::flatbuffers::GetSizePrefixedRoot(buf); +} + +template +inline bool VerifyAssetBuffer( + ::flatbuffers::VerifierTemplate &verifier) { + return verifier.template VerifyBuffer(nullptr); +} + +template +inline bool VerifySizePrefixedAssetBuffer( + ::flatbuffers::VerifierTemplate &verifier) { + return verifier.template VerifySizePrefixedBuffer(nullptr); +} + +inline const char *AssetExtension() { + return "bfbs"; +} + +inline void FinishAssetBuffer( + ::flatbuffers::FlatBufferBuilder &fbb, + ::flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedAssetBuffer( + ::flatbuffers::FlatBufferBuilder &fbb, + ::flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +inline eastl::unique_ptr UnPackAsset( + const void *buf, + const ::flatbuffers::resolver_function_t *res = nullptr) { + return eastl::unique_ptr(GetAsset(buf)->UnPack(res)); +} + +inline eastl::unique_ptr UnPackSizePrefixedAsset( + const void *buf, + const ::flatbuffers::resolver_function_t *res = nullptr) { + return eastl::unique_ptr(GetSizePrefixedAsset(buf)->UnPack(res)); +} + +} // namespace Flat +} // namespace Bigfoot + +#endif // FLATBUFFERS_GENERATED_ASSET_BIGFOOT_FLAT_H_ diff --git a/Bigfoot/Tests/Engine/BigFile/BigFile.cpp b/Bigfoot/Tests/Engine/BigFile/BigFile.cpp index 9e35266..fa6b5f6 100644 --- a/Bigfoot/Tests/Engine/BigFile/BigFile.cpp +++ b/Bigfoot/Tests/Engine/BigFile/BigFile.cpp @@ -6,7 +6,7 @@ *********************************************************************/ #include -#include +#include #include #include @@ -15,9 +15,9 @@ #include #include -#include #include +#include #include #include @@ -42,8 +42,6 @@ class BigFileFixture: public ::testing::Test BIGFOOT_NOT_OPTIMIZED_ONLY(std::ignore = Singleton::Instance().RegisterLogger(ENGINE_LOGGER);) } - AssetAContainer m_assetAContainer; - BIGFOOT_NOT_OPTIMIZED_ONLY(Singleton::Lifetime m_loggerLifetime;) BigFile m_bigFile {File {BIGFILE_ENGINETESTS_LOCATION}}; @@ -53,51 +51,6 @@ class BigFileFixture: public ::testing::Test TEST_F(BigFileFixture, Lol) { - { - EXPECT_STREQ(FlatAssetWrapper::TypeName().data(), "Bigfoot.Flat.AssetA"); - EXPECT_EQ(FlatAssetWrapper::TypeID(), - rapidhash(FlatAssetWrapper::TypeName().data(), - FlatAssetWrapper::TypeName().size())); - - UUID uuid; - std::ignore = m_assetAContainer.Add(uuid); - - FlatAssetWrapper test {}; - test.Asset().asset_header->name = "Instance"; - test.Asset().asset_header->uuid = uuid; - - const eastl::vector flatBuffer = test.Pack(); - - std::ignore = m_assetAContainer.Load(uuid, flatBuffer); - m_assetAContainer.UnloadUnreferenced(); - - // UUID uuid; - // std::ignore = m_assetAContainer.Add(uuid, "Instance"); - - // AssetA* test = m_assetAContainer.Get(uuid); - - // test->Health() = 100; - // test->Mana() = 42; - - // const eastl::vector flatbuffer = m_assetAContainer.Pack(uuid); - // m_assetAContainer.Remove(uuid); - - // std::ignore = m_assetAContainer.Add(uuid, flatbuffer); - // std::ignore = m_assetAContainer.Add(UUID {}, "Instance2"); - // std::ignore = m_assetAContainer.Add(UUID {}, "Instance3"); - - // AssetA* test2 = m_assetAContainer.Get(uuid); - - // EXPECT_EQ(test2->Health(), 100); - // EXPECT_EQ(test2->Mana(), 42); - - // EXPECT_STREQ(test2->AssetHeader()->name.c_str(), "Instance"); - // EXPECT_EQ(test2->AssetHeader()->type_id, FlatAssetWrapper::TypeID()); - // EXPECT_STREQ(test2->AssetHeader()->type_name.c_str(), FlatAssetWrapper::TypeName().data()); - // EXPECT_EQ(test2->AssetHeader()->uuid, uuid); - // EXPECT_EQ(test2->AssetHeader()->version, 2); - } - UUID uuid; UUID uuid2; UUID uuid3; @@ -279,7 +232,7 @@ TEST_F(BigFileFixture, Lol) } } -TEST_F(BigFileFixture, Reflection) +/*TEST_F(BigFileFixture, Reflection) { [[maybe_unused]] const reflection::Schema* reflection = reflection::GetSchema(AssetA::ReflectionInfo().data()); @@ -327,5 +280,5 @@ TEST_F(BigFileFixture, Reflection) BIGFOOT_LOG_INFO(ENGINE_LOGGER, "{} {} {}", typeName, test->name()->c_str(), isRef ? "(isRef)" : ""); } -} +}*/ } // namespace Bigfoot diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.bfbs b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.bfbs deleted file mode 100644 index 8583f43..0000000 Binary files a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.bfbs and /dev/null differ diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.bfbs_generated.hpp b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.bfbs_generated.hpp deleted file mode 100644 index 2eea987..0000000 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.bfbs_generated.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Auto-generated header from: AssetA.bfbs - * Generated by Bin2CPP - * - * DO NOT TOUCH - */ -#ifndef ASSETA_BFBS_HPP -#define ASSETA_BFBS_HPP -#include -#include - -namespace Bigfoot -{ - inline constexpr eastl::array g_AssetA_bfbs = { - std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x00}, - std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, - std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x38}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xA8}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xA8}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x40}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0xE8}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x70}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x48}, std::byte{0xFA}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xE8}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x88}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x5C}, std::byte{0xFA}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x5C}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6C}, std::byte{0xFA}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x14}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x7C}, std::byte{0xFA}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x60}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF8}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0xDC}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, - std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x90}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD8}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xAC}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x64}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x13}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, - std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x00}, - std::byte{0xD4}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x78}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x72}, std::byte{0x65}, std::byte{0x66}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, - std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, - std::byte{0x03}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, - std::byte{0x06}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x0E}, std::byte{0x0F}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x72}, std::byte{0x65}, std::byte{0x66}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF4}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x02}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, - std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x48}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, - std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6D}, std::byte{0x61}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x1C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x70}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x68}, std::byte{0x65}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x74}, std::byte{0x68}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x04}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x68}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x61}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x5F}, std::byte{0x68}, std::byte{0x65}, - std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, - std::byte{0x07}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x5C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x50}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x2F}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x50}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x69}, std::byte{0x73}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, - std::byte{0x2E}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x90}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, std::byte{0x64}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x14}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x7C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, - std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, - std::byte{0x53}, std::byte{0x6F}, std::byte{0x75}, std::byte{0x72}, std::byte{0x63}, std::byte{0x65}, std::byte{0x73}, std::byte{0x2F}, std::byte{0x45}, std::byte{0x6E}, std::byte{0x67}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x49}, - std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x64}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x45}, std::byte{0x6E}, std::byte{0x67}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x42}, std::byte{0x69}, - std::byte{0x67}, std::byte{0x46}, std::byte{0x69}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, - std::byte{0x74}, std::byte{0x48}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0xDC}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x94}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, - std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x48}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, - std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x60}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x76}, std::byte{0x65}, std::byte{0x72}, std::byte{0x73}, std::byte{0x69}, std::byte{0x6F}, std::byte{0x6E}, std::byte{0x00}, std::byte{0xA0}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, - std::byte{0x03}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x8C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0D}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x09}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, - std::byte{0x5F}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD0}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, - std::byte{0x02}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x70}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x5F}, std::byte{0x69}, std::byte{0x64}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, - std::byte{0x08}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x01}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, - std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0D}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x6E}, std::byte{0x61}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x01}, std::byte{0x04}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, - std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, std::byte{0x64}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, - std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x3F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, - std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x6F}, std::byte{0x75}, std::byte{0x72}, - std::byte{0x63}, std::byte{0x65}, std::byte{0x73}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x79}, std::byte{0x73}, std::byte{0x74}, std::byte{0x65}, std::byte{0x6D}, std::byte{0x2F}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C}, std::byte{0x75}, - std::byte{0x64}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x79}, std::byte{0x73}, std::byte{0x74}, std::byte{0x65}, std::byte{0x6D}, std::byte{0x2F}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2F}, std::byte{0x55}, - std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, - std::byte{0x2E}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x11}, std::byte{0x04}, std::byte{0x10}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x62}, std::byte{0x79}, std::byte{0x74}, std::byte{0x65}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, - std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, - std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x70}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x64}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x2F}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, - std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x6F}, std::byte{0x75}, std::byte{0x72}, std::byte{0x63}, std::byte{0x65}, std::byte{0x73}, std::byte{0x2F}, std::byte{0x45}, std::byte{0x6E}, std::byte{0x67}, std::byte{0x69}, - std::byte{0x6E}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x64}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x45}, std::byte{0x6E}, std::byte{0x67}, std::byte{0x69}, std::byte{0x6E}, - std::byte{0x65}, std::byte{0x2F}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x46}, std::byte{0x69}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x2F}, - std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, - std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, - std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x54}, std::byte{0x79}, - std::byte{0x70}, std::byte{0x65}, std::byte{0x49}, std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, - std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, - std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, - std::byte{0x76}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00} - }; - -} // namespace Bigfoot - -#endif // ASSETA_BFBS_HPP diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs deleted file mode 100644 index 629256f..0000000 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs +++ /dev/null @@ -1,23 +0,0 @@ -include "Engine/BigFile/Asset/AssetHeader.fbs"; - -namespace Bigfoot.Flat; - -attribute "isRef"; - -struct Ref (isRef) -{ - uuid: UUID; -} - -table AssetA -{ - asset_header: AssetHeader; - - health: uint; - mana: uint; - - refs: [Ref]; - ref: Ref; -} - -root_type AssetA; \ No newline at end of file diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.hpp b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.hpp deleted file mode 100644 index e465e96..0000000 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/********************************************************************* - * \file AssetA.hpp - * - * \author Romain BOULLARD - * \date February 2026 - *********************************************************************/ -#ifndef BIGFOOT_ENGINETESTS_ASSETA_HPP -#define BIGFOOT_ENGINETESTS_ASSETA_HPP -#include - -#include -#include - -namespace Bigfoot -{ -class AssetA -{ - public: - using FLAT_ASSET = Flat::AssetA; - - AssetA(FlatAssetWrapper* p_flatAsset): - m_flatAsset(p_flatAsset) - { - // deprecation... - if (m_flatAsset->Asset().asset_header->version < 2) - { - m_flatAsset->Asset().asset_header->version = 2; - } - } - - AssetA(const AssetA& p_assetA) = default; - AssetA(AssetA&& p_assetA) = default; - - [[nodiscard]] - std::uint32_t& Health() - { - return m_flatAsset->Asset().health; - } - - [[nodiscard]] - std::uint32_t& Mana() - { - return m_flatAsset->Asset().mana; - } - - [[nodiscard]] - Flat::AssetHeaderT* AssetHeader() - { - return m_flatAsset->Asset().asset_header.get(); - } - - [[nodiscard]] - const Flat::AssetHeaderT* AssetHeader() const - { - return m_flatAsset->Asset().asset_header.get(); - } - - [[nodiscard]] - static constexpr eastl::span ReflectionInfo() - { - return g_AssetA_bfbs; - } - - ~AssetA() = default; - - AssetA& operator=(const AssetA& p_assetA) = default; - AssetA& operator=(AssetA&& p_assetA) = default; - - private: - FlatAssetWrapper* m_flatAsset; -}; - -using AssetAContainer = AssetContainer; -} // namespace Bigfoot - -#endif diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA_generated.hpp b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA_generated.hpp deleted file mode 100644 index e607368..0000000 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA_generated.hpp +++ /dev/null @@ -1,331 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - - -#ifndef FLATBUFFERS_GENERATED_ASSETA_BIGFOOT_FLAT_H_ -#define FLATBUFFERS_GENERATED_ASSETA_BIGFOOT_FLAT_H_ - -#include "flatbuffers/flatbuffers.h" - -// Ensure the included flatbuffers.h is the same version as when this file was -// generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 25 && - FLATBUFFERS_VERSION_MINOR == 12 && - FLATBUFFERS_VERSION_REVISION == 19, - "Non-compatible flatbuffers version included"); - -#include "Engine/BigFile/Asset/AssetTypeID.hpp" -#include "Engine/BigFile/Asset/AssetTypeID.hpp" -#include "System/UUID/UUID.hpp" -#include "Engine/BigFile/Asset/AssetHeader_generated.hpp" - -#include "EASTL/unique_ptr.h" -#include "EASTL/string.h" - -namespace Bigfoot { -namespace Flat { - -struct Ref; - -struct AssetA; -struct AssetABuilder; -struct AssetAT; - -inline const ::flatbuffers::TypeTable *RefTypeTable(); - -inline const ::flatbuffers::TypeTable *AssetATypeTable(); - -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) Ref FLATBUFFERS_FINAL_CLASS { - private: - Bigfoot::Flat::UUID uuid_; - - public: - struct Traits; - static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { - return RefTypeTable(); - } - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.Ref"; - } - Ref() - : uuid_() { - } - Ref(const Bigfoot::Flat::UUID &_uuid) - : uuid_(_uuid) { - } - const Bigfoot::Flat::UUID &uuid() const { - return uuid_; - } -}; -FLATBUFFERS_STRUCT_END(Ref, 16); - -struct Ref::Traits { - using type = Ref; -}; - -struct AssetAT : public ::flatbuffers::NativeTable { - typedef AssetA TableType; - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetAT"; - } - eastl::unique_ptr asset_header{}; - uint32_t health = 0; - uint32_t mana = 0; - std::vector refs{}; - eastl::unique_ptr ref{}; - AssetAT() = default; - AssetAT(const AssetAT &o); - AssetAT(AssetAT&&) FLATBUFFERS_NOEXCEPT = default; - AssetAT &operator=(AssetAT o) FLATBUFFERS_NOEXCEPT; -}; - -struct AssetA FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { - typedef AssetAT NativeTableType; - typedef AssetABuilder Builder; - struct Traits; - static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { - return AssetATypeTable(); - } - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetA"; - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ASSET_HEADER = 4, - VT_HEALTH = 6, - VT_MANA = 8, - VT_REFS = 10, - VT_REF = 12 - }; - const Bigfoot::Flat::AssetHeader *asset_header() const { - return GetPointer(VT_ASSET_HEADER); - } - uint32_t health() const { - return GetField(VT_HEALTH, 0); - } - uint32_t mana() const { - return GetField(VT_MANA, 0); - } - const ::flatbuffers::Vector *refs() const { - return GetPointer *>(VT_REFS); - } - const Bigfoot::Flat::Ref *ref() const { - return GetStruct(VT_REF); - } - template - bool Verify(::flatbuffers::VerifierTemplate &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ASSET_HEADER) && - verifier.VerifyTable(asset_header()) && - VerifyField(verifier, VT_HEALTH, 4) && - VerifyField(verifier, VT_MANA, 4) && - VerifyOffset(verifier, VT_REFS) && - verifier.VerifyVector(refs()) && - VerifyField(verifier, VT_REF, 1) && - verifier.EndTable(); - } - AssetAT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(AssetAT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const; - static ::flatbuffers::Offset Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct AssetABuilder { - typedef AssetA Table; - ::flatbuffers::FlatBufferBuilder &fbb_; - ::flatbuffers::uoffset_t start_; - void add_asset_header(::flatbuffers::Offset asset_header) { - fbb_.AddOffset(AssetA::VT_ASSET_HEADER, asset_header); - } - void add_health(uint32_t health) { - fbb_.AddElement(AssetA::VT_HEALTH, health, 0); - } - void add_mana(uint32_t mana) { - fbb_.AddElement(AssetA::VT_MANA, mana, 0); - } - void add_refs(::flatbuffers::Offset<::flatbuffers::Vector> refs) { - fbb_.AddOffset(AssetA::VT_REFS, refs); - } - void add_ref(const Bigfoot::Flat::Ref *ref) { - fbb_.AddStruct(AssetA::VT_REF, ref); - } - explicit AssetABuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateAssetA( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset asset_header = 0, - uint32_t health = 0, - uint32_t mana = 0, - ::flatbuffers::Offset<::flatbuffers::Vector> refs = 0, - const Bigfoot::Flat::Ref *ref = nullptr) { - AssetABuilder builder_(_fbb); - builder_.add_ref(ref); - builder_.add_refs(refs); - builder_.add_mana(mana); - builder_.add_health(health); - builder_.add_asset_header(asset_header); - return builder_.Finish(); -} - -struct AssetA::Traits { - using type = AssetA; - static auto constexpr Create = CreateAssetA; -}; - -::flatbuffers::Offset CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr); - -inline AssetAT::AssetAT(const AssetAT &o) - : asset_header((o.asset_header) ? new Bigfoot::Flat::AssetHeaderT(*o.asset_header) : nullptr), - health(o.health), - mana(o.mana), - refs(o.refs), - ref((o.ref) ? new Bigfoot::Flat::Ref(*o.ref) : nullptr) { -} - -inline AssetAT &AssetAT::operator=(AssetAT o) FLATBUFFERS_NOEXCEPT { - std::swap(asset_header, o.asset_header); - std::swap(health, o.health); - std::swap(mana, o.mana); - std::swap(refs, o.refs); - std::swap(ref, o.ref); - return *this; -} - -inline AssetAT *AssetA::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const { - auto _o = std::make_unique(); - UnPackTo(_o.get(), _resolver); - return _o.release(); -} - -inline void AssetA::UnPackTo(AssetAT *_o, const ::flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; - { auto _e = asset_header(); if (_e) { if(_o->asset_header) { _e->UnPackTo(_o->asset_header.get(), _resolver); } else { _o->asset_header = eastl::unique_ptr(_e->UnPack(_resolver)); } } else if (_o->asset_header) { _o->asset_header.reset(); } } - { auto _e = health(); _o->health = _e; } - { auto _e = mana(); _o->mana = _e; } - { auto _e = refs(); if (_e) { _o->refs.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->refs[_i] = *_e->Get(_i); } } else { _o->refs.resize(0); } } - { auto _e = ref(); if (_e) _o->ref = eastl::unique_ptr(new Bigfoot::Flat::Ref(*_e)); } -} - -inline ::flatbuffers::Offset CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) { - return AssetA::Pack(_fbb, _o, _rehasher); -} - -inline ::flatbuffers::Offset AssetA::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) { - (void)_rehasher; - (void)_o; - struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetAT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; - auto _asset_header = _o->asset_header ? CreateAssetHeader(_fbb, _o->asset_header.get(), _rehasher) : 0; - auto _health = _o->health; - auto _mana = _o->mana; - auto _refs = _fbb.CreateVectorOfStructs(_o->refs); - auto _ref = _o->ref ? _o->ref.get() : nullptr; - return Bigfoot::Flat::CreateAssetA( - _fbb, - _asset_header, - _health, - _mana, - _refs, - _ref); -} - -inline const ::flatbuffers::TypeTable *RefTypeTable() { - static const ::flatbuffers::TypeCode type_codes[] = { - { ::flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const ::flatbuffers::TypeFunction type_refs[] = { - Bigfoot::Flat::UUIDTypeTable - }; - static const int64_t values[] = { 0, 16 }; - static const char * const names[] = { - "uuid" - }; - static const ::flatbuffers::TypeTable tt = { - ::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names - }; - return &tt; -} - -inline const ::flatbuffers::TypeTable *AssetATypeTable() { - static const ::flatbuffers::TypeCode type_codes[] = { - { ::flatbuffers::ET_SEQUENCE, 0, 0 }, - { ::flatbuffers::ET_UINT, 0, -1 }, - { ::flatbuffers::ET_UINT, 0, -1 }, - { ::flatbuffers::ET_SEQUENCE, 1, 1 }, - { ::flatbuffers::ET_SEQUENCE, 0, 1 } - }; - static const ::flatbuffers::TypeFunction type_refs[] = { - Bigfoot::Flat::AssetHeaderTypeTable, - Bigfoot::Flat::RefTypeTable - }; - static const char * const names[] = { - "asset_header", - "health", - "mana", - "refs", - "ref" - }; - static const ::flatbuffers::TypeTable tt = { - ::flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; -} - -inline const Bigfoot::Flat::AssetA *GetAssetA(const void *buf) { - return ::flatbuffers::GetRoot(buf); -} - -inline const Bigfoot::Flat::AssetA *GetSizePrefixedAssetA(const void *buf) { - return ::flatbuffers::GetSizePrefixedRoot(buf); -} - -template -inline bool VerifyAssetABuffer( - ::flatbuffers::VerifierTemplate &verifier) { - return verifier.template VerifyBuffer(nullptr); -} - -template -inline bool VerifySizePrefixedAssetABuffer( - ::flatbuffers::VerifierTemplate &verifier) { - return verifier.template VerifySizePrefixedBuffer(nullptr); -} - -inline const char *AssetAExtension() { - return "bfbs"; -} - -inline void FinishAssetABuffer( - ::flatbuffers::FlatBufferBuilder &fbb, - ::flatbuffers::Offset root) { - fbb.Finish(root); -} - -inline void FinishSizePrefixedAssetABuffer( - ::flatbuffers::FlatBufferBuilder &fbb, - ::flatbuffers::Offset root) { - fbb.FinishSizePrefixed(root); -} - -inline eastl::unique_ptr UnPackAssetA( - const void *buf, - const ::flatbuffers::resolver_function_t *res = nullptr) { - return eastl::unique_ptr(GetAssetA(buf)->UnPack(res)); -} - -inline eastl::unique_ptr UnPackSizePrefixedAssetA( - const void *buf, - const ::flatbuffers::resolver_function_t *res = nullptr) { - return eastl::unique_ptr(GetSizePrefixedAssetA(buf)->UnPack(res)); -} - -} // namespace Flat -} // namespace Bigfoot - -#endif // FLATBUFFERS_GENERATED_ASSETA_BIGFOOT_FLAT_H_ diff --git a/generate_dependencies.bat b/generate_dependencies.bat index f9a848a..6551366 100644 --- a/generate_dependencies.bat +++ b/generate_dependencies.bat @@ -23,8 +23,8 @@ REM Add the remote conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages REM Install dependencies with the specified build option -conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvc_asan -pr:b=./ConanProfiles/Tools/msvc %build_option% -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True -conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvc_asan -pr:b=./ConanProfiles/Tools/msvc %build_option% -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True -conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvc_asan -pr:b=./ConanProfiles/Tools/msvc %build_option% -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True +conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvc -pr:b=./ConanProfiles/Tools/msvc %build_option% -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True +conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvc -pr:b=./ConanProfiles/Tools/msvc %build_option% -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True +conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvc -pr:b=./ConanProfiles/Tools/msvc %build_option% -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True endlocal