diff options
| author | iamcheeseman <[email protected]> | 2026-05-11 13:05:17 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-05-11 13:05:17 -0400 |
| commit | 8a91b5adccbb24a17ff69e81d08f3e6dad4f9fda (patch) | |
| tree | c1ca776d7c45e861e033ea948cf938de772d06d2 /dc | |
| parent | 2c27120a61631dffd4527db8b1349379d53ccc3b (diff) | |
rotated iamges
Diffstat (limited to 'dc')
| -rw-r--r-- | dc/dc.c | 32 |
1 files changed, 26 insertions, 6 deletions
@@ -24,11 +24,19 @@ void tick(void) ty_draw_image( img, ty_vec2i( - SCREEN_WIDTH*0.5 + sin(ty_get_time() * 10) * 50 - (img.width*0.5), + SCREEN_WIDTH*0.5 + sin(ty_get_time()) * 50 - (img.width*0.5), SCREEN_HEIGHT*0.5 - (img.height*0.5) ) ); + ty_draw_image_rot( + img, + ty_vec2i(SCREEN_WIDTH/2, SCREEN_HEIGHT/2), + ty_vec2i(-img.width/2, -img.height/2), + TY_PI / 4 + //ty_get_time() + ); + ty_draw_text(&font, ty_vec2i(5, SCREEN_HEIGHT - 5 - 8), "hello, world!"); double frame_time = ty_get_time() - last_frame; @@ -74,6 +82,10 @@ void tick(void) ); y += 8; ty_draw_text(&font, ty_vec2i(5, y), + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + ); + y += 8; + ty_draw_text(&font, ty_vec2i(5, y), "0123456789" ); y += 8; @@ -84,6 +96,15 @@ void tick(void) ty_draw_text(&font, ty_vec2i(5, y), "^_`{}|~:;<>=? " ); + y += 8; + ty_draw_text(&font, ty_vec2i(5, y), + "THe_value = MY_arr[15]" + ); + y += 8; + ty_draw_text_fmt(&font, ty_vec2i(5, y), + "%.2g", + ty_get_time() + ); ty_draw_end(); @@ -128,12 +149,11 @@ int main(void) font_img.data + font_img.width * glyph_height * i ); + uint8_t c = *(uint8_t*)&font_chars[i]; - ty_font_add_glyph( - &font, - *(uint8_t*)&font_chars[i], - glyph - ); + ty_font_add_glyph(&font, c, glyph); + if (c >= 'a' && c <= 'z') + ty_font_add_glyph(&font, c - ('a' - 'A'), glyph); } while (ty_is_game_running()) { |
