1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Renamed CGuiHandler to GameEngine

- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
This commit is contained in:
Ivan Savenko
2025-02-10 21:49:23 +00:00
parent 0c5a560c80
commit cacceda950
144 changed files with 1019 additions and 1021 deletions

View File

@@ -17,7 +17,7 @@
#include "../CGameInfo.h"
#include "../CMT.h"
#include "../eventsSDL/InputHandler.h"
#include "../gui/CGuiHandler.h"
#include "../GameEngine.h"
#include "../render/Canvas.h"
#include "../render/IScreenHandler.h"
#include "../renderSDL/SDL_Extensions.h"
@@ -199,7 +199,7 @@ bool CVideoInstance::openVideo()
void CVideoInstance::prepareOutput(float scaleFactor, bool useTextureOutput)
{
//setup scaling
dimensions = Point(getCodecContext()->width * scaleFactor, getCodecContext()->height * scaleFactor) * GH.screenHandler().getScalingFactor();
dimensions = Point(getCodecContext()->width * scaleFactor, getCodecContext()->height * scaleFactor) * ENGINE->screenHandler().getScalingFactor();
// Allocate a place to put our YUV image on that screen
if (useTextureOutput)
@@ -378,7 +378,7 @@ FFMpegStream::~FFMpegStream()
Point CVideoInstance::size()
{
return dimensions / GH.screenHandler().getScalingFactor();
return dimensions / ENGINE->screenHandler().getScalingFactor();
}
void CVideoInstance::show(const Point & position, SDL_Surface * to)
@@ -386,7 +386,7 @@ void CVideoInstance::show(const Point & position, SDL_Surface * to)
if(sws == nullptr)
throw std::runtime_error("No video to show!");
CSDL_Ext::blitSurface(surface, to, position * GH.screenHandler().getScalingFactor());
CSDL_Ext::blitSurface(surface, to, position * ENGINE->screenHandler().getScalingFactor());
}
double FFMpegStream::getCurrentFrameEndTime() const