diff options
Diffstat (limited to 'dc/dc.c')
| -rw-r--r-- | dc/dc.c | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -28,21 +28,15 @@ int main(void) ty_log_fatal(TY_ERR_IO, "Failed to read image"); struct ty_image img = ty_create_image(desc.width, desc.height, data); free(data); - + while (ty_is_game_running()) { ty_draw_clear(TY_COLOR_BLACK); - ty_draw_image_ex( - img, - (struct ty_recti){ - 0, 0, - img.width, img.height, - }, - (struct ty_recti){ - 0, 0, - SCREEN_WIDTH, SCREEN_HEIGHT, + for (int y = 0; y < SCREEN_HEIGHT; y += 16) { + for (int x = 0; x < SCREEN_WIDTH; x += 16) { + ty_draw_image(img, ty_vec2i(x, y)); } - ); + } ty_draw_rect( (struct ty_recti){ |
