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 ) );
}
_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;
if( _gino.uid == uid )
return;
- _gino.uid = uid;
- _gino.state = k_gino_intro;
v3_copy( pos, _gino.p1 );
if( _gino.state == k_gino_none )
else
v3_copy( _gino.co, _gino.p0 );
+ _gino.uid = uid;
+ _gino.state = k_gino_intro;
_gino.command_t = vg.time;
}
}
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 )
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;
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);
_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;
+}
};
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 );
.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 )
{
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;
+}
{ "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 },
_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
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 ++ )