adding sqlite and trying to define the data structure

This commit is contained in:
2026-07-31 11:00:12 -05:00
parent 0ed0f11a5a
commit 93005494eb
7 changed files with 95 additions and 12 deletions

View File

@@ -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)

BIN
assets/test.db Normal file

Binary file not shown.

View File

@@ -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"

2
result
View File

@@ -1 +1 @@
/nix/store/qz2y746iqyp2k1baskbnhwklp3358gwd-sessionzero-0.1.0
/nix/store/27xkf4w4r5lwx9bmh43s76pl1izmdmvl-sessionzero-0.1.0

View File

@@ -18,4 +18,6 @@ public:
string Description = ""; // optional
std::vector<string> CompatibleSystems; // requires at least one value
};
};
};

View File

@@ -5,7 +5,6 @@
#include <RmlUi/Lua/Interpreter.h>
#include <iostream>
#include <RmlUi/Core/Context.h>
#include <RmlUi/Core/Core.h>
#include <RmlUi/Core/Math.h>
#include <RmlUi/Core.h>
#include <RmlUi_Backend.h>
@@ -15,6 +14,7 @@
#include "element_registry.hpp"
#include "ButtonClickListener.hpp"
#include "lui_app_api.hpp"
#include <sqlite3.h>
static bool is_initalized = false;
static bool is_running = false;

79
szds.md
View File

@@ -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,
}
},