This commit is contained in:
2022-02-27 08:45:11 -08:00
parent 7d101dab55
commit cb6f9eaaa9
7 changed files with 4 additions and 86 deletions

View File

@ -10,7 +10,7 @@ target_link_libraries(${PROJECT_NAME}
glad
cglm
stb
duktape
# duktape
)
target_include_directories(${PROJECT_NAME}

View File

@ -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 */

View File

@ -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;
/**

View File

@ -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
)

View File

@ -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);
}

View File

@ -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 <dawn/libs.h>
#include <dawn/engine/engine.h>
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);

View File

@ -7,7 +7,7 @@
// Static Libs
#include <glad/glad.h>// This will go eventually, this is just here to provide OpenGL Context
#include <duktape.h>
// #include <duktape.h>
#include <cglm/cglm.h>
#include <stb_image.h>
#include <stb_truetype.h>