aboutsummaryrefslogtreecommitdiff
path: root/dc/dc.c
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-10 00:28:14 -0400
committeriamcheeseman <[email protected]>2026-05-10 00:28:14 -0400
commit576bd27e11ec70bdbd1b9a644d2e227b57586337 (patch)
tree2dc41e3f88bb95568f73ee372fc35512afcbcf9b /dc/dc.c
parent9ed5698b3c74c7ce1784d3bebe2aa73d5a0c319d (diff)
i ain't splitting alla this up
Diffstat (limited to 'dc/dc.c')
-rw-r--r--dc/dc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/dc/dc.c b/dc/dc.c
index a3bfafe..acb1e74 100644
--- a/dc/dc.c
+++ b/dc/dc.c
@@ -14,10 +14,10 @@
int main(void)
{
- struct ty_creation_hints hints = {
- .win_width = SCREEN_WIDTH,
- .win_height = SCREEN_HEIGHT,
- .win_title = "Demonchime",
+ struct ty_hints hints = {
+ .scr_width = SCREEN_WIDTH,
+ .scr_height = SCREEN_HEIGHT,
+ .game_title = "Demonchime",
.ticrate = 30,
};
ty_init(hints);
@@ -30,6 +30,8 @@ int main(void)
free(data);
while (ty_is_game_running()) {
+ clock_t start = clock();
+
ty_draw_clear(TY_COLOR_BLACK);
for (int y = 0; y < SCREEN_HEIGHT; y += 16) {
@@ -75,6 +77,8 @@ int main(void)
ty_tick();
ty_sleep(1000 / hints.ticrate);
+
+ ty_log_info("%g ms", (float)(clock() - start) / CLOCKS_PER_SEC);
}
ty_free_image(img);