mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Unified handling of battle sides ID's
- Replaced BattleSide namespace-enum with enum class - Merged two different BattleSide enum's into one - Merged BattlePerspective enum into BattleSide enum - Changed all places that use integers to represent battle side to use BattleSide enum - Added BattleSideArray convenience wrapper for std::array that is always 2-elements in size and allows access to its elements using BattleSide enum
This commit is contained in:
@ -24,7 +24,7 @@ VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
|
||||
///CStack
|
||||
CStack::CStack(const CStackInstance * Base, const PlayerColor & O, int I, ui8 Side, const SlotID & S):
|
||||
CStack::CStack(const CStackInstance * Base, const PlayerColor & O, int I, BattleSide Side, const SlotID & S):
|
||||
CBonusSystemNode(STACK_BATTLE),
|
||||
base(Base),
|
||||
ID(I),
|
||||
@ -45,7 +45,7 @@ CStack::CStack():
|
||||
{
|
||||
}
|
||||
|
||||
CStack::CStack(const CStackBasicDescriptor * stack, const PlayerColor & O, int I, ui8 Side, const SlotID & S):
|
||||
CStack::CStack(const CStackBasicDescriptor * stack, const PlayerColor & O, int I, BattleSide Side, const SlotID & S):
|
||||
CBonusSystemNode(STACK_BATTLE),
|
||||
ID(I),
|
||||
type(stack->type),
|
||||
@ -367,7 +367,7 @@ uint32_t CStack::unitId() const
|
||||
return ID;
|
||||
}
|
||||
|
||||
ui8 CStack::unitSide() const
|
||||
BattleSide CStack::unitSide() const
|
||||
{
|
||||
return side;
|
||||
}
|
||||
|
Reference in New Issue
Block a user