summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-06-22 20:30:38 -0400
committerrealtradam <[email protected]>2023-06-22 20:30:38 -0400
commitdd23de338c504b18ca1fe572772fd046096607eb (patch)
tree85ecf59dce42e997ea6d4ad46d897fb01e770337
parentea50dd94e98ef8df21e051872abf3c5cb52497b9 (diff)
downloadrodeo_sample_game-master.tar.gz
rodeo_sample_game-master.zip
m---------external/RodeoKit0
-rw-r--r--src/main.c21
2 files changed, 14 insertions, 7 deletions
diff --git a/external/RodeoKit b/external/RodeoKit
-Subproject a4aca2a3c3084882eb2a3912ef3f87e02153c74
+Subproject c322c17a69fc756b494124d4deab6909ee9134c
diff --git a/src/main.c b/src/main.c
index 247e50f..0148844 100644
--- a/src/main.c
+++ b/src/main.c
@@ -9,6 +9,15 @@ float time_var;
rodeo_audio_sound_t scratch = {0};
rodeo_audio_music_t music = {0};
+rodeo_gfx_camera_2d_t camera = {
+ .target = (rodeo_math_vec2_t){ .val.x = -640.0f/2, .val.y = -480.0f/2 },
+ //.target = (rodeo_math_vec2_t){ .val.x = 0, .val.y = 0 },
+ .turns = 0.0f,
+ .zoom = 1.0f,
+ //.offset = (rodeo_math_vec2_t){ .val.x = 0, .val.y = 0 }
+ .offset = (rodeo_math_vec2_t){ .val.x = -640.0f/2, .val.y = -480.0f/2 }
+};
+
typedef
struct
{
@@ -186,6 +195,8 @@ main_loop(void)
if(*(bool*)summon_units_input(NULL, NULL))
{
summon_units();
+ camera.turns += 0.05f;
+ /*
rodeo_gfx_matrix_push();
rodeo_gfx_matrix_set(
rodeo_math_mat4_translate(
@@ -193,12 +204,7 @@ main_loop(void)
(rodeo_math_vec3_t){ .raw = { 1, 1, 0 } }
)
);
- rodeo_log(
- rodeo_logLevel_info,
- "%i / %i",
- rodeo_gfx_matrix_size(),
- rodeo_gfx_matrix_capacity()
- );
+ */
}
rodeo_rectangle_t scissor = {
@@ -208,7 +214,8 @@ main_loop(void)
.height = 150
};
- mrodeo_gfx_scissor_do(scissor)
+ //mrodeo_gfx_scissor_do(scissor)
+ mrodeo_gfx_camera_do(camera)
{
rodeo_gfx_rectangle_draw(
(rodeo_rectangle_t){ 100, 100, 50, 50 },