46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
/**
|
|
* Copyright (c) 2021 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include <dawn/dawn.h>
|
|
#include "../input/input.h"
|
|
#include "../epoch/epoch.h"
|
|
#include "../display/render.h"
|
|
|
|
/**
|
|
* Initializes the provided engine. This will initialize all of the various
|
|
* managers for the game to use.
|
|
*
|
|
* @param engine Engine to initialize.
|
|
* @param game Game that intiialized this engine.
|
|
*/
|
|
void engineInit(engine_t *engine, game_t *game);// TODO: This needs to return valid state.
|
|
|
|
/**
|
|
* Updates the given engine at the start of a frame.
|
|
*
|
|
* @param engine Engine that is being updated
|
|
* @param game Game that initialized the engine update
|
|
* @param delta Delta tick provided by the game's platform.
|
|
*/
|
|
void engineUpdateStart(engine_t *engine, game_t *game, float delta);
|
|
|
|
/**
|
|
* Updates the given engine at the end of a frame.
|
|
*
|
|
* @param engine Engine to update.
|
|
* @param game Game that called this update.
|
|
*/
|
|
bool engineUpdateEnd(engine_t *engine, game_t *game);
|
|
|
|
/**
|
|
* Cleanup the engine context.
|
|
*
|
|
* @param engine Engine to clean up.
|
|
* @param game Game that initialized the cleanup.
|
|
*/
|
|
void engineDispose(engine_t *engine, game_t *game); |