mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-20 20:23:03 +02:00
Reorganized includes for new layout. New class - IImageLoader
This commit is contained in:
parent
84dfcacafd
commit
108a42e4ba
@ -21,7 +21,6 @@
|
||||
#include "lib/CGeneralTextHandler.h"
|
||||
#include "lib/CHeroHandler.h"
|
||||
#include "lib/NetPacks.h"
|
||||
#include "client/mapHandler.h"
|
||||
#include "lib/CArtHandler.h"
|
||||
#include "lib/GameConstants.h"
|
||||
#include "lib/CPlayerState.h"
|
||||
|
@ -11,48 +11,43 @@
|
||||
//
|
||||
#include "StdInc.h"
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
#include "gui/SDL_Extensions.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "mapHandler.h"
|
||||
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
#include "../lib/filesystem/FileStream.h"
|
||||
#include "mainmenu/CMainMenu.h"
|
||||
#include "lobby/CSelectionBase.h"
|
||||
#include "windows/CCastleInterface.h"
|
||||
#include "../lib/CConsoleHandler.h"
|
||||
#include "gui/CursorHandler.h"
|
||||
#include "../lib/CGameState.h"
|
||||
#include "../CCallback.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "windows/CAdvmapInterface.h"
|
||||
#include "../lib/CBuildingHandler.h"
|
||||
#include "CVideoHandler.h"
|
||||
#include "CMusicHandler.h"
|
||||
#include "Client.h"
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "CServerHandler.h"
|
||||
#include "gui/NotificationHandler.h"
|
||||
#include "ClientCommandManager.h"
|
||||
#include "windows/CMessage.h"
|
||||
#include "renderSDL/SDL_Extensions.h"
|
||||
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
#include "../lib/filesystem/FileStream.h"
|
||||
#include "../lib/CConsoleHandler.h"
|
||||
#include "../lib/CGameState.h"
|
||||
#include "../lib/CBuildingHandler.h"
|
||||
#include "../CCallback.h"
|
||||
#include "../lib/CHeroHandler.h"
|
||||
#include "../lib/spells/CSpellHandler.h"
|
||||
#include "CMusicHandler.h"
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
#include "Graphics.h"
|
||||
#include "Client.h"
|
||||
#include "../lib/serializer/BinaryDeserializer.h"
|
||||
#include "../lib/serializer/BinarySerializer.h"
|
||||
#include "../lib/VCMIDirs.h"
|
||||
#include "../lib/NetPacks.h"
|
||||
#include "CMessage.h"
|
||||
#include "../lib/CModHandler.h"
|
||||
#include "../lib/CTownHandler.h"
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "../lib/logging/CBasicLogConfigurator.h"
|
||||
#include "../lib/CPlayerState.h"
|
||||
#include "gui/CAnimation.h"
|
||||
#include "../lib/serializer/Connection.h"
|
||||
#include "CServerHandler.h"
|
||||
#include "gui/NotificationHandler.h"
|
||||
#include "ClientCommandManager.h"
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
#include "mainmenu/CPrologEpilogVideo.h"
|
||||
#include <vstd/StringUtils.h>
|
||||
|
@ -25,6 +25,7 @@ set(client_SRCS
|
||||
battle/BattleSiegeController.cpp
|
||||
battle/BattleStacksController.cpp
|
||||
battle/BattleWindow.cpp
|
||||
battle/CreatureAnimation.cpp
|
||||
|
||||
gui/CGuiHandler.cpp
|
||||
gui/CIntObject.cpp
|
||||
@ -163,6 +164,7 @@ set(client_HEADERS
|
||||
render/ICursor.h
|
||||
render/IFont.h
|
||||
render/IImage.h
|
||||
render/IImageLoader.h
|
||||
|
||||
renderSDL/CBitmapFont.h
|
||||
renderSDL/CBitmapHanFont.h
|
||||
|
@ -13,7 +13,8 @@
|
||||
|
||||
#include "CMusicHandler.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "SDLRWwrapper.h"
|
||||
#include "renderSDL/SDLRWwrapper.h"
|
||||
|
||||
#include "../lib/JsonNode.h"
|
||||
#include "../lib/GameConstants.h"
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
@ -22,6 +23,7 @@
|
||||
#include "../lib/VCMIDirs.h"
|
||||
#include "../lib/TerrainHandler.h"
|
||||
|
||||
|
||||
#define VCMI_SOUND_NAME(x)
|
||||
#define VCMI_SOUND_FILE(y) #y,
|
||||
|
||||
|
@ -11,7 +11,8 @@
|
||||
|
||||
#include <vcmi/Artifact.h>
|
||||
|
||||
#include "windows/CAdvmapInterface.h"
|
||||
#include "adventureMap/CAdvMapInt.h"
|
||||
#include "adventureMap/mapHandler.h"
|
||||
#include "battle/BattleInterface.h"
|
||||
#include "battle/BattleEffectsController.h"
|
||||
#include "battle/BattleFieldController.h"
|
||||
@ -25,15 +26,15 @@
|
||||
#include "windows/CHeroWindow.h"
|
||||
#include "windows/CCreatureWindow.h"
|
||||
#include "windows/CQuestLog.h"
|
||||
#include "CMessage.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "gui/SDL_Extensions.h"
|
||||
#include "widgets/CComponent.h"
|
||||
#include "widgets/Buttons.h"
|
||||
#include "windows/CTradeWindow.h"
|
||||
#include "windows/CSpellWindow.h"
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "Graphics.h"
|
||||
#include "windows/GUIClasses.h"
|
||||
#include "render/CAnimation.h"
|
||||
#include "render/IImage.h"
|
||||
#include "../lib/CArtHandler.h"
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
#include "../lib/CHeroHandler.h"
|
||||
@ -51,13 +52,11 @@
|
||||
#include "../lib/NetPacks.h"//todo: remove
|
||||
#include "../lib/mapping/CMap.h"
|
||||
#include "../lib/VCMIDirs.h"
|
||||
#include "mapHandler.h"
|
||||
#include "../lib/CStopWatch.h"
|
||||
#include "../lib/StartInfo.h"
|
||||
#include "../lib/CPlayerState.h"
|
||||
#include "../lib/GameConstants.h"
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "gui/CAnimation.h"
|
||||
#include "windows/InfoWindows.h"
|
||||
#include "../lib/UnlockGuard.h"
|
||||
#include "../lib/CPathfinder.h"
|
||||
@ -67,6 +66,7 @@
|
||||
// FIXME: only needed for CGameState::mutex
|
||||
#include "../lib/CGameState.h"
|
||||
#include "gui/NotificationHandler.h"
|
||||
#include "adventureMap/CInGameConsole.h"
|
||||
|
||||
#include <SDL_events.h>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "CVideoHandler.h"
|
||||
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "gui/SDL_Extensions.h"
|
||||
#include "renderSDL/SDL_Extensions.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include "CMusicHandler.h"
|
||||
#include "../lib/mapping/CCampaignHandler.h"
|
||||
#include "../CCallback.h"
|
||||
#include "adventureMap/CAdvMapInt.h"
|
||||
#include "adventureMap/mapHandler.h"
|
||||
#include "../lib/CConsoleHandler.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "../lib/CGameState.h"
|
||||
@ -35,7 +37,6 @@
|
||||
#include "../lib/mapping/CMap.h"
|
||||
#include "../lib/mapping/CMapService.h"
|
||||
#include "../lib/JsonNode.h"
|
||||
#include "mapHandler.h"
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "mainmenu/CMainMenu.h"
|
||||
#include "mainmenu/CCampaignScreen.h"
|
||||
@ -46,7 +47,6 @@
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "CServerHandler.h"
|
||||
#include "../lib/ScriptHandler.h"
|
||||
#include "windows/CAdvmapInterface.h"
|
||||
#include <vcmi/events/EventBus.h>
|
||||
|
||||
#ifdef VCMI_ANDROID
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include "ClientCommandManager.h"
|
||||
|
||||
#include "Client.h"
|
||||
#include "adventureMap/CInGameConsole.h"
|
||||
#include "adventureMap/CAdvMapInt.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "CServerHandler.h"
|
||||
#include "gui/CGuiHandler.h"
|
||||
@ -20,14 +22,14 @@
|
||||
#include "../lib/CGameState.h"
|
||||
#include "../lib/CPlayerState.h"
|
||||
#include "../lib/StringConstants.h"
|
||||
#include "gui/CAnimation.h"
|
||||
#include "windows/CAdvmapInterface.h"
|
||||
#include "windows/CCastleInterface.h"
|
||||
#include "render/CAnimation.h"
|
||||
#include "../CCallback.h"
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
#include "../lib/CHeroHandler.h"
|
||||
#include "../lib/CModHandler.h"
|
||||
#include "../lib/VCMIDirs.h"
|
||||
#include "CMT.h"
|
||||
|
||||
#ifdef SCRIPTING_ENABLED
|
||||
#include "../lib/ScriptHandler.h"
|
||||
|
@ -10,12 +10,21 @@
|
||||
#include "StdInc.h"
|
||||
#include "../lib/NetPacks.h"
|
||||
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
#include "../lib/filesystem/FileInfo.h"
|
||||
#include "../CCallback.h"
|
||||
#include "Client.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "windows/GUIClasses.h"
|
||||
#include "adventureMap/mapHandler.h"
|
||||
#include "adventureMap/CInGameConsole.h"
|
||||
#include "battle/BattleInterface.h"
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "widgets/MiscWidgets.h"
|
||||
#include "CMT.h"
|
||||
#include "CServerHandler.h"
|
||||
|
||||
#include "../CCallback.h"
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
#include "../lib/filesystem/FileInfo.h"
|
||||
#include "../lib/serializer/Connection.h"
|
||||
#include "../lib/serializer/BinarySerializer.h"
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
@ -26,22 +35,13 @@
|
||||
#include "../lib/spells/CSpellHandler.h"
|
||||
#include "../lib/CSoundBase.h"
|
||||
#include "../lib/StartInfo.h"
|
||||
#include "mapHandler.h"
|
||||
#include "windows/GUIClasses.h"
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "gui/SDL_Extensions.h"
|
||||
#include "battle/BattleInterface.h"
|
||||
#include "../lib/mapping/CCampaignHandler.h"
|
||||
#include "../lib/CGameState.h"
|
||||
#include "../lib/CStack.h"
|
||||
#include "../lib/battle/BattleInfo.h"
|
||||
#include "../lib/GameConstants.h"
|
||||
#include "../lib/CPlayerState.h"
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "widgets/MiscWidgets.h"
|
||||
#include "widgets/AdventureMapClasses.h"
|
||||
#include "CMT.h"
|
||||
#include "CServerHandler.h"
|
||||
|
||||
// TODO: as Tow suggested these template should all be part of CClient
|
||||
// This will require rework spectator interface properly though
|
||||
|
@ -8,58 +8,44 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "CAdvMapInt.h"
|
||||
|
||||
#include "CCastleInterface.h"
|
||||
#include "CHeroWindow.h"
|
||||
#include "CKingdomInterface.h"
|
||||
#include "CSpellWindow.h"
|
||||
#include "CTradeWindow.h"
|
||||
#include "GUIClasses.h"
|
||||
#include "InfoWindows.h"
|
||||
#include "CAdvMapPanel.h"
|
||||
#include "CAdventureOptions.h"
|
||||
#include "CInGameConsole.h"
|
||||
#include "mapHandler.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../windows/CKingdomInterface.h"
|
||||
#include "../windows/CSpellWindow.h"
|
||||
#include "../windows/CTradeWindow.h"
|
||||
#include "../windows/GUIClasses.h"
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
#include "../lobby/CSelectionBase.h"
|
||||
#include "../lobby/CCampaignInfoScreen.h"
|
||||
#include "../lobby/CSavingScreen.h"
|
||||
#include "../lobby/CScenarioInfoScreen.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../mapHandler.h"
|
||||
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CSoundBase.h"
|
||||
#include "../../lib/spells/CSpellHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapObjects/CGTownInstance.h"
|
||||
#include "../../lib/CPathfinder.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "../../lib/UnlockGuard.h"
|
||||
#include "../../lib/VCMI_Lib.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/mapping/CMapInfo.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
#define ADVOPT (conf.go()->ac)
|
||||
using namespace CSDL_Ext;
|
||||
|
||||
std::shared_ptr<CAdvMapInt> adventureInt;
|
||||
|
||||
@ -630,7 +616,7 @@ void CAdvMapInt::handleMapScrollingUpdate()
|
||||
int scrollSpeed = static_cast<int>(settings["adventure"]["scrollSpeed"].Float());
|
||||
//if advmap needs updating AND (no dialog is shown OR ctrl is pressed)
|
||||
if((animValHitCount % (4 / scrollSpeed)) == 0
|
||||
&& ((GH.topInt().get() == this) || isCtrlKeyDown()))
|
||||
&& ((GH.topInt().get() == this) || CSDL_Ext::isCtrlKeyDown()))
|
||||
{
|
||||
if((scrollingDir & LEFT) && (position.x > -CGI->mh->frameW))
|
||||
position.x--;
|
||||
@ -994,7 +980,7 @@ void CAdvMapInt::mouseMoved( const SDL_MouseMotionEvent & sEvent )
|
||||
// adventure map scrolling with mouse
|
||||
// currently disabled in world view mode (as it is in OH3), but should work correctly if mode check is removed
|
||||
// don't scroll if there is no window in focus - these events don't seem to correspond to the actual mouse movement
|
||||
if(!isCtrlKeyDown() && isActive() && sEvent.windowID != 0 && mode == EAdvMapMode::NORMAL)
|
||||
if(!CSDL_Ext::isCtrlKeyDown() && isActive() && sEvent.windowID != 0 && mode == EAdvMapMode::NORMAL)
|
||||
{
|
||||
if(sEvent.x<15)
|
||||
{
|
||||
|
@ -9,35 +9,39 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../widgets/AdventureMapClasses.h"
|
||||
#include "CWindowObject.h"
|
||||
#include "../gui/CIntObject.h"
|
||||
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../../lib/int3.h"
|
||||
#include "../../lib/GameConstants.h"
|
||||
|
||||
#include "../../lib/spells/ViewSpellInt.h"
|
||||
#include "CTerrainRect.h"
|
||||
#include "CResDataBar.h"
|
||||
#include "CList.h"
|
||||
#include "CInfoBar.h"
|
||||
#include "CMinimap.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
struct CGPath;
|
||||
struct CGPathNode;
|
||||
class CGObjectInstance;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
class CSpell;
|
||||
class CArmedInstance;
|
||||
class IShipyard;
|
||||
struct CGPathNode;
|
||||
struct ObjectPosInfo;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CCallback;
|
||||
class CAdvMapInt;
|
||||
class CHeroWindow;
|
||||
enum class EMapAnimRedrawStatus;
|
||||
class CFadeAnimation;
|
||||
class CButton;
|
||||
class IImage;
|
||||
class CAnimImage;
|
||||
class CGStatusBar;
|
||||
class CAdvMapPanel;
|
||||
class CAdvMapWorldViewPanel;
|
||||
class CAnimation;
|
||||
|
||||
struct MapDrawingInfo;
|
||||
|
||||
/*****************************/
|
||||
|
||||
enum class EAdvMapMode
|
||||
{
|
||||
NORMAL,
|
||||
|
@ -7,45 +7,15 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "AdventureMapClasses.h"
|
||||
|
||||
#include <SDL_timer.h>
|
||||
|
||||
#include "MiscWidgets.h"
|
||||
#include "CComponent.h"
|
||||
#include "Images.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
#include "CAdvMapPanel.h"
|
||||
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../widgets/Images.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_PixelAccess.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
|
||||
#include "../battle/BattleInterfaceClasses.h"
|
||||
#include "../battle/BattleInterface.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CModHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "ClientCommandManager.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_keyboard.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
CAdvMapPanel::CAdvMapPanel(std::shared_ptr<IImage> bg, Point position)
|
||||
: CIntObject()
|
||||
|
@ -9,32 +9,16 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ObjectLists.h"
|
||||
#include "../../lib/FunctionList.h"
|
||||
#include "../gui/CIntObject.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class CArmedInstance;
|
||||
class CGGarrison;
|
||||
class CGObjectInstance;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
struct Component;
|
||||
struct InfoAboutArmy;
|
||||
struct InfoAboutHero;
|
||||
struct InfoAboutTown;
|
||||
|
||||
class PlayerColor;
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CAnimation;
|
||||
class CAnimImage;
|
||||
class CShowableAnim;
|
||||
class CFilledTexture;
|
||||
class CButton;
|
||||
class CComponent;
|
||||
class CHeroTooltip;
|
||||
class CTownTooltip;
|
||||
class CTextBox;
|
||||
class IImage;
|
||||
|
||||
/// simple panel that contains other displayable elements; used to separate groups of controls
|
||||
|
@ -7,87 +7,21 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "CAdventureOptions.h"
|
||||
|
||||
#include "CCastleInterface.h"
|
||||
#include "CHeroWindow.h"
|
||||
#include "CKingdomInterface.h"
|
||||
#include "CSpellWindow.h"
|
||||
#include "CTradeWindow.h"
|
||||
#include "GUIClasses.h"
|
||||
#include "InfoWindows.h"
|
||||
#include "CAdvMapInt.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
#include "../lobby/CSelectionBase.h"
|
||||
#include "../lobby/CCampaignInfoScreen.h"
|
||||
#include "../lobby/CSavingScreen.h"
|
||||
#include "../lobby/CScenarioInfoScreen.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../mapHandler.h"
|
||||
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CSoundBase.h"
|
||||
#include "../../lib/spells/CSpellHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "../../lib/UnlockGuard.h"
|
||||
#include "../../lib/VCMI_Lib.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/mapping/CMapInfo.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
#define ADVOPT (conf.go()->ac)
|
||||
using namespace CSDL_Ext;
|
||||
|
||||
std::shared_ptr<CAdvMapInt> adventureInt;
|
||||
|
||||
static void setScrollingCursor(ui8 direction)
|
||||
{
|
||||
if(direction & CAdvMapInt::RIGHT)
|
||||
{
|
||||
if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTHEAST);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTHEAST);
|
||||
else
|
||||
CCS->curh->set(Cursor::Map::SCROLL_EAST);
|
||||
}
|
||||
else if(direction & CAdvMapInt::LEFT)
|
||||
{
|
||||
if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTHWEST);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTHWEST);
|
||||
else
|
||||
CCS->curh->set(Cursor::Map::SCROLL_WEST);
|
||||
}
|
||||
else if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTH);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTH);
|
||||
}
|
||||
|
||||
CAdventureOptions::CAdventureOptions()
|
||||
: CWindowObject(PLAYER_COLORED, "ADVOPTS")
|
||||
|
@ -9,33 +9,9 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../widgets/AdventureMapClasses.h"
|
||||
#include "CWindowObject.h"
|
||||
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
||||
#include "../../lib/spells/ViewSpellInt.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
struct CGPath;
|
||||
struct CGPathNode;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
class CSpell;
|
||||
class IShipyard;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CCallback;
|
||||
class CAdvMapInt;
|
||||
class CHeroWindow;
|
||||
enum class EMapAnimRedrawStatus;
|
||||
class CFadeAnimation;
|
||||
|
||||
struct MapDrawingInfo;
|
||||
#include "../windows/CWindowObject.h"
|
||||
|
||||
class CButton;
|
||||
|
||||
/// Adventure options dialog where you can view the world, dig, play the replay of the last turn,...
|
||||
class CAdventureOptions : public CWindowObject
|
||||
|
@ -7,44 +7,23 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "AdventureMapClasses.h"
|
||||
|
||||
#include <SDL_timer.h>
|
||||
|
||||
#include "MiscWidgets.h"
|
||||
#include "CComponent.h"
|
||||
#include "Images.h"
|
||||
#include "CInGameConsole.h"
|
||||
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_PixelAccess.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
|
||||
#include "../battle/BattleInterfaceClasses.h"
|
||||
#include "../battle/BattleInterface.h"
|
||||
#include "../ClientCommandManager.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CModHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "ClientCommandManager.h"
|
||||
#include "../../lib/mapObjects/CArmedInstance.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_keyboard.h>
|
||||
#include <SDL_timer.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
CInGameConsole::CInGameConsole()
|
||||
|
@ -9,33 +9,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ObjectLists.h"
|
||||
#include "../../lib/FunctionList.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class CArmedInstance;
|
||||
class CGGarrison;
|
||||
class CGObjectInstance;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
struct Component;
|
||||
struct InfoAboutArmy;
|
||||
struct InfoAboutHero;
|
||||
struct InfoAboutTown;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CAnimation;
|
||||
class CAnimImage;
|
||||
class CShowableAnim;
|
||||
class CFilledTexture;
|
||||
class CButton;
|
||||
class CComponent;
|
||||
class CHeroTooltip;
|
||||
class CTownTooltip;
|
||||
class CTextBox;
|
||||
class IImage;
|
||||
#include "../gui/CIntObject.h"
|
||||
|
||||
class CInGameConsole : public CIntObject
|
||||
{
|
||||
|
@ -7,45 +7,25 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "AdventureMapClasses.h"
|
||||
#include "CInfoBar.h"
|
||||
|
||||
#include <SDL_timer.h>
|
||||
|
||||
#include "MiscWidgets.h"
|
||||
#include "CComponent.h"
|
||||
#include "Images.h"
|
||||
#include "CAdvMapInt.h"
|
||||
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/Images.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_PixelAccess.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
|
||||
#include "../battle/BattleInterfaceClasses.h"
|
||||
#include "../battle/BattleInterface.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CModHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "ClientCommandManager.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_keyboard.h>
|
||||
#include <SDL_events.h>
|
||||
#include "../../lib/mapObjects/CGTownInstance.h"
|
||||
|
||||
CInfoBar::CVisibleInfo::CVisibleInfo()
|
||||
: CIntObject(0, Point(8, 12))
|
||||
|
@ -9,33 +9,24 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ObjectLists.h"
|
||||
#include "../../lib/FunctionList.h"
|
||||
#include "../gui/CIntObject.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class CArmedInstance;
|
||||
class CGGarrison;
|
||||
class CGObjectInstance;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
struct Component;
|
||||
struct InfoAboutArmy;
|
||||
struct InfoAboutHero;
|
||||
struct InfoAboutTown;
|
||||
class PlayerColor;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CAnimation;
|
||||
class CAnimImage;
|
||||
class CShowableAnim;
|
||||
class CFilledTexture;
|
||||
class CButton;
|
||||
class CComponent;
|
||||
class CHeroTooltip;
|
||||
class CTownTooltip;
|
||||
class CLabel;
|
||||
class CTextBox;
|
||||
class IImage;
|
||||
|
||||
/// Info box which shows next week/day information, hold the current date
|
||||
class CInfoBar : public CIntObject
|
||||
|
@ -7,45 +7,24 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "AdventureMapClasses.h"
|
||||
#include "CList.h"
|
||||
|
||||
#include <SDL_timer.h>
|
||||
|
||||
#include "MiscWidgets.h"
|
||||
#include "CComponent.h"
|
||||
#include "Images.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_PixelAccess.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "CAdvMapInt.h"
|
||||
|
||||
#include "../widgets/Images.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
|
||||
#include "../battle/BattleInterfaceClasses.h"
|
||||
#include "../battle/BattleInterface.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CModHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "ClientCommandManager.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_keyboard.h>
|
||||
#include <SDL_events.h>
|
||||
#include "../../lib/mapObjects/CGTownInstance.h"
|
||||
|
||||
CList::CListItem::CListItem(CList * Parent)
|
||||
: CIntObject(LCLICK | RCLICK | HOVER),
|
||||
|
@ -9,33 +9,19 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ObjectLists.h"
|
||||
#include "../gui/CIntObject.h"
|
||||
|
||||
#include "../widgets/ObjectLists.h"
|
||||
#include "../../lib/FunctionList.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class CArmedInstance;
|
||||
class CGGarrison;
|
||||
class CGObjectInstance;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
struct Component;
|
||||
struct InfoAboutArmy;
|
||||
struct InfoAboutHero;
|
||||
struct InfoAboutTown;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CAnimation;
|
||||
class CAnimImage;
|
||||
class CShowableAnim;
|
||||
class CFilledTexture;
|
||||
class CButton;
|
||||
class CComponent;
|
||||
class CHeroTooltip;
|
||||
class CTownTooltip;
|
||||
class CTextBox;
|
||||
class IImage;
|
||||
|
||||
/// Base UI Element for hero\town lists
|
||||
class CList : public CIntObject
|
||||
|
@ -7,45 +7,25 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "AdventureMapClasses.h"
|
||||
#include "CMinimap.h"
|
||||
|
||||
#include <SDL_timer.h>
|
||||
|
||||
#include "MiscWidgets.h"
|
||||
#include "CComponent.h"
|
||||
#include "Images.h"
|
||||
#include "CAdvMapInt.h"
|
||||
|
||||
#include "../widgets/Images.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_PixelAccess.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
|
||||
#include "../battle/BattleInterfaceClasses.h"
|
||||
#include "../battle/BattleInterface.h"
|
||||
#include "../renderSDL/SDL_PixelAccess.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CModHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "ClientCommandManager.h"
|
||||
#include "../../lib/mapping/CMapDefines.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_keyboard.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
const SDL_Color & CMinimapInstance::getTileColor(const int3 & pos)
|
||||
{
|
||||
|
@ -9,34 +9,11 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ObjectLists.h"
|
||||
#include "../../lib/FunctionList.h"
|
||||
#include "../gui/CIntObject.h"
|
||||
#include "../../lib/GameConstants.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class CArmedInstance;
|
||||
class CGGarrison;
|
||||
class CGObjectInstance;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
struct Component;
|
||||
struct InfoAboutArmy;
|
||||
struct InfoAboutHero;
|
||||
struct InfoAboutTown;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CAnimation;
|
||||
class CAnimImage;
|
||||
class CShowableAnim;
|
||||
class CFilledTexture;
|
||||
class CButton;
|
||||
class CComponent;
|
||||
class CHeroTooltip;
|
||||
class CTownTooltip;
|
||||
class CTextBox;
|
||||
class IImage;
|
||||
|
||||
struct SDL_Color;
|
||||
class CMinimap;
|
||||
|
||||
class CMinimapInstance : public CIntObject
|
||||
|
@ -8,86 +8,19 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "CResDataBar.h"
|
||||
|
||||
#include "CCastleInterface.h"
|
||||
#include "CHeroWindow.h"
|
||||
#include "CKingdomInterface.h"
|
||||
#include "CSpellWindow.h"
|
||||
#include "CTradeWindow.h"
|
||||
#include "GUIClasses.h"
|
||||
#include "InfoWindows.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
#include "../lobby/CSelectionBase.h"
|
||||
#include "../lobby/CCampaignInfoScreen.h"
|
||||
#include "../lobby/CSavingScreen.h"
|
||||
#include "../lobby/CScenarioInfoScreen.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../mapHandler.h"
|
||||
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
#include "../widgets/Images.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CSoundBase.h"
|
||||
#include "../../lib/spells/CSpellHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "../../lib/UnlockGuard.h"
|
||||
#include "../../lib/VCMI_Lib.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/mapping/CMapInfo.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
#define ADVOPT (conf.go()->ac)
|
||||
using namespace CSDL_Ext;
|
||||
|
||||
std::shared_ptr<CAdvMapInt> adventureInt;
|
||||
|
||||
static void setScrollingCursor(ui8 direction)
|
||||
{
|
||||
if(direction & CAdvMapInt::RIGHT)
|
||||
{
|
||||
if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTHEAST);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTHEAST);
|
||||
else
|
||||
CCS->curh->set(Cursor::Map::SCROLL_EAST);
|
||||
}
|
||||
else if(direction & CAdvMapInt::LEFT)
|
||||
{
|
||||
if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTHWEST);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTHWEST);
|
||||
else
|
||||
CCS->curh->set(Cursor::Map::SCROLL_WEST);
|
||||
}
|
||||
else if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTH);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTH);
|
||||
}
|
||||
|
||||
void CResDataBar::clickRight(tribool down, bool previousState)
|
||||
{
|
||||
@ -156,7 +89,7 @@ void CResDataBar::draw(SDL_Surface * to)
|
||||
temp.push_back(boost::lexical_cast<std::string>(LOCPLINT->cb->getDate(Date::WEEK)));
|
||||
temp.push_back(boost::lexical_cast<std::string>(LOCPLINT->cb->getDate(Date::DAY_OF_WEEK)));
|
||||
|
||||
graphics->fonts[FONT_SMALL]->renderTextLeft(to, processStr(datetext,temp), Colors::WHITE, Point(txtpos[7].first,txtpos[7].second));
|
||||
graphics->fonts[FONT_SMALL]->renderTextLeft(to, CSDL_Ext::processStr(datetext,temp), Colors::WHITE, Point(txtpos[7].first,txtpos[7].second));
|
||||
}
|
||||
|
||||
void CResDataBar::show(SDL_Surface * to)
|
||||
|
@ -9,32 +9,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../widgets/AdventureMapClasses.h"
|
||||
#include "CWindowObject.h"
|
||||
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
||||
#include "../../lib/spells/ViewSpellInt.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
struct CGPath;
|
||||
struct CGPathNode;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
class CSpell;
|
||||
class IShipyard;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CCallback;
|
||||
class CAdvMapInt;
|
||||
class CHeroWindow;
|
||||
enum class EMapAnimRedrawStatus;
|
||||
class CFadeAnimation;
|
||||
|
||||
struct MapDrawingInfo;
|
||||
#include "../gui/CIntObject.h"
|
||||
|
||||
/// Resources bar which shows information about how many gold, crystals,... you have
|
||||
/// Current date is displayed too
|
||||
|
@ -8,86 +8,29 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "CTerrainRect.h"
|
||||
|
||||
#include "CCastleInterface.h"
|
||||
#include "CHeroWindow.h"
|
||||
#include "CKingdomInterface.h"
|
||||
#include "CSpellWindow.h"
|
||||
#include "CTradeWindow.h"
|
||||
#include "GUIClasses.h"
|
||||
#include "InfoWindows.h"
|
||||
#include "mapHandler.h"
|
||||
#include "CAdvMapInt.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
#include "../lobby/CSelectionBase.h"
|
||||
#include "../lobby/CCampaignInfoScreen.h"
|
||||
#include "../lobby/CSavingScreen.h"
|
||||
#include "../lobby/CScenarioInfoScreen.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../mapHandler.h"
|
||||
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/CFadeAnimation.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CSoundBase.h"
|
||||
#include "../../lib/spells/CSpellHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "../../lib/UnlockGuard.h"
|
||||
#include "../../lib/VCMI_Lib.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/mapping/CMapInfo.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
#include "../../lib/CPathfinder.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
#define ADVOPT (conf.go()->ac)
|
||||
using namespace CSDL_Ext;
|
||||
|
||||
std::shared_ptr<CAdvMapInt> adventureInt;
|
||||
|
||||
static void setScrollingCursor(ui8 direction)
|
||||
{
|
||||
if(direction & CAdvMapInt::RIGHT)
|
||||
{
|
||||
if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTHEAST);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTHEAST);
|
||||
else
|
||||
CCS->curh->set(Cursor::Map::SCROLL_EAST);
|
||||
}
|
||||
else if(direction & CAdvMapInt::LEFT)
|
||||
{
|
||||
if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTHWEST);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTHWEST);
|
||||
else
|
||||
CCS->curh->set(Cursor::Map::SCROLL_WEST);
|
||||
}
|
||||
else if(direction & CAdvMapInt::UP)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_NORTH);
|
||||
else if(direction & CAdvMapInt::DOWN)
|
||||
CCS->curh->set(Cursor::Map::SCROLL_SOUTH);
|
||||
}
|
||||
|
||||
CTerrainRect::CTerrainRect()
|
||||
: fadeSurface(nullptr),
|
||||
@ -334,17 +277,17 @@ void CTerrainRect::showPath(const Rect & extRect, SDL_Surface * to)
|
||||
}
|
||||
else if(hvx<0)
|
||||
{
|
||||
Rect srcRect = genRect(arrow->height() - hvy, arrow->width(), 0, 0);
|
||||
Rect srcRect = CSDL_Ext::genRect(arrow->height() - hvy, arrow->width(), 0, 0);
|
||||
arrow->draw(to, x + moveX, y + moveY, &srcRect);
|
||||
}
|
||||
else if (hvy<0)
|
||||
{
|
||||
Rect srcRect = genRect(arrow->height(), arrow->width() - hvx, 0, 0);
|
||||
Rect srcRect = CSDL_Ext::genRect(arrow->height(), arrow->width() - hvx, 0, 0);
|
||||
arrow->draw(to, x + moveX, y + moveY, &srcRect);
|
||||
}
|
||||
else
|
||||
{
|
||||
Rect srcRect = genRect(arrow->height() - hvy, arrow->width() - hvx, 0, 0);
|
||||
Rect srcRect = CSDL_Ext::genRect(arrow->height() - hvy, arrow->width() - hvx, 0, 0);
|
||||
arrow->draw(to, x + moveX, y + moveY, &srcRect);
|
||||
}
|
||||
}
|
||||
@ -356,17 +299,17 @@ void CTerrainRect::showPath(const Rect & extRect, SDL_Surface * to)
|
||||
}
|
||||
else if(hvx<0)
|
||||
{
|
||||
Rect srcRect = genRect(arrow->height() - hvy, arrow->width(), 0, 0);
|
||||
Rect srcRect = CSDL_Ext::genRect(arrow->height() - hvy, arrow->width(), 0, 0);
|
||||
arrow->draw(to, x, y, &srcRect);
|
||||
}
|
||||
else if (hvy<0)
|
||||
{
|
||||
Rect srcRect = genRect(arrow->height(), arrow->width() - hvx, 0, 0);
|
||||
Rect srcRect = CSDL_Ext::genRect(arrow->height(), arrow->width() - hvx, 0, 0);
|
||||
arrow->draw(to, x, y, &srcRect);
|
||||
}
|
||||
else
|
||||
{
|
||||
Rect srcRect = genRect(arrow->height() - hvy, arrow->width() - hvx, 0, 0);
|
||||
Rect srcRect = CSDL_Ext::genRect(arrow->height() - hvy, arrow->width() - hvx, 0, 0);
|
||||
arrow->draw(to, x, y, &srcRect);
|
||||
}
|
||||
}
|
||||
|
@ -9,33 +9,16 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../widgets/AdventureMapClasses.h"
|
||||
#include "CWindowObject.h"
|
||||
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
||||
#include "../../lib/spells/ViewSpellInt.h"
|
||||
#include "../gui/CIntObject.h"
|
||||
#include "../../lib/int3.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
struct CGPath;
|
||||
struct CGPathNode;
|
||||
class CGHeroInstance;
|
||||
class CGTownInstance;
|
||||
class CSpell;
|
||||
class IShipyard;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
class CCallback;
|
||||
class CAdvMapInt;
|
||||
class CHeroWindow;
|
||||
enum class EMapAnimRedrawStatus;
|
||||
class CFadeAnimation;
|
||||
|
||||
struct MapDrawingInfo;
|
||||
|
||||
/// Holds information about which tiles of the terrain are shown/not shown at the screen
|
||||
class CTerrainRect : public CIntObject
|
||||
{
|
||||
|
@ -11,30 +11,24 @@
|
||||
#include "StdInc.h"
|
||||
#include "mapHandler.h"
|
||||
|
||||
#include "CBitmapHandler.h"
|
||||
#include "gui/CAnimation.h"
|
||||
#include "gui/SDL_Extensions.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../lib/mapObjects/CObjectClassesHandler.h"
|
||||
#include "../lib/CGameState.h"
|
||||
#include "../lib/CHeroHandler.h"
|
||||
#include "../lib/CTownHandler.h"
|
||||
#include "../lib/CModHandler.h"
|
||||
#include "Graphics.h"
|
||||
#include "../lib/mapping/CMap.h"
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
#include "../lib/GameConstants.h"
|
||||
#include "../lib/CStopWatch.h"
|
||||
#include "CMT.h"
|
||||
#include "CMusicHandler.h"
|
||||
#include "../lib/CRandomGenerator.h"
|
||||
#include "../lib/RoadHandler.h"
|
||||
#include "../lib/RiverHandler.h"
|
||||
#include "../lib/TerrainHandler.h"
|
||||
#include "../lib/filesystem/ResourceID.h"
|
||||
#include "../lib/JsonDetail.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/CFadeAnimation.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../render/Graphics.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/mapObjects/CObjectClassesHandler.h"
|
||||
#include "../../lib/mapping/CMap.h"
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CStopWatch.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/RoadHandler.h"
|
||||
#include "../../lib/RiverHandler.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
|
||||
#define ADVOPT (conf.go()->ac)
|
||||
|
||||
|
@ -10,9 +10,9 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "../lib/int3.h"
|
||||
#include "../lib/spells/ViewSpellInt.h"
|
||||
#include "../lib/Rect.h"
|
||||
#include "../../lib/int3.h"
|
||||
#include "../../lib/spells/ViewSpellInt.h"
|
||||
#include "../../lib/Rect.h"
|
||||
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../render/CAnimation.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/battle/BattleAction.h"
|
||||
|
@ -22,11 +22,11 @@
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../widgets/AdventureMapClasses.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../adventureMap/CInGameConsole.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/BattleFieldHandler.h"
|
||||
|
@ -24,13 +24,12 @@
|
||||
#include "BattleRenderer.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../adventureMap/CAdvMapInt.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/CStack.h"
|
||||
|
@ -19,21 +19,21 @@
|
||||
#include "BattleWindow.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CVideoHandler.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/AdventureMapClasses.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../widgets/Images.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../windows/CMessage.h"
|
||||
#include "../windows/CCreatureWindow.h"
|
||||
#include "../windows/CSpellWindow.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../adventureMap/CInGameConsole.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/CStack.h"
|
||||
|
@ -20,9 +20,8 @@
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../render/Canvas.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/battle/CObstacleInstance.h"
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include "BattleStacksController.h"
|
||||
#include "CreatureAnimation.h"
|
||||
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../render/IImage.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/NetPacks.h"
|
||||
|
@ -25,13 +25,12 @@
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../../lib/spells/ISpellMechanics.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../render/Canvas.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/spells/ISpellMechanics.h"
|
||||
#include "../../lib/battle/BattleHex.h"
|
||||
#include "../../lib/CGameState.h"
|
||||
#include "../../lib/CStack.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../gui/ColorFilter.h"
|
||||
#include "../render/ColorFilter.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
|
@ -17,17 +17,17 @@
|
||||
#include "BattleActionsController.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../windows/CSpellWindow.h"
|
||||
#include "../widgets/AdventureMapClasses.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../widgets/Images.h"
|
||||
#include "../windows/CMessage.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../adventureMap/CInGameConsole.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
|
@ -13,9 +13,9 @@
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CCreatureHandler.h"
|
||||
|
||||
#include "../gui/Canvas.h"
|
||||
#include "../gui/ColorFilter.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../render/ColorFilter.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
|
||||
static const SDL_Color creatureBlueBorder = { 0, 255, 255, 255 };
|
||||
static const SDL_Color creatureGoldBorder = { 255, 255, 0, 255 };
|
||||
|
@ -11,7 +11,8 @@
|
||||
|
||||
#include "../../lib/FunctionList.h"
|
||||
#include "../widgets/Images.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/IImage.h"
|
||||
|
||||
#include <SDL_pixels.h>
|
||||
|
||||
|
@ -13,15 +13,16 @@
|
||||
|
||||
#include "CIntObject.h"
|
||||
#include "CursorHandler.h"
|
||||
#include "SDL_Extensions.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../../lib/CThreadHelper.h"
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../CMT.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../battle/BattleInterface.h"
|
||||
|
||||
#include "../../lib/CThreadHelper.h"
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
|
||||
#include <SDL_render.h>
|
||||
#include <SDL_timer.h>
|
||||
#include <SDL_events.h>
|
||||
|
@ -11,8 +11,8 @@
|
||||
#include "CIntObject.h"
|
||||
|
||||
#include "CGuiHandler.h"
|
||||
#include "SDL_Extensions.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../windows/CMessage.h"
|
||||
|
||||
#include <SDL_pixels.h>
|
||||
#include <SDL_surface.h>
|
||||
|
@ -10,7 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../lib/Rect.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../render/Graphics.h"
|
||||
|
||||
struct SDL_Surface;
|
||||
class CGuiHandler;
|
||||
|
@ -11,9 +11,14 @@
|
||||
#include "StdInc.h"
|
||||
#include "CursorHandler.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "CGuiHandler.h"
|
||||
#include "CAnimation.h"
|
||||
#include "../renderSDL/CursorSoftware.h"
|
||||
#include "../renderSDL/CursorHardware.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../CMT.h"
|
||||
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
|
||||
#include <SDL_render.h>
|
||||
|
@ -9,14 +9,12 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
class CAnimation;
|
||||
class IImage;
|
||||
struct SDL_Surface;
|
||||
struct SDL_Texture;
|
||||
struct SDL_Cursor;
|
||||
|
||||
#include "../../lib/Point.h"
|
||||
|
||||
class ICursor;
|
||||
class IImage;
|
||||
class CAnimation;
|
||||
|
||||
namespace Cursor
|
||||
{
|
||||
enum class Type {
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
@ -17,13 +17,10 @@
|
||||
#include "CSelectionBase.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CVideoHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CServerHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
#include "../mainmenu/CPrologEpilogVideo.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
@ -33,6 +30,9 @@
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../windows/GUIClasses.h"
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
|
@ -15,10 +15,8 @@
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/StartInfo.h"
|
||||
#include "../../lib/mapping/CMapInfo.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
|
||||
CCampaignInfoScreen::CCampaignInfoScreen()
|
||||
|
@ -20,12 +20,10 @@
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CVideoHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CServerHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../mainmenu/CMainMenu.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
@ -35,6 +33,7 @@
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../windows/GUIClasses.h"
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../render/CAnimation.h"
|
||||
|
||||
#include "../../lib/NetPacksLobby.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CServerHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CServerHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
@ -14,10 +14,8 @@
|
||||
#include "CLobbyScreen.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CServerHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
@ -26,6 +24,7 @@
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../windows/GUIClasses.h"
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../render/CAnimation.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
|
@ -14,12 +14,10 @@
|
||||
#include "CMainMenu.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CVideoHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CServerHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/filesystem/CCompressedStream.h"
|
||||
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
@ -28,7 +27,6 @@
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CVideoHandler.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../../lib/serializer/Connection.h"
|
||||
#include "../../lib/serializer/CTypeList.h"
|
||||
#include "../../lib/VCMIDirs.h"
|
||||
@ -36,10 +34,8 @@
|
||||
#include "../windows/GUIClasses.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../../CCallback.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../Client.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
|
@ -10,19 +10,12 @@
|
||||
#include "StdInc.h"
|
||||
#include "CAnimation.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "ColorFilter.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../Graphics.h"
|
||||
#include "CDefFile.h"
|
||||
|
||||
#include "Graphics.h"
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/filesystem/ISimpleResourceLoader.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include "../renderSDL/SDLImage.h"
|
||||
|
||||
std::shared_ptr<IImage> CAnimation::getFromExtraDef(std::string filename)
|
||||
{
|
||||
|
@ -11,26 +11,12 @@
|
||||
|
||||
#include "../../lib/GameConstants.h"
|
||||
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Rect;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
class CDefFile;
|
||||
class ColorFilter;
|
||||
class IImage;
|
||||
|
||||
/// Class for handling animation
|
||||
class CAnimation
|
||||
|
@ -8,13 +8,15 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "CBitmapHandler.h"
|
||||
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
#include <SDL_image.h>
|
||||
#include "CBitmapHandler.h"
|
||||
#include "gui/SDL_Extensions.h"
|
||||
#include "../lib/vcmi_endian.h"
|
||||
|
||||
#include <SDL_image.h>
|
||||
|
||||
namespace BitmapHandler
|
||||
{
|
||||
SDL_Surface * loadH3PCX(ui8 * data, size_t size);
|
||||
|
@ -7,22 +7,16 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "CAnimation.h"
|
||||
#include "CDefFile.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "ColorFilter.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../Graphics.h"
|
||||
#include "IImageLoader.h"
|
||||
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/filesystem/ISimpleResourceLoader.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
#include "../../lib/Point.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
#include <SDL_pixels.h>
|
||||
|
||||
// Extremely simple file cache. TODO: smarter, more general solution
|
||||
class CFileCache
|
||||
@ -203,8 +197,7 @@ CDefFile::CDefFile(std::string Name):
|
||||
}
|
||||
}
|
||||
|
||||
template<class ImageLoader>
|
||||
void CDefFile::loadFrame(size_t frame, size_t group, ImageLoader &loader) const
|
||||
void CDefFile::loadFrame(size_t frame, size_t group, IImageLoader &loader) const
|
||||
{
|
||||
std::map<size_t, std::vector <size_t> >::const_iterator it;
|
||||
it = offset.find(group);
|
||||
@ -250,9 +243,9 @@ void CDefFile::loadFrame(size_t frame, size_t group, ImageLoader &loader) const
|
||||
//pixel data is not compressed, copy data to surface
|
||||
for(ui32 i=0; i<sprite.height; i++)
|
||||
{
|
||||
loader.Load(sprite.width, FDef + currentOffset);
|
||||
loader.load(sprite.width, FDef + currentOffset);
|
||||
currentOffset += sprite.width;
|
||||
loader.EndLine();
|
||||
loader.endLine();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -275,17 +268,17 @@ void CDefFile::loadFrame(size_t frame, size_t group, ImageLoader &loader) const
|
||||
|
||||
if(segmentType==0xFF)//Raw data
|
||||
{
|
||||
loader.Load(length, FDef + currentOffset);
|
||||
loader.load(length, FDef + currentOffset);
|
||||
currentOffset+=length;
|
||||
}
|
||||
else// RLE
|
||||
{
|
||||
loader.Load(length, segmentType);
|
||||
loader.load(length, segmentType);
|
||||
}
|
||||
TotalRowLength += length;
|
||||
}
|
||||
|
||||
loader.EndLine();
|
||||
loader.endLine();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -305,16 +298,16 @@ void CDefFile::loadFrame(size_t frame, size_t group, ImageLoader &loader) const
|
||||
|
||||
if(code==7)//Raw data
|
||||
{
|
||||
loader.Load(length, FDef + currentOffset);
|
||||
loader.load(length, FDef + currentOffset);
|
||||
currentOffset += length;
|
||||
}
|
||||
else//RLE
|
||||
{
|
||||
loader.Load(length, code);
|
||||
loader.load(length, code);
|
||||
}
|
||||
TotalRowLength+=length;
|
||||
}
|
||||
loader.EndLine();
|
||||
loader.endLine();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -333,16 +326,16 @@ void CDefFile::loadFrame(size_t frame, size_t group, ImageLoader &loader) const
|
||||
|
||||
if(code==7)//Raw data
|
||||
{
|
||||
loader.Load(length, FDef + currentOffset);
|
||||
loader.load(length, FDef + currentOffset);
|
||||
currentOffset += length;
|
||||
}
|
||||
else//RLE
|
||||
{
|
||||
loader.Load(length, code);
|
||||
loader.load(length, code);
|
||||
}
|
||||
TotalRowLength += length;
|
||||
}
|
||||
loader.EndLine();
|
||||
loader.endLine();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -9,29 +9,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../lib/GameConstants.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Rect;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
class IImageLoader;
|
||||
struct SDL_Color;
|
||||
class CDefFile;
|
||||
class ColorFilter;
|
||||
|
||||
|
||||
/// Class for def loading
|
||||
/// After loading will store general info (palette and frame offsets) and pointer to file itself
|
||||
@ -62,8 +43,7 @@ public:
|
||||
~CDefFile();
|
||||
|
||||
//load frame as SDL_Surface
|
||||
template<class ImageLoader>
|
||||
void loadFrame(size_t frame, size_t group, ImageLoader &loader) const;
|
||||
void loadFrame(size_t frame, size_t group, IImageLoader &loader) const;
|
||||
|
||||
const std::map<size_t, size_t> getEntries() const;
|
||||
};
|
||||
|
@ -8,19 +8,9 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "CAnimation.h"
|
||||
#include "CFadeAnimation.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "ColorFilter.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../Graphics.h"
|
||||
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/filesystem/ISimpleResourceLoader.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../lib/GameConstants.h"
|
||||
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
@ -20,17 +18,10 @@
|
||||
#endif
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Rect;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
class CDefFile;
|
||||
class ColorFilter;
|
||||
|
||||
const float DEFAULT_DELTA = 0.05f;
|
||||
|
||||
|
@ -10,10 +10,9 @@
|
||||
#include "StdInc.h"
|
||||
#include "Canvas.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "CAnimation.h"
|
||||
|
||||
#include "../Graphics.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "IImage.h"
|
||||
#include "Graphics.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "TextAlignment.h"
|
||||
#include "../gui/TextAlignment.h"
|
||||
#include "../../lib/Rect.h"
|
||||
#include "../../lib/Color.h"
|
||||
|
||||
|
@ -18,11 +18,15 @@
|
||||
#include <vcmi/SkillService.h>
|
||||
#include <vcmi/spells/Service.h>
|
||||
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../renderSDL/CBitmapFont.h"
|
||||
#include "../renderSDL/CBitmapHanFont.h"
|
||||
#include "../renderSDL/CTrueTypeFont.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/IImage.h"
|
||||
|
||||
#include "../lib/filesystem/Filesystem.h"
|
||||
#include "../lib/filesystem/CBinaryReader.h"
|
||||
#include "gui/SDL_Extensions.h"
|
||||
#include "gui/CAnimation.h"
|
||||
#include "../lib/CThreadHelper.h"
|
||||
#include "../lib/CModHandler.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "../lib/VCMI_Lib.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "gui/Fonts.h"
|
||||
#include "IFont.h"
|
||||
#include "../lib/GameConstants.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
@ -22,6 +22,7 @@ struct InfoAboutTown;
|
||||
class CGObjectInstance;
|
||||
class ObjectTemplate;
|
||||
class EntityService;
|
||||
class JsonNode;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
|
@ -9,13 +9,11 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
class CAnimation;
|
||||
class IImage;
|
||||
struct SDL_Surface;
|
||||
struct SDL_Texture;
|
||||
struct SDL_Cursor;
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
class Point;
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
#include "../../lib/Point.h"
|
||||
class IImage;
|
||||
|
||||
class ICursor
|
||||
{
|
||||
|
@ -7,16 +7,13 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "Fonts.h"
|
||||
#include "IFont.h"
|
||||
|
||||
#include <SDL_ttf.h>
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/Point.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
//
|
||||
|
||||
size_t IFont::getStringWidth(const std::string & data) const
|
||||
{
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
@ -19,11 +18,6 @@ VCMI_LIB_NAMESPACE_END
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
|
||||
typedef struct _TTF_Font TTF_Font;
|
||||
|
||||
class CBitmapFont;
|
||||
class CBitmapHanFont;
|
||||
|
||||
class IFont
|
||||
{
|
||||
protected:
|
||||
|
@ -9,19 +9,9 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../lib/GameConstants.h"
|
||||
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class PlayerColor;
|
||||
class Rect;
|
||||
class Point;
|
||||
|
||||
@ -29,7 +19,6 @@ VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
class CDefFile;
|
||||
class ColorFilter;
|
||||
|
||||
/*
|
||||
|
31
client/render/IImageLoader.h
Normal file
31
client/render/IImageLoader.h
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* IImageLoader.h, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
class SDLImage;
|
||||
class Point;
|
||||
|
||||
struct SDL_Color;
|
||||
|
||||
class IImageLoader
|
||||
{
|
||||
public:
|
||||
//load size raw pixels from data
|
||||
virtual void load(size_t size, const ui8 * data) = 0;
|
||||
//set size pixels to color
|
||||
virtual void load(size_t size, ui8 color=0) = 0;
|
||||
|
||||
virtual void endLine() = 0;
|
||||
//init image with these sizes and palette
|
||||
virtual void init(Point SpriteSize, Point Margins, Point FullSize, SDL_Color *pal) = 0;
|
||||
|
||||
virtual ~IImageLoader() = default;
|
||||
};
|
@ -8,15 +8,16 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "Fonts.h"
|
||||
|
||||
#include <SDL_ttf.h>
|
||||
#include "CBitmapFont.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/Rect.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
|
||||
std::array<CBitmapFont::BitmapChar, CBitmapFont::totalChars> CBitmapFont::loadChars() const
|
||||
{
|
||||
|
@ -9,20 +9,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
|
||||
typedef struct _TTF_Font TTF_Font;
|
||||
|
||||
class CBitmapFont;
|
||||
class CBitmapHanFont;
|
||||
#include "../render/IFont.h"
|
||||
|
||||
class CBitmapFont : public IFont
|
||||
{
|
||||
|
@ -8,15 +8,17 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "Fonts.h"
|
||||
|
||||
#include <SDL_ttf.h>
|
||||
#include "CBitmapHanFont.h"
|
||||
|
||||
#include "CBitmapFont.h"
|
||||
#include "SDL_Extensions.h"
|
||||
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/Rect.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
|
||||
size_t CBitmapHanFont::getCharacterDataOffset(size_t index) const
|
||||
{
|
||||
|
@ -9,20 +9,13 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../render/IFont.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
|
||||
typedef struct _TTF_Font TTF_Font;
|
||||
|
||||
class CBitmapFont;
|
||||
class CBitmapHanFont;
|
||||
|
||||
/// supports multi-byte characters for such languages like Chinese
|
||||
class CBitmapHanFont : public IFont
|
||||
@ -45,23 +38,3 @@ public:
|
||||
size_t getLineHeight() const override;
|
||||
size_t getGlyphWidth(const char * data) const override;
|
||||
};
|
||||
|
||||
class CTrueTypeFont : public IFont
|
||||
{
|
||||
const std::pair<std::unique_ptr<ui8[]>, ui64> data;
|
||||
|
||||
const std::unique_ptr<TTF_Font, void (*)(TTF_Font*)> font;
|
||||
const bool blended;
|
||||
|
||||
std::pair<std::unique_ptr<ui8[]>, ui64> loadData(const JsonNode & config);
|
||||
TTF_Font * loadFont(const JsonNode & config);
|
||||
int getFontStyle(const JsonNode & config);
|
||||
|
||||
void renderText(SDL_Surface * surface, const std::string & data, const SDL_Color & color, const Point & pos) const override;
|
||||
public:
|
||||
CTrueTypeFont(const JsonNode & fontConfig);
|
||||
|
||||
size_t getLineHeight() const override;
|
||||
size_t getGlyphWidth(const char * data) const override;
|
||||
size_t getStringWidth(const std::string & data) const override;
|
||||
};
|
||||
|
@ -8,15 +8,21 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "Fonts.h"
|
||||
#include "CTrueTypeFont.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
|
||||
#include <SDL_ttf.h>
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
std::pair<std::unique_ptr<ui8[]>, ui64> CTrueTypeFont::loadData(const JsonNode & config)
|
||||
{
|
||||
std::string filename = "Data/" + config["file"].String();
|
||||
return CResourceHandler::get()->load(ResourceID(filename, EResType::TTF_FONT))->readAll();
|
||||
}
|
||||
|
||||
TTF_Font * CTrueTypeFont::loadFont(const JsonNode &config)
|
||||
{
|
||||
|
@ -9,21 +9,14 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../render/IFont.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
|
||||
typedef struct _TTF_Font TTF_Font;
|
||||
|
||||
class CBitmapFont;
|
||||
class CBitmapHanFont;
|
||||
|
||||
class CTrueTypeFont : public IFont
|
||||
{
|
||||
const std::pair<std::unique_ptr<ui8[]>, ui64> data;
|
||||
|
@ -9,12 +9,10 @@
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "CursorHandler.h"
|
||||
#include "CursorHardware.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "CGuiHandler.h"
|
||||
#include "CAnimation.h"
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../render/IImage.h"
|
||||
|
||||
#include <SDL_render.h>
|
||||
#include <SDL_events.h>
|
||||
|
@ -16,6 +16,7 @@ struct SDL_Texture;
|
||||
struct SDL_Cursor;
|
||||
|
||||
#include "../../lib/Point.h"
|
||||
#include "../render/ICursor.h"
|
||||
|
||||
class CursorHardware : public ICursor
|
||||
{
|
||||
|
@ -9,20 +9,15 @@
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "CursorHandler.h"
|
||||
#include "CursorSoftware.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "CGuiHandler.h"
|
||||
#include "CAnimation.h"
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
|
||||
#include "../render/IImage.h"
|
||||
|
||||
#include <SDL_render.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
#ifdef VCMI_APPLE
|
||||
#include <dispatch/dispatch.h>
|
||||
#endif
|
||||
|
||||
void CursorSoftware::render()
|
||||
{
|
||||
//texture must be updated in the main (renderer) thread, but changes to cursor type may come from other threads
|
||||
|
@ -16,6 +16,7 @@ struct SDL_Texture;
|
||||
struct SDL_Cursor;
|
||||
|
||||
#include "../../lib/Point.h"
|
||||
#include "../render/ICursor.h"
|
||||
|
||||
class CursorSoftware : public ICursor
|
||||
{
|
||||
|
@ -8,19 +8,17 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "CAnimation.h"
|
||||
#include "SDLImage.h"
|
||||
|
||||
#include "SDLImageLoader.h"
|
||||
#include "SDL_Extensions.h"
|
||||
#include "ColorFilter.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../render/ColorFilter.h"
|
||||
#include "../render/CBitmapHandler.h"
|
||||
#include "../render/CDefFile.h"
|
||||
#include "../render/Graphics.h"
|
||||
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/filesystem/ISimpleResourceLoader.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
|
||||
|
@ -9,28 +9,17 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../lib/GameConstants.h"
|
||||
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
#include "../render/IImage.h"
|
||||
#include "../../lib/Point.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Rect;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
class CDefFile;
|
||||
class ColorFilter;
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Palette;
|
||||
|
||||
/*
|
||||
* Wrapper around SDL_Surface
|
||||
|
@ -7,27 +7,16 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "CAnimation.h"
|
||||
#include "SDLImageLoader.h"
|
||||
|
||||
#include "SDL_Extensions.h"
|
||||
#include "ColorFilter.h"
|
||||
#include "SDLImage.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../Graphics.h"
|
||||
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/filesystem/ISimpleResourceLoader.h"
|
||||
#include "../../lib/JsonNode.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/vcmi_endian.h"
|
||||
#include "../../lib/Point.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
|
||||
/*************************************************************************
|
||||
* Classes for image loaders - helpers for loading from def files *
|
||||
*************************************************************************/
|
||||
|
||||
SDLImageLoader::SDLImageLoader(SDLImage * Img):
|
||||
image(Img),
|
||||
lineStart(nullptr),
|
||||
@ -52,7 +41,7 @@ void SDLImageLoader::init(Point SpriteSize, Point Margins, Point FullSize, SDL_C
|
||||
lineStart = position = (ui8*)image->surf->pixels;
|
||||
}
|
||||
|
||||
inline void SDLImageLoader::Load(size_t size, const ui8 * data)
|
||||
inline void SDLImageLoader::load(size_t size, const ui8 * data)
|
||||
{
|
||||
if (size)
|
||||
{
|
||||
@ -61,7 +50,7 @@ inline void SDLImageLoader::Load(size_t size, const ui8 * data)
|
||||
}
|
||||
}
|
||||
|
||||
inline void SDLImageLoader::Load(size_t size, ui8 color)
|
||||
inline void SDLImageLoader::load(size_t size, ui8 color)
|
||||
{
|
||||
if (size)
|
||||
{
|
||||
@ -70,7 +59,7 @@ inline void SDLImageLoader::Load(size_t size, ui8 color)
|
||||
}
|
||||
}
|
||||
|
||||
inline void SDLImageLoader::EndLine()
|
||||
inline void SDLImageLoader::endLine()
|
||||
{
|
||||
lineStart += image->surf->pitch;
|
||||
position = lineStart;
|
||||
|
@ -9,43 +9,21 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../lib/GameConstants.h"
|
||||
#include "../render/IImageLoader.h"
|
||||
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class JsonNode;
|
||||
class Rect;
|
||||
class Point;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
struct SDL_Surface;
|
||||
struct SDL_Color;
|
||||
class CDefFile;
|
||||
class ColorFilter;
|
||||
|
||||
|
||||
class SDLImageLoader
|
||||
class SDLImageLoader : public IImageLoader
|
||||
{
|
||||
SDLImage * image;
|
||||
ui8 * lineStart;
|
||||
ui8 * position;
|
||||
public:
|
||||
//load size raw pixels from data
|
||||
inline void Load(size_t size, const ui8 * data);
|
||||
void load(size_t size, const ui8 * data);
|
||||
//set size pixels to color
|
||||
inline void Load(size_t size, ui8 color=0);
|
||||
inline void EndLine();
|
||||
void load(size_t size, ui8 color=0);
|
||||
void endLine();
|
||||
//init image with these sizes and palette
|
||||
inline void init(Point SpriteSize, Point Margins, Point FullSize, SDL_Color *pal);
|
||||
void init(Point SpriteSize, Point Margins, Point FullSize, SDL_Color *pal);
|
||||
|
||||
SDLImageLoader(SDLImage * Img);
|
||||
~SDLImageLoader();
|
||||
|
@ -10,7 +10,9 @@
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "SDLRWwrapper.h"
|
||||
#include "../lib/filesystem/CInputStream.h"
|
||||
|
||||
#include "../../lib/filesystem/CInputStream.h"
|
||||
|
||||
#include <SDL_rwops.h>
|
||||
|
||||
static inline CInputStream* get_stream(SDL_RWops* context)
|
||||
|
@ -9,25 +9,26 @@
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "SDL_Extensions.h"
|
||||
|
||||
#include "SDL_PixelAccess.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../CMT.h"
|
||||
|
||||
#include <SDL_version.h>
|
||||
//
|
||||
//#include "../CGameInfo.h"
|
||||
//#include "../CMessage.h"
|
||||
#include "../render/Graphics.h"
|
||||
//#include "../CMT.h"
|
||||
//
|
||||
//#include <SDL_version.h>
|
||||
#include <SDL_render.h>
|
||||
#include <SDL_video.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
#ifdef VCMI_APPLE
|
||||
#include <dispatch/dispatch.h>
|
||||
#endif
|
||||
|
||||
#ifdef VCMI_IOS
|
||||
#include "ios/utils.h"
|
||||
#endif
|
||||
//
|
||||
//#ifdef VCMI_APPLE
|
||||
//#include <dispatch/dispatch.h>
|
||||
//#endif
|
||||
//
|
||||
//#ifdef VCMI_IOS
|
||||
//#include "ios/utils.h"
|
||||
//#endif
|
||||
|
||||
const SDL_Color Colors::YELLOW = { 229, 215, 123, SDL_ALPHA_OPAQUE };
|
||||
const SDL_Color Colors::WHITE = { 255, 243, 222, SDL_ALPHA_OPAQUE };
|
||||
|
@ -18,9 +18,10 @@
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../battle/BattleInterface.h"
|
||||
#include "../battle/BattleInterfaceClasses.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../render/CAnimation.h"
|
||||
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../gui/CIntObject.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../../lib/FunctionList.h"
|
||||
|
||||
#include <SDL_pixels.h>
|
||||
|
@ -18,18 +18,20 @@
|
||||
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
|
||||
#include "../CMessage.h"
|
||||
#include "../gui/TextAlignment.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../adventureMap/CAdvMapInt.h"
|
||||
#include "../windows/CMessage.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
|
||||
#include "../../lib/CArtHandler.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/spells/CSpellHandler.h"
|
||||
#include "../../lib/CCreatureHandler.h"
|
||||
#include "../../lib/CSkillHandler.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/NetPacksBase.h"
|
||||
#include "../../lib/CArtHandler.h"
|
||||
|
||||
CComponent::CComponent(Etype Type, int Subtype, int Val, ESize imageSize)
|
||||
: perDay(false)
|
||||
|
@ -9,8 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../lib/ResourceSet.h"
|
||||
#include "gui/CIntObject.h"
|
||||
#include "../../lib/ResourceSet.h"
|
||||
#include "../gui/CIntObject.h"
|
||||
|
||||
class CLabel;
|
||||
class CAnimImage;
|
||||
|
@ -12,21 +12,17 @@
|
||||
|
||||
#include "MiscWidgets.h"
|
||||
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../gui/ColorFilter.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../render/CAnimation.h"
|
||||
|
||||
#include "../battle/BattleInterface.h"
|
||||
#include "../battle/BattleInterfaceClasses.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
|
@ -16,11 +16,12 @@
|
||||
#include "../gui/CursorHandler.h"
|
||||
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../windows/CAdvmapInterface.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../windows/CCastleInterface.h"
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../adventureMap/CAdvMapInt.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
|
@ -13,12 +13,11 @@
|
||||
#include "Buttons.h"
|
||||
#include "Images.h"
|
||||
|
||||
#include "../CMessage.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/AdventureMapClasses.h"
|
||||
|
||||
#include "../../lib/CGeneralTextHandler.h" //for Unicode related stuff
|
||||
#include "../windows/CMessage.h"
|
||||
#include "../adventureMap/CInGameConsole.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
|
||||
#ifdef VCMI_ANDROID
|
||||
#include "lib/CAndroidVMHelper.h"
|
||||
@ -26,6 +25,9 @@
|
||||
|
||||
#include <SDL_events.h>
|
||||
|
||||
std::list<CFocusable*> CFocusable::focusables;
|
||||
CFocusable * CFocusable::inputWithFocus;
|
||||
|
||||
std::string CLabel::visibleText()
|
||||
{
|
||||
return text;
|
||||
|
@ -11,7 +11,8 @@
|
||||
|
||||
#include "../gui/CIntObject.h"
|
||||
#include "../gui/TextAlignment.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../render/Graphics.h"
|
||||
#include "../../lib/FunctionList.h"
|
||||
|
||||
#include <SDL_pixels.h>
|
||||
|
@ -10,25 +10,24 @@
|
||||
#include "StdInc.h"
|
||||
#include "CCastleInterface.h"
|
||||
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "CHeroWindow.h"
|
||||
#include "CTradeWindow.h"
|
||||
#include "InfoWindows.h"
|
||||
#include "GUIClasses.h"
|
||||
#include "QuickRecruitmentWindow.h"
|
||||
|
||||
#include "../CBitmapHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMusicHandler.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/ColorFilter.h"
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../render/IImage.h"
|
||||
#include "../render/ColorFilter.h"
|
||||
#include "../adventureMap/CAdvMapInt.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/CArtHandler.h"
|
||||
|
@ -10,22 +10,22 @@
|
||||
#include "StdInc.h"
|
||||
#include "CHeroWindow.h"
|
||||
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "CCreatureWindow.h"
|
||||
#include "CKingdomInterface.h"
|
||||
#include "GUIClasses.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CMessage.h"
|
||||
#include "../CMT.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../Graphics.h"
|
||||
|
||||
#include "../gui/SDL_Extensions.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/CAnimation.h"
|
||||
#include "../gui/TextAlignment.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../render/CAnimation.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
#include "../lib/CSkillHandler.h"
|
||||
#include "../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../lib/NetPacksBase.h"
|
||||
#include "../mapHandler.h"
|
||||
|
||||
|
||||
TConstBonusListPtr CHeroWithMaybePickedArtifact::getAllBonuses(const CSelector & selector, const CSelector & limit, const CBonusSystemNode * root, const std::string & cachingStr) const
|
||||
{
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "StdInc.h"
|
||||
#include "CKingdomInterface.h"
|
||||
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "CCastleInterface.h"
|
||||
#include "InfoWindows.h"
|
||||
|
||||
@ -19,7 +18,11 @@
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/MiscWidgets.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../adventureMap/CAdvMapInt.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
|
||||
|
@ -11,16 +11,15 @@
|
||||
#include "StdInc.h"
|
||||
#include "CMessage.h"
|
||||
|
||||
#include "CGameInfo.h"
|
||||
#include "gui/SDL_Extensions.h"
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
#include "CBitmapHandler.h"
|
||||
#include "gui/CAnimation.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
|
||||
#include "widgets/CComponent.h"
|
||||
#include "windows/InfoWindows.h"
|
||||
#include "widgets/Buttons.h"
|
||||
#include "widgets/TextControls.h"
|
||||
#include "../windows/InfoWindows.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../widgets/CComponent.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/IImage.h"
|
||||
|
||||
#include <SDL_surface.h>
|
||||
|
||||
|
@ -9,12 +9,14 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "Graphics.h"
|
||||
#include "../render/Graphics.h"
|
||||
#include "../../lib/GameConstants.h"
|
||||
|
||||
struct SDL_Surface;
|
||||
class CInfoWindow;
|
||||
class CComponent;
|
||||
|
||||
|
||||
/// Class which draws formatted text messages and generates chat windows
|
||||
class CMessage
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user