Dawn/src/game/game.c

71 lines
1.7 KiB
C

/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "game.h"
game_t GAME_STATE;
bool gameInit(game_t *game) {
// Init the game
game->name = GAME_NAME;
engineInit(&game->engine, game);
// Init
// gameTimeInit();
// renderInit();
// inputInit();
// // Load the world shader.
// GAME_STATE.shaderWorld = assetShaderLoad(
// "shaders/textured.vert", "shaders/textured.frag"
// );
// // Font
// GAME_STATE.fontTexture = assetTextureLoad("font.png");
// GAME_STATE.fontTileset = tilesetCreate(20, 20,
// GAME_STATE.fontTexture->width,
// GAME_STATE.fontTexture->height,
// 1, 1, 1, 1
// );
// GAME_STATE.fontBatch = spriteBatchCreate(1024);
// // Prepare the renderer.
// pokerInit(&GAME_STATE.poker);
// holdemRenderFrameInit();
// holdemRenderWorldInit();
// holdemRenderPlayerInit();
// holdemRenderCardInit();
// holdemRenderChipInit();
// Init the input manger.
return true;
}
bool gameUpdate(game_t *game, float platformDelta) {
engineUpdateStart(&game->engine, game, platformDelta);
engineUpdateEnd(&game->engine, game);
// shaderUse(GAME_STATE.shaderWorld);// TODO: remove
// // Update the frame buffers and action queue
// holdemRenderFrameUpdate();
// pokerActionUpdate();
// // Render things on each frame, then render those frames.
// holdemRenderFrameUseLeft();
// holdemRenderWorld();
// holdemRenderFrameUseRight();
// holdemRenderWorld();
// holdemRenderFrameBack();
}
void gameDispose(game_t *game) {
engineDispose(&game->engine, game);
// pokerActionDispose();
// shaderDispose(GAME_STATE.shaderWorld);
}