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 committed 2025-02-21 16:53:13 +00:00
1 parent 0c5a560c80
commit cacceda950
144 files changed
+1019 -1021

No files matched your search

+5 -5
View File
@@ -11,7 +11,7 @@
#include "StdInc.h"
#include "CursorSoftware.h"
#include "../gui/CGuiHandler.h"
#include "../GameEngine.h"
#include "../render/IScreenHandler.h"
#include "../render/Colors.h"
#include "../render/IImage.h"
@@ -59,16 +59,16 @@ void CursorSoftware::createTexture(const Point & dimensions)
void CursorSoftware::updateTexture()
{
if (!cursorSurface)
createTexture(cursorImage->dimensions() * GH.screenHandler().getScalingFactor());
createTexture(cursorImage->dimensions() * ENGINE->screenHandler().getScalingFactor());
Point currentSize = Point(cursorSurface->w, cursorSurface->h);
if (currentSize != cursorImage->dimensions() * GH.screenHandler().getScalingFactor())
createTexture(cursorImage->dimensions() * GH.screenHandler().getScalingFactor());
if (currentSize != cursorImage->dimensions() * ENGINE->screenHandler().getScalingFactor())
createTexture(cursorImage->dimensions() * ENGINE->screenHandler().getScalingFactor());
CSDL_Ext::fillSurface(cursorSurface, CSDL_Ext::toSDL(Colors::TRANSPARENCY));
cursorImage->draw(cursorSurface, Point(0,0), nullptr, GH.screenHandler().getScalingFactor());
cursorImage->draw(cursorSurface, Point(0,0), nullptr, ENGINE->screenHandler().getScalingFactor());
SDL_UpdateTexture(cursorTexture, nullptr, cursorSurface->pixels, cursorSurface->pitch);
needUpdate = false;
}