Initial commit

This commit is contained in:
2026-03-15 19:46:00 +01:00
commit cddd4b6f8d
8 changed files with 124 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
build
Build
.cache

7
.gitmodules vendored Normal file
View File

@@ -0,0 +1,7 @@
[submodule "libs/imgui-node-editor"]
path = libs/imgui-node-editor
url = https://github.com/htamas1210/imgui-node-editor.git
branch = develop
[submodule "libs/SakuraCore"]
path = libs/SakuraCore
url = http://rpiserver.ddns.net:3000/htamas1210/SakuraCore.git

79
CMakeLists.txt Normal file
View File

@@ -0,0 +1,79 @@
# Require a modern version of CMake
cmake_minimum_required(VERSION 3.15)
# Define the Main Application project
project(SakuraVNE LANGUAGES CXX)
# ------------------------------------------------------------------------------
# Default Build Type Configuration
# ------------------------------------------------------------------------------
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting default build type to 'Debug'")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
# Enforce C++20 globally
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# ------------------------------------------------------------------------------
# Output Directory Configuration
# ------------------------------------------------------------------------------
# We put the final executable in the exact same bin/ folder structure
set(OUTPUT_DIR_SUFFIX "$<CONFIG>-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/${OUTPUT_DIR_SUFFIX}")
# ------------------------------------------------------------------------------
# Subdirectories (Dependencies)
# ------------------------------------------------------------------------------
# 1. Bring in the Engine Core (This automatically brings in SDL3, ImGui, and spdlog)
add_subdirectory(libs/SakuraCore)
# 2. Bring in the Editor-specific UI library
add_subdirectory(libs/imgui-node-editor)
# ------------------------------------------------------------------------------
# Source Gathering
# ------------------------------------------------------------------------------
# Gather all files in the Editor's src folder (primarily main.cpp for now)
file(GLOB_RECURSE SAKURA_VNE_SRCS "SakuraVNE/src/*.cpp" "SakuraVNE/src/*.h")
# ------------------------------------------------------------------------------
# SakuraVNE Executable Target
# ------------------------------------------------------------------------------
add_executable(SakuraVNE ${SAKURA_VNE_SRCS})
# ------------------------------------------------------------------------------
# Includes & Linking
# ------------------------------------------------------------------------------
# Note: We do NOT need to include SDL3 or SakuraCore/src here!
# SakuraCore exports those paths automatically because we used PUBLIC in its CMake.
target_include_directories(SakuraVNE PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"libs/imgui-node-editor"
"libs/SakuraCore/SakuraCore/src"
)
# Link the core engine and the node editor.
target_link_libraries(SakuraVNE PRIVATE
SakuraCore
ImGuiNodeEditor
)
# ------------------------------------------------------------------------------
# Platform & Configuration Filters
# ------------------------------------------------------------------------------
if(WIN32)
target_compile_definitions(SakuraVNE PRIVATE PLATFORM_WINDOWS)
target_link_options(SakuraVNE PRIVATE "/NODEFAULTLIB:MSVCRT")
elseif(UNIX AND NOT APPLE)
target_compile_definitions(SakuraVNE PRIVATE PLATFORM_LINUX)
endif()
# Debug vs Release definitions
target_compile_definitions(SakuraVNE PRIVATE
$<$<CONFIG:Debug>:DEBUG>
$<$<CONFIG:Release>:RELEASE>
)

14
README.md Normal file
View File

@@ -0,0 +1,14 @@
# SakuraVNE
Visual novel creator engine made with SDL2
Clone the project:
`git clone https://github.com/htamas1210/SakuraVNE.git --recursive`
## windows:
Generate a visual studio 2026 solution and build from there:
`cmake -G "Visual Studio 18 2026" -A x64`
## linux:
`cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`
`ln -sf build/compile_commands.json compile_commands.json`
`cmake --build build -j`

18
SakuraVNE/src/main.cpp Normal file
View File

@@ -0,0 +1,18 @@
#define SDL_MAIN_HANDLED 1
#include "Application.h"
#include "SDL3/SDL_main.h"
// #include "SakuraCore/src/Application.h"
int main(int argc, char *argv[]) {
SDL_SetMainReady();
Application app;
bool success = app.Init();
if (success)
app.Run();
return 0;
}

1
SakuraVNE/test/test.cpp Normal file
View File

@@ -0,0 +1 @@
int main() { return 0; }

1
libs/SakuraCore Submodule

Submodule libs/SakuraCore added at e152bf93b3