46 lines
986 B
C
46 lines
986 B
C
/**
|
|
* Copyright (c) 2021 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "../../libs.h"
|
|
#include "../../engine/engine.h"
|
|
#include "../../display/primitive/primitive.h"
|
|
#include "../../display/primitive/quad.h"
|
|
#include "../../display/primitive/cube.h"
|
|
#include "../../display/shader.h"
|
|
|
|
typedef struct {
|
|
engine_t engine;
|
|
camera_t camera;
|
|
shader_t shader;
|
|
primitive_t quad;
|
|
assetmanagerowner_t owner;
|
|
assetmanageritem_t *item;
|
|
} 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); |