1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Integrated CClientState into GameEngine class

This commit is contained in:
Ivan Savenko
2025-02-10 22:08:50 +00:00
parent cacceda950
commit f657e85305
51 changed files with 240 additions and 275 deletions

View File

@ -337,7 +337,7 @@ void BattleHero::heroLeftClicked()
if(owner.getBattle()->battleCanCastSpell(hero, spells::Mode::HERO) == ESpellCastProblem::OK) //check conditions
{
CCS->curh->set(Cursor::Map::POINTER);
ENGINE->cursor().set(Cursor::Map::POINTER);
ENGINE->windows().createAndPushWindow<CSpellWindow>(hero, owner.getCurrentPlayerInterface());
}
}
@ -843,7 +843,7 @@ BattleResultWindow::BattleResultWindow(const BattleResult & br, CPlayerInterface
description = std::make_shared<CTextBox>(resources.resultText.toString(), Rect(69, 203, 330, 68), 0, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
videoPlayer = std::make_shared<VideoWidget>(Point(107, 70), resources.prologueVideo, resources.loopedVideo, false);
CCS->musich->playMusic(resources.musicName, false, true);
ENGINE->music().playMusic(resources.musicName, false, true);
}
BattleResultResources BattleResultWindow::getResources(const BattleResult & br)