* (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:
seth 2017-10-02 13:48:06 +00:00
parent 7b57f6f277
commit 36a414e12a
12 changed files with 96 additions and 52 deletions

View file

@ -216,7 +216,14 @@ void OnDMODUnpackStatusUpdate(VariantList *pVList)
float progress = float( (curBytes%barSize)) /float(barSize);
//LogMsg("prog: %.2f", progress);
DMODInstallUpdateStatus(NULL, "Writing "+toString(curBytes/1024)+"K");
int installSize = curBytes / 1024;
string sizeType = "K";
if (installSize > 10000)
{
installSize /= 1024;
sizeType = "MB";
}
DMODInstallUpdateStatus(NULL, "Writing "+toString(installSize)+ " "+sizeType);
DMODInstallSetProgressBar(progress);
}
@ -249,8 +256,9 @@ void OnDMODInstallHTTPFinish(VariantList *pVList)
DMODSetTitleLabel(pMenu, string("Installing ")+pMenu->GetVar("originalFileName")->GetString()+"...");
EntityComponent *pUnpack = pMenu->AddComponent(new UnpackArchiveComponent);
pUnpack->GetVar("sourceFileName")->Set(pMenu->GetVar("tempFileName")->GetString());
pUnpack->GetVar("deleteSourceOnFinish")->Set(uint32(1));
bool bDeleteOnFinish = pMenu->GetVar("deleteOnFinish")->GetUINT32();
pUnpack->GetVar("deleteSourceOnFinish")->Set(uint32(bDeleteOnFinish));
pUnpack->GetVar("destDirectory")->Set(pMenu->GetVar("installDirectory")->GetString());
DMODInstallSetProgressBar(0);
@ -310,7 +318,7 @@ void InitNetStuff(VariantList *pVList)
}
Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string installDirectory, string sourceFileName, bool bFromBrowseMenu, string dmodName)
Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string installDirectory, string sourceFileName, bool bFromBrowseMenu, string dmodName, bool bDeleteOnFinish)
{
Entity *pBG = CreateOverlayEntity(pParentEnt, "DMODInstall", ReplaceWithDeviceNameInFileName("interface/iphone/bkgd_stone.rttex"), 0,0);
@ -331,11 +339,12 @@ Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string instal
pBG->GetVar("tempFileName")->Set(GetDMODRootPath()+"temp.dmod");
pBG->GetVar("originalFileName")->Set(GetFileNameFromString(dmodURL));
pBG->GetVar("fromBrowseMenu")->Set(uint32(bFromBrowseMenu));
pBG->GetVar("deleteOnFinish")->Set(uint32(bDeleteOnFinish));
if (IsLargeScreen())
{
//SetupTextEntity(pTitleLabel, FONT_LARGE);
}
//SetAlignmentEntity(pTitleLabel, ALIGNMENT_CENTER);
EntityComponent *pTyper = pTitleLabel->AddComponent(new TyperComponent);
@ -370,6 +379,11 @@ Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string instal
pBG->GetVar("exitto")->Set("browse");
}
if (!bDeleteOnFinish)
{
pBG->GetVar("autoplay")->Set(uint32(1));
}
if (!sourceFileName.empty())
{