archivemuh
This commit is contained in:
35
archive/dusksdl2/main.c
Normal file
35
archive/dusksdl2/main.c
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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;
|
||||
}
|
Reference in New Issue
Block a user