1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Removed CGI in favor of VLC. Map handle is for now global variable

This commit is contained in:
Ivan Savenko
2025-02-10 22:52:48 +00:00
parent f657e85305
commit ffd37a8fa8
106 changed files with 940 additions and 1211 deletions

View File

@@ -10,7 +10,6 @@
#include "StdInc.h"
#include "CPuzzleWindow.h"
#include "../CGameInfo.h"
#include "../CPlayerInterface.h"
#include "../adventureMap/CResDataBar.h"
#include "../GameEngine.h"
@@ -27,6 +26,8 @@
#include "../../lib/entities/faction/CTownHandler.h"
#include "../../lib/texts/CGeneralTextHandler.h"
#include "../../lib/StartInfo.h"
#include "../../lib/VCMI_Lib.h"
CPuzzleWindow::CPuzzleWindow(const int3 & GrailPos, double discoveredRatio)
: CWindowObject(PLAYER_COLORED | BORDERED, ImagePath::builtin("PUZZLE")),
@@ -37,18 +38,18 @@ CPuzzleWindow::CPuzzleWindow(const int3 & GrailPos, double discoveredRatio)
ENGINE->sound().playSound(soundBase::OBELISK);
quitb = std::make_shared<CButton>(Point(670, 538), AnimationPath::builtin("IOK6432.DEF"), CButton::tooltip(CGI->generaltexth->allTexts[599]), std::bind(&CPuzzleWindow::close, this), EShortcut::GLOBAL_RETURN);
quitb = std::make_shared<CButton>(Point(670, 538), AnimationPath::builtin("IOK6432.DEF"), CButton::tooltip(VLC->generaltexth->allTexts[599]), std::bind(&CPuzzleWindow::close, this), EShortcut::GLOBAL_RETURN);
quitb->setBorderColor(Colors::METALLIC_GOLD);
mapView = std::make_shared<PuzzleMapView>(Point(8,9), Point(591, 544), grailPos);
logo = std::make_shared<CPicture>(ImagePath::builtin("PUZZLOGO"), 607, 3);
title = std::make_shared<CLabel>(700, 95, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[463]);
title = std::make_shared<CLabel>(700, 95, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, VLC->generaltexth->allTexts[463]);
resDataBar = std::make_shared<CResDataBar>(ImagePath::builtin("ARESBAR.bmp"), 3, 575, 32, 2, 85, 85);
int faction = LOCPLINT->cb->getStartInfo()->playerInfos.find(LOCPLINT->playerID)->second.castle;
auto & puzzleMap = (*CGI->townh)[faction]->puzzleMap;
auto & puzzleMap = (*VLC->townh)[faction]->puzzleMap;
for(auto & elem : puzzleMap)
{