From 7b6964a08f12910410db1f7380622cbd03ac158f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 11 Oct 2020 11:52:30 +0200 Subject: [PATCH] - Blood: #define replacement --- source/blood/src/messages.h | 3 --- source/blood/src/nnexts.h | 41 ++++++++++++++++++++----------------- source/blood/src/pqueue.h | 2 +- source/blood/src/qav.h | 2 +- source/blood/src/view.h | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/source/blood/src/messages.h b/source/blood/src/messages.h index 5a9702a4f..0c07c2297 100644 --- a/source/blood/src/messages.h +++ b/source/blood/src/messages.h @@ -28,9 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS -#define kMessageLogSize 32 -#define kMaxMessageTextLength 81 - enum MESSAGE_PRIORITY { MESSAGE_PRIORITY_PICKUP = -10, MESSAGE_PRIORITY_NORMAL = 0, diff --git a/source/blood/src/nnexts.h b/source/blood/src/nnexts.h index c1ace2f4c..bb678dccb 100644 --- a/source/blood/src/nnexts.h +++ b/source/blood/src/nnexts.h @@ -40,28 +40,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS -// CONSTANTS -// additional non-thing proximity, sight and physics sprites -#define kMaxSuperXSprites 128 -#define kMaxTrackingConditions 64 -#define kMaxTracedObjects 32 // per one tracking condition +enum +{ + // CONSTANTS + // additional non-thing proximity, sight and physics sprites + kMaxSuperXSprites = 128, + kMaxTrackingConditions = 64, + kMaxTracedObjects = 32, // per one tracking condition -// additional physics attributes for debris sprites -#define kPhysDebrisFly 0x0008 // *debris* affected by negative gravity (fly instead of falling, DO NOT mess with kHitagAutoAim) -#define kPhysDebrisSwim 0x0016 // *debris* can swim underwater (instead of drowning) -#define kPhysDebrisVector 0x0400 // *debris* can be affected by vector weapons -#define kPhysDebrisExplode 0x0800 // *debris* can be affected by explosions + // additional physics attributes for debris sprites + kPhysDebrisFly = 0x0008, // *debris* affected by negative gravity (fly instead of falling, DO NOT mess with kHitagAutoAim) + kPhysDebrisSwim = 0x0016, // *debris* can swim underwater (instead of drowning) + kPhysDebrisVector = 0x0400, // *debris* can be affected by vector weapons + kPhysDebrisExplode = 0x0800, // *debris* can be affected by explosions -// *modern types only hitag* -#define kModernTypeFlag0 0x0000 -#define kModernTypeFlag1 0x0001 -#define kModernTypeFlag2 0x0002 -#define kModernTypeFlag3 0x0003 -#define kModernTypeFlag4 0x0004 + // *modern types only hitag* + kModernTypeFlag0 = 0x0000, + kModernTypeFlag1 = 0x0001, + kModernTypeFlag2 = 0x0002, + kModernTypeFlag3 = 0x0003, + kModernTypeFlag4 = 0x0004, -#define kMaxRandomizeRetries 16 -#define kPercFull 100 -#define kCondRange 100 + kMaxRandomizeRetries = 16, + kPercFull = 100, + kCondRange = 100, +}; diff --git a/source/blood/src/pqueue.h b/source/blood/src/pqueue.h index 642d0f4ca..c4b149494 100644 --- a/source/blood/src/pqueue.h +++ b/source/blood/src/pqueue.h @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS -#define kPQueueSize 1024 +enum { kPQueueSize = 1024 }; template struct queueItem { diff --git a/source/blood/src/qav.h b/source/blood/src/qav.h index 1e4a28c85..6085b5c11 100644 --- a/source/blood/src/qav.h +++ b/source/blood/src/qav.h @@ -30,7 +30,7 @@ class F2DDrawer; BEGIN_BLD_NS -#define kQavOrientationLeft 4096 +enum { kQavOrientationLeft = 4096 }; #pragma pack(push, 1) diff --git a/source/blood/src/view.h b/source/blood/src/view.h index 48de4fd9c..6c2127a33 100644 --- a/source/blood/src/view.h +++ b/source/blood/src/view.h @@ -126,7 +126,7 @@ enum kSBarNumberArmor3 = 9270, }; -#define kFontNum 5 +enum { kFontNum = 5 }; extern FFont *gFont[kFontNum]; extern VIEWPOS gViewPos;