From: hgn Date: Wed, 10 Apr 2024 23:53:16 +0000 (+0100) Subject: update overlay to have ps controls too X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=3fad4b17d422d9542e820b816be01207999f4a03;hp=053a57cf4d1543e304b3fd99e8cb0b8d994792eb;p=carveJwlIkooP6JGAAIwe30JlM.git update overlay to have ps controls too --- diff --git a/control_overlay.c b/control_overlay.c index f0b7a9a..a39d77b 100644 --- a/control_overlay.c +++ b/control_overlay.c @@ -276,6 +276,14 @@ void control_overlay_render(void) press_dpad_w = 0, press_dpad_e = 0, press_dpad_n = 0, press_dpad_s = 0, press_menu = 0, press_back = 0; + bool is_ps = 0; + if( (vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS3) || + (vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS4) || + (vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS5) ) + { + is_ps = 1; + } + vg_exec_input_program( k_vg_input_type_button_u8, (vg_input_op[]){ vg_joy_button, SDL_CONTROLLER_BUTTON_A, vg_end }, &press_a ); @@ -324,7 +332,9 @@ void control_overlay_render(void) { colorize( 0, 0 ); } - render_overlay_mesh( press_b? ov_b_down: ov_b ); + + if( is_ps ) render_overlay_mesh( press_b? ov_b_down_ps: ov_b_ps ); + else render_overlay_mesh( press_b? ov_b_down: ov_b ); /* Y / SKATE / WALK / GLIDE */ @@ -355,7 +365,9 @@ void control_overlay_render(void) } else colorize( 0, 0 ); - render_overlay_mesh( press_y? ov_y_down: ov_y ); + + if( is_ps ) render_overlay_mesh( press_y? ov_y_down_ps: ov_y_ps ); + else render_overlay_mesh( press_y? ov_y_down: ov_y ); /* X / TREFLIP */ if( subsytem == k_player_subsystem_skate ) @@ -365,7 +377,9 @@ void control_overlay_render(void) } else colorize( press_x, 0 ); - render_overlay_mesh( press_x? ov_x_down: ov_x ); + + if( is_ps ) render_overlay_mesh( press_x? ov_x_down_ps: ov_x_ps ); + else render_overlay_mesh( press_x? ov_x_down: ov_x ); /* A / JUMP / SHUVIT */ if( subsytem == k_player_subsystem_skate ) @@ -381,7 +395,9 @@ void control_overlay_render(void) colorize( press_a, !in_air ); render_overlay_mesh( ov_text_a_jump_mid ); } - render_overlay_mesh( press_a? ov_a_down: ov_a ); + + if( is_ps ) render_overlay_mesh( press_a? ov_a_down_ps: ov_a_ps ); + else render_overlay_mesh( press_a? ov_a_down: ov_a ); /* JUMP CHARGE */ if( subsytem == k_player_subsystem_skate ) diff --git a/models_src/rs_overlay.mdl b/models_src/rs_overlay.mdl index 7c89d41..96c6a96 100644 Binary files a/models_src/rs_overlay.mdl and b/models_src/rs_overlay.mdl differ