* Made Dink HD work with DFArc. Either you can put DFArc in the Dink HD dir and add "dmods" as the additional dmod directory so it can find
mods installed by Dink HD too, or you can keep Dink HD completely separate, and enter the full path/exe to Dink HD's .exe in DFArc config and that works too. It's kind of weird that Dink HD puts its mods in a subdir called "dmods" as compared to the original Dink which useds its root dir. I could change that but.. meh. * Added support for -window and -debug from the command line. Dink HD remembers the last setting already, so -window would only have any effect if it was last used as fullscreen * Added Dan Walma's improved shadow patch git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1497 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
69019d227e
commit
52c51c8a45
5 changed files with 159 additions and 41 deletions
|
@ -92,7 +92,7 @@ int32 g_nlist[10];
|
|||
char in_default[200];
|
||||
bool g_bInitiateScreenMove;
|
||||
bool g_bTransitionActive;
|
||||
bool g_script_debug_mode;
|
||||
bool g_script_debug_mode =false;
|
||||
uint16 decipher_savegame;
|
||||
uint32 g_soundTimer = 0;
|
||||
|
||||
|
@ -16211,7 +16211,7 @@ void SetDefaultVars(bool bFullClear)
|
|||
g_dglos.g_stopEntireGame = 0;
|
||||
g_bInitiateScreenMove = false;
|
||||
g_bTransitionActive = false;
|
||||
g_script_debug_mode = false;
|
||||
|
||||
#ifdef _DEBUG
|
||||
//g_script_debug_mode = true; //script debugging mode. Alt-D toggles this also, plus there is a toggle on the debug menu
|
||||
#endif
|
||||
|
@ -16310,52 +16310,66 @@ string GetDMODRootPath(string *pDMODNameOutOrNull)
|
|||
#if defined(WIN32) || defined(PLATFORM_HTML5)
|
||||
|
||||
string dmodpath = "dmods/";
|
||||
string refdir = "";
|
||||
|
||||
vector<string> parms = GetBaseApp()->GetCommandLineParms();
|
||||
|
||||
for (int i=0; i < parms.size(); i++)
|
||||
for (int i = 0; i < parms.size(); i++)
|
||||
{
|
||||
if (parms[i] == "-dmodpath")
|
||||
if (parms[i] == "--refdir" || parms[i] == "-dmodpath")
|
||||
{
|
||||
if (parms.size() > i+1)
|
||||
if (parms.size() > i + 1)
|
||||
{
|
||||
dmodpath = "";
|
||||
for (int n=i+1; n < parms.size(); n++)
|
||||
{
|
||||
dmodpath +=parms[n];
|
||||
if (n < parms.size()-1)
|
||||
{
|
||||
dmodpath += " ";
|
||||
}
|
||||
}
|
||||
StringReplace("\\", "/", dmodpath);
|
||||
if (dmodpath[dmodpath.size()-1] != '/') dmodpath += '/'; //need a trailing slash
|
||||
refdir = parms[i + 1]; i++;
|
||||
|
||||
} else
|
||||
if (refdir[0] == '\"')
|
||||
{
|
||||
//special handling for quotes
|
||||
|
||||
refdir = ""; //try again
|
||||
|
||||
for (; i < parms.size(); i++)
|
||||
{
|
||||
if (!refdir.empty())
|
||||
{
|
||||
refdir += " ";
|
||||
}
|
||||
refdir += parms[i];
|
||||
}
|
||||
|
||||
//pull just the part we want out
|
||||
refdir = SeparateStringSTL(refdir, 1, '\"');
|
||||
|
||||
}
|
||||
|
||||
StringReplace("\\", "/", refdir);
|
||||
if (refdir[refdir.size() - 1] != '/') refdir += '/'; //need a trailing slash
|
||||
|
||||
//remove "
|
||||
StringReplace("\"", "", refdir);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogMsg("-dmodpath used wrong");
|
||||
LogMsg("--refdir used wrong");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
for (int i = 0; i < parms.size(); i++)
|
||||
{
|
||||
if (parms[i] == "-game")
|
||||
{
|
||||
if (parms.size() > i + 1)
|
||||
{
|
||||
dmodpath = parms[i + 1]; i++;
|
||||
|
||||
dmodpath = "";
|
||||
for (int n = i + 1; n < parms.size(); n++)
|
||||
if (!refdir.empty())
|
||||
{
|
||||
dmodpath += parms[n];
|
||||
if (n < parms.size() - 1)
|
||||
{
|
||||
dmodpath += " ";
|
||||
}
|
||||
dmodpath = refdir + dmodpath;
|
||||
}
|
||||
StringReplace("\\", "/", dmodpath);
|
||||
if (dmodpath[dmodpath.size() - 1] != '/') dmodpath += '/'; //need a trailing slash
|
||||
|
||||
|
||||
int len = dmodpath.find_last_of("/", dmodpath.length()-2);
|
||||
int len = dmodpath.find_last_of("/", dmodpath.length() - 2);
|
||||
if (len == string::npos)
|
||||
{
|
||||
//no demod dir? Weird but ok
|
||||
|
@ -16367,7 +16381,7 @@ string GetDMODRootPath(string *pDMODNameOutOrNull)
|
|||
{
|
||||
if (pDMODNameOutOrNull)
|
||||
*pDMODNameOutOrNull = dmodpath.substr(len + 1, dmodpath.length());
|
||||
dmodpath = dmodpath.substr(0, len+1);
|
||||
dmodpath = dmodpath.substr(0, len + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue