34 lines
644 B
C
34 lines
644 B
C
#pragma once
|
|
#include <stdbool.h>
|
|
#include "../display/render.h"
|
|
|
|
/** Information about the current game context. */
|
|
typedef struct {
|
|
/** Renderer for the game */
|
|
render_t *render;
|
|
} game_t;
|
|
|
|
/**
|
|
* Initialize the game context.
|
|
*
|
|
* @param gameName Name of the game being initialized.
|
|
* @return The game instance context.
|
|
*/
|
|
game_t * gameInit(char *gameName);
|
|
|
|
/**
|
|
* Start the main game loop.
|
|
*
|
|
* @param game The game to start the loop for.
|
|
*/
|
|
void gameStart(game_t *game);
|
|
|
|
/**
|
|
* Cleanup a previously constructed.
|
|
*
|
|
* @param game The game to cleanup.
|
|
* @return True if successful or not.
|
|
*/
|
|
bool gameDispose(game_t *game);
|
|
|