summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-01-04 01:13:13 -0500
committerrealtradam <[email protected]>2023-01-04 01:13:13 -0500
commitbe7143637ddf12ba1460a87932c964ab2de0af7b (patch)
tree90b5d84863db00551f6a04c729f5265a9029ff8f
downloadrodeo_sample_game-be7143637ddf12ba1460a87932c964ab2de0af7b.tar.gz
rodeo_sample_game-be7143637ddf12ba1460a87932c964ab2de0af7b.zip
init
-rw-r--r--.gitignore67
-rw-r--r--.gitmodules3
-rw-r--r--CMakeLists.txt34
-rwxr-xr-xbuild2
-rwxr-xr-xconfigure3
m---------external/RodeoEngine0
-rwxr-xr-xrun3
-rw-r--r--src/compile_flags.txt2
-rw-r--r--src/main.c29
9 files changed, 143 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bd379b4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,67 @@
+[Bb]uild_[Dd]ir
+
+# CMake
+CMakeLists.txt.user
+CMakeCache.txt
+CMakeFiles
+CMakeScripts
+Testing
+Makefile
+cmake_install.cmake
+install_manifest.txt
+compile_commands.json
+CTestTestfile.cmake
+_deps
+
+# Prerequisites
+*.d
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+*.su
+*.idb
+*.pdb
+
+# Kernel Module Compile Results
+*.mod*
+*.cmd
+.tmp_versions/
+modules.order
+Module.symvers
+Mkfile.old
+dkms.conf
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..45bc128
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "external/RodeoEngine"]
+ path = external/RodeoEngine
+ url = https://github.com/realtradam/RodeoEngine.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..0c8e18d
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,34 @@
+cmake_minimum_required(VERSION 3.25.1)
+
+project(space_squad)
+
+file(GLOB SOURCES
+ "src/main.c"
+ )
+
+add_executable(${PROJECT_NAME} ${SOURCES})
+
+find_package(Git QUIET)
+if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
+# Update submodules as needed
+ option(GIT_SUBMODULE "Check submodules during build" ON)
+ if(GIT_SUBMODULE)
+ message(STATUS "Submodule update")
+ execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ RESULT_VARIABLE GIT_SUBMOD_RESULT)
+ if(NOT GIT_SUBMOD_RESULT EQUAL "0")
+ message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
+ endif()
+ endif()
+endif()
+
+add_subdirectory(external/RodeoEngine)
+
+target_include_directories(${PROJECT_NAME}
+ PUBLIC external/RodeoEngine/include
+ )
+
+target_link_libraries(${PROJECT_NAME}
+ RodeoEngine
+ )
diff --git a/build b/build
new file mode 100755
index 0000000..45cd35b
--- /dev/null
+++ b/build
@@ -0,0 +1,2 @@
+#! /bin/sh
+cd build_dir ; make
diff --git a/configure b/configure
new file mode 100755
index 0000000..352dcd6
--- /dev/null
+++ b/configure
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+cmake -S . -B build_dir
diff --git a/external/RodeoEngine b/external/RodeoEngine
new file mode 160000
+Subproject 6e4540372bb862afb4fc084d5c5e68ba0ae9c67
diff --git a/run b/run
new file mode 100755
index 0000000..95c0220
--- /dev/null
+++ b/run
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+./build_dir/space_squad
diff --git a/src/compile_flags.txt b/src/compile_flags.txt
new file mode 100644
index 0000000..f138ece
--- /dev/null
+++ b/src/compile_flags.txt
@@ -0,0 +1,2 @@
+-I./
+-I../external/RodeoEngine/include
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..586d476
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,29 @@
+#include <stdio.h>
+#include <stdbool.h>
+#include "SDL2/SDL.h"
+#include "SDL2/SDL_syswm.h"
+#include "bgfx/c99/bgfx.h"
+
+#include "rodeo.h"
+
+Rodeo__Data_t _state = {0};
+Rodeo__Data_t* state = &_state;
+
+int
+main()
+{
+ Rodeo__init_window(state, 480, 640, "Rodeo Window");
+
+ while(!state->quit)
+ {
+ Rodeo__begin(state);
+
+ bgfx_dbg_text_printf(0, 2, 0x6f, "Description: Initialization and debug text.");
+
+ Rodeo__end(state);
+ }
+
+ Rodeo__deinit_window(state);
+ Rodeo__quit();
+ return 0;
+}