blob: 5af031d9fa92083a5b5b5ae853f9af36aeb64e69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#include "TZR.h"
#include "font.h"
#include "dialog.h"
static int init(void);
static void deinit(void);
int main(int argc, char **argv)
{
(void)argc, (void)argv;
if (init()) {
printf("init failed\n");
deinit();
return 1;
}
if (atexit(deinit)) {
printf("atexit failed\n");
deinit();
return 1;
}
dialog_set("yo Rboi\nByou WcoolR!");
while (!TZR_ShouldQuit()) {
TZR_CycleEvents();
dialog_update();
TZR_DrawBegin();
TZR_DrawSetColor(0, 0, 0, 1);
TZR_DrawClear();
dialog_draw();
TZR_DrawEnd();
}
return 0;
}
static int init(void)
{
if (TZR_Init(.pixel_perfect=false, .title="7DRL 2023"))
return 1;
if (font_init("res/font.png"))
return 1;
return 0;
}
static void deinit(void)
{
TZR_Quit();
}
|