Win32 - Lua - a -lua commandline argument added. Loads a lua script on startup.
This commit is contained in:
parent
c998ec322c
commit
d2cae8aef0
|
@ -1,4 +1,5 @@
|
|||
---version 2.0.4 yet to be released---
|
||||
21-feb-2009 - adelikat - win32 - Lua - Added -lua commandline argment, loads a lua script on startup
|
||||
21-feb-2009 - adelikat - win32 - Debugger - Added pixel display after scanline display - Thanks to DWEdit for this patch
|
||||
21-feb-2009 - adelikat - win32 - Debugger - Added Run Line, Run 128 Lines buttons - Thanks to DWEdit for this patch
|
||||
21-feb-2009 - adelikat - win32 - Message Log - remembers X,Y position
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
char* MovieToLoad = 0; //Loads a movie file on startup
|
||||
char* StateToLoad = 0; //Loads a savestate on startup (after a movie is loaded, if any)
|
||||
char* ConfigToLoad = 0; //Loads a specific .cfg file (loads before any other commandline options
|
||||
char* LuaToLoad = 0; //Loads a specific lua file
|
||||
extern bool turbo;
|
||||
|
||||
// TODO: Parsing arguments needs to be improved a lot. A LOT.
|
||||
|
@ -44,6 +45,7 @@ char *ParseArgies(int argc, char *argv[])
|
|||
{"-clipsides",0,&eoptions,0x8000|EO_CLIPSIDES},
|
||||
{"-nothrottle",0,&eoptions,0x8000|EO_NOTHROTTLE},
|
||||
{"-playmovie",0,&MovieToLoad,0x4001},
|
||||
{"-lua",0,&LuaToLoad,0x4001},
|
||||
{"-loadstate",0,&StateToLoad,0x4001},
|
||||
{"-readonly",0,&replayReadOnlySetting,0},
|
||||
{"-stopframe",0,&replayStopFrameSetting,0},
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
extern char* MovieToLoad; //Contains the filename of the savestate specified in the command line argument
|
||||
extern char* StateToLoad; //Contains the filename of the movie file specified in the command line argument
|
||||
extern char* ConfigToLoad; //Conatins the filename of the config file specified in the command line argument
|
||||
extern char* ConfigToLoad; //Contains the filename of the config file specified in the command line argument
|
||||
extern char* LuaToLoad; //Contains the filename of the lua script specified in the command line argument
|
||||
extern bool replayReadOnlySetting;
|
||||
extern int replayStopFrameSetting;
|
||||
extern int PauseAfterLoad;
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
// External functions
|
||||
extern std::string cfgFile; //Contains the filename of the config file used.
|
||||
extern bool turbo; //Is game in turbo mode?
|
||||
extern int FCEU_LoadLuaCode(const char *filename); //From lua-engine.cpp. Used here to auto-load a lua script from commandline
|
||||
void ResetVideo(void);
|
||||
void ShowCursorAbs(int w);
|
||||
void HideFWindow(int h);
|
||||
|
@ -679,6 +680,12 @@ int main(int argc,char *argv[])
|
|||
free(StateToLoad);
|
||||
StateToLoad = NULL;
|
||||
}
|
||||
if(LuaToLoad);
|
||||
{
|
||||
FCEU_LoadLuaCode(LuaToLoad);
|
||||
free(LuaToLoad);
|
||||
LuaToLoad = NULL;
|
||||
}
|
||||
if (MemWatchLoadOnStart) CreateMemWatch();
|
||||
if (PauseAfterLoad) FCEUI_ToggleEmulationPause();
|
||||
SetAutoFirePattern(AFon, AFoff);
|
||||
|
|
Loading…
Reference in New Issue