summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..cea5f76
--- /dev/null
+++ b/main.c
@@ -0,0 +1,25 @@
+#include "TZR.h"
+
+int main(int argc, char **argv)
+{
+ (void)argc, (void)argv;
+
+ if (TZR_Init(.target_fps=30, .pixel_perfect=false, .title="7DRL 2023"))
+ return 1;
+ if (atexit(TZR_Quit)) {
+ printf("atexit failed\n");
+ TZR_Quit();
+ return 1;
+ }
+
+ while (!TZR_ShouldQuit()) {
+ TZR_CycleEvents();
+
+ TZR_DrawBegin();
+ TZR_DrawSetColor(0, 0, 0, 1);
+ TZR_DrawClear();
+ TZR_DrawEnd();
+ }
+
+ return 0;
+}