diff options
| author | iamcheeseman <[email protected]> | 2026-05-10 00:28:14 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-05-10 00:28:14 -0400 |
| commit | 576bd27e11ec70bdbd1b9a644d2e227b57586337 (patch) | |
| tree | 2dc41e3f88bb95568f73ee372fc35512afcbcf9b /dc | |
| parent | 9ed5698b3c74c7ce1784d3bebe2aa73d5a0c319d (diff) | |
i ain't splitting alla this up
Diffstat (limited to 'dc')
| -rw-r--r-- | dc/dc.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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); |
