mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Move CompoundMapObjectID to separate file
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../constants/EntityIdentifiers.h"
|
||||
#include "../mapObjects/CompoundMapObjectID.h"
|
||||
#include "../IHandlerBase.h"
|
||||
#include "../json/JsonNode.h"
|
||||
|
||||
@ -19,27 +19,6 @@ class AObjectTypeHandler;
|
||||
class ObjectTemplate;
|
||||
struct SObjectSounds;
|
||||
|
||||
struct DLL_LINKAGE CompoundMapObjectID
|
||||
{
|
||||
si32 primaryID;
|
||||
si32 secondaryID;
|
||||
|
||||
CompoundMapObjectID(si32 primID, si32 secID) : primaryID(primID), secondaryID(secID) {};
|
||||
|
||||
bool operator<(const CompoundMapObjectID& other) const
|
||||
{
|
||||
if(this->primaryID != other.primaryID)
|
||||
return this->primaryID < other.primaryID;
|
||||
else
|
||||
return this->secondaryID < other.secondaryID;
|
||||
}
|
||||
|
||||
bool operator==(const CompoundMapObjectID& other) const
|
||||
{
|
||||
return (this->primaryID == other.primaryID) && (this->secondaryID == other.secondaryID);
|
||||
}
|
||||
};
|
||||
|
||||
class CGObjectInstance;
|
||||
|
||||
using TObjectTypeHandler = std::shared_ptr<AObjectTypeHandler>;
|
||||
|
Reference in New Issue
Block a user