Compare commits
1 Commits
1b3c914037
...
StaticAnal
| Author | SHA1 | Date | |
|---|---|---|---|
| fcfe551c5c |
@@ -6,26 +6,20 @@ on:
|
|||||||
- '**'
|
- '**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
container:
|
container:
|
||||||
image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main
|
image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main
|
||||||
volumes:
|
|
||||||
- /srv/romainboullard.com/caches/ccache:/ccache
|
|
||||||
env:
|
|
||||||
CCACHE_DIR: /ccache
|
|
||||||
CCACHE_MAXSIZE: 10G
|
|
||||||
CCACHE_BASEDIR: /root/.conan2
|
|
||||||
CCACHE_NOHASHDIR: "true"
|
|
||||||
CCACHE_COMPILERCHECK: "%compiler% -dumpversion"
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: ["Debug", "RelWithDebInfo", "Release"]
|
build_type: ["Debug", "RelWithDebInfo", "Release"]
|
||||||
unity_build: ["ON", "OFF"]
|
unity_build: ["ON", "OFF"]
|
||||||
conan_profile: ["./ConanProfiles/clang", "./ConanProfiles/clang_asan"]
|
name: "Build & Test ${{ matrix.build_type }} (Unity Build: ${{ matrix.unity_build }})"
|
||||||
name: "Build & Test ${{ matrix.build_type }} with ${{ matrix.conan_profile }} (Unity Build: ${{ matrix.unity_build }})"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
run: apt-get update && apt-get install -y nodejs
|
run: apt-get update && apt-get install -y nodejs
|
||||||
@@ -35,16 +29,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Reset ccache stats
|
- name: Show ccache stats before
|
||||||
run: ccache --zero-stats
|
run: ccache --zero-stats
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=./ConanProfiles/Tools/clang --build=* -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:vulkan=True
|
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
cmake -S . -B ./build/${{ matrix.build_type }} --toolchain ./build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja"
|
cmake -S . -B ./build/${{ matrix.build_type }} --toolchain ./build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja"
|
||||||
cmake --build build/${{ matrix.build_type }} --parallel $(nproc)
|
cmake --build build/${{ matrix.build_type }} --parallel $(nproc)
|
||||||
|
|
||||||
- name: Show ccache stats
|
- name: Show ccache stats after
|
||||||
run: ccache --show-stats
|
run: ccache --show-stats
|
||||||
|
|
||||||
- name: Unit Tests
|
- name: Unit Tests
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
name: Bigfoot
|
name: Bigfoot
|
||||||
|
|
||||||
on:
|
pull_request:
|
||||||
push:
|
branches:
|
||||||
branches:
|
- main
|
||||||
- main
|
types: [opened, synchronize, reopened]
|
||||||
- Development
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
@@ -12,14 +11,6 @@ jobs:
|
|||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
container:
|
container:
|
||||||
image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main
|
image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main
|
||||||
volumes:
|
|
||||||
- /srv/romainboullard.com/caches/ccache:/ccache
|
|
||||||
env:
|
|
||||||
CCACHE_DIR: /ccache
|
|
||||||
CCACHE_MAXSIZE: 10G
|
|
||||||
CCACHE_BASEDIR: /root/.conan2
|
|
||||||
CCACHE_NOHASHDIR: "true"
|
|
||||||
CCACHE_COMPILERCHECK: "%compiler% -dumpversion"
|
|
||||||
name: "Sonarqube"
|
name: "Sonarqube"
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
@@ -31,18 +22,12 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Reset ccache stats
|
- name: Generate
|
||||||
run: ccache --zero-stats
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: |
|
run: |
|
||||||
conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang_coverage -pr:b=./ConanProfiles/Tools/clang --build=* -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True
|
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang_coverage -pr:b=clang_coverage --build=missing -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
cmake -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -G "Ninja"
|
cmake -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -G "Ninja"
|
||||||
cmake --build build/Debug --parallel $(nproc)
|
cmake --build build/Debug --parallel $(nproc)
|
||||||
|
|
||||||
- name: Show ccache stats
|
|
||||||
run: ccache --show-stats
|
|
||||||
|
|
||||||
- name: Clang-Tidy
|
- name: Clang-Tidy
|
||||||
run: run-clang-tidy -p ./build/Debug/ >> tidy_result.txt
|
run: run-clang-tidy -p ./build/Debug/ >> tidy_result.txt
|
||||||
|
|
||||||
@@ -50,7 +35,7 @@ jobs:
|
|||||||
run: infer run --compilation-database build/Debug/compile_commands.json
|
run: infer run --compilation-database build/Debug/compile_commands.json
|
||||||
|
|
||||||
- name: SonarQube Scan
|
- name: SonarQube Scan
|
||||||
if: github.head_ref == 'main' || github.ref_name == 'main'
|
if: github.event_name == 'push'
|
||||||
uses: SonarSource/sonarqube-scan-action@v7.0.0
|
uses: SonarSource/sonarqube-scan-action@v7.0.0
|
||||||
with:
|
with:
|
||||||
args: >
|
args: >
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file AssetTypeID.cpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date February 2026
|
|
||||||
*********************************************************************/
|
|
||||||
#include <Engine/BigFile/Asset/AssetTypeID.hpp>
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::AssetTypeID Pack(const Bigfoot::AssetTypeID& p_assetTypeID)
|
|
||||||
{
|
|
||||||
return Bigfoot::Flat::AssetTypeID {p_assetTypeID};
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
Bigfoot::AssetTypeID UnPack(const Bigfoot::Flat::AssetTypeID& p_flatAssetTypeID)
|
|
||||||
{
|
|
||||||
return Bigfoot::AssetTypeID {p_flatAssetTypeID.value()};
|
|
||||||
}
|
|
||||||
} // namespace flatbuffers
|
|
||||||
@@ -1,279 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file BigFile.cpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date October 2025
|
|
||||||
*********************************************************************/
|
|
||||||
#include <Engine/BigFile/BigFile.hpp>
|
|
||||||
|
|
||||||
#include <Engine/EngineAssertHandler.hpp>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
BigFile::BigFile(const File& p_file)
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_open_v2(p_file.Absolute().Path().data(), &m_db, SQLITE_OPEN_READWRITE, nullptr);
|
|
||||||
CRITICAL_ASSERT(EngineAssertHandler,
|
|
||||||
result == SQLITE_OK,
|
|
||||||
"Failed to open BigFile {} DB: {}",
|
|
||||||
p_file.Absolute().Path(),
|
|
||||||
sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::BeginTransaction()
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_exec(m_db, "BEGIN TRANSACTION;", nullptr, nullptr, nullptr);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to begin transaction: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::CommitTransaction()
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_exec(m_db, "COMMIT TRANSACTION;", nullptr, nullptr, nullptr);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to commit: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::RollbackTransaction()
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_exec(m_db, "ROLLBACK TRANSACTION;", nullptr, nullptr, nullptr);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to rollback: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::~BigFile()
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_close_v2(m_db);
|
|
||||||
CRITICAL_ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to close BigFile DB: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Request(const BigFile& p_bigFile, const eastl::string_view p_request):
|
|
||||||
m_db(p_bigFile.m_db)
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_prepare_v2(m_db,
|
|
||||||
p_request.data(),
|
|
||||||
static_cast<std::uint32_t>(p_request.size()),
|
|
||||||
&m_statement,
|
|
||||||
nullptr);
|
|
||||||
CRITICAL_ASSERT(EngineAssertHandler,
|
|
||||||
result == SQLITE_OK,
|
|
||||||
"Failed to create statement from BigFile DB: {}",
|
|
||||||
sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::Request::Bind(const std::uint32_t p_index, const std::int32_t p_value)
|
|
||||||
{
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
(p_index >= 1) && (p_index <= static_cast<std::uint32_t>(sqlite3_bind_parameter_count(m_statement))),
|
|
||||||
"Invalid index for statement");
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_bind_int(m_statement, p_index, p_value);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to bind value for statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::Request::Bind(const std::uint32_t p_index, const std::uint32_t p_value)
|
|
||||||
{
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
(p_index >= 1) && (p_index <= static_cast<std::uint32_t>(sqlite3_bind_parameter_count(m_statement))),
|
|
||||||
"Invalid index for statement");
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_bind_int(m_statement, p_index, p_value);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to bind value for statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::Request::Bind(const std::uint32_t p_index, const std::int64_t p_value)
|
|
||||||
{
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
(p_index >= 1) && (p_index <= static_cast<std::uint32_t>(sqlite3_bind_parameter_count(m_statement))),
|
|
||||||
"Invalid index for statement");
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_bind_int64(m_statement, p_index, p_value);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to bind value for statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::Request::Bind(const std::uint32_t p_index, const float p_value)
|
|
||||||
{
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
(p_index >= 1) && (p_index <= static_cast<std::uint32_t>(sqlite3_bind_parameter_count(m_statement))),
|
|
||||||
"Invalid index for statement");
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_bind_double(m_statement, p_index, p_value);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to bind value for statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::Request::Bind(const std::uint32_t p_index, const double p_value)
|
|
||||||
{
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
(p_index >= 1) && (p_index <= static_cast<std::uint32_t>(sqlite3_bind_parameter_count(m_statement))),
|
|
||||||
"Invalid index for statement");
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_bind_double(m_statement, p_index, p_value);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to bind value for statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::Request::Bind(const std::uint32_t p_index, const eastl::string_view p_value, const CopyValue p_copy)
|
|
||||||
{
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
(p_index >= 1) && (p_index <= static_cast<std::uint32_t>(sqlite3_bind_parameter_count(m_statement))),
|
|
||||||
"Invalid index for statement");
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_bind_text(m_statement,
|
|
||||||
p_index,
|
|
||||||
p_value.data(),
|
|
||||||
static_cast<std::uint32_t>(p_value.size()),
|
|
||||||
p_copy ? SQLITE_TRANSIENT : SQLITE_STATIC);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to bind value for statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
void BigFile::Request::Bind(const std::uint32_t p_index,
|
|
||||||
const eastl::span<const std::byte> p_value,
|
|
||||||
const CopyValue p_copy)
|
|
||||||
{
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
(p_index >= 1) && (p_index <= static_cast<std::uint32_t>(sqlite3_bind_parameter_count(m_statement))),
|
|
||||||
"Invalid index for statement");
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_bind_blob(m_statement,
|
|
||||||
p_index,
|
|
||||||
p_value.data(),
|
|
||||||
static_cast<std::uint32_t>(p_value.size()),
|
|
||||||
p_copy ? SQLITE_TRANSIENT : SQLITE_STATIC);
|
|
||||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to bind value for statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
bool BigFile::Request::Step()
|
|
||||||
{
|
|
||||||
const int result = sqlite3_step(m_statement);
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
(result == SQLITE_DONE) || (result == SQLITE_ROW),
|
|
||||||
"Failed to step through the statement: {}",
|
|
||||||
sqlite3_errmsg(m_db));
|
|
||||||
|
|
||||||
return result == SQLITE_ROW;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
std::uint32_t BigFile::Request::Execute()
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_step(m_statement);
|
|
||||||
ASSERT(EngineAssertHandler, (result == SQLITE_DONE), "Failed to execute the statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
|
|
||||||
return sqlite3_changes(m_db);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column::Column(const Request& p_request, const std::uint32_t p_index):
|
|
||||||
m_statement(p_request.m_statement),
|
|
||||||
m_index(p_index)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column::operator std::int32_t() const
|
|
||||||
{
|
|
||||||
return sqlite3_column_int(m_statement, m_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column::operator std::uint32_t() const
|
|
||||||
{
|
|
||||||
return sqlite3_column_int(m_statement, m_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column::operator std::int64_t() const
|
|
||||||
{
|
|
||||||
return sqlite3_column_int64(m_statement, m_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column::operator float() const
|
|
||||||
{
|
|
||||||
return static_cast<float>(sqlite3_column_double(m_statement, m_index));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column::operator double() const
|
|
||||||
{
|
|
||||||
return sqlite3_column_double(m_statement, m_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column::operator eastl::string_view() const
|
|
||||||
{
|
|
||||||
return eastl::string_view {reinterpret_cast<const char*>(sqlite3_column_text(m_statement, m_index)),
|
|
||||||
static_cast<std::size_t>(sqlite3_column_bytes(m_statement, m_index))};
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column::operator eastl::span<const std::byte>() const
|
|
||||||
{
|
|
||||||
return eastl::span<const std::byte> {static_cast<const std::byte*>(sqlite3_column_blob(m_statement, m_index)),
|
|
||||||
static_cast<std::size_t>(sqlite3_column_bytes(m_statement, m_index))};
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::Column BigFile::Request::Get(const std::uint32_t p_index) const
|
|
||||||
{
|
|
||||||
ASSERT(EngineAssertHandler,
|
|
||||||
p_index < static_cast<std::uint32_t>(sqlite3_column_count(m_statement)),
|
|
||||||
"Invalid index for column!");
|
|
||||||
return {*this, p_index};
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
BigFile::Request::~Request()
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const int result = sqlite3_finalize(m_statement);
|
|
||||||
CRITICAL_ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to finalize statement: {}", sqlite3_errmsg(m_db));
|
|
||||||
}
|
|
||||||
} // namespace Bigfoot
|
|
||||||
@@ -38,12 +38,4 @@ BEGIN
|
|||||||
UPDATE AssetHeader
|
UPDATE AssetHeader
|
||||||
SET ModificationTime = CAST(unixepoch('subsec') AS INTEGER) * 1000000
|
SET ModificationTime = CAST(unixepoch('subsec') AS INTEGER) * 1000000
|
||||||
WHERE UUID = NEW.UUID;
|
WHERE UUID = NEW.UUID;
|
||||||
END;
|
END;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS AssetDependency (
|
|
||||||
AssetUUID BLOB NOT NULL,
|
|
||||||
DependsOnUUID BLOB NOT NULL,
|
|
||||||
PRIMARY KEY(AssetUUID, DependsOnUUID),
|
|
||||||
FOREIGN KEY(AssetUUID) REFERENCES AssetHeader(UUID) ON DELETE CASCADE,
|
|
||||||
FOREIGN KEY(DependsOnUUID) REFERENCES AssetHeader(UUID) ON DELETE RESTRICT
|
|
||||||
);
|
|
||||||
Binary file not shown.
@@ -1,94 +0,0 @@
|
|||||||
/**
|
|
||||||
* Auto-generated header from: Asset.bfbs
|
|
||||||
* Generated by Bin2CPP
|
|
||||||
*
|
|
||||||
* DO NOT TOUCH
|
|
||||||
*/
|
|
||||||
#ifndef ASSET_BFBS_HPP
|
|
||||||
#define ASSET_BFBS_HPP
|
|
||||||
#include <EASTL/array.h>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
inline constexpr eastl::array<std::byte, 1192> 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{0x88}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x38}, 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{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x58}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0xA0}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0xDC}, 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{0x1C}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xE0}, 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{0x2C}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x90}, 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{0x3C}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xDC}, 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{0x74}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0xB0}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x1C}, 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{0xB8}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x58}, 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{0x48}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{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{0x05}, 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{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x34}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x20}, std::byte{0xFE}, 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{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{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{0x3C}, 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{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x38}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0xDC}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xA8}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x68}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x78}, 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{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{0x03}, 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}, 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{0x03}, 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{0x54}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x58}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4C}, 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{0x34}, 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{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{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{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{0x5C}, 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{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, 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{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{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{0x00}, 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 // ASSET_BFBS_HPP
|
|
||||||
@@ -1,25 +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, 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
table Asset
|
|
||||||
{
|
|
||||||
header: AssetHeader (required, id: 0);
|
|
||||||
asset: [ubyte] (required, id: 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
root_type Asset;
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file Asset.hpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date April 2026
|
|
||||||
*********************************************************************/
|
|
||||||
#ifndef BIGFOOT_ENGINE_ASSET_HPP
|
|
||||||
#define BIGFOOT_ENGINE_ASSET_HPP
|
|
||||||
#include <Engine/BigFile/Asset/Asset_generated.hpp>
|
|
||||||
|
|
||||||
#include <EASTL/vector.h>
|
|
||||||
#include <rapidhash.h>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
template<class FLAT_ASSET>
|
|
||||||
class Asset
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Asset()
|
|
||||||
{
|
|
||||||
m_header.type_id = GetTypeID();
|
|
||||||
m_header.type_name = GetTypeName();
|
|
||||||
}
|
|
||||||
|
|
||||||
explicit Asset(const eastl::span<const std::byte> p_flatbuffer):
|
|
||||||
m_header(UnPackHeader(p_flatbuffer)),
|
|
||||||
m_asset(UnpackAsset(p_flatbuffer))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const Bigfoot::Flat::AssetHeaderT& GetHeader() const
|
|
||||||
{
|
|
||||||
return m_header;
|
|
||||||
}
|
|
||||||
|
|
||||||
const typename FLAT_ASSET::NativeTableType& GetAsset() const
|
|
||||||
{
|
|
||||||
return m_asset;
|
|
||||||
}
|
|
||||||
|
|
||||||
typename FLAT_ASSET::NativeTableType& GetAsset()
|
|
||||||
{
|
|
||||||
return m_asset;
|
|
||||||
}
|
|
||||||
|
|
||||||
eastl::vector<std::byte> Pack() const
|
|
||||||
{
|
|
||||||
flatbuffers::FlatBufferBuilder assetFbb;
|
|
||||||
assetFbb.Finish(FLAT_ASSET::Pack(assetFbb, &m_asset));
|
|
||||||
|
|
||||||
Flat::AssetT outer;
|
|
||||||
outer.header = eastl::make_unique<Flat::AssetHeaderT>(m_header);
|
|
||||||
outer.asset = {assetFbb.GetBufferSpan().begin(), assetFbb.GetBufferSpan().end()};
|
|
||||||
|
|
||||||
flatbuffers::FlatBufferBuilder fullFbb;
|
|
||||||
fullFbb.Finish(Flat::Asset::Pack(fullFbb, &outer));
|
|
||||||
|
|
||||||
return eastl::vector<std::byte> {std::bit_cast<std::byte*>(fullFbb.GetBufferPointer()),
|
|
||||||
std::bit_cast<std::byte*>(fullFbb.GetBufferPointer() + fullFbb.GetSize())};
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetName(const eastl::string_view p_name)
|
|
||||||
{
|
|
||||||
m_header.name = p_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetVersion(const std::uint32_t p_version)
|
|
||||||
{
|
|
||||||
m_header.version = p_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::uint64_t GetTypeID()
|
|
||||||
{
|
|
||||||
static const std::uint64_t typeID = rapidhash(FLAT_ASSET::GetFullyQualifiedName(),
|
|
||||||
std::strlen(FLAT_ASSET::GetFullyQualifiedName()));
|
|
||||||
return typeID;
|
|
||||||
}
|
|
||||||
|
|
||||||
static eastl::string_view GetTypeName()
|
|
||||||
{
|
|
||||||
return FLAT_ASSET::GetFullyQualifiedName();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
static Bigfoot::Flat::AssetHeaderT UnPackHeader(const eastl::span<const std::byte> p_flatbuffer)
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::AssetHeaderT header;
|
|
||||||
|
|
||||||
flatbuffers::GetRoot<Flat::Asset>(p_flatbuffer.data())->header()->UnPackTo(&header);
|
|
||||||
|
|
||||||
return header;
|
|
||||||
}
|
|
||||||
|
|
||||||
static typename FLAT_ASSET::NativeTableType UnpackAsset(const eastl::span<const std::byte> p_flatbuffer)
|
|
||||||
{
|
|
||||||
typename FLAT_ASSET::NativeTableType asset;
|
|
||||||
|
|
||||||
const Flat::Asset* outer = flatbuffers::GetRoot<Flat::Asset>(p_flatbuffer.data());
|
|
||||||
flatbuffers::GetRoot<FLAT_ASSET>(outer->asset()->data())->UnPackTo(&asset, nullptr);
|
|
||||||
|
|
||||||
return asset;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
Flat::AssetHeaderT m_header;
|
|
||||||
typename FLAT_ASSET::NativeTableType m_asset;
|
|
||||||
};
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Binary file not shown.
@@ -1,37 +0,0 @@
|
|||||||
/**
|
|
||||||
* Auto-generated header from: AssetTypeID.bfbs
|
|
||||||
* Generated by Bin2CPP
|
|
||||||
*
|
|
||||||
* DO NOT TOUCH
|
|
||||||
*/
|
|
||||||
#ifndef ASSETTYPEID_BFBS_HPP
|
|
||||||
#define ASSETTYPEID_BFBS_HPP
|
|
||||||
#include <EASTL/array.h>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
inline constexpr eastl::array<std::byte, 288> g_AssetTypeID_bfbs = {
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, 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{0x00}, std::byte{0x00}, std::byte{0x14}, 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{0x30}, 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{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, 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{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, 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{0x80}, std::byte{0xFF}, 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{0x00}, 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{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x28}, 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{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{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{0x00}, 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 // ASSETTYPEID_BFBS_HPP
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
namespace Bigfoot.Flat;
|
|
||||||
|
|
||||||
struct AssetTypeID (native_type: "::Bigfoot::AssetTypeID")
|
|
||||||
{
|
|
||||||
value: ulong;
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file AssetTypeID.hpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date February 2026
|
|
||||||
*********************************************************************/
|
|
||||||
#ifndef BIGFOOT_ENGINE_ASSETTYPEID_HPP
|
|
||||||
#define BIGFOOT_ENGINE_ASSETTYPEID_HPP
|
|
||||||
#include <Engine/BigFile/Asset/AssetTypeID_generated.hpp>
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
using AssetTypeID = std::uint64_t;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::AssetTypeID Pack(const Bigfoot::AssetTypeID& p_assetTypeID);
|
|
||||||
Bigfoot::AssetTypeID UnPack(const Bigfoot::Flat::AssetTypeID& p_flatAssetTypeID);
|
|
||||||
} // namespace flatbuffers
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef FLATBUFFERS_GENERATED_ASSETTYPEID_BIGFOOT_FLAT_H_
|
|
||||||
#define FLATBUFFERS_GENERATED_ASSETTYPEID_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 "EASTL/unique_ptr.h"
|
|
||||||
#include "EASTL/string.h"
|
|
||||||
|
|
||||||
namespace Bigfoot {
|
|
||||||
namespace Flat {
|
|
||||||
|
|
||||||
struct AssetTypeID;
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetTypeIDTypeTable();
|
|
||||||
|
|
||||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) AssetTypeID FLATBUFFERS_FINAL_CLASS {
|
|
||||||
private:
|
|
||||||
uint64_t value_;
|
|
||||||
|
|
||||||
public:
|
|
||||||
struct Traits;
|
|
||||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
|
||||||
return AssetTypeIDTypeTable();
|
|
||||||
}
|
|
||||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
|
||||||
return "Bigfoot.Flat.AssetTypeID";
|
|
||||||
}
|
|
||||||
AssetTypeID()
|
|
||||||
: value_(0) {
|
|
||||||
}
|
|
||||||
AssetTypeID(uint64_t _value)
|
|
||||||
: value_(::flatbuffers::EndianScalar(_value)) {
|
|
||||||
}
|
|
||||||
uint64_t value() const {
|
|
||||||
return ::flatbuffers::EndianScalar(value_);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
FLATBUFFERS_STRUCT_END(AssetTypeID, 8);
|
|
||||||
|
|
||||||
struct AssetTypeID::Traits {
|
|
||||||
using type = AssetTypeID;
|
|
||||||
};
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetTypeIDTypeTable() {
|
|
||||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
|
||||||
{ ::flatbuffers::ET_ULONG, 0, -1 }
|
|
||||||
};
|
|
||||||
static const int64_t values[] = { 0, 8 };
|
|
||||||
static const char * const names[] = {
|
|
||||||
"value"
|
|
||||||
};
|
|
||||||
static const ::flatbuffers::TypeTable tt = {
|
|
||||||
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, nullptr, values, names
|
|
||||||
};
|
|
||||||
return &tt;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Flat
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // FLATBUFFERS_GENERATED_ASSETTYPEID_BIGFOOT_FLAT_H_
|
|
||||||
@@ -1,435 +0,0 @@
|
|||||||
// 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 AssetHeader;
|
|
||||||
struct AssetHeaderBuilder;
|
|
||||||
struct AssetHeaderT;
|
|
||||||
|
|
||||||
struct Asset;
|
|
||||||
struct AssetBuilder;
|
|
||||||
struct AssetT;
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable();
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetTypeTable();
|
|
||||||
|
|
||||||
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;
|
|
||||||
std::vector<::Bigfoot::UUID> dependencies{};
|
|
||||||
};
|
|
||||||
|
|
||||||
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,
|
|
||||||
VT_DEPENDENCIES = 14
|
|
||||||
};
|
|
||||||
const Bigfoot::Flat::UUID *uuid() const {
|
|
||||||
return GetStruct<const Bigfoot::Flat::UUID *>(VT_UUID);
|
|
||||||
}
|
|
||||||
const ::flatbuffers::String *name() const {
|
|
||||||
return GetPointer<const ::flatbuffers::String *>(VT_NAME);
|
|
||||||
}
|
|
||||||
const Bigfoot::Flat::AssetTypeID *type_id() const {
|
|
||||||
return GetStruct<const Bigfoot::Flat::AssetTypeID *>(VT_TYPE_ID);
|
|
||||||
}
|
|
||||||
const ::flatbuffers::String *type_name() const {
|
|
||||||
return GetPointer<const ::flatbuffers::String *>(VT_TYPE_NAME);
|
|
||||||
}
|
|
||||||
uint32_t version() const {
|
|
||||||
return GetField<uint32_t>(VT_VERSION, 0);
|
|
||||||
}
|
|
||||||
const ::flatbuffers::Vector<const Bigfoot::Flat::UUID *> *dependencies() const {
|
|
||||||
return GetPointer<const ::flatbuffers::Vector<const Bigfoot::Flat::UUID *> *>(VT_DEPENDENCIES);
|
|
||||||
}
|
|
||||||
template <bool B = false>
|
|
||||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
|
||||||
return VerifyTableStart(verifier) &&
|
|
||||||
VerifyFieldRequired<Bigfoot::Flat::UUID>(verifier, VT_UUID, 1) &&
|
|
||||||
VerifyOffsetRequired(verifier, VT_NAME) &&
|
|
||||||
verifier.VerifyString(name()) &&
|
|
||||||
VerifyFieldRequired<Bigfoot::Flat::AssetTypeID>(verifier, VT_TYPE_ID, 8) &&
|
|
||||||
VerifyOffsetRequired(verifier, VT_TYPE_NAME) &&
|
|
||||||
verifier.VerifyString(type_name()) &&
|
|
||||||
VerifyField<uint32_t>(verifier, VT_VERSION, 4) &&
|
|
||||||
VerifyOffsetRequired(verifier, VT_DEPENDENCIES) &&
|
|
||||||
verifier.VerifyVector(dependencies()) &&
|
|
||||||
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<AssetHeader> 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<uint32_t>(AssetHeader::VT_VERSION, version, 0);
|
|
||||||
}
|
|
||||||
void add_dependencies(::flatbuffers::Offset<::flatbuffers::Vector<const Bigfoot::Flat::UUID *>> dependencies) {
|
|
||||||
fbb_.AddOffset(AssetHeader::VT_DEPENDENCIES, dependencies);
|
|
||||||
}
|
|
||||||
explicit AssetHeaderBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
|
||||||
: fbb_(_fbb) {
|
|
||||||
start_ = fbb_.StartTable();
|
|
||||||
}
|
|
||||||
::flatbuffers::Offset<AssetHeader> Finish() {
|
|
||||||
const auto end = fbb_.EndTable(start_);
|
|
||||||
auto o = ::flatbuffers::Offset<AssetHeader>(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);
|
|
||||||
fbb_.Required(o, AssetHeader::VT_DEPENDENCIES);
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<AssetHeader> 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,
|
|
||||||
::flatbuffers::Offset<::flatbuffers::Vector<const Bigfoot::Flat::UUID *>> dependencies = 0) {
|
|
||||||
AssetHeaderBuilder builder_(_fbb);
|
|
||||||
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 AssetHeader::Traits {
|
|
||||||
using type = AssetHeader;
|
|
||||||
static auto constexpr Create = CreateAssetHeader;
|
|
||||||
};
|
|
||||||
|
|
||||||
::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
|
||||||
|
|
||||||
struct AssetT : public ::flatbuffers::NativeTable {
|
|
||||||
typedef Asset TableType;
|
|
||||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
|
||||||
return "Bigfoot.Flat.AssetT";
|
|
||||||
}
|
|
||||||
eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT> header{};
|
|
||||||
std::vector<uint8_t> asset{};
|
|
||||||
AssetT() = default;
|
|
||||||
AssetT(const AssetT &o);
|
|
||||||
AssetT(AssetT&&) FLATBUFFERS_NOEXCEPT = default;
|
|
||||||
AssetT &operator=(AssetT o) FLATBUFFERS_NOEXCEPT;
|
|
||||||
};
|
|
||||||
|
|
||||||
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_HEADER = 4,
|
|
||||||
VT_ASSET = 6
|
|
||||||
};
|
|
||||||
const Bigfoot::Flat::AssetHeader *header() const {
|
|
||||||
return GetPointer<const Bigfoot::Flat::AssetHeader *>(VT_HEADER);
|
|
||||||
}
|
|
||||||
const ::flatbuffers::Vector<uint8_t> *asset() const {
|
|
||||||
return GetPointer<const ::flatbuffers::Vector<uint8_t> *>(VT_ASSET);
|
|
||||||
}
|
|
||||||
template <bool B = false>
|
|
||||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
|
||||||
return VerifyTableStart(verifier) &&
|
|
||||||
VerifyOffsetRequired(verifier, VT_HEADER) &&
|
|
||||||
verifier.VerifyTable(header()) &&
|
|
||||||
VerifyOffsetRequired(verifier, VT_ASSET) &&
|
|
||||||
verifier.VerifyVector(asset()) &&
|
|
||||||
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<Asset> 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_header(::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> header) {
|
|
||||||
fbb_.AddOffset(Asset::VT_HEADER, header);
|
|
||||||
}
|
|
||||||
void add_asset(::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> asset) {
|
|
||||||
fbb_.AddOffset(Asset::VT_ASSET, asset);
|
|
||||||
}
|
|
||||||
explicit AssetBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
|
||||||
: fbb_(_fbb) {
|
|
||||||
start_ = fbb_.StartTable();
|
|
||||||
}
|
|
||||||
::flatbuffers::Offset<Asset> Finish() {
|
|
||||||
const auto end = fbb_.EndTable(start_);
|
|
||||||
auto o = ::flatbuffers::Offset<Asset>(end);
|
|
||||||
fbb_.Required(o, Asset::VT_HEADER);
|
|
||||||
fbb_.Required(o, Asset::VT_ASSET);
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<Asset> CreateAsset(
|
|
||||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
|
||||||
::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> header = 0,
|
|
||||||
::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> asset = 0) {
|
|
||||||
AssetBuilder builder_(_fbb);
|
|
||||||
builder_.add_asset(asset);
|
|
||||||
builder_.add_header(header);
|
|
||||||
return builder_.Finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Asset::Traits {
|
|
||||||
using type = Asset;
|
|
||||||
static auto constexpr Create = CreateAsset;
|
|
||||||
};
|
|
||||||
|
|
||||||
::flatbuffers::Offset<Asset> CreateAsset(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
|
||||||
|
|
||||||
inline AssetHeaderT *AssetHeader::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
|
||||||
auto _o = std::make_unique<AssetHeaderT>();
|
|
||||||
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; }
|
|
||||||
{ 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); } }
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
|
||||||
return AssetHeader::Pack(_fbb, _o, _rehasher);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<AssetHeader> 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;
|
|
||||||
auto _dependencies = _fbb.CreateVectorOfNativeStructs<Bigfoot::Flat::UUID, ::Bigfoot::UUID>(_o->dependencies);
|
|
||||||
return Bigfoot::Flat::CreateAssetHeader(
|
|
||||||
_fbb,
|
|
||||||
&_uuid,
|
|
||||||
_name,
|
|
||||||
&_type_id,
|
|
||||||
_type_name,
|
|
||||||
_version,
|
|
||||||
_dependencies);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline AssetT::AssetT(const AssetT &o)
|
|
||||||
: header((o.header) ? new Bigfoot::Flat::AssetHeaderT(*o.header) : nullptr),
|
|
||||||
asset(o.asset) {
|
|
||||||
}
|
|
||||||
|
|
||||||
inline AssetT &AssetT::operator=(AssetT o) FLATBUFFERS_NOEXCEPT {
|
|
||||||
std::swap(header, o.header);
|
|
||||||
std::swap(asset, o.asset);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline AssetT *Asset::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
|
||||||
auto _o = std::make_unique<AssetT>();
|
|
||||||
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 = header(); if (_e) { if(_o->header) { _e->UnPackTo(_o->header.get(), _resolver); } else { _o->header = eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT>(_e->UnPack(_resolver)); } } else if (_o->header) { _o->header.reset(); } }
|
|
||||||
{ auto _e = asset(); if (_e) { _o->asset.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->asset.begin()); } }
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<Asset> CreateAsset(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
|
||||||
return Asset::Pack(_fbb, _o, _rehasher);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<Asset> 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 _header = _o->header ? CreateAssetHeader(_fbb, _o->header.get(), _rehasher) : 0;
|
|
||||||
auto _asset = _fbb.CreateVector(_o->asset);
|
|
||||||
return Bigfoot::Flat::CreateAsset(
|
|
||||||
_fbb,
|
|
||||||
_header,
|
|
||||||
_asset);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 },
|
|
||||||
{ ::flatbuffers::ET_SEQUENCE, 1, 0 }
|
|
||||||
};
|
|
||||||
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"
|
|
||||||
};
|
|
||||||
static const ::flatbuffers::TypeTable tt = {
|
|
||||||
::flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, nullptr, names
|
|
||||||
};
|
|
||||||
return &tt;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetTypeTable() {
|
|
||||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
|
||||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
|
||||||
{ ::flatbuffers::ET_UCHAR, 1, -1 }
|
|
||||||
};
|
|
||||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
|
||||||
Bigfoot::Flat::AssetHeaderTypeTable
|
|
||||||
};
|
|
||||||
static const char * const names[] = {
|
|
||||||
"header",
|
|
||||||
"asset"
|
|
||||||
};
|
|
||||||
static const ::flatbuffers::TypeTable tt = {
|
|
||||||
::flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names
|
|
||||||
};
|
|
||||||
return &tt;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const Bigfoot::Flat::Asset *GetAsset(const void *buf) {
|
|
||||||
return ::flatbuffers::GetRoot<Bigfoot::Flat::Asset>(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const Bigfoot::Flat::Asset *GetSizePrefixedAsset(const void *buf) {
|
|
||||||
return ::flatbuffers::GetSizePrefixedRoot<Bigfoot::Flat::Asset>(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <bool B = false>
|
|
||||||
inline bool VerifyAssetBuffer(
|
|
||||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
|
||||||
return verifier.template VerifyBuffer<Bigfoot::Flat::Asset>(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <bool B = false>
|
|
||||||
inline bool VerifySizePrefixedAssetBuffer(
|
|
||||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
|
||||||
return verifier.template VerifySizePrefixedBuffer<Bigfoot::Flat::Asset>(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const char *AssetExtension() {
|
|
||||||
return "bfbs";
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void FinishAssetBuffer(
|
|
||||||
::flatbuffers::FlatBufferBuilder &fbb,
|
|
||||||
::flatbuffers::Offset<Bigfoot::Flat::Asset> root) {
|
|
||||||
fbb.Finish(root);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void FinishSizePrefixedAssetBuffer(
|
|
||||||
::flatbuffers::FlatBufferBuilder &fbb,
|
|
||||||
::flatbuffers::Offset<Bigfoot::Flat::Asset> root) {
|
|
||||||
fbb.FinishSizePrefixed(root);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetT> UnPackAsset(
|
|
||||||
const void *buf,
|
|
||||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
|
||||||
return eastl::unique_ptr<Bigfoot::Flat::AssetT>(GetAsset(buf)->UnPack(res));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetT> UnPackSizePrefixedAsset(
|
|
||||||
const void *buf,
|
|
||||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
|
||||||
return eastl::unique_ptr<Bigfoot::Flat::AssetT>(GetSizePrefixedAsset(buf)->UnPack(res));
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Flat
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // FLATBUFFERS_GENERATED_ASSET_BIGFOOT_FLAT_H_
|
|
||||||
@@ -1,262 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file BigFile.hpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date October 2025
|
|
||||||
*********************************************************************/
|
|
||||||
#ifndef BIGFOOT_ENGINE_BIGFILE_HPP
|
|
||||||
#define BIGFOOT_ENGINE_BIGFILE_HPP
|
|
||||||
#include <System/File.hpp>
|
|
||||||
|
|
||||||
#include <Utils/TaggedType.hpp>
|
|
||||||
|
|
||||||
#include <EASTL/span.h>
|
|
||||||
|
|
||||||
#include <sqlite3.h>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
class BigFile
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* \param p_file The file targetting the BigFile DB
|
|
||||||
*/
|
|
||||||
BigFile(const File& p_file);
|
|
||||||
|
|
||||||
BigFile(const BigFile& p_bigFile) = default;
|
|
||||||
BigFile(BigFile&& p_bigFile) = default;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Begin a transaction
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void BeginTransaction();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Commit a transaction
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void CommitTransaction();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rollback a transaction
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void RollbackTransaction();
|
|
||||||
|
|
||||||
~BigFile();
|
|
||||||
|
|
||||||
BigFile& operator=(const BigFile& p_bigFile) = default;
|
|
||||||
BigFile& operator=(BigFile&& p_bigFile) = default;
|
|
||||||
|
|
||||||
class Request
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
/*
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* \param p_bigFile The bigfile
|
|
||||||
* \param p_request The SQL request
|
|
||||||
*/
|
|
||||||
Request(const BigFile& p_bigFile, const eastl::string_view p_request);
|
|
||||||
|
|
||||||
Request(const Request& p_request) = default;
|
|
||||||
Request(Request&& p_request) = default;
|
|
||||||
|
|
||||||
using CopyValue = TaggedType<bool>;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bind a int32 value to the Request at index
|
|
||||||
*
|
|
||||||
* \param p_index The index to bind to
|
|
||||||
* \param p_value The value
|
|
||||||
*/
|
|
||||||
void Bind(const std::uint32_t p_index, const std::int32_t p_value);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bind a uint32 value to the Request at index
|
|
||||||
*
|
|
||||||
* \param p_index The index to bind to
|
|
||||||
* \param p_value The value
|
|
||||||
*/
|
|
||||||
void Bind(const std::uint32_t p_index, const std::uint32_t p_value);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bind a int64 value to the Request at index
|
|
||||||
*
|
|
||||||
* \param p_index The index to bind to
|
|
||||||
* \param p_value The value
|
|
||||||
*/
|
|
||||||
void Bind(const std::uint32_t p_index, const std::int64_t p_value);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bind a float value to the Request at index
|
|
||||||
*
|
|
||||||
* \param p_index The index to bind to
|
|
||||||
* \param p_value The value
|
|
||||||
*/
|
|
||||||
void Bind(const std::uint32_t p_index, const float p_value);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bind a double value to the Request at index
|
|
||||||
*
|
|
||||||
* \param p_index The index to bind to
|
|
||||||
* \param p_value The value
|
|
||||||
*/
|
|
||||||
void Bind(const std::uint32_t p_index, const double p_value);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bind a string value to the Request at index
|
|
||||||
*
|
|
||||||
* \param p_index The index to bind to
|
|
||||||
* \param p_value The value
|
|
||||||
* \param p_copy Should the memory be copied so that caller does not have to retain it
|
|
||||||
*/
|
|
||||||
void Bind(const std::uint32_t p_index,
|
|
||||||
const eastl::string_view p_value,
|
|
||||||
const CopyValue p_copy = CopyValue {false});
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bind a blob value to the Request at index
|
|
||||||
*
|
|
||||||
* \param p_index The index to bind to
|
|
||||||
* \param p_value The value
|
|
||||||
* \param p_copy Should the memory be copied so that caller does not have to retain it
|
|
||||||
*/
|
|
||||||
void Bind(const std::uint32_t p_index,
|
|
||||||
const eastl::span<const std::byte> p_value,
|
|
||||||
const CopyValue p_copy = CopyValue {false});
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Step through the request
|
|
||||||
*
|
|
||||||
* \return True if the request can continue (get next row), false otherwise
|
|
||||||
*/
|
|
||||||
[[nodiscard]]
|
|
||||||
bool Step();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Execute the request once
|
|
||||||
*
|
|
||||||
* The number of modified rows
|
|
||||||
*/
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t Execute();
|
|
||||||
|
|
||||||
class Column
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
/*
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* \param p_request The request to get the column of
|
|
||||||
* \param p_index Column index
|
|
||||||
*/
|
|
||||||
Column(const Request& p_request, const std::uint32_t p_index);
|
|
||||||
|
|
||||||
Column(const Column& p_column) = default;
|
|
||||||
Column(Column&& p_column) = default;
|
|
||||||
|
|
||||||
~Column() = default;
|
|
||||||
|
|
||||||
Column& operator=(const Column& p_column) = default;
|
|
||||||
Column& operator=(Column&& p_column) = default;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get value as a int32
|
|
||||||
*
|
|
||||||
* \return The value
|
|
||||||
*/
|
|
||||||
operator std::int32_t() const;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get value as a uint32
|
|
||||||
*
|
|
||||||
* \return The value
|
|
||||||
*/
|
|
||||||
operator std::uint32_t() const;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get value as a int64
|
|
||||||
*
|
|
||||||
* \return The value
|
|
||||||
*/
|
|
||||||
operator std::int64_t() const;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get value as a float
|
|
||||||
*
|
|
||||||
* \return The value
|
|
||||||
*/
|
|
||||||
operator float() const;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get value as a double
|
|
||||||
*
|
|
||||||
* \return The value
|
|
||||||
*/
|
|
||||||
operator double() const;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get value as a string
|
|
||||||
*
|
|
||||||
* \return The value
|
|
||||||
*/
|
|
||||||
operator eastl::string_view() const;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get value as a blob
|
|
||||||
*
|
|
||||||
* \return The value
|
|
||||||
*/
|
|
||||||
operator eastl::span<const std::byte>() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
/*
|
|
||||||
* The statement
|
|
||||||
*/
|
|
||||||
sqlite3_stmt* m_statement;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The column index
|
|
||||||
*/
|
|
||||||
std::uint32_t m_index;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get a column
|
|
||||||
*
|
|
||||||
* \param p_index Column index
|
|
||||||
*/
|
|
||||||
[[nodiscard]]
|
|
||||||
Column Get(const std::uint32_t p_index) const;
|
|
||||||
|
|
||||||
~Request();
|
|
||||||
|
|
||||||
Request& operator=(const Request& p_request) = default;
|
|
||||||
Request& operator=(Request&& p_request) = default;
|
|
||||||
|
|
||||||
private:
|
|
||||||
/*
|
|
||||||
* The database
|
|
||||||
*/
|
|
||||||
sqlite3* m_db;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The statement
|
|
||||||
*/
|
|
||||||
sqlite3_stmt* m_statement;
|
|
||||||
};
|
|
||||||
|
|
||||||
private:
|
|
||||||
/**
|
|
||||||
* The BigFile DB
|
|
||||||
*/
|
|
||||||
sqlite3* m_db;
|
|
||||||
};
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -33,20 +33,23 @@ class EngineAssertHandler
|
|||||||
* Handle an assertion.
|
* Handle an assertion.
|
||||||
*
|
*
|
||||||
* \param p_location Location of the assertion.
|
* \param p_location Location of the assertion.
|
||||||
|
* \param p_stacktrace The stack trace
|
||||||
* \param p_format Format string for the assertion message.
|
* \param p_format Format string for the assertion message.
|
||||||
* \param p_args Arguments for the format string.
|
* \param p_args Arguments for the format string.
|
||||||
*/
|
*/
|
||||||
template<typename... ARGS>
|
template<typename... ARGS>
|
||||||
static void Handle(const std::source_location& p_location,
|
static void Handle(const std::source_location& p_location,
|
||||||
|
const std::string_view p_stacktrace,
|
||||||
std::format_string<ARGS...> p_format,
|
std::format_string<ARGS...> p_format,
|
||||||
ARGS&&... p_args)
|
ARGS&&... p_args)
|
||||||
{
|
{
|
||||||
BIGFOOT_LOG_FATAL(ENGINE_LOGGER,
|
BIGFOOT_LOG_FATAL(ENGINE_LOGGER,
|
||||||
"Assert: {} (File:{}, Line:{}, Function:{}\n",
|
"Assert: {} (File:{}, Line:{}, Function:{}\n{}",
|
||||||
std::format(p_format, std::forward<ARGS>(p_args)...),
|
std::format(p_format, eastl::forward<ARGS>(p_args)...),
|
||||||
p_location.file_name(),
|
p_location.file_name(),
|
||||||
p_location.line(),
|
p_location.line(),
|
||||||
p_location.function_name());
|
p_location.function_name(),
|
||||||
|
p_stacktrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
EngineAssertHandler& operator=(const EngineAssertHandler& p_handler) = delete;
|
EngineAssertHandler& operator=(const EngineAssertHandler& p_handler) = delete;
|
||||||
|
|||||||
1
Bigfoot/Sources/Engine/touch.cpp
Normal file
1
Bigfoot/Sources/Engine/touch.cpp
Normal file
@@ -0,0 +1 @@
|
|||||||
|
// to delete when an actual source is in Engine
|
||||||
@@ -3,7 +3,7 @@ project(${PackageName})
|
|||||||
|
|
||||||
set(PublicDependencies
|
set(PublicDependencies
|
||||||
$<$<CONFIG:Debug,RelWithDebInfo>:quill::quill>
|
$<$<CONFIG:Debug,RelWithDebInfo>:quill::quill>
|
||||||
$<IF:$<BOOL:${ASAN}>,mimalloc-asan,mimalloc-static>
|
mimalloc
|
||||||
stduuid::stduuid)
|
stduuid::stduuid)
|
||||||
set(PrivateDependencies)
|
set(PrivateDependencies)
|
||||||
set(BigfootPublicDependencies
|
set(BigfootPublicDependencies
|
||||||
@@ -20,8 +20,9 @@ bigfoot_create_package_lib(
|
|||||||
bigfoot_create_logger()
|
bigfoot_create_logger()
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME}
|
target_compile_definitions(${PROJECT_NAME}
|
||||||
PUBLIC
|
PUBLIC $<$<CONFIG:Debug,RelWithDebInfo>:QUILL_NO_EXCEPTIONS>
|
||||||
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_NO_EXCEPTIONS>
|
PUBLIC $<$<CONFIG:Debug,RelWithDebInfo>:QUILL_DISABLE_NON_PREFIXED_MACROS>
|
||||||
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_DISABLE_NON_PREFIXED_MACROS>)
|
|
||||||
|
PUBLIC MI_SHARED_LIB)
|
||||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/MimallocImpl.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/MimallocImpl.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,63 +0,0 @@
|
|||||||
/**
|
|
||||||
* Auto-generated header from: Log.bfbs
|
|
||||||
* Generated by Bin2CPP
|
|
||||||
*
|
|
||||||
* DO NOT TOUCH
|
|
||||||
*/
|
|
||||||
#ifndef LOG_BFBS_HPP
|
|
||||||
#define LOG_BFBS_HPP
|
|
||||||
#include <EASTL/array.h>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
inline constexpr eastl::array<std::byte, 704> g_Log_bfbs = {
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, 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{0x00}, std::byte{0x00}, std::byte{0x14}, 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{0x38}, 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{0x10}, std::byte{0x00}, std::byte{0x00}, 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{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{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xBC}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, 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{0x0C}, 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{0xB4}, 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{0x7E}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x98}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x5C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, 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{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0xC4}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x88}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x15}, 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{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x4C}, std::byte{0x65}, std::byte{0x76}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x58}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x43}, std::byte{0x72}, std::byte{0x69}, std::byte{0x74}, std::byte{0x69}, std::byte{0x63}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x20}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x8C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x45}, std::byte{0x72}, std::byte{0x72}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD4}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0xB8}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x57}, std::byte{0x61}, std::byte{0x72}, std::byte{0x6E}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
|
||||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF0}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, 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{0x2C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, 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{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x72}, std::byte{0x61}, std::byte{0x63}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x5C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
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{0x50}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, 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{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x44}, std::byte{0x65}, std::byte{0x62}, std::byte{0x75}, std::byte{0x67}, std::byte{0x00}, std::byte{0x12}, 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{0x10}, std::byte{0x00},
|
|
||||||
std::byte{0x12}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x09}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62},
|
|
||||||
std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, 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{0x0C}, std::byte{0x00}, std::byte{0x10}, 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{0x03}, 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{0x01}, 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{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{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x53}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x6B}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, 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{0x00}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x43}, std::byte{0x6F}, std::byte{0x6E}, std::byte{0x73}, std::byte{0x6F}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x00}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // LOG_BFBS_HPP
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
/**
|
|
||||||
* Auto-generated header from: Log.bfbs
|
|
||||||
* Generated by Bin2CPP
|
|
||||||
*
|
|
||||||
* DO NOT TOUCH
|
|
||||||
*/
|
|
||||||
#ifndef LOG_BFBS_HPP
|
|
||||||
#define LOG_BFBS_HPP
|
|
||||||
#include <EASTL/array.h>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
inline constexpr eastl::array<std::byte, 704> g_Log_bfbs = {
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, 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{0x00}, std::byte{0x00}, std::byte{0x14}, 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{0x38}, 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{0x10}, std::byte{0x00}, std::byte{0x00}, 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{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{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xBC}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, 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{0x0C}, 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{0xB4}, 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{0x7E}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x98}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x5C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, 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{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0xC4}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x88}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x15}, 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{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x4C}, std::byte{0x65}, std::byte{0x76}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x58}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x43}, std::byte{0x72}, std::byte{0x69}, std::byte{0x74}, std::byte{0x69}, std::byte{0x63}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x20}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x8C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x45}, std::byte{0x72}, std::byte{0x72}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD4}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0xB8}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x57}, std::byte{0x61}, std::byte{0x72}, std::byte{0x6E}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
|
||||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF0}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, 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{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, 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{0x2C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, 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{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x72}, std::byte{0x61}, std::byte{0x63}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x5C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
|
||||||
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{0x50}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, 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{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x44}, std::byte{0x65}, std::byte{0x62}, std::byte{0x75}, std::byte{0x67}, std::byte{0x00}, std::byte{0x12}, 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{0x10}, std::byte{0x00},
|
|
||||||
std::byte{0x12}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x09}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62},
|
|
||||||
std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, 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{0x0C}, std::byte{0x00}, std::byte{0x10}, 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{0x03}, 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{0x01}, 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{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{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x53}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x6B}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, 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{0x00}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x43}, std::byte{0x6F}, std::byte{0x6E}, std::byte{0x73}, std::byte{0x6F}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x00}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // LOG_BFBS_HPP
|
|
||||||
@@ -68,12 +68,6 @@ class Log
|
|||||||
*/
|
*/
|
||||||
void ChangeLoggerLogLevel(LoggerInfo& p_loggerInfo, const Flat::LogLevel p_level);
|
void ChangeLoggerLogLevel(LoggerInfo& p_loggerInfo, const Flat::LogLevel p_level);
|
||||||
|
|
||||||
/*
|
|
||||||
* Flush all the loggers
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void Flush();
|
|
||||||
|
|
||||||
~Log();
|
~Log();
|
||||||
|
|
||||||
Log& operator=(const Log& p_logger) = delete;
|
Log& operator=(const Log& p_logger) = delete;
|
||||||
|
|||||||
@@ -33,20 +33,23 @@ class SystemAssertHandler
|
|||||||
* Handle an assertion.
|
* Handle an assertion.
|
||||||
*
|
*
|
||||||
* \param p_location Location of the assertion.
|
* \param p_location Location of the assertion.
|
||||||
|
* \param p_stacktrace The stack trace
|
||||||
* \param p_format Format string for the assertion message.
|
* \param p_format Format string for the assertion message.
|
||||||
* \param p_args Arguments for the format string.
|
* \param p_args Arguments for the format string.
|
||||||
*/
|
*/
|
||||||
template<typename... ARGS>
|
template<typename... ARGS>
|
||||||
static void Handle(const std::source_location& p_location,
|
static void Handle(const std::source_location& p_location,
|
||||||
|
const std::string_view p_stacktrace,
|
||||||
std::format_string<ARGS...> p_format,
|
std::format_string<ARGS...> p_format,
|
||||||
ARGS&&... p_args)
|
ARGS&&... p_args)
|
||||||
{
|
{
|
||||||
BIGFOOT_LOG_FATAL(SYSTEM_LOGGER,
|
BIGFOOT_LOG_FATAL(SYSTEM_LOGGER,
|
||||||
"Assert: {} (File:{}, Line:{}, Function:{}\n",
|
"Assert: {} (File:{}, Line:{}, Function:{}\n{}",
|
||||||
std::format(p_format, std::forward<ARGS>(p_args)...),
|
std::format(p_format, eastl::forward<ARGS>(p_args)...),
|
||||||
p_location.file_name(),
|
p_location.file_name(),
|
||||||
p_location.line(),
|
p_location.line(),
|
||||||
p_location.function_name());
|
p_location.function_name(),
|
||||||
|
p_stacktrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemAssertHandler& operator=(const SystemAssertHandler& p_handler) = delete;
|
SystemAssertHandler& operator=(const SystemAssertHandler& p_handler) = delete;
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#ifndef BIGFOOT_SYSTEM_TIME_HPP
|
#ifndef BIGFOOT_SYSTEM_TIME_HPP
|
||||||
#define BIGFOOT_SYSTEM_TIME_HPP
|
#define BIGFOOT_SYSTEM_TIME_HPP
|
||||||
#include <System/Time/Time_generated.hpp>
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <compare>
|
#include <compare>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@@ -67,12 +65,4 @@ class Time
|
|||||||
};
|
};
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::Time Pack(const Bigfoot::Time& p_time);
|
|
||||||
Bigfoot::Time UnPack(const Bigfoot::Flat::Time& p_flatTime);
|
|
||||||
} // namespace flatbuffers
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Binary file not shown.
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* Auto-generated header from: Time.bfbs
|
|
||||||
* Generated by Bin2CPP
|
|
||||||
*
|
|
||||||
* DO NOT TOUCH
|
|
||||||
*/
|
|
||||||
#ifndef TIME_BFBS_HPP
|
|
||||||
#define TIME_BFBS_HPP
|
|
||||||
#include <EASTL/array.h>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
inline constexpr eastl::array<std::byte, 272> g_Time_bfbs = {
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, 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{0x00}, std::byte{0x00}, std::byte{0x14}, 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{0x30}, 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{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, 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{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, 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{0x90}, std::byte{0xFF}, 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{0x00}, 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{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x20}, 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{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x54}, std::byte{0x69}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, 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{0x54}, std::byte{0x69}, std::byte{0x6D}, std::byte{0x65}, 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{0x65}, std::byte{0x70}, std::byte{0x6F}, std::byte{0x63}, std::byte{0x68}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // TIME_BFBS_HPP
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
namespace Bigfoot.Flat;
|
|
||||||
|
|
||||||
struct Time (native_type: "::Bigfoot::Time")
|
|
||||||
{
|
|
||||||
epoch:ulong;
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef FLATBUFFERS_GENERATED_TIME_BIGFOOT_FLAT_H_
|
|
||||||
#define FLATBUFFERS_GENERATED_TIME_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 "EASTL/unique_ptr.h"
|
|
||||||
#include "EASTL/string.h"
|
|
||||||
|
|
||||||
namespace Bigfoot {
|
|
||||||
namespace Flat {
|
|
||||||
|
|
||||||
struct Time;
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *TimeTypeTable();
|
|
||||||
|
|
||||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Time FLATBUFFERS_FINAL_CLASS {
|
|
||||||
private:
|
|
||||||
uint64_t epoch_;
|
|
||||||
|
|
||||||
public:
|
|
||||||
struct Traits;
|
|
||||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
|
||||||
return TimeTypeTable();
|
|
||||||
}
|
|
||||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
|
||||||
return "Bigfoot.Flat.Time";
|
|
||||||
}
|
|
||||||
Time()
|
|
||||||
: epoch_(0) {
|
|
||||||
}
|
|
||||||
Time(uint64_t _epoch)
|
|
||||||
: epoch_(::flatbuffers::EndianScalar(_epoch)) {
|
|
||||||
}
|
|
||||||
uint64_t epoch() const {
|
|
||||||
return ::flatbuffers::EndianScalar(epoch_);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
FLATBUFFERS_STRUCT_END(Time, 8);
|
|
||||||
|
|
||||||
struct Time::Traits {
|
|
||||||
using type = Time;
|
|
||||||
};
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *TimeTypeTable() {
|
|
||||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
|
||||||
{ ::flatbuffers::ET_ULONG, 0, -1 }
|
|
||||||
};
|
|
||||||
static const int64_t values[] = { 0, 8 };
|
|
||||||
static const char * const names[] = {
|
|
||||||
"epoch"
|
|
||||||
};
|
|
||||||
static const ::flatbuffers::TypeTable tt = {
|
|
||||||
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, nullptr, values, names
|
|
||||||
};
|
|
||||||
return &tt;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Flat
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // FLATBUFFERS_GENERATED_TIME_BIGFOOT_FLAT_H_
|
|
||||||
18
Bigfoot/Sources/System/Include/System/UUID/FlatUUID.hpp
Normal file
18
Bigfoot/Sources/System/Include/System/UUID/FlatUUID.hpp
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*********************************************************************
|
||||||
|
* \file FlatUUID.hpp
|
||||||
|
*
|
||||||
|
* \author Romain BOULLARD
|
||||||
|
* \date December 2025
|
||||||
|
*********************************************************************/
|
||||||
|
#ifndef BIGFOOT_SYSTEM_FLATUUID_HPP
|
||||||
|
#define BIGFOOT_SYSTEM_FLATUUID_HPP
|
||||||
|
#include <System/UUID/UUID.hpp>
|
||||||
|
#include <System/UUID/UUID_generated.hpp>
|
||||||
|
|
||||||
|
namespace flatbuffers
|
||||||
|
{
|
||||||
|
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid);
|
||||||
|
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID);
|
||||||
|
} // namespace flatbuffers
|
||||||
|
|
||||||
|
#endif
|
||||||
Binary file not shown.
@@ -1,37 +0,0 @@
|
|||||||
/**
|
|
||||||
* Auto-generated header from: UUID.bfbs
|
|
||||||
* Generated by Bin2CPP
|
|
||||||
*
|
|
||||||
* DO NOT TOUCH
|
|
||||||
*/
|
|
||||||
#ifndef UUID_BFBS_HPP
|
|
||||||
#define UUID_BFBS_HPP
|
|
||||||
#include <EASTL/array.h>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
inline constexpr eastl::array<std::byte, 280> g_UUID_bfbs = {
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, 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{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x18}, 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{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, 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{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x30}, 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{0x90}, std::byte{0xFF}, 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{0x00}, 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{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, 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{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x2F}, 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{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x24}, 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{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{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}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // UUID_BFBS_HPP
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
native_include "System/UUID/FlatUUID.hpp";
|
||||||
|
|
||||||
namespace Bigfoot.Flat;
|
namespace Bigfoot.Flat;
|
||||||
|
|
||||||
struct UUID (native_type: "::Bigfoot::UUID")
|
struct UUID (native_type: "::Bigfoot::UUID")
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#ifndef BIGFOOT_SYSTEM_UUID_HPP
|
#ifndef BIGFOOT_SYSTEM_UUID_HPP
|
||||||
#define BIGFOOT_SYSTEM_UUID_HPP
|
#define BIGFOOT_SYSTEM_UUID_HPP
|
||||||
#include <System/UUID/UUID_generated.hpp>
|
|
||||||
|
|
||||||
#include <uuid.h>
|
#include <uuid.h>
|
||||||
|
|
||||||
@@ -119,8 +118,6 @@ struct std::formatter<Bigfoot::UUID, char>
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||||
#include <quill/DeferredFormatCodec.h>
|
#include <quill/DeferredFormatCodec.h>
|
||||||
|
|
||||||
@@ -144,12 +141,4 @@ struct quill::Codec<Bigfoot::UUID>: quill::DeferredFormatCodec<Bigfoot::UUID>
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid);
|
|
||||||
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID);
|
|
||||||
} // namespace flatbuffers
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
|||||||
FLATBUFFERS_VERSION_REVISION == 19,
|
FLATBUFFERS_VERSION_REVISION == 19,
|
||||||
"Non-compatible flatbuffers version included");
|
"Non-compatible flatbuffers version included");
|
||||||
|
|
||||||
|
#include "System/UUID/FlatUUID.hpp"
|
||||||
|
|
||||||
#include "EASTL/unique_ptr.h"
|
#include "EASTL/unique_ptr.h"
|
||||||
#include "EASTL/string.h"
|
#include "EASTL/string.h"
|
||||||
|
|
||||||
|
|||||||
@@ -79,20 +79,8 @@ void Log::SetLoggerLevel(const LoggerInfo& p_loggerInfo)
|
|||||||
|
|
||||||
/****************************************************************************************/
|
/****************************************************************************************/
|
||||||
|
|
||||||
void Log::Flush()
|
|
||||||
{
|
|
||||||
for (quill::Logger* logger: quill::Frontend::get_all_loggers())
|
|
||||||
{
|
|
||||||
logger->flush_log();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
Log::~Log()
|
Log::~Log()
|
||||||
{
|
{
|
||||||
Flush();
|
|
||||||
|
|
||||||
for (quill::Logger* logger: quill::Frontend::get_all_loggers())
|
for (quill::Logger* logger: quill::Frontend::get_all_loggers())
|
||||||
{
|
{
|
||||||
quill::Frontend::remove_logger(logger);
|
quill::Frontend::remove_logger(logger);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* \author Romain BOULLARD
|
* \author Romain BOULLARD
|
||||||
* \date December 2025
|
* \date December 2025
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#include <System/Time/Time.hpp>
|
#include <System/Time.hpp>
|
||||||
|
|
||||||
#include <System/SystemAssertHandler.hpp>
|
#include <System/SystemAssertHandler.hpp>
|
||||||
|
|
||||||
@@ -119,20 +119,3 @@ Time Time::Now()
|
|||||||
return Time {epochInMicroSeconds};
|
return Time {epochInMicroSeconds};
|
||||||
}
|
}
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::Time Pack(const Bigfoot::Time& p_time)
|
|
||||||
{
|
|
||||||
return Bigfoot::Flat::Time {p_time.Epoch()};
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
Bigfoot::Time UnPack(const Bigfoot::Flat::Time& p_flatTime)
|
|
||||||
{
|
|
||||||
return Bigfoot::Time {p_flatTime.epoch()};
|
|
||||||
}
|
|
||||||
} // namespace flatbuffers
|
|
||||||
27
Bigfoot/Sources/System/UUID/FlatUUID.cpp
Normal file
27
Bigfoot/Sources/System/UUID/FlatUUID.cpp
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/*********************************************************************
|
||||||
|
* \file FlatUUID.cpp
|
||||||
|
*
|
||||||
|
* \author Romain BOULLARD
|
||||||
|
* \date December 2025
|
||||||
|
*********************************************************************/
|
||||||
|
#include <System/UUID/FlatUUID.hpp>
|
||||||
|
|
||||||
|
namespace flatbuffers
|
||||||
|
{
|
||||||
|
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid)
|
||||||
|
{
|
||||||
|
const std::span<const std::byte, Bigfoot::UUID::UUID_BYTE_SIZE> bytes = p_uuid;
|
||||||
|
return Bigfoot::Flat::UUID {
|
||||||
|
std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> {reinterpret_cast<const std::uint8_t*>(bytes.data()),
|
||||||
|
bytes.size()}};
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************************/
|
||||||
|
|
||||||
|
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID)
|
||||||
|
{
|
||||||
|
const std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> bytesView {p_flatUUID.bytes()->data(),
|
||||||
|
p_flatUUID.bytes()->size()};
|
||||||
|
return Bigfoot::UUID {std::as_bytes(bytesView)};
|
||||||
|
}
|
||||||
|
} // namespace flatbuffers
|
||||||
@@ -85,25 +85,3 @@ uuids::uuid_random_generator UUID::GetUUIDGenerator()
|
|||||||
return uuids::uuid_random_generator {ms_randomGenerator};
|
return uuids::uuid_random_generator {ms_randomGenerator};
|
||||||
}
|
}
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid)
|
|
||||||
{
|
|
||||||
const std::span<const std::byte, Bigfoot::UUID::UUID_BYTE_SIZE> bytes = p_uuid;
|
|
||||||
return Bigfoot::Flat::UUID {
|
|
||||||
std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> {reinterpret_cast<const std::uint8_t*>(bytes.data()),
|
|
||||||
bytes.size()}};
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID)
|
|
||||||
{
|
|
||||||
const std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> bytesView {p_flatUUID.bytes()->data(),
|
|
||||||
p_flatUUID.bytes()->size()};
|
|
||||||
return Bigfoot::UUID {std::as_bytes(bytesView)};
|
|
||||||
}
|
|
||||||
} // namespace flatbuffers
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
|||||||
project(${PackageName})
|
project(${PackageName})
|
||||||
|
|
||||||
set(PublicDependencies
|
set(PublicDependencies
|
||||||
unordered_dense::unordered_dense)
|
$<$<CONFIG:Debug,RelWithDebInfo>:cpptrace::cpptrace>)
|
||||||
set(PrivateDependencies)
|
set(PrivateDependencies)
|
||||||
set(BigfootPublicDependencies)
|
set(BigfootPublicDependencies)
|
||||||
set(BigfootPrivateDependencies)
|
set(BigfootPrivateDependencies)
|
||||||
|
|||||||
@@ -4,12 +4,13 @@
|
|||||||
* \author Romain BOULLARD
|
* \author Romain BOULLARD
|
||||||
* \date October 2025
|
* \date October 2025
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#ifndef BIGFOOT_SYSTEM_ASSERT_HPP
|
#ifndef BIGFOOT_UTILS_ASSERT_HPP
|
||||||
#define BIGFOOT_SYSTEM_ASSERT_HPP
|
#define BIGFOOT_UTILS_ASSERT_HPP
|
||||||
#include <System/Log/Log.hpp>
|
|
||||||
|
|
||||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||||
|
|
||||||
|
#include <cpptrace/cpptrace.hpp>
|
||||||
|
|
||||||
#include <source_location>
|
#include <source_location>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@@ -37,7 +38,13 @@
|
|||||||
constexpr std::source_location location = std::source_location::current(); \
|
constexpr std::source_location location = std::source_location::current(); \
|
||||||
if (!(p_assert)) [[unlikely]] \
|
if (!(p_assert)) [[unlikely]] \
|
||||||
{ \
|
{ \
|
||||||
HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \
|
constexpr auto stacktrace = []() -> std::string \
|
||||||
|
{ \
|
||||||
|
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||||
|
return stacktrace.to_string(); \
|
||||||
|
}; \
|
||||||
|
\
|
||||||
|
HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||||
BREAK; \
|
BREAK; \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} while (false)
|
||||||
@@ -48,7 +55,13 @@
|
|||||||
constexpr std::source_location location = std::source_location::current(); \
|
constexpr std::source_location location = std::source_location::current(); \
|
||||||
if (!(p_assert)) [[unlikely]] \
|
if (!(p_assert)) [[unlikely]] \
|
||||||
{ \
|
{ \
|
||||||
HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \
|
constexpr auto stacktrace = []() -> std::string \
|
||||||
|
{ \
|
||||||
|
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||||
|
return stacktrace.to_string(); \
|
||||||
|
}; \
|
||||||
|
\
|
||||||
|
HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||||
BREAK; \
|
BREAK; \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} while (false)
|
||||||
@@ -59,11 +72,13 @@
|
|||||||
constexpr std::source_location location = std::source_location::current(); \
|
constexpr std::source_location location = std::source_location::current(); \
|
||||||
if (!(p_assert)) [[unlikely]] \
|
if (!(p_assert)) [[unlikely]] \
|
||||||
{ \
|
{ \
|
||||||
HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \
|
constexpr auto stacktrace = []() -> std::string \
|
||||||
if (Bigfoot::Singleton<Bigfoot::Log>::HasInstance()) \
|
|
||||||
{ \
|
{ \
|
||||||
Bigfoot::Singleton<Bigfoot::Log>::Instance().Flush(); \
|
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||||
} \
|
return stacktrace.to_string(); \
|
||||||
|
}; \
|
||||||
|
\
|
||||||
|
HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||||
BREAK; \
|
BREAK; \
|
||||||
std::abort(); \
|
std::abort(); \
|
||||||
} \
|
} \
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
#include <EASTL/array.h>
|
#include <EASTL/array.h>
|
||||||
#include <EASTL/bit.h>
|
#include <EASTL/bit.h>
|
||||||
#include <EASTL/optional.h>
|
|
||||||
#include <EASTL/type_traits.h>
|
#include <EASTL/type_traits.h>
|
||||||
#include <EASTL/utility.h>
|
#include <EASTL/utility.h>
|
||||||
|
|
||||||
@@ -33,17 +32,7 @@ class Singleton
|
|||||||
*/
|
*/
|
||||||
static constexpr TYPE& Instance()
|
static constexpr TYPE& Instance()
|
||||||
{
|
{
|
||||||
return ms_instance.value();
|
return *eastl::bit_cast<TYPE*>(ms_instance.data());
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Is the instance initialized
|
|
||||||
*
|
|
||||||
* \return True if initialized, false otherwise
|
|
||||||
*/
|
|
||||||
static constexpr bool HasInstance()
|
|
||||||
{
|
|
||||||
return ms_instance.has_value();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Lifetime
|
class Lifetime
|
||||||
@@ -54,10 +43,11 @@ class Singleton
|
|||||||
*
|
*
|
||||||
* \param p_args Arguments for the singleton
|
* \param p_args Arguments for the singleton
|
||||||
*/
|
*/
|
||||||
template<typename... ARGS>
|
template<typename... ARGS,
|
||||||
|
typename = eastl::enable_if_t<!(eastl::is_same_v<Lifetime, eastl::decay_t<ARGS>> || ...)>>
|
||||||
explicit Lifetime(ARGS&&... p_args)
|
explicit Lifetime(ARGS&&... p_args)
|
||||||
{
|
{
|
||||||
Initialize(std::forward<ARGS>(p_args)...);
|
Initialize(eastl::forward<ARGS>(p_args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
Lifetime(const Lifetime& p_lifetime) = delete;
|
Lifetime(const Lifetime& p_lifetime) = delete;
|
||||||
@@ -88,7 +78,9 @@ class Singleton
|
|||||||
template<typename... ARGS>
|
template<typename... ARGS>
|
||||||
static void Initialize(ARGS&&... p_args)
|
static void Initialize(ARGS&&... p_args)
|
||||||
{
|
{
|
||||||
ms_instance.emplace(std::forward<ARGS>(p_args)...);
|
new (ms_instance.data()) TYPE(eastl::forward<ARGS>(p_args)...);
|
||||||
|
|
||||||
|
ms_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,13 +89,20 @@ class Singleton
|
|||||||
*/
|
*/
|
||||||
static void Finalize()
|
static void Finalize()
|
||||||
{
|
{
|
||||||
ms_instance.reset();
|
eastl::bit_cast<TYPE*>(ms_instance.data())->~TYPE();
|
||||||
|
|
||||||
|
ms_initialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The singleton.
|
* The singleton.
|
||||||
*/
|
*/
|
||||||
inline static eastl::optional<TYPE> ms_instance;
|
alignas(alignof(TYPE)) inline static eastl::array<std::byte, sizeof(TYPE)> ms_instance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is the singleton initialized?
|
||||||
|
*/
|
||||||
|
inline static bool ms_initialized = false;
|
||||||
};
|
};
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,14 +7,6 @@
|
|||||||
#ifndef BIGFOOT_UTILS_TARGETMACROS_H
|
#ifndef BIGFOOT_UTILS_TARGETMACROS_H
|
||||||
#define BIGFOOT_UTILS_TARGETMACROS_H
|
#define BIGFOOT_UTILS_TARGETMACROS_H
|
||||||
|
|
||||||
#if defined BIGFOOT_WINDOWS
|
|
||||||
#define BIGFOOT_WINDOWS_OR_LINUX(p_windows, p_linux) p_windows
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined BIGFOOT_LINUX
|
|
||||||
#define BIGFOOT_WINDOWS_OR_LINUX(p_windows, p_linux) p_linux
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined BIGFOOT_OPTIMIZED
|
#if defined BIGFOOT_OPTIMIZED
|
||||||
#define BIGFOOT_OPTIMIZED_ONLY(...) __VA_ARGS__
|
#define BIGFOOT_OPTIMIZED_ONLY(...) __VA_ARGS__
|
||||||
#define BIGFOOT_NOT_OPTIMIZED_ONLY(...)
|
#define BIGFOOT_NOT_OPTIMIZED_ONLY(...)
|
||||||
|
|||||||
@@ -1,298 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file BigFile.cpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date December 2025
|
|
||||||
*********************************************************************/
|
|
||||||
#include <Engine/BigFile/BigFile.hpp>
|
|
||||||
|
|
||||||
#include <Engine/EngineLogger_generated.hpp>
|
|
||||||
|
|
||||||
#include <System/Log/Log.hpp>
|
|
||||||
#include <System/Time/Time.hpp>
|
|
||||||
#include <System/UUID/UUID.hpp>
|
|
||||||
|
|
||||||
#include <Utils/Singleton.hpp>
|
|
||||||
#include <Utils/TargetMacros.h>
|
|
||||||
|
|
||||||
#include <EngineTests/BigFile/Asset/AssetA.hpp>
|
|
||||||
#include <EngineTests/BigFileInfo_generated.hpp>
|
|
||||||
|
|
||||||
#include <ankerl/unordered_dense.h>
|
|
||||||
#include <flatbuffers/reflection.h>
|
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
class BigFileFixture: public ::testing::Test
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
void SetUp() override
|
|
||||||
{
|
|
||||||
BigFile::Request deleteHeader {m_bigFile, "DELETE FROM AssetHeader"};
|
|
||||||
BigFile::Request deleteAsset {m_bigFile, "DELETE FROM Asset"};
|
|
||||||
BigFile::Request deleteDependencies {m_bigFile, "DELETE FROM AssetDependency"};
|
|
||||||
|
|
||||||
m_bigFile.BeginTransaction();
|
|
||||||
deleteHeader.Execute();
|
|
||||||
deleteAsset.Execute();
|
|
||||||
deleteDependencies.Execute();
|
|
||||||
m_bigFile.CommitTransaction();
|
|
||||||
|
|
||||||
BIGFOOT_NOT_OPTIMIZED_ONLY(std::ignore = Singleton<Log>::Instance().RegisterLogger(ENGINE_LOGGER);)
|
|
||||||
}
|
|
||||||
|
|
||||||
BIGFOOT_NOT_OPTIMIZED_ONLY(Singleton<Log>::Lifetime m_loggerLifetime;)
|
|
||||||
|
|
||||||
BigFile m_bigFile {File {BIGFILE_ENGINETESTS_LOCATION}};
|
|
||||||
};
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
TEST_F(BigFileFixture, Asset)
|
|
||||||
{
|
|
||||||
AssetA assetA;
|
|
||||||
assetA.SetName("Hello");
|
|
||||||
assetA.SetVersion(42);
|
|
||||||
|
|
||||||
const eastl::vector<std::byte> test = assetA.Pack();
|
|
||||||
|
|
||||||
AssetA assetB {test};
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
TEST_F(BigFileFixture, Lol)
|
|
||||||
{
|
|
||||||
UUID uuid;
|
|
||||||
UUID uuid2;
|
|
||||||
UUID uuid3;
|
|
||||||
|
|
||||||
eastl::array<std::byte, 4> blob {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {4}};
|
|
||||||
eastl::array<std::byte, 4> blob2 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {5}};
|
|
||||||
eastl::array<std::byte, 4> blob3 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {6}};
|
|
||||||
eastl::array<std::byte, 4> blob4 {std::byte {10}, std::byte {11}, std::byte {12}, std::byte {13}};
|
|
||||||
|
|
||||||
{
|
|
||||||
BigFile::Request assetHeaderRequest {
|
|
||||||
m_bigFile,
|
|
||||||
"INSERT INTO AssetHeader (UUID, Name, TypeID, TypeName) VALUES(?, ?, ?, ?)"};
|
|
||||||
assetHeaderRequest.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
|
||||||
assetHeaderRequest.Bind(2, "Test");
|
|
||||||
assetHeaderRequest.Bind(3, 42);
|
|
||||||
assetHeaderRequest.Bind(4, "TypeTest");
|
|
||||||
|
|
||||||
BigFile::Request assetRequest {m_bigFile, "INSERT INTO Asset (UUID, Asset) VALUES(?, ?)"};
|
|
||||||
assetRequest.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
|
||||||
assetRequest.Bind(2, blob);
|
|
||||||
|
|
||||||
BigFile::Request assetHeaderRequest2 {
|
|
||||||
m_bigFile,
|
|
||||||
"INSERT INTO AssetHeader (UUID, Name, TypeID, TypeName) VALUES(?, ?, ?, ?)"};
|
|
||||||
assetHeaderRequest2.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
|
||||||
assetHeaderRequest2.Bind(2, "Test2");
|
|
||||||
assetHeaderRequest2.Bind(3, 42);
|
|
||||||
assetHeaderRequest2.Bind(4, "TypeTest");
|
|
||||||
|
|
||||||
BigFile::Request assetRequest2 {m_bigFile, "INSERT INTO Asset (UUID, Asset) VALUES(?, ?)"};
|
|
||||||
assetRequest2.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
|
||||||
assetRequest2.Bind(2, blob3);
|
|
||||||
|
|
||||||
BigFile::Request assetHeaderRequest3 {
|
|
||||||
m_bigFile,
|
|
||||||
"INSERT INTO AssetHeader (UUID, Name, TypeID, TypeName) VALUES(?, ?, ?, ?)"};
|
|
||||||
assetHeaderRequest3.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid3));
|
|
||||||
assetHeaderRequest3.Bind(2, "Test3");
|
|
||||||
assetHeaderRequest3.Bind(3, 42);
|
|
||||||
assetHeaderRequest3.Bind(4, "TypeTest");
|
|
||||||
|
|
||||||
BigFile::Request assetRequest3 {m_bigFile, "INSERT INTO Asset (UUID, Asset) VALUES(?, ?)"};
|
|
||||||
assetRequest3.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid3));
|
|
||||||
assetRequest3.Bind(2, blob4);
|
|
||||||
|
|
||||||
BigFile::Request assetDependency {m_bigFile,
|
|
||||||
"INSERT INTO AssetDependency (AssetUUID, DependsOnUUID) VALUES(?, ?)"};
|
|
||||||
assetDependency.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
|
||||||
assetDependency.Bind(2, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
|
||||||
|
|
||||||
BigFile::Request assetDependency2 {m_bigFile,
|
|
||||||
"INSERT INTO AssetDependency (AssetUUID, DependsOnUUID) VALUES(?, ?)"};
|
|
||||||
assetDependency2.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
|
||||||
assetDependency2.Bind(2, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid3));
|
|
||||||
|
|
||||||
m_bigFile.BeginTransaction();
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t assetHeaderChangedCount = assetHeaderRequest.Execute();
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t assetChangedCount = assetRequest.Execute();
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t assetHeaderChangedCount2 = assetHeaderRequest2.Execute();
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t assetChangedCount2 = assetRequest2.Execute();
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t assetHeaderChangedCount3 = assetHeaderRequest3.Execute();
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t assetChangedCount3 = assetRequest3.Execute();
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t assetDependencyChangedCount = assetDependency.Execute();
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t assetDependencyChangedCount2 = assetDependency2.Execute();
|
|
||||||
|
|
||||||
m_bigFile.CommitTransaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
BigFile::Request updateAsset {m_bigFile, "UPDATE Asset SET Asset = ? WHERE UUID = ?"};
|
|
||||||
updateAsset.Bind(1, blob2);
|
|
||||||
updateAsset.Bind(2, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
|
||||||
|
|
||||||
m_bigFile.BeginTransaction();
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::uint32_t updateAssetChangedCount = updateAsset.Execute();
|
|
||||||
m_bigFile.CommitTransaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
BigFile::Request request {
|
|
||||||
m_bigFile,
|
|
||||||
"SELECT Name, TypeID, TypeName, CreateTime, ModificationTime FROM AssetHeader WHERE UUID = ?"};
|
|
||||||
request.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const bool get = request.Step();
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const eastl::string name {static_cast<eastl::string_view>(request.Get(0))};
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t typeId = request.Get(1);
|
|
||||||
[[maybe_unused]]
|
|
||||||
const eastl::string typeName {static_cast<eastl::string_view>(request.Get(2))};
|
|
||||||
[[maybe_unused]]
|
|
||||||
const Time createTime = static_cast<std::int64_t>(request.Get(3));
|
|
||||||
[[maybe_unused]]
|
|
||||||
const Time modificationTime = static_cast<std::int64_t>(request.Get(4));
|
|
||||||
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t year = createTime.Year();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t month = createTime.Month();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t day = createTime.Day();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t hour = createTime.Hour();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t minute = createTime.Minute();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t second = createTime.Second();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t microsecond = createTime.Microsecond();
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t year = modificationTime.Year();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t month = modificationTime.Month();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t day = modificationTime.Day();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t hour = modificationTime.Hour();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t minute = modificationTime.Minute();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t second = modificationTime.Second();
|
|
||||||
[[maybe_unused]]
|
|
||||||
const std::uint32_t microsecond = modificationTime.Microsecond();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
BigFile::Request getDependency {
|
|
||||||
m_bigFile,
|
|
||||||
"SELECT h.* FROM AssetHeader h JOIN AssetDependency d ON h.UUID = d.DependsOnUUID WHERE d.AssetUUID = ?"};
|
|
||||||
getDependency.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
|
||||||
|
|
||||||
ankerl::unordered_dense::segmented_set<UUID> dependencies;
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const bool get = getDependency.Step();
|
|
||||||
|
|
||||||
auto test = static_cast<eastl::span<const std::byte>>(getDependency.Get(0));
|
|
||||||
dependencies.insert(UUID {std::span<const std::byte, UUID::UUID_BYTE_SIZE> {test.begin(), test.end()}});
|
|
||||||
|
|
||||||
[[maybe_unused]]
|
|
||||||
const bool get2 = getDependency.Step();
|
|
||||||
|
|
||||||
auto test2 = static_cast<eastl::span<const std::byte>>(getDependency.Get(0));
|
|
||||||
dependencies.insert(UUID {std::span<const std::byte, UUID::UUID_BYTE_SIZE> {test2.begin(), test2.end()}});
|
|
||||||
|
|
||||||
EXPECT_TRUE(dependencies.find(uuid3) != dependencies.end());
|
|
||||||
EXPECT_TRUE(dependencies.find(uuid2) != dependencies.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
BigFile::Request getDependency {
|
|
||||||
m_bigFile,
|
|
||||||
"SELECT h.* FROM AssetHeader h JOIN AssetDependency d ON h.UUID = d.DependsOnUUID WHERE d.AssetUUID = ?"};
|
|
||||||
getDependency.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
|
||||||
|
|
||||||
const bool get = getDependency.Step();
|
|
||||||
EXPECT_FALSE(get);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*TEST_F(BigFileFixture, Reflection)
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
const reflection::Schema* reflection = reflection::GetSchema(AssetA::ReflectionInfo().data());
|
|
||||||
|
|
||||||
auto IsRef = [](const reflection::Object* obj) -> bool
|
|
||||||
{
|
|
||||||
if (!obj->attributes())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for (const auto attr: *obj->attributes())
|
|
||||||
{
|
|
||||||
if (std::strcmp(attr->key()->c_str(), "isRef") == 0)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
for (const auto test: *reflection->root_table()->fields())
|
|
||||||
{
|
|
||||||
[[maybe_unused]]
|
|
||||||
std::string typeName;
|
|
||||||
[[maybe_unused]]
|
|
||||||
bool isRef = false;
|
|
||||||
|
|
||||||
if (test->type()->base_type() == reflection::BaseType::Obj)
|
|
||||||
{
|
|
||||||
const reflection::Object* obj = reflection->objects()->Get(test->type()->index());
|
|
||||||
typeName = obj->name()->c_str();
|
|
||||||
isRef = IsRef(obj);
|
|
||||||
}
|
|
||||||
else if (test->type()->base_type() == reflection::BaseType::Vector &&
|
|
||||||
test->type()->element() == reflection::BaseType::Obj)
|
|
||||||
{
|
|
||||||
const reflection::Object* obj = reflection->objects()->Get(test->type()->index());
|
|
||||||
typeName = std::string("[") + obj->name()->c_str() + "]";
|
|
||||||
isRef = IsRef(obj);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
typeName = reflection::EnumNameBaseType(test->type()->base_type());
|
|
||||||
}
|
|
||||||
|
|
||||||
BIGFOOT_LOG_INFO(ENGINE_LOGGER, "{} {} {}", typeName, test->name()->c_str(), isRef ? "(isRef)" : "");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
} // namespace Bigfoot
|
|
||||||
@@ -6,8 +6,10 @@ set(BigfootDependencies
|
|||||||
System
|
System
|
||||||
Utils)
|
Utils)
|
||||||
|
|
||||||
|
bigfoot_create_bigfile("Tests/Bigfoot")
|
||||||
|
|
||||||
bigfoot_create_package_tests(
|
bigfoot_create_package_tests(
|
||||||
""
|
""
|
||||||
"${BigfootDependencies}")
|
"${BigfootDependencies}")
|
||||||
|
|
||||||
bigfoot_create_bigfile("Tests/Bigfoot")
|
bigfoot_setup_dependencies("Tests/Bigfoot")
|
||||||
Binary file not shown.
@@ -1,41 +0,0 @@
|
|||||||
/**
|
|
||||||
* Auto-generated header from: AssetA.bfbs
|
|
||||||
* Generated by Bin2CPP
|
|
||||||
*
|
|
||||||
* DO NOT TOUCH
|
|
||||||
*/
|
|
||||||
#ifndef ASSETA_BFBS_HPP
|
|
||||||
#define ASSETA_BFBS_HPP
|
|
||||||
#include <EASTL/array.h>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
inline constexpr eastl::array<std::byte, 340> g_AssetA_bfbs = {
|
|
||||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x20}, 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{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x34}, 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{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, 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{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x38}, 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{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{0x34}, std::byte{0x00}, 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{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{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, 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{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{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x28}, 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{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{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{0xCC}, 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{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{0x0C}, 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{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
|
||||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, 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{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}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // ASSETA_BFBS_HPP
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
namespace Bigfoot.Flat;
|
|
||||||
|
|
||||||
table AssetA
|
|
||||||
{
|
|
||||||
health: uint = 0;
|
|
||||||
mana: uint = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
root_type AssetA;
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file AssetA.hpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date April 2026
|
|
||||||
*********************************************************************/
|
|
||||||
#ifndef BIGFOOT_ENGINE_ASSETA_HPP
|
|
||||||
#define BIGFOOT_ENGINE_ASSETA_HPP
|
|
||||||
#include <Engine/BigFile/Asset/Asset.hpp>
|
|
||||||
|
|
||||||
#include <EngineTests/BigFile/Asset/AssetA_generated.hpp>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
class AssetA: public Asset<Flat::AssetA>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
AssetA() = default;
|
|
||||||
|
|
||||||
AssetA(const eastl::span<const std::byte> p_flatbuffer):
|
|
||||||
Asset(p_flatbuffer)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,202 +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 "EASTL/unique_ptr.h"
|
|
||||||
#include "EASTL/string.h"
|
|
||||||
|
|
||||||
namespace Bigfoot {
|
|
||||||
namespace Flat {
|
|
||||||
|
|
||||||
struct AssetA;
|
|
||||||
struct AssetABuilder;
|
|
||||||
struct AssetAT;
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetATypeTable();
|
|
||||||
|
|
||||||
struct AssetAT : public ::flatbuffers::NativeTable {
|
|
||||||
typedef AssetA TableType;
|
|
||||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
|
||||||
return "Bigfoot.Flat.AssetAT";
|
|
||||||
}
|
|
||||||
uint32_t health = 0;
|
|
||||||
uint32_t mana = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
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_HEALTH = 4,
|
|
||||||
VT_MANA = 6
|
|
||||||
};
|
|
||||||
uint32_t health() const {
|
|
||||||
return GetField<uint32_t>(VT_HEALTH, 0);
|
|
||||||
}
|
|
||||||
uint32_t mana() const {
|
|
||||||
return GetField<uint32_t>(VT_MANA, 0);
|
|
||||||
}
|
|
||||||
template <bool B = false>
|
|
||||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
|
||||||
return VerifyTableStart(verifier) &&
|
|
||||||
VerifyField<uint32_t>(verifier, VT_HEALTH, 4) &&
|
|
||||||
VerifyField<uint32_t>(verifier, VT_MANA, 4) &&
|
|
||||||
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<AssetA> 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_health(uint32_t health) {
|
|
||||||
fbb_.AddElement<uint32_t>(AssetA::VT_HEALTH, health, 0);
|
|
||||||
}
|
|
||||||
void add_mana(uint32_t mana) {
|
|
||||||
fbb_.AddElement<uint32_t>(AssetA::VT_MANA, mana, 0);
|
|
||||||
}
|
|
||||||
explicit AssetABuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
|
||||||
: fbb_(_fbb) {
|
|
||||||
start_ = fbb_.StartTable();
|
|
||||||
}
|
|
||||||
::flatbuffers::Offset<AssetA> Finish() {
|
|
||||||
const auto end = fbb_.EndTable(start_);
|
|
||||||
auto o = ::flatbuffers::Offset<AssetA>(end);
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<AssetA> CreateAssetA(
|
|
||||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
|
||||||
uint32_t health = 0,
|
|
||||||
uint32_t mana = 0) {
|
|
||||||
AssetABuilder builder_(_fbb);
|
|
||||||
builder_.add_mana(mana);
|
|
||||||
builder_.add_health(health);
|
|
||||||
return builder_.Finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
struct AssetA::Traits {
|
|
||||||
using type = AssetA;
|
|
||||||
static auto constexpr Create = CreateAssetA;
|
|
||||||
};
|
|
||||||
|
|
||||||
::flatbuffers::Offset<AssetA> CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
|
||||||
|
|
||||||
inline AssetAT *AssetA::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
|
||||||
auto _o = std::make_unique<AssetAT>();
|
|
||||||
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 = health(); _o->health = _e; }
|
|
||||||
{ auto _e = mana(); _o->mana = _e; }
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<AssetA> CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
|
||||||
return AssetA::Pack(_fbb, _o, _rehasher);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<AssetA> 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 _health = _o->health;
|
|
||||||
auto _mana = _o->mana;
|
|
||||||
return Bigfoot::Flat::CreateAssetA(
|
|
||||||
_fbb,
|
|
||||||
_health,
|
|
||||||
_mana);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetATypeTable() {
|
|
||||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
|
||||||
{ ::flatbuffers::ET_UINT, 0, -1 },
|
|
||||||
{ ::flatbuffers::ET_UINT, 0, -1 }
|
|
||||||
};
|
|
||||||
static const char * const names[] = {
|
|
||||||
"health",
|
|
||||||
"mana"
|
|
||||||
};
|
|
||||||
static const ::flatbuffers::TypeTable tt = {
|
|
||||||
::flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names
|
|
||||||
};
|
|
||||||
return &tt;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const Bigfoot::Flat::AssetA *GetAssetA(const void *buf) {
|
|
||||||
return ::flatbuffers::GetRoot<Bigfoot::Flat::AssetA>(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const Bigfoot::Flat::AssetA *GetSizePrefixedAssetA(const void *buf) {
|
|
||||||
return ::flatbuffers::GetSizePrefixedRoot<Bigfoot::Flat::AssetA>(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <bool B = false>
|
|
||||||
inline bool VerifyAssetABuffer(
|
|
||||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
|
||||||
return verifier.template VerifyBuffer<Bigfoot::Flat::AssetA>(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <bool B = false>
|
|
||||||
inline bool VerifySizePrefixedAssetABuffer(
|
|
||||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
|
||||||
return verifier.template VerifySizePrefixedBuffer<Bigfoot::Flat::AssetA>(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const char *AssetAExtension() {
|
|
||||||
return "bfbs";
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void FinishAssetABuffer(
|
|
||||||
::flatbuffers::FlatBufferBuilder &fbb,
|
|
||||||
::flatbuffers::Offset<Bigfoot::Flat::AssetA> root) {
|
|
||||||
fbb.Finish(root);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void FinishSizePrefixedAssetABuffer(
|
|
||||||
::flatbuffers::FlatBufferBuilder &fbb,
|
|
||||||
::flatbuffers::Offset<Bigfoot::Flat::AssetA> root) {
|
|
||||||
fbb.FinishSizePrefixed(root);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetAT> UnPackAssetA(
|
|
||||||
const void *buf,
|
|
||||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
|
||||||
return eastl::unique_ptr<Bigfoot::Flat::AssetAT>(GetAssetA(buf)->UnPack(res));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetAT> UnPackSizePrefixedAssetA(
|
|
||||||
const void *buf,
|
|
||||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
|
||||||
return eastl::unique_ptr<Bigfoot::Flat::AssetAT>(GetSizePrefixedAssetA(buf)->UnPack(res));
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Flat
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // FLATBUFFERS_GENERATED_ASSETA_BIGFOOT_FLAT_H_
|
|
||||||
1
Bigfoot/Tests/Engine/touch.cpp
Normal file
1
Bigfoot/Tests/Engine/touch.cpp
Normal file
@@ -0,0 +1 @@
|
|||||||
|
// to delete when an actual test is in EngineTests
|
||||||
@@ -9,4 +9,6 @@ bigfoot_create_package_tests(
|
|||||||
""
|
""
|
||||||
"${BigfootDependencies}")
|
"${BigfootDependencies}")
|
||||||
|
|
||||||
bigfoot_create_logger()
|
bigfoot_create_logger()
|
||||||
|
|
||||||
|
bigfoot_setup_dependencies("Tests/Bigfoot")
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
* \author Romain BOULLARD
|
* \author Romain BOULLARD
|
||||||
* \date December 2025
|
* \date December 2025
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#include <System/Time/Time.hpp>
|
#include <System/Time.hpp>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
@@ -6,4 +6,6 @@ set(BigfootDependencies
|
|||||||
|
|
||||||
bigfoot_create_package_tests(
|
bigfoot_create_package_tests(
|
||||||
""
|
""
|
||||||
"${BigfootDependencies}")
|
"${BigfootDependencies}")
|
||||||
|
|
||||||
|
bigfoot_setup_dependencies("Tests/Bigfoot")
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
add_library(BigfootCompileAndLinkFlags INTERFACE)
|
|
||||||
|
|
||||||
target_compile_options(BigfootCompileAndLinkFlags INTERFACE
|
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>
|
|
||||||
$<$<CXX_COMPILER_ID:Clang,GNU>:-Wall -Wextra -Wpedantic -Werror>
|
|
||||||
$<$<AND:$<BOOL:${COVERAGE}>,$<CXX_COMPILER_ID:Clang>>:-fprofile-instr-generate -fcoverage-mapping>
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_options(BigfootCompileAndLinkFlags INTERFACE
|
|
||||||
$<$<AND:$<BOOL:${COVERAGE}>,$<CXX_COMPILER_ID:Clang>>:-fprofile-instr-generate>
|
|
||||||
)
|
|
||||||
|
|
||||||
target_compile_definitions(BigfootCompileAndLinkFlags INTERFACE
|
|
||||||
$<$<PLATFORM_ID:Windows>:NOMINMAX>
|
|
||||||
$<$<PLATFORM_ID:Windows>:WIN32_LEAN_AND_MEAN>
|
|
||||||
$<$<PLATFORM_ID:Windows>:BIGFOOT_WINDOWS>
|
|
||||||
$<$<PLATFORM_ID:Linux>:BIGFOOT_LINUX>
|
|
||||||
$<$<CONFIG:Release>:BIGFOOT_OPTIMIZED>
|
|
||||||
$<$<CONFIG:Debug,RelWithDebInfo>:BIGFOOT_NOT_OPTIMIZED>)
|
|
||||||
@@ -7,13 +7,10 @@ endif()
|
|||||||
|
|
||||||
find_package(EASTL REQUIRED)
|
find_package(EASTL REQUIRED)
|
||||||
find_package(unordered_dense REQUIRED)
|
find_package(unordered_dense REQUIRED)
|
||||||
if(${ASAN})
|
find_package(mimalloc REQUIRED)
|
||||||
find_package(mimalloc-asan REQUIRED)
|
|
||||||
else()
|
|
||||||
find_package(mimalloc REQUIRED)
|
|
||||||
endif()
|
|
||||||
find_package(stduuid REQUIRED)
|
find_package(stduuid REQUIRED)
|
||||||
find_package(SQLite3 REQUIRED)
|
find_package(SQLite3 REQUIRED)
|
||||||
|
find_package(CLI11 REQUIRED)
|
||||||
find_package(rapidhash REQUIRED)
|
find_package(rapidhash REQUIRED)
|
||||||
find_package(effolkronium_random REQUIRED)
|
find_package(effolkronium_random REQUIRED)
|
||||||
find_package(flatbuffers CONFIG REQUIRED)
|
find_package(flatbuffers CONFIG REQUIRED)
|
||||||
@@ -24,24 +21,44 @@ endif()
|
|||||||
|
|
||||||
if(${IS_MULTI_CONFIG})
|
if(${IS_MULTI_CONFIG})
|
||||||
find_package(quill REQUIRED)
|
find_package(quill REQUIRED)
|
||||||
|
find_package(cpptrace REQUIRED)
|
||||||
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
||||||
find_package(quill REQUIRED)
|
find_package(quill REQUIRED)
|
||||||
|
find_package(cpptrace REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
find_package(glm REQUIRED)
|
find_package(glm REQUIRED)
|
||||||
find_package(lodepng REQUIRED)
|
find_package(lodepng REQUIRED)
|
||||||
find_package(imgui REQUIRED)
|
find_package(imgui REQUIRED)
|
||||||
|
|
||||||
if(VULKAN)
|
if(VULKAN)
|
||||||
find_package(VulkanHeaders REQUIRED)
|
find_package(VulkanHeaders REQUIRED)
|
||||||
|
if(${IS_MULTI_CONFIG})
|
||||||
|
find_package(vulkan-validationlayers REQUIRED)
|
||||||
|
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
||||||
|
find_package(vulkan-validationlayers REQUIRED)
|
||||||
|
endif()
|
||||||
find_package(vulkan-memory-allocator REQUIRED)
|
find_package(vulkan-memory-allocator REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_TESTS OR SAMPLE_APP)
|
if(BUILD_BENCHMARKS OR BUILD_TESTS OR SAMPLE_APP)
|
||||||
find_package(glfw3 REQUIRED)
|
find_package(glfw3 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_TESTS)
|
if(BUILD_TESTS)
|
||||||
find_package(GTest REQUIRED)
|
find_package(GTest REQUIRED)
|
||||||
find_package(pixelmatch-cpp17 REQUIRED)
|
find_package(pixelmatch-cpp17 REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_TOOLS)
|
||||||
|
find_package(spirv-cross REQUIRED)
|
||||||
|
find_package(shaderc REQUIRED)
|
||||||
|
find_package(assimp REQUIRED)
|
||||||
|
find_package(meshoptimizer REQUIRED)
|
||||||
|
find_package(libsquish REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_BENCHMARKS)
|
||||||
|
find_package(benchmark REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
@@ -1,161 +1,97 @@
|
|||||||
function(bigfoot_create_package_lib PackagePublicDependencies PackagePrivateDependencies PackageBigfootPublicDependencies PackageBigfootPrivateDependencies ParentFolder)
|
function(bigfoot_create_package_lib PackagePublicDependencies PackagePrivateDependencies PackageBigfootPublicDependencies PackageBigfootPrivateDependencies ParentFolder)
|
||||||
add_library(${PROJECT_NAME} STATIC)
|
add_library(${PROJECT_NAME} STATIC)
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
||||||
|
|
||||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
|
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||||
|
|
||||||
bigfoot_compile_flatbuffers("${PackageBigfootPublicDependencies}")
|
bigfoot_compile_flatbuffers("${PackageBigfootPublicDependencies}")
|
||||||
|
|
||||||
file(GLOB_RECURSE _SOURCES
|
# collect sources (reconfigure when files are added/removed)
|
||||||
CONFIGURE_DEPENDS
|
file(GLOB_RECURSE _BF_SOURCES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
|
CONFIGURE_DEPENDS
|
||||||
)
|
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
|
||||||
file(GLOB_RECURSE _HEADERS
|
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp.in
|
||||||
CONFIGURE_DEPENDS
|
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
${CMAKE_CURRENT_SOURCE_DIR}/*.fbs
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
|
${CMAKE_CURRENT_SOURCE_DIR}/*.sql
|
||||||
)
|
|
||||||
|
|
||||||
file(GLOB_RECURSE _OTHERS
|
|
||||||
CONFIGURE_DEPENDS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp.in
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.fbs
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.sql
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(${PROJECT_NAME}
|
target_sources(${PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${_SOURCES}
|
${_BF_SOURCES}
|
||||||
${_OTHERS}
|
|
||||||
PUBLIC
|
|
||||||
FILE_SET HEADERS
|
|
||||||
BASE_DIRS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Include
|
|
||||||
FILES
|
|
||||||
${_HEADERS}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_compile_options(${PROJECT_NAME} PRIVATE ${BIGFOOT_CXX_FLAGS})
|
||||||
PRIVATE
|
|
||||||
BigfootCompileAndLinkFlags
|
|
||||||
PUBLIC
|
|
||||||
unordered_dense::unordered_dense
|
|
||||||
EASTL::EASTL
|
|
||||||
flatbuffers::flatbuffers
|
|
||||||
rapidhash::rapidhash
|
|
||||||
|
|
||||||
${PackagePublicDependencies}
|
|
||||||
$<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageBigfootPublicDependencies}>
|
|
||||||
|
|
||||||
PRIVATE
|
target_link_libraries(${PROJECT_NAME} PUBLIC unordered_dense::unordered_dense EASTL::EASTL flatbuffers::flatbuffers rapidhash::rapidhash)
|
||||||
${PackagePrivateDependencies}
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_DL_LIBS})
|
||||||
$<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageBigfootPrivateDependencies}>)
|
|
||||||
|
|
||||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX Src FILES ${_SOURCES} ${_HEADERS} ${_OTHERS})
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${PackagePublicDependencies})
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${PackagePrivateDependencies})
|
||||||
|
target_link_libraries(${PROJECT_NAME} PUBLIC $<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageBigfootPublicDependencies}>)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE $<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageBigfootPrivateDependencies}>)
|
||||||
|
|
||||||
|
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX Src FILES ${_BF_SOURCES})
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Bigfoot/${ParentFolder})
|
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Bigfoot/${ParentFolder})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(bigfoot_create_package_tests ParentFolder BigfootDependencies)
|
function(bigfoot_create_package_tests ParentFolder BigfootDependencies)
|
||||||
add_executable(${PROJECT_NAME})
|
add_executable(${PROJECT_NAME})
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
||||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
|
|
||||||
|
|
||||||
bigfoot_compile_flatbuffers("${BigfootDependencies}")
|
bigfoot_compile_flatbuffers("${BigfootDependencies}")
|
||||||
|
|
||||||
file(GLOB_RECURSE _SOURCES
|
file(GLOB_RECURSE _BF_TEST_SOURCES
|
||||||
CONFIGURE_DEPENDS
|
CONFIGURE_DEPENDS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
||||||
)
|
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp.in
|
||||||
file(GLOB_RECURSE _HEADERS
|
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
|
||||||
CONFIGURE_DEPENDS
|
${CMAKE_CURRENT_SOURCE_DIR}/*.fbs
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
|
|
||||||
)
|
|
||||||
|
|
||||||
file(GLOB_RECURSE _OTHERS
|
|
||||||
CONFIGURE_DEPENDS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp.in
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.fbs
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.sql
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(${PROJECT_NAME}
|
target_sources(${PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${_SOURCES}
|
${_BF_TEST_SOURCES}
|
||||||
${_OTHERS}
|
|
||||||
PUBLIC
|
|
||||||
FILE_SET HEADERS
|
|
||||||
BASE_DIRS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Include
|
|
||||||
FILES
|
|
||||||
${_HEADERS}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_compile_options(${PROJECT_NAME} PRIVATE ${BIGFOOT_CXX_FLAGS})
|
||||||
PRIVATE
|
target_link_options(${PROJECT_NAME} PRIVATE ${BIGFOOT_EXE_LINK_FLAGS})
|
||||||
BigfootCompileAndLinkFlags
|
|
||||||
|
|
||||||
PRIVATE
|
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||||
$<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageName}>
|
|
||||||
gtest::gtest)
|
target_link_libraries(${PROJECT_NAME} PRIVATE $<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageName}>)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE gtest::gtest)
|
||||||
|
|
||||||
include(GoogleTest)
|
include(GoogleTest)
|
||||||
gtest_discover_tests(${PROJECT_NAME} XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}/TestResults/)
|
gtest_discover_tests(${PROJECT_NAME} XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}/TestResults/)
|
||||||
|
|
||||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX Src/ FILES ${_SOURCES} ${_HEADERS} ${_OTHERS})
|
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX Src/ FILES ${_BF_TEST_SOURCES})
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Tests/Bigfoot/${ParentFolder})
|
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Tests/Bigfoot/${ParentFolder})
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$<TARGET_FILE_DIR:${PROJECT_NAME}>")
|
|
||||||
|
|
||||||
##################ASAN SETUP###################
|
|
||||||
|
|
||||||
if(${ASAN})
|
|
||||||
if(MSVC)
|
|
||||||
get_filename_component(MSVC_BIN_DIR "${CMAKE_CXX_COMPILER}" DIRECTORY)
|
|
||||||
set(ASAN_DLL "${MSVC_BIN_DIR}/clang_rt.asan_dynamic-x86_64.dll")
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-asan.timestamp"
|
|
||||||
DEPENDS "${ASAN_DLL}"
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${ASAN_DLL}" "$<TARGET_FILE_DIR:${PROJECT_NAME}>"
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-asan.timestamp"
|
|
||||||
COMMENT "Copying ASan DLL for ${PROJECT_NAME}"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(${PROJECT_NAME}Asan
|
|
||||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-asan.timestamp"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}Asan)
|
|
||||||
set_target_properties(${PROJECT_NAME}Asan PROPERTIES FOLDER UtilityTargets/Tests/Bigfoot/${ParentFolder})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
##################COPY FIXTURE FOLDER###################
|
##################COPY FIXTURE FOLDER###################
|
||||||
|
|
||||||
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Fixture)
|
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Fixture)
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Fixture)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Fixture)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Track all fixture files
|
||||||
file(GLOB_RECURSE FIXTURE_FILES
|
file(GLOB_RECURSE FIXTURE_FILES
|
||||||
CONFIGURE_DEPENDS
|
CONFIGURE_DEPENDS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Fixture/*
|
${CMAKE_CURRENT_SOURCE_DIR}/Fixture/*
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-fixture.timestamp"
|
|
||||||
DEPENDS ${FIXTURE_FILES}
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>/Fixture
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Fixture $<TARGET_FILE_DIR:${PROJECT_NAME}>/Fixture
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-fixture.timestamp"
|
|
||||||
COMMENT "Copying Fixture folder for ${PROJECT_NAME}"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(${PROJECT_NAME}Fixture
|
add_custom_target(${PROJECT_NAME}Fixture
|
||||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-fixture.timestamp"
|
COMMAND ${CMAKE_COMMAND} -E remove_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>/Fixture
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Fixture $<TARGET_FILE_DIR:${PROJECT_NAME}>/Fixture
|
||||||
|
DEPENDS ${FIXTURE_FILES}
|
||||||
|
COMMENT "Copying Fixture folder for ${PROJECT_NAME}"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}Fixture)
|
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}Fixture)
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME}Fixture PROPERTIES FOLDER UtilityTargets/Tests/Bigfoot/${ParentFolder})
|
set_target_properties(${PROJECT_NAME}Fixture PROPERTIES FOLDER UtilityTargets/Tests/Bigfoot/${ParentFolder})
|
||||||
endfunction()
|
endfunction()
|
||||||
@@ -20,43 +20,33 @@ function(bigfoot_create_bigfile ParentFolder)
|
|||||||
COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT_PATH_BIGFILE_ABSOLUTE}.bftimestamp
|
COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT_PATH_BIGFILE_ABSOLUTE}.bftimestamp
|
||||||
COMMENT "Creating Bigfile ${OUTPUT_PATH_BIGFILE_ABSOLUTE}"
|
COMMENT "Creating Bigfile ${OUTPUT_PATH_BIGFILE_ABSOLUTE}"
|
||||||
)
|
)
|
||||||
|
list(APPEND BIGFILE_SOURCES ${OUTPUT_PATH_BIGFILE_ABSOLUTE}.bftimestamp)
|
||||||
|
|
||||||
add_custom_target(${PROJECT_NAME}BigFile ALL
|
add_custom_target(${PROJECT_NAME}BigFile ALL DEPENDS ${BIGFILE_SOURCES})
|
||||||
DEPENDS ${OUTPUT_PATH_BIGFILE_ABSOLUTE}.bftimestamp
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME}BigFile PROPERTIES FOLDER UtilityTargets/${ParentFolder})
|
set_target_properties(${PROJECT_NAME}BigFile PROPERTIES FOLDER UtilityTargets/${ParentFolder})
|
||||||
|
add_dependencies(${PROJECT_NAME}BigFile ${PROJECT_NAME})
|
||||||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}BigFile)
|
|
||||||
|
target_sources(${PROJECT_NAME}BigFile PRIVATE ${BIGFILE_SOURCES})
|
||||||
|
|
||||||
string(TOUPPER ${PROJECT_NAME} BIGFILE_NAME)
|
string(TOUPPER ${PROJECT_NAME} BIGFILE_NAME)
|
||||||
set(BIGFILE_LOCATION "./${PROJECT_NAME}-bigfile.db")
|
set(BIGFILE_LOCATION "./${PROJECT_NAME}-bigfile.db")
|
||||||
configure_file(
|
configure_file( ${CMAKE_SOURCE_DIR}/Bigfoot/Sources/Engine/Include/Engine/BigFile/BigFileInfo_generated.hpp.in
|
||||||
${CMAKE_SOURCE_DIR}/Bigfoot/Sources/Engine/Include/Engine/BigFile/BigFileInfo_generated.hpp.in
|
${CMAKE_CURRENT_SOURCE_DIR}/Include/${PROJECT_NAME}/BigFileInfo_generated.hpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Include/${PROJECT_NAME}/BigFileInfo_generated.hpp
|
@ONLY)
|
||||||
@ONLY
|
|
||||||
)
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(bigfoot_compile_flatbuffers BigfootDependencies)
|
function(bigfoot_compile_flatbuffers BigfootDependencies)
|
||||||
set(IncludeFolders "")
|
set(IncludeFolders "")
|
||||||
|
|
||||||
list(APPEND IncludeFolders ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
get_target_property(CurrentTargetDependencyInclude ${PROJECT_NAME} INCLUDE_DIRECTORIES)
|
||||||
|
if(CurrentTargetDependencyInclude)
|
||||||
|
list(APPEND IncludeFolders ${CurrentTargetDependencyInclude})
|
||||||
|
endif()
|
||||||
|
|
||||||
foreach(Dependency IN LISTS BigfootDependencies)
|
foreach(Dependency IN LISTS BigfootDependencies)
|
||||||
if(TARGET ${Dependency})
|
get_target_property(DependencyInclude ${Dependency} INCLUDE_DIRECTORIES)
|
||||||
get_target_property(DependencyIncludeDirs ${Dependency} INTERFACE_INCLUDE_DIRECTORIES)
|
if(DependencyInclude)
|
||||||
if(DependencyIncludeDirs)
|
list(APPEND IncludeFolders ${DependencyInclude})
|
||||||
foreach(Dir IN LISTS DependencyIncludeDirs)
|
|
||||||
# Strip $<BUILD_INTERFACE:...> generator expression
|
|
||||||
if(Dir MATCHES "^\\$<BUILD_INTERFACE:(.+)>$")
|
|
||||||
list(APPEND IncludeFolders "${CMAKE_MATCH_1}")
|
|
||||||
elseif(NOT Dir MATCHES "^\\$<")
|
|
||||||
# Pass through plain paths, skip other generator expressions
|
|
||||||
list(APPEND IncludeFolders "${Dir}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
@@ -68,12 +58,11 @@ function(bigfoot_compile_flatbuffers BigfootDependencies)
|
|||||||
file(GLOB_RECURSE SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/Include/*.fbs")
|
file(GLOB_RECURSE SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/Include/*.fbs")
|
||||||
foreach(SOURCE_FILE IN LISTS SOURCES)
|
foreach(SOURCE_FILE IN LISTS SOURCES)
|
||||||
get_filename_component(SOURCE_DIRECTORY ${SOURCE_FILE} DIRECTORY)
|
get_filename_component(SOURCE_DIRECTORY ${SOURCE_FILE} DIRECTORY)
|
||||||
get_filename_component(SOURCE_NAME_WE ${SOURCE_FILE} NAME_WE)
|
|
||||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${SOURCE_FILE})
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${SOURCE_FILE})
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${FLATBUFFERS_FLATC_EXECUTABLE}
|
COMMAND ${FLATBUFFERS_FLATC_EXECUTABLE}
|
||||||
--binary
|
|
||||||
--cpp
|
--cpp
|
||||||
${IncludeFlags}
|
${IncludeFlags}
|
||||||
--keep-prefix
|
--keep-prefix
|
||||||
@@ -91,23 +80,66 @@ function(bigfoot_compile_flatbuffers BigfootDependencies)
|
|||||||
--cpp-include "EASTL/unique_ptr.h"
|
--cpp-include "EASTL/unique_ptr.h"
|
||||||
--cpp-include "EASTL/string.h"
|
--cpp-include "EASTL/string.h"
|
||||||
-o "${SOURCE_DIRECTORY}"
|
-o "${SOURCE_DIRECTORY}"
|
||||||
--schema "${SOURCE_FILE}"
|
"${SOURCE_FILE}"
|
||||||
)
|
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${BIN2CPP_EXECUTABLE}
|
|
||||||
--input "${SOURCE_DIRECTORY}/${SOURCE_NAME_WE}.bfbs"
|
|
||||||
--output "${SOURCE_DIRECTORY}/${SOURCE_NAME_WE}.bfbs_generated.hpp"
|
|
||||||
--arrayType eastl::array
|
|
||||||
--arrayInclude <EASTL/array.h>
|
|
||||||
--namespace Bigfoot
|
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
macro(bigfoot_remove_default_exception_flags)
|
function(bigfoot_setup_dependencies ParentFolder)
|
||||||
if(MSVC)
|
set(CONAN_DEPLOYER_DIR "${CMAKE_SOURCE_DIR}/build/full_deploy/host")
|
||||||
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
||||||
string(REPLACE "/EHs" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
if(EXISTS ${CONAN_DEPLOYER_DIR})
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
|
file(GLOB_RECURSE SHARED_BINARIES ${CONAN_DEPLOYER_DIR}/*mimalloc*.dll)
|
||||||
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
file(GLOB_RECURSE SHARED_BINARIES ${CONAN_DEPLOYER_DIR}/*mimalloc*.so*)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${IS_MULTI_CONFIG})
|
||||||
|
foreach(CONFIG ${CMAKE_CONFIGURATION_TYPES})
|
||||||
|
foreach(file ${SHARED_BINARIES})
|
||||||
|
if(file MATCHES "/${CONFIG}/")
|
||||||
|
list(APPEND SHARED_BINARIES_${CONFIG} ${file})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_custom_target(${PROJECT_NAME}CopySharedBinaries
|
||||||
|
ALL DEPENDS SHARED_BINARIES
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E $<IF:$<CONFIG:Debug>,copy_if_different,true> ${SHARED_BINARIES_Debug} $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E $<IF:$<CONFIG:Release>,copy_if_different,true> ${SHARED_BINARIES_Release} $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E $<IF:$<CONFIG:RelWithDebInfo>,copy_if_different,true> ${SHARED_BINARIES_RelWithDebInfo} $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||||
|
COMMENT "Copy shared binaries for ${PROJECT_NAME}"
|
||||||
|
)
|
||||||
|
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}CopySharedBinaries)
|
||||||
|
set_target_properties(${PROJECT_NAME}CopySharedBinaries PROPERTIES FOLDER UtilityTargets/${ParentFolder})
|
||||||
|
|
||||||
|
else()
|
||||||
|
foreach(file ${SHARED_BINARIES})
|
||||||
|
if(file MATCHES "/${CMAKE_BUILD_TYPE}/")
|
||||||
|
list(APPEND SHARED_BINARIES_${CMAKE_BUILD_TYPE} ${file})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_custom_target(${PROJECT_NAME}CopySharedBinaries ALL
|
||||||
|
DEPENDS ${SHARED_BINARIES_${CMAKE_BUILD_TYPE}}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SHARED_BINARIES_${CMAKE_BUILD_TYPE}} $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||||
|
COMMENT "Copy shared binaries for ${PROJECT_NAME}"
|
||||||
|
)
|
||||||
|
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}CopySharedBinaries)
|
||||||
|
set_target_properties(${PROJECT_NAME}CopySharedBinaries PROPERTIES FOLDER UtilityTargets/${ParentFolder})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
|
add_custom_target(${PROJECT_NAME}PatchMinject ALL
|
||||||
|
COMMAND ${MINJECT_EXECUTABLE} -i -f $<TARGET_FILE:${PROJECT_NAME}>
|
||||||
|
COMMENT "Patching ${PROJECT_NAME} to ensure mimalloc dynamic override"
|
||||||
|
)
|
||||||
|
add_dependencies(${PROJECT_NAME}PatchMinject ${PROJECT_NAME})
|
||||||
|
set_target_properties(${PROJECT_NAME}PatchMinject PROPERTIES FOLDER "UtilityTargets/${ParentFolder}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endfunction()
|
||||||
@@ -1,23 +1,28 @@
|
|||||||
cmake_minimum_required(VERSION 3.26)
|
cmake_minimum_required(VERSION 3.24)
|
||||||
|
|
||||||
|
# CMake sets this flag by default, we don't use exception in bigfoot, we can remove it
|
||||||
|
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
|
|
||||||
project(Bigfoot VERSION 0.1.0
|
project(Bigfoot VERSION 0.1.0
|
||||||
DESCRIPTION "The Bigfoot engine"
|
DESCRIPTION "The Bigfoot engine"
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||||
|
|
||||||
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
set(CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug" CACHE STRING "" FORCE)
|
set(CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
option(BUILD_TESTS OFF)
|
option(BUILD_TESTS OFF)
|
||||||
option(ASAN OFF)
|
|
||||||
option(COVERAGE OFF)
|
|
||||||
option(TRACY ON)
|
option(TRACY ON)
|
||||||
|
option(BUILD_TOOLS ON)
|
||||||
option(VULKAN ON)
|
option(VULKAN ON)
|
||||||
|
option(BUILD_BENCHMARKS OFF)
|
||||||
|
|
||||||
set(AUTO_GENERATED_COMMENT "// AUTO-GENERATED DO NOT TOUCH")
|
set(AUTO_GENERATED_COMMENT "// AUTO-GENERATED DO NOT TOUCH")
|
||||||
|
|
||||||
include(${CMAKE_SOURCE_DIR}/CMake/CustomTargets.cmake)
|
|
||||||
include(${CMAKE_SOURCE_DIR}/CMake/FindDependencies.cmake)
|
include(${CMAKE_SOURCE_DIR}/CMake/FindDependencies.cmake)
|
||||||
include(${CMAKE_SOURCE_DIR}/CMake/Utils.cmake)
|
include(${CMAKE_SOURCE_DIR}/CMake/Utils.cmake)
|
||||||
include(${CMAKE_SOURCE_DIR}/CMake/Package.cmake)
|
include(${CMAKE_SOURCE_DIR}/CMake/Package.cmake)
|
||||||
@@ -25,13 +30,18 @@ include(${CMAKE_SOURCE_DIR}/CMake/Package.cmake)
|
|||||||
find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc)
|
find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc)
|
||||||
find_program(SQLITE3_EXECUTABLE NAMES sqlite3)
|
find_program(SQLITE3_EXECUTABLE NAMES sqlite3)
|
||||||
find_program(MINJECT_EXECUTABLE NAMES minject)
|
find_program(MINJECT_EXECUTABLE NAMES minject)
|
||||||
find_program(BIN2CPP_EXECUTABLE NAMES Bin2CPP)
|
|
||||||
|
|
||||||
bigfoot_remove_default_exception_flags()
|
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
set(CMAKE_OPTIMIZE_DEPENDENCIES 1)
|
set(CMAKE_OPTIMIZE_DEPENDENCIES 1)
|
||||||
|
|
||||||
|
add_compile_definitions(
|
||||||
|
$<$<PLATFORM_ID:Windows>:NOMINMAX>
|
||||||
|
$<$<PLATFORM_ID:Windows>:WIN32_LEAN_AND_MEAN>
|
||||||
|
$<$<PLATFORM_ID:Windows>:BIGFOOT_WINDOWS>
|
||||||
|
$<$<PLATFORM_ID:Linux>:BIGFOOT_LINUX>
|
||||||
|
$<$<CONFIG:Release>:BIGFOOT_OPTIMIZED>
|
||||||
|
$<$<CONFIG:Debug,RelWithDebInfo>:BIGFOOT_NOT_OPTIMIZED>)
|
||||||
|
|
||||||
if(BUILD_TESTS)
|
if(BUILD_TESTS)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
include_guard()
|
|
||||||
|
|
||||||
# Find ccache executable
|
|
||||||
find_program(CCACHE_PROGRAM NAMES ccache)
|
|
||||||
|
|
||||||
if(CCACHE_PROGRAM)
|
|
||||||
message(STATUS "ccache found: ${CCACHE_PROGRAM}, enabling via CMake launcher and environment.")
|
|
||||||
if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
|
||||||
# Copy original ccache.exe and rename to cl.exe, this way intermediate cmd file is not needed
|
|
||||||
file(COPY_FILE ${CCACHE_PROGRAM} ${CMAKE_BINARY_DIR}/cl.exe ONLY_IF_DIFFERENT)
|
|
||||||
|
|
||||||
# Set Visual Studio global variables:
|
|
||||||
# - Use above cl.exe (ccache.exe) as a compiler
|
|
||||||
# - Enable parallel compilation
|
|
||||||
list(APPEND CMAKE_VS_GLOBALS
|
|
||||||
"CLToolExe=cl.exe"
|
|
||||||
"CLToolPath=${CMAKE_BINARY_DIR}"
|
|
||||||
"UseMultiToolTask=true"
|
|
||||||
"UseStructuredOutput=false"
|
|
||||||
)
|
|
||||||
elseif(CMAKE_GENERATOR MATCHES "Ninja" OR CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
|
||||||
message(STATUS "Using ccache as compiler launcher for Ninja or Makefiles.")
|
|
||||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE FILEPATH "CXX compiler cache used" FORCE)
|
|
||||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE FILEPATH "C compiler cache used" FORCE)
|
|
||||||
else()
|
|
||||||
message(WARNING "Unsupported generator for ccache integration: ${CMAKE_GENERATOR}. ccache will not be used.")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(WARNING "ccache not found. Not enabling ccache integration.")
|
|
||||||
endif()
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
include_guard()
|
|
||||||
|
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
|
||||||
|
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[built-in options]
|
|
||||||
b_lto = true
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Linux
|
|
||||||
arch=x86_64
|
|
||||||
compiler=clang
|
|
||||||
compiler.version=20
|
|
||||||
compiler.libcxx=libstdc++11
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Release
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ccache.cmake
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake
|
|
||||||
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini
|
|
||||||
|
|
||||||
tools.system.package_manager:mode=install
|
|
||||||
tools.system.package_manager:sudo=True
|
|
||||||
|
|
||||||
tools.build:exelinkflags=["-fuse-ld=mold"]
|
|
||||||
tools.build:sharedlinkflags=["-fuse-ld=mold"]
|
|
||||||
|
|
||||||
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
|
||||||
|
|
||||||
tools.cmake.cmaketoolchain:generator=Ninja
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/4.3.2
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Windows
|
|
||||||
arch=x86_64
|
|
||||||
compiler=msvc
|
|
||||||
compiler.version=195
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Release
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ccache.cmake
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake
|
|
||||||
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini
|
|
||||||
|
|
||||||
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
|
|
||||||
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope"]
|
|
||||||
|
|
||||||
tools.env.virtualenv:powershell=powershell.exe
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/4.3.2
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Linux
|
|
||||||
arch=x86_64
|
|
||||||
compiler=clang
|
|
||||||
compiler.version=20
|
|
||||||
compiler.libcxx=libstdc++11
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Release
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ccache.cmake
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ipo.cmake
|
|
||||||
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/Toolchains/ipo.ini
|
|
||||||
|
|
||||||
tools.system.package_manager:mode=install
|
|
||||||
tools.system.package_manager:sudo=True
|
|
||||||
|
|
||||||
tools.build:exelinkflags=["-fuse-ld=mold"]
|
|
||||||
tools.build:sharedlinkflags=["-fuse-ld=mold"]
|
|
||||||
|
|
||||||
tools.build:cxxflags=["-fno-exceptions", "-fno-rtti"]
|
|
||||||
|
|
||||||
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
|
||||||
|
|
||||||
tools.cmake.cmaketoolchain:generator=Ninja
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/4.3.2
|
|
||||||
|
|
||||||
[options]
|
|
||||||
bigfoot/*:build_tests=True
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Linux
|
|
||||||
arch=x86_64
|
|
||||||
compiler=clang
|
|
||||||
compiler.version=20
|
|
||||||
compiler.libcxx=libstdc++11
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Debug
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ccache.cmake
|
|
||||||
|
|
||||||
tools.system.package_manager:mode=install
|
|
||||||
tools.system.package_manager:sudo=True
|
|
||||||
|
|
||||||
tools.build:exelinkflags=["-fuse-ld=mold", "-fsanitize=address,undefined,leak"]
|
|
||||||
tools.build:sharedlinkflags=["-fuse-ld=mold", "-fsanitize=address,undefined,leak"]
|
|
||||||
|
|
||||||
tools.build:cflags=["-fsanitize=address,undefined,leak", "-fno-sanitize-recover=all"]
|
|
||||||
tools.build:cxxflags=["-fno-exceptions", "-fno-rtti", "-fsanitize=address,undefined,leak", "-fno-sanitize-recover=all"]
|
|
||||||
|
|
||||||
tools.cmake.cmaketoolchain:generator=Ninja
|
|
||||||
|
|
||||||
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/4.3.2
|
|
||||||
|
|
||||||
[options]
|
|
||||||
bigfoot/*:asan=True
|
|
||||||
bigfoot/*:build_tests=True
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Linux
|
|
||||||
arch=x86_64
|
|
||||||
compiler=clang
|
|
||||||
compiler.version=20
|
|
||||||
compiler.libcxx=libstdc++11
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Debug
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ccache.cmake
|
|
||||||
|
|
||||||
tools.system.package_manager:mode=install
|
|
||||||
tools.system.package_manager:sudo=True
|
|
||||||
|
|
||||||
tools.build:exelinkflags=["-fuse-ld=mold"]
|
|
||||||
tools.build:sharedlinkflags=["-fuse-ld=mold"]
|
|
||||||
|
|
||||||
tools.build:cxxflags=["-fno-exceptions", "-fno-rtti"]
|
|
||||||
|
|
||||||
tools.cmake.cmaketoolchain:generator=Ninja
|
|
||||||
|
|
||||||
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/4.3.2
|
|
||||||
|
|
||||||
[options]
|
|
||||||
bigfoot/*:build_tests=True
|
|
||||||
bigfoot/*:coverage=True
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Windows
|
|
||||||
arch=x86_64
|
|
||||||
compiler=msvc
|
|
||||||
compiler.version=195
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Release
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ccache.cmake
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ipo.cmake
|
|
||||||
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/Toolchains/ipo.ini
|
|
||||||
|
|
||||||
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
|
|
||||||
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/EHs-c-", "/GR-"]
|
|
||||||
|
|
||||||
tools.build:defines=["_HAS_EXCEPTIONS=0"]
|
|
||||||
|
|
||||||
tools.env.virtualenv:powershell=powershell.exe
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/4.3.2
|
|
||||||
|
|
||||||
[options]
|
|
||||||
bigfoot/*:build_tests=True
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Windows
|
|
||||||
arch=x86_64
|
|
||||||
compiler=msvc
|
|
||||||
compiler.version=195
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Debug
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ccache.cmake
|
|
||||||
|
|
||||||
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/fsanitize=address"]
|
|
||||||
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/EHs-c-", "/GR-", "/fsanitize=address"]
|
|
||||||
|
|
||||||
tools.build:defines=["_HAS_EXCEPTIONS=0"]
|
|
||||||
|
|
||||||
tools.env.virtualenv:powershell=powershell.exe
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/4.3.2
|
|
||||||
|
|
||||||
[options]
|
|
||||||
bigfoot/*:asan=True
|
|
||||||
bigfoot/*:build_tests=True
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -48,12 +48,14 @@ You can customize these scripts to opt-out of some Bigfoot features
|
|||||||
'Just' modify these lines to disable them (I promise to one day modify the script to do it from the command line)
|
'Just' modify these lines to disable them (I promise to one day modify the script to do it from the command line)
|
||||||
|
|
||||||
```
|
```
|
||||||
-o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True
|
-o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
```
|
```
|
||||||
|
|
||||||
1. build_tests: Enable/Disable the tests
|
1. build_tests: Enable/Disable the tests
|
||||||
2. tracy: Enable/Disable profiling using [Tracy](https://github.com/wolfpld/tracy)
|
2. tracy: Enable/Disable profiling using [Tracy](https://github.com/wolfpld/tracy)
|
||||||
3. vulkan: Enable/Disable Vulkan renderer (No point disabling it, since for now only Vulkan is available in Bigfoot)
|
3. build_tools: Enable/Disable the tools (I'd absolutely recommand not disabling this)
|
||||||
|
4. vulkan: Enable/Disable Vulkan renderer (No point disabling it, since for now only Vulkan is available in Bigfoot)
|
||||||
|
5. build_benchmarks: Enable/Disable the benchmarks
|
||||||
|
|
||||||
|
|
||||||
### Generating Bigfoot
|
### Generating Bigfoot
|
||||||
|
|||||||
56
conanfile.py
56
conanfile.py
@@ -18,20 +18,20 @@ class Bigfoot(ConanFile):
|
|||||||
options = {
|
options = {
|
||||||
"shared": [True, False],
|
"shared": [True, False],
|
||||||
"fPIC": [True, False],
|
"fPIC": [True, False],
|
||||||
"asan": [True, False],
|
|
||||||
"coverage": [True, False],
|
|
||||||
"build_tests": [True, False],
|
"build_tests": [True, False],
|
||||||
"tracy": [True, False],
|
"tracy": [True, False],
|
||||||
"vulkan": [True, False]
|
"build_tools": [True, False],
|
||||||
|
"vulkan": [True, False],
|
||||||
|
"build_benchmarks": [True, False],
|
||||||
}
|
}
|
||||||
default_options = {
|
default_options = {
|
||||||
"shared": False,
|
"shared": False,
|
||||||
"fPIC": True,
|
"fPIC": True,
|
||||||
"asan": False,
|
|
||||||
"coverage": False,
|
|
||||||
"build_tests": False,
|
"build_tests": False,
|
||||||
"tracy": False,
|
"tracy": False,
|
||||||
|
"build_tools": True,
|
||||||
"vulkan": True,
|
"vulkan": True,
|
||||||
|
"build_benchmarks": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
generators = "CMakeDeps"
|
generators = "CMakeDeps"
|
||||||
@@ -43,8 +43,10 @@ class Bigfoot(ConanFile):
|
|||||||
if self.settings.os == "Windows":
|
if self.settings.os == "Windows":
|
||||||
del self.options.fPIC
|
del self.options.fPIC
|
||||||
|
|
||||||
if(self.options.asan):
|
self.options['mimalloc'].override = True
|
||||||
self.options["mimalloc"].asan = True
|
self.options['mimalloc'].shared = True
|
||||||
|
if(self.settings.os == "Windows"):
|
||||||
|
self.options["mimalloc"].win_redirect = True
|
||||||
|
|
||||||
self.options['stduuid'].with_cxx20_span = True
|
self.options['stduuid'].with_cxx20_span = True
|
||||||
self.options['flatbuffers'].header_only = True
|
self.options['flatbuffers'].header_only = True
|
||||||
@@ -54,49 +56,65 @@ class Bigfoot(ConanFile):
|
|||||||
|
|
||||||
if(self.options.vulkan):
|
if(self.options.vulkan):
|
||||||
self.options["spirv-cross"].exceptions = False
|
self.options["spirv-cross"].exceptions = False
|
||||||
|
|
||||||
def build_requirements(self):
|
if(self.options.build_benchmarks):
|
||||||
self.tool_requires("bin2cpp/1.0.0@bigfootdev/main")
|
self.options["benchmark"].enable_exceptions = False
|
||||||
|
self.options["benchmark"].enable_lto = True
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.requires("eastl/3.27.01@bigfootdev/main", transitive_headers=True)
|
self.requires("eastl/3.27.01@bigfootdev/main", transitive_headers=True)
|
||||||
self.requires("unordered_dense/4.8.1@bigfootdev/main", transitive_headers=True)
|
self.requires("unordered_dense/4.8.1@bigfootdev/main", transitive_headers=True)
|
||||||
self.requires("mimalloc/3.2.8@bigfootdev/main", transitive_headers=True)
|
self.requires("mimalloc/3.1.5@bigfootdev/main", transitive_headers=True)
|
||||||
self.requires("stduuid/1.2.3@bigfootdev/main", transitive_headers=True)
|
self.requires("stduuid/1.2.3@bigfootdev/main", transitive_headers=True)
|
||||||
self.requires("sqlite3/3.51.2@bigfootdev/main", transitive_headers=True)
|
self.requires("sqlite3/3.51.0@bigfootdev/main", transitive_headers=True)
|
||||||
|
self.requires("cli11/2.6.0")
|
||||||
self.requires("rapidhash/3.0@bigfootdev/main", transitive_headers=True)
|
self.requires("rapidhash/3.0@bigfootdev/main", transitive_headers=True)
|
||||||
self.requires("effolkronium-random/1.5.0", transitive_headers=True)
|
self.requires("effolkronium-random/1.5.0", transitive_headers=True)
|
||||||
self.requires("flatbuffers/25.12.19@bigfootdev/main", transitive_headers=True)
|
self.requires("flatbuffers/25.12.19@bigfootdev/main", transitive_headers=True)
|
||||||
|
|
||||||
if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"):
|
if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"):
|
||||||
self.requires("quill/11.0.2", transitive_headers=True)
|
self.requires("quill/11.0.2", transitive_headers=True)
|
||||||
|
self.requires("cpptrace/1.0.4", transitive_headers=True)
|
||||||
|
|
||||||
if(self.options.tracy):
|
if(self.options.tracy):
|
||||||
self.requires("tracy/0.13.1", transitive_headers=True)
|
self.requires("tracy/0.12.2", transitive_headers=True)
|
||||||
|
|
||||||
self.requires("glm/1.0.1", transitive_headers=True)
|
self.requires("glm/1.0.1", transitive_headers=True)
|
||||||
self.requires("lodepng/cci.20260210@bigfootdev/main", transitive_headers=True)
|
self.requires("lodepng/cci.20250727@bigfootdev/main", transitive_headers=True)
|
||||||
self.requires("imgui/1.92.6-docking@bigfootdev/main", transitive_headers=True)
|
self.requires("imgui/1.92.5-docking", transitive_headers=True)
|
||||||
|
|
||||||
if(self.options.vulkan):
|
if(self.options.vulkan):
|
||||||
self.requires("vulkan-headers/1.4.341.0@bigfootdev/main", override=True)
|
self.requires("vulkan-headers/1.4.313.0")
|
||||||
|
if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"):
|
||||||
|
self.requires("vulkan-validationlayers/1.4.313.0@bigfootdev/main")
|
||||||
self.requires("vulkan-memory-allocator/3.3.0@bigfootdev/main")
|
self.requires("vulkan-memory-allocator/3.3.0@bigfootdev/main")
|
||||||
|
|
||||||
if(self.options.build_tests):
|
if(self.options.build_tests or self.options.build_benchmarks):
|
||||||
self.requires("glfw/3.4")
|
self.requires("glfw/3.4")
|
||||||
|
|
||||||
if(self.options.build_tests):
|
if(self.options.build_tests):
|
||||||
self.test_requires("gtest/1.17.0")
|
self.test_requires("gtest/1.17.0")
|
||||||
self.test_requires("pixelmatch-cpp17/1.0.3@bigfootdev/main")
|
self.test_requires("pixelmatch-cpp17/1.0.3@bigfootdev/main")
|
||||||
|
|
||||||
|
if(self.options.build_tools):
|
||||||
|
self.requires("spirv-cross/1.4.313.0")
|
||||||
|
self.requires("shaderc/2025.3@bigfootdev/main")
|
||||||
|
self.requires("stb/cci.20240531", override=True)
|
||||||
|
self.requires("assimp/6.0.2")
|
||||||
|
self.requires("meshoptimizer/1.0@bigfootdev/main")
|
||||||
|
self.requires("libsquish/1.15")
|
||||||
|
|
||||||
|
if(self.options.build_benchmarks):
|
||||||
|
self.requires("benchmark/1.9.4")
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
tc = CMakeToolchain(self)
|
tc = CMakeToolchain(self)
|
||||||
|
|
||||||
tc.variables["ASAN"] = self.options.asan
|
|
||||||
tc.variables["COVERAGE"] = self.options.coverage
|
|
||||||
tc.variables["BUILD_TESTS"] = self.options.build_tests
|
tc.variables["BUILD_TESTS"] = self.options.build_tests
|
||||||
tc.variables["TRACY"] = self.options.tracy
|
tc.variables["TRACY"] = self.options.tracy
|
||||||
|
tc.variables["BUILD_TOOLS"] = self.options.build_tools
|
||||||
tc.variables["VULKAN"] = self.options.vulkan
|
tc.variables["VULKAN"] = self.options.vulkan
|
||||||
|
tc.variables["BUILD_BENCHMARKS"] = self.options.build_benchmarks
|
||||||
|
|
||||||
tc.generate()
|
tc.generate()
|
||||||
|
|
||||||
|
|||||||
@@ -1,60 +1 @@
|
|||||||
@echo off
|
cmake -S . -B build --toolchain build/generators/conan_toolchain.cmake --graphviz=graphviz/graph.dot
|
||||||
setlocal
|
|
||||||
|
|
||||||
REM ─── Validate argument ───────────────────────────────────────────────────────
|
|
||||||
if "%~1"=="force" set "build_option=--build=*" & goto :start
|
|
||||||
if "%~1"=="missing" set "build_option=--build=missing" & goto :start
|
|
||||||
|
|
||||||
echo Usage: %~n0 [force^|missing]
|
|
||||||
echo force - Rebuild all packages from source
|
|
||||||
echo missing - Only build packages not already cached
|
|
||||||
exit /b 1
|
|
||||||
|
|
||||||
:start
|
|
||||||
REM ─── Register remote (skip if already registered) ────────────────────────────
|
|
||||||
conan remote list | findstr /i "bigfootpackages" >nul 2>&1
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo Adding Conan remote: bigfootpackages
|
|
||||||
conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo ERROR: Failed to add Conan remote.
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
) else (
|
|
||||||
echo Conan remote 'bigfootpackages' already registered, skipping.
|
|
||||||
)
|
|
||||||
|
|
||||||
REM ─── Shared flags ────────────────────────────────────────────────────────────
|
|
||||||
set "conan_common=--remote=bigfootpackages -pr:h=./ConanProfiles/msvc -pr:b=./ConanProfiles/Tools/msvc -of build -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True"
|
|
||||||
|
|
||||||
REM ─── Install dependencies for each build type ────────────────────────────────
|
|
||||||
for %%C in (Release RelWithDebInfo Debug) do (
|
|
||||||
echo.
|
|
||||||
echo [%%C] Installing dependencies...
|
|
||||||
conan install . %conan_common% %build_option% -s:h build_type=%%C
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo ERROR: conan install failed for build type %%C
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
echo [%%C] Done.
|
|
||||||
)
|
|
||||||
|
|
||||||
echo.
|
|
||||||
echo All build types installed successfully.
|
|
||||||
|
|
||||||
REM ─── Activate build environment and run CMake ────────────────────────────────
|
|
||||||
echo.
|
|
||||||
echo Activating build environment and configuring CMake...
|
|
||||||
mkdir graphviz 2>nul
|
|
||||||
|
|
||||||
powershell -ExecutionPolicy Bypass -Command "& 'build/build/generators/conanbuild.ps1'; cmake -S . -B build --toolchain build/build/generators/conan_toolchain.cmake --graphviz=graphviz/graph.dot; if ($LASTEXITCODE -ne 0) { Write-Host 'ERROR: CMake configuration failed'; exit 1 }"
|
|
||||||
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo ERROR: Build environment or CMake step failed.
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
echo.
|
|
||||||
echo CMake configuration successful.
|
|
||||||
|
|
||||||
endlocal
|
|
||||||
33
generate_dependencies.bat
Normal file
33
generate_dependencies.bat
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
REM Check if the correct number of arguments is provided
|
||||||
|
if "%~1"=="" (
|
||||||
|
echo Usage: %0 "[force|missing]"
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Set the build option based on the argument
|
||||||
|
set build_option=
|
||||||
|
if "%~1"=="force" (
|
||||||
|
set build_option=--build="*"
|
||||||
|
) else if "%~1"=="missing" (
|
||||||
|
set build_option=--build=missing
|
||||||
|
) else (
|
||||||
|
echo Invalid argument: %~1
|
||||||
|
echo Usage: %0 "[force|missing]"
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Add the remote
|
||||||
|
conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages
|
||||||
|
|
||||||
|
REM Install the conan configuration
|
||||||
|
conan config install https://git.romainboullard.com/BigfootDev/ConanProfiles.git
|
||||||
|
|
||||||
|
REM Install dependencies with the specified build option
|
||||||
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=msvc -pr:b=msvc %build_option% -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=msvcd -pr:b=msvcd %build_option% -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=msvcd -pr:b=msvcd %build_option% -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
|
|
||||||
|
endlocal
|
||||||
@@ -1,45 +1,28 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# ─── Validate argument ───────────────────────────────────────────────────────
|
# Check if the correct number of arguments is provided
|
||||||
usage() {
|
|
||||||
echo "Usage: $0 [force|missing]"
|
|
||||||
echo " force - Rebuild all packages from source"
|
|
||||||
echo " missing - Only build packages not already cached"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
usage
|
echo "Usage: $0 [force|missing]"
|
||||||
elif [ "$1" == "force" ]; then
|
exit 1
|
||||||
build_option="--build=*"
|
fi
|
||||||
|
|
||||||
|
# Add the remote
|
||||||
|
conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages
|
||||||
|
|
||||||
|
# Install the conan configuration
|
||||||
|
conan config install https://git.romainboullard.com/BigfootDev/ConanProfiles.git
|
||||||
|
|
||||||
|
# Set the build option based on the argument
|
||||||
|
if [ "$1" == "force" ]; then
|
||||||
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clang -pr:b=clang --build='*' -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clangd -pr:b=clangd --build='*' -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clangd -pr:b=clangd --build='*' -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
elif [ "$1" == "missing" ]; then
|
elif [ "$1" == "missing" ]; then
|
||||||
build_option="--build=missing"
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clangd -pr:b=clangd --build=missing -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
|
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clangd -pr:b=clangd --build=missing -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||||
else
|
else
|
||||||
echo "Invalid argument: $1"
|
echo "Invalid argument: $1"
|
||||||
usage
|
echo "Usage: $0 [force|missing]"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ─── Register remote (skip if already registered) ────────────────────────────
|
|
||||||
if ! conan remote list | grep -qi "bigfootpackages"; then
|
|
||||||
echo "Adding Conan remote: bigfootpackages"
|
|
||||||
conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages || exit 1
|
|
||||||
else
|
|
||||||
echo "Conan remote 'bigfootpackages' already registered, skipping."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ─── Shared flags ────────────────────────────────────────────────────────────
|
|
||||||
conan_common="--remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/Tools/clang -of build -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True"
|
|
||||||
|
|
||||||
# ─── Install dependencies for each build type ────────────────────────────────
|
|
||||||
for build_type in Release RelWithDebInfo Debug; do
|
|
||||||
echo ""
|
|
||||||
echo "[$build_type] Installing dependencies..."
|
|
||||||
conan install . $conan_common $build_option -s build_type=$build_type || {
|
|
||||||
echo "ERROR: conan install failed for build type $build_type"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
echo "[$build_type] Done."
|
|
||||||
done
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "All build types installed successfully."
|
|
||||||
Reference in New Issue
Block a user