mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like IGameCallback did before. However CClient no longer needs dummy implementation of IGameEventCallback - CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for callback. Actual events can only be emitted in calls that receive IGameEventCallback pointer, e.g. heroVisit - CGameHandler now inherits directly from both CPrivilegedInfoCallback and IGameEventCallback as it did before via IGameCallback
This commit is contained in:
@@ -22,7 +22,7 @@ class CInputStream;
|
||||
|
||||
class IMapLoader;
|
||||
class IMapPatcher;
|
||||
class IGameCallback;
|
||||
class CPrivilegedInfoCallback;
|
||||
|
||||
/**
|
||||
* The map service provides loading of VCMI/H3 map files. It can
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
* @param name the name of the map
|
||||
* @return a unique ptr to the loaded map class
|
||||
*/
|
||||
virtual std::unique_ptr<CMap> loadMap(const ResourcePath & name, IGameCallback * cb) const = 0;
|
||||
virtual std::unique_ptr<CMap> loadMap(const ResourcePath & name, CPrivilegedInfoCallback * cb) const = 0;
|
||||
|
||||
/**
|
||||
* Loads the VCMI/H3 map header specified by the name.
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
* @param name indicates name of file that will be used during map header patching
|
||||
* @return a unique ptr to the loaded map class
|
||||
*/
|
||||
virtual std::unique_ptr<CMap> loadMap(const uint8_t * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding, IGameCallback * cb) const = 0;
|
||||
virtual std::unique_ptr<CMap> loadMap(const uint8_t * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding, CPrivilegedInfoCallback * cb) const = 0;
|
||||
|
||||
/**
|
||||
* Loads the VCMI/H3 map header from a buffer. This method is temporarily
|
||||
@@ -81,9 +81,9 @@ public:
|
||||
CMapService() = default;
|
||||
virtual ~CMapService() = default;
|
||||
|
||||
std::unique_ptr<CMap> loadMap(const ResourcePath & name, IGameCallback * cb) const override;
|
||||
std::unique_ptr<CMap> loadMap(const ResourcePath & name, CPrivilegedInfoCallback * cb) const override;
|
||||
std::unique_ptr<CMapHeader> loadMapHeader(const ResourcePath & name) const override;
|
||||
std::unique_ptr<CMap> loadMap(const uint8_t * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding, IGameCallback * cb) const override;
|
||||
std::unique_ptr<CMap> loadMap(const uint8_t * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding, CPrivilegedInfoCallback * cb) const override;
|
||||
std::unique_ptr<CMapHeader> loadMapHeader(const uint8_t * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const override;
|
||||
void saveMap(const std::unique_ptr<CMap> & map, boost::filesystem::path fullPath) const override;
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
*
|
||||
* @return a unique ptr of the loaded map class
|
||||
*/
|
||||
virtual std::unique_ptr<CMap> loadMap(IGameCallback * cb) = 0;
|
||||
virtual std::unique_ptr<CMap> loadMap(CPrivilegedInfoCallback * cb) = 0;
|
||||
|
||||
/**
|
||||
* Loads the VCMI/H3 map header.
|
||||
|
||||
Reference in New Issue
Block a user