From 8ec8032061cda47dee2245b66abad4844f93e482 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 1 Aug 2015 18:16:40 -0400 Subject: [PATCH] lua - implement movie.startsfromsavestate() and movie.startsfromsaveram() --- .../lua/EmuLuaLibrary.Movie.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.Movie.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.Movie.cs index 3eca37aa5e..67547ad2dc 100644 --- a/BizHawk.Client.Common/lua/EmuLuaLibrary.Movie.cs +++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.Movie.cs @@ -14,6 +14,24 @@ namespace BizHawk.Client.Common public override string Name { get { return "movie"; } } + [LuaMethodAttributes( + "startsfromsavestate", + "Returns whether or not the movie is a savestate-anchored movie" + )] + public bool StartsFromSavestate() + { + return Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie.StartsFromSavestate; + } + + [LuaMethodAttributes( + "startsfromsaveram", + "Returns whether or not the movie is a saveram-anchored movie" + )] + public bool StartsFromSaveram() + { + return Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie.StartsFromSaveRam; + } + [LuaMethodAttributes( "insertframe", "Inserts a log entry string into the specified index of the movie input log"