mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
view object ++
This commit is contained in:
parent
a4e03c3f6e
commit
bd43b227e9
2 changed files with 364 additions and 320 deletions
|
@ -28,7 +28,39 @@
|
|||
//
|
||||
#include <afxcview.h>
|
||||
|
||||
#define MAKE_MASK(refVal) 1 << static_cast<int>(refVal)
|
||||
|
||||
enum class TreeViewTechnoType {
|
||||
Set_None = -1,
|
||||
Building = 0,
|
||||
Infantry,
|
||||
Vehicle,
|
||||
Aircraft,
|
||||
_Last,
|
||||
_First = 0,
|
||||
Count = _Last,
|
||||
};
|
||||
|
||||
enum class TechnoTypeMask
|
||||
{
|
||||
ForBuilding = MAKE_MASK(TreeViewTechnoType::Building),
|
||||
ForInfantry = MAKE_MASK(TreeViewTechnoType::Infantry),
|
||||
ForVehicle = MAKE_MASK(TreeViewTechnoType::Vehicle),
|
||||
ForAircraft = MAKE_MASK(TreeViewTechnoType::Aircraft),
|
||||
};
|
||||
|
||||
inline bool operator&(TechnoTypeMask lhs, TechnoTypeMask rhs)
|
||||
{
|
||||
return static_cast<int>(lhs) & static_cast<int>(rhs);
|
||||
}
|
||||
inline bool operator&(TechnoTypeMask lhs, TreeViewTechnoType rhs)
|
||||
{
|
||||
return lhs & static_cast<TechnoTypeMask>(MAKE_MASK(rhs));
|
||||
}
|
||||
inline bool operator&(TreeViewTechnoType lhs, TechnoTypeMask rhs)
|
||||
{
|
||||
return rhs & static_cast<TechnoTypeMask>(MAKE_MASK(lhs));
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Ansicht CViewObjects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue