more cutscenes
authorhgn <hgodden00@gmail.com>
Sat, 25 Jan 2025 18:53:25 +0000 (18:53 +0000)
committerhgn <hgodden00@gmail.com>
Sat, 25 Jan 2025 18:53:25 +0000 (18:53 +0000)
27 files changed:
content_skaterift/metascenes/ch1s2.ms [new file with mode: 0644]
content_skaterift/metascenes/ch1s3.ms [new file with mode: 0644]
content_skaterift/metascenes/ch1s3b.ms [new file with mode: 0644]
content_skaterift/metascenes/ch1s4.ms [new file with mode: 0644]
content_skaterift/metascenes/ch1s5.ms [new file with mode: 0644]
content_skaterift/metascenes/ch1s6a.ms [new file with mode: 0644]
content_skaterift/metascenes/ch2s1.ms [new file with mode: 0644]
content_skaterift/metascenes/ch2s2.ms [new file with mode: 0644]
content_skaterift/metascenes/ch2s3a.ms [new file with mode: 0644]
content_skaterift/playermodels/skaterift_chip/ch_chip.mdl
content_skaterift/sound/cs/03.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch1s2.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch1s3.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch1s3b.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch1s4.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch1s5.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch1s6a.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch2s1.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch2s2.MIKE.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch2s3.JC.ogg [new file with mode: 0644]
content_skaterift/sound/cs/ch2s3a.MIKE.ogg [new file with mode: 0644]
skaterift_blender/sr_mdl.py
skaterift_blender/sr_metascene.py
src/ent_npc.c
src/metascene.c
src/metascene.h
src/skaterift_script.c

diff --git a/content_skaterift/metascenes/ch1s2.ms b/content_skaterift/metascenes/ch1s2.ms
new file mode 100644 (file)
index 0000000..2b5872a
Binary files /dev/null and b/content_skaterift/metascenes/ch1s2.ms differ
diff --git a/content_skaterift/metascenes/ch1s3.ms b/content_skaterift/metascenes/ch1s3.ms
new file mode 100644 (file)
index 0000000..3d2576d
Binary files /dev/null and b/content_skaterift/metascenes/ch1s3.ms differ
diff --git a/content_skaterift/metascenes/ch1s3b.ms b/content_skaterift/metascenes/ch1s3b.ms
new file mode 100644 (file)
index 0000000..e760242
Binary files /dev/null and b/content_skaterift/metascenes/ch1s3b.ms differ
diff --git a/content_skaterift/metascenes/ch1s4.ms b/content_skaterift/metascenes/ch1s4.ms
new file mode 100644 (file)
index 0000000..4a4901f
Binary files /dev/null and b/content_skaterift/metascenes/ch1s4.ms differ
diff --git a/content_skaterift/metascenes/ch1s5.ms b/content_skaterift/metascenes/ch1s5.ms
new file mode 100644 (file)
index 0000000..74d1990
Binary files /dev/null and b/content_skaterift/metascenes/ch1s5.ms differ
diff --git a/content_skaterift/metascenes/ch1s6a.ms b/content_skaterift/metascenes/ch1s6a.ms
new file mode 100644 (file)
index 0000000..f9474b1
Binary files /dev/null and b/content_skaterift/metascenes/ch1s6a.ms differ
diff --git a/content_skaterift/metascenes/ch2s1.ms b/content_skaterift/metascenes/ch2s1.ms
new file mode 100644 (file)
index 0000000..ac8cef9
Binary files /dev/null and b/content_skaterift/metascenes/ch2s1.ms differ
diff --git a/content_skaterift/metascenes/ch2s2.ms b/content_skaterift/metascenes/ch2s2.ms
new file mode 100644 (file)
index 0000000..43abc64
Binary files /dev/null and b/content_skaterift/metascenes/ch2s2.ms differ
diff --git a/content_skaterift/metascenes/ch2s3a.ms b/content_skaterift/metascenes/ch2s3a.ms
new file mode 100644 (file)
index 0000000..73bfae6
Binary files /dev/null and b/content_skaterift/metascenes/ch2s3a.ms differ
index 92d3153bda7427d52c5479a418e8f496837c2f60..55afb317320afd8737219302dc241cf846d94ebf 100644 (file)
Binary files a/content_skaterift/playermodels/skaterift_chip/ch_chip.mdl and b/content_skaterift/playermodels/skaterift_chip/ch_chip.mdl differ
diff --git a/content_skaterift/sound/cs/03.JC.ogg b/content_skaterift/sound/cs/03.JC.ogg
new file mode 100644 (file)
index 0000000..844fad7
Binary files /dev/null and b/content_skaterift/sound/cs/03.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch1s2.JC.ogg b/content_skaterift/sound/cs/ch1s2.JC.ogg
new file mode 100644 (file)
index 0000000..6bdc1ee
Binary files /dev/null and b/content_skaterift/sound/cs/ch1s2.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch1s3.JC.ogg b/content_skaterift/sound/cs/ch1s3.JC.ogg
new file mode 100644 (file)
index 0000000..6dd7bb8
Binary files /dev/null and b/content_skaterift/sound/cs/ch1s3.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch1s3b.JC.ogg b/content_skaterift/sound/cs/ch1s3b.JC.ogg
new file mode 100644 (file)
index 0000000..d34a5a7
Binary files /dev/null and b/content_skaterift/sound/cs/ch1s3b.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch1s4.JC.ogg b/content_skaterift/sound/cs/ch1s4.JC.ogg
new file mode 100644 (file)
index 0000000..37bbd75
Binary files /dev/null and b/content_skaterift/sound/cs/ch1s4.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch1s5.JC.ogg b/content_skaterift/sound/cs/ch1s5.JC.ogg
new file mode 100644 (file)
index 0000000..348649c
Binary files /dev/null and b/content_skaterift/sound/cs/ch1s5.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch1s6a.JC.ogg b/content_skaterift/sound/cs/ch1s6a.JC.ogg
new file mode 100644 (file)
index 0000000..35cc628
Binary files /dev/null and b/content_skaterift/sound/cs/ch1s6a.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch2s1.JC.ogg b/content_skaterift/sound/cs/ch2s1.JC.ogg
new file mode 100644 (file)
index 0000000..442e849
Binary files /dev/null and b/content_skaterift/sound/cs/ch2s1.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch2s2.MIKE.ogg b/content_skaterift/sound/cs/ch2s2.MIKE.ogg
new file mode 100644 (file)
index 0000000..381a9b9
Binary files /dev/null and b/content_skaterift/sound/cs/ch2s2.MIKE.ogg differ
diff --git a/content_skaterift/sound/cs/ch2s3.JC.ogg b/content_skaterift/sound/cs/ch2s3.JC.ogg
new file mode 100644 (file)
index 0000000..3ce35a9
Binary files /dev/null and b/content_skaterift/sound/cs/ch2s3.JC.ogg differ
diff --git a/content_skaterift/sound/cs/ch2s3a.MIKE.ogg b/content_skaterift/sound/cs/ch2s3a.MIKE.ogg
new file mode 100644 (file)
index 0000000..2014e87
Binary files /dev/null and b/content_skaterift/sound/cs/ch2s3a.MIKE.ogg differ
index 79c2be9b664943fb48ba902e5ae0986ddd1b6d25..f348893b1a0e955e4267730b4344aeafe8cbb04f 100644 (file)
@@ -538,6 +538,9 @@ def _ent_font_compile( obj ):
 
 def _mdl_compiler_compile_entities():
 #{
+   prev_frame = bpy.context.scene.frame_current
+   bpy.context.scene.frame_set(0)
+
    for ent_type, arr in _mdl_compiler.entities.items():
    #{
       print(F"[SR] Compiling {len(arr)} {ent_type}{'s' if len(arr)>1 else ''}")
@@ -1036,6 +1039,8 @@ def _mdl_compiler_compile_entities():
          #}
       #}
    #}
+
+   bpy.context.scene.frame_set( prev_frame )
 #}
 
 def _mdl_compiler_add_arrays():
index 59ff0594a0fa4dc4a17182b2d2c10eea91828815..23cbaf692f86ab9573f9aa75cc66e714b16bde57 100644 (file)
@@ -37,7 +37,8 @@ def _ms_compiler_init():
 
 class ms_scene_info(Structure):
 #{
-   _fields_ = [("framerate",c_float)] 
+   _fields_ = [("framerate",c_float),
+               ("end_frame",c_uint32)] 
 #}
 
 class ms_curve_keyframe(Structure):
@@ -617,6 +618,7 @@ def _sr_export_metascene( path ):
 
    info = ms_scene_info()
    info.framerate = bpy.context.scene.render.fps
+   info.end_frame = bpy.context.scene.frame_end
 
    arrays = {
       'ms_strip': _ms_compiler.strips,
index 2c04b18eaca7aff3f0836663c8a999c3290bf76c..2fe394cbf5bbf89bc330e8bbe461aad4f57b49f5 100644 (file)
@@ -73,6 +73,8 @@ static struct npc *npc_resolve( u32 id )
 
 static entity_call_result npc_slowmo_call( ent_npc *npc, ent_call *call )
 {
+   return 0;
+
    if( call->function == 0 )
    {
       gui_helper_clear();
@@ -111,6 +113,8 @@ static entity_call_result npc_slowmo_call( ent_npc *npc, ent_call *call )
 
 entity_call_result ent_npc_call( world_instance *world, ent_call *call )
 {
+   return 0;
+
    u32 index = mdl_entity_id_id( call->id );
    ent_npc *npc = af_arritm( &world->ent_npc, index );
 
@@ -180,6 +184,8 @@ entity_call_result ent_npc_call( world_instance *world, ent_call *call )
 
 void ent_npc_preupdate( ent_focus_context *ctx )
 {
+   return; 
+
    world_instance *world = ctx->world;
    ent_npc *ent = af_arritm( &world->ent_npc, ctx->index );
 
@@ -233,6 +239,8 @@ void ent_npc_preupdate( ent_focus_context *ctx )
 
 void npc_update( ent_npc *ent )
 {
+   return;
+
    if( ent->id == 3 ) return;
    if( ent->id == 4 ) return;
 
@@ -271,6 +279,8 @@ void npc_update( ent_npc *ent )
 
 void npc_render( ent_npc *ent, world_instance *world, vg_camera *cam )
 {
+   return;
+
    if( ent->id == 3 ) return;
    if( ent->id == 4 ) return;
 
index b22c3e579760649646b27e0f52f035d89cbaad3c..31016f18e5efdc754a957b864dd63caf8638b8f7 100644 (file)
@@ -76,6 +76,11 @@ void _cutscene_play(void)
    audio_unlock();
 }
 
+void _cutscene_subtitle( const char *text )
+{
+   _cutscene.subtitle = text;
+}
+
 void _cutscene_unload(void)
 {
    vg_info( "Unloading cutscene\n" );
@@ -98,6 +103,7 @@ void _cutscene_unload(void)
    _cutscene.active_samplers = 0;
    _cutscene.state = k_cutscene_state_unloading;
    _cutscene.player_binding = NULL;
+   _cutscene_subtitle( NULL );
 }
 
 /*
@@ -756,11 +762,19 @@ void cutscene_update( f32 delta )
       vg_line_cross( cam->co, VG__RED, 0.2f );
    }
 
+#if 0
    if( (_cutscene.strip == af_arrcount(&_cutscene.meta.strips)) &&
        (_cutscene.active_samplers == 0 ) )
    {
       _cutscene.state = k_cutscene_state_done;
    }
+#endif
+
+   f32 scene_t = _cutscene.time * _cutscene.meta.info.framerate,
+       end_t   = _cutscene.meta.info.end_frame;
+
+   if( scene_t >= end_t )
+      _cutscene.state = k_cutscene_state_done;
 }
 
 void cutscene_render( world_instance *world, vg_camera *cam )
@@ -790,11 +804,6 @@ void _cutscene_gui( ui_context *ctx )
    }
 }
 
-void _cutscene_subtitle( const char *text )
-{
-   _cutscene.subtitle = text;
-}
-
 /* cutscene magi 
  * ----------------------------------------------------------------------------
  */
index f0435f72f072eff81e55e6341fe7f6e334c0de9d..796651578323d7e42448caa80772d168fe34522e 100644 (file)
@@ -17,6 +17,7 @@ typedef struct mdl_transform ms_keyframe;
 struct ms_scene_info
 {
    f32 framerate;
+   u32 end_frame;
 };
 
 struct ms_context
index 4ca9edc26900ecec5abddd470e436ce9c6c22152..1a07fbe2da006d9b50122a677a57d117dcede17d 100644 (file)
@@ -27,80 +27,188 @@ enum escript_state
 
 extern m4x3f *_TEMP_VAR;
 
-/* This is the development one */
-static bool _skaterift_script_test( enum escript_event ev, const char *inf )
+static bool _skaterift_script_bind_player(void)
 {
-   static u32 state;
+   _cutscene.player_binding = 
+      _cutscene_get_first_model_instance( "models/ch_none" );
+
+   if( !_cutscene.player_binding )
+   {
+      vg_error( "Failed to find models/ch_none in scene!" );
+      return 0;
+   }
+
+   return 1;
+}
+
+struct sr_subtitle
+{
+   const char *k, *v;
+};
+
+static void _skaterift_dialogue( struct sr_subtitle *subtitles, u32 *index,
+                                 const char *inf )
+{
+   u32 i = *index;
+
+   if( subtitles[i].k && vg_str_eq( inf, subtitles[ i ].k ) )
+      _cutscene_subtitle( subtitles[ i ++ ].v );
+
+   else if( vg_str_eq( inf, "clear_subs" ) )
+      _cutscene_subtitle( NULL );
+
+   *index = i;
+}
+
+static bool _skaterift_script_ch1s2( enum escript_event ev, const char *inf )
+{
+   static u32 state, subtitle_id;
    static struct cs_instance *override_inst;
-   static m4x3f *action_cam;
-   static bool action_mode;
 
    if( ev == k_escript_event_call )
    {
       state = k_escript_state_loading;
       override_inst = NULL;
-      action_cam = NULL;
-      action_mode = 0;
+      subtitle_id = 0;
       vg_info( "test:state = loading\n" );
    }
 
    if( ev == k_escript_event_cutscene_marker )
    {
-      if( vg_str_eq( inf, "action_cam" ) )
-         action_mode = 1;
+      struct sr_subtitle EN[] = {
+      { "john_1", KCOL_JOHN "Well, here we are. Home." },
+      { "john_2", KCOL_JOHN "I mean, halfway home." },
+      { "john_3", KCOL_JOHN "Obviously you've forgotten quite a bit, so we'll stop off here" },
+      { "john_4", KCOL_JOHN "and I'll teach you some stuff again" },
+      { NULL, NULL },
+      };
+      _skaterift_dialogue( EN, &subtitle_id, inf );
 
-      if( vg_str_eq( inf, "john_line_0" ) )
-         _cutscene_subtitle( KCOL_JOHN "Mike mike mike, I need you to get over here now" );
+      return 0;
+   }
 
-      if( vg_str_eq( inf, "mike_line_0" ) )
-         _cutscene_subtitle( KCOL_MIKE "What is it now JC?" );
+   /* scene 
+    * ---------------------------------------------------------------  */
 
-      if( vg_str_eq( inf, "john_line_1" ) )
-         _cutscene_subtitle( KCOL_JOHN "Well we were out here, shooting this massive gap right?" );
+   if( state == k_escript_state_loading )
+   {
+      if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch1s2.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( vg_str_eq( inf, "john_line_1a" ) )
-         _cutscene_subtitle( KCOL_JOHN "It was gonna be the perfect shot, and it was going so good" );
+   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;
+      }
+   }
 
-      if( vg_str_eq( inf, "john_line_2" ) )
-         _cutscene_subtitle( KCOL_JOHN "Intro was perfect, got the perfect frame, angles lighting. PERFECT" );
+   return 0;
+}
 
+static bool _skaterift_script_ch1s3( enum escript_event ev, const char *inf )
+{
+   static u32 state, subtitle_id;
+   static struct cs_instance *override_inst;
 
-      if( vg_str_eq( inf, "mike_line_1" ) )
-         _cutscene_subtitle( KCOL_MIKE "Whatever mate, what happened?" );
+   if( ev == k_escript_event_call )
+   {
+      state = k_escript_state_loading;
+      override_inst = NULL;
+      subtitle_id = 0;
+      vg_info( "test:state = loading\n" );
+   }
 
-      if( vg_str_eq( inf, "john_line_3" ) )
-         _cutscene_subtitle( KCOL_JOHN "Uh yeah yeah, we were about 10 floors up right?" );
+   if( ev == k_escript_event_cutscene_marker )
+   {
+      struct sr_subtitle EN[] = {
+      { "john_1", KCOL_JOHN "Alright so, fliptricks." },
+      { "john_2", KCOL_JOHN "We spent ages practicing these before" },
+      { "john_3", KCOL_JOHN "Shouldn't take you long to get it again" },
+      { "john_4", KCOL_JOHN "see if you can get a tre-flip down there" },
+      { NULL, NULL },
+      };
+      _skaterift_dialogue( EN, &subtitle_id, inf );
 
-      if( vg_str_eq( inf, "john_line_3a" ) )
-         _cutscene_subtitle( KCOL_JOHN "Yeah uhhh, they didn't make the gap." );
+      return 0;
+   }
 
-      if( vg_str_eq( inf, "john_line_4" ) )
-         _cutscene_subtitle( KCOL_JOHN "And im im freaking out here man, it was worst case" );
+   /* scene 
+    * ---------------------------------------------------------------  */
 
-      if( vg_str_eq( inf, "john_line_4a" ) )
-         _cutscene_subtitle( KCOL_JOHN "I mean.. WORST CASE" );
+   if( state == k_escript_state_loading )
+   {
+      if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch1s3.ms" } ) )
+      {
+         state = k_escript_state_initializing;
+         vg_info( "test:state = initializing\n" );
+      }
+   }
 
-      if( vg_str_eq( inf, "mike_line_2" ) )
-         _cutscene_subtitle( KCOL_MIKE "yeaahkay, what are you doing calling me instead of an ambo?" );
+   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( vg_str_eq( inf, "john_line_5" ) )
-         _cutscene_subtitle( KCOL_JOHN "I thought you could help us!" );
+   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;
+      }
+   }
 
-      if( vg_str_eq( inf, "mike_line_3" ) )
-         _cutscene_subtitle( KCOL_MIKE "Hang up, and call tripple zero mate" );
+   return 0;
+}
 
-      if( vg_str_eq( inf, "mike_line_3a" ) )
-         _cutscene_subtitle( KCOL_MIKE "Did you even check if they were okay?" );
+static bool _skaterift_script_ch1s3b( enum escript_event ev, const char *inf )
+{
+   static u32 state, subtitle_id;
+   static struct cs_instance *override_inst;
 
-      if( vg_str_eq( inf, "john_line_6" ) )
-         _cutscene_subtitle( KCOL_JOHN "Holy crap, you're still alive!" );
-      if( vg_str_eq( inf, "john_line_6a" ) )
-         _cutscene_subtitle( KCOL_JOHN "Nevermind Mike, cheers" );
-      if( vg_str_eq( inf, "john_line_7" ) )
-         _cutscene_subtitle( KCOL_JOHN "Lets get out of here mate." );
+   if( ev == k_escript_event_call )
+   {
+      state = k_escript_state_loading;
+      override_inst = NULL;
+      subtitle_id = 0;
+      vg_info( "test:state = loading\n" );
+   }
 
-      if( vg_str_eq( inf, "clear_subs" ) )
-         _cutscene_subtitle( NULL );
+   if( ev == k_escript_event_cutscene_marker )
+   {
+      struct sr_subtitle EN[] = {
+      { "john_1", KCOL_JOHN "That is it mate!" },
+      { "john_2", KCOL_JOHN "You have still got it!" },
+      { NULL, NULL },
+      };
+      _skaterift_dialogue( EN, &subtitle_id, inf );
 
       return 0;
    }
@@ -110,7 +218,7 @@ static bool _skaterift_script_test( enum escript_event ev, const char *inf )
 
    if( state == k_escript_state_loading )
    {
-      if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/test_scene.ms" } ) )
+      if( cmd_cutscene_load( 1, (const char *[]){ "metascenes/ch1s3b.ms" } ) )
       {
          state = k_escript_state_initializing;
          vg_info( "test:state = initializing\n" );
@@ -121,13 +229,531 @@ static bool _skaterift_script_test( enum escript_event ev, const char *inf )
    {
       if( _cutscene.state == k_cutscene_state_ready )
       {
-         override_inst = _cutscene_get_first_model_instance( "models/ch_none" );
+         _skaterift_script_bind_player();
+         state = k_escript_state_playing;
+         vg_info( "test:state = playing\n" );
+         _cutscene_play();
+      }
+   }
 
-         if( !override_inst )
-         {
-            vg_error( "test: Failed to find player target" );
-            return 1;
-         }
+   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_ch1s4( 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[] = {
+      { "john_1", KCOL_JOHN "Remember these courses we were setting up?" },
+      { "john_2", KCOL_JOHN "Nah?" },
+      { "john_3", KCOL_JOHN "Alright well uh, to jog your memory.." },
+      { "john_4", KCOL_JOHN "Get yourself down through the gates as quick as possible" },
+      { "john_5", KCOL_JOHN "Thats it." },
+      { "john_6", KCOL_JOHN "Give it a shot mate" },
+      { 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/ch1s4.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_ch1s5( 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 "Alright, well then" },
+      { "j2", KCOL_JOHN "You're gonna need to play close attention to this part" },
+      { "j3", KCOL_JOHN "because its difficult.." },
+      { "j4", KCOL_JOHN "It's gonna take some practice until it clicks" },
+      { "j5", KCOL_JOHN "Right as you like, go across the transition of the ramp," },
+      { "j6", KCOL_JOHN "Right here," },
+      { "j7", KCOL_JOHN "you need to pump to gain some momentum." },
+
+      { "j8", KCOL_JOHN "What I mean right, watch" },
+      { "j9", KCOL_JOHN "just as I'm going into the base of the ramp" },
+      { "j10",KCOL_JOHN "I'm storing up some energy here by crouching down" },
+      { "j11",KCOL_JOHN "Right as I go across this point" },
+      { "j12",KCOL_JOHN "I'm almost jumping back up, adding some uwpwards momentum" },
+
+      { "j13",KCOL_JOHN "Then as the board comes up to this angle.." },
+      { "j14",KCOL_JOHN "that upwards momentum is transferred into my speed" },
+
+      { "j15",KCOL_JOHN "Same principle works, same way in the other direction" },
+
+      { "j16",KCOL_JOHN "Now, like I'm saying" },
+      { "j17",KCOL_JOHN "this might take you a little bit until it clicks" },
+
+      { "j18",KCOL_JOHN "But once it does you'll feel it. You'll know!" },
+
+      { "j19",KCOL_JOHN "And I uhh, set a target for you" },
+      { "j20",KCOL_JOHN "right up there.." },
+      { "j21",KCOL_JOHN "Thats how we'll know you're back on form." },
+
+      { "j22",KCOL_JOHN "Come see me at the docks once you've got 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/ch1s5.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_ch1s6a( 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 "Eyyy! Looks like you're ready again.." },
+      { "j2", KCOL_JOHN "Didn't take long" },
+      { "j3", KCOL_JOHN "Just a short ferry ride back over to Mt.Zero now." },
+      { "j4", KCOL_JOHN "Oh right, Mt.Zero.. You really don't remember anything do you?" },
+      { "j5", KCOL_JOHN "Its where we live." },
+      { "j7", KCOL_JOHN "Yknow it's where the woodshop is," },
+      { "j8", KCOL_JOHN "It's where we skate, where Mike is," },
+      { "j9", KCOL_JOHN "yknow, its our home!" },
+
+      { 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/ch1s6a.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_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?" },
+      { 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;
+}
+
+/* This is the development one */
+static bool _skaterift_script_test( enum escript_event ev, const char *inf )
+{
+   static u32 state;
+   static m4x3f *action_cam;
+   static bool action_mode;
+   static u32 subtitle_id;
+
+   if( ev == k_escript_event_call )
+   {
+      state = k_escript_state_loading;
+      action_cam = NULL;
+      action_mode = 0;
+      subtitle_id = 0;
+      vg_info( "test:state = loading\n" );
+   }
+
+   if( ev == k_escript_event_cutscene_marker )
+   {
+      if( vg_str_eq( inf, "action_cam" ) )
+         action_mode = 1;
+
+      struct sr_subtitle EN[] = {
+      { "john_line_0", KCOL_JOHN "Mike mike mike, I need you to get over here now" },
+      { "mike_line_0", KCOL_MIKE "What is it now JC?" },
+      { "john_line_1", KCOL_JOHN "Well we were out here, shooting this massive gap right?" },
+      { "john_line_1a",KCOL_JOHN "It was gonna be the perfect shot, and it was going so good" },
+      { "john_line_2", KCOL_JOHN "Intro was perfect, got the perfect frame, angles lighting. PERFECT" },
+      { "mike_line_1", KCOL_MIKE "Whatever mate, what happened?" },
+      { "john_line_3", KCOL_JOHN "Uh yeah yeah, we were about 10 floors up right?" },
+      { "john_line_3a",KCOL_JOHN "Yeah uhhh, they didn't make the gap." },
+      { "john_line_4", KCOL_JOHN "And im im freaking out here man, it was worst case" },
+      { "john_line_4a",KCOL_JOHN "I mean.. WORST CASE" },
+      { "mike_line_2", KCOL_MIKE "yeaahkay, what are you doing calling me instead of an ambo?" },
+      { "john_line_5", KCOL_JOHN "I thought you could help us!" },
+      { "mike_line_3", KCOL_MIKE "Hang up, and call tripple zero mate" },
+      { "mike_line_3a",KCOL_MIKE "Did you even check if they were okay?" },
+      { "john_line_6", KCOL_JOHN "Holy crap, you're still alive!" },
+      { "john_line_6a",KCOL_JOHN "Nevermind Mike, cheers" },
+      { "john_line_7", KCOL_JOHN "Lets get out of here mate." },
+      { 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/test_scene.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();
 
          struct cs_instance *boogie_inst = 
             _cutscene_get_first_model_instance( "models/boogie_van" );
@@ -161,7 +787,6 @@ static bool _skaterift_script_test( enum escript_event ev, const char *inf )
 
          state = k_escript_state_playing;
          vg_info( "test:state = playing\n" );
-         _cutscene.player_binding = override_inst;
          _cutscene_play();
       }
    }
@@ -188,6 +813,15 @@ static bool _skaterift_script_test( enum escript_event ev, const char *inf )
 enum escript_script_id
 {
    k_escript_script_id_test = 0,
+   k_escript_script_id_ch1s2,
+   k_escript_script_id_ch1s3,
+   k_escript_script_id_ch1s3b,
+   k_escript_script_id_ch1s4,
+   k_escript_script_id_ch1s5,
+   k_escript_script_id_ch1s6a,
+   k_escript_script_id_ch2s1,
+   k_escript_script_id_ch2s2,
+   k_escript_script_id_ch2s3a,
    k_escript_script_id_max 
 };
 
@@ -204,7 +838,16 @@ struct script_binding
 }
 _script_bindings[] =
 {
-   [k_escript_script_id_test] = { "test", _skaterift_script_test }
+   [k_escript_script_id_test] = { "test", _skaterift_script_test },
+   [k_escript_script_id_ch1s2] = { "ch1s2", _skaterift_script_ch1s2 },
+   [k_escript_script_id_ch1s3] = { "ch1s3", _skaterift_script_ch1s3 },
+   [k_escript_script_id_ch1s3b] = { "ch1s3b", _skaterift_script_ch1s3b },
+   [k_escript_script_id_ch1s4] = { "ch1s4", _skaterift_script_ch1s4 },
+   [k_escript_script_id_ch1s5] = { "ch1s5", _skaterift_script_ch1s5 },
+   [k_escript_script_id_ch1s6a] = { "ch1s6a", _skaterift_script_ch1s6a },
+   [k_escript_script_id_ch2s1] = { "ch2s1", _skaterift_script_ch2s1 },
+   [k_escript_script_id_ch2s2] = { "ch2s2", _skaterift_script_ch2s2 },
+   [k_escript_script_id_ch2s3a] = { "ch2s3a", _skaterift_script_ch2s3a },
 };
 
 static int _skaterift_script_hook( int argc, const char *argv[] )