1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +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

@@ -20,7 +20,7 @@
#include "adventureMap/CInGameConsole.h"
#include "battle/BattleInterface.h"
#include "battle/BattleWindow.h"
#include "gui/CGuiHandler.h"
#include "GameEngine.h"
#include "gui/WindowHandler.h"
#include "widgets/MiscWidgets.h"
#include "CMT.h"
@@ -161,7 +161,7 @@ void ApplyClientNetPackVisitor::visitSetMana(SetMana & pack)
if(settings["session"]["headless"].Bool())
return;
for(auto window : GH.windows().findWindows<BattleWindow>())
for(auto window : ENGINE->windows().findWindows<BattleWindow>())
window->heroManaPointsChanged(h);
}
@@ -173,7 +173,7 @@ void ApplyClientNetPackVisitor::visitSetMovePoints(SetMovePoints & pack)
void ApplyClientNetPackVisitor::visitSetResearchedSpells(SetResearchedSpells & pack)
{
for(const auto & win : GH.windows().findWindows<CMageGuildScreen>())
for(const auto & win : ENGINE->windows().findWindows<CMageGuildScreen>())
win->updateSpells(pack.tid);
}
@@ -412,7 +412,7 @@ void ApplyClientNetPackVisitor::visitPlayerEndsGame(PlayerEndsGame & pack)
assert(adventureInt);
if(adventureInt)
{
GH.windows().popWindows(GH.windows().count());
ENGINE->windows().popWindows(ENGINE->windows().count());
adventureInt.reset();
}