Mercurial > public > algo-animator
diff utils.c @ 7:f159eec07daf
refactor
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Fri, 23 Jun 2023 10:01:37 +0100 |
parents | 40a8bdbe2005 |
children | f7af7255705e |
line wrap: on
line diff
--- a/utils.c Tue Jun 13 18:37:23 2023 +0100 +++ b/utils.c Fri Jun 23 10:01:37 2023 +0100 @@ -1,23 +1,6 @@ #include "utils.h" -void render_text(const char *text, float x, float y) { - glRasterPos2f(x, y); - - for (const char *c = text; *c; ++c) { - glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, *c); - } -} - - int random_int(int min, int max) { return rand() % ((max - min) + 1) + min; } - - -void draw_rectangle(int x_position, int rect_height, int rect_width, int window_height) { - glVertex2f(x_position, window_height - 100); - glVertex2f(x_position + rect_width, window_height - 100); - glVertex2f(x_position + rect_width, rect_height); - glVertex2d(x_position, rect_height); -}