adding sqlite and trying to define the data structure
This commit is contained in:
@@ -16,6 +16,9 @@ add_library(lunasvg::lunasvg ALIAS PkgConfig::LUNASVG)
|
|||||||
|
|
||||||
find_package(RmlUi CONFIG REQUIRED)
|
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
|
add_library(rmlui_backend STATIC
|
||||||
vendor/rmlui_backend/RmlUi_Backend_GLFW_GL3.cpp
|
vendor/rmlui_backend/RmlUi_Backend_GLFW_GL3.cpp
|
||||||
vendor/rmlui_backend/RmlUi_Platform_GLFW.cpp
|
vendor/rmlui_backend/RmlUi_Platform_GLFW.cpp
|
||||||
@@ -51,6 +54,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
|
|||||||
Freetype::Freetype
|
Freetype::Freetype
|
||||||
lunasvg::lunasvg
|
lunasvg::lunasvg
|
||||||
glfw
|
glfw
|
||||||
|
sqlite3::sqlite3
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
|
|||||||
BIN
assets/test.db
Normal file
BIN
assets/test.db
Normal file
Binary file not shown.
16
flake.nix
16
flake.nix
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "C++ RmlUI + Raylib development environemt";
|
description = "sessionzero dev env";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
@@ -47,15 +47,19 @@
|
|||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
gcc
|
gcc
|
||||||
|
|
||||||
|
sqlite
|
||||||
|
|
||||||
clang-tools
|
clang-tools
|
||||||
lua-language-server
|
lua-language-server
|
||||||
|
superhtml
|
||||||
|
vscode-css-languageserver
|
||||||
];
|
];
|
||||||
|
|
||||||
runtimeDeps = with pkgs; [
|
runtimeDeps = with pkgs; [
|
||||||
raylib
|
raylib
|
||||||
glfw
|
glfw
|
||||||
libGL
|
libGL
|
||||||
clang-tools
|
|
||||||
libX11
|
libX11
|
||||||
libXcursor
|
libXcursor
|
||||||
libXrandr
|
libXrandr
|
||||||
@@ -67,9 +71,7 @@
|
|||||||
freetype
|
freetype
|
||||||
lunasvg
|
lunasvg
|
||||||
lua
|
lua
|
||||||
lua-language-server
|
sqlite.dev
|
||||||
superhtml
|
|
||||||
vscode-css-languageserver
|
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -78,8 +80,8 @@
|
|||||||
buildInputs = runtimeDeps;
|
buildInputs = runtimeDeps;
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export CP_PATH="${pkgs.raylib}/include:${pkgs.glfw}/include:${rmlui}/include"
|
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"
|
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"
|
export LD_LIBRARY_PATH="$LIBRARY_PATH:$LD_LIBRARY_PATH"
|
||||||
|
|
||||||
echo "Env ready"
|
echo "Env ready"
|
||||||
|
|||||||
2
result
2
result
@@ -1 +1 @@
|
|||||||
/nix/store/qz2y746iqyp2k1baskbnhwklp3358gwd-sessionzero-0.1.0
|
/nix/store/27xkf4w4r5lwx9bmh43s76pl1izmdmvl-sessionzero-0.1.0
|
||||||
@@ -18,4 +18,6 @@ public:
|
|||||||
string Description = ""; // optional
|
string Description = ""; // optional
|
||||||
std::vector<string> CompatibleSystems; // requires at least one value
|
std::vector<string> CompatibleSystems; // requires at least one value
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
#include <RmlUi/Lua/Interpreter.h>
|
#include <RmlUi/Lua/Interpreter.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <RmlUi/Core/Context.h>
|
#include <RmlUi/Core/Context.h>
|
||||||
#include <RmlUi/Core/Core.h>
|
|
||||||
#include <RmlUi/Core/Math.h>
|
#include <RmlUi/Core/Math.h>
|
||||||
#include <RmlUi/Core.h>
|
#include <RmlUi/Core.h>
|
||||||
#include <RmlUi_Backend.h>
|
#include <RmlUi_Backend.h>
|
||||||
@@ -15,6 +14,7 @@
|
|||||||
#include "element_registry.hpp"
|
#include "element_registry.hpp"
|
||||||
#include "ButtonClickListener.hpp"
|
#include "ButtonClickListener.hpp"
|
||||||
#include "lui_app_api.hpp"
|
#include "lui_app_api.hpp"
|
||||||
|
#include <sqlite3.h>
|
||||||
|
|
||||||
static bool is_initalized = false;
|
static bool is_initalized = false;
|
||||||
static bool is_running = false;
|
static bool is_running = false;
|
||||||
|
|||||||
79
szds.md
79
szds.md
@@ -1,7 +1,80 @@
|
|||||||
# SessionZero Data System
|
# 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: {
|
Dataset: {
|
||||||
Metadata: {
|
Metadata: {
|
||||||
ID (required unique string),
|
ID (required unique string),
|
||||||
@@ -20,7 +93,9 @@ Dataset: {
|
|||||||
DataType (required string)
|
DataType (required string)
|
||||||
},
|
},
|
||||||
TemplateFields: {
|
TemplateFields: {
|
||||||
FieldType,
|
ID (required unique string),
|
||||||
|
FieldType,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user