mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +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:
@ -19,7 +19,7 @@
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../GameEngine.h"
|
||||
#include "../media/ISoundPlayer.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../render/IImage.h"
|
||||
@ -179,7 +179,7 @@ BattleSiegeController::BattleSiegeController(BattleInterface & owner, const CGTo
|
||||
if ( !getWallPieceExistence(EWallVisual::EWallVisual(g)) )
|
||||
continue;
|
||||
|
||||
wallPieceImages[g] = GH.renderHandler().loadImage(getWallPieceImageName(EWallVisual::EWallVisual(g), EWallState::REINFORCED), EImageBlitMode::COLORKEY);
|
||||
wallPieceImages[g] = ENGINE->renderHandler().loadImage(getWallPieceImageName(EWallVisual::EWallVisual(g), EWallState::REINFORCED), EImageBlitMode::COLORKEY);
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ void BattleSiegeController::gateStateChanged(const EGateState state)
|
||||
wallPieceImages[EWallVisual::GATE] = nullptr;
|
||||
|
||||
if (stateId != EWallState::NONE)
|
||||
wallPieceImages[EWallVisual::GATE] = GH.renderHandler().loadImage(getWallPieceImageName(EWallVisual::GATE, stateId), EImageBlitMode::COLORKEY);
|
||||
wallPieceImages[EWallVisual::GATE] = ENGINE->renderHandler().loadImage(getWallPieceImageName(EWallVisual::GATE, stateId), EImageBlitMode::COLORKEY);
|
||||
|
||||
if (playSound)
|
||||
CCS->soundh->playSound(soundBase::DRAWBRG);
|
||||
@ -364,7 +364,7 @@ void BattleSiegeController::stackIsCatapulting(const CatapultAttack & ca)
|
||||
|
||||
auto wallState = EWallState(owner.getBattle()->battleGetWallState(attackInfo.attackedPart));
|
||||
|
||||
wallPieceImages[wallId] = GH.renderHandler().loadImage(getWallPieceImageName(EWallVisual::EWallVisual(wallId), wallState), EImageBlitMode::COLORKEY);
|
||||
wallPieceImages[wallId] = ENGINE->renderHandler().loadImage(getWallPieceImageName(EWallVisual::EWallVisual(wallId), wallState), EImageBlitMode::COLORKEY);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user