1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Removed CGI in favor of VLC. Map handle is for now global variable

This commit is contained in:
Ivan Savenko
2025-02-10 22:52:48 +00:00
parent f657e85305
commit ffd37a8fa8
106 changed files with 940 additions and 1211 deletions

View File

@@ -23,7 +23,6 @@
#include "media/CVideoHandler.h"
#include "media/CEmptyVideoPlayer.h"
#include "CGameInfo.h"
#include "CPlayerInterface.h"
#include "adventureMap/AdventureMapInterface.h"
#include "render/Canvas.h"
@@ -73,20 +72,16 @@ void GameEngine::init()
#ifndef ENABLE_VIDEO
videoPlayerInstance = std::make_unique<CEmptyVideoPlayer>();
#else
if (!settings["session"]["headless"].Bool())
videoPlayerInstance = std::make_unique<CVideoPlayer>();
else
if (settings["session"]["disableVideo"].Bool())
videoPlayerInstance = std::make_unique<CEmptyVideoPlayer>();
else
videoPlayerInstance = std::make_unique<CVideoPlayer>();
#endif
if(!settings["session"]["headless"].Bool())
{
soundPlayerInstance = std::make_unique<CSoundHandler>();
musicPlayerInstance = std::make_unique<CMusicHandler>();
sound().setVolume((ui32)settings["general"]["sound"].Float());
music().setVolume((ui32)settings["general"]["music"].Float());
}
soundPlayerInstance = std::make_unique<CSoundHandler>();
musicPlayerInstance = std::make_unique<CMusicHandler>();
sound().setVolume((ui32)settings["general"]["sound"].Float());
music().setVolume((ui32)settings["general"]["music"].Float());
cursorHandlerInstance = std::make_unique<CursorHandler>();
}