Adapting music to web, fixing scripts, fixing bug in initial state

This commit is contained in:
Vladislav Khorev committed 2026-07-24 23:58:29 +03:00
1 parent c3f449b999
commit 5ecf5fb9d7
43 files changed
+875 -388

No files matched your search

+21
View File
@@ -130,7 +130,20 @@ namespace FRG {
std::shared_ptr<Texture> languageLoadingEn;
bool shadowsEnabled = true;
std::string lastMusicTrack;
#ifdef __EMSCRIPTEN__
static void onMusicZipLoaded(unsigned /*handle*/, void* /*userData*/, const char* /*filename*/);
static void onMusicZipError(unsigned /*handle*/, void* /*userData*/, int httpStatus);
static void onMusicZipProgress(unsigned /*handle*/, void* /*userData*/, int percentComplete);
float musicDownloadProgress = 0.0f;
bool musicDownloadStarted = false;
bool musicDownloadError = false;
bool playerInSettingsNoMusic = false;
bool playerInSettingsNoMusicGraphics = false;
#endif
protected:
Renderer& renderer;
@@ -176,6 +189,10 @@ namespace FRG {
void showCreditsScreen();
void showSettingsScreen();
void showSettingsGraphicsScreen();
#ifdef __EMSCRIPTEN__
void showSettingsNoMusicWebScreen();
#endif
void showLanguageScreen();
void showLoadGameScreen();
void showSaveGameScreen();
@@ -268,6 +285,9 @@ namespace FRG {
std::shared_ptr<UiNode> creditsScreenRoot;
std::shared_ptr<UiNode> portraitCreditsScreenRoot;
#ifdef __EMSCRIPTEN__
std::shared_ptr<UiNode> settingsScreenNoMusicWebRoot;
#endif
std::shared_ptr<UiNode> settingsScreenRoot;
std::shared_ptr<UiNode> settingsGraphicsScreenRoot;
std::shared_ptr<UiNode> languageScreenRoot;
@@ -343,6 +363,7 @@ namespace FRG {
std::string fullScreenToggleOff;
std::string shadowToggleOn;
std::string shadowToggleOff;
std::string musicDownloadProgressPrefix;
};