diff --git a/changelog.txt b/changelog.txt index d24836fd..b89cb223 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +24-jun-2009 - adelikat - win32 - 24-jun-2009 - adelikat - win32 - Sound Dialog - cleanup, when sound is off, all controls are grayed out 24-jun-2009 - adelikat - win32 - Hex Editor - Drag & Drop for .tbl files 24-jun-2009 - adelikat - win32 - Drag & Drop for .fcm, it converts and then loads the converted movie automatically diff --git a/src/drivers/win/args.cpp b/src/drivers/win/args.cpp index a693e762..caa3b155 100644 --- a/src/drivers/win/args.cpp +++ b/src/drivers/win/args.cpp @@ -27,6 +27,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 +char* PaletteToLoad = 0; //Loads a specific palette file extern bool turbo; // TODO: Parsing arguments needs to be improved a lot. A LOT. @@ -46,6 +47,7 @@ char *ParseArgies(int argc, char *argv[]) {"-nothrottle",0,&eoptions,0x8000|EO_NOTHROTTLE}, {"-playmovie",0,&MovieToLoad,0x4001}, {"-lua",0,&LuaToLoad,0x4001}, + {"-palette",0,&PaletteToLoad,0x4001}, {"-loadstate",0,&StateToLoad,0x4001}, {"-readonly",0,&replayReadOnlySetting,0}, {"-stopframe",0,&replayStopFrameSetting,0}, diff --git a/src/drivers/win/args.h b/src/drivers/win/args.h index 1dba10e2..5511bd6d 100644 --- a/src/drivers/win/args.h +++ b/src/drivers/win/args.h @@ -1,7 +1,8 @@ -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; //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 char* MovieToLoad; //Contains the filename of the savestate specified in the command line arguments +extern char* StateToLoad; //Contains the filename of the movie file specified in the command line arguments +extern char* ConfigToLoad; //Contains the filename of the config file specified in the command line arguments +extern char* LuaToLoad; //Contains the filename of the lua script specified in the command line arguments +extern char* PaletteToLoad; //Contains the filename of the palette file specified in teh comman line arguments extern bool replayReadOnlySetting; extern int replayStopFrameSetting; extern int PauseAfterLoad; diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index e2848000..b1f44488 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -57,7 +57,7 @@ #include "cdlogger.h" #include "throttle.h" #include "tasedit.h" - +#include "palette.h" //For the SetPalette function #include "main.h" #include "args.h" #include "config.h" @@ -637,7 +637,7 @@ int main(int argc,char *argv[]) // Initialize default directories CreateDirs(); SetDirs(); - + DoVideoConfigFix(); DoTimingConfigFix(); @@ -676,6 +676,12 @@ int main(int argc,char *argv[]) LoadNewGamey(hAppWnd, 0); } + if(PaletteToLoad) + { + SetPalette(PaletteToLoad); + free(PaletteToLoad); + PaletteToLoad = NULL; + } if(GameInfo && MovieToLoad) {