--- a/src/BlobbyApp.cpp +++ b/src/BlobbyApp.cpp @@ -116,7 +116,7 @@ if(device_name == "SDL") mRenderMgr = RenderManager::createRenderManagerSDL(); else if (device_name == "OpenGL") - mRenderMgr = RenderManager::createRenderManagerGL2D(); + mRenderMgr = RenderManager::createRenderManagerSDL(); // no OpenGL renderer in the web build else if (device_name == "Null") mRenderMgr = RenderManager::createRenderManagerNull(); else --- a/src/main.cpp +++ b/src/main.cpp @@ -47,11 +47,12 @@ #include "BlobbyApp.h" // this global allows the host game thread to be killed -extern std::atomic gKillHostThread; -extern std::shared_ptr gHostedServerThread; /* implementation */ +// Defined in the network states, which this web build leaves out. +int CURRENT_NETWORK_LAG = -1; + void deinit() { SDL_Quit(); @@ -139,7 +140,6 @@ DEBUG_STATUS("SDL initialised"); atexit(SDL_Quit); - atexit([](){gKillHostThread=true; if(gHostedServerThread) gHostedServerThread->join();}); srand(SDL_GetTicks()); // Test Version Startup Warning --- a/src/SoundManager.cpp +++ b/src/SoundManager.cpp @@ -199,7 +199,7 @@ desiredSpec.callback = playCallback; desiredSpec.userdata = this; - mAudioDevice = SDL_OpenAudioDevice(nullptr, 0, &desiredSpec, &mAudioSpec, SDL_AUDIO_ALLOW_FORMAT_CHANGE); + mAudioDevice = SDL_OpenAudioDevice(nullptr, 0, &desiredSpec, &mAudioSpec, 0); // SDL converts: the mixer below expects 16-bit samples if (mAudioDevice == 0) { --- a/src/state/State.cpp +++ b/src/state/State.cpp @@ -28,8 +28,6 @@ #include "LocalGameState.h" #include "ReplaySelectionState.h" -#include "NetworkState.h" -#include "NetworkSearchState.h" #include "OptionsState.h" #include "BlobbyApp.h" @@ -102,14 +100,6 @@ imgui.doImage(GEN_ID, Vector2(400.0, 300.0), "background"); imgui.doOverlay(GEN_ID, Vector2(0.0, 0.0), Vector2(800.0, 600.0)); imgui.doImage(GEN_ID, Vector2(400.0, 175.0), "gfx/titel.bmp"); - if (imgui.doButton(GEN_ID, Vector2(34, 300.0), TextManager::MNU_LABEL_ONLINE)) - { - switchState( new OnlineSearchState() ); - } - if (imgui.doButton(GEN_ID, Vector2(34, 340.0), TextManager::MNU_LABEL_LAN)) - { - switchState( new LANSearchState() ); - } if (imgui.doButton(GEN_ID, Vector2(34.0, 380.0), TextManager::MNU_LABEL_START)) { try @@ -139,11 +129,6 @@ { switchState(new CreditsState()); } - - if (imgui.doButton(GEN_ID, Vector2(34.0, 540.0), TextManager::MNU_LABEL_EXIT)) - { - getInputMgr().setEndBlobby(); - } } const char* MainMenuState::getStateName() const @@ -191,21 +176,7 @@ switchState(new MainMenuState()); } -#if SDL_VERSION_ATLEAST(2, 0, 14) - { - SDL_version linked; - SDL_GetVersion(&linked); - if (SDL_VERSIONNUM(linked.major, linked.minor, linked.patch) >= - SDL_VERSIONNUM(2, 0, 14)) - { - if (imgui.doButton(GEN_ID, Vector2(294.0, 530.0), "www.blobbyvolley.de")) - { - SDL_OpenURL("https://www.blobbyvolley.de"); - } - } - } -#endif } const char* CreditsState::getStateName() const --- a/data/config.xml +++ b/data/config.xml @@ -14,7 +14,7 @@ - + @@ -22,7 +22,7 @@ - +