aboutsummaryrefslogtreecommitdiff
path: root/dc
diff options
context:
space:
mode:
Diffstat (limited to 'dc')
-rw-r--r--dc/dc.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/dc/dc.c b/dc/dc.c
index b0e7b60..adecb4e 100644
--- a/dc/dc.c
+++ b/dc/dc.c
@@ -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()) {