aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-19 07:04:21 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-19 07:04:21 +0200
commit3bdf82eec2c915e91ae487e29d72639f9efcad67 (patch)
treec61476e241f75e71959394d82aa3ff9c343febbb /tests
parent4a96d4a354fbde7fd614075c060aea78a3411b42 (diff)
Use uint8_t for color instead of float
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/main.c b/tests/main.c
index 5841924..38a0931 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -17,7 +17,7 @@ static void draw(mgl_window *window, void *userdata) {
Userdata *u = userdata;
mgl_rectangle rect = {
- .color = { 1.0f, 0.0f, 0.0f, 1.0f },
+ .color = { 255, 0, 0, 255 },
.position = { window->cursor_position.x, window->cursor_position.y },
.size = { 100.0f, 500.0f }
};
@@ -25,7 +25,7 @@ static void draw(mgl_window *window, void *userdata) {
mgl_sprite sprite;
mgl_sprite_init(&sprite, u->texture, 100.0f - 10.0f, 0.0f);
- mgl_sprite_set_color(&sprite, (mgl_color){1.0f, 1.0f, 1.0f, 0.5f});
+ mgl_sprite_set_color(&sprite, (mgl_color){255, 255, 255, 128});
mgl_sprite_draw(context, &sprite);
mgl_text text;