Moved a tonne of code around

This commit is contained in:
2021-11-22 09:20:01 -08:00
parent 3a6b6ea655
commit 8a77b39e07
227 changed files with 61 additions and 810 deletions

6
.gitmodules vendored
View File

@ -10,9 +10,3 @@
[submodule "lib/glfw"]
path = lib/glfw
url = https://github.com/glfw/glfw
[submodule "lib/libzip"]
path = lib/libzip
url = https://github.com/nih-at/libzip
[submodule "lib/zlib"]
path = lib/zlib
url = https://github.com/madler/zlib

View File

@ -7,6 +7,8 @@
cmake_minimum_required(VERSION 3.13)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Set some global flags
add_compile_definitions(
@ -126,11 +128,6 @@ elseif(TARGET_TYPE STREQUAL game)
elseif(TARGET_GAME STREQUAL sandbox)
add_compile_definitions(
GAME_NAME="Sandbox"
GAME_FILE="sandbox/game.h"
GAME_TYPE=sandboxgame_t
GAME_INIT=sandboxGameInit
GAME_UPDATE=sandboxGameUpdate
GAME_DISPOSE=sandboxGameDispose
GAME_VERSION=1.0
)

View File

@ -6,10 +6,10 @@
#pragma once
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <libs.h>
#include <display/render.h>
#include <game/game.h>
#include <input/input.h>
#include <dawn/libs.h>
#include <dawn/display/render.h>
#include <dawn/input/input.h>
#include <dawninit.h>
#define WINDOW_WIDTH_DEFAULT 1280
#define WINDOW_HEIGHT_DEFAULT WINDOW_WIDTH_DEFAULT/16*9

Submodule lib/libzip deleted from 945768eca2

Submodule lib/zlib deleted from cacf7f1d4e

View File

@ -3,9 +3,7 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Definitions
# Libraries
# Dawn Libraries
target_link_libraries(${PROJECT_NAME}
PUBLIC
glad
@ -14,26 +12,25 @@ target_link_libraries(${PROJECT_NAME}
duktape
)
# Sources
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
list(FILTER SOURCES EXCLUDE REGEX ".*game\\/.*")
list(FILTER HEADERS EXCLUDE REGEX ".*game\\/.*")
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
# Dawn Sources
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/dawn/*.c(pp|xx))
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/dawn/*.h(pp|xx))
target_sources(${PROJECT_NAME}
PRIVATE
${SOURCES}
${HEADERS}
)
# Includes
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
# Sub
if(TARGET_TYPE STREQUAL game)
add_subdirectory(game)
endif()
# Sandbox Game Sources
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sandbox/*.c(pp|xx))
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/sandbox/*.h(pp|xx))
target_sources(${PROJECT_NAME}
PRIVATE
${SOURCES}
${HEADERS}
)

View File

@ -9,7 +9,7 @@
#include "../libs.h"
#include "framebuffer.h"
#include "primitive/primitive.h"
#include "shader/shader.h"
#include "shader.h"
#include "camera.h"
#include "../engine/engine.h"
#include "primitive/quad.h"

View File

@ -6,11 +6,11 @@
*/
#pragma once
#include "../../libs.h"
#include "../matrix.h"
#include "../camera.h"
#include "../texture.h"
#include "../../util/array.h"
#include <dawn/libs.h>
#include "matrix.h"
#include "camera.h"
#include "texture.h"
#include "../util/array.h"
#define SHADER_UNIFORM_NAME_MAX 24
#define SHADER_UNIFORM_COUNT 16

View File

@ -7,7 +7,7 @@
#pragma once
#include "../libs.h"
#include "../display/shader/shader.h"
#include "../display/shader.h"
#include "../display/texture.h"
#include "../display/font.h"

View File

@ -7,7 +7,7 @@
#pragma once
#include "../../libs.h"
#include "../engine/thread.h"
#include "../../engine/thread.h"
#include "texture.h"
#include "font.h"
#include "shader.h"

View File

@ -5,7 +5,7 @@
#pragma once
#include "../../libs.h"
#include "../../display/shader/shader.h"
#include "../../display/shader.h"
typedef struct {
shader_t shader;

Some files were not shown because too many files have changed in this diff Show More