diff --git a/CMakeLists.txt b/CMakeLists.txt index 669068a..14b1eda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,9 @@ add_library(lunasvg::lunasvg ALIAS PkgConfig::LUNASVG) find_package(RmlUi CONFIG REQUIRED) +pkg_check_modules(SQLITE3 REQUIRED IMPORTED_TARGET sqlite3) +add_library(sqlite3::sqlite3 ALIAS PkgConfig::SQLITE3) + add_library(rmlui_backend STATIC vendor/rmlui_backend/RmlUi_Backend_GLFW_GL3.cpp vendor/rmlui_backend/RmlUi_Platform_GLFW.cpp @@ -51,6 +54,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE Freetype::Freetype lunasvg::lunasvg glfw + sqlite3::sqlite3 ) install(TARGETS ${PROJECT_NAME} DESTINATION bin) diff --git a/assets/test.db b/assets/test.db new file mode 100644 index 0000000..a82527c Binary files /dev/null and b/assets/test.db differ diff --git a/flake.nix b/flake.nix index 76fc6fd..52370d1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "C++ RmlUI + Raylib development environemt"; + description = "sessionzero dev env"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -47,15 +47,19 @@ cmake pkg-config gcc + + sqlite + clang-tools lua-language-server + superhtml + vscode-css-languageserver ]; runtimeDeps = with pkgs; [ raylib glfw libGL - clang-tools libX11 libXcursor libXrandr @@ -67,9 +71,7 @@ freetype lunasvg lua - lua-language-server - superhtml - vscode-css-languageserver + sqlite.dev ]; in { @@ -78,8 +80,8 @@ buildInputs = runtimeDeps; shellHook = '' - export CP_PATH="${pkgs.raylib}/include:${pkgs.glfw}/include:${rmlui}/include" - export LIBRARY_PATH="${pkgs.raylib}/lib:${pkgs.glfw}/lib:${pkgs.libGL}/lib:${rmlui}/lib" + export CP_PATH="${pkgs.raylib}/include:${pkgs.glfw}/include:${rmlui}/include:${pkgs.sqlite}/include" + export LIBRARY_PATH="${pkgs.raylib}/lib:${pkgs.glfw}/lib:${pkgs.libGL}/lib:${rmlui}/lib:${pkgs.sqlite}/lib" export LD_LIBRARY_PATH="$LIBRARY_PATH:$LD_LIBRARY_PATH" echo "Env ready" diff --git a/result b/result index b651164..f4aea6c 120000 --- a/result +++ b/result @@ -1 +1 @@ -/nix/store/qz2y746iqyp2k1baskbnhwklp3358gwd-sessionzero-0.1.0 \ No newline at end of file +/nix/store/27xkf4w4r5lwx9bmh43s76pl1izmdmvl-sessionzero-0.1.0 \ No newline at end of file diff --git a/src/SzData.hpp b/src/SzData.hpp index 8cf85dc..66d374f 100644 --- a/src/SzData.hpp +++ b/src/SzData.hpp @@ -18,4 +18,6 @@ public: string Description = ""; // optional std::vector CompatibleSystems; // requires at least one value }; -}; \ No newline at end of file + + +}; diff --git a/src/main.cpp b/src/main.cpp index 712380e..ed17147 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -15,6 +14,7 @@ #include "element_registry.hpp" #include "ButtonClickListener.hpp" #include "lui_app_api.hpp" +#include static bool is_initalized = false; static bool is_running = false; diff --git a/szds.md b/szds.md index b0e4046..d366769 100644 --- a/szds.md +++ b/szds.md @@ -1,7 +1,80 @@ # SessionZero Data System -```c + + +```text + +sessionzero/ +├─ data/ +│ ├─ datasets/ +│ │ ├─ author.dataset_name/ +│ │ │ ├─ objects/ +│ │ │ │ ├─ item/ +│ │ │ │ │ ├─ stick.szdo +│ │ │ │ ├─ npc/ +│ │ │ │ │ ├─ marcus.szdo +│ │ │ ├─ templates/ +│ │ │ │ ├─ item.szdt +│ │ │ │ ├─ npc.szdt +│ │ │ ├─ dataset.sz +│ │ │ ├─ icon.png +│ ├─ sessions/ +│ │ ├─ author.session_name/ +│ │ │ ├─ players/ +│ │ │ │ ├─ player1/ +│ │ │ │ │ ├─ characters/ +│ │ │ │ │ │ ├─ thumbs/ +│ │ │ │ │ │ │ ├─ character1.png +│ │ │ │ │ │ ├─ character1.szco +│ │ │ │ │ ├─ playerinfo.sz +│ │ │ ├─ character_template.szct +│ │ │ ├─ session.sz +│ ├─ local.db +├─ config.ini +├─ sessionzero + + +``` + + + + + + + + + + + + + + + +Psuedocode for the various data elements and how they connect: + + + + + + + + + + + + + + + + + + + + + + +```text Dataset: { Metadata: { ID (required unique string), @@ -20,7 +93,9 @@ Dataset: { DataType (required string) }, TemplateFields: { - FieldType, + ID (required unique string), + FieldType, + } },