blubber 1 master
authorhgn <hgodden00@gmail.com>
Wed, 7 May 2025 01:08:31 +0000 (02:08 +0100)
committerhgn <hgodden00@gmail.com>
Wed, 7 May 2025 01:08:31 +0000 (02:08 +0100)
content_skaterift/maps/dev_hub/main.mdl
content_skaterift/maps/dev_tutorial/main.mdl
src/menu.c
src/npc_gino.c
src/npc_gino.h
src/scripts/hub.c
src/scripts/tutorial_island.c
src/skaterift_script.c
src/world_load.c
src/world_map.c

index 2baa0f7143ccfcb54affe300ffd46c66c4ac4622..01201377bf97b60e8727b99e0094d0d17b628fac 100644 (file)
Binary files a/content_skaterift/maps/dev_hub/main.mdl and b/content_skaterift/maps/dev_hub/main.mdl differ
index 79f458a2f7bfe37867bfa6ce1049392399ba1343..2765056846aa4afecdb2003348a2f331c94c5cb1 100644 (file)
Binary files a/content_skaterift/maps/dev_tutorial/main.mdl and b/content_skaterift/maps/dev_tutorial/main.mdl differ
index fdf28f59e3eeded56fc5dbe47a172cf38be48aa3..7c3a5b60c3973b8eebbaad1a84e376eca1b4f415 100644 (file)
@@ -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 );
    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 ) );
               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 ) );
index a924c5e14dfa6e9b85c8e6acf7962267cf129bb9..11f6706d2758da6fbc669be77f7f375c809ad0a0 100644 (file)
@@ -33,6 +33,17 @@ struct
 }
 _gino;
 
 }
 _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;
 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;
 
    if( _gino.uid == uid )
       return;
 
-   _gino.uid = uid;
-   _gino.state = k_gino_intro;
    v3_copy( pos, _gino.p1 );
 
    if( _gino.state == k_gino_none )
    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 );
 
    else
       v3_copy( _gino.co, _gino.p0 );
 
+   _gino.uid = uid;
+   _gino.state = k_gino_intro;
    _gino.command_t = vg.time;
 }
 
    _gino.command_t = vg.time;
 }
 
@@ -86,7 +97,7 @@ void _npc_gino_preupdate(void)
       }
       else
       {
       }
       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 )
          {
             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;
              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;
       }
       else
          _gino.spark_t -= vg.time_delta;
index 8cbe7c36177753a950b242523ebd50649b14c0c4..00bdfedf64135d623ad936a29e8fef8531d936b1 100644 (file)
@@ -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_preupdate(void);
 void _npc_gino_imgui( ui_context *ctx );
 void _npc_gino_speech( const cs_subtitle *subs );
+void _npc_gino_reset(void);
index 6d28fecfcf899e9a052f1ff4d07e535e901263d6..24afdffdecd21a66cd02ab07985a522d4a32894a 100644 (file)
@@ -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;
 }
    _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;
+}
index 317759b3eab0aeb1c80274d993e71652c23df024..c0b9bcb824727515944bb08881fa9fe5b93b5a3a 100644 (file)
@@ -32,13 +32,9 @@ static bool _skaterift_script_unlock_docks( ent_script_event *event )
    };
    generic_cutscene_wrapper( &cutscene, 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 ) )
    {
    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 );
       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,
    };
       .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 )
    {
 
    if( cs_event == k_generic_cutscene_event_start )
    {
@@ -207,3 +203,34 @@ static bool _skaterift_script_ch1s6a( ent_script_event *event )
 
    return 1;
 }
 
    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;
+}
index 7c5a69770f239a3e53933c206b54bb75863c4833..8cc804a3d6f3287ee1bf1920bd9ff0fd210e29d7 100644 (file)
@@ -711,6 +711,8 @@ struct ent_script_table_entry _ent_script_table[] =
 
    { "intro", _skaterift_script_intro },
    { "gino.intro", _skaterift_script_gino_intro },
 
    { "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 },
    { "hub", _skaterift_script_hub },
 
    { "tutorial_island", _skaterift_script_tutorial_island },
index c590c14aba1d809f36b40ca2292546a2fa9d418b..d2c75b3691f9c19cae1e960c06a69277610cf538 100644 (file)
@@ -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();
       _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
       vg_loader_set_user_information( "Saving current world" );
    }
    else
index 588d2037ee417e908cae3c738ce646806652700c..300816ff4153ad1ea8c7304058226e8c634ee556 100644 (file)
@@ -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 );
 
          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; i<af_arrcount(&world->ent_marker); i ++ )
       }
 
       for( u32 i=0; i<af_arrcount(&world->ent_marker); i ++ )