Ticket #3258: t3258_rename_autostart_visualreplay_v1.patch
File t3258_rename_autostart_visualreplay_v1.patch, 1.6 KB (added by , 9 years ago) |
---|
-
source/ps/GameSetup/GameSetup.cpp
void EarlyInit() 879 879 srand(time(NULL)); // NOTE: this rand should *not* be used for simulation! 880 880 } 881 881 882 882 bool Autostart(const CmdLineArgs& args); 883 883 884 // Returns true if and only if the user has intended to replay a file 885 bool VisualReplay(const std::string replayFile); 884 /** 885 * Returns true if the user has intended to start a visual replay from command line. 886 */ 887 bool AutostartVisualReplay(const std::string replayFile); 886 888 887 889 bool Init(const CmdLineArgs& args, int flags) 888 890 { 889 891 h_mgr_init(); 890 892 … … void InitGraphics(const CmdLineArgs& arg 1072 1074 if (VfsDirectoryExists(L"maps/")) 1073 1075 CXeromyces::AddValidator(g_VFS, "map", "maps/scenario.rng"); 1074 1076 1075 1077 try 1076 1078 { 1077 if (! VisualReplay(args.Get("replay-visual")) && !Autostart(args))1079 if (!AutostartVisualReplay(args.Get("replay-visual")) && !Autostart(args)) 1078 1080 { 1079 1081 const bool setup_gui = ((flags & INIT_NO_GUI) == 0); 1080 1082 // We only want to display the splash screen at startup 1081 1083 shared_ptr<ScriptInterface> scriptInterface = g_GUI->GetScriptInterface(); 1082 1084 JSContext* cx = scriptInterface->GetContext(); … … bool Autostart(const CmdLineArgs& args) 1469 1471 } 1470 1472 1471 1473 return true; 1472 1474 } 1473 1475 1474 bool VisualReplay(const std::string replayFile)1476 bool AutostartVisualReplay(const std::string replayFile) 1475 1477 { 1476 1478 if (!FileExists(OsPath(replayFile))) 1477 1479 return false; 1478 1480 1479 1481 g_Game = new CGame(false, false);