* (Bugfix) Fixed a script crash. This bug was also in the legacy dink

* (Windows) "Tap to continue" is no longer shown when waiting for a keypress, but will still be shown on touch-devices
* Fixed bug where any DMOD directory starting with "dink" was ignored from the internal DMOD listing screen.  Oops, that was a pretty bad one, sorry dinkcrft.

git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1489 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
seth 2017-09-18 01:41:26 +00:00
parent 7cf47c2919
commit 0bf781e005
7 changed files with 64 additions and 13 deletions

View file

@ -109,4 +109,11 @@ www.rtsoft.com
* (Bugfix) Fixed horrible issue where the last line in a script might not get run. This fixed the intro screen to Lost Forest Romp
* (Bugfix) Rewrote some nasty code that I could no longer understand, THE LAST QUEST (part 2)'s cool room slide/warp effect now works right
* Added "Debug DinkC Toggle" to cheat menu, it shows collision boxes and causes the log (log.txt or choose view log from debug menu)
- Note: Save state format has been changed again, so old save states won't load
* If fullscreen is at a weird size it will now just force it to 1024X768. If that fails, well, it won't be good
- Note: Save state format has been changed again, so old save states won't load
------ Change log for 1.7.4 ----------
* (Bugfix) Fixed a script crash. This bug was also in the legacy dink
* (Windows) "Tap to continue" is no longer shown when waiting for a keypress, but will still be shown on touch-devices
* Fixed bug where any DMOD directory starting with "dink" was ignored from the internal DMOD listing screen. Oops, that was a pretty bad one, sorry dinkcrft.

View file

@ -180,8 +180,8 @@ App::App()
m_bDidPostInit = false;
m_bHasDMODSupport = true;
//for mobiles
m_version = 1.72f;
m_versionString = "V1.7.2";
m_version = 1.74f;
m_versionString = "V1.7.4";
m_build = 1;
m_bCheatsEnabled = false;

View file

@ -372,6 +372,18 @@ void GetParsedDMODInfo(string dmodPath, string &nameOut, float versionOut, strin
}
bool EndsWith(std::string const &fullString, std::string const &ending)
{
if (fullString.length() >= ending.length())
{
return (0 == fullString.compare(fullString.length() - ending.length(), ending.length(), ending));
}
else
{
return false;
}
}
void DMODMenuAddScrollContent(Entity *pParent)
{
pParent = pParent->GetEntityByName("scroll_child");
@ -427,8 +439,9 @@ void DMODMenuAddScrollContent(Entity *pParent)
{
#ifdef WIN32
if ( IsInString(files[i], "/audio") || IsInString(files[i],"/dink" )|| IsInString(files[i] ,"/game") || IsInString(files[i],"/interface")) continue;
if (IsInString(files[i] ,"/develop") ) continue;
if (EndsWith(files[i], "/audio") || EndsWith(files[i],"/dink" )|| EndsWith(files[i] ,"/game") || EndsWith(files[i],"/interface")) continue;
if (EndsWith(files[i] ,"/develop") ) continue;
#else
if (IsInString(files[i],"/Snapshot") || IsInString(files[i], "/Snapshots")) continue;
#endif

View file

@ -537,8 +537,11 @@ void BuildShowingBMPControls(float fadeTimeMS)
pButtonEntity->GetFunction("OnOverEnd")->sig_function.connect(&GameOnStopSelect);
SetButtonClickSound(pButtonEntity, ""); //no sound
Entity *pLabel = CreateTextLabelEntity(pBG, "label", GetScreenSizeXf()/2, iPhoneMapY(285), "(tap to continue)");
SetAlignmentEntity(pLabel, ALIGNMENT_CENTER);
if (!IsDesktop())
{
Entity *pLabel = CreateTextLabelEntity(pBG, "label", GetScreenSizeXf() / 2, iPhoneMapY(285), "(tap to continue)");
SetAlignmentEntity(pLabel, ALIGNMENT_CENTER);
}
}

View file

@ -1558,7 +1558,7 @@ bool LoadSpriteSingleFrame(string fNameBase, int seq, int oo, int picIndex, eTra
//assert(!g_dglos.g_picInfo[g_cur_sprite].pSurface);
SAFE_DELETE(g_pSpriteSurface[picIndex]);
#ifdef _DEBUG
if (seq == 471)
if (seq == 60 && oo == 2)
{
LogMsg("Woah, ");
}
@ -1909,7 +1909,7 @@ void ReadFromLoadSequenceString(char ev[15][100] )
strcpy(g_dglos.g_seq[seqID].m_fileName, ev[2]);
#ifdef _DEBUG
if (seqID == 423)
if (seqID == 59)
{
LogMsg("He");
}
@ -3064,6 +3064,22 @@ void kill_script(int k)
if (g_script_debug_mode) LogMsg("Killed script %s. (num %d)", g_scriptInstance[k]->name, k);
//tell associated sprite that it no longer has a script
assert(C_MAX_SPRITES_AT_ONCE < 1000 && "I think 1000 has a special meaning so you better not do that? Or was that -1000. I dunno");
/*
//NOTE: This would fix a bug where a script doesn't properly remove itself from an owner sprite but.. could cause behavior differences so not enabling it for now
if (g_scriptInstance[k]->sprite > 0 && g_scriptInstance[k]->sprite < C_MAX_SPRITES_AT_ONCE)
{
if (g_sprite[g_scriptInstance[k]->sprite].active && g_sprite[g_scriptInstance[k]->sprite].script == k)
{
//um.. guess we should tell the sprite it no longer has an associated script, right?!
g_sprite[g_scriptInstance[k]->sprite].script = 0;
}
}
*/
g_scriptInstance[k] = NULL;
free(g_scriptInstance[k]);
g_scriptInstance[k] = NULL;
free(g_scriptBuffer[k]);
@ -9491,6 +9507,12 @@ LogMsg("%d scripts used", g_dglos.g_returnint);
LogMsg("Compare sprite script says: Sprite %d has no script.",g_nlist[0]);
return(0);
}
if (!g_scriptInstance[g_sprite[g_nlist[0]].script])
{
LogMsg("Compare sprite script says: Sprite %d says it has script %d, but actually it's null, so no?", g_nlist[0], g_sprite[g_nlist[0]].script);
return(0);
}
if (compare(slist[1], g_scriptInstance[g_sprite[g_nlist[0]].script]->name))
{
g_dglos.g_returnint = 1;

View file

@ -3674,7 +3674,9 @@
<Text Include="..\script\win_installer\readme.txt" />
</ItemGroup>
<ItemGroup>
<Xml Include="..\android\AndroidManifest.xml" />
<Xml Include="..\android\AndroidManifest.xml">
<SubType>Designer</SubType>
</Xml>
<Xml Include="..\android\build.xml" />
</ItemGroup>
<ItemGroup>
@ -3739,8 +3741,12 @@
<None Include="..\html5\build_release.bat" />
<None Include="..\html5\UploadToWebsite.bat" />
<None Include="..\html5\UploadToWebsiteFinal.bat" />
<None Include="..\Info.plist" />
<None Include="..\OSX\Info.plist" />
<None Include="..\Info.plist">
<SubType>Designer</SubType>
</None>
<None Include="..\OSX\Info.plist">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="winRTDink.rc" />

View file

@ -7,6 +7,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug GL|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>-game dmods/mayhem</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>-game dmods/dinkcrft</LocalDebuggerCommandArguments>
</PropertyGroup>
</Project>