34 lines
715 B
C
34 lines
715 B
C
/**
|
|
* 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);
|
|
|
|
// Send off to the game instance
|
|
return GAME_INIT(game);
|
|
}
|
|
|
|
bool gameUpdate(game_t *game, float platformDelta) {
|
|
// Let the engine do its thing.
|
|
engineUpdateStart(&game->engine, platformDelta);
|
|
|
|
// Hand off to the game to update
|
|
GAME_UPDATE(game);
|
|
|
|
// Hand back to the engine.
|
|
return engineUpdateEnd(&game->engine);
|
|
}
|
|
|
|
void gameDispose(game_t *game) {
|
|
// Cleanup the game
|
|
GAME_DISPOSE(game);
|
|
|
|
engineDispose(&game->engine);
|
|
} |