* 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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue