diff options
| author | realtradam <[email protected]> | 2023-06-22 20:30:38 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-06-22 20:30:38 -0400 |
| commit | dd23de338c504b18ca1fe572772fd046096607eb (patch) | |
| tree | 85ecf59dce42e997ea6d4ad46d897fb01e770337 /src | |
| parent | ea50dd94e98ef8df21e051872abf3c5cb52497b9 (diff) | |
| download | rodeo_sample_game-dd23de338c504b18ca1fe572772fd046096607eb.tar.gz rodeo_sample_game-dd23de338c504b18ca1fe572772fd046096607eb.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -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 }, |
