* Added html5 dir, has a .bat file that can build the html5 version. I went ahead and added the html5 specific Dink media as well, a bit big for SVN though. It has mp3 versions of all songs, otherwise it's the same as the normal data I think

git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1600 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
seth 2018-04-27 06:43:34 +00:00
parent 0974642cfb
commit 35c284b014
824 changed files with 4164 additions and 1121 deletions

File diff suppressed because it is too large Load diff

View file

@ -72,6 +72,7 @@ public:
Variant * GetVarWithDefault(const string &varName, const Variant &var) {return m_varDB.GetVarWithDefault(varName, var);}
int GetSpecial();
void UpdateVideoSettings();
void SetUsingTouchScreen(bool bNew) { m_bUsingTouchScreen = bNew; }
bool GetUsingTouchScreen() {return m_bUsingTouchScreen;}
bool CanDownloadDMODS() {return m_bHasDMODSupport;}
void SetCheatsEnabled(bool bCheatsEnabled) {m_bCheatsEnabled = bCheatsEnabled;}
@ -129,4 +130,5 @@ private:
App * GetApp();
const char * GetAppName();
const char * GetBundleName();
const char * GetBundlePrefix();
const char * GetBundlePrefix();
bool TouchesHaveBeenReceived();

View file

@ -204,8 +204,8 @@ if (GetApp()->GetCheatsEnabled())
{
GetApp()->GetVar("cheat_warning")->Set(uint32(1));
PopUpCreate(pBG, "`4WARNING!``\n\nUsing cheats may break the game in strange ways and is only for testing or if you're desperate!", "", "cancel", "I get it", "", "", true);
}
PopUpCreate(pBG, "`4WARNING!``\n\nUsing cheats may break the game in strange ways and is only for testing or if you're desperate!", "", "cancel", "I get it", "", "", true);
}
return pBG;

View file

@ -15,6 +15,11 @@
#include "Entity/CustomInputComponent.h"
#include "Entity/HTTPComponent.h"
#ifdef PLATFORM_HTML5
#include "html5/SharedJSLIB.h";
int GetTouchesReceived();
#endif
bool g_bMainMenuFirstTime = true;
bool g_bDidVersionCheck = false;
@ -126,6 +131,19 @@ void MainMenuOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity sen
LogMsg("Clicked %s entity at %s", pEntClicked->GetName().c_str(),pVList->m_variant[1].Print().c_str());
#ifdef PLATFORM_HTML5
if (GetTouchesReceived() > 0)
{
//using a touch screen, go into that mode
GetApp()->SetUsingTouchScreen(true);
}
#endif
//fix it, was set the other way for ios' safari to get tricked into playing sound
//SetDefaultButtonStyle(Button2DComponent::BUTTON_STYLE_CLICK_ON_TOUCH_RELEASE);
if (pEntClicked->GetName() == "New")
{
DisableAllButtonsEntity(pEntClicked->GetParent());

View file

@ -5015,8 +5015,19 @@ bool PlayMidi(const char *sFileName)
bTryUsingOgg = false;
}
string tempName = ModifyFileExtension(fName, "ogg");
string tempName;
if (GetEmulatedPlatformID() == PLATFORM_ID_HTML5)
{
//ios browsers don't support ogg?! Fine, let's assume we have MP3 versions
tempName = ModifyFileExtension(fName, "mp3");
}
else
{
tempName = ModifyFileExtension(fName, "ogg");
}
if (bTryUsingOgg && !g_dglo.m_dmodGameDir.empty() && FileExists(g_dglo.m_dmodGamePathWithDir+tempName))
{
@ -6287,8 +6298,19 @@ if (1)
//first try with oggs
string temp = ModifyFileExtension(soundFilePathAndName, "ogg");
string temp;
if (GetEmulatedPlatformID() == PLATFORM_ID_HTML5)
{
temp = ModifyFileExtension(soundFilePathAndName, "mp3");
}
else
{
temp = ModifyFileExtension(soundFilePathAndName, "ogg");
}
temp = GetFileLocationString(temp);
if (FileExists(temp))

View file

@ -2,7 +2,7 @@
#define video_dx_h__
#include "PlatformSetup.h"
#include "math/rtRect.h"
#include "Math/rtRect.h"
class SoftSurface;
class Surface;