From ea50dd94e98ef8df21e051872abf3c5cb52497b9 Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 22 Jun 2023 18:10:42 -0400 Subject: . --- external/RodeoKit | 2 +- src/main.c | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/external/RodeoKit b/external/RodeoKit index ed248e6..a4aca2a 160000 --- a/external/RodeoKit +++ b/external/RodeoKit @@ -1 +1 @@ -Subproject commit ed248e655236699bdeae473a602b2c74b2f47fa7 +Subproject commit a4aca2a3c3084882eb2a3912ef3f87e02153c74a diff --git a/src/main.c b/src/main.c index ecb17fc..247e50f 100644 --- a/src/main.c +++ b/src/main.c @@ -186,16 +186,21 @@ main_loop(void) if(*(bool*)summon_units_input(NULL, NULL)) { summon_units(); + rodeo_gfx_matrix_push(); + rodeo_gfx_matrix_set( + rodeo_math_mat4_translate( + rodeo_gfx_matrix_get(), + (rodeo_math_vec3_t){ .raw = { 1, 1, 0 } } + ) + ); + rodeo_log( + rodeo_logLevel_info, + "%i / %i", + rodeo_gfx_matrix_size(), + rodeo_gfx_matrix_capacity() + ); } - rodeo_log( - rodeo_logLevel_warning, - "%f, %f", - (float)*(int64_t*)mouse_x_input(NULL,NULL) - (150.0f / 2.0f), - (float)*(int64_t*)mouse_y_input(NULL,NULL) - (150.0f / 2.0f) - ); - - rodeo_rectangle_t scissor = { .x = (float)*(int64_t*)mouse_x_input(NULL,NULL) - (150.0f / 2.0f), .y = (float)*(int64_t*)mouse_y_input(NULL,NULL) - (150.0f / 2.0f), @@ -309,7 +314,7 @@ main_loop(void) rodeo_gfx_texture_2d_draw( (rodeo_rectangle_t){ .x = (float)(int32_t)summon_position.x - (orc_size[0] / 2.0f), - .y = (float)(int32_t)summon_position.y - (orc_size[1] / 2.0f) , + .y = (float)(int32_t)summon_position.y - (orc_size[1] / 2.0f), .width = orc_size[0], .height = orc_size[1], }, -- cgit v1.2.3