* Versioned to 1.91
* (html5) -s PRECISE_F32=2 was added to the compile, fixes "drunk midi". However, it hurts performance. This will be removed after FMOD fixes their stuff (see http://www.fmod.org/questions/question/midi-sounds-drunk-in-html5/ ) * (html5) Enabled Proton's persistent support for dink/dmod installs and saves git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1621 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
3957c689c2
commit
2367dc5e3e
14 changed files with 18113 additions and 18046 deletions
|
@ -21,11 +21,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.90</string>
|
||||
<string>1.91</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>164</string>
|
||||
<string>165</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSMainNibFile</key>
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.90</string>
|
||||
<string>1.91</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>11</string>
|
||||
<string>12</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.role-playing-games</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.rtsoft.rtdink"
|
||||
android:versionCode="10"
|
||||
android:versionName="1.90"
|
||||
android:versionCode="11"
|
||||
android:versionName="1.91"
|
||||
android:installLocation="preferExternal"
|
||||
>
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ REM **************************************** END SOURCE
|
|||
|
||||
:unused so far: -s USE_GLFW=3 -s NO_EXIT_RUNTIME=1 -s FORCE_ALIGNED_MEMORY=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 -DRT_EMTERPRETER_ENABLED
|
||||
:To skip font loading so it needs no resource files or zlib, add -DC_NO_ZLIB
|
||||
SET CUSTOM_FLAGS= -DHAS_SOCKLEN_T -DBOOST_ALL_NO_LIB -DPLATFORM_HTML5 -DRT_USE_SDL_AUDIO -DRT_JPG_SUPPORT -DC_GL_MODE -s LEGACY_GL_EMULATION=1 -DPLATFORM_HTML5 -s TOTAL_MEMORY=16MB -s ALLOW_MEMORY_GROWTH=1 -Wno-c++11-compat-deprecated-writable-strings --ignore-dynamic-linking --memory-init-file 0 -Wno-switch
|
||||
SET CUSTOM_FLAGS= -DHAS_SOCKLEN_T -DBOOST_ALL_NO_LIB -DPLATFORM_HTML5 -DRT_USE_SDL_AUDIO -DRT_JPG_SUPPORT -DC_GL_MODE -s LEGACY_GL_EMULATION=1 -DPLATFORM_HTML5 -s TOTAL_MEMORY=16MB -s ALLOW_MEMORY_GROWTH=1 -Wno-c++11-compat-deprecated-writable-strings --ignore-dynamic-linking --memory-init-file 0 -Wno-switch -s PRECISE_F32=2
|
||||
|
||||
:unused: -s FULL_ES2=1 --emrun
|
||||
|
||||
|
@ -132,7 +132,8 @@ echo Compiling in release mode
|
|||
SET CUSTOM_FLAGS=%CUSTOM_FLAGS% -O2 -DNDEBUG
|
||||
) else (
|
||||
echo Compiling in debug mode
|
||||
SET CUSTOM_FLAGS=%CUSTOM_FLAGS% -D_DEBUG -s GL_UNSAFE_OPTS=0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s EXCEPTION_DEBUG=1 -s DEMANGLE_SUPPORT=1 -s ALIASING_FUNCTION_POINTERS=0 -s SAFE_HEAP=1 --emrun
|
||||
:removed -s SAFE_HEAP=1 , causes alignment error with FMOD
|
||||
SET CUSTOM_FLAGS=%CUSTOM_FLAGS% -D_DEBUG -s GL_UNSAFE_OPTS=0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s EXCEPTION_DEBUG=1 -s DEMANGLE_SUPPORT=1 -s ALIASING_FUNCTION_POINTERS=0 --emrun
|
||||
)
|
||||
|
||||
SET INCLUDE_DIRS=-I%SHARED% -I%APP% -I../../shared/util/boost -I../../shared/ClanLib-2.0/Sources -I../../shared/Network/enet/include ^
|
||||
|
|
|
@ -2,5 +2,5 @@ del "DinkSmallwoodHD.dmg"
|
|||
copy "Dink Smallwood HD.dmg" DinkSmallwoodHD.dmg
|
||||
set d_fname="DinkSmallwoodHD.dmg"
|
||||
call FTPToSiteWin.bat
|
||||
del "DinkSmallwoodHD.dmg"
|
||||
:del "DinkSmallwoodHD.dmg"
|
||||
pause
|
|
@ -297,3 +297,9 @@ use timing (Myster island camera sequence for example) easier though, not sure.
|
|||
* iOS version recompiled as Release instead of debug, oops
|
||||
* OSX version released as a code-signed secure download from rtsoft.com. Removed from Mac App Store. It supports notifying the user about
|
||||
new versions, same as the Windows version. Like the windows version, the window can be stretched to any size, but it lacks a full screen option.
|
||||
|
||||
------ Change log for 1.91 ----------
|
||||
|
||||
* This release fixes CVE-2018-0496: Sylvain Beucler and Dan Walma discovered several directory traversal issues in DFArc, an extension manager for the Dink Smallwood game, allowing an attacker to overwrite arbitrary files on the user's system. (While this doesn't use DFArc, some of the same "zip slip" issues applied)
|
||||
* Applied Dan Walma's fix so DinkHD would not incorrectly interpret sp_frame(x, -1) as sp_frame(x, 1), this fixes an issue with the Malachi the Jerk DMOD
|
||||
|
|
@ -189,8 +189,8 @@ App::App()
|
|||
m_bDidPostInit = false;
|
||||
m_bHasDMODSupport = true;
|
||||
//for mobiles
|
||||
m_version = 1.90f;
|
||||
m_versionString = "V1.90";
|
||||
m_version = 1.91f;
|
||||
m_versionString = "V1.91";
|
||||
m_build = 1;
|
||||
m_bCheatsEnabled = false;
|
||||
|
||||
|
@ -381,8 +381,6 @@ bool App::Init()
|
|||
#endif
|
||||
//string crap = "http://www.rtsoft.com/web/dink/?-game http://www.rtsoft.com/web/srchmili.dmod";
|
||||
|
||||
|
||||
|
||||
vector<string> parm = GetBaseApp()->GetCommandLineParms();
|
||||
|
||||
string parms;
|
||||
|
@ -475,6 +473,7 @@ bool App::Init()
|
|||
|
||||
RemoveFile(GetDMODRootPath()+"temp.dmod");
|
||||
RemoveFile("temp.dmod");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -484,7 +483,7 @@ bool App::Init()
|
|||
case PLATFORM_ID_BBX:
|
||||
case PLATFORM_ID_WEBOS:
|
||||
case PLATFORM_ID_HTML5:
|
||||
CreateDirectoryRecursively("", GetDMODRootPath());
|
||||
CreateDirectoryRecursively(GetSavePath(), GetDMODRootPath());
|
||||
break;
|
||||
|
||||
|
||||
|
|
|
@ -497,6 +497,9 @@ void BrowseOnPostIntroTransition(VariantList *pVList)
|
|||
|
||||
Entity * BrowseMenuCreate( Entity *pParentEnt )
|
||||
{
|
||||
|
||||
SyncPersistentData();
|
||||
|
||||
//GetMessageManager()->SendGame(MESSAGE_TYPE_PLAY_MUSIC, "audio/title.mp3", 200);
|
||||
GetBaseApp()->ClearError();
|
||||
|
||||
|
|
|
@ -243,6 +243,8 @@ void OnDMODUnpackFinish(VariantList *pVList)
|
|||
pMenu->GetVar("dmoddir")->Set(GetDMODRootPath()+ pVList->m_variant[0].GetComponent()->GetVar("firstDirCreated")->GetString());
|
||||
|
||||
}
|
||||
|
||||
SyncPersistentData();
|
||||
}
|
||||
|
||||
void OnDMODInstallHTTPFinish(VariantList *pVList)
|
||||
|
@ -257,6 +259,7 @@ void OnDMODInstallHTTPFinish(VariantList *pVList)
|
|||
EntityComponent *pUnpack = pMenu->AddComponent(new UnpackArchiveComponent);
|
||||
pUnpack->GetVar("sourceFileName")->Set(pMenu->GetVar("tempFileName")->GetString());
|
||||
bool bDeleteOnFinish = pMenu->GetVar("deleteOnFinish")->GetUINT32();
|
||||
pUnpack->GetVar("limitToSingleSubdir")->Set(uint32(1));
|
||||
|
||||
pUnpack->GetVar("deleteSourceOnFinish")->Set(uint32(bDeleteOnFinish));
|
||||
|
||||
|
@ -390,6 +393,7 @@ Entity * DMODInstallMenuCreate(Entity *pParentEnt, string dmodURL, string instal
|
|||
//don't download, we already have the file
|
||||
pBG->GetVar("tempFileName")->Set(sourceFileName);
|
||||
pBG->GetVar("originalFileName")->Set(GetFileNameFromString(sourceFileName));
|
||||
pBG->GetVar("limitToSingleSubdir")->Set(uint32(1));
|
||||
|
||||
EntityComponent *pCrapComp = pBG->AddComponent(new EntityComponent("CRAP")); //I don't need this, but the function want a component and gets the parent for the menu, so fine
|
||||
pBG->GetVar("exitto")->Set("main");
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
#ifdef PLATFORM_HTML5
|
||||
#include "html5/SharedJSLIB.h";
|
||||
int GetTouchesReceived();
|
||||
#endif
|
||||
|
||||
bool g_bMainMenuFirstTime = true;
|
||||
|
@ -517,13 +516,10 @@ void CheckForNewVersion(Entity *pMenu)
|
|||
pComp->GetFunction("OnError")->sig_function.connect(&OnVersionDownloadError);
|
||||
pComp->GetFunction("OnFinish")->sig_function.connect(&OnVersionDownloadHTTPFinish);
|
||||
|
||||
|
||||
//pComp->GetFunction("Init")->sig_function(&v);
|
||||
GetMessageManager()->CallComponentFunction(pComp,100, "Init", &v); //call it in a bit
|
||||
|
||||
|
||||
|
||||
|
||||
Entity *pEnt = VersionShowScoreMessage(pMenu, "`wChecking for updates..");
|
||||
EntityComponent *pTyper = pEnt->AddComponent(new TyperComponent);
|
||||
pTyper->GetVar("text")->Set("...................");
|
||||
|
@ -532,6 +528,40 @@ void CheckForNewVersion(Entity *pMenu)
|
|||
|
||||
}
|
||||
|
||||
|
||||
void OnSyncUpdate(VariantList *pVList)
|
||||
{
|
||||
|
||||
if (IsStillLoadingPersistentData()) return;
|
||||
|
||||
if (g_bDidVersionCheck) return;
|
||||
|
||||
g_bDidVersionCheck = true;
|
||||
GetBaseApp()->GetEntityRoot()->PrintTreeAsText();
|
||||
//Entity *pMenu = pVList->m_variant[0].GetComponent()->GetParent();
|
||||
Entity *pMenu = GetBaseApp()->GetEntityRoot()->GetEntityByName("MainMenu");
|
||||
|
||||
|
||||
//kill current menu
|
||||
GetMessageManager()->CallEntityFunction(pMenu, 200, "OnDelete", NULL);
|
||||
pMenu->SetName("MainMenuDelete");
|
||||
|
||||
//reload the main menu in a bit
|
||||
|
||||
VariantList vList(pMenu->GetParent());
|
||||
GetMessageManager()->CallStaticFunction(ReloadMainMenu, 200, &vList, TIMER_SYSTEM);
|
||||
}
|
||||
|
||||
void WaitForSync(Entity *pMenu)
|
||||
{
|
||||
Entity *pEnt = VersionShowScoreMessage(pMenu, "`wFinding saved data...");
|
||||
EntityComponent *pTyper = pEnt->AddComponent(new TyperComponent);
|
||||
pTyper->GetVar("text")->Set("...................");
|
||||
pTyper->GetVar("speedMS")->Set(uint32(200));
|
||||
pEnt->GetFunction("OnUpdate")->sig_function.connect(&OnSyncUpdate);
|
||||
|
||||
}
|
||||
|
||||
Entity * MainMenuCreate( Entity *pParentEnt, bool bFadeIn )
|
||||
{
|
||||
CheckForImportedSavedGames();
|
||||
|
@ -609,6 +639,8 @@ Entity * MainMenuCreate( Entity *pParentEnt, bool bFadeIn )
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
if (!g_bDidVersionCheck && IsDesktop())
|
||||
{
|
||||
g_bDidVersionCheck = true;
|
||||
|
@ -617,6 +649,15 @@ Entity * MainMenuCreate( Entity *pParentEnt, bool bFadeIn )
|
|||
}
|
||||
|
||||
|
||||
#ifdef PLATFORM_HTML5
|
||||
if (!g_bDidVersionCheck && IsStillLoadingPersistentData() )
|
||||
{
|
||||
WaitForSync(pBG);
|
||||
return pBG;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Entity *pEntDinkLogo = CreateOverlayEntity(pBG, "dinklogo", ReplaceWithDeviceNameInFileName("interface/iphone/logo_dink.rttex"), 0, 0);
|
||||
|
||||
pButtonEntity = CreateOverlayEntity(pBG, "flameAnim", ReplaceWithDeviceNameInFileName("interface/iphone/bkgd_anim_fire.rttex"), 0, fireAnimY);
|
||||
|
|
|
@ -255,6 +255,7 @@ void OptionsMenuOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity
|
|||
ZoomToPositionEntity(pMenu, CL_Vec2f(GetScreenSizeXf(),0), 500); //slide up
|
||||
KillEntity(pMenu, 500);
|
||||
AddFocusIfNeeded(pMenu->GetParent(), true, 500);
|
||||
SyncPersistentData();
|
||||
}
|
||||
|
||||
if (pEntClicked->GetName() == "sound_1")
|
||||
|
|
|
@ -51,6 +51,7 @@ Entity * DinkQuitGame()
|
|||
}
|
||||
|
||||
PlayMenuMusic();
|
||||
|
||||
return pFinalMenu;
|
||||
}
|
||||
|
||||
|
@ -102,6 +103,9 @@ void PauseEnd(Entity *pMenu)
|
|||
GetMessageManager()->CallEntityFunction(pMenu, 500, "OnDelete", NULL);
|
||||
GetBaseApp()->SetGameTickPause(false);
|
||||
|
||||
SyncPersistentData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void PrepareForPopup(Entity *pMainMenuEnt, VariantList *pVList)
|
||||
|
@ -225,6 +229,8 @@ void PauseMenuOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity se
|
|||
RemoveFile(fName, false);
|
||||
GetAudioManager()->Play("audio/buzzer2.wav");
|
||||
PopUpCreate(pMenu, "Error loading save state. Probably an older version, sorry.", "", "cancel", "Continue", "", "", true);
|
||||
SyncPersistentData();
|
||||
|
||||
} else
|
||||
{
|
||||
LoadStateWithExtra();
|
||||
|
|
|
@ -1056,6 +1056,9 @@ void save_game(int num)
|
|||
last_saved_game = num;
|
||||
fwrite(&g_dglos.g_playerInfo,sizeof(g_dglos.g_playerInfo),1,fp);
|
||||
fclose(fp);
|
||||
|
||||
SyncPersistentData();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -3013,14 +3016,14 @@ bool get_box (int spriteID, rtRect32 * pDstRect, rtRect32 * pSrcRect )
|
|||
#ifdef _DEBUG
|
||||
if (g_sprite[spriteID].pseq == 204 )
|
||||
{
|
||||
LogMsg("Yo");
|
||||
//LogMsg("Yo");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (g_sprite[spriteID].pseq == 202)
|
||||
{
|
||||
LogMsg("Original");
|
||||
//LogMsg("Original");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -16739,7 +16742,7 @@ string GetDMODRootPath(string *pDMODNameOutOrNull)
|
|||
}
|
||||
|
||||
|
||||
#if defined(WIN32) || defined(PLATFORM_HTML5)
|
||||
#if defined(WIN32)
|
||||
|
||||
string dmodpath = "dmods/";
|
||||
string refdir = "";
|
||||
|
@ -17568,8 +17571,9 @@ bool LoadScriptState(FILE *fp)
|
|||
|
||||
bool SaveState(string const &path)
|
||||
{
|
||||
LogMsg("Saving %s", path.c_str());
|
||||
LogMsg("Saving %s (inside %s which is off of %s)", path.c_str(), g_dglo.m_gameDir.c_str(), g_dglo.m_savePath.c_str());
|
||||
CreateDirectoryRecursively(g_dglo.m_savePath, g_dglo.m_gameDir);
|
||||
CreateDirectoryRecursively("", g_dglo.m_savePath); //added to fix issue with emscripten
|
||||
|
||||
FILE *fp = fopen(path.c_str(), "wb");
|
||||
|
||||
|
@ -17607,6 +17611,9 @@ bool SaveState(string const &path)
|
|||
}
|
||||
|
||||
fclose(fp);
|
||||
|
||||
SyncPersistentData();
|
||||
|
||||
return bOk; //success
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug GL|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>
|
||||
</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommandArguments>../test_bad_dmoddir_changes.dmod</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Common Debug|Win32'">
|
||||
<LocalDebuggerCommandArguments>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue