From f1e5797834fdde32133f27ccd38c103cd14e0d1a Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Thu, 13 Jul 2017 11:26:03 +0300 Subject: [PATCH] Code style: move or add licensing information on top of every file --- AI/BattleAI/BattleAI.cpp | 16 +++++++-------- AI/BattleAI/ThreatMap.cpp | 3 +-- AI/EmptyAI/CEmptyAI.cpp | 9 +++++++++ AI/EmptyAI/CEmptyAI.h | 9 +++++++++ AI/EmptyAI/exp_funcs.cpp | 11 +++++++++- AI/StupidAI/StupidAI.cpp | 9 +++++++++ AI/StupidAI/StupidAI.h | 9 +++++++++ AI/StupidAI/main.cpp | 11 +++++++++- AI/VCAI/AIUtility.cpp | 19 +++++++++--------- AI/VCAI/AIUtility.h | 19 +++++++++--------- AI/VCAI/Fuzzy.cpp | 19 +++++++++--------- AI/VCAI/Fuzzy.h | 7 +++---- AI/VCAI/Goals.cpp | 13 ++++++------ AI/VCAI/Goals.h | 16 +++++++-------- AI/VCAI/VCAI.cpp | 19 +++++++++--------- AI/VCAI/VCAI.h | 19 +++++++++--------- AI/VCAI/main.cpp | 11 +++++++++- CCallback.cpp | 19 +++++++++--------- CCallback.h | 10 ++++------ Global.h | 3 +-- Version.cpp.in | 9 +++++++++ client/CBitmapHandler.cpp | 16 +++++++-------- client/CBitmapHandler.h | 3 +-- client/CDefHandler.cpp | 16 +++++++-------- client/CDefHandler.h | 13 ++++++------ client/CGameInfo.cpp | 9 ++++----- client/CGameInfo.h | 9 ++++----- client/CMT.cpp | 19 +++++++++--------- client/CMT.h | 9 +++++++++ client/CMessage.h | 10 ++++------ client/CMusicHandler.cpp | 19 +++++++++--------- client/CMusicHandler.h | 9 ++++----- client/CPlayerInterface.cpp | 19 +++++++++--------- client/CPlayerInterface.h | 19 +++++++++--------- client/CPreGame.cpp | 18 ++++++++--------- client/CPreGame.h | 15 +++++++------- client/CVideoHandler.cpp | 9 +++++++++ client/CVideoHandler.h | 9 +++++++++ client/Client.cpp | 19 +++++++++--------- client/Client.h | 15 +++++++------- client/Graphics.cpp | 19 +++++++++--------- client/Graphics.h | 11 +++++----- client/NetPacksClient.cpp | 18 ++++++++--------- client/SDLRWwrapper.h | 3 +-- client/battle/CBattleAnimations.cpp | 19 +++++++++--------- client/battle/CBattleAnimations.h | 19 +++++++++--------- client/battle/CBattleInterface.cpp | 20 +++++++++---------- client/battle/CBattleInterface.h | 17 ++++++++-------- client/battle/CBattleInterfaceClasses.cpp | 19 +++++++++--------- client/battle/CBattleInterfaceClasses.h | 19 +++++++++--------- client/battle/CCreatureAnimation.cpp | 19 +++++++++--------- client/battle/CCreatureAnimation.h | 11 +++++----- client/gui/CAnimation.cpp | 19 +++++++++--------- client/gui/CAnimation.h | 11 +++++----- client/gui/CCursorHandler.cpp | 19 +++++++++--------- client/gui/CCursorHandler.h | 11 +++++----- client/gui/CGuiHandler.cpp | 9 +++++++++ client/gui/CGuiHandler.h | 19 +++++++++--------- client/gui/CIntObject.cpp | 9 +++++++++ client/gui/CIntObject.h | 1 - client/gui/Fonts.cpp | 19 +++++++++--------- client/gui/Fonts.h | 3 +-- client/gui/Geometries.cpp | 9 +++++++++ client/gui/Geometries.h | 9 ++++----- client/gui/SDL_Compat.h | 3 +-- client/gui/SDL_Extensions.cpp | 9 +++++++++ client/gui/SDL_Extensions.h | 1 - client/gui/SDL_Pixels.h | 11 +++++----- client/mapHandler.h | 15 +++++++------- client/widgets/AdventureMapClasses.cpp | 19 +++++++++--------- client/widgets/AdventureMapClasses.h | 19 +++++++++--------- client/widgets/Buttons.cpp | 20 +++++++++---------- client/widgets/Buttons.h | 19 +++++++++--------- client/widgets/CArtifactHolder.cpp | 19 +++++++++--------- client/widgets/CArtifactHolder.h | 9 ++++----- client/widgets/CComponent.cpp | 19 +++++++++--------- client/widgets/CComponent.h | 7 +++---- client/widgets/CGarrisonInt.cpp | 19 +++++++++--------- client/widgets/CGarrisonInt.h | 7 +++---- client/widgets/Images.cpp | 19 +++++++++--------- client/widgets/Images.h | 19 +++++++++--------- client/widgets/MiscWidgets.cpp | 19 +++++++++--------- client/widgets/MiscWidgets.h | 7 +++---- client/widgets/ObjectLists.cpp | 11 +++++----- client/widgets/ObjectLists.h | 19 +++++++++--------- client/widgets/TextControls.cpp | 19 +++++++++--------- client/widgets/TextControls.h | 11 +++++----- client/windows/CAdvmapInterface.cpp | 19 +++++++++--------- client/windows/CAdvmapInterface.h | 19 +++++++++--------- client/windows/CCastleInterface.cpp | 19 +++++++++--------- client/windows/CCastleInterface.h | 20 +++++++++---------- client/windows/CCreatureWindow.cpp | 19 +++++++++--------- client/windows/CCreatureWindow.h | 11 +++++----- client/windows/CHeroWindow.cpp | 19 +++++++++--------- client/windows/CHeroWindow.h | 11 +++++----- client/windows/CKingdomInterface.cpp | 19 +++++++++--------- client/windows/CKingdomInterface.h | 19 +++++++++--------- client/windows/CQuestLog.cpp | 18 ++++++++--------- client/windows/CQuestLog.h | 15 +++++++------- client/windows/CSpellWindow.cpp | 19 +++++++++--------- client/windows/CSpellWindow.h | 7 +++---- client/windows/CTradeWindow.cpp | 20 +++++++++---------- client/windows/CTradeWindow.h | 11 +++++----- client/windows/CWindowObject.cpp | 19 +++++++++--------- client/windows/CWindowObject.h | 7 +++---- client/windows/GUIClasses.cpp | 19 +++++++++--------- client/windows/GUIClasses.h | 19 +++++++++--------- client/windows/InfoWindows.cpp | 19 +++++++++--------- client/windows/InfoWindows.h | 18 ++++++++--------- launcher/jsonutils.cpp | 9 +++++++++ launcher/jsonutils.h | 11 +++++++++- launcher/launcherdirs.cpp | 9 +++++++++ launcher/launcherdirs.h | 9 +++++++++ launcher/main.cpp | 9 +++++++++ launcher/mainwindow_moc.cpp | 9 +++++++++ launcher/mainwindow_moc.h | 9 +++++++++ launcher/modManager/cdownloadmanager_moc.cpp | 9 +++++++++ launcher/modManager/cdownloadmanager_moc.h | 9 +++++++++ launcher/modManager/cmodlist.cpp | 9 +++++++++ launcher/modManager/cmodlist.h | 9 +++++++++ launcher/modManager/cmodlistmodel_moc.cpp | 9 +++++++++ launcher/modManager/cmodlistmodel_moc.h | 9 +++++++++ launcher/modManager/cmodlistview_moc.cpp | 9 +++++++++ launcher/modManager/cmodlistview_moc.h | 9 +++++++++ launcher/modManager/cmodmanager.cpp | 9 +++++++++ launcher/modManager/cmodmanager.h | 9 +++++++++ launcher/modManager/imageviewer_moc.cpp | 9 +++++++++ launcher/modManager/imageviewer_moc.h | 9 +++++++++ launcher/sdldisplayquery.cpp | 9 +++++++++ launcher/sdldisplayquery.h | 9 +++++++++ launcher/settingsView/csettingsview_moc.cpp | 9 +++++++++ launcher/settingsView/csettingsview_moc.h | 9 +++++++++ lib/AI_Base.h | 7 +++---- lib/CArtHandler.h | 16 +++++++-------- lib/CBuildingHandler.cpp | 6 ++---- lib/CBuildingHandler.h | 7 +++---- lib/CConfigHandler.cpp | 19 +++++++++--------- lib/CConfigHandler.h | 8 ++++---- lib/CConsoleHandler.cpp | 19 +++++++++--------- lib/CConsoleHandler.h | 3 +-- lib/CCreatureHandler.cpp | 19 +++++++++--------- lib/CCreatureHandler.h | 20 +++++++++---------- lib/CCreatureSet.cpp | 19 +++++++++--------- lib/CCreatureSet.h | 13 ++++++------ lib/CGameInfoCallback.cpp | 1 - lib/CGameInfoCallback.h | 9 ++++----- lib/CGameInterface.cpp | 19 +++++++++--------- lib/CGameInterface.h | 20 +++++++++---------- lib/CGameState.cpp | 19 +++++++++--------- lib/CGameState.h | 19 +++++++++--------- lib/CGameStateFwd.h | 3 +-- lib/CGeneralTextHandler.cpp | 19 +++++++++--------- lib/CGeneralTextHandler.h | 3 +-- lib/CHeroHandler.cpp | 19 +++++++++--------- lib/CHeroHandler.h | 13 ++++++------ lib/CModHandler.cpp | 19 +++++++++--------- lib/CModHandler.h | 13 ++++++------ lib/CPathfinder.cpp | 19 +++++++++--------- lib/CPathfinder.h | 17 ++++++++-------- lib/CPlayerState.h | 3 +-- lib/CRandomGenerator.cpp | 1 - lib/CRandomGenerator.h | 1 - lib/CScriptingModule.h | 8 +++----- lib/CSoundBase.h | 9 +++++++++ lib/CStopWatch.h | 19 +++++++++--------- lib/CThreadHelper.cpp | 16 +++++++-------- lib/CThreadHelper.h | 7 ++----- lib/CTownHandler.cpp | 19 +++++++++--------- lib/CTownHandler.h | 19 +++++++++--------- lib/CondSh.h | 3 +-- lib/ConstTransitivePtr.h | 7 +++---- lib/FunctionList.h | 4 +--- lib/GameConstants.h | 3 +-- lib/HeroBonus.h | 7 +++---- lib/IBonusTypeHandler.h | 1 - lib/IGameCallback.cpp | 1 - lib/IGameCallback.h | 9 ++++----- lib/IHandlerBase.h | 4 ++-- lib/Interprocess.h | 15 +++++++------- lib/JsonDetail.h | 1 - lib/JsonNode.h | 1 - lib/LogicalExpression.cpp | 9 +++++++++ lib/LogicalExpression.h | 9 +++++++++ lib/NetPacks.h | 19 +++++++++--------- lib/NetPacksBase.h | 3 +-- lib/NetPacksLib.cpp | 19 +++++++++--------- lib/StartInfo.h | 7 +++---- lib/StringConstants.h | 6 ++---- lib/UnlockGuard.h | 1 - lib/VCMIDirs.h | 16 +++++++-------- lib/VCMI_Lib.h | 3 +-- lib/battle/CBattleInfoCallback.cpp | 2 +- lib/battle/CBattleInfoCallback.h | 2 +- lib/battle/CObstacleInstance.cpp | 13 ++++++------ lib/battle/CObstacleInstance.h | 5 ++--- lib/filesystem/AdapterLoaders.cpp | 9 +++++++++ lib/filesystem/AdapterLoaders.h | 3 +-- lib/filesystem/CArchiveLoader.cpp | 9 +++++++++ lib/filesystem/CArchiveLoader.h | 3 +-- lib/filesystem/CBinaryReader.cpp | 9 +++++++++ lib/filesystem/CBinaryReader.h | 3 +-- lib/filesystem/CCompressedStream.cpp | 9 +++++++++ lib/filesystem/CCompressedStream.h | 3 +-- lib/filesystem/CFileInputStream.cpp | 9 +++++++++ lib/filesystem/CFileInputStream.h | 3 +-- lib/filesystem/CFilesystemLoader.cpp | 9 +++++++++ lib/filesystem/CFilesystemLoader.h | 3 +-- lib/filesystem/CInputOutputStream.h | 9 +++++++++ lib/filesystem/CInputStream.h | 7 +++---- lib/filesystem/CMemoryBuffer.h | 4 +--- lib/filesystem/CMemoryStream.cpp | 9 +++++++++ lib/filesystem/CMemoryStream.h | 3 +-- lib/filesystem/COutputStream.h | 7 +++---- lib/filesystem/CStream.h | 3 +-- lib/filesystem/CZipLoader.cpp | 11 +++++----- lib/filesystem/CZipLoader.h | 3 +-- lib/filesystem/CZipSaver.h | 3 +-- lib/filesystem/FileInfo.cpp | 9 +++++++++ lib/filesystem/FileInfo.h | 3 +-- lib/filesystem/FileStream.cpp | 9 +++++++++ lib/filesystem/FileStream.h | 3 +-- lib/filesystem/Filesystem.cpp | 9 +++++++++ lib/filesystem/Filesystem.h | 3 +-- lib/filesystem/ISimpleResourceLoader.h | 3 +-- lib/filesystem/MinizipExtensions.h | 3 +-- lib/filesystem/ResourceID.cpp | 9 +++++++++ lib/filesystem/ResourceID.h | 3 +-- lib/int3.h | 3 +-- lib/logging/CBasicLogConfigurator.cpp | 9 +++++++++ lib/logging/CBasicLogConfigurator.h | 1 - lib/logging/CLogger.cpp | 9 +++++++++ lib/logging/CLogger.h | 2 -- lib/mapObjects/CArmedInstance.h | 11 +++++----- lib/mapObjects/CBank.h | 11 +++++----- lib/mapObjects/CGHeroInstance.h | 19 +++++++++--------- lib/mapObjects/CGMarket.cpp | 1 - lib/mapObjects/CGMarket.h | 9 ++++----- lib/mapObjects/CGPandoraBox.h | 13 ++++++------ lib/mapObjects/CGTownInstance.h | 15 +++++++------- lib/mapObjects/CObjectClassesHandler.cpp | 21 ++++++++++---------- lib/mapObjects/CObjectClassesHandler.h | 19 +++++++++--------- lib/mapObjects/CObjectHandler.h | 15 +++++++------- lib/mapObjects/CQuest.cpp | 1 - lib/mapObjects/CQuest.h | 15 +++++++------- lib/mapObjects/CRewardableConstructor.cpp | 17 ++++++++-------- lib/mapObjects/CRewardableConstructor.h | 13 ++++++------ lib/mapObjects/CRewardableObject.cpp | 1 - lib/mapObjects/CRewardableObject.h | 15 +++++++------- lib/mapObjects/CommonConstructors.cpp | 19 +++++++++--------- lib/mapObjects/CommonConstructors.h | 11 +++++----- lib/mapObjects/JsonRandom.cpp | 1 - lib/mapObjects/JsonRandom.h | 9 ++++----- lib/mapObjects/MapObjects.h | 3 +-- lib/mapObjects/MiscObjects.h | 11 +++++----- lib/mapObjects/ObjectTemplate.cpp | 19 +++++++++--------- lib/mapObjects/ObjectTemplate.h | 7 +++---- lib/mapping/CCampaignHandler.cpp | 19 +++++++++--------- lib/mapping/CCampaignHandler.h | 7 +++---- lib/mapping/CMap.cpp | 9 +++++++++ lib/mapping/CMap.h | 1 - lib/mapping/CMapEditManager.cpp | 9 +++++++++ lib/mapping/CMapEditManager.h | 1 - lib/mapping/CMapInfo.cpp | 9 +++++++++ lib/mapping/CMapInfo.h | 9 +++++++++ lib/mapping/CMapService.cpp | 9 +++++++++ lib/mapping/CMapService.h | 1 - lib/mapping/MapFormatH3M.h | 1 - lib/mapping/MapFormatJson.cpp | 16 +++++++-------- lib/mapping/MapFormatJson.h | 2 +- lib/registerTypes/RegisterTypes.cpp | 9 +++++++++ lib/registerTypes/RegisterTypes.h | 21 ++++++++++---------- lib/registerTypes/TypesClientPacks1.cpp | 9 +++++++++ lib/registerTypes/TypesClientPacks2.cpp | 9 +++++++++ lib/registerTypes/TypesMapObjects1.cpp | 9 +++++++++ lib/registerTypes/TypesMapObjects2.cpp | 9 +++++++++ lib/registerTypes/TypesMapObjects3.cpp | 9 +++++++++ lib/registerTypes/TypesPregamePacks.cpp | 9 +++++++++ lib/registerTypes/TypesServerPacks.cpp | 9 +++++++++ lib/rmg/CMapGenOptions.cpp | 1 - lib/rmg/CMapGenOptions.h | 1 - lib/rmg/CMapGenerator.cpp | 9 +++++++++ lib/rmg/CMapGenerator.h | 1 - lib/rmg/CRmgTemplate.cpp | 1 - lib/rmg/CRmgTemplate.h | 1 - lib/rmg/CRmgTemplateStorage.cpp | 1 - lib/rmg/CRmgTemplateStorage.h | 1 - lib/rmg/CRmgTemplateZone.cpp | 1 - lib/rmg/CRmgTemplateZone.h | 1 - lib/rmg/CZoneGraphGenerator.cpp | 1 - lib/rmg/CZoneGraphGenerator.h | 1 - lib/rmg/CZonePlacer.cpp | 1 - lib/rmg/CZonePlacer.h | 1 - lib/rmg/float3.h | 3 +-- lib/serializer/BinaryDeserializer.cpp | 9 ++++----- lib/serializer/BinaryDeserializer.h | 2 -- lib/serializer/BinarySerializer.cpp | 9 ++++----- lib/serializer/BinarySerializer.h | 2 -- lib/serializer/CLoadIntegrityValidator.cpp | 9 ++++----- lib/serializer/CLoadIntegrityValidator.h | 2 -- lib/serializer/CMemorySerializer.cpp | 9 ++++----- lib/serializer/CMemorySerializer.h | 2 -- lib/serializer/CSerializer.cpp | 15 +++++++------- lib/serializer/CSerializer.h | 2 -- lib/serializer/CTypeList.cpp | 9 ++++----- lib/serializer/CTypeList.h | 2 -- lib/serializer/Connection.cpp | 17 ++++++++-------- lib/serializer/Connection.h | 2 -- lib/serializer/JsonDeserializer.cpp | 2 -- lib/serializer/JsonDeserializer.h | 1 - lib/serializer/JsonSerializeFormat.cpp | 2 -- lib/serializer/JsonSerializeFormat.h | 1 - lib/serializer/JsonSerializer.cpp | 2 -- lib/serializer/JsonSerializer.h | 1 - lib/spells/SpellMechanics.h | 17 ++++++++-------- lib/vcmi_endian.h | 9 ++++----- scripting/erm/ERMInterpreter.cpp | 19 +++++++++--------- scripting/erm/ERMInterpreter.h | 11 +++++----- scripting/erm/ERMParser.cpp | 20 +++++++++---------- scripting/erm/ERMParser.h | 2 +- scripting/erm/ERMScriptModule.cpp | 13 ++++++------ scripting/erm/ERMScriptModule.h | 8 +++----- server/CGameHandler.cpp | 20 +++++++++---------- server/CGameHandler.h | 15 ++++++-------- server/CQuery.cpp | 9 +++++++++ server/CQuery.h | 9 +++++++++ server/CVCMIServer.cpp | 19 +++++++++--------- server/CVCMIServer.h | 7 +++---- server/NetPacksServer.cpp | 19 +++++++++--------- server/StdInc.h | 9 +++++++++ test/Battlefield.cpp | 2 +- test/CMapEditManagerTest.cpp | 1 - test/CMapFormatTest.cpp | 1 - test/CMemoryBufferTest.cpp | 1 - test/CVcmiTestConfig.cpp | 1 - test/CVcmiTestConfig.h | 3 +-- 335 files changed, 1881 insertions(+), 1512 deletions(-) diff --git a/AI/BattleAI/BattleAI.cpp b/AI/BattleAI/BattleAI.cpp index 23af8e232..3bbc50431 100644 --- a/AI/BattleAI/BattleAI.cpp +++ b/AI/BattleAI/BattleAI.cpp @@ -1,12 +1,12 @@ /* - * BattleAI.cpp, 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 - * - */ + * BattleAI.cpp, 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 + * + */ #include "StdInc.h" #include "BattleAI.h" #include "StackWithBonuses.h" diff --git a/AI/BattleAI/ThreatMap.cpp b/AI/BattleAI/ThreatMap.cpp index 77fd3d462..eb44da728 100644 --- a/AI/BattleAI/ThreatMap.cpp +++ b/AI/BattleAI/ThreatMap.cpp @@ -1,5 +1,3 @@ -#include "StdInc.h" - /* * ThreatMap.cpp, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" /* #include "ThreatMap.h" #include "StdInc.h" diff --git a/AI/EmptyAI/CEmptyAI.cpp b/AI/EmptyAI/CEmptyAI.cpp index 98da0f434..27638a378 100644 --- a/AI/EmptyAI/CEmptyAI.cpp +++ b/AI/EmptyAI/CEmptyAI.cpp @@ -1,3 +1,12 @@ +/* + * CEmptyAI.cpp, 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 + * + */ #include "StdInc.h" #include "CEmptyAI.h" diff --git a/AI/EmptyAI/CEmptyAI.h b/AI/EmptyAI/CEmptyAI.h index a7abccdea..5e7f9013f 100644 --- a/AI/EmptyAI/CEmptyAI.h +++ b/AI/EmptyAI/CEmptyAI.h @@ -1,3 +1,12 @@ +/* + * CEmptyAI.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 #include "../../lib/AI_Base.h" diff --git a/AI/EmptyAI/exp_funcs.cpp b/AI/EmptyAI/exp_funcs.cpp index 5779c77c9..0172544be 100644 --- a/AI/EmptyAI/exp_funcs.cpp +++ b/AI/EmptyAI/exp_funcs.cpp @@ -1,3 +1,12 @@ +/* + * exp_funcs.cpp, 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 + * + */ #include "StdInc.h" #include "CEmptyAI.h" @@ -16,4 +25,4 @@ extern "C" DLL_EXPORT void GetAiName(char* name) extern "C" DLL_EXPORT void GetNewAI(std::shared_ptr &out) { out = std::make_shared(); -} +} diff --git a/AI/StupidAI/StupidAI.cpp b/AI/StupidAI/StupidAI.cpp index 1bd1dd335..8da9b99cf 100644 --- a/AI/StupidAI/StupidAI.cpp +++ b/AI/StupidAI/StupidAI.cpp @@ -1,3 +1,12 @@ +/* + * StupidAI.cpp, 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 + * + */ #include "StdInc.h" #include "../../lib/AI_Base.h" #include "StupidAI.h" diff --git a/AI/StupidAI/StupidAI.h b/AI/StupidAI/StupidAI.h index 1b9a0b9ee..cc5b0f2ba 100644 --- a/AI/StupidAI/StupidAI.h +++ b/AI/StupidAI/StupidAI.h @@ -1,3 +1,12 @@ +/* + * StupidAI.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 #include "../../lib/battle/BattleHex.h" diff --git a/AI/StupidAI/main.cpp b/AI/StupidAI/main.cpp index 43ae27888..55e2d1f01 100644 --- a/AI/StupidAI/main.cpp +++ b/AI/StupidAI/main.cpp @@ -1,3 +1,12 @@ +/* + * main.cpp, 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 + * + */ #include "StdInc.h" #include "../../lib/AI_Base.h" @@ -22,4 +31,4 @@ extern "C" DLL_EXPORT void GetAiName(char* name) extern "C" DLL_EXPORT void GetNewBattleAI(std::shared_ptr &out) { out = std::make_shared(); -} \ No newline at end of file +} diff --git a/AI/VCAI/AIUtility.cpp b/AI/VCAI/AIUtility.cpp index a6b6e9e63..67458006f 100644 --- a/AI/VCAI/AIUtility.cpp +++ b/AI/VCAI/AIUtility.cpp @@ -1,3 +1,12 @@ +/* + * AIUtility.cpp, 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 + * + */ #include "StdInc.h" #include "AIUtility.h" #include "VCAI.h" @@ -12,16 +21,6 @@ #include "../../lib/CPathfinder.h" #include "../../lib/mapping/CMapDefines.h" -/* - * AIUtility.cpp, 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 - * - */ - extern boost::thread_specific_ptr cb; extern boost::thread_specific_ptr ai; extern FuzzyHelper *fh; diff --git a/AI/VCAI/AIUtility.h b/AI/VCAI/AIUtility.h index a51f4563a..b7a1bb59b 100644 --- a/AI/VCAI/AIUtility.h +++ b/AI/VCAI/AIUtility.h @@ -1,3 +1,12 @@ +/* + * AIUtility.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 #include "../../lib/VCMI_Lib.h" @@ -9,16 +18,6 @@ #include "../../lib/mapObjects/CObjectHandler.h" #include "../../lib/mapObjects/CGHeroInstance.h" -/* - * AIUtility.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 - * - */ - class CCallback; typedef const int3& crint3; diff --git a/AI/VCAI/Fuzzy.cpp b/AI/VCAI/Fuzzy.cpp index 21f8e1d94..4622fd739 100644 --- a/AI/VCAI/Fuzzy.cpp +++ b/AI/VCAI/Fuzzy.cpp @@ -1,3 +1,12 @@ +/* + * Fuzzy.cpp, 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 + * +*/ #include "StdInc.h" #include "Fuzzy.h" #include @@ -11,16 +20,6 @@ #include "../../CCallback.h" #include "VCAI.h" -/* - * Fuzzy.cpp, 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 - * -*/ - #define MIN_AI_STRENGHT (0.5f) //lower when combat AI gets smarter #define UNGUARDED_OBJECT (100.0f) //we consider unguarded objects 100 times weaker than us diff --git a/AI/VCAI/Fuzzy.h b/AI/VCAI/Fuzzy.h index 219390f69..f099d44a1 100644 --- a/AI/VCAI/Fuzzy.h +++ b/AI/VCAI/Fuzzy.h @@ -1,7 +1,3 @@ -#pragma once -#include "fl/Headers.h" -#include "Goals.h" - /* * Fuzzy.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once +#include "fl/Headers.h" +#include "Goals.h" class VCAI; class CArmedInstance; diff --git a/AI/VCAI/Goals.cpp b/AI/VCAI/Goals.cpp index 666ba3b9a..bc6680feb 100644 --- a/AI/VCAI/Goals.cpp +++ b/AI/VCAI/Goals.cpp @@ -1,10 +1,3 @@ -#include "StdInc.h" -#include "Goals.h" -#include "VCAI.h" -#include "Fuzzy.h" -#include "../../lib/mapping/CMap.h" //for victory conditions -#include "../../lib/CPathfinder.h" - /* * Goals.cpp, part of VCMI engine * @@ -14,6 +7,12 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "Goals.h" +#include "VCAI.h" +#include "Fuzzy.h" +#include "../../lib/mapping/CMap.h" //for victory conditions +#include "../../lib/CPathfinder.h" extern boost::thread_specific_ptr cb; extern boost::thread_specific_ptr ai; diff --git a/AI/VCAI/Goals.h b/AI/VCAI/Goals.h index d9602c663..616ad9fe8 100644 --- a/AI/VCAI/Goals.h +++ b/AI/VCAI/Goals.h @@ -1,11 +1,3 @@ -#pragma once - -#include "../../lib/VCMI_Lib.h" -#include "../../lib/CBuildingHandler.h" -#include "../../lib/CCreatureHandler.h" -#include "../../lib/CTownHandler.h" -#include "AIUtility.h" - /* * Goals.h, part of VCMI engine * @@ -15,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../../lib/VCMI_Lib.h" +#include "../../lib/CBuildingHandler.h" +#include "../../lib/CCreatureHandler.h" +#include "../../lib/CTownHandler.h" +#include "AIUtility.h" + struct HeroPtr; class VCAI; class FuzzyHelper; diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index 62cef14b7..33439a339 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -1,3 +1,12 @@ +/* + * VCAI.cpp, 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 + * + */ #include "StdInc.h" #include "VCAI.h" #include "Fuzzy.h" @@ -13,16 +22,6 @@ #include "../../lib/serializer/BinarySerializer.h" #include "../../lib/serializer/BinaryDeserializer.h" -/* - * VCAI.cpp, 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 - * - */ - extern FuzzyHelper *fh; class CGVisitableOPW; diff --git a/AI/VCAI/VCAI.h b/AI/VCAI/VCAI.h index bf7f791ac..5e3279a63 100644 --- a/AI/VCAI/VCAI.h +++ b/AI/VCAI/VCAI.h @@ -1,3 +1,12 @@ +/* + * VCAI.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 #include "AIUtility.h" @@ -18,16 +27,6 @@ struct QuestInfo; -/* - * VCAI.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 - * - */ - class AIStatus { boost::mutex mx; diff --git a/AI/VCAI/main.cpp b/AI/VCAI/main.cpp index 0ae2d6257..9f6c9a1b7 100644 --- a/AI/VCAI/main.cpp +++ b/AI/VCAI/main.cpp @@ -1,3 +1,12 @@ +/* + * main.cpp, 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 + * + */ #include "StdInc.h" #include "VCAI.h" @@ -20,4 +29,4 @@ extern "C" DLL_EXPORT void GetAiName(char* name) extern "C" DLL_EXPORT void GetNewAI(std::shared_ptr &out) { out = std::make_shared(); -} \ No newline at end of file +} diff --git a/CCallback.cpp b/CCallback.cpp index 9c0556b1b..c7e70809e 100644 --- a/CCallback.cpp +++ b/CCallback.cpp @@ -1,3 +1,12 @@ +/* + * CCallback.cpp, 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 + * + */ #include "StdInc.h" #include "CCallback.h" @@ -20,16 +29,6 @@ #include "lib/UnlockGuard.h" #include "lib/battle/BattleInfo.h" -/* - * CCallback.cpp, 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 - * - */ - bool CCallback::teleportHero(const CGHeroInstance *who, const CGTownInstance *where) { CastleTeleportHero pack(who->id, where->id, 1); diff --git a/CCallback.h b/CCallback.h index aab818c71..5efc25cfc 100644 --- a/CCallback.h +++ b/CCallback.h @@ -1,9 +1,3 @@ -#pragma once - - -#include "lib/CGameInfoCallback.h" -#include "lib/int3.h" // for int3 - /* * CCallback.h, part of VCMI engine * @@ -13,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "lib/CGameInfoCallback.h" +#include "lib/int3.h" // for int3 class CGHeroInstance; class CGameState; diff --git a/Global.h b/Global.h index c26892b7e..04f6a5afa 100644 --- a/Global.h +++ b/Global.h @@ -1,5 +1,3 @@ -#pragma once - /* * Global.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once /* ---------------------------------------------------------------------------- */ /* Compiler detection */ diff --git a/Version.cpp.in b/Version.cpp.in index 099594e4a..3198034f1 100644 --- a/Version.cpp.in +++ b/Version.cpp.in @@ -1,3 +1,12 @@ +/* + * Version.cpp.in, 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 + * + */ #include "Version.h" namespace GameConstants diff --git a/client/CBitmapHandler.cpp b/client/CBitmapHandler.cpp index 3f4ff56ae..5d175619a 100644 --- a/client/CBitmapHandler.cpp +++ b/client/CBitmapHandler.cpp @@ -1,12 +1,3 @@ -#include "StdInc.h" - -#include "../lib/filesystem/Filesystem.h" -#include "SDL.h" -#include "SDL_image.h" -#include "CBitmapHandler.h" -#include "gui/SDL_Extensions.h" -#include "../lib/vcmi_endian.h" - /* * CBitmapHandler.cpp, part of VCMI engine * @@ -16,7 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "../lib/filesystem/Filesystem.h" +#include "SDL.h" +#include "SDL_image.h" +#include "CBitmapHandler.h" +#include "gui/SDL_Extensions.h" +#include "../lib/vcmi_endian.h" namespace BitmapHandler { diff --git a/client/CBitmapHandler.h b/client/CBitmapHandler.h index 67ba9b91a..539dc1212 100644 --- a/client/CBitmapHandler.h +++ b/client/CBitmapHandler.h @@ -1,5 +1,3 @@ -#pragma once - /* * CBitmapHandler.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once struct SDL_Surface; diff --git a/client/CDefHandler.cpp b/client/CDefHandler.cpp index 7bd9a1d3f..66bccbf6c 100644 --- a/client/CDefHandler.cpp +++ b/client/CDefHandler.cpp @@ -1,11 +1,3 @@ -#include "StdInc.h" -#include "SDL.h" -#include "CDefHandler.h" - -#include "../lib/filesystem/Filesystem.h" -#include "../lib/VCMI_Lib.h" -#include "CBitmapHandler.h" -#include "gui/SDL_Extensions.h" /* * CDefHandler.cpp, part of VCMI engine * @@ -15,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "SDL.h" +#include "CDefHandler.h" + +#include "../lib/filesystem/Filesystem.h" +#include "../lib/VCMI_Lib.h" +#include "CBitmapHandler.h" +#include "gui/SDL_Extensions.h" #ifdef unused static long long pow(long long a, int b) diff --git a/client/CDefHandler.h b/client/CDefHandler.h index 6a39f6226..d33efe92c 100644 --- a/client/CDefHandler.h +++ b/client/CDefHandler.h @@ -1,10 +1,3 @@ -#pragma once - -#include "../lib/vcmi_endian.h" - -struct SDL_Surface; -struct SDL_Color; - /* * CDefHandler.h, part of VCMI engine * @@ -14,6 +7,12 @@ struct SDL_Color; * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../lib/vcmi_endian.h" + +struct SDL_Surface; +struct SDL_Color; struct Cimage { diff --git a/client/CGameInfo.cpp b/client/CGameInfo.cpp index 6d0f9f63d..361367204 100644 --- a/client/CGameInfo.cpp +++ b/client/CGameInfo.cpp @@ -1,8 +1,3 @@ -#include "StdInc.h" -#include "CGameInfo.h" - -#include "../lib/VCMI_Lib.h" - /* * CGameInfo.cpp, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CGameInfo.h" + +#include "../lib/VCMI_Lib.h" const CGameInfo * CGI; //game info for general use CClientState * CCS = nullptr; diff --git a/client/CGameInfo.h b/client/CGameInfo.h index d0393568e..bd13716e4 100644 --- a/client/CGameInfo.h +++ b/client/CGameInfo.h @@ -1,8 +1,3 @@ -#pragma once - - -#include "../lib/ConstTransitivePtr.h" - /* * CGameInfo.h, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + + +#include "../lib/ConstTransitivePtr.h" class CModHandler; class CMapHandler; diff --git a/client/CMT.cpp b/client/CMT.cpp index 5df1b6c0f..f5ac1757a 100644 --- a/client/CMT.cpp +++ b/client/CMT.cpp @@ -1,3 +1,12 @@ +/* + * CMT.cpp, 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 + * + */ // CMT.cpp : Defines the entry point for the console application. // #include "StdInc.h" @@ -63,16 +72,6 @@ namespace po = boost::program_options; namespace po_style = boost::program_options::command_line_style; namespace bfs = boost::filesystem; -/* - * CMT.cpp, 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 - * - */ - std::string NAME_AFFIX = "client"; std::string NAME = GameConstants::VCMI_VERSION + std::string(" (") + NAME_AFFIX + ')'; //application name CGuiHandler GH; diff --git a/client/CMT.h b/client/CMT.h index f75e2661c..93af4710f 100644 --- a/client/CMT.h +++ b/client/CMT.h @@ -1,3 +1,12 @@ +/* + * CMT.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 #include #include "../lib/CondSh.h" diff --git a/client/CMessage.h b/client/CMessage.h index 37b6a3373..2e554ee2f 100644 --- a/client/CMessage.h +++ b/client/CMessage.h @@ -1,9 +1,3 @@ -#pragma once - -#include "Graphics.h" -#include "gui/Geometries.h" - - /* * CMessage.h, part of VCMI engine * @@ -13,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "Graphics.h" +#include "gui/Geometries.h" struct SDL_Surface; class CInfoWindow; diff --git a/client/CMusicHandler.cpp b/client/CMusicHandler.cpp index 6a0b8e5d9..351caf5fa 100644 --- a/client/CMusicHandler.cpp +++ b/client/CMusicHandler.cpp @@ -1,3 +1,12 @@ +/* + * CMusicHandler.cpp, 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 + * + */ #include "StdInc.h" #include @@ -12,16 +21,6 @@ #include "../lib/StringConstants.h" #include "../lib/CRandomGenerator.h" -/* - * CMusicHandler.cpp, 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 - * - */ - #define VCMI_SOUND_NAME(x) #define VCMI_SOUND_FILE(y) #y, diff --git a/client/CMusicHandler.h b/client/CMusicHandler.h index a21e1beb7..adc8a78f7 100644 --- a/client/CMusicHandler.h +++ b/client/CMusicHandler.h @@ -1,8 +1,3 @@ -#pragma once - -#include "../lib/CConfigHandler.h" -#include "../lib/CSoundBase.h" - /* * CMusicHandler.h, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../lib/CConfigHandler.h" +#include "../lib/CSoundBase.h" class CSpell; struct _Mix_Music; diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 947090658..aeabd55ef 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -1,3 +1,12 @@ +/* + * CPlayerInterface.cpp, 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 + * + */ #include "StdInc.h" #include "windows/CAdvmapInterface.h" #include "battle/CBattleInterface.h" @@ -47,16 +56,6 @@ #include "../lib/UnlockGuard.h" #include -/* - * CPlayerInterface.cpp, 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 - * - */ - // The macro below is used to mark functions that are called by client when game state changes. // They all assume that CPlayerInterface::pim mutex is locked. diff --git a/client/CPlayerInterface.h b/client/CPlayerInterface.h index 4609d8387..9591bd2a3 100644 --- a/client/CPlayerInterface.h +++ b/client/CPlayerInterface.h @@ -1,3 +1,12 @@ +/* + * CPlayerInterface.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 @@ -17,16 +26,6 @@ #undef min #endif -/* - * CPlayerInterface.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 - * - */ - class CButton; class CToggleGroup; struct TryMoveHero; diff --git a/client/CPreGame.cpp b/client/CPreGame.cpp index 6f494c91e..1719bf16e 100644 --- a/client/CPreGame.cpp +++ b/client/CPreGame.cpp @@ -1,3 +1,12 @@ +/* + * CPreGame.cpp, 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 + * + */ #include "StdInc.h" #include "CPreGame.h" @@ -47,15 +56,6 @@ #include "../lib/CRandomGenerator.h" #include "../lib/CondSh.h" -/* - * CPreGame.cpp, 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 - * - */ namespace fs = boost::filesystem; void startGame(StartInfo * options, CConnection *serv = nullptr); diff --git a/client/CPreGame.h b/client/CPreGame.h index fa4c20948..b67e34256 100644 --- a/client/CPreGame.h +++ b/client/CPreGame.h @@ -1,11 +1,3 @@ -#pragma once - -#include "../lib/StartInfo.h" -#include "../lib/FunctionList.h" -#include "../lib/mapping/CMapInfo.h" -#include "../lib/rmg/CMapGenerator.h" -#include "windows/CWindowObject.h" - /* * CPreGame.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../lib/StartInfo.h" +#include "../lib/FunctionList.h" +#include "../lib/mapping/CMapInfo.h" +#include "../lib/rmg/CMapGenerator.h" +#include "windows/CWindowObject.h" class CMapInfo; class CMusicHandler; diff --git a/client/CVideoHandler.cpp b/client/CVideoHandler.cpp index aa5ffc911..189714020 100644 --- a/client/CVideoHandler.cpp +++ b/client/CVideoHandler.cpp @@ -1,3 +1,12 @@ +/* + * CVideoHandler.cpp, 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 + * + */ #include "StdInc.h" #include #include "CVideoHandler.h" diff --git a/client/CVideoHandler.h b/client/CVideoHandler.h index a52600125..1fba6aca6 100644 --- a/client/CVideoHandler.h +++ b/client/CVideoHandler.h @@ -1,3 +1,12 @@ +/* + * CVideoHandler.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 struct SDL_Surface; diff --git a/client/Client.cpp b/client/Client.cpp index 1b1c77173..886bb0c66 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -1,3 +1,12 @@ +/* + * Client.cpp, 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 + * + */ #include "StdInc.h" #include "Client.h" @@ -45,16 +54,6 @@ extern std::string NAME; #include "lib/CAndroidVMHelper.h" #endif -/* - * Client.cpp, 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 - * - */ - #ifdef VCMI_ANDROID std::atomic_bool androidTestServerReadyFlag; #endif diff --git a/client/Client.h b/client/Client.h index 4477dcace..ada3e3ff8 100644 --- a/client/Client.h +++ b/client/Client.h @@ -1,11 +1,3 @@ -#pragma once - - -#include "../lib/IGameCallback.h" -#include "../lib/battle/BattleAction.h" -#include "../lib/CStopWatch.h" -#include "../lib/int3.h" - /* * Client.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + + +#include "../lib/IGameCallback.h" +#include "../lib/battle/BattleAction.h" +#include "../lib/CStopWatch.h" +#include "../lib/int3.h" struct CPack; class CCampaignState; diff --git a/client/Graphics.cpp b/client/Graphics.cpp index bbbef6a22..0cee8068a 100644 --- a/client/Graphics.cpp +++ b/client/Graphics.cpp @@ -1,3 +1,12 @@ +/* + * Graphics.cpp, 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 + * + */ #include "StdInc.h" #include "Graphics.h" @@ -31,16 +40,6 @@ using namespace CSDL_Ext; #undef max #endif -/* - * Graphics.cpp, 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 - * - */ - Graphics * graphics = nullptr; void Graphics::loadPaletteAndColors() diff --git a/client/Graphics.h b/client/Graphics.h index e3f1dde11..ba6fa7bf8 100644 --- a/client/Graphics.h +++ b/client/Graphics.h @@ -1,9 +1,3 @@ -#pragma once - -#include "gui/Fonts.h" -#include "../lib/GameConstants.h" -#include "gui/Geometries.h" - /* * Graphics.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "gui/Fonts.h" +#include "../lib/GameConstants.h" +#include "gui/Geometries.h" struct SDL_Surface; class CGHeroInstance; diff --git a/client/NetPacksClient.cpp b/client/NetPacksClient.cpp index 907d4ac8f..80ec224cb 100644 --- a/client/NetPacksClient.cpp +++ b/client/NetPacksClient.cpp @@ -1,3 +1,12 @@ +/* + * NetPacksClient.cpp, 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 + * + */ #include "StdInc.h" #include "../lib/NetPacks.h" @@ -101,15 +110,6 @@ CALL_ONLY_THAT_BATTLE_INTERFACE(PlayerColor::SPECTATOR, function, __VA_ARGS__) \ } \ BATTLE_INTERFACE_CALL_RECEIVERS(function, __VA_ARGS__) -/* - * NetPacksClient.cpp, 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 - * - */ void SetResources::applyCl(CClient *cl) { diff --git a/client/SDLRWwrapper.h b/client/SDLRWwrapper.h index 1ed37ccf8..ab1152a32 100644 --- a/client/SDLRWwrapper.h +++ b/client/SDLRWwrapper.h @@ -1,5 +1,3 @@ -#pragma once - /* * SDLRWwrapper.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once struct SDL_RWops; class CInputStream; diff --git a/client/battle/CBattleAnimations.cpp b/client/battle/CBattleAnimations.cpp index f4e7eebfe..afcb2a341 100644 --- a/client/battle/CBattleAnimations.cpp +++ b/client/battle/CBattleAnimations.cpp @@ -1,3 +1,12 @@ +/* + * CBattleAnimations.cpp, 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 + * + */ #include "StdInc.h" #include "CBattleAnimations.h" @@ -22,16 +31,6 @@ #include "../../lib/mapObjects/CGTownInstance.h" #include "../../lib/spells/CSpellHandler.h" -/* - * CBattleAnimations.cpp, 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 - * - */ - CBattleAnimation::CBattleAnimation(CBattleInterface * _owner) : owner(_owner), ID(_owner->animIDhelper++) { diff --git a/client/battle/CBattleAnimations.h b/client/battle/CBattleAnimations.h index 424610c3b..98232d84f 100644 --- a/client/battle/CBattleAnimations.h +++ b/client/battle/CBattleAnimations.h @@ -1,3 +1,12 @@ +/* + * CBattleAnimations.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 #include "../../lib/battle/BattleHex.h" @@ -9,16 +18,6 @@ class CCreatureAnimation; struct CatapultProjectileInfo; struct StackAttackedInfo; -/* - * CBattleAnimations.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 - * - */ - /// Base class of battle animations class CBattleAnimation { diff --git a/client/battle/CBattleInterface.cpp b/client/battle/CBattleInterface.cpp index cf712a61d..a47150915 100644 --- a/client/battle/CBattleInterface.cpp +++ b/client/battle/CBattleInterface.cpp @@ -1,3 +1,12 @@ +/* + * CBattleInterface.cpp, 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 + * + */ #include "StdInc.h" #include "CBattleInterface.h" @@ -35,17 +44,6 @@ #include "../../lib/NetPacks.h" #include "../../lib/UnlockGuard.h" - -/* - * CBattleInterface.cpp, 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 - * - */ - CondSh CBattleInterface::animsAreDisplayed(false); CondSh CBattleInterface::givenCommand(nullptr); diff --git a/client/battle/CBattleInterface.h b/client/battle/CBattleInterface.h index 18c44fa04..ababbecfb 100644 --- a/client/battle/CBattleInterface.h +++ b/client/battle/CBattleInterface.h @@ -1,12 +1,3 @@ -#pragma once - -#include "../../lib/ConstTransitivePtr.h" //may be reundant -#include "../../lib/GameConstants.h" - -#include "CBattleAnimations.h" - -#include "../../lib/spells/CSpellHandler.h" //CSpell::TAnimation - /* * CBattleInterface.h, part of VCMI engine * @@ -16,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../../lib/ConstTransitivePtr.h" //may be reundant +#include "../../lib/GameConstants.h" + +#include "CBattleAnimations.h" + +#include "../../lib/spells/CSpellHandler.h" //CSpell::TAnimation class CLabel; class CCreatureSet; diff --git a/client/battle/CBattleInterfaceClasses.cpp b/client/battle/CBattleInterfaceClasses.cpp index e2edc5f8b..8cee5a70d 100644 --- a/client/battle/CBattleInterfaceClasses.cpp +++ b/client/battle/CBattleInterfaceClasses.cpp @@ -1,3 +1,12 @@ +/* + * CBattleInterfaceClasses.cpp, 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 + * + */ #include "StdInc.h" #include "CBattleInterfaceClasses.h" @@ -31,16 +40,6 @@ #include "../../lib/CondSh.h" #include "../../lib/mapObjects/CGTownInstance.h" -/* - * CBattleInterfaceClasses.cpp, 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 - * - */ - void CBattleConsole::showAll(SDL_Surface * to) { Point textPos(pos.x + pos.w/2, pos.y + 17); diff --git a/client/battle/CBattleInterfaceClasses.h b/client/battle/CBattleInterfaceClasses.h index 2fc64631d..dc785a54b 100644 --- a/client/battle/CBattleInterfaceClasses.h +++ b/client/battle/CBattleInterfaceClasses.h @@ -1,3 +1,12 @@ +/* + * CBattleInterfaceClasses.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 #include "../gui/CIntObject.h" @@ -18,16 +27,6 @@ class CStack; class CAnimImage; class CPlayerInterface; -/* - * CBattleInterfaceClasses.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 - * - */ - /// Class which shows the console at the bottom of the battle screen and manages the text of the console class CBattleConsole : public CIntObject { diff --git a/client/battle/CCreatureAnimation.cpp b/client/battle/CCreatureAnimation.cpp index f9c71aa4f..a03ba1dfd 100644 --- a/client/battle/CCreatureAnimation.cpp +++ b/client/battle/CCreatureAnimation.cpp @@ -1,3 +1,12 @@ +/* + * CCreatureAnimation.cpp, 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 + * + */ #include "StdInc.h" #include "CCreatureAnimation.h" @@ -10,16 +19,6 @@ #include "../gui/SDL_Pixels.h" -/* - * CCreatureAnimation.cpp, 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 - * - */ - static const SDL_Color creatureBlueBorder = { 0, 255, 255, 255 }; static const SDL_Color creatureGoldBorder = { 255, 255, 0, 255 }; static const SDL_Color creatureNoBorder = { 0, 0, 0, 0 }; diff --git a/client/battle/CCreatureAnimation.h b/client/battle/CCreatureAnimation.h index e37d00e66..81b5d0be5 100644 --- a/client/battle/CCreatureAnimation.h +++ b/client/battle/CCreatureAnimation.h @@ -1,9 +1,3 @@ -#pragma once - -#include "../../lib/FunctionList.h" -#include "../gui/SDL_Extensions.h" -#include "../widgets/Images.h" - /* * CCreatureAnimation.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../../lib/FunctionList.h" +#include "../gui/SDL_Extensions.h" +#include "../widgets/Images.h" class CIntObject; class CCreatureAnimation; diff --git a/client/gui/CAnimation.cpp b/client/gui/CAnimation.cpp index 350f01113..544510369 100644 --- a/client/gui/CAnimation.cpp +++ b/client/gui/CAnimation.cpp @@ -1,3 +1,12 @@ +/* + * CAnimation.cpp, 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 + * + */ #include "StdInc.h" #include "CAnimation.h" @@ -13,16 +22,6 @@ #include "../lib/JsonNode.h" #include "../lib/CRandomGenerator.h" -/* - * CAnimation.cpp, 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 - * - */ - class SDLImageLoader; class CompImageLoader; diff --git a/client/gui/CAnimation.h b/client/gui/CAnimation.h index 83a7be91f..319094be5 100644 --- a/client/gui/CAnimation.h +++ b/client/gui/CAnimation.h @@ -1,9 +1,3 @@ -#pragma once - -#include "../../lib/vcmi_endian.h" -#include "Geometries.h" -#include "../../lib/GameConstants.h" - /* * CAnimation.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../../lib/vcmi_endian.h" +#include "Geometries.h" +#include "../../lib/GameConstants.h" struct SDL_Surface; class JsonNode; diff --git a/client/gui/CCursorHandler.cpp b/client/gui/CCursorHandler.cpp index 96b2bb377..71b68c230 100644 --- a/client/gui/CCursorHandler.cpp +++ b/client/gui/CCursorHandler.cpp @@ -1,3 +1,12 @@ +/* + * CCursorHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CCursorHandler.h" @@ -9,16 +18,6 @@ #include "../CMT.h" -/* - * CCursorHandler.cpp, 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 - * - */ - void CCursorHandler::initCursor() { xpos = ypos = 0; diff --git a/client/gui/CCursorHandler.h b/client/gui/CCursorHandler.h index 907071eeb..b61889fab 100644 --- a/client/gui/CCursorHandler.h +++ b/client/gui/CCursorHandler.h @@ -1,10 +1,5 @@ -#pragma once - -class CAnimImage; -struct SDL_Surface; - /* - * CCursorhandler.h, part of VCMI engine + * CCursorHandler.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * @@ -12,6 +7,10 @@ struct SDL_Surface; * Full text of license available in license.txt file, in main folder * */ +#pragma once + +class CAnimImage; +struct SDL_Surface; namespace ECursor { diff --git a/client/gui/CGuiHandler.cpp b/client/gui/CGuiHandler.cpp index 3a1b73982..4b8486a90 100644 --- a/client/gui/CGuiHandler.cpp +++ b/client/gui/CGuiHandler.cpp @@ -1,3 +1,12 @@ +/* + * CGuiHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CGuiHandler.h" #include "../lib/CondSh.h" diff --git a/client/gui/CGuiHandler.h b/client/gui/CGuiHandler.h index 9a10d24eb..9bfdd587d 100644 --- a/client/gui/CGuiHandler.h +++ b/client/gui/CGuiHandler.h @@ -1,3 +1,12 @@ +/* + * CGuiHandler.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 //#include "../../lib/CStopWatch.h" @@ -13,16 +22,6 @@ class IShowable; enum class EIntObjMouseBtnType; template struct CondSh; -/* - * CGuiHandler.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 - * - */ - // A fps manager which holds game updates at a constant rate class CFramerateManager { diff --git a/client/gui/CIntObject.cpp b/client/gui/CIntObject.cpp index 40e7c281f..6cf8ed508 100644 --- a/client/gui/CIntObject.cpp +++ b/client/gui/CIntObject.cpp @@ -1,3 +1,12 @@ +/* + * CIntObject.cpp, 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 + * + */ #include "StdInc.h" #include "CIntObject.h" diff --git a/client/gui/CIntObject.h b/client/gui/CIntObject.h index 31f479738..0dc943844 100644 --- a/client/gui/CIntObject.h +++ b/client/gui/CIntObject.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include diff --git a/client/gui/Fonts.cpp b/client/gui/Fonts.cpp index af02247f8..9b8c0f648 100644 --- a/client/gui/Fonts.cpp +++ b/client/gui/Fonts.cpp @@ -1,3 +1,12 @@ +/* + * Fonts.cpp, 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 + * + */ #include "StdInc.h" #include "Fonts.h" @@ -9,16 +18,6 @@ #include "../../lib/filesystem/Filesystem.h" #include "../../lib/CGeneralTextHandler.h" -/* - * Fonts.cpp, 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 - * - */ - size_t IFont::getStringWidth(const std::string & data) const { size_t width = 0; diff --git a/client/gui/Fonts.h b/client/gui/Fonts.h index 52aea4824..f471e8967 100644 --- a/client/gui/Fonts.h +++ b/client/gui/Fonts.h @@ -1,5 +1,3 @@ -#pragma once - /* * Fonts.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once class JsonNode; diff --git a/client/gui/Geometries.cpp b/client/gui/Geometries.cpp index 367d9aac4..7af72fc0a 100644 --- a/client/gui/Geometries.cpp +++ b/client/gui/Geometries.cpp @@ -1,3 +1,12 @@ +/* + * Geometries.cpp, 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 + * + */ #include "StdInc.h" #include "Geometries.h" #include "../CMT.h" diff --git a/client/gui/Geometries.h b/client/gui/Geometries.h index c6ee4df7a..eeba77e07 100644 --- a/client/gui/Geometries.h +++ b/client/gui/Geometries.h @@ -1,8 +1,3 @@ -#pragma once - -#include -#include "../../lib/int3.h" - /* * Geometries.h, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include +#include "../../lib/int3.h" struct SDL_MouseMotionEvent; diff --git a/client/gui/SDL_Compat.h b/client/gui/SDL_Compat.h index 13b428fd4..79c7d37d2 100644 --- a/client/gui/SDL_Compat.h +++ b/client/gui/SDL_Compat.h @@ -1,5 +1,3 @@ -#pragma once - /* * SDL_Compat.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include diff --git a/client/gui/SDL_Extensions.cpp b/client/gui/SDL_Extensions.cpp index 8ffb9a42d..9781d6149 100644 --- a/client/gui/SDL_Extensions.cpp +++ b/client/gui/SDL_Extensions.cpp @@ -1,3 +1,12 @@ +/* + * SDL_Extensions.cpp, 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 + * + */ #include "StdInc.h" #include "SDL_Extensions.h" #include "SDL_Pixels.h" diff --git a/client/gui/SDL_Extensions.h b/client/gui/SDL_Extensions.h index 65ee73efd..623b68df5 100644 --- a/client/gui/SDL_Extensions.h +++ b/client/gui/SDL_Extensions.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include #include diff --git a/client/gui/SDL_Pixels.h b/client/gui/SDL_Pixels.h index d34df7a58..9a0d3de7a 100644 --- a/client/gui/SDL_Pixels.h +++ b/client/gui/SDL_Pixels.h @@ -1,9 +1,3 @@ -#pragma once - -#include - -#include "SDL_Extensions.h" - /* * SDL_Pixels.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include + +#include "SDL_Extensions.h" // for accessing channels from pixel in format-independent way //should be as fast as accessing via pointer at least for 3-4 bytes per pixel diff --git a/client/mapHandler.h b/client/mapHandler.h index 635c53ea3..f979c1e86 100644 --- a/client/mapHandler.h +++ b/client/mapHandler.h @@ -1,11 +1,3 @@ -#pragma once - - -#include "../lib/int3.h" -#include "../lib/spells/ViewSpellInt.h" -#include "gui/Geometries.h" -#include "SDL.h" - /* * mapHandler.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + + +#include "../lib/int3.h" +#include "../lib/spells/ViewSpellInt.h" +#include "gui/Geometries.h" +#include "SDL.h" class CGObjectInstance; class CGHeroInstance; diff --git a/client/widgets/AdventureMapClasses.cpp b/client/widgets/AdventureMapClasses.cpp index 12019ad92..db76a3a89 100644 --- a/client/widgets/AdventureMapClasses.cpp +++ b/client/widgets/AdventureMapClasses.cpp @@ -1,3 +1,12 @@ +/* + * AdventureMapClasses.cpp, 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 + * + */ #include "StdInc.h" #include "AdventureMapClasses.h" @@ -39,16 +48,6 @@ #include "../../lib/NetPacksBase.h" #include "../../lib/StringConstants.h" -/* - * CAdventureMapClasses.cpp, 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 - * - */ - CList::CListItem::CListItem(CList * Parent): CIntObject(LCLICK | RCLICK | HOVER), parent(Parent), diff --git a/client/widgets/AdventureMapClasses.h b/client/widgets/AdventureMapClasses.h index 7184ee99d..9ebe4f243 100644 --- a/client/widgets/AdventureMapClasses.h +++ b/client/widgets/AdventureMapClasses.h @@ -1,3 +1,12 @@ +/* + * AdventureMapClasses.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 #include "ObjectLists.h" @@ -17,16 +26,6 @@ struct InfoAboutArmy; struct InfoAboutHero; struct InfoAboutTown; -/* - * CAdventureMapClasses.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 - * - */ - /// Base UI Element for hero\town lists class CList : public CIntObject { diff --git a/client/widgets/Buttons.cpp b/client/widgets/Buttons.cpp index 7abc4a5c5..f727cacda 100644 --- a/client/widgets/Buttons.cpp +++ b/client/widgets/Buttons.cpp @@ -1,3 +1,12 @@ +/* + * Buttons.cpp, 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 + * + */ #include "StdInc.h" #include "Buttons.h" @@ -14,17 +23,6 @@ #include "../windows/InfoWindows.h" #include "../../lib/CConfigHandler.h" -/* - * Buttons.cpp, 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 - * - */ - - void CButton::update() { if (overlay) diff --git a/client/widgets/Buttons.h b/client/widgets/Buttons.h index e068f311e..c4d745711 100644 --- a/client/widgets/Buttons.h +++ b/client/widgets/Buttons.h @@ -1,3 +1,12 @@ +/* + * Buttons.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 #include "../gui/CIntObject.h" @@ -16,16 +25,6 @@ namespace config struct ButtonInfo; } -/* - * Buttons.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 - * - */ - /// Typical Heroes 3 button which can be inactive or active and can /// hold further information if you right-click it class CButton : public CKeyShortcut diff --git a/client/widgets/CArtifactHolder.cpp b/client/widgets/CArtifactHolder.cpp index aed3251ee..680bebe75 100644 --- a/client/widgets/CArtifactHolder.cpp +++ b/client/widgets/CArtifactHolder.cpp @@ -1,3 +1,12 @@ +/* + * CArtifactHolder.cpp, 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 + * + */ #include "StdInc.h" #include "CArtifactHolder.h" @@ -21,16 +30,6 @@ #include "../../lib/mapObjects/CGHeroInstance.h" -/* - * CArtifactHolder.cpp, 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 - * - */ - CHeroArtPlace::CHeroArtPlace(Point position, const CArtifactInstance * Art): CArtPlace(position, Art), locked(false), picked(false), marked(false), ourOwner(nullptr) { diff --git a/client/widgets/CArtifactHolder.h b/client/widgets/CArtifactHolder.h index 4c62a0e34..23d47ccbc 100644 --- a/client/widgets/CArtifactHolder.h +++ b/client/widgets/CArtifactHolder.h @@ -1,8 +1,3 @@ -#pragma once - -//#include "CComponent.h" -#include "MiscWidgets.h" - /* * CArtifactHolder.h, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +//#include "CComponent.h" +#include "MiscWidgets.h" class CArtifactsOfHero; class CAnimImage; diff --git a/client/widgets/CComponent.cpp b/client/widgets/CComponent.cpp index e841f830c..27a2690b5 100644 --- a/client/widgets/CComponent.cpp +++ b/client/widgets/CComponent.cpp @@ -1,3 +1,12 @@ +/* + * CComponent.cpp, 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 + * + */ #include "StdInc.h" #include "CComponent.h" @@ -17,16 +26,6 @@ #include "../../lib/CGeneralTextHandler.h" #include "../../lib/NetPacksBase.h" -/* - * CComponent.cpp, 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 - * - */ - CComponent::CComponent(Etype Type, int Subtype, int Val, ESize imageSize): image(nullptr), perDay(false) diff --git a/client/widgets/CComponent.h b/client/widgets/CComponent.h index 315fa9cbe..7bb24dac4 100644 --- a/client/widgets/CComponent.h +++ b/client/widgets/CComponent.h @@ -1,7 +1,3 @@ -#pragma once - -#include "../gui/CIntObject.h" - /* * CComponent.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../gui/CIntObject.h" struct Component; class CAnimImage; diff --git a/client/widgets/CGarrisonInt.cpp b/client/widgets/CGarrisonInt.cpp index a99e62983..43ccd19cd 100644 --- a/client/widgets/CGarrisonInt.cpp +++ b/client/widgets/CGarrisonInt.cpp @@ -1,3 +1,12 @@ +/* + * CGarrisonInt.cpp, 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 + * + */ #include "StdInc.h" #include "CGarrisonInt.h" @@ -18,16 +27,6 @@ #include "../../lib/CGameState.h" -/* - * CGarrisonInt.cpp, 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 - * - */ - void CGarrisonSlot::setHighlight(bool on) { if (on) diff --git a/client/widgets/CGarrisonInt.h b/client/widgets/CGarrisonInt.h index f74c4c3f5..5bf3970db 100644 --- a/client/widgets/CGarrisonInt.h +++ b/client/widgets/CGarrisonInt.h @@ -1,7 +1,3 @@ -#pragma once - -#include "../windows/CWindowObject.h" - /* * CGarrisonInt.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../windows/CWindowObject.h" class CGarrisonInt; class CButton; diff --git a/client/widgets/Images.cpp b/client/widgets/Images.cpp index 10af59c2d..bb53caecf 100644 --- a/client/widgets/Images.cpp +++ b/client/widgets/Images.cpp @@ -1,3 +1,12 @@ +/* + * Images.cpp, 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 + * + */ #include "StdInc.h" #include "Images.h" @@ -25,16 +34,6 @@ #include "../../lib/CGeneralTextHandler.h" //for Unicode related stuff #include "../../lib/CRandomGenerator.h" -/* - * Images.cpp, 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 - * - */ - CPicture::CPicture( SDL_Surface *BG, int x, int y, bool Free ) { init(); diff --git a/client/widgets/Images.h b/client/widgets/Images.h index ce8f54eb9..d0fe57e22 100644 --- a/client/widgets/Images.h +++ b/client/widgets/Images.h @@ -1,3 +1,12 @@ +/* + * Images.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 #include "../gui/CIntObject.h" @@ -9,16 +18,6 @@ class CAnimImage; class CLabel; class CAnimation; -/* - * Images.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 - * - */ - // Image class class CPicture : public CIntObject { diff --git a/client/widgets/MiscWidgets.cpp b/client/widgets/MiscWidgets.cpp index e4879212f..717a43182 100644 --- a/client/widgets/MiscWidgets.cpp +++ b/client/widgets/MiscWidgets.cpp @@ -1,3 +1,12 @@ +/* + * MiscWidgets.cpp, 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 + * + */ #include "StdInc.h" #include "MiscWidgets.h" @@ -22,16 +31,6 @@ #include "../../lib/CModHandler.h" #include "../../lib/CGameState.h" -/* - * MiscWidgets.cpp, 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 - * - */ - void CHoverableArea::hover (bool on) { if (on) diff --git a/client/widgets/MiscWidgets.h b/client/widgets/MiscWidgets.h index 5c923813a..12b82b6d9 100644 --- a/client/widgets/MiscWidgets.h +++ b/client/widgets/MiscWidgets.h @@ -1,7 +1,3 @@ -#pragma once - -#include "../gui/CIntObject.h" - /* * MiscWidgets.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../gui/CIntObject.h" class CLabel; class CCreatureAnim; diff --git a/client/widgets/ObjectLists.cpp b/client/widgets/ObjectLists.cpp index 5c65f0006..7b65aff0f 100644 --- a/client/widgets/ObjectLists.cpp +++ b/client/widgets/ObjectLists.cpp @@ -1,9 +1,3 @@ -#include "StdInc.h" -#include "ObjectLists.h" - -#include "../gui/CGuiHandler.h" -#include "Buttons.h" - /* * ObjectLists.cpp, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "ObjectLists.h" + +#include "../gui/CGuiHandler.h" +#include "Buttons.h" static void intDeleter(CIntObject* object) diff --git a/client/widgets/ObjectLists.h b/client/widgets/ObjectLists.h index 541efcfad..9b42fa36d 100644 --- a/client/widgets/ObjectLists.h +++ b/client/widgets/ObjectLists.h @@ -1,3 +1,12 @@ +/* + * ObjectLists.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 #include "../gui/CIntObject.h" @@ -9,16 +18,6 @@ class CSlider; class CLabel; class CAnimation; -/* - * ObjectLists.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 - * - */ - /// Used as base for Tabs and List classes class CObjectList : public CIntObject { diff --git a/client/widgets/TextControls.cpp b/client/widgets/TextControls.cpp index 8ad538c94..f22241ae2 100644 --- a/client/widgets/TextControls.cpp +++ b/client/widgets/TextControls.cpp @@ -1,3 +1,12 @@ +/* + * TextControls.cpp, 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 + * + */ #include "StdInc.h" #include "TextControls.h" @@ -9,16 +18,6 @@ #include "../../lib/CGeneralTextHandler.h" //for Unicode related stuff -/* - * TextControls.cpp, 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 - * - */ - std::string CLabel::visibleText() { return text; diff --git a/client/widgets/TextControls.h b/client/widgets/TextControls.h index ae1c59072..8ab5a271d 100644 --- a/client/widgets/TextControls.h +++ b/client/widgets/TextControls.h @@ -1,9 +1,3 @@ -#pragma once - -#include "../gui/CIntObject.h" -#include "../gui/SDL_Extensions.h" -#include "../../lib/FunctionList.h" - /* * TextControls.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../gui/CIntObject.h" +#include "../gui/SDL_Extensions.h" +#include "../../lib/FunctionList.h" class CSlider; diff --git a/client/windows/CAdvmapInterface.cpp b/client/windows/CAdvmapInterface.cpp index 131e510e2..b181bc002 100644 --- a/client/windows/CAdvmapInterface.cpp +++ b/client/windows/CAdvmapInterface.cpp @@ -1,3 +1,12 @@ +/* + * CAdvmapInterface.cpp, 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 + * + */ #include "StdInc.h" #include "CAdvmapInterface.h" @@ -43,16 +52,6 @@ #pragma warning (disable : 4355) #endif -/* - * CAdvMapInterface.cpp, 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 - * - */ - #define ADVOPT (conf.go()->ac) using namespace CSDL_Ext; diff --git a/client/windows/CAdvmapInterface.h b/client/windows/CAdvmapInterface.h index fca0b3da1..13b766b2e 100644 --- a/client/windows/CAdvmapInterface.h +++ b/client/windows/CAdvmapInterface.h @@ -1,3 +1,12 @@ +/* + * CAdvmapInterface.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 #include "../widgets/AdventureMapClasses.h" @@ -23,16 +32,6 @@ struct MapDrawingInfo; /*****************************/ -/* - * CAdvmapInterface.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 - * - */ - enum class EAdvMapMode { NORMAL, diff --git a/client/windows/CCastleInterface.cpp b/client/windows/CCastleInterface.cpp index 28fd8e6bc..863492ea2 100644 --- a/client/windows/CCastleInterface.cpp +++ b/client/windows/CCastleInterface.cpp @@ -1,3 +1,12 @@ +/* + * CCastleInterface.cpp, 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 + * + */ #include "StdInc.h" #include "CCastleInterface.h" @@ -31,16 +40,6 @@ #include "../../lib/mapObjects/CGHeroInstance.h" #include "../../lib/mapObjects/CGTownInstance.h" -/* - * CCastleInterface.cpp, 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 - * - */ - const CBuilding * CBuildingRect::getBuilding() { if (!str->building) diff --git a/client/windows/CCastleInterface.h b/client/windows/CCastleInterface.h index 976e14063..045546b04 100644 --- a/client/windows/CCastleInterface.h +++ b/client/windows/CCastleInterface.h @@ -1,3 +1,12 @@ +/* + * CCastleInterface.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 #include "../widgets/CGarrisonInt.h" @@ -21,17 +30,6 @@ class CGHeroInstance; class CGarrisonInt; class CCreature; -/* - * CCastleInterface.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 - * - */ - - /// Building "button" class CBuildingRect : public CShowableAnim { diff --git a/client/windows/CCreatureWindow.cpp b/client/windows/CCreatureWindow.cpp index 4051c8ab1..4e028f17f 100644 --- a/client/windows/CCreatureWindow.cpp +++ b/client/windows/CCreatureWindow.cpp @@ -1,3 +1,12 @@ +/* + * CCreatureWindow.cpp, 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 + * + */ #include "StdInc.h" #include "CCreatureWindow.h" @@ -25,16 +34,6 @@ using namespace CSDL_Ext; class CCreatureArtifactInstance; class CSelectableSkill; -/* - * CCreatureWindow.cpp, 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 - * - */ - struct StackWindowInfo { // helper structs diff --git a/client/windows/CCreatureWindow.h b/client/windows/CCreatureWindow.h index 6adf4488d..a647ab9ed 100644 --- a/client/windows/CCreatureWindow.h +++ b/client/windows/CCreatureWindow.h @@ -1,9 +1,3 @@ -#pragma once - -#include "../../lib/HeroBonus.h" -#include "../widgets/MiscWidgets.h" -#include "CWindowObject.h" - /* * CCreatureWindow.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../../lib/HeroBonus.h" +#include "../widgets/MiscWidgets.h" +#include "CWindowObject.h" struct StackWindowInfo; class CCommanderInstance; diff --git a/client/windows/CHeroWindow.cpp b/client/windows/CHeroWindow.cpp index 802706495..e7a960ef6 100644 --- a/client/windows/CHeroWindow.cpp +++ b/client/windows/CHeroWindow.cpp @@ -1,3 +1,12 @@ +/* + * CHeroWindow.cpp, 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 + * + */ #include "StdInc.h" #include "CHeroWindow.h" @@ -28,16 +37,6 @@ #include "../lib/NetPacksBase.h" #include "../mapHandler.h" -/* - * CHeroWindow.cpp, 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 - * - */ - const TBonusListPtr CHeroWithMaybePickedArtifact::getAllBonuses(const CSelector &selector, const CSelector &limit, const CBonusSystemNode *root /*= nullptr*/, const std::string &cachingStr /*= ""*/) const { diff --git a/client/windows/CHeroWindow.h b/client/windows/CHeroWindow.h index 8e27a2c35..98fcb0f1c 100644 --- a/client/windows/CHeroWindow.h +++ b/client/windows/CHeroWindow.h @@ -1,9 +1,3 @@ -#pragma once - -#include "../../lib/HeroBonus.h" -#include "../widgets/CArtifactHolder.h" -#include "../widgets/CGarrisonInt.h" - /* * CHeroWindow.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../../lib/HeroBonus.h" +#include "../widgets/CArtifactHolder.h" +#include "../widgets/CGarrisonInt.h" class CButton; struct SDL_Surface; diff --git a/client/windows/CKingdomInterface.cpp b/client/windows/CKingdomInterface.cpp index 4a979bd0b..f4a7c98e0 100644 --- a/client/windows/CKingdomInterface.cpp +++ b/client/windows/CKingdomInterface.cpp @@ -1,3 +1,12 @@ +/* + * CKingdomInterface.cpp, 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 + * + */ #include "StdInc.h" #include "CKingdomInterface.h" @@ -24,16 +33,6 @@ #include "../../lib/mapObjects/CGTownInstance.h" #include "../../lib/mapObjects/MiscObjects.h" -/* - * CKingdomInterface.cpp, 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 - * - */ - InfoBox::InfoBox(Point position, InfoPos Pos, InfoSize Size, IInfoBoxData *Data): size(Size), infoPos(Pos), diff --git a/client/windows/CKingdomInterface.h b/client/windows/CKingdomInterface.h index e6b31966b..147300256 100644 --- a/client/windows/CKingdomInterface.h +++ b/client/windows/CKingdomInterface.h @@ -1,3 +1,12 @@ +/* + * CKingdomInterface.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 #include "../widgets/CArtifactHolder.h" @@ -19,16 +28,6 @@ class CListBox; class CTabbedInt; class CGStatusBar; -/* - * CKingdomInterface.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 - * - */ - class CKingdHeroList; class CKingdTownList; class IInfoBoxData; diff --git a/client/windows/CQuestLog.cpp b/client/windows/CQuestLog.cpp index 152032456..9bcef154d 100644 --- a/client/windows/CQuestLog.cpp +++ b/client/windows/CQuestLog.cpp @@ -1,3 +1,12 @@ +/* + * CQuestLog.cpp, 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 + * + */ #include "StdInc.h" #include "CQuestLog.h" @@ -19,15 +28,6 @@ #include "../../lib/CGeneralTextHandler.h" #include "../../lib/NetPacksBase.h" #include "../../lib/mapObjects/CQuest.h" -/* - * CQuestLog.cpp, 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 - * - */ struct QuestInfo; class CAdvmapInterface; diff --git a/client/windows/CQuestLog.h b/client/windows/CQuestLog.h index e8e24ffa3..45e72b499 100644 --- a/client/windows/CQuestLog.h +++ b/client/windows/CQuestLog.h @@ -1,11 +1,3 @@ -#pragma once - -#include "../widgets/AdventureMapClasses.h" -#include "../widgets/TextControls.h" -#include "../widgets/MiscWidgets.h" -#include "../widgets/Images.h" -#include "CWindowObject.h" - /* * CQuestLog.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../widgets/AdventureMapClasses.h" +#include "../widgets/TextControls.h" +#include "../widgets/MiscWidgets.h" +#include "../widgets/Images.h" +#include "CWindowObject.h" class CCreature; class CStackInstance; diff --git a/client/windows/CSpellWindow.cpp b/client/windows/CSpellWindow.cpp index 155679b07..6e7f8ee0e 100644 --- a/client/windows/CSpellWindow.cpp +++ b/client/windows/CSpellWindow.cpp @@ -1,3 +1,12 @@ +/* + * CSpellWindow.cpp, 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 + * + */ #include "StdInc.h" #include "CSpellWindow.h" @@ -34,16 +43,6 @@ #include "../../lib/CGameState.h" #include "../../lib/mapObjects/CGTownInstance.h" -/* - * CSpellWindow.cpp, 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 - * - */ - CSpellWindow::InteractiveArea::InteractiveArea(const SDL_Rect & myRect, std::function funcL, int helpTextId, CSpellWindow * _owner) { addUsedEvents(LCLICK | RCLICK | HOVER); diff --git a/client/windows/CSpellWindow.h b/client/windows/CSpellWindow.h index 563b17176..d71703150 100644 --- a/client/windows/CSpellWindow.h +++ b/client/windows/CSpellWindow.h @@ -1,7 +1,3 @@ -#pragma once - -#include "CWindowObject.h" - /* * CSpellWindow.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CWindowObject.h" struct SDL_Surface; struct SDL_Rect; diff --git a/client/windows/CTradeWindow.cpp b/client/windows/CTradeWindow.cpp index 87f7d15a5..e25ec360f 100644 --- a/client/windows/CTradeWindow.cpp +++ b/client/windows/CTradeWindow.cpp @@ -1,3 +1,12 @@ +/* + * CTradeWindow.cpp, 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 + * + */ #include "StdInc.h" #include "CTradeWindow.h" @@ -22,17 +31,6 @@ #include "../../lib/mapObjects/CGTownInstance.h" #include "../../lib/mapObjects/CGMarket.h" - -/* - * CTradeWindow.cpp, 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 - * - */ - CTradeWindow::CTradeableItem::CTradeableItem(Point pos, EType Type, int ID, bool Left, int Serial): CIntObject(LCLICK | HOVER | RCLICK, pos), type(EType(-1)),// set to invalid, will be corrected in setType diff --git a/client/windows/CTradeWindow.h b/client/windows/CTradeWindow.h index c8127ffe8..966c9b8d4 100644 --- a/client/windows/CTradeWindow.h +++ b/client/windows/CTradeWindow.h @@ -1,9 +1,3 @@ -#pragma once - -#include "../widgets/CArtifactHolder.h" -#include "CWindowObject.h" -#include "../../lib/FunctionList.h" - /* * CTradeWindow.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../widgets/CArtifactHolder.h" +#include "CWindowObject.h" +#include "../../lib/FunctionList.h" class IMarket; class CSlider; diff --git a/client/windows/CWindowObject.cpp b/client/windows/CWindowObject.cpp index 05c2489d4..95e59f391 100644 --- a/client/windows/CWindowObject.cpp +++ b/client/windows/CWindowObject.cpp @@ -1,3 +1,12 @@ +/* + * CWindowObject.cpp, 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 + * + */ #include "StdInc.h" #include "CWindowObject.h" @@ -24,16 +33,6 @@ #include "../../lib/CConfigHandler.h" #include "../../lib/CGeneralTextHandler.h" //for Unicode related stuff -/* - * CWindowObject.cpp, 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 - * - */ - CWindowObject::CWindowObject(int options_, std::string imageName, Point centerAt): CIntObject(getUsedEvents(options_), Point()), shadow(nullptr), diff --git a/client/windows/CWindowObject.h b/client/windows/CWindowObject.h index e2a7499dc..423a8cff3 100644 --- a/client/windows/CWindowObject.h +++ b/client/windows/CWindowObject.h @@ -1,7 +1,3 @@ -#pragma once - -#include "../gui/CIntObject.h" - /* * CWindowObject.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../gui/CIntObject.h" /// Basic class for windows class CWindowObject : public CIntObject diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index 23ee97b9c..bd0b0dd35 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -1,3 +1,12 @@ +/* + * GUIClasses.cpp, 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 + * + */ #include "StdInc.h" #include "GUIClasses.h" @@ -49,16 +58,6 @@ #include "../lib/NetPacksBase.h" #include "../lib/StartInfo.h" -/* - * GUIClasses.cpp, 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 - * - */ - using namespace CSDL_Ext; std::list CFocusable::focusables; diff --git a/client/windows/GUIClasses.h b/client/windows/GUIClasses.h index 536fbca14..b72496df8 100644 --- a/client/windows/GUIClasses.h +++ b/client/windows/GUIClasses.h @@ -1,13 +1,3 @@ -#pragma once - -#include "../lib/GameConstants.h" -#include "../lib/ResourceSet.h" -#include "../lib/CConfigHandler.h" -#include "../widgets/CArtifactHolder.h" -#include "../widgets/CGarrisonInt.h" -#include "../widgets/Images.h" -#include "../windows/CWindowObject.h" - /* * GUIClasses.h, part of VCMI engine * @@ -17,6 +7,15 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../lib/GameConstants.h" +#include "../lib/ResourceSet.h" +#include "../lib/CConfigHandler.h" +#include "../widgets/CArtifactHolder.h" +#include "../widgets/CGarrisonInt.h" +#include "../widgets/Images.h" +#include "../windows/CWindowObject.h" class CGDwelling; class IMarket; diff --git a/client/windows/InfoWindows.cpp b/client/windows/InfoWindows.cpp index 108440df8..9f77e6a12 100644 --- a/client/windows/InfoWindows.cpp +++ b/client/windows/InfoWindows.cpp @@ -1,3 +1,12 @@ +/* + * InfoWindows.cpp, 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 + * + */ #include "StdInc.h" #include "InfoWindows.h" @@ -30,16 +39,6 @@ #include "../../lib/mapObjects/CGTownInstance.h" #include "../../lib/mapObjects/MiscObjects.h" -/* - * InfoWindows.cpp, 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 - * - */ - void CSimpleWindow::show(SDL_Surface * to) { if(bitmap) diff --git a/client/windows/InfoWindows.h b/client/windows/InfoWindows.h index f8be7451a..946e1e627 100644 --- a/client/windows/InfoWindows.h +++ b/client/windows/InfoWindows.h @@ -1,3 +1,12 @@ +/* + * InfoWindows.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 #include "CWindowObject.h" @@ -16,15 +25,6 @@ class CTextBox; class CButton; class CSlider; -/* - * InfoWindows.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 - * - */ // Window GUI class class CSimpleWindow : public CIntObject { diff --git a/launcher/jsonutils.cpp b/launcher/jsonutils.cpp index 24f252500..b55aea925 100644 --- a/launcher/jsonutils.cpp +++ b/launcher/jsonutils.cpp @@ -1,3 +1,12 @@ +/* + * jsonutils.cpp, 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 + * + */ #include "StdInc.h" #include "jsonutils.h" #include "../lib/filesystem/FileStream.h" diff --git a/launcher/jsonutils.h b/launcher/jsonutils.h index 81988e56a..9ebc10d5f 100644 --- a/launcher/jsonutils.h +++ b/launcher/jsonutils.h @@ -1,3 +1,12 @@ +/* + * jsonutils.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 #include @@ -10,4 +19,4 @@ namespace JsonUtils JsonNode toJson(QVariant object); void JsonToFile(QString filename, QVariant object); -} \ No newline at end of file +} diff --git a/launcher/launcherdirs.cpp b/launcher/launcherdirs.cpp index d7b3b453d..97d456bb5 100644 --- a/launcher/launcherdirs.cpp +++ b/launcher/launcherdirs.cpp @@ -1,3 +1,12 @@ +/* + * launcherdirs.cpp, 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 + * + */ #include "StdInc.h" #include "launcherdirs.h" diff --git a/launcher/launcherdirs.h b/launcher/launcherdirs.h index 2b692e039..9117bd9fb 100644 --- a/launcher/launcherdirs.h +++ b/launcher/launcherdirs.h @@ -1,3 +1,12 @@ +/* + * launcherdirs.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 /// similar to lib/VCMIDirs, controls where all launcher-related data will be stored diff --git a/launcher/main.cpp b/launcher/main.cpp index 157ac083e..9856178d9 100644 --- a/launcher/main.cpp +++ b/launcher/main.cpp @@ -1,3 +1,12 @@ +/* + * main.cpp, 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 + * + */ #include #include "StdInc.h" #include "mainwindow_moc.h" diff --git a/launcher/mainwindow_moc.cpp b/launcher/mainwindow_moc.cpp index 8ce3d99fa..e5794ac0f 100644 --- a/launcher/mainwindow_moc.cpp +++ b/launcher/mainwindow_moc.cpp @@ -1,3 +1,12 @@ +/* + * mainwindow_moc.cpp, 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 + * + */ #include "StdInc.h" #include "mainwindow_moc.h" #include "ui_mainwindow_moc.h" diff --git a/launcher/mainwindow_moc.h b/launcher/mainwindow_moc.h index f27b0ac2f..7a7220fff 100644 --- a/launcher/mainwindow_moc.h +++ b/launcher/mainwindow_moc.h @@ -1,3 +1,12 @@ +/* + * mainwindow_moc.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 #include #include diff --git a/launcher/modManager/cdownloadmanager_moc.cpp b/launcher/modManager/cdownloadmanager_moc.cpp index b25c42d7d..6886ca7cf 100644 --- a/launcher/modManager/cdownloadmanager_moc.cpp +++ b/launcher/modManager/cdownloadmanager_moc.cpp @@ -1,3 +1,12 @@ +/* + * cdownloadmanager_moc.cpp, 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 + * + */ #include "StdInc.h" #include "cdownloadmanager_moc.h" diff --git a/launcher/modManager/cdownloadmanager_moc.h b/launcher/modManager/cdownloadmanager_moc.h index 1f2cc4f7c..548820614 100644 --- a/launcher/modManager/cdownloadmanager_moc.h +++ b/launcher/modManager/cdownloadmanager_moc.h @@ -1,3 +1,12 @@ +/* + * cdownloadmanager_moc.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 #include diff --git a/launcher/modManager/cmodlist.cpp b/launcher/modManager/cmodlist.cpp index e5f71e131..d0e382336 100644 --- a/launcher/modManager/cmodlist.cpp +++ b/launcher/modManager/cmodlist.cpp @@ -1,3 +1,12 @@ +/* + * cmodlist.cpp, 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 + * + */ #include "StdInc.h" #include "cmodlist.h" diff --git a/launcher/modManager/cmodlist.h b/launcher/modManager/cmodlist.h index 9ce97bdd2..df088cfaf 100644 --- a/launcher/modManager/cmodlist.h +++ b/launcher/modManager/cmodlist.h @@ -1,3 +1,12 @@ +/* + * cmodlist.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 #include diff --git a/launcher/modManager/cmodlistmodel_moc.cpp b/launcher/modManager/cmodlistmodel_moc.cpp index 2712200d2..712309d84 100644 --- a/launcher/modManager/cmodlistmodel_moc.cpp +++ b/launcher/modManager/cmodlistmodel_moc.cpp @@ -1,3 +1,12 @@ +/* + * cmodlistmodel_moc.cpp, 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 + * + */ #include "StdInc.h" #include "cmodlistmodel_moc.h" diff --git a/launcher/modManager/cmodlistmodel_moc.h b/launcher/modManager/cmodlistmodel_moc.h index 8e0071d9b..fc494d419 100644 --- a/launcher/modManager/cmodlistmodel_moc.h +++ b/launcher/modManager/cmodlistmodel_moc.h @@ -1,3 +1,12 @@ +/* + * cmodlistmodel_moc.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 #include "cmodlist.h" diff --git a/launcher/modManager/cmodlistview_moc.cpp b/launcher/modManager/cmodlistview_moc.cpp index a85e1002d..37ca5c242 100644 --- a/launcher/modManager/cmodlistview_moc.cpp +++ b/launcher/modManager/cmodlistview_moc.cpp @@ -1,3 +1,12 @@ +/* + * cmodlistview_moc.cpp, 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 + * + */ #include "StdInc.h" #include "cmodlistview_moc.h" #include "ui_cmodlistview_moc.h" diff --git a/launcher/modManager/cmodlistview_moc.h b/launcher/modManager/cmodlistview_moc.h index f107814c3..241425bc4 100644 --- a/launcher/modManager/cmodlistview_moc.h +++ b/launcher/modManager/cmodlistview_moc.h @@ -1,3 +1,12 @@ +/* + * cmodlistview_moc.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 #include "../StdInc.h" diff --git a/launcher/modManager/cmodmanager.cpp b/launcher/modManager/cmodmanager.cpp index 99a3df32f..a1158ff1a 100644 --- a/launcher/modManager/cmodmanager.cpp +++ b/launcher/modManager/cmodmanager.cpp @@ -1,3 +1,12 @@ +/* + * cmodmanager.cpp, 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 + * + */ #include "StdInc.h" #include "cmodmanager.h" diff --git a/launcher/modManager/cmodmanager.h b/launcher/modManager/cmodmanager.h index b759ef068..b59373a02 100644 --- a/launcher/modManager/cmodmanager.h +++ b/launcher/modManager/cmodmanager.h @@ -1,3 +1,12 @@ +/* + * cmodmanager.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 #include "cmodlist.h" diff --git a/launcher/modManager/imageviewer_moc.cpp b/launcher/modManager/imageviewer_moc.cpp index 90e2583dc..d3d8876dc 100644 --- a/launcher/modManager/imageviewer_moc.cpp +++ b/launcher/modManager/imageviewer_moc.cpp @@ -1,3 +1,12 @@ +/* + * imageviewer_moc.cpp, 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 + * + */ #include "StdInc.h" #include diff --git a/launcher/modManager/imageviewer_moc.h b/launcher/modManager/imageviewer_moc.h index 11f6e7df8..6e8cb2221 100644 --- a/launcher/modManager/imageviewer_moc.h +++ b/launcher/modManager/imageviewer_moc.h @@ -1,3 +1,12 @@ +/* + * imageviewer_moc.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 + * + */ #ifndef IMAGEVIEWER_H #define IMAGEVIEWER_H diff --git a/launcher/sdldisplayquery.cpp b/launcher/sdldisplayquery.cpp index 64cfc538d..d0ac8734a 100644 --- a/launcher/sdldisplayquery.cpp +++ b/launcher/sdldisplayquery.cpp @@ -1,3 +1,12 @@ +/* + * sdldisplayquery.cpp, 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 + * + */ #include "StdInc.h" #include "sdldisplayquery.h" diff --git a/launcher/sdldisplayquery.h b/launcher/sdldisplayquery.h index e2c7dcaa1..b8ab2bca7 100644 --- a/launcher/sdldisplayquery.h +++ b/launcher/sdldisplayquery.h @@ -1,3 +1,12 @@ +/* + * sdldisplayquery.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 #include diff --git a/launcher/settingsView/csettingsview_moc.cpp b/launcher/settingsView/csettingsview_moc.cpp index 828ebedc1..2bf8ae288 100644 --- a/launcher/settingsView/csettingsview_moc.cpp +++ b/launcher/settingsView/csettingsview_moc.cpp @@ -1,3 +1,12 @@ +/* + * csettingsview_moc.cpp, 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 + * + */ #include "StdInc.h" #include "csettingsview_moc.h" #include "ui_csettingsview_moc.h" diff --git a/launcher/settingsView/csettingsview_moc.h b/launcher/settingsView/csettingsview_moc.h index 08655651e..e9e1539a8 100644 --- a/launcher/settingsView/csettingsview_moc.h +++ b/launcher/settingsView/csettingsview_moc.h @@ -1,3 +1,12 @@ +/* + * csettingsview_moc.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 #include "../StdInc.h" diff --git a/lib/AI_Base.h b/lib/AI_Base.h index b7814f0af..cf4bf9c13 100644 --- a/lib/AI_Base.h +++ b/lib/AI_Base.h @@ -1,7 +1,3 @@ -#pragma once - -#include "CGameInterface.h" - /* * AI_Base.h, part of VCMI engine * @@ -11,5 +7,8 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CGameInterface.h" #define AI_INTERFACE_VER 1 diff --git a/lib/CArtHandler.h b/lib/CArtHandler.h index 0e77dad4e..74d592d07 100644 --- a/lib/CArtHandler.h +++ b/lib/CArtHandler.h @@ -1,12 +1,3 @@ -#pragma once - - -#include "../lib/HeroBonus.h" -//#include "../lib/ConstTransitivePtr.h" -//#include "JsonNode.h" -#include "GameConstants.h" -#include "IHandlerBase.h" - /* * CArtHandler.h, part of VCMI engine * @@ -16,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../lib/HeroBonus.h" +//#include "../lib/ConstTransitivePtr.h" +//#include "JsonNode.h" +#include "GameConstants.h" +#include "IHandlerBase.h" class CArtHandler; class CArtifact; diff --git a/lib/CBuildingHandler.cpp b/lib/CBuildingHandler.cpp index 0d8cd4b11..15d9395f3 100644 --- a/lib/CBuildingHandler.cpp +++ b/lib/CBuildingHandler.cpp @@ -1,7 +1,3 @@ -#include "StdInc.h" -#include "CBuildingHandler.h" - - /* * CBuildingHandler.cpp, part of VCMI engine * @@ -11,6 +7,8 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CBuildingHandler.h" BuildingID CBuildingHandler::campToERMU( int camp, int townType, std::set builtBuildings ) { diff --git a/lib/CBuildingHandler.h b/lib/CBuildingHandler.h index 20e470582..01824d333 100644 --- a/lib/CBuildingHandler.h +++ b/lib/CBuildingHandler.h @@ -1,7 +1,3 @@ -#pragma once - -#include "GameConstants.h" - /* * CBuildingHandler.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "GameConstants.h" class DLL_LINKAGE CBuildingHandler { diff --git a/lib/CConfigHandler.cpp b/lib/CConfigHandler.cpp index ba213e6e5..94d3c5ea9 100644 --- a/lib/CConfigHandler.cpp +++ b/lib/CConfigHandler.cpp @@ -1,13 +1,3 @@ -#include "StdInc.h" -#include "CConfigHandler.h" - -#include "../lib/filesystem/Filesystem.h" -#include "../lib/filesystem/FileStream.h" -#include "../lib/GameConstants.h" -#include "../lib/VCMIDirs.h" - -using namespace config; - /* * CConfigHandler.cpp, part of VCMI engine * @@ -17,6 +7,15 @@ using namespace config; * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CConfigHandler.h" + +#include "../lib/filesystem/Filesystem.h" +#include "../lib/filesystem/FileStream.h" +#include "../lib/GameConstants.h" +#include "../lib/VCMIDirs.h" + +using namespace config; SettingsStorage settings; CConfigHandler conf; diff --git a/lib/CConfigHandler.h b/lib/CConfigHandler.h index 7f70d826b..85069ead8 100644 --- a/lib/CConfigHandler.h +++ b/lib/CConfigHandler.h @@ -1,7 +1,3 @@ -#pragma once - -#include "../lib/JsonNode.h" - /* * CConfigHandler.h, part of VCMI engine * @@ -11,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../lib/JsonNode.h" + class Settings; class SettingsListener; diff --git a/lib/CConsoleHandler.cpp b/lib/CConsoleHandler.cpp index fe2102fe7..552269410 100644 --- a/lib/CConsoleHandler.cpp +++ b/lib/CConsoleHandler.cpp @@ -1,18 +1,17 @@ +/* + * CConsoleHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CConsoleHandler.h" #include "CThreadHelper.h" -/* -* CConsoleHandler.cpp, 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 -* -*/ - boost::mutex CConsoleHandler::smx; DLL_LINKAGE CConsoleHandler * console = nullptr; diff --git a/lib/CConsoleHandler.h b/lib/CConsoleHandler.h index cbf342266..2351d6fb7 100644 --- a/lib/CConsoleHandler.h +++ b/lib/CConsoleHandler.h @@ -1,5 +1,3 @@ -#pragma once - /* * CConsoleHandler.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once namespace EConsoleTextColor { diff --git a/lib/CCreatureHandler.cpp b/lib/CCreatureHandler.cpp index 5c07a1eec..4c0a3c6f7 100644 --- a/lib/CCreatureHandler.cpp +++ b/lib/CCreatureHandler.cpp @@ -1,3 +1,12 @@ +/* + * CCreatureHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CCreatureHandler.h" @@ -11,16 +20,6 @@ #include "mapObjects/CObjectClassesHandler.h" -/* - * CCreatureHandler.cpp, 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 - * - */ - int CCreature::getQuantityID(const int & quantity) { if (quantity<5) diff --git a/lib/CCreatureHandler.h b/lib/CCreatureHandler.h index 1f278b12a..c69229a9f 100644 --- a/lib/CCreatureHandler.h +++ b/lib/CCreatureHandler.h @@ -1,14 +1,3 @@ -#pragma once - - -#include "HeroBonus.h" -#include "ConstTransitivePtr.h" -#include "ResourceSet.h" -#include "GameConstants.h" -#include "JsonNode.h" -#include "IHandlerBase.h" -#include "CRandomGenerator.h" - /* * CCreatureHandler.h, part of VCMI engine * @@ -18,6 +7,15 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "HeroBonus.h" +#include "ConstTransitivePtr.h" +#include "ResourceSet.h" +#include "GameConstants.h" +#include "JsonNode.h" +#include "IHandlerBase.h" +#include "CRandomGenerator.h" class CLegacyConfigParser; class CCreatureHandler; diff --git a/lib/CCreatureSet.cpp b/lib/CCreatureSet.cpp index 3bcb29296..db992aa22 100644 --- a/lib/CCreatureSet.cpp +++ b/lib/CCreatureSet.cpp @@ -1,3 +1,12 @@ +/* + * CCreatureSet.cpp, 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 + * + */ #include "StdInc.h" #include "CCreatureSet.h" @@ -14,16 +23,6 @@ #include "serializer/JsonSerializeFormat.h" #include "NetPacksBase.h" -/* - * CCreatureSet.cpp, 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 - * - */ - const CStackInstance &CCreatureSet::operator[](SlotID slot) const { auto i = stacks.find(slot); diff --git a/lib/CCreatureSet.h b/lib/CCreatureSet.h index b5264dd33..8c14db9e0 100644 --- a/lib/CCreatureSet.h +++ b/lib/CCreatureSet.h @@ -1,10 +1,3 @@ -#pragma once - - -#include "HeroBonus.h" -#include "GameConstants.h" -#include "CArtHandler.h" - /* * CCreatureSet.h, part of VCMI engine * @@ -14,6 +7,12 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "HeroBonus.h" +#include "GameConstants.h" +#include "CArtHandler.h" + class JsonNode; class CCreature; class CGHeroInstance; diff --git a/lib/CGameInfoCallback.cpp b/lib/CGameInfoCallback.cpp index a31685412..e474c5052 100644 --- a/lib/CGameInfoCallback.cpp +++ b/lib/CGameInfoCallback.cpp @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #include "StdInc.h" #include "CGameInfoCallback.h" diff --git a/lib/CGameInfoCallback.h b/lib/CGameInfoCallback.h index 16fa777be..9e3ca7ee7 100644 --- a/lib/CGameInfoCallback.h +++ b/lib/CGameInfoCallback.h @@ -1,8 +1,3 @@ -#pragma once - -#include "ResourceSet.h" // for Res::ERes -#include "battle/CPlayerBattleCallback.h" - /* * CGameInfoCallback.h, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "ResourceSet.h" // for Res::ERes +#include "battle/CPlayerBattleCallback.h" class CGObjectInstance; struct InfoWindow; diff --git a/lib/CGameInterface.cpp b/lib/CGameInterface.cpp index 30880332e..f6d190348 100644 --- a/lib/CGameInterface.cpp +++ b/lib/CGameInterface.cpp @@ -1,3 +1,12 @@ +/* + * CGameInterface.cpp, 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 + * + */ #include "StdInc.h" #include "CGameInterface.h" @@ -20,16 +29,6 @@ #endif -/* - * CGameInterface.cpp, 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 - * - */ - template std::shared_ptr createAny(const boost::filesystem::path & libpath, const std::string & methodName) { diff --git a/lib/CGameInterface.h b/lib/CGameInterface.h index 8d5c55883..0ba0b468d 100644 --- a/lib/CGameInterface.h +++ b/lib/CGameInterface.h @@ -1,14 +1,3 @@ -#pragma once - - -#include "battle/BattleAction.h" -#include "IGameEventsReceiver.h" -#include "CGameStateFwd.h" - -#include "spells/ViewSpellInt.h" - -#include "mapObjects/CObjectHandler.h" - /* * CGameInterface.h, part of VCMI engine * @@ -18,6 +7,15 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "battle/BattleAction.h" +#include "IGameEventsReceiver.h" +#include "CGameStateFwd.h" + +#include "spells/ViewSpellInt.h" + +#include "mapObjects/CObjectHandler.h" using boost::logic::tribool; class CCallback; diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp index b454fa389..69aa1d44e 100644 --- a/lib/CGameState.cpp +++ b/lib/CGameState.cpp @@ -1,3 +1,12 @@ +/* + * CGameState.cpp, 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 + * + */ #include "StdInc.h" #include "CGameState.h" @@ -35,16 +44,6 @@ #undef max #endif -/* - * CGameState.cpp, 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 - * - */ - boost::shared_mutex CGameState::mutex; template class CApplyOnGS; diff --git a/lib/CGameState.h b/lib/CGameState.h index 0666de695..cd6afbc8e 100644 --- a/lib/CGameState.h +++ b/lib/CGameState.h @@ -1,3 +1,12 @@ +/* + * CGameState.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 #include "CCreatureHandler.h" @@ -13,16 +22,6 @@ #include "CGameStateFwd.h" #include "CPathfinder.h" -/* - * CGameState.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 - * - */ - class CTown; class CCallback; class IGameCallback; diff --git a/lib/CGameStateFwd.h b/lib/CGameStateFwd.h index d79089e32..7fb8c604a 100644 --- a/lib/CGameStateFwd.h +++ b/lib/CGameStateFwd.h @@ -1,5 +1,3 @@ -#pragma once - /* * CGameStateFwd.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "CCreatureSet.h" diff --git a/lib/CGeneralTextHandler.cpp b/lib/CGeneralTextHandler.cpp index 4f5edef25..16a3f925e 100644 --- a/lib/CGeneralTextHandler.cpp +++ b/lib/CGeneralTextHandler.cpp @@ -1,3 +1,12 @@ +/* + * CGeneralTextHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CGeneralTextHandler.h" @@ -9,16 +18,6 @@ #include "GameConstants.h" #include "VCMI_Lib.h" -/* - * CGeneralTextHandler.cpp, 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 - * - */ - size_t Unicode::getCharacterSize(char firstByte) { // length of utf-8 character can be determined from 1st byte by counting number of highest bits set to 1: diff --git a/lib/CGeneralTextHandler.h b/lib/CGeneralTextHandler.h index 2dd94246c..6c67a6aaf 100644 --- a/lib/CGeneralTextHandler.h +++ b/lib/CGeneralTextHandler.h @@ -1,5 +1,3 @@ -#pragma once - /* * CGeneralTextHandler.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "JsonNode.h" diff --git a/lib/CHeroHandler.cpp b/lib/CHeroHandler.cpp index 3dc8ff2db..931f76198 100644 --- a/lib/CHeroHandler.cpp +++ b/lib/CHeroHandler.cpp @@ -1,3 +1,12 @@ +/* + * CHeroHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CHeroHandler.h" @@ -15,16 +24,6 @@ #include "mapObjects/CObjectClassesHandler.h" -/* - * CHeroHandler.cpp, 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 - * - */ - SecondarySkill CHeroClass::chooseSecSkill(const std::set & possibles, CRandomGenerator & rand) const //picks secondary skill out from given possibilities { int totalProb = 0; diff --git a/lib/CHeroHandler.h b/lib/CHeroHandler.h index d83619568..2003a2663 100644 --- a/lib/CHeroHandler.h +++ b/lib/CHeroHandler.h @@ -1,10 +1,3 @@ -#pragma once - -#include "../lib/ConstTransitivePtr.h" -#include "GameConstants.h" -#include "HeroBonus.h" -#include "IHandlerBase.h" - /* * CHeroHandler.h, part of VCMI engine * @@ -14,6 +7,12 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../lib/ConstTransitivePtr.h" +#include "GameConstants.h" +#include "HeroBonus.h" +#include "IHandlerBase.h" class CHeroClass; class CGameInfo; diff --git a/lib/CModHandler.cpp b/lib/CModHandler.cpp index 0a5395290..c2f2bc455 100644 --- a/lib/CModHandler.cpp +++ b/lib/CModHandler.cpp @@ -1,3 +1,12 @@ +/* + * CModHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CModHandler.h" #include "mapObjects/CObjectClassesHandler.h" @@ -15,16 +24,6 @@ #include "IHandlerBase.h" #include "spells/CSpellHandler.h" -/* - * CModHandler.cpp, 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 - * - */ - CIdentifierStorage::CIdentifierStorage(): state(LOADING) { diff --git a/lib/CModHandler.h b/lib/CModHandler.h index 5213ebf97..7b131d468 100644 --- a/lib/CModHandler.h +++ b/lib/CModHandler.h @@ -1,10 +1,3 @@ -#pragma once - -#include "filesystem/Filesystem.h" - -#include "VCMI_Lib.h" -#include "JsonNode.h" - /* * CModHandler.h, part of VCMI engine * @@ -14,6 +7,12 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "filesystem/Filesystem.h" + +#include "VCMI_Lib.h" +#include "JsonNode.h" class CModHandler; class CModIndentifier; diff --git a/lib/CPathfinder.cpp b/lib/CPathfinder.cpp index 8b0b3e92c..3d7672a71 100644 --- a/lib/CPathfinder.cpp +++ b/lib/CPathfinder.cpp @@ -1,3 +1,12 @@ +/* + * CPathfinder.cpp, 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 + * + */ #include "StdInc.h" #include "CPathfinder.h" @@ -10,16 +19,6 @@ #include "CConfigHandler.h" #include "../lib/CPlayerState.h" -/* - * CPathfinder.cpp, 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 - * - */ - CPathfinder::PathfinderOptions::PathfinderOptions() { useFlying = settings["pathfinder"]["layers"]["flying"].Bool(); diff --git a/lib/CPathfinder.h b/lib/CPathfinder.h index 08fca8f97..358c3ec18 100644 --- a/lib/CPathfinder.h +++ b/lib/CPathfinder.h @@ -1,12 +1,3 @@ -#pragma once - -#include "VCMI_Lib.h" -#include "IGameCallback.h" -#include "HeroBonus.h" -#include "int3.h" - -#include - /* * CPathfinder.h, part of VCMI engine * @@ -16,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "VCMI_Lib.h" +#include "IGameCallback.h" +#include "HeroBonus.h" +#include "int3.h" + +#include class CGHeroInstance; class CGObjectInstance; diff --git a/lib/CPlayerState.h b/lib/CPlayerState.h index 859352c6e..70361a582 100644 --- a/lib/CPlayerState.h +++ b/lib/CPlayerState.h @@ -1,5 +1,3 @@ -#pragma once - /* * CPlayerState.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "HeroBonus.h" diff --git a/lib/CRandomGenerator.cpp b/lib/CRandomGenerator.cpp index 6ceadef69..b4ff51570 100644 --- a/lib/CRandomGenerator.cpp +++ b/lib/CRandomGenerator.cpp @@ -1,4 +1,3 @@ - /* * CRandomGenerator.cpp, part of VCMI engine * diff --git a/lib/CRandomGenerator.h b/lib/CRandomGenerator.h index d25e81386..06f188107 100644 --- a/lib/CRandomGenerator.h +++ b/lib/CRandomGenerator.h @@ -1,4 +1,3 @@ - /* * CRandomGenerator.h, part of VCMI engine * diff --git a/lib/CScriptingModule.h b/lib/CScriptingModule.h index a45be5d52..47e8f1321 100644 --- a/lib/CScriptingModule.h +++ b/lib/CScriptingModule.h @@ -1,8 +1,3 @@ -#pragma once - - -#include "IGameEventsReceiver.h" - /* * CScriptingModule.h, part of VCMI engine * @@ -12,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "IGameEventsReceiver.h" class IGameEventRealizer; class CPrivilagedInfoCallback; diff --git a/lib/CSoundBase.h b/lib/CSoundBase.h index 7ad38d2b1..5ae871199 100644 --- a/lib/CSoundBase.h +++ b/lib/CSoundBase.h @@ -1,3 +1,12 @@ +/* + * CSoundBase.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 // Use some magic to keep the list of files and their code name in sync. diff --git a/lib/CStopWatch.h b/lib/CStopWatch.h index 3faf4c69c..0431e9c1a 100644 --- a/lib/CStopWatch.h +++ b/lib/CStopWatch.h @@ -1,3 +1,12 @@ +/* + * CStopWatch.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 #ifdef __FreeBSD__ @@ -10,16 +19,6 @@ #define TO_MS_DIVISOR (CLOCKS_PER_SEC / 1000) #endif -/* - * CStopWatch.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 - * - */ - class CStopWatch { si64 start, last, mem; diff --git a/lib/CThreadHelper.cpp b/lib/CThreadHelper.cpp index d15665b7a..ce32a2048 100644 --- a/lib/CThreadHelper.cpp +++ b/lib/CThreadHelper.cpp @@ -1,11 +1,3 @@ -#include "StdInc.h" -#include "CThreadHelper.h" - -#ifdef VCMI_WINDOWS - #include -#elif !defined(VCMI_APPLE) && !defined(VCMI_FREEBSD) && !defined(VCMI_HURD) - #include -#endif /* * CThreadHelper.cpp, part of VCMI engine * @@ -15,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CThreadHelper.h" + +#ifdef VCMI_WINDOWS + #include +#elif !defined(VCMI_APPLE) && !defined(VCMI_FREEBSD) && !defined(VCMI_HURD) + #include +#endif CThreadHelper::CThreadHelper(std::vector > *Tasks, int Threads) { diff --git a/lib/CThreadHelper.h b/lib/CThreadHelper.h index 5cdc9ed3a..1594d4021 100644 --- a/lib/CThreadHelper.h +++ b/lib/CThreadHelper.h @@ -1,8 +1,3 @@ -#pragma once - - - - /* * CThreadHelper.h, part of VCMI engine * @@ -12,6 +7,8 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + typedef std::function Task; diff --git a/lib/CTownHandler.cpp b/lib/CTownHandler.cpp index d90636bfb..8134098b8 100644 --- a/lib/CTownHandler.cpp +++ b/lib/CTownHandler.cpp @@ -1,3 +1,12 @@ +/* + * CTownHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CTownHandler.h" @@ -14,16 +23,6 @@ #include "mapObjects/CObjectClassesHandler.h" #include "mapObjects/CObjectHandler.h" -/* - * CTownHandler.cpp, 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 - * - */ - const int NAMES_PER_TOWN=16; // number of town names per faction in H3 files. Json can define any number CBuilding::CBuilding(): diff --git a/lib/CTownHandler.h b/lib/CTownHandler.h index f823d6328..3b078e0a9 100644 --- a/lib/CTownHandler.h +++ b/lib/CTownHandler.h @@ -1,13 +1,3 @@ -#pragma once - -#include "ConstTransitivePtr.h" -#include "ResourceSet.h" -#include "int3.h" -#include "GameConstants.h" -#include "IHandlerBase.h" -#include "LogicalExpression.h" -#include "battle/BattleHex.h" - /* * CTownHandler.h, part of VCMI engine * @@ -17,6 +7,15 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "ConstTransitivePtr.h" +#include "ResourceSet.h" +#include "int3.h" +#include "GameConstants.h" +#include "IHandlerBase.h" +#include "LogicalExpression.h" +#include "battle/BattleHex.h" class CLegacyConfigParser; class JsonNode; diff --git a/lib/CondSh.h b/lib/CondSh.h index c448007c7..829af99a7 100644 --- a/lib/CondSh.h +++ b/lib/CondSh.h @@ -1,5 +1,3 @@ -#pragma once - /* * CondSh.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once /// Used for multithreading, wraps boost functions template struct CondSh diff --git a/lib/ConstTransitivePtr.h b/lib/ConstTransitivePtr.h index 724a54a0d..5aaaef5df 100644 --- a/lib/ConstTransitivePtr.h +++ b/lib/ConstTransitivePtr.h @@ -1,7 +1,3 @@ -#pragma once - -class CGameHandler; - /* * ConstTransitivePtr.h, part of VCMI engine * @@ -11,6 +7,9 @@ class CGameHandler; * Full text of license available in license.txt file, in main folder * */ +#pragma once + +class CGameHandler; template class ConstTransitivePtr diff --git a/lib/FunctionList.h b/lib/FunctionList.h index 4b1cb283e..eca94edfc 100644 --- a/lib/FunctionList.h +++ b/lib/FunctionList.h @@ -1,6 +1,3 @@ -#pragma once - - /* * FunctionList.h, part of VCMI engine * @@ -10,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once /// List of functions that share the same signature - can be used to call all of them easily template diff --git a/lib/GameConstants.h b/lib/GameConstants.h index 7fa93a4e5..b86472791 100644 --- a/lib/GameConstants.h +++ b/lib/GameConstants.h @@ -1,5 +1,3 @@ -#pragma once - /* * GameConstants.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "ConstTransitivePtr.h" diff --git a/lib/HeroBonus.h b/lib/HeroBonus.h index 99313e716..fcf3ac167 100644 --- a/lib/HeroBonus.h +++ b/lib/HeroBonus.h @@ -1,7 +1,3 @@ -#pragma once - -#include "GameConstants.h" - /* * HeroBonus.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "GameConstants.h" class CCreature; struct Bonus; diff --git a/lib/IBonusTypeHandler.h b/lib/IBonusTypeHandler.h index 2f46e5fc2..609f5abfb 100644 --- a/lib/IBonusTypeHandler.h +++ b/lib/IBonusTypeHandler.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once class IBonusBearer; diff --git a/lib/IGameCallback.cpp b/lib/IGameCallback.cpp index ee0c4206e..0c35a8b41 100644 --- a/lib/IGameCallback.cpp +++ b/lib/IGameCallback.cpp @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #include "StdInc.h" #include "IGameCallback.h" diff --git a/lib/IGameCallback.h b/lib/IGameCallback.h index 421735c54..eca80eeb6 100644 --- a/lib/IGameCallback.h +++ b/lib/IGameCallback.h @@ -1,8 +1,3 @@ -#pragma once - -#include "CGameInfoCallback.h" // for CGameInfoCallback -#include "CRandomGenerator.h" - /* * IGameCallback.h, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CGameInfoCallback.h" // for CGameInfoCallback +#include "CRandomGenerator.h" struct SetMovePoints; struct GiveBonus; diff --git a/lib/IHandlerBase.h b/lib/IHandlerBase.h index 4d47988d6..d6b711f7f 100644 --- a/lib/IHandlerBase.h +++ b/lib/IHandlerBase.h @@ -1,5 +1,3 @@ -#pragma once - /* * IHandlerBase.h, part of VCMI engine * @@ -9,6 +7,8 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + #include "../lib/ConstTransitivePtr.h" #include "VCMI_Lib.h" //#include "CModHandler.h" diff --git a/lib/Interprocess.h b/lib/Interprocess.h index e87636c63..8137e77b7 100644 --- a/lib/Interprocess.h +++ b/lib/Interprocess.h @@ -1,11 +1,3 @@ -#pragma once - -#include -#include -#include -#include -#include - /* * Interprocess.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include +#include +#include +#include +#include struct ServerReady { diff --git a/lib/JsonDetail.h b/lib/JsonDetail.h index e85c8dfdf..6bf903661 100644 --- a/lib/JsonDetail.h +++ b/lib/JsonDetail.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "JsonNode.h" diff --git a/lib/JsonNode.h b/lib/JsonNode.h index 9305afc7a..4ed528a5a 100644 --- a/lib/JsonNode.h +++ b/lib/JsonNode.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once class JsonNode; diff --git a/lib/LogicalExpression.cpp b/lib/LogicalExpression.cpp index c6a59b85a..42207afa8 100644 --- a/lib/LogicalExpression.cpp +++ b/lib/LogicalExpression.cpp @@ -1,3 +1,12 @@ +/* + * LogicalExpression.cpp, 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 + * + */ #include "StdInc.h" #include "LogicalExpression.h" diff --git a/lib/LogicalExpression.h b/lib/LogicalExpression.h index 01acd074b..d567eafa5 100644 --- a/lib/LogicalExpression.h +++ b/lib/LogicalExpression.h @@ -1,3 +1,12 @@ +/* + * LogicalExpression.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 //FIXME: move some of code into .cpp to avoid this include? diff --git a/lib/NetPacks.h b/lib/NetPacks.h index 0f7432155..68dd702a2 100644 --- a/lib/NetPacks.h +++ b/lib/NetPacks.h @@ -1,3 +1,12 @@ +/* + * NetPacks.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 #include "NetPacksBase.h" @@ -14,16 +23,6 @@ #include "spells/ViewSpellInt.h" -/* - * NetPacks.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 - * - */ - class CClient; class CGameState; class CGameHandler; diff --git a/lib/NetPacksBase.h b/lib/NetPacksBase.h index 49eb0d4ca..0be195786 100644 --- a/lib/NetPacksBase.h +++ b/lib/NetPacksBase.h @@ -1,5 +1,3 @@ -#pragma once - /* * NetPacksBase.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once class CGameState; class CStackBasicDescriptor; diff --git a/lib/NetPacksLib.cpp b/lib/NetPacksLib.cpp index aa24778da..d39672acd 100644 --- a/lib/NetPacksLib.cpp +++ b/lib/NetPacksLib.cpp @@ -1,3 +1,12 @@ +/* + * NetPacksLib.cpp, 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 + * + */ #include "StdInc.h" #include "NetPacks.h" @@ -19,16 +28,6 @@ #include "StartInfo.h" #include "CPlayerState.h" -/* - * NetPacksLib.cpp, 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 - * - */ - #undef min #undef max diff --git a/lib/StartInfo.h b/lib/StartInfo.h index c51e2782e..8bd9beaf4 100644 --- a/lib/StartInfo.h +++ b/lib/StartInfo.h @@ -1,7 +1,3 @@ -#pragma once - -#include "GameConstants.h" - /* * StartInfo.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "GameConstants.h" class CMapGenOptions; class CCampaignState; diff --git a/lib/StringConstants.h b/lib/StringConstants.h index 48a8fca3d..e1dcf9e25 100644 --- a/lib/StringConstants.h +++ b/lib/StringConstants.h @@ -1,7 +1,3 @@ -#pragma once - -#include "GameConstants.h" - /* * StringConstants.h, part of VCMI engine * @@ -11,7 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once +#include "GameConstants.h" /// /// String ID which are pointless to move to config file - these types are mostly hardcoded diff --git a/lib/UnlockGuard.h b/lib/UnlockGuard.h index ce99d93ca..f8a2835d1 100644 --- a/lib/UnlockGuard.h +++ b/lib/UnlockGuard.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once namespace vstd diff --git a/lib/VCMIDirs.h b/lib/VCMIDirs.h index ccf225884..4af677b22 100644 --- a/lib/VCMIDirs.h +++ b/lib/VCMIDirs.h @@ -1,12 +1,12 @@ /* -* VCMIDirs.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 -* -*/ + * VCMIDirs.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 DLL_LINKAGE IVCMIDirs diff --git a/lib/VCMI_Lib.h b/lib/VCMI_Lib.h index b9ecbcf13..18ede65d3 100644 --- a/lib/VCMI_Lib.h +++ b/lib/VCMI_Lib.h @@ -1,5 +1,3 @@ -#pragma once - /* * VCMI_Lib.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once class CArtHandler; class CHeroHandler; diff --git a/lib/battle/CBattleInfoCallback.cpp b/lib/battle/CBattleInfoCallback.cpp index d4326a8f7..aca4f5983 100644 --- a/lib/battle/CBattleInfoCallback.cpp +++ b/lib/battle/CBattleInfoCallback.cpp @@ -1,5 +1,5 @@ /* - * CBattleCallback.cpp, part of VCMI engine + * CBattleInfoCallback.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * diff --git a/lib/battle/CBattleInfoCallback.h b/lib/battle/CBattleInfoCallback.h index f43143349..fe613ec47 100644 --- a/lib/battle/CBattleInfoCallback.h +++ b/lib/battle/CBattleInfoCallback.h @@ -1,5 +1,5 @@ /* - * CBattleCallback.h, part of VCMI engine + * CBattleInfoCallback.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * diff --git a/lib/battle/CObstacleInstance.cpp b/lib/battle/CObstacleInstance.cpp index d896dfdfe..659e4a644 100644 --- a/lib/battle/CObstacleInstance.cpp +++ b/lib/battle/CObstacleInstance.cpp @@ -1,10 +1,3 @@ -#include "StdInc.h" -#include "CObstacleInstance.h" -#include "../CHeroHandler.h" -#include "../CTownHandler.h" -#include "../VCMI_Lib.h" -#include "../spells/CSpellHandler.h" - /* * CObstacleInstance.cpp, part of VCMI engine * @@ -14,6 +7,12 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CObstacleInstance.h" +#include "../CHeroHandler.h" +#include "../CTownHandler.h" +#include "../VCMI_Lib.h" +#include "../spells/CSpellHandler.h" CObstacleInstance::CObstacleInstance() { diff --git a/lib/battle/CObstacleInstance.h b/lib/battle/CObstacleInstance.h index d06f61950..0b9e78960 100644 --- a/lib/battle/CObstacleInstance.h +++ b/lib/battle/CObstacleInstance.h @@ -1,6 +1,3 @@ -#pragma once -#include "BattleHex.h" - /* * CObstacleInstance.h, part of VCMI engine * @@ -10,6 +7,8 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once +#include "BattleHex.h" struct CObstacleInfo; diff --git a/lib/filesystem/AdapterLoaders.cpp b/lib/filesystem/AdapterLoaders.cpp index b5da1bedf..a8698bef3 100644 --- a/lib/filesystem/AdapterLoaders.cpp +++ b/lib/filesystem/AdapterLoaders.cpp @@ -1,3 +1,12 @@ +/* + * AdapterLoaders.cpp, 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 + * + */ #include "StdInc.h" #include "AdapterLoaders.h" diff --git a/lib/filesystem/AdapterLoaders.h b/lib/filesystem/AdapterLoaders.h index 2e3fb8839..9be15f956 100644 --- a/lib/filesystem/AdapterLoaders.h +++ b/lib/filesystem/AdapterLoaders.h @@ -1,5 +1,3 @@ -#pragma once - /* * AdapterLoaders.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "ISimpleResourceLoader.h" #include "ResourceID.h" diff --git a/lib/filesystem/CArchiveLoader.cpp b/lib/filesystem/CArchiveLoader.cpp index d572eb610..c90ad7198 100644 --- a/lib/filesystem/CArchiveLoader.cpp +++ b/lib/filesystem/CArchiveLoader.cpp @@ -1,3 +1,12 @@ +/* + * CArchiveLoader.cpp, 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 + * + */ #include "StdInc.h" #include "CArchiveLoader.h" diff --git a/lib/filesystem/CArchiveLoader.h b/lib/filesystem/CArchiveLoader.h index 652c39ead..9b66206ad 100644 --- a/lib/filesystem/CArchiveLoader.h +++ b/lib/filesystem/CArchiveLoader.h @@ -1,5 +1,3 @@ -#pragma once - /* * CArchiveLoader.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "ISimpleResourceLoader.h" #include "ResourceID.h" diff --git a/lib/filesystem/CBinaryReader.cpp b/lib/filesystem/CBinaryReader.cpp index 9f9a2ba97..5e960d91d 100644 --- a/lib/filesystem/CBinaryReader.cpp +++ b/lib/filesystem/CBinaryReader.cpp @@ -1,3 +1,12 @@ +/* + * CBinaryReader.cpp, 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 + * + */ #include "StdInc.h" #include "CBinaryReader.h" diff --git a/lib/filesystem/CBinaryReader.h b/lib/filesystem/CBinaryReader.h index 9926889ed..166adc0b3 100644 --- a/lib/filesystem/CBinaryReader.h +++ b/lib/filesystem/CBinaryReader.h @@ -1,5 +1,3 @@ -#pragma once - /* * CBinaryReader.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once class CInputStream; diff --git a/lib/filesystem/CCompressedStream.cpp b/lib/filesystem/CCompressedStream.cpp index b17b58cee..361df3f77 100644 --- a/lib/filesystem/CCompressedStream.cpp +++ b/lib/filesystem/CCompressedStream.cpp @@ -1,3 +1,12 @@ +/* + * CCompressedStream.cpp, 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 + * + */ #include "StdInc.h" #include "CCompressedStream.h" diff --git a/lib/filesystem/CCompressedStream.h b/lib/filesystem/CCompressedStream.h index 75684c8d9..8f6191cdb 100644 --- a/lib/filesystem/CCompressedStream.h +++ b/lib/filesystem/CCompressedStream.h @@ -1,5 +1,3 @@ -#pragma once - /* * CCompressedStream.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "CInputStream.h" diff --git a/lib/filesystem/CFileInputStream.cpp b/lib/filesystem/CFileInputStream.cpp index 6de595dd3..aa54e353c 100644 --- a/lib/filesystem/CFileInputStream.cpp +++ b/lib/filesystem/CFileInputStream.cpp @@ -1,3 +1,12 @@ +/* + * CFileInputStream.cpp, 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 + * + */ #include "StdInc.h" #include "CFileInputStream.h" diff --git a/lib/filesystem/CFileInputStream.h b/lib/filesystem/CFileInputStream.h index 99a0cde0e..e72755feb 100644 --- a/lib/filesystem/CFileInputStream.h +++ b/lib/filesystem/CFileInputStream.h @@ -1,5 +1,3 @@ -#pragma once - /* * CFileInputStream.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "CInputStream.h" #include "FileStream.h" diff --git a/lib/filesystem/CFilesystemLoader.cpp b/lib/filesystem/CFilesystemLoader.cpp index 812ea6b88..0c3f0643a 100644 --- a/lib/filesystem/CFilesystemLoader.cpp +++ b/lib/filesystem/CFilesystemLoader.cpp @@ -1,3 +1,12 @@ +/* + * CFilesystemLoader.cpp, 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 + * + */ #include "StdInc.h" #include "CFilesystemLoader.h" diff --git a/lib/filesystem/CFilesystemLoader.h b/lib/filesystem/CFilesystemLoader.h index 130c24946..ea782cc8c 100644 --- a/lib/filesystem/CFilesystemLoader.h +++ b/lib/filesystem/CFilesystemLoader.h @@ -1,5 +1,3 @@ -#pragma once - /* * CFilesystemLoader.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "ISimpleResourceLoader.h" #include "ResourceID.h" diff --git a/lib/filesystem/CInputOutputStream.h b/lib/filesystem/CInputOutputStream.h index 55c88b360..8c80c4bac 100644 --- a/lib/filesystem/CInputOutputStream.h +++ b/lib/filesystem/CInputOutputStream.h @@ -1,3 +1,12 @@ +/* + * CInputOutputStream.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 #include "CInputStream.h" diff --git a/lib/filesystem/CInputStream.h b/lib/filesystem/CInputStream.h index eab845f75..087534330 100644 --- a/lib/filesystem/CInputStream.h +++ b/lib/filesystem/CInputStream.h @@ -1,7 +1,3 @@ -#pragma once - -#include "CStream.h" - /* * CInputStream.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CStream.h" /** * Abstract class which provides method definitions for reading from a stream. diff --git a/lib/filesystem/CMemoryBuffer.h b/lib/filesystem/CMemoryBuffer.h index 1ceeaff69..e35a78313 100644 --- a/lib/filesystem/CMemoryBuffer.h +++ b/lib/filesystem/CMemoryBuffer.h @@ -1,5 +1,3 @@ -#pragma once - /* * CMemoryBuffer.h, part of VCMI engine * @@ -9,7 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ - +#pragma once #include "CInputOutputStream.h" diff --git a/lib/filesystem/CMemoryStream.cpp b/lib/filesystem/CMemoryStream.cpp index da745885d..36eaacfaa 100644 --- a/lib/filesystem/CMemoryStream.cpp +++ b/lib/filesystem/CMemoryStream.cpp @@ -1,3 +1,12 @@ +/* + * CMemoryStream.cpp, 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 + * + */ #include "StdInc.h" #include "CMemoryStream.h" diff --git a/lib/filesystem/CMemoryStream.h b/lib/filesystem/CMemoryStream.h index 5b039db12..8af312cc3 100644 --- a/lib/filesystem/CMemoryStream.h +++ b/lib/filesystem/CMemoryStream.h @@ -1,5 +1,3 @@ -#pragma once - /* * CMemoryStream.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "CInputStream.h" diff --git a/lib/filesystem/COutputStream.h b/lib/filesystem/COutputStream.h index 86181a20e..819fa8820 100644 --- a/lib/filesystem/COutputStream.h +++ b/lib/filesystem/COutputStream.h @@ -1,7 +1,3 @@ -#pragma once - -#include "CStream.h" - /* * COutputStream.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CStream.h" /** * Abstract class which provides method definitions for writing into a stream. diff --git a/lib/filesystem/CStream.h b/lib/filesystem/CStream.h index 21026b72b..b8a0ca55f 100644 --- a/lib/filesystem/CStream.h +++ b/lib/filesystem/CStream.h @@ -1,5 +1,3 @@ -#pragma once - /* * CStream.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once class DLL_LINKAGE CStream : private boost::noncopyable { diff --git a/lib/filesystem/CZipLoader.cpp b/lib/filesystem/CZipLoader.cpp index 86e6cacdb..6d8362c38 100644 --- a/lib/filesystem/CZipLoader.cpp +++ b/lib/filesystem/CZipLoader.cpp @@ -1,9 +1,3 @@ -#include "StdInc.h" -#include "CZipLoader.h" -#include "FileStream.h" - -#include "../ScopeGuard.h" - /* * CZipLoader.cpp, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CZipLoader.h" +#include "FileStream.h" + +#include "../ScopeGuard.h" CZipStream::CZipStream(std::shared_ptr api, const boost::filesystem::path & archive, unz64_file_pos filepos) { diff --git a/lib/filesystem/CZipLoader.h b/lib/filesystem/CZipLoader.h index 44b59bd37..0365c67c2 100644 --- a/lib/filesystem/CZipLoader.h +++ b/lib/filesystem/CZipLoader.h @@ -1,5 +1,3 @@ -#pragma once - /* * CZipLoader.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "ISimpleResourceLoader.h" #include "CInputStream.h" diff --git a/lib/filesystem/CZipSaver.h b/lib/filesystem/CZipSaver.h index 66bcd0468..88993f5d4 100644 --- a/lib/filesystem/CZipSaver.h +++ b/lib/filesystem/CZipSaver.h @@ -1,5 +1,3 @@ -#pragma once - /* * CZipSaver.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "COutputStream.h" diff --git a/lib/filesystem/FileInfo.cpp b/lib/filesystem/FileInfo.cpp index 9f3572cda..26b4f5b29 100644 --- a/lib/filesystem/FileInfo.cpp +++ b/lib/filesystem/FileInfo.cpp @@ -1,3 +1,12 @@ +/* + * FileInfo.cpp, 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 + * + */ #include "StdInc.h" #include "FileInfo.h" diff --git a/lib/filesystem/FileInfo.h b/lib/filesystem/FileInfo.h index 4c1154893..428cbf0bd 100644 --- a/lib/filesystem/FileInfo.h +++ b/lib/filesystem/FileInfo.h @@ -1,5 +1,3 @@ -#pragma once - /* * FileInfo.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include diff --git a/lib/filesystem/FileStream.cpp b/lib/filesystem/FileStream.cpp index 789120996..11edd9e3f 100644 --- a/lib/filesystem/FileStream.cpp +++ b/lib/filesystem/FileStream.cpp @@ -1,3 +1,12 @@ +/* + * FileStream.cpp, 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 + * + */ #include "StdInc.h" #include "FileStream.h" diff --git a/lib/filesystem/FileStream.h b/lib/filesystem/FileStream.h index b0c90c2f2..57b9b420d 100644 --- a/lib/filesystem/FileStream.h +++ b/lib/filesystem/FileStream.h @@ -1,5 +1,3 @@ -#pragma once - /* * FileStream.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include #include diff --git a/lib/filesystem/Filesystem.cpp b/lib/filesystem/Filesystem.cpp index 8e21ddf5b..190f5d845 100644 --- a/lib/filesystem/Filesystem.cpp +++ b/lib/filesystem/Filesystem.cpp @@ -1,3 +1,12 @@ +/* + * Filesystem.cpp, 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 + * + */ #include "StdInc.h" #include "Filesystem.h" diff --git a/lib/filesystem/Filesystem.h b/lib/filesystem/Filesystem.h index acc5bf481..dd5be4cb9 100644 --- a/lib/filesystem/Filesystem.h +++ b/lib/filesystem/Filesystem.h @@ -1,5 +1,3 @@ -#pragma once - /* * Filesystem.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include "CInputStream.h" #include "ISimpleResourceLoader.h" diff --git a/lib/filesystem/ISimpleResourceLoader.h b/lib/filesystem/ISimpleResourceLoader.h index 8b149dc66..05371a22b 100644 --- a/lib/filesystem/ISimpleResourceLoader.h +++ b/lib/filesystem/ISimpleResourceLoader.h @@ -1,5 +1,3 @@ -#pragma once - /* * ISimpleResourceLoader.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once class CInputStream; class ResourceID; diff --git a/lib/filesystem/MinizipExtensions.h b/lib/filesystem/MinizipExtensions.h index efd54a152..43c739440 100644 --- a/lib/filesystem/MinizipExtensions.h +++ b/lib/filesystem/MinizipExtensions.h @@ -1,5 +1,3 @@ -#pragma once - /* * MinizipExtensions.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #ifdef USE_SYSTEM_MINIZIP #include diff --git a/lib/filesystem/ResourceID.cpp b/lib/filesystem/ResourceID.cpp index 174a7e580..0df4e27de 100644 --- a/lib/filesystem/ResourceID.cpp +++ b/lib/filesystem/ResourceID.cpp @@ -1,3 +1,12 @@ +/* + * ResourceID.cpp, 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 + * + */ #include "StdInc.h" #include "ResourceID.h" #include "FileInfo.h" diff --git a/lib/filesystem/ResourceID.h b/lib/filesystem/ResourceID.h index 93b0ad6e6..901a6b913 100644 --- a/lib/filesystem/ResourceID.h +++ b/lib/filesystem/ResourceID.h @@ -1,5 +1,3 @@ -#pragma once - /* * ResourceID.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once /** diff --git a/lib/int3.h b/lib/int3.h index 389b9241c..b55dbabae 100644 --- a/lib/int3.h +++ b/lib/int3.h @@ -1,5 +1,3 @@ -#pragma once - /* * int3.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once /// Class which consists of three integer values. Represents position on adventure map. class int3 diff --git a/lib/logging/CBasicLogConfigurator.cpp b/lib/logging/CBasicLogConfigurator.cpp index 77faddfd7..d664ff6f6 100644 --- a/lib/logging/CBasicLogConfigurator.cpp +++ b/lib/logging/CBasicLogConfigurator.cpp @@ -1,3 +1,12 @@ +/* + * CBasicLogConfigurator.cpp, 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 + * + */ #include "StdInc.h" #include "CBasicLogConfigurator.h" diff --git a/lib/logging/CBasicLogConfigurator.h b/lib/logging/CBasicLogConfigurator.h index 498f2a32c..843621243 100644 --- a/lib/logging/CBasicLogConfigurator.h +++ b/lib/logging/CBasicLogConfigurator.h @@ -1,4 +1,3 @@ - /* * CBasicLogConfigurator.h, part of VCMI engine * diff --git a/lib/logging/CLogger.cpp b/lib/logging/CLogger.cpp index f0081e812..3223a1665 100644 --- a/lib/logging/CLogger.cpp +++ b/lib/logging/CLogger.cpp @@ -1,3 +1,12 @@ +/* + * CLogger.cpp, 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 + * + */ #include "StdInc.h" #include "CLogger.h" diff --git a/lib/logging/CLogger.h b/lib/logging/CLogger.h index 0fc34b316..bd3ac53e2 100644 --- a/lib/logging/CLogger.h +++ b/lib/logging/CLogger.h @@ -1,4 +1,3 @@ - /* * CLogger.h, part of VCMI engine * @@ -8,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "../CConsoleHandler.h" diff --git a/lib/mapObjects/CArmedInstance.h b/lib/mapObjects/CArmedInstance.h index 0ebe2abc1..ca24c5aca 100644 --- a/lib/mapObjects/CArmedInstance.h +++ b/lib/mapObjects/CArmedInstance.h @@ -1,9 +1,4 @@ -#pragma once - -#include "CObjectHandler.h" -#include "../CCreatureSet.h" - -/* +/* * CArmedInstance.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" +#include "../CCreatureSet.h" struct BattleInfo; class CGameState; diff --git a/lib/mapObjects/CBank.h b/lib/mapObjects/CBank.h index cd057b14e..5ccbd7624 100644 --- a/lib/mapObjects/CBank.h +++ b/lib/mapObjects/CBank.h @@ -1,9 +1,4 @@ -#pragma once - -#include "CObjectHandler.h" -#include "CArmedInstance.h" - -/* +/* * CBank.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" +#include "CArmedInstance.h" struct BankConfig; class CBankInstanceConstructor; diff --git a/lib/mapObjects/CGHeroInstance.h b/lib/mapObjects/CGHeroInstance.h index f731adcef..c96d374f8 100644 --- a/lib/mapObjects/CGHeroInstance.h +++ b/lib/mapObjects/CGHeroInstance.h @@ -1,13 +1,4 @@ -#pragma once - -#include "CObjectHandler.h" -#include "CArmedInstance.h" -#include "../spells/Magic.h" - -#include "../CArtHandler.h" // For CArtifactSet -#include "../CRandomGenerator.h" - -/* +/* * CGHeroInstance.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder @@ -16,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" +#include "CArmedInstance.h" +#include "../spells/Magic.h" + +#include "../CArtHandler.h" // For CArtifactSet +#include "../CRandomGenerator.h" class CHero; class CGBoat; diff --git a/lib/mapObjects/CGMarket.cpp b/lib/mapObjects/CGMarket.cpp index 4bf20f03c..91244333c 100644 --- a/lib/mapObjects/CGMarket.cpp +++ b/lib/mapObjects/CGMarket.cpp @@ -1,5 +1,4 @@ /* - * * CGMarket.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder diff --git a/lib/mapObjects/CGMarket.h b/lib/mapObjects/CGMarket.h index e5bae62ae..bdf7cba71 100644 --- a/lib/mapObjects/CGMarket.h +++ b/lib/mapObjects/CGMarket.h @@ -1,8 +1,4 @@ -#pragma once - -#include "CObjectHandler.h" - -/* +/* * CGMarket.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" class DLL_LINKAGE IMarket { diff --git a/lib/mapObjects/CGPandoraBox.h b/lib/mapObjects/CGPandoraBox.h index 58af67ffc..a852a12e8 100644 --- a/lib/mapObjects/CGPandoraBox.h +++ b/lib/mapObjects/CGPandoraBox.h @@ -1,10 +1,4 @@ -#pragma once - -#include "CObjectHandler.h" -#include "CArmedInstance.h" -#include "../ResourceSet.h" - -/* +/* * CGPandoraBox.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" +#include "CArmedInstance.h" +#include "../ResourceSet.h" struct InfoWindow; diff --git a/lib/mapObjects/CGTownInstance.h b/lib/mapObjects/CGTownInstance.h index 7f0ac904f..a0d431818 100644 --- a/lib/mapObjects/CGTownInstance.h +++ b/lib/mapObjects/CGTownInstance.h @@ -1,11 +1,3 @@ -#pragma once - -#include "CObjectHandler.h" -#include "CGMarket.h" // For IMarket interface -#include "CArmedInstance.h" - -#include "../CTownHandler.h" // For CTown - /* * CGTownInstance.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" +#include "CGMarket.h" // For IMarket interface +#include "CArmedInstance.h" + +#include "../CTownHandler.h" // For CTown class CCastleEvent; class CGTownInstance; diff --git a/lib/mapObjects/CObjectClassesHandler.cpp b/lib/mapObjects/CObjectClassesHandler.cpp index 99ea56819..e9a22fe14 100644 --- a/lib/mapObjects/CObjectClassesHandler.cpp +++ b/lib/mapObjects/CObjectClassesHandler.cpp @@ -1,4 +1,13 @@ -#include "StdInc.h" +/* + * CObjectClassesHandler.cpp, 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 + * + */ +#include "StdInc.h" #include "CObjectClassesHandler.h" #include "../filesystem/Filesystem.h" @@ -14,16 +23,6 @@ #include "CommonConstructors.h" #include "MapObjects.h" -/* - * CObjectClassesHandler.cpp, 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 - * - */ - CObjectClassesHandler::CObjectClassesHandler() { #define SET_HANDLER_CLASS(STRING, CLASSNAME) handlerConstructors[STRING] = std::make_shared; diff --git a/lib/mapObjects/CObjectClassesHandler.h b/lib/mapObjects/CObjectClassesHandler.h index df5e552ba..5d0b70e64 100644 --- a/lib/mapObjects/CObjectClassesHandler.h +++ b/lib/mapObjects/CObjectClassesHandler.h @@ -1,13 +1,4 @@ -#pragma once - -#include "ObjectTemplate.h" - -#include "../GameConstants.h" -#include "../ConstTransitivePtr.h" -#include "../IHandlerBase.h" -#include "../JsonNode.h" - -/* +/* * CObjectClassesHandler.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder @@ -16,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "ObjectTemplate.h" + +#include "../GameConstants.h" +#include "../ConstTransitivePtr.h" +#include "../IHandlerBase.h" +#include "../JsonNode.h" class JsonNode; class CRandomGenerator; diff --git a/lib/mapObjects/CObjectHandler.h b/lib/mapObjects/CObjectHandler.h index 6975e9a29..24acdddab 100644 --- a/lib/mapObjects/CObjectHandler.h +++ b/lib/mapObjects/CObjectHandler.h @@ -1,11 +1,3 @@ -#pragma once - -#include "ObjectTemplate.h" - -//#include "../IGameCallback.h" -#include "../int3.h" -#include "../HeroBonus.h" - /* * CObjectHandler.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "ObjectTemplate.h" + +//#include "../IGameCallback.h" +#include "../int3.h" +#include "../HeroBonus.h" class CGHeroInstance; class IGameCallback; diff --git a/lib/mapObjects/CQuest.cpp b/lib/mapObjects/CQuest.cpp index 600d0c67b..f0ccffb42 100644 --- a/lib/mapObjects/CQuest.cpp +++ b/lib/mapObjects/CQuest.cpp @@ -1,5 +1,4 @@ /* - * * CQuest.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder diff --git a/lib/mapObjects/CQuest.h b/lib/mapObjects/CQuest.h index f5ef683f0..fa5268ea0 100644 --- a/lib/mapObjects/CQuest.h +++ b/lib/mapObjects/CQuest.h @@ -1,11 +1,3 @@ -#pragma once - -#include "CObjectHandler.h" -#include "CArmedInstance.h" - -#include "../CCreatureSet.h" -#include "../NetPacksBase.h" - /* * CQuest.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" +#include "CArmedInstance.h" + +#include "../CCreatureSet.h" +#include "../NetPacksBase.h" class CGCreature; diff --git a/lib/mapObjects/CRewardableConstructor.cpp b/lib/mapObjects/CRewardableConstructor.cpp index 0c84a799e..4b3ccc4f0 100644 --- a/lib/mapObjects/CRewardableConstructor.cpp +++ b/lib/mapObjects/CRewardableConstructor.cpp @@ -1,12 +1,3 @@ -#include "StdInc.h" -#include "CRewardableConstructor.h" - -#include "../CRandomGenerator.h" -#include "../StringConstants.h" -#include "../CCreatureHandler.h" -#include "JsonRandom.h" -#include "../IGameCallback.h" - /* * CRewardableConstructor.cpp, part of VCMI engine * @@ -16,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CRewardableConstructor.h" + +#include "../CRandomGenerator.h" +#include "../StringConstants.h" +#include "../CCreatureHandler.h" +#include "JsonRandom.h" +#include "../IGameCallback.h" namespace { MetaString loadMessage(const JsonNode & value) diff --git a/lib/mapObjects/CRewardableConstructor.h b/lib/mapObjects/CRewardableConstructor.h index 78f300a38..94c047bb6 100644 --- a/lib/mapObjects/CRewardableConstructor.h +++ b/lib/mapObjects/CRewardableConstructor.h @@ -1,10 +1,3 @@ -#pragma once - -#include "CRewardableObject.h" -#include "CObjectClassesHandler.h" - -#include "../JsonNode.h" - /* * CRewardableConstructor.h, part of VCMI engine * @@ -14,6 +7,12 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CRewardableObject.h" +#include "CObjectClassesHandler.h" + +#include "../JsonNode.h" class DLL_LINKAGE CRandomRewardObjectInfo : public IObjectInfo { diff --git a/lib/mapObjects/CRewardableObject.cpp b/lib/mapObjects/CRewardableObject.cpp index 27e706bb5..15927025d 100644 --- a/lib/mapObjects/CRewardableObject.cpp +++ b/lib/mapObjects/CRewardableObject.cpp @@ -1,5 +1,4 @@ /* - * * CRewardableObject.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder diff --git a/lib/mapObjects/CRewardableObject.h b/lib/mapObjects/CRewardableObject.h index 32d8df6b6..f38891b67 100644 --- a/lib/mapObjects/CRewardableObject.h +++ b/lib/mapObjects/CRewardableObject.h @@ -1,11 +1,3 @@ -#pragma once - -#include "CObjectHandler.h" -#include "CArmedInstance.h" - -#include "../NetPacksBase.h" -#include "../ResourceSet.h" - /* * CRewardableObject.h, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" +#include "CArmedInstance.h" + +#include "../NetPacksBase.h" +#include "../ResourceSet.h" class CRandomRewardObjectInfo; diff --git a/lib/mapObjects/CommonConstructors.cpp b/lib/mapObjects/CommonConstructors.cpp index 4ead155b8..c18009410 100644 --- a/lib/mapObjects/CommonConstructors.cpp +++ b/lib/mapObjects/CommonConstructors.cpp @@ -1,3 +1,12 @@ +/* + * CommonConstructors.cpp, 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 + * + */ #include "StdInc.h" #include "CommonConstructors.h" @@ -11,16 +20,6 @@ #include "../CModHandler.h" #include "../IGameCallback.h" -/* - * CommonConstructors.cpp, 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 - * - */ - CObstacleConstructor::CObstacleConstructor() { } diff --git a/lib/mapObjects/CommonConstructors.h b/lib/mapObjects/CommonConstructors.h index 0d3ff11fc..496257e32 100644 --- a/lib/mapObjects/CommonConstructors.h +++ b/lib/mapObjects/CommonConstructors.h @@ -1,9 +1,3 @@ -#pragma once - -#include "CObjectClassesHandler.h" -#include "../CTownHandler.h" // for building ID-based filters -#include "MapObjects.h" - /* * CommonConstructors.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectClassesHandler.h" +#include "../CTownHandler.h" // for building ID-based filters +#include "MapObjects.h" class CGObjectInstance; class CGTownInstance; diff --git a/lib/mapObjects/JsonRandom.cpp b/lib/mapObjects/JsonRandom.cpp index 74d24dea8..43f5ddc80 100644 --- a/lib/mapObjects/JsonRandom.cpp +++ b/lib/mapObjects/JsonRandom.cpp @@ -1,5 +1,4 @@ /* - * * JsonRandom.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder diff --git a/lib/mapObjects/JsonRandom.h b/lib/mapObjects/JsonRandom.h index ebfc5dd6f..8eaf085fb 100644 --- a/lib/mapObjects/JsonRandom.h +++ b/lib/mapObjects/JsonRandom.h @@ -1,8 +1,3 @@ -#pragma once - -#include "../GameConstants.h" -#include "../ResourceSet.h" - /* * JsonRandom.h, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../GameConstants.h" +#include "../ResourceSet.h" class JsonNode; typedef std::vector JsonVector; diff --git a/lib/mapObjects/MapObjects.h b/lib/mapObjects/MapObjects.h index 44eeb4495..63cd959f2 100644 --- a/lib/mapObjects/MapObjects.h +++ b/lib/mapObjects/MapObjects.h @@ -1,5 +1,3 @@ -#pragma once - /* * MapObjects.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once // Helper header that includes all map objects, similar to old CObjectHandler.h // Possible TODO - remove this header after CObjectHandler.cpp will be fully split into smaller files diff --git a/lib/mapObjects/MiscObjects.h b/lib/mapObjects/MiscObjects.h index ec4395430..d628c4cd8 100644 --- a/lib/mapObjects/MiscObjects.h +++ b/lib/mapObjects/MiscObjects.h @@ -1,9 +1,3 @@ -#pragma once - -#include "CObjectHandler.h" -#include "CArmedInstance.h" -#include "../ResourceSet.h" - /* * MiscObjects.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "CObjectHandler.h" +#include "CArmedInstance.h" +#include "../ResourceSet.h" class CMap; diff --git a/lib/mapObjects/ObjectTemplate.cpp b/lib/mapObjects/ObjectTemplate.cpp index f7b797a84..3fcd60be1 100644 --- a/lib/mapObjects/ObjectTemplate.cpp +++ b/lib/mapObjects/ObjectTemplate.cpp @@ -1,3 +1,12 @@ +/* + * ObjectTemplate.cpp, 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 + * + */ #include "StdInc.h" #include "CObjectClassesHandler.h" @@ -13,16 +22,6 @@ #include "CRewardableConstructor.h" -/* - * ObjectTemplate.cpp, 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 - * - */ - static bool isOnVisitableFromTopList(int identifier, int type) { if(type == 2 || type == 3 || type == 4 || type == 5) //creature, hero, artifact, resource diff --git a/lib/mapObjects/ObjectTemplate.h b/lib/mapObjects/ObjectTemplate.h index 280943ec3..14e33f750 100644 --- a/lib/mapObjects/ObjectTemplate.h +++ b/lib/mapObjects/ObjectTemplate.h @@ -1,7 +1,3 @@ -#pragma once - -#include "../GameConstants.h" - /* * ObjectTemplate.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../GameConstants.h" class CBinaryReader; class CLegacyConfigParser; diff --git a/lib/mapping/CCampaignHandler.cpp b/lib/mapping/CCampaignHandler.cpp index 48b4b7518..54e206422 100644 --- a/lib/mapping/CCampaignHandler.cpp +++ b/lib/mapping/CCampaignHandler.cpp @@ -1,3 +1,12 @@ +/* + * CCampaignHandler.cpp, 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 + * + */ #include "StdInc.h" #include "CCampaignHandler.h" @@ -17,16 +26,6 @@ namespace fs = boost::filesystem; -/* - * CCampaignHandler.cpp, 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 - * - */ - CCampaignHeader::CCampaignHeader() : version(0), mapVersion(0), difficultyChoosenByPlayer(0), music(0), filename(), loadFromLod(0) { diff --git a/lib/mapping/CCampaignHandler.h b/lib/mapping/CCampaignHandler.h index dd372786e..aed5e4efb 100644 --- a/lib/mapping/CCampaignHandler.h +++ b/lib/mapping/CCampaignHandler.h @@ -1,7 +1,3 @@ -#pragma once - -#include "../../lib/GameConstants.h" - /* * CCampaignHandler.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../../lib/GameConstants.h" struct StartInfo; class CGHeroInstance; diff --git a/lib/mapping/CMap.cpp b/lib/mapping/CMap.cpp index 7cd4bcdad..f3025f245 100644 --- a/lib/mapping/CMap.cpp +++ b/lib/mapping/CMap.cpp @@ -1,3 +1,12 @@ +/* + * CMap.cpp, 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 + * + */ #include "StdInc.h" #include "CMap.h" diff --git a/lib/mapping/CMap.h b/lib/mapping/CMap.h index c43e10f73..c8b44826c 100644 --- a/lib/mapping/CMap.h +++ b/lib/mapping/CMap.h @@ -1,4 +1,3 @@ - /* * CMap.h, part of VCMI engine * diff --git a/lib/mapping/CMapEditManager.cpp b/lib/mapping/CMapEditManager.cpp index bc2456fab..a7bf48e78 100644 --- a/lib/mapping/CMapEditManager.cpp +++ b/lib/mapping/CMapEditManager.cpp @@ -1,3 +1,12 @@ +/* + * CMapEditManager.cpp, 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 + * + */ #include "StdInc.h" #include "CMapEditManager.h" diff --git a/lib/mapping/CMapEditManager.h b/lib/mapping/CMapEditManager.h index 09875cdcc..96cad1557 100644 --- a/lib/mapping/CMapEditManager.h +++ b/lib/mapping/CMapEditManager.h @@ -1,4 +1,3 @@ - /* * CMapEditManager.h, part of VCMI engine * diff --git a/lib/mapping/CMapInfo.cpp b/lib/mapping/CMapInfo.cpp index 112b44737..919cdef40 100644 --- a/lib/mapping/CMapInfo.cpp +++ b/lib/mapping/CMapInfo.cpp @@ -1,3 +1,12 @@ +/* + * CMapInfo.cpp, 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 + * + */ #include "StdInc.h" #include "CMapInfo.h" diff --git a/lib/mapping/CMapInfo.h b/lib/mapping/CMapInfo.h index 2a71f71ef..ecbaafb34 100644 --- a/lib/mapping/CMapInfo.h +++ b/lib/mapping/CMapInfo.h @@ -1,3 +1,12 @@ +/* + * CMapInfo.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 // Forward class declarations aren't enough here. The compiler diff --git a/lib/mapping/CMapService.cpp b/lib/mapping/CMapService.cpp index 928e1dcc0..b74746c27 100644 --- a/lib/mapping/CMapService.cpp +++ b/lib/mapping/CMapService.cpp @@ -1,3 +1,12 @@ +/* + * CMapService.cpp, 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 + * + */ #include "StdInc.h" #include "CMapService.h" diff --git a/lib/mapping/CMapService.h b/lib/mapping/CMapService.h index a1d2a29cb..fc99a6c52 100644 --- a/lib/mapping/CMapService.h +++ b/lib/mapping/CMapService.h @@ -1,4 +1,3 @@ - /* * CMapService.h, part of VCMI engine * diff --git a/lib/mapping/MapFormatH3M.h b/lib/mapping/MapFormatH3M.h index b9e395d0c..563932bd4 100644 --- a/lib/mapping/MapFormatH3M.h +++ b/lib/mapping/MapFormatH3M.h @@ -1,4 +1,3 @@ - /* * MapFormatH3M.h, part of VCMI engine * diff --git a/lib/mapping/MapFormatJson.cpp b/lib/mapping/MapFormatJson.cpp index dc2ac7d93..6769e6f66 100644 --- a/lib/mapping/MapFormatJson.cpp +++ b/lib/mapping/MapFormatJson.cpp @@ -1,12 +1,12 @@ /* -* MapFormatJson.cpp, 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 -* -*/ + * MapFormatJson.cpp, 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 + * + */ #include "StdInc.h" #include "MapFormatJson.h" diff --git a/lib/mapping/MapFormatJson.h b/lib/mapping/MapFormatJson.h index 7ed307cb3..053aab85e 100644 --- a/lib/mapping/MapFormatJson.h +++ b/lib/mapping/MapFormatJson.h @@ -1,5 +1,5 @@ /* - * MapFormatJSON.h, part of VCMI engine + * MapFormatJson.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * diff --git a/lib/registerTypes/RegisterTypes.cpp b/lib/registerTypes/RegisterTypes.cpp index 95491ed1f..2f6f832bd 100644 --- a/lib/registerTypes/RegisterTypes.cpp +++ b/lib/registerTypes/RegisterTypes.cpp @@ -1,3 +1,12 @@ +/* + * RegisterTypes.cpp, 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 + * + */ #include "StdInc.h" #define INSTANTIATE_REGISTER_TYPES_HERE #include "RegisterTypes.h" diff --git a/lib/registerTypes/RegisterTypes.h b/lib/registerTypes/RegisterTypes.h index 38b21d977..049499ae7 100644 --- a/lib/registerTypes/RegisterTypes.h +++ b/lib/registerTypes/RegisterTypes.h @@ -1,4 +1,13 @@ -#pragma once +/* + * RegisterTypes.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 #include "../NetPacks.h" #include "../VCMI_Lib.h" @@ -13,16 +22,6 @@ #include "../mapObjects/MapObjects.h" #include "../battle/CObstacleInstance.h" -/* - * RegisterTypes.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 - * - */ - class BinarySerializer; class BinaryDeserializer; class CTypeList; diff --git a/lib/registerTypes/TypesClientPacks1.cpp b/lib/registerTypes/TypesClientPacks1.cpp index ac68d26e6..3044df426 100644 --- a/lib/registerTypes/TypesClientPacks1.cpp +++ b/lib/registerTypes/TypesClientPacks1.cpp @@ -1,3 +1,12 @@ +/* + * TypesClientPacks1.cpp, 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 + * + */ #include "StdInc.h" #include "RegisterTypes.h" diff --git a/lib/registerTypes/TypesClientPacks2.cpp b/lib/registerTypes/TypesClientPacks2.cpp index 086c823f0..4a6dd9b30 100644 --- a/lib/registerTypes/TypesClientPacks2.cpp +++ b/lib/registerTypes/TypesClientPacks2.cpp @@ -1,3 +1,12 @@ +/* + * TypesClientPacks2.cpp, 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 + * + */ #include "StdInc.h" #include "RegisterTypes.h" diff --git a/lib/registerTypes/TypesMapObjects1.cpp b/lib/registerTypes/TypesMapObjects1.cpp index c43e4a714..7fc2e66b6 100644 --- a/lib/registerTypes/TypesMapObjects1.cpp +++ b/lib/registerTypes/TypesMapObjects1.cpp @@ -1,3 +1,12 @@ +/* + * TypesMapObjects1.cpp, 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 + * + */ #include "StdInc.h" #include "RegisterTypes.h" diff --git a/lib/registerTypes/TypesMapObjects2.cpp b/lib/registerTypes/TypesMapObjects2.cpp index b4156c7cd..7a52f3764 100644 --- a/lib/registerTypes/TypesMapObjects2.cpp +++ b/lib/registerTypes/TypesMapObjects2.cpp @@ -1,3 +1,12 @@ +/* + * TypesMapObjects2.cpp, 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 + * + */ #include "StdInc.h" #include "RegisterTypes.h" diff --git a/lib/registerTypes/TypesMapObjects3.cpp b/lib/registerTypes/TypesMapObjects3.cpp index 6c5329cef..03022ffb7 100644 --- a/lib/registerTypes/TypesMapObjects3.cpp +++ b/lib/registerTypes/TypesMapObjects3.cpp @@ -1,3 +1,12 @@ +/* + * TypesMapObjects3.cpp, 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 + * + */ #include "StdInc.h" #include "RegisterTypes.h" diff --git a/lib/registerTypes/TypesPregamePacks.cpp b/lib/registerTypes/TypesPregamePacks.cpp index 22a64c813..3b90407a3 100644 --- a/lib/registerTypes/TypesPregamePacks.cpp +++ b/lib/registerTypes/TypesPregamePacks.cpp @@ -1,3 +1,12 @@ +/* + * TypesPregamePacks.cpp, 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 + * + */ #include "StdInc.h" #include "RegisterTypes.h" diff --git a/lib/registerTypes/TypesServerPacks.cpp b/lib/registerTypes/TypesServerPacks.cpp index ebcbd97f4..18f9e53e3 100644 --- a/lib/registerTypes/TypesServerPacks.cpp +++ b/lib/registerTypes/TypesServerPacks.cpp @@ -1,3 +1,12 @@ +/* + * TypesServerPacks.cpp, 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 + * + */ #include "StdInc.h" #include "RegisterTypes.h" diff --git a/lib/rmg/CMapGenOptions.cpp b/lib/rmg/CMapGenOptions.cpp index 34b672462..9ea875b51 100644 --- a/lib/rmg/CMapGenOptions.cpp +++ b/lib/rmg/CMapGenOptions.cpp @@ -1,4 +1,3 @@ - /* * CMapGenOptions.cpp, part of VCMI engine * diff --git a/lib/rmg/CMapGenOptions.h b/lib/rmg/CMapGenOptions.h index 7846148cb..0caf1f824 100644 --- a/lib/rmg/CMapGenOptions.h +++ b/lib/rmg/CMapGenOptions.h @@ -1,4 +1,3 @@ - /* * CMapGenOptions.h, part of VCMI engine * diff --git a/lib/rmg/CMapGenerator.cpp b/lib/rmg/CMapGenerator.cpp index 477a90939..3a5f33bc1 100644 --- a/lib/rmg/CMapGenerator.cpp +++ b/lib/rmg/CMapGenerator.cpp @@ -1,3 +1,12 @@ +/* + * CMapGenerator.cpp, 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 + * + */ #include "StdInc.h" #include "CMapGenerator.h" diff --git a/lib/rmg/CMapGenerator.h b/lib/rmg/CMapGenerator.h index fb77fa5b3..c774ab622 100644 --- a/lib/rmg/CMapGenerator.h +++ b/lib/rmg/CMapGenerator.h @@ -1,4 +1,3 @@ - /* * CMapGenerator.h, part of VCMI engine * diff --git a/lib/rmg/CRmgTemplate.cpp b/lib/rmg/CRmgTemplate.cpp index 209cbc015..3e80a86ad 100644 --- a/lib/rmg/CRmgTemplate.cpp +++ b/lib/rmg/CRmgTemplate.cpp @@ -1,4 +1,3 @@ - /* * CRmgTemplate.cpp, part of VCMI engine * diff --git a/lib/rmg/CRmgTemplate.h b/lib/rmg/CRmgTemplate.h index a792b1691..fa74f8599 100644 --- a/lib/rmg/CRmgTemplate.h +++ b/lib/rmg/CRmgTemplate.h @@ -1,4 +1,3 @@ - /* * CRmgTemplate.h, part of VCMI engine * diff --git a/lib/rmg/CRmgTemplateStorage.cpp b/lib/rmg/CRmgTemplateStorage.cpp index 67e074c23..23f957265 100644 --- a/lib/rmg/CRmgTemplateStorage.cpp +++ b/lib/rmg/CRmgTemplateStorage.cpp @@ -1,4 +1,3 @@ - /* * CRmgTemplateStorage.cpp, part of VCMI engine * diff --git a/lib/rmg/CRmgTemplateStorage.h b/lib/rmg/CRmgTemplateStorage.h index ecdafe927..2acd92f61 100644 --- a/lib/rmg/CRmgTemplateStorage.h +++ b/lib/rmg/CRmgTemplateStorage.h @@ -1,4 +1,3 @@ - /* * CRmgTemplateStorage.h, part of VCMI engine * diff --git a/lib/rmg/CRmgTemplateZone.cpp b/lib/rmg/CRmgTemplateZone.cpp index b36db2d13..497f99b78 100644 --- a/lib/rmg/CRmgTemplateZone.cpp +++ b/lib/rmg/CRmgTemplateZone.cpp @@ -1,4 +1,3 @@ - /* * CRmgTemplateZone.cpp, part of VCMI engine * diff --git a/lib/rmg/CRmgTemplateZone.h b/lib/rmg/CRmgTemplateZone.h index 686d9794f..94ae8d1a9 100644 --- a/lib/rmg/CRmgTemplateZone.h +++ b/lib/rmg/CRmgTemplateZone.h @@ -1,4 +1,3 @@ - /* * CRmgTemplateZone.h, part of VCMI engine * diff --git a/lib/rmg/CZoneGraphGenerator.cpp b/lib/rmg/CZoneGraphGenerator.cpp index ce83c7e19..1f7df0d41 100644 --- a/lib/rmg/CZoneGraphGenerator.cpp +++ b/lib/rmg/CZoneGraphGenerator.cpp @@ -1,4 +1,3 @@ - /* * CZoneGraphGenerator.cpp, part of VCMI engine * diff --git a/lib/rmg/CZoneGraphGenerator.h b/lib/rmg/CZoneGraphGenerator.h index 02e111f61..4cb1f8d2c 100644 --- a/lib/rmg/CZoneGraphGenerator.h +++ b/lib/rmg/CZoneGraphGenerator.h @@ -1,4 +1,3 @@ - /* * CZoneGraphGenerator.h, part of VCMI engine * diff --git a/lib/rmg/CZonePlacer.cpp b/lib/rmg/CZonePlacer.cpp index b1bf33c3c..92567f347 100644 --- a/lib/rmg/CZonePlacer.cpp +++ b/lib/rmg/CZonePlacer.cpp @@ -1,4 +1,3 @@ - /* * CZonePlacer.cpp, part of VCMI engine * diff --git a/lib/rmg/CZonePlacer.h b/lib/rmg/CZonePlacer.h index 15e8ece92..75a6d6bde 100644 --- a/lib/rmg/CZonePlacer.h +++ b/lib/rmg/CZonePlacer.h @@ -1,4 +1,3 @@ - /* * CZonePlacer.h, part of VCMI engine * diff --git a/lib/rmg/float3.h b/lib/rmg/float3.h index cf807a43f..d4cbc12d7 100644 --- a/lib/rmg/float3.h +++ b/lib/rmg/float3.h @@ -1,5 +1,3 @@ -#pragma once - /* * float3.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once // FIXME: Class doesn't contain three float values. Update name and description. /// Class which consists of three float values. Represents position virtual RMG (0;1) area. diff --git a/lib/serializer/BinaryDeserializer.cpp b/lib/serializer/BinaryDeserializer.cpp index ce47c7c43..b6752365f 100644 --- a/lib/serializer/BinaryDeserializer.cpp +++ b/lib/serializer/BinaryDeserializer.cpp @@ -1,8 +1,3 @@ -#include "StdInc.h" -#include "BinaryDeserializer.h" - -#include "../registerTypes/RegisterTypes.h" - /* * BinaryDeserializer.cpp, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "BinaryDeserializer.h" + +#include "../registerTypes/RegisterTypes.h" extern template void registerTypes(BinaryDeserializer & s); diff --git a/lib/serializer/BinaryDeserializer.h b/lib/serializer/BinaryDeserializer.h index 5a3a51928..8a16b2e19 100644 --- a/lib/serializer/BinaryDeserializer.h +++ b/lib/serializer/BinaryDeserializer.h @@ -1,4 +1,3 @@ - /* * BinaryDeserializer.h, part of VCMI engine * @@ -8,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include diff --git a/lib/serializer/BinarySerializer.cpp b/lib/serializer/BinarySerializer.cpp index b5b7276ec..7a6e76c4b 100644 --- a/lib/serializer/BinarySerializer.cpp +++ b/lib/serializer/BinarySerializer.cpp @@ -1,8 +1,3 @@ -#include "StdInc.h" -#include "BinarySerializer.h" - -#include "../registerTypes/RegisterTypes.h" - /* * BinarySerializer.cpp, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "BinarySerializer.h" + +#include "../registerTypes/RegisterTypes.h" extern template void registerTypes(BinarySerializer & s); diff --git a/lib/serializer/BinarySerializer.h b/lib/serializer/BinarySerializer.h index 74949607c..5f26157b8 100644 --- a/lib/serializer/BinarySerializer.h +++ b/lib/serializer/BinarySerializer.h @@ -1,4 +1,3 @@ - /* * BinarySerializer.h, part of VCMI engine * @@ -8,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "CTypeList.h" diff --git a/lib/serializer/CLoadIntegrityValidator.cpp b/lib/serializer/CLoadIntegrityValidator.cpp index 6eb07572c..65269ba94 100644 --- a/lib/serializer/CLoadIntegrityValidator.cpp +++ b/lib/serializer/CLoadIntegrityValidator.cpp @@ -1,8 +1,3 @@ -#include "StdInc.h" -#include "CLoadIntegrityValidator.h" - -#include "../registerTypes/RegisterTypes.h" - /* * CLoadIntegrityValidator.cpp, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CLoadIntegrityValidator.h" + +#include "../registerTypes/RegisterTypes.h" CLoadIntegrityValidator::CLoadIntegrityValidator(const boost::filesystem::path &primaryFileName, const boost::filesystem::path &controlFileName, int minimalVersion /*= version*/) : serializer(this), foundDesync(false) diff --git a/lib/serializer/CLoadIntegrityValidator.h b/lib/serializer/CLoadIntegrityValidator.h index c97ed05e7..7ab627914 100644 --- a/lib/serializer/CLoadIntegrityValidator.h +++ b/lib/serializer/CLoadIntegrityValidator.h @@ -1,4 +1,3 @@ - /* * CLoadIntegrityValidator.h, part of VCMI engine * @@ -8,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "BinaryDeserializer.h" diff --git a/lib/serializer/CMemorySerializer.cpp b/lib/serializer/CMemorySerializer.cpp index 341b6a9d6..e63fa67b5 100644 --- a/lib/serializer/CMemorySerializer.cpp +++ b/lib/serializer/CMemorySerializer.cpp @@ -1,8 +1,3 @@ -#include "StdInc.h" -#include "CMemorySerializer.h" - -#include "../registerTypes/RegisterTypes.h" - /* * CMemorySerializer.cpp, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CMemorySerializer.h" + +#include "../registerTypes/RegisterTypes.h" int CMemorySerializer::read(void * data, unsigned size) { diff --git a/lib/serializer/CMemorySerializer.h b/lib/serializer/CMemorySerializer.h index 868da3b8f..799faa424 100644 --- a/lib/serializer/CMemorySerializer.h +++ b/lib/serializer/CMemorySerializer.h @@ -1,4 +1,3 @@ - /* * CMemorySerializer.h, part of VCMI engine * @@ -8,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "BinarySerializer.h" diff --git a/lib/serializer/CSerializer.cpp b/lib/serializer/CSerializer.cpp index 7127f601f..00aa956c6 100644 --- a/lib/serializer/CSerializer.cpp +++ b/lib/serializer/CSerializer.cpp @@ -1,11 +1,3 @@ -#include "StdInc.h" -#include "CSerializer.h" - -#include "../CGameState.h" -#include "../mapping/CMap.h" -#include "../CHeroHandler.h" -#include "../mapObjects/CGHeroInstance.h" - /* * CSerializer.cpp, part of VCMI engine * @@ -15,6 +7,13 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CSerializer.h" + +#include "../CGameState.h" +#include "../mapping/CMap.h" +#include "../CHeroHandler.h" +#include "../mapObjects/CGHeroInstance.h" CSerializer::~CSerializer() { diff --git a/lib/serializer/CSerializer.h b/lib/serializer/CSerializer.h index a7805d534..8341a4120 100644 --- a/lib/serializer/CSerializer.h +++ b/lib/serializer/CSerializer.h @@ -1,4 +1,3 @@ - /* * CSerializer.h, part of VCMI engine * @@ -8,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "../ConstTransitivePtr.h" diff --git a/lib/serializer/CTypeList.cpp b/lib/serializer/CTypeList.cpp index 63366c4a9..c50eaa7e5 100644 --- a/lib/serializer/CTypeList.cpp +++ b/lib/serializer/CTypeList.cpp @@ -1,8 +1,3 @@ -#include "StdInc.h" -#include "CTypeList.h" - -#include "../registerTypes/RegisterTypes.h" - /* * CTypeList.cpp, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "CTypeList.h" + +#include "../registerTypes/RegisterTypes.h" extern template void registerTypes(CTypeList & s); diff --git a/lib/serializer/CTypeList.h b/lib/serializer/CTypeList.h index d09bc0ce5..7832ddc54 100644 --- a/lib/serializer/CTypeList.h +++ b/lib/serializer/CTypeList.h @@ -1,4 +1,3 @@ - /* * CTypeList.h, part of VCMI engine * @@ -8,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "CSerializer.h" diff --git a/lib/serializer/Connection.cpp b/lib/serializer/Connection.cpp index 6bf935e0e..0af175e74 100644 --- a/lib/serializer/Connection.cpp +++ b/lib/serializer/Connection.cpp @@ -1,12 +1,3 @@ -#include "StdInc.h" -#include "Connection.h" - -#include "../registerTypes/RegisterTypes.h" -#include "../mapping/CMap.h" -#include "../CGameState.h" - -#include - /* * Connection.cpp, part of VCMI engine * @@ -16,6 +7,14 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "Connection.h" + +#include "../registerTypes/RegisterTypes.h" +#include "../mapping/CMap.h" +#include "../CGameState.h" + +#include using namespace boost; using namespace boost::asio::ip; diff --git a/lib/serializer/Connection.h b/lib/serializer/Connection.h index 6d069c7c8..01eb52f58 100644 --- a/lib/serializer/Connection.h +++ b/lib/serializer/Connection.h @@ -1,4 +1,3 @@ - /* * Connection.h, part of VCMI engine * @@ -8,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "BinaryDeserializer.h" diff --git a/lib/serializer/JsonDeserializer.cpp b/lib/serializer/JsonDeserializer.cpp index 43a6d097c..b9e847477 100644 --- a/lib/serializer/JsonDeserializer.cpp +++ b/lib/serializer/JsonDeserializer.cpp @@ -7,8 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - - #include "StdInc.h" #include "JsonDeserializer.h" diff --git a/lib/serializer/JsonDeserializer.h b/lib/serializer/JsonDeserializer.h index 83fbf652c..f5af6a19c 100644 --- a/lib/serializer/JsonDeserializer.h +++ b/lib/serializer/JsonDeserializer.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "JsonSerializeFormat.h" diff --git a/lib/serializer/JsonSerializeFormat.cpp b/lib/serializer/JsonSerializeFormat.cpp index 9240ae2b5..a46a74c49 100644 --- a/lib/serializer/JsonSerializeFormat.cpp +++ b/lib/serializer/JsonSerializeFormat.cpp @@ -7,8 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - - #include "StdInc.h" #include "JsonSerializeFormat.h" diff --git a/lib/serializer/JsonSerializeFormat.h b/lib/serializer/JsonSerializeFormat.h index 60032b0b2..7043bf267 100644 --- a/lib/serializer/JsonSerializeFormat.h +++ b/lib/serializer/JsonSerializeFormat.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "../JsonNode.h" diff --git a/lib/serializer/JsonSerializer.cpp b/lib/serializer/JsonSerializer.cpp index 302aa84d2..3d01b376b 100644 --- a/lib/serializer/JsonSerializer.cpp +++ b/lib/serializer/JsonSerializer.cpp @@ -7,8 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - - #include "StdInc.h" #include "JsonSerializer.h" diff --git a/lib/serializer/JsonSerializer.h b/lib/serializer/JsonSerializer.h index 4a7c51c19..9a0861466 100644 --- a/lib/serializer/JsonSerializer.h +++ b/lib/serializer/JsonSerializer.h @@ -7,7 +7,6 @@ * Full text of license available in license.txt file, in main folder * */ - #pragma once #include "JsonSerializeFormat.h" diff --git a/lib/spells/SpellMechanics.h b/lib/spells/SpellMechanics.h index 0d5305a52..6f960091a 100644 --- a/lib/spells/SpellMechanics.h +++ b/lib/spells/SpellMechanics.h @@ -1,13 +1,12 @@ /* -* SpellMechanics.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 -* -*/ - + * SpellMechanics.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 #include "CSpellHandler.h" diff --git a/lib/vcmi_endian.h b/lib/vcmi_endian.h index 215422ba2..865be44be 100644 --- a/lib/vcmi_endian.h +++ b/lib/vcmi_endian.h @@ -1,8 +1,3 @@ -#pragma once - -//FIXME:library file depends on SDL - make cause troubles -#include - /* * vcmi_endian.h, part of VCMI engine * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +//FIXME:library file depends on SDL - make cause troubles +#include /* Reading values from memory. * diff --git a/scripting/erm/ERMInterpreter.cpp b/scripting/erm/ERMInterpreter.cpp index 401837e9d..86ed06f84 100644 --- a/scripting/erm/ERMInterpreter.cpp +++ b/scripting/erm/ERMInterpreter.cpp @@ -1,3 +1,12 @@ +/* + * ERMInterpreter.cpp, 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 + * + */ #include "StdInc.h" #include "ERMInterpreter.h" @@ -11,16 +20,6 @@ #include "../../lib/mapObjects/CGHeroInstance.h" #include "../../lib/mapObjects/MiscObjects.h" -/* - * ERMInterpreter.cpp, 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 - * - */ - namespace spirit = boost::spirit; using namespace VERMInterpreter; diff --git a/scripting/erm/ERMInterpreter.h b/scripting/erm/ERMInterpreter.h index 2e2671684..074e1d9e1 100644 --- a/scripting/erm/ERMInterpreter.h +++ b/scripting/erm/ERMInterpreter.h @@ -1,9 +1,3 @@ -#pragma once - - -#include "ERMParser.h" -#include "ERMScriptModule.h" - /* * ERMInterpreter.h, part of VCMI engine * @@ -13,6 +7,11 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + + +#include "ERMParser.h" +#include "ERMScriptModule.h" namespace VERMInterpreter { diff --git a/scripting/erm/ERMParser.cpp b/scripting/erm/ERMParser.cpp index 6f7c12900..ba61e7177 100644 --- a/scripting/erm/ERMParser.cpp +++ b/scripting/erm/ERMParser.cpp @@ -1,3 +1,12 @@ +/* + * ERMParser.cpp, 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 + * + */ #include "StdInc.h" #include "ERMParser.h" @@ -16,17 +25,6 @@ namespace ascii = spirit::ascii; namespace phoenix = boost::phoenix; -/* - * ERMParser.cpp, 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 - * - */ - - //Greenspun's Tenth Rule of Programming: //Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, //bug-ridden, slow implementation of half of Common Lisp. diff --git a/scripting/erm/ERMParser.h b/scripting/erm/ERMParser.h index 86b0ae4cc..35f1ed148 100644 --- a/scripting/erm/ERMParser.h +++ b/scripting/erm/ERMParser.h @@ -1,4 +1,3 @@ -#pragma once /* * ERMParser.h, part of VCMI engine * @@ -8,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once #include diff --git a/scripting/erm/ERMScriptModule.cpp b/scripting/erm/ERMScriptModule.cpp index 587945b52..a29bc1867 100644 --- a/scripting/erm/ERMScriptModule.cpp +++ b/scripting/erm/ERMScriptModule.cpp @@ -1,10 +1,5 @@ -#include "StdInc.h" -#include "ERMScriptModule.h" - -#include "ERMInterpreter.h" - /* - * ERMScriptingModule.cpp, part of VCMI engine + * ERMScriptModule.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * @@ -12,6 +7,10 @@ * Full text of license available in license.txt file, in main folder * */ +#include "StdInc.h" +#include "ERMScriptModule.h" + +#include "ERMInterpreter.h" IGameEventRealizer *acb; CPrivilagedInfoCallback *icb; @@ -31,4 +30,4 @@ extern "C" DLL_EXPORT void GetAiName(char* name) extern "C" DLL_EXPORT void GetNewModule(std::shared_ptr &out) { out = std::make_shared(); -} \ No newline at end of file +} diff --git a/scripting/erm/ERMScriptModule.h b/scripting/erm/ERMScriptModule.h index 1f9123e58..bce8f0ef8 100644 --- a/scripting/erm/ERMScriptModule.h +++ b/scripting/erm/ERMScriptModule.h @@ -1,9 +1,5 @@ -#pragma once - -#include "../../lib/CScriptingModule.h" - /* - * ERMScriptingModule.h, part of VCMI engine + * ERMScriptModule.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * @@ -11,7 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once +#include "../../lib/CScriptingModule.h" extern IGameEventRealizer *acb; extern CPrivilagedInfoCallback *icb; diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index eb2adaf53..32d2b7a32 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -1,3 +1,12 @@ +/* + * CGameHandler.cpp, 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 + * + */ #include "StdInc.h" #include "../lib/filesystem/Filesystem.h" @@ -34,17 +43,6 @@ #include "../lib/serializer/CTypeList.h" #include "../lib/serializer/Connection.h" -/* - * CGameHandler.cpp, 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 - * - */ - - #ifndef _MSC_VER #include #endif diff --git a/server/CGameHandler.h b/server/CGameHandler.h index b184d627a..181b7c952 100644 --- a/server/CGameHandler.h +++ b/server/CGameHandler.h @@ -1,12 +1,3 @@ -#pragma once - - -#include "../lib/FunctionList.h" -#include "../lib/IGameCallback.h" -#include "../lib/battle/BattleAction.h" -#include "CQuery.h" - - /* * CGameHandler.h, part of VCMI engine * @@ -16,6 +7,12 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include "../lib/FunctionList.h" +#include "../lib/IGameCallback.h" +#include "../lib/battle/BattleAction.h" +#include "CQuery.h" class CGameHandler; class CVCMIServer; diff --git a/server/CQuery.cpp b/server/CQuery.cpp index 734a1bce5..5fc8ee93a 100644 --- a/server/CQuery.cpp +++ b/server/CQuery.cpp @@ -1,3 +1,12 @@ +/* + * CQuery.cpp, 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 + * + */ #include "StdInc.h" #include "CQuery.h" #include "CGameHandler.h" diff --git a/server/CQuery.h b/server/CQuery.h index 90cc7e858..7f68e2798 100644 --- a/server/CQuery.h +++ b/server/CQuery.h @@ -1,3 +1,12 @@ +/* + * CQuery.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 #include "../lib/GameConstants.h" #include "../lib/int3.h" diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp index 363af7aec..44d66440d 100644 --- a/server/CVCMIServer.cpp +++ b/server/CVCMIServer.cpp @@ -1,3 +1,12 @@ +/* + * CVCMIServer.cpp, 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 + * + */ #include "StdInc.h" #include @@ -45,16 +54,6 @@ std::atomic serverShuttingDown(false); boost::program_options::variables_map cmdLineOptions; -/* - * CVCMIServer.cpp, 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 - * - */ - static void vaccept(boost::asio::ip::tcp::acceptor *ac, boost::asio::ip::tcp::socket *s, boost::system::error_code *error) { ac->accept(*s,*error); diff --git a/server/CVCMIServer.h b/server/CVCMIServer.h index 8374cc789..b59f8c0fe 100644 --- a/server/CVCMIServer.h +++ b/server/CVCMIServer.h @@ -1,7 +1,3 @@ -#pragma once - -#include - /* * CVCMIServer.h, part of VCMI engine * @@ -11,6 +7,9 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once + +#include class CMapInfo; diff --git a/server/NetPacksServer.cpp b/server/NetPacksServer.cpp index 279f56c52..c63b0e6bc 100644 --- a/server/NetPacksServer.cpp +++ b/server/NetPacksServer.cpp @@ -1,3 +1,12 @@ +/* + * NetPacksServer.cpp, 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 + * + */ #include "StdInc.h" #include "../lib/NetPacks.h" @@ -32,16 +41,6 @@ #define ERROR_IF_NOT(player) do{if(player != gh->getPlayerAt(c)){WRONG_PLAYER_MSG(player); ERROR_AND_RETURN; }}while(0) #define COMPLAIN_AND_RETURN(txt) { gh->complain(txt); ERROR_AND_RETURN; } -/* - * NetPacksServer.cpp, 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 - * - */ - CGameState* CPackForServer::GS(CGameHandler *gh) { diff --git a/server/StdInc.h b/server/StdInc.h index 08c4b8424..93c03f372 100644 --- a/server/StdInc.h +++ b/server/StdInc.h @@ -1,3 +1,12 @@ +/* + * StdInc.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 #include "../Global.h" diff --git a/test/Battlefield.cpp b/test/Battlefield.cpp index ac09ca65e..2c79967f9 100644 --- a/test/Battlefield.cpp +++ b/test/Battlefield.cpp @@ -1,5 +1,5 @@ /* - * BattleField.cpp, part of VCMI engine + * Battlefield.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * diff --git a/test/CMapEditManagerTest.cpp b/test/CMapEditManagerTest.cpp index 6f5c264f6..d05803ef3 100644 --- a/test/CMapEditManagerTest.cpp +++ b/test/CMapEditManagerTest.cpp @@ -1,4 +1,3 @@ - /* * CMapEditManagerTest.cpp, part of VCMI engine * diff --git a/test/CMapFormatTest.cpp b/test/CMapFormatTest.cpp index 41820ab81..82b454f20 100644 --- a/test/CMapFormatTest.cpp +++ b/test/CMapFormatTest.cpp @@ -1,4 +1,3 @@ - /* * CMapFormatTest.cpp, part of VCMI engine * diff --git a/test/CMemoryBufferTest.cpp b/test/CMemoryBufferTest.cpp index a0156b9fc..4370e0fa3 100644 --- a/test/CMemoryBufferTest.cpp +++ b/test/CMemoryBufferTest.cpp @@ -1,4 +1,3 @@ - /* * CMemoryBufferTest.cpp, part of VCMI engine * diff --git a/test/CVcmiTestConfig.cpp b/test/CVcmiTestConfig.cpp index 9aca6b25f..4f30cd550 100644 --- a/test/CVcmiTestConfig.cpp +++ b/test/CVcmiTestConfig.cpp @@ -1,4 +1,3 @@ - /* * CVcmiTestConfig.cpp, part of VCMI engine * diff --git a/test/CVcmiTestConfig.h b/test/CVcmiTestConfig.h index c4096363b..666eb6203 100644 --- a/test/CVcmiTestConfig.h +++ b/test/CVcmiTestConfig.h @@ -1,5 +1,3 @@ -#pragma once - /* * CVcmiTestConfig.h, part of VCMI engine * @@ -9,6 +7,7 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once /// Global setup/tear down class for unit tests. class CVcmiTestConfig