2014-06-05 19:57:43 +03:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
2017-07-13 10:26:03 +02:00
|
|
|
#pragma once
|
|
|
|
|
2023-06-02 20:47:37 +02:00
|
|
|
#include "../GameConstants.h"
|
2023-04-27 22:41:41 +02:00
|
|
|
|
2022-07-26 15:07:42 +02:00
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
2014-06-25 17:11:07 +03:00
|
|
|
class CGObjectInstance;
|
2023-06-02 20:47:37 +02:00
|
|
|
class int3;
|
2014-06-05 19:57:43 +03:00
|
|
|
|
|
|
|
/// function object which can be used to find an object with an specific sub ID
|
|
|
|
class CGObjectInstanceBySubIdFinder
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CGObjectInstanceBySubIdFinder(CGObjectInstance * obj);
|
|
|
|
bool operator()(CGObjectInstance * obj) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
CGObjectInstance * obj;
|
|
|
|
};
|
|
|
|
|
|
|
|
class DLL_LINKAGE CObjectHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::vector<ui32> resVals; //default values of resources in gold
|
|
|
|
|
|
|
|
CObjectHandler();
|
|
|
|
|
|
|
|
template <typename Handler> void serialize(Handler &h, const int version)
|
|
|
|
{
|
2014-06-22 13:39:40 +03:00
|
|
|
h & resVals;
|
2014-06-05 19:57:43 +03:00
|
|
|
}
|
|
|
|
};
|
2022-07-26 15:07:42 +02:00
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|