Browse Source

Clean up.

O01eg 11 năm trước cách đây
mục cha
commit
ad84ae64b0
7 tập tin đã thay đổi với 2 bổ sung109 xóa
  1. 0 2
      CCallback.h
  2. 0 1
      lib/CGameState.h
  3. 1 1
      lib/CScriptingModule.h
  4. 0 18
      lib/IGameCallback.cpp
  5. 0 40
      lib/IGameCallback.h
  6. 0 14
      lib/IGameCallback2.cpp
  7. 1 33
      lib/IGameCallback2.h

+ 0 - 2
CCallback.h

@@ -30,8 +30,6 @@ struct CPathsInfo;
 struct CPack;
 class IBattleEventsReceiver;
 class IGameEventsReceiver;
-
-//my
 struct ArtifactLocation;
 
 class IBattleCallback

+ 0 - 1
lib/CGameState.h

@@ -15,7 +15,6 @@
 #include "ResourceSet.h"
 #include "int3.h"
 #include "CObjectHandler.h"
-//#include "IGameCallback.h"
 #include "CRandomGenerator.h"
 
 /*

+ 1 - 1
lib/CScriptingModule.h

@@ -2,7 +2,6 @@
 
 
 #include "IGameEventsReceiver.h"
-//#include "IGameCallback2.h"
 
 /*
  * CScriptingModule.h, part of VCMI engine
@@ -28,3 +27,4 @@ public:
 	CScriptingModule(){}
 	virtual ~CScriptingModule(){}
 };
+

+ 0 - 18
lib/IGameCallback.cpp

@@ -11,31 +11,13 @@
 #include "StdInc.h"
 #include "IGameCallback.h"
 
-/*#include "CGameState.h"
-#include "mapping/CMap.h"
-#include "CObjectHandler.h"*/
 #include "CHeroHandler.h" // for CHeroHandler
-/*#include "StartInfo.h"
-#include "CArtHandler.h"*/
 #include "CSpellHandler.h" // for CSpell
-/*#include "VCMI_Lib.h"
-#include "CTownHandler.h"
-#include "BattleState.h"*/
 #include "NetPacks.h"
-/*#include "CBuildingHandler.h"
-#include "GameConstants.h"
-#include "CModHandler.h"
-#include "CDefObjInfoHandler.h"*/
 #include "CBonusTypeHandler.h" // for CBonusTypeHandler
 
 #include "Connection.h" // for SAVEGAME_MAGIC
 
-//TODO make clean
-/*#define ERROR_SILENT_RET_VAL_IF(cond, txt, retVal) do {if(cond){return retVal;}} while(0)
-#define ERROR_VERBOSE_OR_NOT_RET_VAL_IF(cond, verbose, txt, retVal) do {if(cond){if(verbose)logGlobal->errorStream() << BOOST_CURRENT_FUNCTION << ": " << txt; return retVal;}} while(0)
-#define ERROR_RET_IF(cond, txt) do {if(cond){logGlobal->errorStream() << BOOST_CURRENT_FUNCTION << ": " << txt; return;}} while(0)
-#define ERROR_RET_VAL_IF(cond, txt, retVal) do {if(cond){logGlobal->errorStream() << BOOST_CURRENT_FUNCTION << ": " << txt; return retVal;}} while(0)*/
-
 void CPrivilagedInfoCallback::getFreeTiles (std::vector<int3> &tiles) const
 {
 	std::vector<int> floors;

+ 0 - 40
lib/IGameCallback.h

@@ -2,12 +2,6 @@
 
 #include "IGameCallback2.h" // for CGameInfoCallback
 
-/*#include "BattleHex.h"
-#include "ResourceSet.h"
-#include "int3.h"
-#include "GameConstants.h"
-#include "CBattleCallback.h"*/
-
 /*
  * IGameCallback.h, part of VCMI engine
  *
@@ -20,48 +14,14 @@
 
 struct SetMovePoints;
 struct GiveBonus;
-/*class CGObjectInstance;
-class CGTownInstance;
-class CGHeroInstance;*/
 struct BlockingDialog;
-/*struct InfoWindow;*/
 struct MetaString;
 struct ShowInInfobox;
-/*struct BattleResult;
-struct Component;
-class CGameState;
-struct PlayerSettings;
-struct CPackForClient;
-class CArtHandler;
-class CArtifact;
-class CArmedInstance;
-struct TerrainTile;
-struct PlayerState;
-class CTown;*/
 struct StackLocation;
 struct ArtifactLocation;
-/*class CArtifactInstance;
-struct StartInfo;
-struct InfoAboutTown;
-struct UpgradeInfo;
-struct SThievesGuildInfo;
-struct CPath;
-class CGDwelling;
-struct InfoAboutHero;
-class CMapHeader;
-struct BattleAction;
-class CStack;
-class CSpell;*/
 class CCreatureSet;
-/*class CCreature;*/
 class CStackBasicDescriptor;
-/*struct TeamState;
-struct QuestInfo;*/
 class CGCreature;
-/*class CSaveFile;
-class CLoadFile;*/
-
-//my
 struct ShashInt3;
 
 class DLL_LINKAGE CPrivilagedInfoCallback : public CGameInfoCallback

+ 0 - 14
lib/IGameCallback2.cpp

@@ -12,26 +12,12 @@
 #include "IGameCallback2.h"
 
 #include "CGameState.h" // PlayerState
-/*#include "mapping/CMap.h"*/
 #include "CObjectHandler.h" // for CGObjectInstance
-/*#include "CHeroHandler.h"*/
 #include "StartInfo.h" // for StartInfo
-/*#include "CArtHandler.h"
-#include "CSpellHandler.h"
-#include "VCMI_Lib.h"
-#include "CTownHandler.h"*/
 #include "BattleState.h" // for BattleInfo
 #include "NetPacks.h" // for InfoWindow
-/*#include "CBuildingHandler.h"
-#include "GameConstants.h"
-#include "CModHandler.h"
-#include "CDefObjInfoHandler.h"
-#include "CBonusTypeHandler.h"
-
-#include "Connection.h"*/
 
 //TODO make clean
-/*#define ERROR_SILENT_RET_VAL_IF(cond, txt, retVal) do {if(cond){return retVal;}} while(0)*/
 #define ERROR_VERBOSE_OR_NOT_RET_VAL_IF(cond, verbose, txt, retVal) do {if(cond){if(verbose)logGlobal->errorStream() << BOOST_CURRENT_FUNCTION << ": " << txt; return retVal;}} while(0)
 #define ERROR_RET_IF(cond, txt) do {if(cond){logGlobal->errorStream() << BOOST_CURRENT_FUNCTION << ": " << txt; return;}} while(0)
 #define ERROR_RET_VAL_IF(cond, txt, retVal) do {if(cond){logGlobal->errorStream() << BOOST_CURRENT_FUNCTION << ": " << txt; return retVal;}} while(0)

+ 1 - 33
lib/IGameCallback2.h

@@ -1,9 +1,6 @@
 #pragma once
 
-/*#include "BattleHex.h"*/
 #include "ResourceSet.h" // for Res::ERes
-/*#include "int3.h" // for int3
-#include "GameConstants.h"*/
 #include "CBattleCallback.h" //for CCallbackBase
 
 /*
@@ -16,52 +13,24 @@
  *
  */
 
-/*struct SetMovePoints;
-struct GiveBonus;*/
 class CGObjectInstance;
-/*class CGTownInstance;
-class CGHeroInstance;
-struct BlockingDialog;*/
 struct InfoWindow;
-/*struct MetaString;
-struct ShowInInfobox;
-struct BattleResult;
-struct Component;
-class CGameState;*/
 struct PlayerSettings;
 struct CPackForClient;
-/*class CArtHandler;
-class CArtifact;
-class CArmedInstance;*/
 struct TerrainTile;
 struct PlayerState;
 class CTown;
-/*struct StackLocation;
-struct ArtifactLocation;
-class CArtifactInstance;*/
 struct StartInfo;
 struct InfoAboutTown;
 struct UpgradeInfo;
 struct SThievesGuildInfo;
-/*struct CPath;*/
 class CGDwelling;
-/*struct InfoAboutHero;*/
 class CMapHeader;
-/*struct BattleAction;
-class CStack;
-class CSpell;
-class CCreatureSet;
-class CCreature;
-class CStackBasicDescriptor;*/
 struct TeamState;
 struct QuestInfo;
-/*class CGCreature;
-class CSaveFile;
-class CLoadFile;*/
-
-// my
 class int3;
 
+
 class DLL_LINKAGE CGameInfoCallback : public virtual CCallbackBase
 {
 protected:
@@ -142,7 +111,6 @@ public:
 	EBuildingState::EBuildingState canBuildStructure(const CGTownInstance *t, BuildingID ID) const;// 0 - no more than one capitol, 1 - lack of water, 2 - forbidden, 3 - Add another level to Mage Guild, 4 - already built, 5 - cannot build, 6 - cannot afford, 7 - build, 8 - lack of requirements
 };
 
-
 class DLL_LINKAGE CPlayerSpecificInfoCallback : public CGameInfoCallback
 {
 public: