Lua - implement movie.isloaded() and movie.length()

This commit is contained in:
adelikat 2012-03-18 19:33:38 +00:00
parent 951721bb39
commit e695263eba
1 changed files with 17 additions and 0 deletions

View File

@ -287,8 +287,11 @@ namespace BizHawk.MultiClient
public static string[] MovieFunctions = new string[] { public static string[] MovieFunctions = new string[] {
"mode", "mode",
"isloaded",
"rerecordcount", "rerecordcount",
"length",
"stop", "stop",
//"rerecordcounting",
}; };
public static string[] JoypadFunctions = new string[] { public static string[] JoypadFunctions = new string[] {
@ -1046,11 +1049,25 @@ namespace BizHawk.MultiClient
{ {
return Global.MovieSession.Movie.Rerecords.ToString(); return Global.MovieSession.Movie.Rerecords.ToString();
} }
public void movie_stop() public void movie_stop()
{ {
Global.MovieSession.Movie.StopMovie(); 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 //Joypad library
//---------------------------------------------------- //----------------------------------------------------