Files
dusk/archive/dusksdl2/main.c
2025-08-20 19:18:38 -05:00

35 lines
586 B
C

/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "display/render.h"
#include "game.h"
#include "input.h"
#define mainError(ret) \
if((ret).code != ERROR_OK) { \
errorPrint(ret); \
return (ret).code; \
}
int main(int argc, char *argv[]) {
errorret_t ret;
mainError(renderInit());
gameInit();
while(RENDER_RUNNING) {
gameUpdate();
mainError(renderDraw());
if(!GAME.running) break;
}
gameDispose();
mainError(renderDispose());
return 0;
}