From b7bfd8a2eb94e9f10fd22c5bbb6387ab20e18ac3 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:42:25 +0300 Subject: [PATCH] Use FLAGS64 for flagmasks --- Tactical/Item Types.h | 4 ++-- Tactical/Items.cpp | 6 +++--- Tactical/Items.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Tactical/Item Types.h b/Tactical/Item Types.h index 67600237..98f57ded 100644 --- a/Tactical/Item Types.h +++ b/Tactical/Item Types.h @@ -1052,8 +1052,8 @@ typedef struct UINT64 nasLayoutClass; UINT64 ulAvailableAttachmentPoint; UINT64 ulAttachmentPoint; - UINT64 usItemFlag; // bitflags to store various item properties (better than introducing 64 BOOLEAN values). If I only had thought of this earlier.... - UINT64 usItemFlag2; // bitflags to store various item properties + FLAGS64 usItemFlag; // bitflags to store various item properties (better than introducing 64 BOOLEAN values). If I only had thought of this earlier.... + FLAGS64 usItemFlag2; // bitflags to store various item properties UINT32 uiIndex; UINT32 usItemClass; diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index c88fd215..645ba111 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -15249,18 +15249,18 @@ void CheckBombSpecifics( OBJECTTYPE * pObj, INT8* detonatortype, INT8* setting, } // Flugente: check for specific flags -BOOLEAN HasItemFlag( UINT16 usItem, UINT64 aFlag ) +BOOLEAN HasItemFlag( UINT16 usItem, FLAGS64 aFlag ) { return( (Item[usItem].usItemFlag & aFlag) != 0 ); } -BOOLEAN HasItemFlag2(UINT16 usItem, UINT64 aFlag) +BOOLEAN HasItemFlag2(UINT16 usItem, FLAGS64 aFlag) { return((Item[usItem].usItemFlag2 & aFlag) != 0); } // Flugente: get first item number that has this flag. Use with caution, as we search in all items -BOOLEAN GetFirstItemWithFlag( UINT16* pusItem, UINT64 aFlag ) +BOOLEAN GetFirstItemWithFlag( UINT16* pusItem, FLAGS64 aFlag ) { UINT16 i; for ( i = 1; i < gMAXITEMS_READ; ++i ) diff --git a/Tactical/Items.h b/Tactical/Items.h index fe9465b1..9b533363 100644 --- a/Tactical/Items.h +++ b/Tactical/Items.h @@ -566,11 +566,11 @@ UINT64 GetAvailableAttachmentPoint ( OBJECTTYPE * pObject, UINT8 subObject ); void CheckBombSpecifics( OBJECTTYPE * pObj, INT8* detonatortype, INT8* setting, INT8* defusefrequency ); // Flugente: check for specific flags -BOOLEAN HasItemFlag(UINT16 usItem, UINT64 aFlag); -BOOLEAN HasItemFlag2(UINT16 usItem, UINT64 aFlag); +BOOLEAN HasItemFlag(UINT16 usItem, FLAGS64 aFlag); +BOOLEAN HasItemFlag2(UINT16 usItem, FLAGS64 aFlag); // Flugente: get first item number that has this flag. Use with caution, as we search in all items -BOOLEAN GetFirstItemWithFlag( UINT16* pusItem, UINT64 aFlag ); +BOOLEAN GetFirstItemWithFlag( UINT16* pusItem, FLAGS64 aFlag ); // Flugente: check if this object is currently fed from an external source (belts in inventory, other mercs) BOOLEAN ObjectIsBeingFedExternal(SOLDIERTYPE* pSoldier, OBJECTTYPE * pObject);