* (Windows) Running "dink.exe c:\temp\ACoolDMOD.dmod" from the command line will now install it, then run it. (original dmod file won't be deleted) Just seemed weird that this didn't exist so added it
* DMOD installer progress now switches to showing MB instead of K if the size is big * BUGFIX: Fixed map loading bug that could crash the game (I added this one recently trying to clean up code to use more consts rather than magic #s, but there is always the risk I stupidely break something!) * load_tile no longer instantly takes effect but requires a draw_screen or moving screens, this matches how 1.08 worked. Loading a save state or resizing the window will cause it to happen early, but hey, close enough * BUGFIX: Fixed extra nasty bug where logic on certain things like charging your magic would pause the amount of time you used TAB to skip time git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1517 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
7b57f6f277
commit
36a414e12a
12 changed files with 96 additions and 52 deletions
|
@ -209,10 +209,30 @@ void MainMenuOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity sen
|
|||
}
|
||||
|
||||
|
||||
string GetNextDMODToInstall()
|
||||
string GetNextDMODToInstall(bool &bIsCommandLineInstall, const bool bDeleteCommandLineParms)
|
||||
{
|
||||
//if (!GetApp()->CanDownloadDMODS()) return ""; //ignore it
|
||||
|
||||
if (IsDesktop())
|
||||
{
|
||||
vector<string> parms = GetApp()->GetCommandLineParms();
|
||||
|
||||
for (int i = 0; i < parms.size(); i++)
|
||||
{
|
||||
StringReplace("\"", "", parms[i]);
|
||||
if (IsInString(ToLowerCaseString(parms[i]), ".dmod"))
|
||||
{
|
||||
bIsCommandLineInstall = true;
|
||||
|
||||
//dmod sent via commandline, install it
|
||||
if (bDeleteCommandLineParms)
|
||||
GetApp()->GetReferenceToCommandLineParms()[i].clear(); //don't want to install the same dmod twice
|
||||
return parms[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
vector<string> files = GetFilesAtPath(GetSavePath());
|
||||
|
||||
//LogMsg("listing files");
|
||||
|
@ -240,10 +260,13 @@ void MainOnStartLoading(VariantList *pVList)
|
|||
GetMessageManager()->CallEntityFunction(pBG, 500, "OnDelete", NULL);
|
||||
pBG->SetName("MainMenuDelete");
|
||||
|
||||
string fName = GetNextDMODToInstall();
|
||||
bool bIsCommandLineInstall = true;
|
||||
|
||||
string fName = GetNextDMODToInstall(bIsCommandLineInstall, true);
|
||||
|
||||
if (!fName.empty())
|
||||
{
|
||||
DMODInstallMenuCreate(pBG->GetParent(), "", GetDMODRootPath(), GetSavePath()+fName);
|
||||
DMODInstallMenuCreate(pBG->GetParent(), "", GetDMODRootPath(), GetSavePath()+fName, false, "", !bIsCommandLineInstall);
|
||||
} else
|
||||
{
|
||||
GameCreate(pBG->GetParent(), 0, fileName, "Continuing last game...");
|
||||
|
@ -606,9 +629,10 @@ Entity * MainMenuCreate( Entity *pParentEnt, bool bFadeIn )
|
|||
}
|
||||
}
|
||||
|
||||
bool bIsCommandLineInstall = false;
|
||||
|
||||
|
||||
|
||||
if ( ! GetNextDMODToInstall().empty())
|
||||
if ( ! GetNextDMODToInstall(bIsCommandLineInstall, false).empty())
|
||||
{
|
||||
pBG->GetFunction("OnStartLoading")->sig_function.connect(&MainOnStartLoading);
|
||||
VariantList vList(pBG, string(""));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue