#include "game.h" char* g_argv0; int main(int argc, char *argv[]) { g_argv0=argv[0]; //save // Create new game StcGame *game = createGame(); // Check if we got a valid game if (game) { // We got a valid game, therefore start the game int errorCode = gameInit(game); if (errorCode == GAME_ERROR_NONE) { // Loop until some error happens or the user quits while (game->errorCode == GAME_ERROR_NONE) { gameUpdate(game); } //Save error code and end game errorCode = game->errorCode; gameEnd(game); } //Free resources used by our game deleteGame(game); //Return to the system return errorCode; } // If we get here the game was not created return GAME_ERROR_NO_MEMORY; }