From e695263ebac23bb0070f3fe6b6a1dccc57d58167 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 18 Mar 2012 19:33:38 +0000 Subject: [PATCH] Lua - implement movie.isloaded() and movie.length() --- BizHawk.MultiClient/LuaImplementation.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/BizHawk.MultiClient/LuaImplementation.cs b/BizHawk.MultiClient/LuaImplementation.cs index 10743c6e43..7a13e79462 100644 --- a/BizHawk.MultiClient/LuaImplementation.cs +++ b/BizHawk.MultiClient/LuaImplementation.cs @@ -287,8 +287,11 @@ namespace BizHawk.MultiClient public static string[] MovieFunctions = new string[] { "mode", + "isloaded", "rerecordcount", + "length", "stop", + //"rerecordcounting", }; public static string[] JoypadFunctions = new string[] { @@ -1046,11 +1049,25 @@ namespace BizHawk.MultiClient { return Global.MovieSession.Movie.Rerecords.ToString(); } + public void movie_stop() { Global.MovieSession.Movie.StopMovie(); } + public bool movie_isloaded() + { + if (Global.MovieSession.Movie.Mode == MOVIEMODE.INACTIVE) + return false; + else + return true; + } + + public int movie_length() + { + return Global.MovieSession.Movie.Length(); + } + //---------------------------------------------------- //Joypad library //----------------------------------------------------