From f18391ce44209163358bb2338a787ca06112df61 Mon Sep 17 00:00:00 2001 From: Stephan Vedder Date: Fri, 13 Sep 2024 15:55:27 +0200 Subject: [PATCH] Load more subsystems for standalone --- src/game/client/gameclient.cpp | 2 +- src/game/common/gameengine.cpp | 10 +++++----- src/platform/sdl2/sdl2gameengine.cpp | 11 ++++++++++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 84c8a1edf..aba334979 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -710,7 +710,7 @@ void GameClient::Preload_Assets(TimeOfDayType tod) g_theControlBar->Preload_Assets(tod); g_theParticleSystemManager->Preload_Assets(tod); - char *preload_textures[39]; + const char *preload_textures[39]; preload_textures[0] = "ptspruce01.tga"; preload_textures[1] = "exrktflame.tga"; preload_textures[2] = "cvlimo3_d2.tga"; diff --git a/src/game/common/gameengine.cpp b/src/game/common/gameengine.cpp index c10e1f1d2..a66c2fd68 100644 --- a/src/game/common/gameengine.cpp +++ b/src/game/common/gameengine.cpp @@ -279,11 +279,11 @@ void GameEngine::Real_Init(int argc, char *argv[]) //} // We don't support most after this -#ifndef GAME_DLL -#pragma message("SKIPPING NOT YET SUPPORTED SUBSYSTEMS !!!") - captainslog_info("Skipping not yet supported subsystems"); - return; -#endif +// #ifndef GAME_DLL +// #pragma message("SKIPPING NOT YET SUPPORTED SUBSYSTEMS !!!") +// captainslog_info("Skipping not yet supported subsystems"); +// return; +// #endif ini.Load("Data/INI/Default/Water.ini", INI_LOAD_OVERWRITE, &xfer); ini.Load("Data/INI/Water.ini", INI_LOAD_OVERWRITE, &xfer); diff --git a/src/platform/sdl2/sdl2gameengine.cpp b/src/platform/sdl2/sdl2gameengine.cpp index f7291bfdd..6f09fa7fe 100644 --- a/src/platform/sdl2/sdl2gameengine.cpp +++ b/src/platform/sdl2/sdl2gameengine.cpp @@ -20,6 +20,7 @@ #include "sdl2mouse.h" #include "w3dfunctionlexicon.h" #include "w3dmodulefactory.h" +#include "w3dparticlesys.h" #include "win32bigfilesystem.h" #include "win32localfilesystem.h" @@ -27,6 +28,10 @@ #include "stdlocalfilesystem.h" #endif +#ifdef BUILD_WITH_OPENAL +#include "alaudiomanager.h" +#endif + SDL_Window *g_applicationWindow = nullptr; namespace Thyme @@ -158,12 +163,16 @@ WebBrowser *SDL2GameEngine::Create_Web_Browser() ParticleSystemManager *SDL2GameEngine::Create_Particle_System_Manager() { - return nullptr; + return new W3DParticleSystemManager(); } AudioManager *SDL2GameEngine::Create_Audio_Manager() { +#ifdef BUILD_WITH_OPENAL + return new Thyme::ALAudioManager; +#else return nullptr; +#endif } NetworkInterface *SDL2GameEngine::Create_Network()