From cb6f9eaaa9d802969e65238c58855829a7ada6f1 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Sun, 27 Feb 2022 08:45:11 -0800 Subject: [PATCH] Id --- src/CMakeLists.txt | 2 +- src/engine/engine.h | 1 + src/games/poker/game.h | 3 +-- src/games/sandbox/CMakeLists.txt | 15 ------------- src/games/sandbox/game.c | 30 -------------------------- src/games/sandbox/game.h | 37 -------------------------------- src/libs.h | 2 +- 7 files changed, 4 insertions(+), 86 deletions(-) delete mode 100644 src/games/sandbox/CMakeLists.txt delete mode 100644 src/games/sandbox/game.c delete mode 100644 src/games/sandbox/game.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7a5881de..b319eda8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,7 +10,7 @@ target_link_libraries(${PROJECT_NAME} glad cglm stb - duktape + # duktape ) target_include_directories(${PROJECT_NAME} diff --git a/src/engine/engine.h b/src/engine/engine.h index b56b8790..b6a3e490 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -14,6 +14,7 @@ #include "../display/render.h" #include "../file/assetmanager.h" #include "../save/save.h" +#include "scene/scenemanager.h" typedef struct { /** Name of the game */ diff --git a/src/games/poker/game.h b/src/games/poker/game.h index fe0139c7..851e1584 100644 --- a/src/games/poker/game.h +++ b/src/games/poker/game.h @@ -18,12 +18,11 @@ typedef struct { engine_t engine; - camera_t camera; standardshader_t shader; primitive_t quad; + assetmanagerholder_t owner; assetmanageritem_t *item; - scenemana } game_t; /** diff --git a/src/games/sandbox/CMakeLists.txt b/src/games/sandbox/CMakeLists.txt deleted file mode 100644 index f90af86c..00000000 --- a/src/games/sandbox/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2021 Dominic Msters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -add_compile_definitions( - GAME_NAME="Sandbox" - GAME_VERSION=1.0 -) - -tool_assets( - shader_textured - font_opensans - texture_test -) \ No newline at end of file diff --git a/src/games/sandbox/game.c b/src/games/sandbox/game.c deleted file mode 100644 index c4b30f69..00000000 --- a/src/games/sandbox/game.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2021 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#include "game.h" - -bool gameInit(game_t *game) { - // Init the engine and the rendering pipeline - engineInit(&game->engine); - - return true; -} - -bool gameUpdate(game_t *game, float delta) { - // Let the engine do its thing. - engineUpdateStart(&game->engine, delta); - - - // Hand back to the engine. - return engineUpdateEnd(&game->engine); -} - -void gameDispose(game_t *game) { - // Cleanup the game - - engineDispose(&game->engine); -} \ No newline at end of file diff --git a/src/games/sandbox/game.h b/src/games/sandbox/game.h deleted file mode 100644 index a628ee10..00000000 --- a/src/games/sandbox/game.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) 2021 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#pragma once -#include -#include - -typedef struct { - engine_t engine; -} game_t; - -/** - * Initializes the Dawn Game instance. - * - * @param game Game to instanciate. - * @return True if successful otherwise false. - */ -bool gameInit(game_t *game); - -/** - * Update the Dawn Game Instance. - * - * @param game Game to update. - * @param delta The delta of the game to tick by. - */ -bool gameUpdate(game_t *game, float delta); - -/** - * Cleanup the dawn game instance. - * - * @param game Game to dispose. - */ -void gameDispose(game_t *game); \ No newline at end of file diff --git a/src/libs.h b/src/libs.h index 82bd9332..55d3dd1b 100644 --- a/src/libs.h +++ b/src/libs.h @@ -7,7 +7,7 @@ // Static Libs #include // This will go eventually, this is just here to provide OpenGL Context -#include +// #include #include #include #include