Browse Source

remove CObjectHandler

Laserlicht 1 month ago
parent
commit
acd067e587

+ 0 - 1
client/mapView/MapViewCache.cpp

@@ -25,7 +25,6 @@
 #include "../GameEngine.h"
 #include "../widgets/TextControls.h"
 
-#include "../../lib/mapObjects/CObjectHandler.h"
 #include "../../lib/int3.h"
 
 MapViewCache::~MapViewCache() = default;

+ 0 - 2
lib/CMakeLists.txt

@@ -153,7 +153,6 @@ set(lib_MAIN_SRCS
 	mapObjects/CGResource.cpp
 	mapObjects/TownBuildingInstance.cpp
 	mapObjects/CGTownInstance.cpp
-	mapObjects/CObjectHandler.cpp
 	mapObjects/CQuest.cpp
 	mapObjects/CRewardableObject.cpp
 	mapObjects/FlaggableMapObject.cpp
@@ -583,7 +582,6 @@ set(lib_MAIN_HEADERS
 	mapObjects/TownBuildingInstance.h
 	mapObjects/CGResource.h
 	mapObjects/CGTownInstance.h
-	mapObjects/CObjectHandler.h
 	mapObjects/CQuest.h
 	mapObjects/CRewardableObject.h
 	mapObjects/FlaggableMapObject.h

+ 0 - 2
lib/GameLibrary.cpp

@@ -37,7 +37,6 @@
 #include "filesystem/Filesystem.h"
 #include "rmg/CRmgTemplateStorage.h"
 #include "mapObjectConstructors/CObjectClassesHandler.h"
-#include "mapObjects/CObjectHandler.h"
 #include "mapObjects/ObstacleSetHandler.h"
 #include "mapping/CMapEditManager.h"
 #include "ScriptHandler.h"
@@ -182,7 +181,6 @@ void GameLibrary::initializeLibrary()
 	createHandler(creh);
 	createHandler(townh);
 	createHandler(biomeHandler);
-	createHandler(objh);
 	createHandler(objtypeh);
 	createHandler(spellSchoolHandler);
 	createHandler(spellh);

+ 0 - 3
lib/GameLibrary.h

@@ -20,7 +20,6 @@ class CHeroClassHandler;
 class CCreatureHandler;
 class CSpellHandler;
 class CSkillHandler;
-class CObjectHandler;
 class CObjectClassesHandler;
 class ObstacleSetHandler;
 class CTownHandler;
@@ -84,8 +83,6 @@ public:
 	std::unique_ptr<CSpellHandler> spellh;
 	std::unique_ptr<SpellSchoolHandler> spellSchoolHandler;
 	std::unique_ptr<CSkillHandler> skillh;
-	// TODO: Remove ObjectHandler altogether?
-	std::unique_ptr<CObjectHandler> objh;
 	std::unique_ptr<CObjectClassesHandler> objtypeh;
 	std::unique_ptr<CTownHandler> townh;
 	std::unique_ptr<CGeneralTextHandler> generaltexth;

+ 1 - 1
lib/mapObjects/CGObjectInstance.cpp

@@ -1,5 +1,5 @@
 /*
- * CObjectHandler.cpp, part of VCMI engine
+ * CGObjectInstance.cpp, part of VCMI engine
  *
  * Authors: listed in file AUTHORS in main folder
  *

+ 0 - 26
lib/mapObjects/CObjectHandler.cpp

@@ -1,26 +0,0 @@
-/*
- * CObjectHandler.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 "CObjectHandler.h"
-
-#include "CGObjectInstance.h"
-#include "../GameLibrary.h"
-#include "../entities/ResourceTypeHandler.h"
-#include "../filesystem/ResourcePath.h"
-#include "../json/JsonNode.h"
-
-VCMI_LIB_NAMESPACE_BEGIN
-
-CObjectHandler::CObjectHandler()
-{
-}
-
-VCMI_LIB_NAMESPACE_END

+ 0 - 25
lib/mapObjects/CObjectHandler.h

@@ -1,25 +0,0 @@
-/*
- * CObjectHandler.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 "../GameConstants.h"
-
-VCMI_LIB_NAMESPACE_BEGIN
-
-class CGObjectInstance;
-class int3;
-
-class DLL_LINKAGE CObjectHandler
-{
-public:
-	CObjectHandler();
-};
-
-VCMI_LIB_NAMESPACE_END

+ 0 - 2
lib/mapObjects/MapObjects.h

@@ -10,8 +10,6 @@
 #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
-#include "CObjectHandler.h"
 
 #include "CGDwelling.h"
 #include "CGHeroInstance.h"

+ 0 - 2
scripting/lua/api/ObjectInstance.h

@@ -14,8 +14,6 @@
 
 #include "../LuaWrapper.h"
 
-#include "../../../lib/mapObjects/CObjectHandler.h"
-
 namespace scripting
 {
 namespace api

+ 0 - 2
test/erm/ERM_OB_T.cpp

@@ -13,8 +13,6 @@
 
 #include "../scripting/ScriptFixture.h"
 
-#include "../../lib/mapObjects/CObjectHandler.h"
-
 namespace test
 {
 namespace scripting