mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Renamed some adventure map files & classes
This commit is contained in:
		| @@ -2,10 +2,10 @@ set(client_SRCS | |||||||
| 	StdInc.cpp | 	StdInc.cpp | ||||||
| 	../CCallback.cpp | 	../CCallback.cpp | ||||||
|  |  | ||||||
| 	adventureMap/CAdventureMapInterface.cpp | 	adventureMap/AdventureMapInterface.cpp | ||||||
| 	adventureMap/CAdventureMapWidget.cpp |  | ||||||
| 	adventureMap/AdventureMapShortcuts.cpp | 	adventureMap/AdventureMapShortcuts.cpp | ||||||
| 	adventureMap/CAdventureOptions.cpp | 	adventureMap/AdventureMapWidget.cpp | ||||||
|  | 	adventureMap/AdventureOptions.cpp | ||||||
| 	adventureMap/CInGameConsole.cpp | 	adventureMap/CInGameConsole.cpp | ||||||
| 	adventureMap/CInfoBar.cpp | 	adventureMap/CInfoBar.cpp | ||||||
| 	adventureMap/CList.cpp | 	adventureMap/CList.cpp | ||||||
| @@ -131,11 +131,11 @@ set(client_SRCS | |||||||
| set(client_HEADERS | set(client_HEADERS | ||||||
| 	StdInc.h | 	StdInc.h | ||||||
|  |  | ||||||
| 	adventureMap/CAdventureMapInterface.h | 	adventureMap/AdventureMapInterface.h | ||||||
| 	adventureMap/CAdventureMapWidget.h |  | ||||||
| 	adventureMap/AdventureMapShortcuts.h | 	adventureMap/AdventureMapShortcuts.h | ||||||
|  | 	adventureMap/AdventureMapWidget.h | ||||||
| 	adventureMap/AdventureState.h | 	adventureMap/AdventureState.h | ||||||
| 	adventureMap/CAdventureOptions.h | 	adventureMap/AdventureOptions.h | ||||||
| 	adventureMap/CInGameConsole.h | 	adventureMap/CInGameConsole.h | ||||||
| 	adventureMap/CInfoBar.h | 	adventureMap/CInfoBar.h | ||||||
| 	adventureMap/CList.h | 	adventureMap/CList.h | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ | |||||||
|  |  | ||||||
| #include <vcmi/Artifact.h> | #include <vcmi/Artifact.h> | ||||||
|  |  | ||||||
| #include "adventureMap/CAdventureMapInterface.h" | #include "adventureMap/AdventureMapInterface.h" | ||||||
| #include "mapView/mapHandler.h" | #include "mapView/mapHandler.h" | ||||||
| #include "adventureMap/CList.h" | #include "adventureMap/CList.h" | ||||||
| #include "battle/BattleInterface.h" | #include "battle/BattleInterface.h" | ||||||
| @@ -162,7 +162,7 @@ void CPlayerInterface::initGameInterface(std::shared_ptr<Environment> ENV, std:: | |||||||
| 	initializeHeroTownList(); | 	initializeHeroTownList(); | ||||||
|  |  | ||||||
| 	// always recreate advmap interface to avoid possible memory-corruption bugs | 	// always recreate advmap interface to avoid possible memory-corruption bugs | ||||||
| 	adventureInt.reset(new CAdventureMapInterface()); | 	adventureInt.reset(new AdventureMapInterface()); | ||||||
| } | } | ||||||
|  |  | ||||||
| void CPlayerInterface::playerStartsTurn(PlayerColor player) | void CPlayerInterface::playerStartsTurn(PlayerColor player) | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ struct CPathsInfo; | |||||||
| VCMI_LIB_NAMESPACE_END | VCMI_LIB_NAMESPACE_END | ||||||
|  |  | ||||||
| class CButton; | class CButton; | ||||||
| class CAdventureMapInterface; | class AdventureMapInterface; | ||||||
| class CCastleInterface; | class CCastleInterface; | ||||||
| class BattleInterface; | class BattleInterface; | ||||||
| class CComponent; | class CComponent; | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
| #include "CPlayerInterface.h" | #include "CPlayerInterface.h" | ||||||
| #include "CServerHandler.h" | #include "CServerHandler.h" | ||||||
| #include "ClientNetPackVisitors.h" | #include "ClientNetPackVisitors.h" | ||||||
| #include "adventureMap/CAdventureMapInterface.h" | #include "adventureMap/AdventureMapInterface.h" | ||||||
| #include "battle/BattleInterface.h" | #include "battle/BattleInterface.h" | ||||||
| #include "gui/CGuiHandler.h" | #include "gui/CGuiHandler.h" | ||||||
| #include "mapView/mapHandler.h" | #include "mapView/mapHandler.h" | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
| #include "../lib/mapObjects/CGHeroInstance.h" | #include "../lib/mapObjects/CGHeroInstance.h" | ||||||
| #include "../lib/mapObjects/CGTownInstance.h" | #include "../lib/mapObjects/CGTownInstance.h" | ||||||
| #include "CPlayerInterface.h" | #include "CPlayerInterface.h" | ||||||
| #include "adventureMap/CAdventureMapInterface.h" | #include "adventureMap/AdventureMapInterface.h" | ||||||
|  |  | ||||||
| PlayerLocalState::PlayerLocalState(CPlayerInterface & owner) | PlayerLocalState::PlayerLocalState(CPlayerInterface & owner) | ||||||
| 	: owner(owner) | 	: owner(owner) | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| /*
 | /*
 | ||||||
|  * CAdventureMapInterface.cpp, part of VCMI engine |  * AdventureMapInterface.cpp, part of VCMI engine | ||||||
|  * |  * | ||||||
|  * Authors: listed in file AUTHORS in main folder |  * Authors: listed in file AUTHORS in main folder | ||||||
|  * |  * | ||||||
| @@ -8,16 +8,16 @@ | |||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| #include "StdInc.h" | #include "StdInc.h" | ||||||
| #include "CAdventureMapInterface.h" | #include "AdventureMapInterface.h" | ||||||
| 
 | 
 | ||||||
| #include "CAdventureOptions.h" | #include "AdventureOptions.h" | ||||||
| #include "AdventureState.h" | #include "AdventureState.h" | ||||||
| #include "CInGameConsole.h" | #include "CInGameConsole.h" | ||||||
| #include "CMinimap.h" | #include "CMinimap.h" | ||||||
| #include "CList.h" | #include "CList.h" | ||||||
| #include "CInfoBar.h" | #include "CInfoBar.h" | ||||||
| #include "MapAudioPlayer.h" | #include "MapAudioPlayer.h" | ||||||
| #include "CAdventureMapWidget.h" | #include "AdventureMapWidget.h" | ||||||
| #include "AdventureMapShortcuts.h" | #include "AdventureMapShortcuts.h" | ||||||
| 
 | 
 | ||||||
| #include "../mapView/mapHandler.h" | #include "../mapView/mapHandler.h" | ||||||
| @@ -38,9 +38,9 @@ | |||||||
| #include "../../lib/CPathfinder.h" | #include "../../lib/CPathfinder.h" | ||||||
| #include "../../lib/mapping/CMap.h" | #include "../../lib/mapping/CMap.h" | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CAdventureMapInterface> adventureInt; | std::shared_ptr<AdventureMapInterface> adventureInt; | ||||||
| 
 | 
 | ||||||
| CAdventureMapInterface::CAdventureMapInterface(): | AdventureMapInterface::AdventureMapInterface(): | ||||||
| 	mapAudio(new MapAudioPlayer()), | 	mapAudio(new MapAudioPlayer()), | ||||||
| 	spellBeingCasted(nullptr), | 	spellBeingCasted(nullptr), | ||||||
| 	scrollingWasActive(false), | 	scrollingWasActive(false), | ||||||
| @@ -54,35 +54,35 @@ CAdventureMapInterface::CAdventureMapInterface(): | |||||||
| 
 | 
 | ||||||
| 	shortcuts = std::make_shared<AdventureMapShortcuts>(*this); | 	shortcuts = std::make_shared<AdventureMapShortcuts>(*this); | ||||||
| 
 | 
 | ||||||
| 	widget = std::make_shared<CAdventureMapWidget>(shortcuts); | 	widget = std::make_shared<AdventureMapWidget>(shortcuts); | ||||||
| 	shortcuts->setState(EAdventureState::MAKING_TURN); | 	shortcuts->setState(EAdventureState::MAKING_TURN); | ||||||
| 	widget->getMapView()->onViewMapActivated(); | 	widget->getMapView()->onViewMapActivated(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onMapViewMoved(const Rect & visibleArea, int mapLevel) | void AdventureMapInterface::onMapViewMoved(const Rect & visibleArea, int mapLevel) | ||||||
| { | { | ||||||
| 	shortcuts->onMapViewMoved(visibleArea, mapLevel); | 	shortcuts->onMapViewMoved(visibleArea, mapLevel); | ||||||
| 	widget->getMinimap()->onMapViewMoved(visibleArea, mapLevel); | 	widget->getMinimap()->onMapViewMoved(visibleArea, mapLevel); | ||||||
| 	widget->onMapViewMoved(visibleArea, mapLevel); | 	widget->onMapViewMoved(visibleArea, mapLevel); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onAudioResumed() | void AdventureMapInterface::onAudioResumed() | ||||||
| { | { | ||||||
| 	mapAudio->onAudioResumed(); | 	mapAudio->onAudioResumed(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onAudioPaused() | void AdventureMapInterface::onAudioPaused() | ||||||
| { | { | ||||||
| 	mapAudio->onAudioPaused(); | 	mapAudio->onAudioPaused(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onHeroMovementStarted(const CGHeroInstance * hero) | void AdventureMapInterface::onHeroMovementStarted(const CGHeroInstance * hero) | ||||||
| { | { | ||||||
| 	widget->getInfoBar()->popAll(); | 	widget->getInfoBar()->popAll(); | ||||||
| 	widget->getInfoBar()->showSelection(); | 	widget->getInfoBar()->showSelection(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onHeroChanged(const CGHeroInstance *h) | void AdventureMapInterface::onHeroChanged(const CGHeroInstance *h) | ||||||
| { | { | ||||||
| 	widget->getHeroList()->update(h); | 	widget->getHeroList()->update(h); | ||||||
| 
 | 
 | ||||||
| @@ -92,7 +92,7 @@ void CAdventureMapInterface::onHeroChanged(const CGHeroInstance *h) | |||||||
| 	widget->updateActiveState(); | 	widget->updateActiveState(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onTownChanged(const CGTownInstance * town) | void AdventureMapInterface::onTownChanged(const CGTownInstance * town) | ||||||
| { | { | ||||||
| 	widget->getTownList()->update(town); | 	widget->getTownList()->update(town); | ||||||
| 
 | 
 | ||||||
| @@ -100,12 +100,12 @@ void CAdventureMapInterface::onTownChanged(const CGTownInstance * town) | |||||||
| 		widget->getInfoBar()->showSelection(); | 		widget->getInfoBar()->showSelection(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::showInfoBoxMessage(const std::vector<Component> & components, std::string message, int timer) | void AdventureMapInterface::showInfoBoxMessage(const std::vector<Component> & components, std::string message, int timer) | ||||||
| { | { | ||||||
| 	widget->getInfoBar()->pushComponents(components, message, timer); | 	widget->getInfoBar()->pushComponents(components, message, timer); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::activate() | void AdventureMapInterface::activate() | ||||||
| { | { | ||||||
| 	CIntObject::activate(); | 	CIntObject::activate(); | ||||||
| 
 | 
 | ||||||
| @@ -122,19 +122,19 @@ void CAdventureMapInterface::activate() | |||||||
| 	GH.fakeMouseMove(); //to restore the cursor
 | 	GH.fakeMouseMove(); //to restore the cursor
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::deactivate() | void AdventureMapInterface::deactivate() | ||||||
| { | { | ||||||
| 	CIntObject::deactivate(); | 	CIntObject::deactivate(); | ||||||
| 	CCS->curh->set(Cursor::Map::POINTER); | 	CCS->curh->set(Cursor::Map::POINTER); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::showAll(SDL_Surface * to) | void AdventureMapInterface::showAll(SDL_Surface * to) | ||||||
| { | { | ||||||
| 	CIntObject::showAll(to); | 	CIntObject::showAll(to); | ||||||
| 	LOCPLINT->cingconsole->show(to); | 	LOCPLINT->cingconsole->show(to); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::show(SDL_Surface * to) | void AdventureMapInterface::show(SDL_Surface * to) | ||||||
| { | { | ||||||
| 	handleMapScrollingUpdate(); | 	handleMapScrollingUpdate(); | ||||||
| 
 | 
 | ||||||
| @@ -142,7 +142,7 @@ void CAdventureMapInterface::show(SDL_Surface * to) | |||||||
| 	LOCPLINT->cingconsole->show(to); | 	LOCPLINT->cingconsole->show(to); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::handleMapScrollingUpdate() | void AdventureMapInterface::handleMapScrollingUpdate() | ||||||
| { | { | ||||||
| 	/// Width of window border, in pixels, that triggers map scrolling
 | 	/// Width of window border, in pixels, that triggers map scrolling
 | ||||||
| 	static constexpr uint32_t borderScrollWidth = 15; | 	static constexpr uint32_t borderScrollWidth = 15; | ||||||
| @@ -222,23 +222,23 @@ void CAdventureMapInterface::handleMapScrollingUpdate() | |||||||
| 	scrollingWasActive = scrollingActive; | 	scrollingWasActive = scrollingActive; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::centerOnTile(int3 on) | void AdventureMapInterface::centerOnTile(int3 on) | ||||||
| { | { | ||||||
| 	widget->getMapView()->onCenteredTile(on); | 	widget->getMapView()->onCenteredTile(on); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::centerOnObject(const CGObjectInstance * obj) | void AdventureMapInterface::centerOnObject(const CGObjectInstance * obj) | ||||||
| { | { | ||||||
| 	widget->getMapView()->onCenteredObject(obj); | 	widget->getMapView()->onCenteredObject(obj); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::keyPressed(EShortcut key) | void AdventureMapInterface::keyPressed(EShortcut key) | ||||||
| { | { | ||||||
| 	//fake mouse use to trigger onTileHovered()
 | 	//fake mouse use to trigger onTileHovered()
 | ||||||
| 	GH.fakeMouseMove(); | 	GH.fakeMouseMove(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onSelectionChanged(const CArmedInstance *sel) | void AdventureMapInterface::onSelectionChanged(const CArmedInstance *sel) | ||||||
| { | { | ||||||
| 	assert(sel); | 	assert(sel); | ||||||
| 
 | 
 | ||||||
| @@ -275,7 +275,7 @@ void CAdventureMapInterface::onSelectionChanged(const CArmedInstance *sel) | |||||||
| 	widget->getTownList()->redraw(); | 	widget->getTownList()->redraw(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onMapTilesChanged(boost::optional<std::unordered_set<int3>> positions) | void AdventureMapInterface::onMapTilesChanged(boost::optional<std::unordered_set<int3>> positions) | ||||||
| { | { | ||||||
| 	if (positions) | 	if (positions) | ||||||
| 		widget->getMinimap()->updateTiles(*positions); | 		widget->getMinimap()->updateTiles(*positions); | ||||||
| @@ -283,13 +283,13 @@ void CAdventureMapInterface::onMapTilesChanged(boost::optional<std::unordered_se | |||||||
| 		widget->getMinimap()->update(); | 		widget->getMinimap()->update(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onHotseatWaitStarted(PlayerColor playerID) | void AdventureMapInterface::onHotseatWaitStarted(PlayerColor playerID) | ||||||
| { | { | ||||||
| 	onCurrentPlayerChanged(playerID); | 	onCurrentPlayerChanged(playerID); | ||||||
| 	setState(EAdventureState::HOTSEAT_WAIT); | 	setState(EAdventureState::HOTSEAT_WAIT); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onEnemyTurnStarted(PlayerColor playerID) | void AdventureMapInterface::onEnemyTurnStarted(PlayerColor playerID) | ||||||
| { | { | ||||||
| 	if(settings["session"]["spectate"].Bool()) | 	if(settings["session"]["spectate"].Bool()) | ||||||
| 		return; | 		return; | ||||||
| @@ -301,14 +301,14 @@ void CAdventureMapInterface::onEnemyTurnStarted(PlayerColor playerID) | |||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::setState(EAdventureState state) | void AdventureMapInterface::setState(EAdventureState state) | ||||||
| { | { | ||||||
| 	shortcuts->setState(state); | 	shortcuts->setState(state); | ||||||
| 	adjustActiveness(); | 	adjustActiveness(); | ||||||
| 	widget->updateActiveState(); | 	widget->updateActiveState(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::adjustActiveness() | void AdventureMapInterface::adjustActiveness() | ||||||
| { | { | ||||||
| 	bool widgetMustBeActive = active && shortcuts->optionSidePanelActive(); | 	bool widgetMustBeActive = active && shortcuts->optionSidePanelActive(); | ||||||
| 	bool mapViewMustBeActive = active && (shortcuts->optionMapViewActive()); | 	bool mapViewMustBeActive = active && (shortcuts->optionMapViewActive()); | ||||||
| @@ -326,7 +326,7 @@ void CAdventureMapInterface::adjustActiveness() | |||||||
| 		widget->getMapView()->deactivate(); | 		widget->getMapView()->deactivate(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onCurrentPlayerChanged(PlayerColor playerID) | void AdventureMapInterface::onCurrentPlayerChanged(PlayerColor playerID) | ||||||
| { | { | ||||||
| 	LOCPLINT->localState->setSelection(nullptr); | 	LOCPLINT->localState->setSelection(nullptr); | ||||||
| 
 | 
 | ||||||
| @@ -337,7 +337,7 @@ void CAdventureMapInterface::onCurrentPlayerChanged(PlayerColor playerID) | |||||||
| 	widget->setPlayer(playerID); | 	widget->setPlayer(playerID); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onPlayerTurnStarted(PlayerColor playerID) | void AdventureMapInterface::onPlayerTurnStarted(PlayerColor playerID) | ||||||
| { | { | ||||||
| 	onCurrentPlayerChanged(playerID); | 	onCurrentPlayerChanged(playerID); | ||||||
| 
 | 
 | ||||||
| @@ -394,7 +394,7 @@ void CAdventureMapInterface::onPlayerTurnStarted(PlayerColor playerID) | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::hotkeyEndingTurn() | void AdventureMapInterface::hotkeyEndingTurn() | ||||||
| { | { | ||||||
| 	if(settings["session"]["spectate"].Bool()) | 	if(settings["session"]["spectate"].Bool()) | ||||||
| 		return; | 		return; | ||||||
| @@ -404,7 +404,7 @@ void CAdventureMapInterface::hotkeyEndingTurn() | |||||||
| 	mapAudio->onPlayerTurnEnded(); | 	mapAudio->onPlayerTurnEnded(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const CGObjectInstance* CAdventureMapInterface::getActiveObject(const int3 &mapPos) | const CGObjectInstance* AdventureMapInterface::getActiveObject(const int3 &mapPos) | ||||||
| { | { | ||||||
| 	std::vector < const CGObjectInstance * > bobjs = LOCPLINT->cb->getBlockingObjs(mapPos);  //blocking objects at tile
 | 	std::vector < const CGObjectInstance * > bobjs = LOCPLINT->cb->getBlockingObjs(mapPos);  //blocking objects at tile
 | ||||||
| 
 | 
 | ||||||
| @@ -414,7 +414,7 @@ const CGObjectInstance* CAdventureMapInterface::getActiveObject(const int3 &mapP | |||||||
| 	return *boost::range::max_element(bobjs, &CMapHandler::compareObjectBlitOrder); | 	return *boost::range::max_element(bobjs, &CMapHandler::compareObjectBlitOrder); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onTileLeftClicked(const int3 &mapPos) | void AdventureMapInterface::onTileLeftClicked(const int3 &mapPos) | ||||||
| { | { | ||||||
| 	if(!shortcuts->optionMapViewActive()) | 	if(!shortcuts->optionMapViewActive()) | ||||||
| 		return; | 		return; | ||||||
| @@ -507,7 +507,7 @@ void CAdventureMapInterface::onTileLeftClicked(const int3 &mapPos) | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onTileHovered(const int3 &mapPos) | void AdventureMapInterface::onTileHovered(const int3 &mapPos) | ||||||
| { | { | ||||||
| 	if(!shortcuts->optionMapViewActive()) | 	if(!shortcuts->optionMapViewActive()) | ||||||
| 		return; | 		return; | ||||||
| @@ -659,7 +659,7 @@ void CAdventureMapInterface::onTileHovered(const int3 &mapPos) | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::showMoveDetailsInStatusbar(const CGHeroInstance & hero, const CGPathNode & pathNode) | void AdventureMapInterface::showMoveDetailsInStatusbar(const CGHeroInstance & hero, const CGPathNode & pathNode) | ||||||
| { | { | ||||||
| 	const int maxMovementPointsAtStartOfLastTurn = pathNode.turns > 0 ? hero.maxMovePoints(pathNode.layer == EPathfindingLayer::LAND) : hero.movement; | 	const int maxMovementPointsAtStartOfLastTurn = pathNode.turns > 0 ? hero.maxMovePoints(pathNode.layer == EPathfindingLayer::LAND) : hero.movement; | ||||||
| 	const int movementPointsLastTurnCost = maxMovementPointsAtStartOfLastTurn - pathNode.moveRemains; | 	const int movementPointsLastTurnCost = maxMovementPointsAtStartOfLastTurn - pathNode.moveRemains; | ||||||
| @@ -674,7 +674,7 @@ void CAdventureMapInterface::showMoveDetailsInStatusbar(const CGHeroInstance & h | |||||||
| 	GH.statusbar->write(result); | 	GH.statusbar->write(result); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onTileRightClicked(const int3 &mapPos) | void AdventureMapInterface::onTileRightClicked(const int3 &mapPos) | ||||||
| { | { | ||||||
| 	if(!shortcuts->optionMapViewActive()) | 	if(!shortcuts->optionMapViewActive()) | ||||||
| 		return; | 		return; | ||||||
| @@ -707,7 +707,7 @@ void CAdventureMapInterface::onTileRightClicked(const int3 &mapPos) | |||||||
| 	CRClickPopup::createAndPush(obj, GH.getCursorPosition(), ETextAlignment::CENTER); | 	CRClickPopup::createAndPush(obj, GH.getCursorPosition(), ETextAlignment::CENTER); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::enterCastingMode(const CSpell * sp) | void AdventureMapInterface::enterCastingMode(const CSpell * sp) | ||||||
| { | { | ||||||
| 	assert(sp->id == SpellID::SCUTTLE_BOAT || sp->id == SpellID::DIMENSION_DOOR); | 	assert(sp->id == SpellID::SCUTTLE_BOAT || sp->id == SpellID::DIMENSION_DOOR); | ||||||
| 	spellBeingCasted = sp; | 	spellBeingCasted = sp; | ||||||
| @@ -717,7 +717,7 @@ void CAdventureMapInterface::enterCastingMode(const CSpell * sp) | |||||||
| 	setState(EAdventureState::CASTING_SPELL); | 	setState(EAdventureState::CASTING_SPELL); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::exitCastingMode() | void AdventureMapInterface::exitCastingMode() | ||||||
| { | { | ||||||
| 	assert(spellBeingCasted); | 	assert(spellBeingCasted); | ||||||
| 	spellBeingCasted = nullptr; | 	spellBeingCasted = nullptr; | ||||||
| @@ -727,25 +727,25 @@ void CAdventureMapInterface::exitCastingMode() | |||||||
| 	config->Bool() = false; | 	config->Bool() = false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::hotkeyAbortCastingMode() | void AdventureMapInterface::hotkeyAbortCastingMode() | ||||||
| { | { | ||||||
| 	exitCastingMode(); | 	exitCastingMode(); | ||||||
| 	LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[731]); //Spell cancelled
 | 	LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[731]); //Spell cancelled
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::performSpellcasting(const int3 & dest) | void AdventureMapInterface::performSpellcasting(const int3 & dest) | ||||||
| { | { | ||||||
| 	SpellID id = spellBeingCasted->id; | 	SpellID id = spellBeingCasted->id; | ||||||
| 	exitCastingMode(); | 	exitCastingMode(); | ||||||
| 	LOCPLINT->cb->castSpell(LOCPLINT->localState->getCurrentHero(), id, dest); | 	LOCPLINT->cb->castSpell(LOCPLINT->localState->getCurrentHero(), id, dest); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Rect CAdventureMapInterface::terrainAreaPixels() const | Rect AdventureMapInterface::terrainAreaPixels() const | ||||||
| { | { | ||||||
| 	return widget->getMapView()->pos; | 	return widget->getMapView()->pos; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const IShipyard * CAdventureMapInterface::ourInaccessibleShipyard(const CGObjectInstance *obj) const | const IShipyard * AdventureMapInterface::ourInaccessibleShipyard(const CGObjectInstance *obj) const | ||||||
| { | { | ||||||
| 	const IShipyard *ret = IShipyard::castFrom(obj); | 	const IShipyard *ret = IShipyard::castFrom(obj); | ||||||
| 
 | 
 | ||||||
| @@ -757,40 +757,40 @@ const IShipyard * CAdventureMapInterface::ourInaccessibleShipyard(const CGObject | |||||||
| 	return ret; | 	return ret; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::hotkeyExitWorldView() | void AdventureMapInterface::hotkeyExitWorldView() | ||||||
| { | { | ||||||
| 	setState(EAdventureState::MAKING_TURN); | 	setState(EAdventureState::MAKING_TURN); | ||||||
| 	widget->getMapView()->onViewMapActivated(); | 	widget->getMapView()->onViewMapActivated(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::openWorldView(int tileSize) | void AdventureMapInterface::openWorldView(int tileSize) | ||||||
| { | { | ||||||
| 	setState(EAdventureState::WORLD_VIEW); | 	setState(EAdventureState::WORLD_VIEW); | ||||||
| 	widget->getMapView()->onViewWorldActivated(tileSize); | 	widget->getMapView()->onViewWorldActivated(tileSize); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::openWorldView() | void AdventureMapInterface::openWorldView() | ||||||
| { | { | ||||||
| 	openWorldView(11); | 	openWorldView(11); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::openWorldView(const std::vector<ObjectPosInfo>& objectPositions, bool showTerrain) | void AdventureMapInterface::openWorldView(const std::vector<ObjectPosInfo>& objectPositions, bool showTerrain) | ||||||
| { | { | ||||||
| 	openWorldView(11); | 	openWorldView(11); | ||||||
| 	widget->getMapView()->onViewSpellActivated(11, objectPositions, showTerrain); | 	widget->getMapView()->onViewSpellActivated(11, objectPositions, showTerrain); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::hotkeyNextTown() | void AdventureMapInterface::hotkeyNextTown() | ||||||
| { | { | ||||||
| 	widget->getTownList()->selectNext(); | 	widget->getTownList()->selectNext(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::hotkeySwitchMapLevel() | void AdventureMapInterface::hotkeySwitchMapLevel() | ||||||
| { | { | ||||||
| 	widget->getMapView()->onMapLevelSwitched(); | 	widget->getMapView()->onMapLevelSwitched(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapInterface::onScreenResize() | void AdventureMapInterface::onScreenResize() | ||||||
| { | { | ||||||
| 	OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE; | 	OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE; | ||||||
| 	widget.reset(); | 	widget.reset(); | ||||||
| @@ -798,7 +798,7 @@ void CAdventureMapInterface::onScreenResize() | |||||||
| 	pos.w = GH.screenDimensions().x; | 	pos.w = GH.screenDimensions().x; | ||||||
| 	pos.h = GH.screenDimensions().y; | 	pos.h = GH.screenDimensions().y; | ||||||
| 
 | 
 | ||||||
| 	widget = std::make_shared<CAdventureMapWidget>(shortcuts); | 	widget = std::make_shared<AdventureMapWidget>(shortcuts); | ||||||
| 	widget->getMapView()->onViewMapActivated(); | 	widget->getMapView()->onViewMapActivated(); | ||||||
| 	widget->setPlayer(currentPlayerID); | 	widget->setPlayer(currentPlayerID); | ||||||
| 	widget->updateActiveState(); | 	widget->updateActiveState(); | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| /*
 | /*
 | ||||||
|  * CAdventureMapInterface.h, part of VCMI engine |  * AdventureMapInterface.h, part of VCMI engine | ||||||
|  * |  * | ||||||
|  * Authors: listed in file AUTHORS in main folder |  * Authors: listed in file AUTHORS in main folder | ||||||
|  * |  * | ||||||
| @@ -29,7 +29,7 @@ class CButton; | |||||||
| class IImage; | class IImage; | ||||||
| class CAnimImage; | class CAnimImage; | ||||||
| class CGStatusBar; | class CGStatusBar; | ||||||
| class CAdventureMapWidget; | class AdventureMapWidget; | ||||||
| class AdventureMapShortcuts; | class AdventureMapShortcuts; | ||||||
| class CAnimation; | class CAnimation; | ||||||
| class MapView; | class MapView; | ||||||
| @@ -46,7 +46,7 @@ struct MapDrawingInfo; | |||||||
| /// That's a huge class which handles general adventure map actions and
 | /// That's a huge class which handles general adventure map actions and
 | ||||||
| /// shows the right menu(questlog, spellbook, end turn,..) from where you
 | /// shows the right menu(questlog, spellbook, end turn,..) from where you
 | ||||||
| /// can get to the towns and heroes.
 | /// can get to the towns and heroes.
 | ||||||
| class CAdventureMapInterface : public CIntObject | class AdventureMapInterface : public CIntObject | ||||||
| { | { | ||||||
| private: | private: | ||||||
| 	/// currently acting player
 | 	/// currently acting player
 | ||||||
| @@ -61,7 +61,7 @@ private: | |||||||
| 	const CSpell *spellBeingCasted; //nullptr if none
 | 	const CSpell *spellBeingCasted; //nullptr if none
 | ||||||
| 
 | 
 | ||||||
| 	std::shared_ptr<MapAudioPlayer> mapAudio; | 	std::shared_ptr<MapAudioPlayer> mapAudio; | ||||||
| 	std::shared_ptr<CAdventureMapWidget> widget; | 	std::shared_ptr<AdventureMapWidget> widget; | ||||||
| 	std::shared_ptr<AdventureMapShortcuts> shortcuts; | 	std::shared_ptr<AdventureMapShortcuts> shortcuts; | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
| @@ -94,7 +94,7 @@ protected: | |||||||
| 	void onScreenResize() override; | 	void onScreenResize() override; | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
| 	CAdventureMapInterface(); | 	AdventureMapInterface(); | ||||||
| 
 | 
 | ||||||
| 	void hotkeyAbortCastingMode(); | 	void hotkeyAbortCastingMode(); | ||||||
| 	void hotkeyExitWorldView(); | 	void hotkeyExitWorldView(); | ||||||
| @@ -171,4 +171,4 @@ public: | |||||||
| 	void openWorldView(const std::vector<ObjectPosInfo>& objectPositions, bool showTerrain); | 	void openWorldView(const std::vector<ObjectPosInfo>& objectPositions, bool showTerrain); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| extern std::shared_ptr<CAdventureMapInterface> adventureInt; | extern std::shared_ptr<AdventureMapInterface> adventureInt; | ||||||
| @@ -22,8 +22,8 @@ | |||||||
| #include "../windows/CSpellWindow.h" | #include "../windows/CSpellWindow.h" | ||||||
| #include "../windows/CTradeWindow.h" | #include "../windows/CTradeWindow.h" | ||||||
| #include "../windows/settings/SettingsMainWindow.h" | #include "../windows/settings/SettingsMainWindow.h" | ||||||
| #include "CAdventureMapInterface.h" | #include "AdventureMapInterface.h" | ||||||
| #include "CAdventureOptions.h" | #include "AdventureOptions.h" | ||||||
| #include "AdventureState.h" | #include "AdventureState.h" | ||||||
|  |  | ||||||
| #include "../../CCallback.h" | #include "../../CCallback.h" | ||||||
| @@ -34,7 +34,7 @@ | |||||||
| #include "../../lib/mapObjects/CGTownInstance.h" | #include "../../lib/mapObjects/CGTownInstance.h" | ||||||
| #include "../../lib/mapping/CMap.h" | #include "../../lib/mapping/CMap.h" | ||||||
|  |  | ||||||
| AdventureMapShortcuts::AdventureMapShortcuts(CAdventureMapInterface & owner) | AdventureMapShortcuts::AdventureMapShortcuts(AdventureMapInterface & owner) | ||||||
| 	: owner(owner) | 	: owner(owner) | ||||||
| 	, state(EAdventureState::NOT_INITIALIZED) | 	, state(EAdventureState::NOT_INITIALIZED) | ||||||
| 	, mapLevel(0) | 	, mapLevel(0) | ||||||
| @@ -203,7 +203,7 @@ void AdventureMapShortcuts::showSpellbook() | |||||||
|  |  | ||||||
| void AdventureMapShortcuts::adventureOptions() | void AdventureMapShortcuts::adventureOptions() | ||||||
| { | { | ||||||
| 	GH.pushIntT<CAdventureOptions>(); | 	GH.pushIntT<AdventureOptions>(); | ||||||
| } | } | ||||||
|  |  | ||||||
| void AdventureMapShortcuts::systemOptions() | void AdventureMapShortcuts::systemOptions() | ||||||
| @@ -273,7 +273,7 @@ void AdventureMapShortcuts::showThievesGuild() | |||||||
|  |  | ||||||
| void AdventureMapShortcuts::showScenarioInfo() | void AdventureMapShortcuts::showScenarioInfo() | ||||||
| { | { | ||||||
| 	CAdventureOptions::showScenarioInfo(); | 	AdventureOptions::showScenarioInfo(); | ||||||
| } | } | ||||||
|  |  | ||||||
| void AdventureMapShortcuts::saveGame() | void AdventureMapShortcuts::saveGame() | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ class Rect; | |||||||
| VCMI_LIB_NAMESPACE_END | VCMI_LIB_NAMESPACE_END | ||||||
|  |  | ||||||
| enum class EShortcut; | enum class EShortcut; | ||||||
| class CAdventureMapInterface; | class AdventureMapInterface; | ||||||
| enum class EAdventureState; | enum class EAdventureState; | ||||||
|  |  | ||||||
| struct AdventureMapShortcutState | struct AdventureMapShortcutState | ||||||
| @@ -29,7 +29,7 @@ struct AdventureMapShortcutState | |||||||
| /// Class that contains list of functions for shortcuts available from adventure map | /// Class that contains list of functions for shortcuts available from adventure map | ||||||
| class AdventureMapShortcuts | class AdventureMapShortcuts | ||||||
| { | { | ||||||
| 	CAdventureMapInterface & owner; | 	AdventureMapInterface & owner; | ||||||
| 	EAdventureState state; | 	EAdventureState state; | ||||||
| 	int mapLevel; | 	int mapLevel; | ||||||
|  |  | ||||||
| @@ -65,7 +65,7 @@ class AdventureMapShortcuts | |||||||
| 	void moveHeroDirectional(const Point & direction); | 	void moveHeroDirectional(const Point & direction); | ||||||
|  |  | ||||||
| public: | public: | ||||||
| 	explicit AdventureMapShortcuts(CAdventureMapInterface & owner); | 	explicit AdventureMapShortcuts(AdventureMapInterface & owner); | ||||||
|  |  | ||||||
| 	std::vector<AdventureMapShortcutState> getShortcuts(); | 	std::vector<AdventureMapShortcutState> getShortcuts(); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ | |||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| #include "StdInc.h" | #include "StdInc.h" | ||||||
| #include "CAdventureMapWidget.h" | #include "AdventureMapWidget.h" | ||||||
| 
 | 
 | ||||||
| #include "AdventureMapShortcuts.h" | #include "AdventureMapShortcuts.h" | ||||||
| #include "CInfoBar.h" | #include "CInfoBar.h" | ||||||
| @@ -32,7 +32,7 @@ | |||||||
| #include "../../lib/StringConstants.h" | #include "../../lib/StringConstants.h" | ||||||
| #include "../../lib/filesystem/ResourceID.h" | #include "../../lib/filesystem/ResourceID.h" | ||||||
| 
 | 
 | ||||||
| CAdventureMapWidget::CAdventureMapWidget( std::shared_ptr<AdventureMapShortcuts> shortcuts ) | AdventureMapWidget::AdventureMapWidget( std::shared_ptr<AdventureMapShortcuts> shortcuts ) | ||||||
| 	: shortcuts(shortcuts) | 	: shortcuts(shortcuts) | ||||||
| 	, mapLevel(0) | 	, mapLevel(0) | ||||||
| { | { | ||||||
| @@ -40,18 +40,18 @@ CAdventureMapWidget::CAdventureMapWidget( std::shared_ptr<AdventureMapShortcuts> | |||||||
| 	pos.w = GH.screenDimensions().x; | 	pos.w = GH.screenDimensions().x; | ||||||
| 	pos.h = GH.screenDimensions().y; | 	pos.h = GH.screenDimensions().y; | ||||||
| 
 | 
 | ||||||
| 	REGISTER_BUILDER("adventureInfobar",         &CAdventureMapWidget::buildInfobox         ); | 	REGISTER_BUILDER("adventureInfobar",         &AdventureMapWidget::buildInfobox         ); | ||||||
| 	REGISTER_BUILDER("adventureMapImage",        &CAdventureMapWidget::buildMapImage        ); | 	REGISTER_BUILDER("adventureMapImage",        &AdventureMapWidget::buildMapImage        ); | ||||||
| 	REGISTER_BUILDER("adventureMapButton",       &CAdventureMapWidget::buildMapButton       ); | 	REGISTER_BUILDER("adventureMapButton",       &AdventureMapWidget::buildMapButton       ); | ||||||
| 	REGISTER_BUILDER("adventureMapContainer",    &CAdventureMapWidget::buildMapContainer    ); | 	REGISTER_BUILDER("adventureMapContainer",    &AdventureMapWidget::buildMapContainer    ); | ||||||
| 	REGISTER_BUILDER("adventureMapGameArea",     &CAdventureMapWidget::buildMapGameArea     ); | 	REGISTER_BUILDER("adventureMapGameArea",     &AdventureMapWidget::buildMapGameArea     ); | ||||||
| 	REGISTER_BUILDER("adventureMapHeroList",     &CAdventureMapWidget::buildMapHeroList     ); | 	REGISTER_BUILDER("adventureMapHeroList",     &AdventureMapWidget::buildMapHeroList     ); | ||||||
| 	REGISTER_BUILDER("adventureMapIcon",         &CAdventureMapWidget::buildMapIcon         ); | 	REGISTER_BUILDER("adventureMapIcon",         &AdventureMapWidget::buildMapIcon         ); | ||||||
| 	REGISTER_BUILDER("adventureMapTownList",     &CAdventureMapWidget::buildMapTownList     ); | 	REGISTER_BUILDER("adventureMapTownList",     &AdventureMapWidget::buildMapTownList     ); | ||||||
| 	REGISTER_BUILDER("adventureMinimap",         &CAdventureMapWidget::buildMinimap         ); | 	REGISTER_BUILDER("adventureMinimap",         &AdventureMapWidget::buildMinimap         ); | ||||||
| 	REGISTER_BUILDER("adventureResourceDateBar", &CAdventureMapWidget::buildResourceDateBar ); | 	REGISTER_BUILDER("adventureResourceDateBar", &AdventureMapWidget::buildResourceDateBar ); | ||||||
| 	REGISTER_BUILDER("adventureStatusBar",       &CAdventureMapWidget::buildStatusBar       ); | 	REGISTER_BUILDER("adventureStatusBar",       &AdventureMapWidget::buildStatusBar       ); | ||||||
| 	REGISTER_BUILDER("adventurePlayerTexture",   &CAdventureMapWidget::buildTexturePlayerColored); | 	REGISTER_BUILDER("adventurePlayerTexture",   &AdventureMapWidget::buildTexturePlayerColored); | ||||||
| 
 | 
 | ||||||
| 	for (const auto & entry : shortcuts->getShortcuts()) | 	for (const auto & entry : shortcuts->getShortcuts()) | ||||||
| 		addShortcut(entry.shortcut, entry.callback); | 		addShortcut(entry.shortcut, entry.callback); | ||||||
| @@ -68,7 +68,7 @@ CAdventureMapWidget::CAdventureMapWidget( std::shared_ptr<AdventureMapShortcuts> | |||||||
| 	addUsedEvents(KEYBOARD); | 	addUsedEvents(KEYBOARD); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapWidget::onMapViewMoved(const Rect & visibleArea, int newMapLevel) | void AdventureMapWidget::onMapViewMoved(const Rect & visibleArea, int newMapLevel) | ||||||
| { | { | ||||||
| 	if(mapLevel == newMapLevel) | 	if(mapLevel == newMapLevel) | ||||||
| 		return; | 		return; | ||||||
| @@ -77,21 +77,21 @@ void CAdventureMapWidget::onMapViewMoved(const Rect & visibleArea, int newMapLev | |||||||
| 	updateActiveState(); | 	updateActiveState(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Rect CAdventureMapWidget::readSourceArea(const JsonNode & source, const JsonNode & sourceCommon) | Rect AdventureMapWidget::readSourceArea(const JsonNode & source, const JsonNode & sourceCommon) | ||||||
| { | { | ||||||
| 	const auto & input = source.isNull() ? sourceCommon : source; | 	const auto & input = source.isNull() ? sourceCommon : source; | ||||||
| 
 | 
 | ||||||
| 	return readArea(input, Rect(Point(0, 0), Point(800, 600))); | 	return readArea(input, Rect(Point(0, 0), Point(800, 600))); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Rect CAdventureMapWidget::readTargetArea(const JsonNode & source) | Rect AdventureMapWidget::readTargetArea(const JsonNode & source) | ||||||
| { | { | ||||||
| 	if(subwidgetSizes.empty()) | 	if(subwidgetSizes.empty()) | ||||||
| 		return readArea(source, pos); | 		return readArea(source, pos); | ||||||
| 	return readArea(source, subwidgetSizes.back()); | 	return readArea(source, subwidgetSizes.back()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Rect CAdventureMapWidget::readArea(const JsonNode & source, const Rect & boundingBox) | Rect AdventureMapWidget::readArea(const JsonNode & source, const Rect & boundingBox) | ||||||
| { | { | ||||||
| 	const auto & object = source.Struct(); | 	const auto & object = source.Struct(); | ||||||
| 
 | 
 | ||||||
| @@ -127,7 +127,7 @@ Rect CAdventureMapWidget::readArea(const JsonNode & source, const Rect & boundin | |||||||
| 	return Rect(topLeft + boundingBox.topLeft(), dimensions); | 	return Rect(topLeft + boundingBox.topLeft(), dimensions); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<IImage> CAdventureMapWidget::loadImage(const std::string & name) | std::shared_ptr<IImage> AdventureMapWidget::loadImage(const std::string & name) | ||||||
| { | { | ||||||
| 	ResourceID resource(name, EResType::IMAGE); | 	ResourceID resource(name, EResType::IMAGE); | ||||||
| 
 | 
 | ||||||
| @@ -138,7 +138,7 @@ std::shared_ptr<IImage> CAdventureMapWidget::loadImage(const std::string & name) | |||||||
| 	return images[resource.getName()]; | 	return images[resource.getName()]; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CAnimation> CAdventureMapWidget::loadAnimation(const std::string & name) | std::shared_ptr<CAnimation> AdventureMapWidget::loadAnimation(const std::string & name) | ||||||
| { | { | ||||||
| 	ResourceID resource(name, EResType::ANIMATION); | 	ResourceID resource(name, EResType::ANIMATION); | ||||||
| 
 | 
 | ||||||
| @@ -148,14 +148,14 @@ std::shared_ptr<CAnimation> CAdventureMapWidget::loadAnimation(const std::string | |||||||
| 	return animations[resource.getName()]; | 	return animations[resource.getName()]; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildInfobox(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildInfobox(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect area = readTargetArea(input["area"]); | 	Rect area = readTargetArea(input["area"]); | ||||||
| 	infoBar = std::make_shared<CInfoBar>(area); | 	infoBar = std::make_shared<CInfoBar>(area); | ||||||
| 	return infoBar; | 	return infoBar; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapImage(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildMapImage(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect targetArea = readTargetArea(input["area"]); | 	Rect targetArea = readTargetArea(input["area"]); | ||||||
| 	Rect sourceArea = readSourceArea(input["sourceArea"], input["area"]); | 	Rect sourceArea = readSourceArea(input["sourceArea"], input["area"]); | ||||||
| @@ -164,7 +164,7 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapImage(const JsonNode & | |||||||
| 	return std::make_shared<CFilledTexture>(loadImage(image), targetArea, sourceArea); | 	return std::make_shared<CFilledTexture>(loadImage(image), targetArea, sourceArea); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapButton(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildMapButton(const JsonNode & input) | ||||||
| { | { | ||||||
| 	auto position = readTargetArea(input["area"]); | 	auto position = readTargetArea(input["area"]); | ||||||
| 	auto image = input["image"].String(); | 	auto image = input["image"].String(); | ||||||
| @@ -179,7 +179,7 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapButton(const JsonNode & | |||||||
| 	return button; | 	return button; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapContainer(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildMapContainer(const JsonNode & input) | ||||||
| { | { | ||||||
| 	auto position = readTargetArea(input["area"]); | 	auto position = readTargetArea(input["area"]); | ||||||
| 	std::shared_ptr<CAdventureMapContainerWidget> result; | 	std::shared_ptr<CAdventureMapContainerWidget> result; | ||||||
| @@ -222,14 +222,14 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapContainer(const JsonNod | |||||||
| 	return result; | 	return result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapGameArea(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildMapGameArea(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect area = readTargetArea(input["area"]); | 	Rect area = readTargetArea(input["area"]); | ||||||
| 	mapView = std::make_shared<MapView>(area.topLeft(), area.dimensions()); | 	mapView = std::make_shared<MapView>(area.topLeft(), area.dimensions()); | ||||||
| 	return mapView; | 	return mapView; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapHeroList(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildMapHeroList(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect area = readTargetArea(input["area"]); | 	Rect area = readTargetArea(input["area"]); | ||||||
| 	subwidgetSizes.push_back(area); | 	subwidgetSizes.push_back(area); | ||||||
| @@ -254,7 +254,7 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapHeroList(const JsonNode | |||||||
| 	return result; | 	return result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapIcon(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildMapIcon(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect area = readTargetArea(input["area"]); | 	Rect area = readTargetArea(input["area"]); | ||||||
| 	size_t index = input["index"].Integer(); | 	size_t index = input["index"].Integer(); | ||||||
| @@ -264,7 +264,7 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapIcon(const JsonNode & i | |||||||
| 	return std::make_shared<CAdventureMapIcon>(area.topLeft(), loadAnimation(image), index, perPlayer); | 	return std::make_shared<CAdventureMapIcon>(area.topLeft(), loadAnimation(image), index, perPlayer); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapTownList(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildMapTownList(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect area = readTargetArea(input["area"]); | 	Rect area = readTargetArea(input["area"]); | ||||||
| 	subwidgetSizes.push_back(area); | 	subwidgetSizes.push_back(area); | ||||||
| @@ -288,14 +288,14 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapTownList(const JsonNode | |||||||
| 	return result; | 	return result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildMinimap(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildMinimap(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect area = readTargetArea(input["area"]); | 	Rect area = readTargetArea(input["area"]); | ||||||
| 	minimap = std::make_shared<CMinimap>(area); | 	minimap = std::make_shared<CMinimap>(area); | ||||||
| 	return minimap; | 	return minimap; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildResourceDateBar(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildResourceDateBar(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect area = readTargetArea(input["area"]); | 	Rect area = readTargetArea(input["area"]); | ||||||
| 	std::string image = input["image"].String(); | 	std::string image = input["image"].String(); | ||||||
| @@ -317,7 +317,7 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildResourceDateBar(const Json | |||||||
| 	return result; | 	return result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildStatusBar(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildStatusBar(const JsonNode & input) | ||||||
| { | { | ||||||
| 	Rect area = readTargetArea(input["area"]); | 	Rect area = readTargetArea(input["area"]); | ||||||
| 	std::string image = input["image"].String(); | 	std::string image = input["image"].String(); | ||||||
| @@ -327,7 +327,7 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildStatusBar(const JsonNode & | |||||||
| 	return CGStatusBar::create(background); | 	return CGStatusBar::create(background); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CIntObject> CAdventureMapWidget::buildTexturePlayerColored(const JsonNode & input) | std::shared_ptr<CIntObject> AdventureMapWidget::buildTexturePlayerColored(const JsonNode & input) | ||||||
| { | { | ||||||
| 	logGlobal->debug("Building widget CFilledTexture"); | 	logGlobal->debug("Building widget CFilledTexture"); | ||||||
| 	auto image = input["image"].String(); | 	auto image = input["image"].String(); | ||||||
| @@ -335,37 +335,37 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildTexturePlayerColored(const | |||||||
| 	return std::make_shared<FilledTexturePlayerColored>(image, area); | 	return std::make_shared<FilledTexturePlayerColored>(image, area); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CHeroList> CAdventureMapWidget::getHeroList() | std::shared_ptr<CHeroList> AdventureMapWidget::getHeroList() | ||||||
| { | { | ||||||
| 	return heroList; | 	return heroList; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CTownList> CAdventureMapWidget::getTownList() | std::shared_ptr<CTownList> AdventureMapWidget::getTownList() | ||||||
| { | { | ||||||
| 	return townList; | 	return townList; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CMinimap> CAdventureMapWidget::getMinimap() | std::shared_ptr<CMinimap> AdventureMapWidget::getMinimap() | ||||||
| { | { | ||||||
| 	return minimap; | 	return minimap; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<MapView> CAdventureMapWidget::getMapView() | std::shared_ptr<MapView> AdventureMapWidget::getMapView() | ||||||
| { | { | ||||||
| 	return mapView; | 	return mapView; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<CInfoBar> CAdventureMapWidget::getInfoBar() | std::shared_ptr<CInfoBar> AdventureMapWidget::getInfoBar() | ||||||
| { | { | ||||||
| 	return infoBar; | 	return infoBar; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapWidget::setPlayer(const PlayerColor & player) | void AdventureMapWidget::setPlayer(const PlayerColor & player) | ||||||
| { | { | ||||||
| 	setPlayerChildren(this, player); | 	setPlayerChildren(this, player); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapWidget::setPlayerChildren(CIntObject * widget, const PlayerColor & player) | void AdventureMapWidget::setPlayerChildren(CIntObject * widget, const PlayerColor & player) | ||||||
| { | { | ||||||
| 	for(auto & entry : widget->children) | 	for(auto & entry : widget->children) | ||||||
| 	{ | 	{ | ||||||
| @@ -415,7 +415,7 @@ void CAdventureMapOverlayWidget::show(SDL_Surface * to) | |||||||
| 	CIntObject::showAll(to); | 	CIntObject::showAll(to); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapWidget::updateActiveStateChildden(CIntObject * widget) | void AdventureMapWidget::updateActiveStateChildden(CIntObject * widget) | ||||||
| { | { | ||||||
| 	for(auto & entry : widget->children) | 	for(auto & entry : widget->children) | ||||||
| 	{ | 	{ | ||||||
| @@ -446,7 +446,7 @@ void CAdventureMapWidget::updateActiveStateChildden(CIntObject * widget) | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureMapWidget::updateActiveState() | void AdventureMapWidget::updateActiveState() | ||||||
| { | { | ||||||
| 	updateActiveStateChildden(this); | 	updateActiveStateChildden(this); | ||||||
| 
 | 
 | ||||||
| @@ -21,7 +21,7 @@ class AdventureMapShortcuts; | |||||||
| enum class EAdventureState; | enum class EAdventureState; | ||||||
| 
 | 
 | ||||||
| /// Internal class of AdventureMapInterface that contains actual UI elements
 | /// Internal class of AdventureMapInterface that contains actual UI elements
 | ||||||
| class CAdventureMapWidget : public InterfaceObjectConfigurable | class AdventureMapWidget : public InterfaceObjectConfigurable | ||||||
| { | { | ||||||
| 	int mapLevel; | 	int mapLevel; | ||||||
| 	/// temporary stack of sizes of currently building widgets
 | 	/// temporary stack of sizes of currently building widgets
 | ||||||
| @@ -67,7 +67,7 @@ class CAdventureMapWidget : public InterfaceObjectConfigurable | |||||||
| 	void setPlayerChildren(CIntObject * widget, const PlayerColor & player); | 	void setPlayerChildren(CIntObject * widget, const PlayerColor & player); | ||||||
| 	void updateActiveStateChildden(CIntObject * widget); | 	void updateActiveStateChildden(CIntObject * widget); | ||||||
| public: | public: | ||||||
| 	explicit CAdventureMapWidget( std::shared_ptr<AdventureMapShortcuts> shortcuts ); | 	explicit AdventureMapWidget( std::shared_ptr<AdventureMapShortcuts> shortcuts ); | ||||||
| 
 | 
 | ||||||
| 	std::shared_ptr<CHeroList> getHeroList(); | 	std::shared_ptr<CHeroList> getHeroList(); | ||||||
| 	std::shared_ptr<CTownList> getTownList(); | 	std::shared_ptr<CTownList> getTownList(); | ||||||
| @@ -84,7 +84,7 @@ public: | |||||||
| /// Small helper class that provides ownership for shared_ptr's of child elements
 | /// Small helper class that provides ownership for shared_ptr's of child elements
 | ||||||
| class CAdventureMapContainerWidget : public CIntObject | class CAdventureMapContainerWidget : public CIntObject | ||||||
| { | { | ||||||
| 	friend class CAdventureMapWidget; | 	friend class AdventureMapWidget; | ||||||
| 	std::vector<std::shared_ptr<CIntObject>> ownedChildren; | 	std::vector<std::shared_ptr<CIntObject>> ownedChildren; | ||||||
| 	std::string disableCondition; | 	std::string disableCondition; | ||||||
| }; | }; | ||||||
| @@ -9,7 +9,7 @@ | |||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include "StdInc.h" | #include "StdInc.h" | ||||||
| #include "CAdventureOptions.h" | #include "AdventureOptions.h" | ||||||
| 
 | 
 | ||||||
| #include "../CGameInfo.h" | #include "../CGameInfo.h" | ||||||
| #include "../CPlayerInterface.h" | #include "../CPlayerInterface.h" | ||||||
| @@ -23,18 +23,18 @@ | |||||||
| #include "../../CCallback.h" | #include "../../CCallback.h" | ||||||
| #include "../../lib/StartInfo.h" | #include "../../lib/StartInfo.h" | ||||||
| 
 | 
 | ||||||
| CAdventureOptions::CAdventureOptions() | AdventureOptions::AdventureOptions() | ||||||
| 	: CWindowObject(PLAYER_COLORED, "ADVOPTS") | 	: CWindowObject(PLAYER_COLORED, "ADVOPTS") | ||||||
| { | { | ||||||
| 	OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE); | 	OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE); | ||||||
| 
 | 
 | ||||||
| 	viewWorld = std::make_shared<CButton>(Point(24, 23), "ADVVIEW.DEF", CButton::tooltip(), [&](){ close(); }, EShortcut::ADVENTURE_VIEW_WORLD_X2); | 	viewWorld = std::make_shared<CButton>(Point(24, 23), "ADVVIEW.DEF", CButton::tooltip(), [&](){ close(); }, EShortcut::ADVENTURE_VIEW_WORLD); | ||||||
| 	viewWorld->addCallback( [] { LOCPLINT->viewWorldMap(); }); | 	viewWorld->addCallback( [] { LOCPLINT->viewWorldMap(); }); | ||||||
| 
 | 
 | ||||||
| 	exit = std::make_shared<CButton>(Point(204, 313), "IOK6432.DEF", CButton::tooltip(), std::bind(&CAdventureOptions::close, this), EShortcut::GLOBAL_RETURN); | 	exit = std::make_shared<CButton>(Point(204, 313), "IOK6432.DEF", CButton::tooltip(), std::bind(&AdventureOptions::close, this), EShortcut::GLOBAL_RETURN); | ||||||
| 
 | 
 | ||||||
| 	scenInfo = std::make_shared<CButton>(Point(24, 198), "ADVINFO.DEF", CButton::tooltip(), [&](){ close(); }, EShortcut::ADVENTURE_VIEW_SCENARIO); | 	scenInfo = std::make_shared<CButton>(Point(24, 198), "ADVINFO.DEF", CButton::tooltip(), [&](){ close(); }, EShortcut::ADVENTURE_VIEW_SCENARIO); | ||||||
| 	scenInfo->addCallback(CAdventureOptions::showScenarioInfo); | 	scenInfo->addCallback(AdventureOptions::showScenarioInfo); | ||||||
| 
 | 
 | ||||||
| 	puzzle = std::make_shared<CButton>(Point(24, 81), "ADVPUZ.DEF", CButton::tooltip(), [&](){ close(); }, EShortcut::ADVENTURE_VIEW_PUZZLE); | 	puzzle = std::make_shared<CButton>(Point(24, 81), "ADVPUZ.DEF", CButton::tooltip(), [&](){ close(); }, EShortcut::ADVENTURE_VIEW_PUZZLE); | ||||||
| 	puzzle->addCallback(std::bind(&CPlayerInterface::showPuzzleMap, LOCPLINT)); | 	puzzle->addCallback(std::bind(&CPlayerInterface::showPuzzleMap, LOCPLINT)); | ||||||
| @@ -46,7 +46,7 @@ CAdventureOptions::CAdventureOptions() | |||||||
| 		dig->block(true); | 		dig->block(true); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CAdventureOptions::showScenarioInfo() | void AdventureOptions::showScenarioInfo() | ||||||
| { | { | ||||||
| 	if(LOCPLINT->cb->getStartInfo()->campState) | 	if(LOCPLINT->cb->getStartInfo()->campState) | ||||||
| 	{ | 	{ | ||||||
| @@ -14,7 +14,7 @@ | |||||||
| class CButton; | class CButton; | ||||||
| 
 | 
 | ||||||
| /// Adventure options dialog where you can view the world, dig, play the replay of the last turn,...
 | /// Adventure options dialog where you can view the world, dig, play the replay of the last turn,...
 | ||||||
| class CAdventureOptions : public CWindowObject | class AdventureOptions : public CWindowObject | ||||||
| { | { | ||||||
| 	std::shared_ptr<CButton> exit; | 	std::shared_ptr<CButton> exit; | ||||||
| 	std::shared_ptr<CButton> viewWorld; | 	std::shared_ptr<CButton> viewWorld; | ||||||
| @@ -24,7 +24,7 @@ class CAdventureOptions : public CWindowObject | |||||||
| 	/*std::shared_ptr<CButton> replay*/ | 	/*std::shared_ptr<CButton> replay*/ | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
| 	CAdventureOptions(); | 	AdventureOptions(); | ||||||
| 
 | 
 | ||||||
| 	static void showScenarioInfo(); | 	static void showScenarioInfo(); | ||||||
| }; | }; | ||||||
| @@ -19,7 +19,7 @@ | |||||||
| #include "../gui/CGuiHandler.h" | #include "../gui/CGuiHandler.h" | ||||||
| #include "../gui/Shortcut.h" | #include "../gui/Shortcut.h" | ||||||
| #include "../render/Colors.h" | #include "../render/Colors.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
| #include "../windows/CMessage.h" | #include "../windows/CMessage.h" | ||||||
|  |  | ||||||
| #include "../../CCallback.h" | #include "../../CCallback.h" | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
| #include "StdInc.h" | #include "StdInc.h" | ||||||
| #include "CInfoBar.h" | #include "CInfoBar.h" | ||||||
|  |  | ||||||
| #include "CAdventureMapInterface.h" | #include "AdventureMapInterface.h" | ||||||
|  |  | ||||||
| #include "../widgets/CComponent.h" | #include "../widgets/CComponent.h" | ||||||
| #include "../widgets/Images.h" | #include "../widgets/Images.h" | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
| #include "StdInc.h" | #include "StdInc.h" | ||||||
| #include "CList.h" | #include "CList.h" | ||||||
|  |  | ||||||
| #include "CAdventureMapInterface.h" | #include "AdventureMapInterface.h" | ||||||
|  |  | ||||||
| #include "../widgets/Images.h" | #include "../widgets/Images.h" | ||||||
| #include "../widgets/Buttons.h" | #include "../widgets/Buttons.h" | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
| #include "StdInc.h" | #include "StdInc.h" | ||||||
| #include "CMinimap.h" | #include "CMinimap.h" | ||||||
|  |  | ||||||
| #include "CAdventureMapInterface.h" | #include "AdventureMapInterface.h" | ||||||
|  |  | ||||||
| #include "../widgets/Images.h" | #include "../widgets/Images.h" | ||||||
| #include "../CGameInfo.h" | #include "../CGameInfo.h" | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| #include "../gui/CursorHandler.h" | #include "../gui/CursorHandler.h" | ||||||
| #include "../gui/CGuiHandler.h" | #include "../gui/CGuiHandler.h" | ||||||
| #include "../render/Canvas.h" | #include "../render/Canvas.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
|  |  | ||||||
| #include "../../CCallback.h" | #include "../../CCallback.h" | ||||||
| #include "../../lib/CStack.h" | #include "../../lib/CStack.h" | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ | |||||||
| #include "../../CCallback.h" | #include "../../CCallback.h" | ||||||
| #include "../CGameInfo.h" | #include "../CGameInfo.h" | ||||||
| #include "../CPlayerInterface.h" | #include "../CPlayerInterface.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
|  |  | ||||||
| #include "../../lib/mapObjects/CGHeroInstance.h" | #include "../../lib/mapObjects/CGHeroInstance.h" | ||||||
| #include "../../lib/mapping/CMap.h" | #include "../../lib/mapping/CMap.h" | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ | |||||||
|  |  | ||||||
| #include "../CGameInfo.h" | #include "../CGameInfo.h" | ||||||
| #include "../CPlayerInterface.h" | #include "../CPlayerInterface.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
| #include "../gui/CGuiHandler.h" | #include "../gui/CGuiHandler.h" | ||||||
| #include "../render/CAnimation.h" | #include "../render/CAnimation.h" | ||||||
| #include "../render/Canvas.h" | #include "../render/Canvas.h" | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
| #include "MapViewModel.h" | #include "MapViewModel.h" | ||||||
|  |  | ||||||
| #include "../CGameInfo.h" | #include "../CGameInfo.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
| #include "../gui/CGuiHandler.h" | #include "../gui/CGuiHandler.h" | ||||||
| #include "../gui/CursorHandler.h" | #include "../gui/CursorHandler.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ | |||||||
| #include "MapViewModel.h" | #include "MapViewModel.h" | ||||||
|  |  | ||||||
| #include "../CPlayerInterface.h" | #include "../CPlayerInterface.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
| #include "../gui/CGuiHandler.h" | #include "../gui/CGuiHandler.h" | ||||||
|  |  | ||||||
| #include "../../lib/CConfigHandler.h" | #include "../../lib/CConfigHandler.h" | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| #include "../renderSDL/SDL_Extensions.h" | #include "../renderSDL/SDL_Extensions.h" | ||||||
| #include "../render/IImage.h" | #include "../render/IImage.h" | ||||||
| #include "../render/ColorFilter.h" | #include "../render/ColorFilter.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
| #include "../adventureMap/CList.h" | #include "../adventureMap/CList.h" | ||||||
| #include "../adventureMap/CResDataBar.h" | #include "../adventureMap/CResDataBar.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ | |||||||
| #include "../gui/CGuiHandler.h" | #include "../gui/CGuiHandler.h" | ||||||
| #include "../gui/Shortcut.h" | #include "../gui/Shortcut.h" | ||||||
| #include "../widgets/CComponent.h" | #include "../widgets/CComponent.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
| #include "../widgets/Buttons.h" | #include "../widgets/Buttons.h" | ||||||
| #include "../adventureMap/CMinimap.h" | #include "../adventureMap/CMinimap.h" | ||||||
| #include "../renderSDL/SDL_Extensions.h" | #include "../renderSDL/SDL_Extensions.h" | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| #include "../widgets/MiscWidgets.h" | #include "../widgets/MiscWidgets.h" | ||||||
| #include "../widgets/CComponent.h" | #include "../widgets/CComponent.h" | ||||||
| #include "../widgets/TextControls.h" | #include "../widgets/TextControls.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
| #include "../render/CAnimation.h" | #include "../render/CAnimation.h" | ||||||
| #include "../renderSDL/SDL_Extensions.h" | #include "../renderSDL/SDL_Extensions.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ | |||||||
| #include "../gui/CGuiHandler.h" | #include "../gui/CGuiHandler.h" | ||||||
| #include "../battle/BattleInterface.h" | #include "../battle/BattleInterface.h" | ||||||
| #include "../battle/BattleInterfaceClasses.h" | #include "../battle/BattleInterfaceClasses.h" | ||||||
| #include "../adventureMap/CAdventureMapInterface.h" | #include "../adventureMap/AdventureMapInterface.h" | ||||||
| #include "../windows/CMessage.h" | #include "../windows/CMessage.h" | ||||||
| #include "../renderSDL/SDL_Extensions.h" | #include "../renderSDL/SDL_Extensions.h" | ||||||
| #include "../gui/CursorHandler.h" | #include "../gui/CursorHandler.h" | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ private: | |||||||
| 	SettingsListener onFullscreenChanged; | 	SettingsListener onFullscreenChanged; | ||||||
|  |  | ||||||
| 	std::vector<Point> supportedResolutions; | 	std::vector<Point> supportedResolutions; | ||||||
| 	std::vector<double> supportedScaling; | 	std::vector<int> supportedScaling; | ||||||
|  |  | ||||||
| 	void setFullscreenMode( bool on); | 	void setFullscreenMode( bool on); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user