From: hgn Date: Wed, 7 May 2025 01:08:31 +0000 (+0100) Subject: blubber 1 X-Git-Url: https://skaterift.com/git/?a=commitdiff_plain;h=e995ca9de007cc5dbd978b3cbd86846609af0a23;p=carveJwlIkooP6JGAAIwe30JlM.git blubber 1 --- diff --git a/content_skaterift/maps/dev_hub/main.mdl b/content_skaterift/maps/dev_hub/main.mdl index 2baa0f7..0120137 100644 Binary files a/content_skaterift/maps/dev_hub/main.mdl and b/content_skaterift/maps/dev_hub/main.mdl differ diff --git a/content_skaterift/maps/dev_tutorial/main.mdl b/content_skaterift/maps/dev_tutorial/main.mdl index 79f458a..2765056 100644 Binary files a/content_skaterift/maps/dev_tutorial/main.mdl and b/content_skaterift/maps/dev_tutorial/main.mdl differ diff --git a/src/menu.c b/src/menu.c index fdf28f5..7c3a5b6 100644 --- a/src/menu.c +++ b/src/menu.c @@ -962,7 +962,7 @@ void menu_gui( ui_context *ctx ) else if( menu.page == k_menu_page_cutscene ) { i32 R = menu_nav( &menu.cs_row, mh, 1 ); - ui_rect panel = { 0,0, 600, 300 }, + ui_rect panel = { 0,0, 600, 160 }, screen = { 0,0, vg.window_x,vg.window_y }; ui_rect_center( screen, panel ); ui_fill( ctx, panel, ui_opacity( GUI_COL_DARK, 0.35f ) ); diff --git a/src/npc_gino.c b/src/npc_gino.c index a924c5e..11f6706 100644 --- a/src/npc_gino.c +++ b/src/npc_gino.c @@ -33,6 +33,17 @@ struct } _gino; +void _npc_gino_reset(void) +{ + _gino.state = k_gino_none; + _gino.sub_state = k_gino_sub_off; + _gino.spark_t = 0.0f; + _gino.sub_index = 0; + _gino.subtitles = NULL; + _gino.uid = 0; + _gino.command_t = 0.0; +} + void _npc_gino_speech( const cs_subtitle *subs ) { _gino.subtitles = subs; @@ -43,8 +54,6 @@ void _npc_gino_goto( v3f pos, i32 uid ) if( _gino.uid == uid ) return; - _gino.uid = uid; - _gino.state = k_gino_intro; v3_copy( pos, _gino.p1 ); if( _gino.state == k_gino_none ) @@ -52,6 +61,8 @@ void _npc_gino_goto( v3f pos, i32 uid ) else v3_copy( _gino.co, _gino.p0 ); + _gino.uid = uid; + _gino.state = k_gino_intro; _gino.command_t = vg.time; } @@ -86,7 +97,7 @@ void _npc_gino_preupdate(void) } else { - if( (_gino.sub_state != k_gino_sub_read) && button_down( k_srbind_maccept ) ) + if( (_gino.sub_state != k_gino_sub_read) && button_down( k_srbind_maccept ) && _gino.subtitles ) { srinput.state = k_input_state_resume; if( _gino.sub_state == k_gino_sub_reading ) @@ -174,7 +185,7 @@ void _npc_gino_preupdate(void) r = 0.43f; pos[0] += sinf( a ) * r; pos[2] += cosf( a ) * r; - particle_spawn_cone( &particles_grind, pos, (v3f){0,-1,0}, VG_PIf/2.0f, 2, 4.0f, 0xffEC705A ); + particle_spawn_cone( &particles_grind, pos, (v3f){0,-1,0}, VG_PIf/2.0f, 2, 4.0f, 0xffffffff ); } else _gino.spark_t -= vg.time_delta; diff --git a/src/npc_gino.h b/src/npc_gino.h index 8cbe7c3..00bdfed 100644 --- a/src/npc_gino.h +++ b/src/npc_gino.h @@ -6,3 +6,4 @@ void _npc_gino_goto( v3f pos, i32 uid ); void _npc_gino_preupdate(void); void _npc_gino_imgui( ui_context *ctx ); void _npc_gino_speech( const cs_subtitle *subs ); +void _npc_gino_reset(void); diff --git a/src/scripts/hub.c b/src/scripts/hub.c index 6d28fec..24afdff 100644 --- a/src/scripts/hub.c +++ b/src/scripts/hub.c @@ -138,3 +138,80 @@ static bool _skaterift_script_unlock_valley( ent_script_event *event ) _hub_blocker_template( event, "unlock_valley", "unlock_valley_view" ); return 1; } + +static bool _skaterift_script_gino_hub( ent_script_event *event ) +{ + if( on_function_trigger( event, 0 ) ) + { + if( _skaterift_script_nugget_status( "unlock_mtzero" ) ) + { + static const cs_subtitle EN[] = + { + { "a1", KCOL_JESUS "It's clear now" }, + { NULL, NULL }, + }; + _npc_gino_speech( EN ); + _skaterift_script_gino_send( event, 0 ); + } + else + { + static const cs_subtitle EN[] = + { + { "a1", KCOL_JESUS "Someone put boxes here.." }, + { "a2", KCOL_JESUS "Stuff to do at the volcano.." }, + { NULL, NULL }, + }; + + _npc_gino_speech( EN ); + _skaterift_script_gino_send( event, 0 ); + } + } + + if( on_function_trigger( event, 1 ) ) + { + if( _skaterift_script_nugget_status( "unlock_city" ) ) + { + static const cs_subtitle EN[] = + { + { "a1", KCOL_JESUS "Cool" }, + { NULL, NULL }, + }; + _npc_gino_speech( EN ); + _skaterift_script_gino_send( event, 1 ); + } + else + { + static const cs_subtitle EN[] = + { + { "a1", KCOL_JESUS "Again with the boxes!" }, + { "a2", KCOL_JESUS "Who is doing that?" }, + { NULL, NULL }, + }; + + _npc_gino_speech( EN ); + _skaterift_script_gino_send( event, 1 ); + } + } + + if( on_function_trigger( event, 2 ) ) + { + if( _skaterift_script_nugget_status( "unlock_valley" ) ) + { + _npc_gino_speech( NULL ); + _skaterift_script_gino_send( event, 2 ); + } + else + { + static const cs_subtitle EN[] = + { + { "a1", KCOL_JESUS "..." }, + { "a2", KCOL_JESUS "You know what to do..." }, + { NULL, NULL }, + }; + + _npc_gino_speech( EN ); + _skaterift_script_gino_send( event, 2 ); + } + } + return 1; +} diff --git a/src/scripts/tutorial_island.c b/src/scripts/tutorial_island.c index 317759b..c0b9bcb 100644 --- a/src/scripts/tutorial_island.c +++ b/src/scripts/tutorial_island.c @@ -32,13 +32,9 @@ static bool _skaterift_script_unlock_docks( ent_script_event *event ) }; generic_cutscene_wrapper( &cutscene, event ); - if( on_function_trigger( event, 1 ) ) - { - vg_error( "Show required objectives here\n" ); - } - if( on_function_trigger( event, 2 ) ) { + _skaterift_script_nugget_set( "ch1s6a_view", 2 ); if( on_nugget_once( event, "unlock_docks_view" ) ) { play_generic_cutscene( event ); @@ -193,7 +189,7 @@ static bool _skaterift_script_ch1s6a( ent_script_event *event ) .freeze_player = 1, .subtitles = EN, }; - enum generic_cutscene_event cs_event = optional_video_wrapper( &cutscene, "ch1s6a_view", 0, event ); + enum generic_cutscene_event cs_event = optional_video_wrapper( &cutscene, "ch1s6a_view", 2, event ); if( cs_event == k_generic_cutscene_event_start ) { @@ -207,3 +203,34 @@ static bool _skaterift_script_ch1s6a( ent_script_event *event ) return 1; } + +static bool _skaterift_script_gino_volc( ent_script_event *event ) +{ + if( on_function_trigger( event, 0 ) ) + { + if( _skaterift_script_nugget_status( "unlock_docks_view" ) ) + { + static const cs_subtitle EN[] = + { + { "a1", KCOL_JESUS "Off to mt.zero at last!" }, + { NULL, NULL }, + }; + _npc_gino_speech( EN ); + _skaterift_script_gino_send( event, 0 ); + } + else + { + static const cs_subtitle EN[] = + { + { "a1", KCOL_JESUS "This leads down to the docks" }, + { "a2", KCOL_JESUS "JC won't let us leave until we did his tasks" }, + { NULL, NULL }, + }; + + _npc_gino_speech( EN ); + _skaterift_script_gino_send( event, 0 ); + } + } + + return 1; +} diff --git a/src/skaterift_script.c b/src/skaterift_script.c index 7c5a697..8cc804a 100644 --- a/src/skaterift_script.c +++ b/src/skaterift_script.c @@ -711,6 +711,8 @@ struct ent_script_table_entry _ent_script_table[] = { "intro", _skaterift_script_intro }, { "gino.intro", _skaterift_script_gino_intro }, + { "gino.hub", _skaterift_script_gino_hub }, + { "gino.volc", _skaterift_script_gino_volc }, { "hub", _skaterift_script_hub }, { "tutorial_island", _skaterift_script_tutorial_island }, diff --git a/src/world_load.c b/src/world_load.c index c590c14..d2c75b3 100644 --- a/src/world_load.c +++ b/src/world_load.c @@ -486,6 +486,7 @@ void skaterift_load_world_start( addon_id addon_id, bool preview ) _world.event = k_world_event_none; player__clear_world_dependent_variables(); relink_all_remote_player_worlds(); + _npc_gino_reset(); vg_loader_set_user_information( "Saving current world" ); } else diff --git a/src/world_map.c b/src/world_map.c index 588d203..300816f 100644 --- a/src/world_map.c +++ b/src/world_map.c @@ -230,8 +230,8 @@ void render_world_map(void) if( challenge->status ) respawn_map_draw_icon( &world_map.final_cam, k_gui_icon_tick2, challenge->transform.co, scale ); - else - respawn_map_draw_icon( &world_map.final_cam, k_gui_icon_tick1, challenge->transform.co, scale ); + //else + // respawn_map_draw_icon( &world_map.final_cam, k_gui_icon_tick1, challenge->transform.co, scale ); } for( u32 i=0; ient_marker); i ++ )