From 8bb8c9e86d72ee57270eaaa41cf3e9ee00a54641 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 15 Mar 2009 23:55:07 +0000 Subject: [PATCH] Lua - added movie.playbeginning() --- changelog.txt | 2 +- src/lua-engine.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index f2cb4859..f88197df 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,5 @@ ---version 2.0.4 yet to be released--- -15-mar-2009 - adelikat - Lua - added movie.rerecordcount(), movie.length(), movie.getname, FCEU.getreadonly(), FCEU.setreadonly() +15-mar-2009 - adelikat - Lua - added movie.rerecordcount(), movie.length(), movie.getname(), movie.playbeginning(), FCEU.getreadonly(), FCEU.setreadonly() 14-mar-2009 - adelikat - Lua - added movie.active() - returns a bool value based on whether a movie is currently loaded 14-mar-2009 - adelikat - Fixed Joypad.set, it uses 3 values instead of 2 now. True will take control of a button and make it on, False will take control and make it off, and Nil will not take control (allowing the user to press the button) 14-mar-2009 - adelikat - Fix major crash issue where NROM game savestates were writing erroneous information if a non NROM game was loaded prior diff --git a/src/lua-engine.cpp b/src/lua-engine.cpp index 65ddd85e..7a492a4b 100644 --- a/src/lua-engine.cpp +++ b/src/lua-engine.cpp @@ -1004,6 +1004,16 @@ static int movie_getname (lua_State *L) { return 1; } +//movie.playbeginning +// +//calls the play movie from beginning function +static int movie_playbeginning (lua_State *L) { + + FCEUI_MoviePlayFromBeginning(); + + return 0; +} + // Common code by the gui library: make sure the screen array is ready static void gui_prepare() { if (!gui_data) @@ -1913,6 +1923,7 @@ static const struct luaL_reg movielib[] = { {"length", movie_length}, {"rerecordcount", movie_rerecordcount}, {"getname", movie_getname}, + {"playbeginning", movie_playbeginning}, // {"record", movie_record}, // {"playback", movie_playback},