--- /dev/null
+static bool _skaterift_script_ch2s1( ent_script_event *event )
+{
+ static const struct cs_subtitle EN[] =
+ {
+ { "j1", KCOL_JOHN "Eughhh boy" },
+ { "j2", KCOL_JOHN "When we get off this thing I gotta go lay down for a bit" },
+ { "j3", KCOL_JOHN "Oh look" },
+ { "j4", KCOL_JOHN "There's Mike over there" },
+ { "j5", KCOL_JOHN "HELLO MIKE!" },
+ { "j7", KCOL_JOHN "Yeah listen.." },
+ { "j8", KCOL_JOHN "I know things are a bit weird at the moment" },
+ { "j9", KCOL_JOHN "but it'l make sense soon" },
+ { "j10", KCOL_JOHN "I garuntee it" },
+ { "j11", KCOL_JOHN "50%% probably garuntee it" },
+ { "j12", KCOL_JOHN "I need you to go on, keep on setting some time trials here" },
+ { "j13", KCOL_JOHN "We're gonna need your speed later" },
+ { "j14", KCOL_JOHN "Its.. Why I picked you." },
+ { NULL, NULL },
+ };
+ static const struct generic_cutscene cutscene =
+ {
+ .metascene_path = "metascenes/ch2s1.ms",
+ .freeze_player = 1,
+ .subtitles = EN,
+ };
+ generic_cutscene_wrapper( &cutscene, event );
+
+ if( on_nugget_once( event, "ch2s1_view" ) )
+ {
+ play_generic_cutscene( event );
+ }
+
+ return 1;
+}
+
+static bool _skaterift_script_ch2s2( ent_script_event *event )
+{
+ static const struct cs_subtitle EN[] =
+ {
+ { "m1", KCOL_MIKE "Haha!" },
+ { "m2", KCOL_MIKE "Usually you don't put up with JC's nonsense.." },
+ { "m3", KCOL_MIKE "He's been banging on about how we need to set some kind of speed record" },
+ { "m4", KCOL_MIKE "For his.. \"Experiment\"" },
+ { "m5", KCOL_MIKE "To be honest..." },
+ { "m6", KCOL_MIKE "I'm just pretending to go along with it at this point.." },
+ { "m7", KCOL_MIKE "I don't want to loose my internship at the wood place.." },
+ { "m7b", KCOL_MIKE "He is my boss after all" },
+ { "m9", KCOL_MIKE "Anyway uh, speaking of" },
+ { "m10", KCOL_MIKE "I gotta go take care of yet another catastrophe he's created back there." },
+ { "m11", KCOL_MIKE "I won't go into it." },
+ { "m12", KCOL_MIKE "But umm" },
+ { "m13", KCOL_MIKE "Good to see you back again" },
+ { "m14", KCOL_MIKE "Later." },
+
+ { NULL, NULL },
+ };
+ static const struct generic_cutscene cutscene =
+ {
+ .metascene_path = "metascenes/ch2s2.ms",
+ .freeze_player = 1,
+ .subtitles = EN,
+ };
+ optional_video_wrapper( &cutscene, "ch2s2_view", 0, event );
+ return 1;
+}
+
+static bool _skaterift_script_first_mtzero( ent_script_event *event )
+{
+ if( on_function_trigger( event, 6 ) )
+ {
+ u64 status = _skaterift_script_nugget_status( "ch2s3_view" );
+ if( status == 0 )
+ {
+ _skaterift_script_nugget_set( "ch2s3_view", 2 );
+ }
+ }
+
+ return 1;
+}
+
+static bool _skaterift_script_ch2s3( ent_script_event *event )
+{
+ static const struct cs_subtitle EN[] =
+ {
+ { "m1", KCOL_MIKE "Holy! You actually bothered to do these?" },
+ { "m2", KCOL_MIKE "I mean.." },
+ { "m3", KCOL_MIKE "JC's gonna be over the moon obviously, but" },
+ { "m4", KCOL_MIKE "Why?" },
+ { "m5", KCOL_MIKE "Don't you think its.. pointless?" },
+ { "m6", KCOL_MIKE "Myeah I'm heading back to the shop" },
+ { "m7", KCOL_MIKE "Coming?" },
+ { "m8", KCOL_MIKE "Ohh man.." },
+ { "m9", KCOL_MIKE "What a **** racket" },
+ { "m10", KCOL_MIKE "It's 8pm even." },
+ { "j1", KCOL_JOHN "You guys can't be walking in and scaring me like that" },
+ { "m11", KCOL_MIKE "John, " },
+ { "m12", KCOL_MIKE "Whats that?" },
+ { "j2", KCOL_JOHN "uhhh just uh just uhh" },
+ { "j3", KCOL_JOHN "just cleaning something up for a client" },
+ { "m13", KCOL_MIKE "A 20ft tall quaterpipe" },
+ { "m14", KCOL_MIKE "for a client.." },
+ { "m15", KCOL_MIKE "on an island full of pensioners?" },
+ { "j4", KCOL_JOHN "Yeah why not?" },
+ { "j5", KCOL_JOHN "Skating's taking off right now!" },
+ { "m16", KCOL_MIKE "Come on mate.." },
+ { "j6", KCOL_JOHN "Aight look.." },
+ { "j7", KCOL_JOHN "I'm just skimming little bits from the surplus" },
+ { "j8", KCOL_JOHN "I got this plan right." },
+ { "j9", KCOL_JOHN "It's gonna be BIG" },
+ { "j10", KCOL_JOHN "People from all over the world are gonna come to see it." },
+ { "j11", KCOL_JOHN "You know how like uh..." },
+ { "j12", KCOL_JOHN "You know how no one visits the west island?" },
+ { "m17", KCOL_MIKE "Well.. yeah?" },
+ { "j13", KCOL_JOHN "Behold!" },
+ { "j14", KCOL_JOHN "Mango mega island!" },
+ { "j15", KCOL_JOHN "A skaters dream.." },
+ { "m18", KCOL_MIKE "Ohhh yeah john" },
+ { "m19", KCOL_MIKE "Looks great!" },
+ { "m20", KCOL_MIKE "And whos gonna build this.." },
+ { "m21", KCOL_MIKE "gigantic skate thing then..?" },
+ { "j16", KCOL_JOHN "Well uhhh" },
+ { "j17", KCOL_JOHN "Thats where I need your guys help." },
+ { "m22", KCOL_MIKE "What are we gonna help with exactly?" },
+ { "m23", KCOL_MIKE "You always do this John." },
+ { "m24", KCOL_MIKE "Have some grand idea and suddenly everyones onboard with it." },
+ { "j18", KCOL_JOHN "Whens the last time I asked you for anything?" },
+ { "m25", KCOL_MIKE "Yesterday.." },
+ { "j19", KCOL_JOHN "Oh..." },
+ { "j20", KCOL_JOHN "Yeah, anyway" },
+ { "j21", KCOL_JOHN "All I need is for you guys to finish the time trials" },
+ { "j22", KCOL_JOHN "Go work on those, and come back when you've got it." },
+ { "m26", KCOL_MIKE "Yeah well I got news for you!" },
+ { "m27", KCOL_MIKE "Bird here has smashed all of them already." },
+ { "j23", KCOL_JOHN "wait what?" },
+ { "j24", KCOL_JOHN "You did!?" },
+ { "j25", KCOL_JOHN "really???" },
+ { "j26", KCOL_JOHN "Holy I knew you were good!" },
+ { "m28", KCOL_MIKE "Yeah but uhh.." },
+ { "m29", KCOL_MIKE "What exactly does this have to do with building a world record size skatepark island?" },
+ { "j27", KCOL_JOHN "You see.." },
+ { "j28", KCOL_JOHN "It was the missing component. It was speed." },
+ { "j29", KCOL_JOHN "It's all we needed, to build a time net" },
+ { "j30", KCOL_JOHN "Large enough to create infinite energy." },
+ { "m30", KCOL_MIKE "Infinite.. energy..?" },
+ { "j31", KCOL_JOHN "Yeah! You know to uh contact Allen and Alvin." },
+ { "j32", KCOL_JOHN "They're the ones who are gonna help us with this whole thing." },
+ { "m31", KCOL_MIKE "Them! Ahhh no man" },
+ { "m32", KCOL_MIKE "not the aliens again.." },
+ { "m33", KCOL_MIKE "the tiny little dudes you saw in a drug induced coma" },
+ { "m34", KCOL_MIKE "are gonna help us build a megapark, on an abandoned island" },
+ { "m35", KCOL_MIKE "I dont even know why I asked.." },
+ { "m36", KCOL_MIKE "I'm clocking out. See you later." },
+ { "j33", KCOL_JOHN "Look..." },
+ { "j34", KCOL_JOHN "I'm not crazy, I promise. Just trust me." },
+ { "j35", KCOL_JOHN "Lemme prove it." },
+ { "j36", KCOL_JOHN "Bring this with you, hold onto it." },
+ { "j37", KCOL_JOHN "Skate those trails as fast as you can with it on you." },
+ { "j38", KCOL_JOHN "You'll understand when it happens," },
+ { "j39", KCOL_JOHN "And you'll see what I mean by that" },
+ { "j40", KCOL_JOHN "You'll just see it.. and" },
+ { "j41", KCOL_JOHN "If anyone asks, you didn't get this from me." },
+ { "j42", KCOL_JOHN "But I'll be there, I'll be watching, just get on with it." },
+ { NULL, NULL },
+ };
+ static const struct generic_cutscene cutscene =
+ {
+ .metascene_path = "metascenes/ch2s3a.ms",
+ .freeze_player = 1,
+ .subtitles = EN,
+ };
+ optional_video_wrapper( &cutscene, "ch2s3_view", 2, event );
+
+ /* TODO: Unlocking the blocker thing here, for the final challenge */
+
+ return 1;
+}
+
+static bool _skaterift_script_ch2s4( ent_script_event *event )
+{
+ static const struct cs_subtitle EN[] =
+ {
+ { "j1", KCOL_JOHN "Oh my god.." },
+ { "j2", KCOL_JOHN "You **** did it now" },
+ { "j3", KCOL_JOHN "I told you I am not crazy!" },
+ { "j4", KCOL_JOHN "You've done me a real solid mate." },
+ { "j5", KCOL_JOHN "When I switch this thing on" },
+ { "j6", KCOL_JOHN "It's gonna broadcast our location to them.." },
+ { "j7", KCOL_JOHN "We have just enough power. Thanks to you my friend" },
+ { "j8", KCOL_JOHN "Okayyy any second" },
+ { "j9", KCOL_JOHN "BOSH" },
+ { "j10", KCOL_JOHN "HELLO MY FRIENDS" },
+ { "j11", KCOL_JOHN "WE NEED HELP" },
+ { "j12", KCOL_JOHN "THIS IS CAPTAIN JOHN COCROACH" },
+ { "j13", KCOL_JOHN "PLEASE COME AS SOON AS YOU CAN TO MT.ZERO ISLAND" },
+ { "j14", KCOL_JOHN "Our coordinates are...." },
+ { NULL, NULL },
+ };
+ static const struct generic_cutscene cutscene =
+ {
+ .metascene_path = "metascenes/ch2s4.ms",
+ .freeze_player = 1,
+ .subtitles = EN,
+ };
+ optional_video_wrapper( &cutscene, "ch2s4_view", 2, event );
+ return 1;
+}
+
+static bool _skaterift_script_ch2s5_before( ent_script_event *event )
+{
+ u64 status;
+ if( on_nugget_changed( event, "ch2s5_view", &status ) )
+ {
+ bool visible = 0;
+
+ if( status == 2 )
+ visible = 1;
+
+ ent_list_set_visible( event->world, event->entity_list, visible );
+ }
+
+ if( on_function_trigger( event, 0 ) )
+ {
+ /* TODO: Move this to a loop */
+ if( vg_loader_availible() )
+ {
+ _skaterift_script_nugget_set( "ch2s5_view", 3 );
+ skaterift_load_world_command( 1, (const char *[]){ "reload" } );
+ }
+ }
+
+ return 1;
+}
+
+static bool _skaterift_script_ch2s5_after( ent_script_event *event )
+{
+ static const struct cs_subtitle EN[] =
+ {
+ { "m1", KCOL_MIKE "Hi mate, hows it goin?" },
+ { "m2", KCOL_MIKE "Yeah yeah.. I get you.. um." },
+ { "m3", KCOL_MIKE "I genuinely have no idea where he found that cell thing" },
+ { "m4", KCOL_MIKE "I reckon it came of some kind of secret government tech or whatever" },
+ { "m5", KCOL_MIKE "but.." },
+ { "m6", KCOL_MIKE "Now you know what he was doing with all those stupid poles he put up across the island" },
+ { "m7", KCOL_MIKE "I'm starting to think I might be going crazy but.." },
+ { "m8", KCOL_MIKE "Did you see the whole west side has actually been taken over?" },
+ { "m9", KCOL_MIKE "Just like JC was saying.." },
+ { "m10", KCOL_MIKE "Are you telling me the aliens are actually real?" },
+ { NULL, NULL },
+ };
+ static const struct generic_cutscene cutscene =
+ {
+ .metascene_path = "metascenes/ch2s5.ms",
+ .freeze_player = 1,
+ .subtitles = EN,
+ };
+
+ enum generic_cutscene_event cs_event = generic_cutscene_wrapper( &cutscene, event );
+
+ u64 status;
+ if( on_nugget_changed( event, "ch2s5_view", &status ) )
+ {
+ if( status == 3 )
+ {
+ _skaterift_script_nugget_set( "ch2s5_view", 1 );
+ play_generic_cutscene( event );
+ }
+ }
+
+ return 1;
+}
+
+static bool _skaterift_script_ch2s6( ent_script_event *event )
+{
+ static const struct cs_subtitle EN[] =
+ {
+ { "j1", KCOL_JOHN "Ello guys" },
+ { "j2", KCOL_JOHN "Bout time you showed up" },
+ { "j3", KCOL_JOHN "Look who I've got here!" },
+ { "m1", KCOL_MIKE "Uhhhhhhhhhhhhhhhhhhhhhhhhhhh" },
+ { "m2", KCOL_MIKE "Right then." },
+ { "m3", KCOL_MIKE "I almost feel bad for these guys" },
+ { "m4", KCOL_MIKE "Couldve' been any scientist across the planet" },
+ { "m5", KCOL_MIKE "you know actually smart people" },
+ { "m6", KCOL_MIKE "but no.." },
+ { "m7", KCOL_MIKE "JC somehow contacts them first" },
+ { "j4", KCOL_JOHN "Heyyy man." },
+ { "j5", KCOL_JOHN "This required a special kind of science" },
+ { "j6", KCOL_JOHN "The kinda stuff the world isn't quite ready for yet." },
+ { "j7", KCOL_JOHN "But if you're done insulting me.." },
+ { "j8", KCOL_JOHN "We're off to the states for a bit." },
+ { "j9", KCOL_JOHN "Fancy a road trip?" },
+ { NULL, NULL },
+ };
+ static const struct generic_cutscene cutscene =
+ {
+ .metascene_path = "metascenes/ch2s6.ms",
+ .freeze_player = 1,
+ .subtitles = EN,
+ };
+ enum generic_cutscene_event cs_event = optional_video_wrapper( &cutscene, "ch2s6_view", 2, event );
+
+ if( cs_event == k_generic_cutscene_event_end )
+ {
+ _skaterift_script_nugget_set( "unlock_city", 1 );
+ skaterift_load_world_command( 1, (const char *[]){ "sr002-local-mp_spawn" } );
+ }
+ return 1;
+}
+
+static bool _skaterift_script_ch2e1( ent_script_event *event )
+{
+ static const struct cs_subtitle EN[] =
+ {
+ { "j1", KCOL_JOHN "Hey bird I'm just working on some boards here." },
+ { "j2", KCOL_JOHN "If you wanna give me a graphic," },
+ { "j3", KCOL_JOHN "I'll print it onto this plywood and press it" },
+ { "j4", KCOL_JOHN "Mike'l griptape it and seal it" },
+ { "j5", KCOL_JOHN "Ready to sell and skate!" },
+ { NULL, NULL },
+ };
+ static const struct generic_cutscene cutscene =
+ {
+ .metascene_path = "metascenes/ch2e1.ms",
+ .freeze_player = 1,
+ .subtitles = EN,
+ };
+ optional_video_wrapper( &cutscene, "ch2e1_view", 2, event );
+ return 1;
+}
+
+static bool _skaterift_script_battery_jump( ent_script_event *event )
+{
+ static const struct cs_subtitle EN[] = {
+ { NULL, NULL },
+ };
+ static const struct generic_cutscene cutscene =
+ {
+ .metascene_path = "metascenes/battery_intro.ms",
+ .freeze_player = 1,
+ .subtitles = EN,
+ };
+ challenge_video_wrapper( &cutscene, "battery_jump_view", event );
+
+ if( on_function_trigger( event, 7 ) )
+ {
+ // TODO
+ vg_error( "WHY????????????\n" );
+ }
+
+ if( on_cutscene_marker( event, "$break" ) )
+ {
+ _explode_template_boom( event );
+ }
+
+ if( event->type == k_escript_event_world_start )
+ {
+ u32 status = _skaterift_script_nugget_status( "battery_jump_view" );
+
+ if( status == 1 )
+ ent_list_set_visible( event->world, event->entity_list, 0 );
+ }
+
+ return 1;
+}
return 0;
}
-static bool _skaterift_script_ch2s1( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "j1", KCOL_JOHN "Eughhh boy" },
- { "j2", KCOL_JOHN "When we get off this thing I gotta go lay down for a bit" },
- { "j3", KCOL_JOHN "Oh look" },
- { "j4", KCOL_JOHN "There's Mike over there" },
- { "j5", KCOL_JOHN "HELLO MIKE!" },
- { "j7", KCOL_JOHN "Yeah listen.." },
- { "j8", KCOL_JOHN "I know things are a bit weird at the moment" },
- { "j9", KCOL_JOHN "but it'l make sense soon" },
- { "j10", KCOL_JOHN "I garuntee it" },
- { "j11", KCOL_JOHN "50%% probably garuntee it" },
- { "j12", KCOL_JOHN "I need you to go on, keep on setting some time trials here" },
- { "j13", KCOL_JOHN "We're gonna need your speed later" },
- { "j14", KCOL_JOHN "Its.. Why I picked you." },
-
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch2s1.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch2s2( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "m1", KCOL_MIKE "Haha!" },
- { "m2", KCOL_MIKE "Usually you don't put up with JC's nonsense.." },
- { "m3", KCOL_MIKE "He's been banging on about how we need to set some kind of speed record" },
- { "m4", KCOL_MIKE "For his.. \"Experiment\"" },
- { "m5", KCOL_MIKE "To be honest..." },
- { "m6", KCOL_MIKE "I'm just pretending to go along with it at this point.." },
- { "m7", KCOL_MIKE "I don't want to loose my internship at the wood place.." },
- { "m7b", KCOL_MIKE "He is my boss after all" },
- { "m9", KCOL_MIKE "Anyway uh, speaking of" },
- { "m10", KCOL_MIKE "I gotta go take care of yet another catastrophe he's created back there." },
- { "m11", KCOL_MIKE "I won't go into it." },
- { "m12", KCOL_MIKE "But umm" },
- { "m13", KCOL_MIKE "Good to see you back again" },
- { "m14", KCOL_MIKE "Later." },
-
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch2s2.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch2s3a( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "m1", KCOL_MIKE "Holy! You actually bothered to do these?" },
- { "m2", KCOL_MIKE "I mean.." },
- { "m3", KCOL_MIKE "JC's gonna be over the moon obviously, but" },
- { "m4", KCOL_MIKE "Why?" },
- { "m5", KCOL_MIKE "Don't you think its.. pointless?" },
- { "m6", KCOL_MIKE "Myeah I'm heading back to the shop" },
- { "m7", KCOL_MIKE "Coming?" },
- { "m8", KCOL_MIKE "Ohh man.." },
- { "m9", KCOL_MIKE "What a **** racket" },
- { "m10", KCOL_MIKE "It's 8pm even." },
- { "j1", KCOL_JOHN "You guys can't be walking in and scaring me like that" },
- { "m11", KCOL_MIKE "John, " },
- { "m12", KCOL_MIKE "Whats that?" },
- { "j2", KCOL_JOHN "uhhh just uh just uhh" },
- { "j3", KCOL_JOHN "just cleaning something up for a client" },
- { "m13", KCOL_MIKE "A 20ft tall quaterpipe" },
- { "m14", KCOL_MIKE "for a client.." },
- { "m15", KCOL_MIKE "on an island full of pensioners?" },
- { "j4", KCOL_JOHN "Yeah why not?" },
- { "j5", KCOL_JOHN "Skating's taking off right now!" },
- { "m16", KCOL_MIKE "Come on mate.." },
- { "j6", KCOL_JOHN "Aight look.." },
- { "j7", KCOL_JOHN "I'm just skimming little bits from the surplus" },
- { "j8", KCOL_JOHN "I got this plan right." },
- { "j9", KCOL_JOHN "It's gonna be BIG" },
- { "j10", KCOL_JOHN "People from all over the world are gonna come to see it." },
- { "j11", KCOL_JOHN "You know how like uh..." },
- { "j12", KCOL_JOHN "You know how no one visits the west island?" },
- { "m17", KCOL_MIKE "Well.. yeah?" },
- { "j13", KCOL_JOHN "Behold!" },
- { "j14", KCOL_JOHN "Mango mega island!" },
- { "j15", KCOL_JOHN "A skaters dream.." },
- { "m18", KCOL_MIKE "Ohhh yeah john" },
- { "m19", KCOL_MIKE "Looks great!" },
- { "m20", KCOL_MIKE "And whos gonna build this.." },
- { "m21", KCOL_MIKE "gigantic skate thing then..?" },
- { "j16", KCOL_JOHN "Well uhhh" },
- { "j17", KCOL_JOHN "Thats where I need your guys help." },
- { "m22", KCOL_MIKE "What are we gonna help with exactly?" },
- { "m23", KCOL_MIKE "You always do this John." },
- { "m24", KCOL_MIKE "Have some grand idea and suddenly everyones onboard with it." },
- { "j18", KCOL_JOHN "Whens the last time I asked you for anything?" },
- { "m25", KCOL_MIKE "Yesterday.." },
- { "j19", KCOL_JOHN "Oh..." },
- { "j20", KCOL_JOHN "Yeah, anyway" },
- { "j21", KCOL_JOHN "All I need is for you guys to finish the time trials" },
- { "j22", KCOL_JOHN "Go work on those, and come back when you've got it." },
- { "m26", KCOL_MIKE "Yeah well I got news for you!" },
- { "m27", KCOL_MIKE "Bird here has smashed all of them already." },
- { "j23", KCOL_JOHN "wait what?" },
- { "j24", KCOL_JOHN "You did!?" },
- { "j25", KCOL_JOHN "really???" },
- { "j26", KCOL_JOHN "Holy I knew you were good!" },
- { "m28", KCOL_MIKE "Yeah but uhh.." },
- { "m29", KCOL_MIKE "What exactly does this have to do with building a world record size skatepark island?" },
- { "j27", KCOL_JOHN "You see.." },
- { "j28", KCOL_JOHN "It was the missing component. It was speed." },
- { "j29", KCOL_JOHN "It's all we needed, to build a time net" },
- { "j30", KCOL_JOHN "Large enough to create infinite energy." },
- { "m30", KCOL_MIKE "Infinite.. energy..?" },
- { "j31", KCOL_JOHN "Yeah! You know to uh contact Allen and Alvin." },
- { "j32", KCOL_JOHN "They're the ones who are gonna help us with this whole thing." },
- { "m31", KCOL_MIKE "Them! Ahhh no man" },
- { "m32", KCOL_MIKE "not the aliens again.." },
- { "m33", KCOL_MIKE "the tiny little dudes you saw in a drug induced coma" },
- { "m34", KCOL_MIKE "are gonna help us build a megapark, on an abandoned island" },
- { "m35", KCOL_MIKE "I dont even know why I asked.." },
- { "m36", KCOL_MIKE "I'm clocking out. See you later." },
- { "j33", KCOL_JOHN "Look..." },
- { "j34", KCOL_JOHN "I'm not crazy, I promise. Just trust me." },
- { "j35", KCOL_JOHN "Lemme prove it." },
- { "j36", KCOL_JOHN "Bring this with you, hold onto it." },
- { "j37", KCOL_JOHN "Skate those trails as fast as you can with it on you." },
- { "j38", KCOL_JOHN "You'll understand when it happens," },
- { "j39", KCOL_JOHN "And you'll see what I mean by that" },
- { "j40", KCOL_JOHN "You'll just see it.. and" },
- { "j41", KCOL_JOHN "If anyone asks, you didn't get this from me." },
- { "j42", KCOL_JOHN "But I'll be there, I'll be watching, just get on with it." },
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch2s3a.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch2s4( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "j1", KCOL_JOHN "Oh my god.." },
- { "j2", KCOL_JOHN "You **** did it now" },
- { "j3", KCOL_JOHN "I told you I am not crazy!" },
- { "j4", KCOL_JOHN "You've done me a real solid mate." },
- { "j5", KCOL_JOHN "When I switch this thing on" },
- { "j6", KCOL_JOHN "It's gonna broadcast our location to them.." },
- { "j7", KCOL_JOHN "We have just enough power. Thanks to you my friend" },
- { "j8", KCOL_JOHN "Okayyy any second" },
- { "j9", KCOL_JOHN "BOSH" },
- { "j10", KCOL_JOHN "HELLO MY FRIENDS" },
- { "j11", KCOL_JOHN "WE NEED HELP" },
- { "j12", KCOL_JOHN "THIS IS CAPTAIN JOHN COCROACH" },
- { "j13", KCOL_JOHN "PLEASE COME AS SOON AS YOU CAN TO MT.ZERO ISLAND" },
- { "j14", KCOL_JOHN "Our coordinates are...." },
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch2s4.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch2e1( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "j1", KCOL_JOHN "Hey bird I'm just working on some boards here." },
- { "j2", KCOL_JOHN "If you wanna give me a graphic," },
- { "j3", KCOL_JOHN "I'll print it onto this plywood and press it" },
- { "j4", KCOL_JOHN "Mike'l griptape it and seal it" },
- { "j5", KCOL_JOHN "Ready to sell and skate!" },
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch2e1.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch2s5( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "m1", KCOL_MIKE "Hi mate, hows it goin?" },
- { "m2", KCOL_MIKE "Yeah yeah.. I get you.. um." },
- { "m3", KCOL_MIKE "I genuinely have no idea where he found that cell thing" },
- { "m4", KCOL_MIKE "I reckon it came of some kind of secret government tech or whatever" },
- { "m5", KCOL_MIKE "but.." },
- { "m6", KCOL_MIKE "Now you know what he was doing with all those stupid poles he put up across the island" },
- { "m7", KCOL_MIKE "I'm starting to think I might be going crazy but.." },
- { "m8", KCOL_MIKE "Did you see the whole west side has actually been taken over?" },
- { "m9", KCOL_MIKE "Just like JC was saying.." },
- { "m10", KCOL_MIKE "Are you telling me the aliens are actually real?" },
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch2s5.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch2s6( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "j1", KCOL_JOHN "Ello guys" },
- { "j2", KCOL_JOHN "Bout time you showed up" },
- { "j3", KCOL_JOHN "Look who I've got here!" },
- { "m1", KCOL_MIKE "Uhhhhhhhhhhhhhhhhhhhhhhhhhhh" },
- { "m2", KCOL_MIKE "Right then." },
- { "m3", KCOL_MIKE "I almost feel bad for these guys" },
- { "m4", KCOL_MIKE "Couldve' been any scientist across the planet" },
- { "m5", KCOL_MIKE "you know actually smart people" },
- { "m6", KCOL_MIKE "but no.." },
- { "m7", KCOL_MIKE "JC somehow contacts them first" },
- { "j4", KCOL_JOHN "Heyyy man." },
- { "j5", KCOL_JOHN "This required a special kind of science" },
- { "j6", KCOL_JOHN "The kinda stuff the world isn't quite ready for yet." },
- { "j7", KCOL_JOHN "But if you're done insulting me.." },
- { "j8", KCOL_JOHN "We're off to the states for a bit." },
- { "j9", KCOL_JOHN "Fancy a road trip?" },
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch2s6.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch3s1( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "j1", KCOL_JOHN "Ohh this is it guys." },
- { "j2", KCOL_JOHN "Good enough!" },
- { "m1", KCOL_MIKE "Never even thought I'd visit the USA" },
- { "m2", KCOL_MIKE "But here we are I guess.." },
- { "j3", KCOL_JOHN "I've had weirder sundays." },
- { "m3", KCOL_MIKE "Somehow I'm not surprised." },
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch3s1.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch3s2( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "m1", KCOL_MIKE "Is that the FBI??" },
- { "m2", KCOL_MIKE "I don't know about this man things are getting weird." },
- { "m3", KCOL_MIKE "Oh no that is not good" },
- { "m4", KCOL_MIKE "What do they even want with him?" },
- { "m5", KCOL_MIKE "Ahhh yeah, the aliens. That'l do it." },
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch3s2.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
-static bool _skaterift_script_ch3s3( enum escript_event ev, const char *inf )
-{
- static u32 state, subtitle_id;
- static struct cs_instance *override_inst;
-
- if( ev == k_escript_event_call )
- {
- state = k_escript_state_loading;
- override_inst = NULL;
- subtitle_id = 0;
- vg_info( "test:state = loading\n" );
- }
-
- if( ev == k_escript_event_cutscene_marker )
- {
- struct sr_subtitle EN[] = {
- { "p1", KCOL_PRES "Yall have some explaining to do here.." },
- { "p2", KCOL_PRES "Every single power plant in the USA is currently offline" },
- { "p3", KCOL_PRES "And yet.." },
- { "p4", KCOL_PRES "There is no national emergency?" },
- { "p5", KCOL_PRES "Nothing is wrong!" },
- { "p6", KCOL_PRES "So where the hell is all this power coming from?" },
- { "p7", KCOL_PRES "We traced it back here, to you guys" },
- { "p8", KCOL_PRES "Now, please. Enlighten me." },
- { "p9", KCOL_PRES "How exactly are you powering all of America?" },
- { "p10", KCOL_PRES "From this one tiny establishment?" },
- { "m1", KCOL_MIKE "Look, this is gonna be a tough one to explain mate" },
- { "m2", KCOL_MIKE "And to be honest I don't really get it myself" },
- { "p11", KCOL_PRES "Do your best!" },
- { "m3", KCOL_MIKE "Mr. President, we saw you take JC," },
- { "m4", KCOL_MIKE "Didn't he explain it to you already?" },
- { "p12", KCOL_PRES "JC JC.." },
- { "p13", KCOL_PRES "Ah! John Cockroach.." },
- { "p14", KCOL_PRES "Of course. He's a friend of yours?" },
- { "m5", KCOL_MIKE "Yeah.. I'm an intern at his wood company." },
- { "m6", KCOL_MIKE "And this is just a friend of ours here." },
- { "p15", KCOL_PRES "So what you're telling me is, and what he told me is," },
- { "p16", KCOL_PRES "Three random people, from a wood company," },
- { "p17", KCOL_PRES "in Tasmania, Australia" },
- { "p18", KCOL_PRES "just happen to have nuclear fusion" },
- { "m7", KCOL_MIKE "Yeah I guess.." },
- { "p19", KCOL_PRES "Man I cannot believe that old guy was telling the truth this whole time" },
- { "m8", KCOL_MIKE "Thats what I've been saying!" },
- { "p20", KCOL_PRES "The world don't make sense any more" },
- { "p21", KCOL_PRES "Well! Fortunately for you lot," },
- { "p22", KCOL_PRES "you're coming with us!" },
- { "p23", KCOL_PRES "We're sending you to Cambodia." },
- { "m9", KCOL_MIKE "What!?" },
- { "m10", KCOL_MIKE "Can he even do that?" },
- { "p24", KCOL_PRES "Yes I can. Now, get in." },
- { NULL, NULL },
- };
- _skaterift_dialogue( EN, &subtitle_id, inf );
-
- return 0;
- }
-
- /* scene
- * --------------------------------------------------------------- */
-
- if( state == k_escript_state_loading )
- {
- if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch3s3.ms" } ) )
- {
- state = k_escript_state_initializing;
- vg_info( "test:state = initializing\n" );
- }
- }
-
- if( state == k_escript_state_initializing )
- {
- if( _cutscene.state == k_cutscene_state_ready )
- {
- _skaterift_script_bind_player();
- state = k_escript_state_playing;
- vg_info( "test:state = playing\n" );
- _cutscene_play();
- }
- }
-
- if( state == k_escript_state_playing )
- {
- if( _cutscene.state == k_cutscene_state_done )
- {
- state = k_escript_state_end;
- vg_info( "test:state = end\n" );
- _cutscene_unload();
- return 1;
- }
- }
-
- return 0;
-}
-
static bool _skaterift_script_ch4s1a( enum escript_event ev, const char *inf )
{
static u32 state, subtitle_id;
return 0;
}
-struct
-{
- enum escript_script_id active_scripts[ MAX_ACTIVE_SCRIPTS ];
- u32 active_script_count;
-}
-static _script = { .script_id = k_escript_script_id_max };
-static struct script_info _script_infos[] =
-{
- [k_escript_script_id_test] = { "test", _skaterift_script_test },
- [k_escript_script_id_intro] = { "intro", _skaterift_script_intro, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch1s2] = { "ch1s2", _skaterift_script_ch1s2, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch1s3] = { "ch1s3", _skaterift_script_ch1s3, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch1s3b] = {"ch1s3b",_skaterift_script_ch1s3b, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch1s4] = { "ch1s4", _skaterift_script_ch1s4, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch1s5] = { "ch1s5", _skaterift_script_ch1s5, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch1s6a] = {"ch1s6a",_skaterift_script_ch1s6a, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch2s1] = { "ch2s1", _skaterift_script_ch2s1, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch2s2] = { "ch2s2", _skaterift_script_ch2s2, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch2s3a] = {"ch2s3a",_skaterift_script_ch2s3a, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch2s4] = { "ch2s4", _skaterift_script_ch2s4, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch2e1] = { "ch2e1", _skaterift_script_ch2e1, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch2s5] = { "ch2s5", _skaterift_script_ch2s5, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch2s6] = { "ch2s6", _skaterift_script_ch2s6, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch3s1] = { "ch3s1", _skaterift_script_ch3s1, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch3s2] = { "ch3s2", _skaterift_script_ch3s2, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch3s3] = { "ch3s3", _skaterift_script_ch3s3, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch4s1a]= { "ch4s1a",_skaterift_script_ch4s1a, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch4s1] = { "ch4s1", _skaterift_script_ch4s1, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch4s2] = { "ch4s2", _skaterift_script_ch4s2, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_ch4s3] = { "ch4s3", _skaterift_script_ch4s3, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_hub_setup] = { "hub_setup", _skaterift_script_hub_setup },
- [k_escript_script_id_hub_guide] = { "hub_guide", _skaterift_script_hub_guide, SCRIPT_FLAG_STORY_EVENT },
- [k_escript_script_id_tutorial_setup ] = { "tutorial_setup", _skaterift_script_tutorial_setup },
-};
-
-bool _skaterift_script_check_unlocked( enum escript_script_id id )
-{
- struct script_info *info = &_script_infos[ id ];
- return info->availible;
-}
-
-bool _skaterift_script_already_viewed( enum escript_script_id id )
-{
- struct script_info *info = &_script_infos[ id ];
- return info->viewed_time? 1: 0;
-}
-
-struct script_info *skaterift_script_get_info( const char *alias )
-{
- for( u32 i=0; i<k_escript_script_id_max; i ++ )
- {
- if( vg_str_eq( alias, _script_infos[i].alias ) )
- {
- return &_script_infos[i];
- }
- }
- return NULL;
-}
-
-void _skaterift_script_update(void)
-{
- u32 j=0;
- for( u32 i=0; i<_script.active_script_count; i ++ )
- {
- enum escript_script_id script_id = _script.active_scripts[ i ];
- if( !_script_infos[ script_id ].jump( k_escript_event_update, NULL ) )
- {
- _script.active_scripts[ j ++ ] = script_id;
- }
- }
- _script.active_script_count = j;
-}
-
-void _skaterift_script_marker( const char *marker )
-{
- if( _script.script_id != k_escript_script_id_max )
- {
- if( _script_infos[ _script.script_id ].jump( k_escript_event_cutscene_marker, marker) )
- _script.script_id = k_escript_script_id_max;
- }
-}
-
-void _skaterift_script_unlink_all_challenges(void)
-{
- for( u32 i=0; i<VG_ARRAY_LEN( _script_infos ); i ++ )
- _script_infos[i].linked_challenge = NULL;
-}
#endif
if( visible ) volume->flags &= ~((u32)k_ent_volume_flag_disabled);
else volume->flags |= (u32)k_ent_volume_flag_disabled;
}
+ else if( type == k_ent_marker )
+ {
+ ent_marker *marker = af_arritm( &world->ent_marker, index );
+ if( visible ) marker->flags &= ~((u32)k_ent_marker_flag_hidden);
+ else marker->flags |= (u32)k_ent_marker_flag_hidden;
+ }
}
}
{
if( event->type != k_escript_event_allocate )
{
- if( _skaterift_script_nugget_status( nugget_alias ) == 0 )
+ if( _skaterift_script_nugget_status( nugget_alias ) != 1 )
{
_skaterift_script_nugget_set( nugget_alias, 1 );
return 1;
enum generic_cutscene_event optional_video_wrapper( const struct generic_cutscene *cutscene_template,
const char *nugget_alias,
+ u64 nugget_visible_value,
ent_script_event *event )
{
enum generic_cutscene_event cs_event = generic_cutscene_wrapper( cutscene_template, event );
- u64 viewed;
- if( on_nugget_changed( event, nugget_alias, &viewed ) )
+ u64 status;
+ if( on_nugget_changed( event, nugget_alias, &status ) )
{
- ent_list_set_visible( event->world, event->entity_list, !viewed );
+ ent_list_set_visible( event->world, event->entity_list, status == nugget_visible_value );
}
if( on_function_trigger( event, 0 ) )
#include "scripts/heaven.c"
#include "scripts/hub.c"
#include "scripts/tutorial_island.c"
+#include "scripts/mtzero.c"
+#include "scripts/city.c"
/* --------------------------------------------------------------------------------------------------------------------
* function aliasing
{ "final_portal", _skaterift_script_final_portal },
{ "unlock_mtzero", _skaterift_script_unlock_mtzero },
+ { "ch2s1", _skaterift_script_ch2s1 },
+ { "ch2s2", _skaterift_script_ch2s2 },
+ { "first_mtzero", _skaterift_script_first_mtzero },
+ { "ch2s3", _skaterift_script_ch2s3 },
+ { "ch2s4", _skaterift_script_ch2s4 },
+ { "battery_jump", _skaterift_script_battery_jump },
+ { "ch2s5_before", _skaterift_script_ch2s5_before },
+ { "ch2s5_after", _skaterift_script_ch2s5_after },
+ { "ch2s6", _skaterift_script_ch2s6 },
+ { "ch2e1", _skaterift_script_ch2e1 },
+
{ "unlock_city", _skaterift_script_unlock_city },
- { "unlock_valley", _skaterift_script_unlock_valley },
+ { "ch3s1", _skaterift_script_ch3s1 },
+ { "ch3s2", _skaterift_script_ch3s2 },
+ { "ch3s3", _skaterift_script_ch3s3 },
+ { "unlock_valley", _skaterift_script_unlock_valley },
{ NULL }
};
{ "unlock_mtzero" },
{ "unlock_mtzero_view" },
+ { "ch2s1_view" },
+ { "ch2s2_view" },
+ { "ch2s3_view" },
+ { "battery_jump_view" },
+ { "ch2s4_view" },
+ { "ch2s5_view" }, /* is the trigger for the second map */
+ { "ch2s6_view" },
+ { "ch2e1_view" },
{ "unlock_city" },
{ "unlock_city_view" },
+ { "ch3s1_view" },
+ { "ch3s2_view" },
+ { "ch3s3_view" },
{ "unlock_valley" },
{ "unlock_valley_view" },