mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Add "USE_AGGRESSIVE_ASSERTIONS" define
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2636 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -52,6 +52,11 @@ inline void _Null() { }
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// Uncomment the follow to turn on more aggressive assertions
|
||||||
|
//
|
||||||
|
//#define USE_AGGRESSIVE_ASSERTIONS
|
||||||
|
|
||||||
#ifdef FORCE_ASSERTS_ON
|
#ifdef FORCE_ASSERTS_ON
|
||||||
|
|
||||||
// If FORCE_ASSERTS_ON is defined, we need to initialize all the debug macros. Otherwise all the
|
// If FORCE_ASSERTS_ON is defined, we need to initialize all the debug macros. Otherwise all the
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const int MAXIMUM_VALID_Z_COORDINATE = 3;
|
|||||||
const int MINIMUM_VALID_Z_COORDINATE = 0;
|
const int MINIMUM_VALID_Z_COORDINATE = 0;
|
||||||
|
|
||||||
//Macro to convert sector coordinates (1-16,1-16) to 0-255
|
//Macro to convert sector coordinates (1-16,1-16) to 0-255
|
||||||
|
#ifdef USE_AGGRESSIVE_ASSERTIONS
|
||||||
#define SECTOR(x,y) (UINT8)(AssertGE(x, MINIMUM_VALID_X_COORDINATE), \
|
#define SECTOR(x,y) (UINT8)(AssertGE(x, MINIMUM_VALID_X_COORDINATE), \
|
||||||
AssertLE(x, MAXIMUM_VALID_X_COORDINATE), \
|
AssertLE(x, MAXIMUM_VALID_X_COORDINATE), \
|
||||||
AssertGE(y, MINIMUM_VALID_Y_COORDINATE), \
|
AssertGE(y, MINIMUM_VALID_Y_COORDINATE), \
|
||||||
@@ -21,6 +22,11 @@ const int MINIMUM_VALID_Z_COORDINATE = 0;
|
|||||||
((SectorID % 16) + 1))
|
((SectorID % 16) + 1))
|
||||||
#define SECTORY(SectorID) (UINT8)(AssertLE(SectorID, MAXIMUM_VALID_X_COORDINATE*MAXIMUM_VALID_Y_COORDINATE), \
|
#define SECTORY(SectorID) (UINT8)(AssertLE(SectorID, MAXIMUM_VALID_X_COORDINATE*MAXIMUM_VALID_Y_COORDINATE), \
|
||||||
((SectorID / 16) + 1))
|
((SectorID / 16) + 1))
|
||||||
|
#else
|
||||||
|
#define SECTOR(x,y) (UINT8)(((y-1)*16+x-1))
|
||||||
|
#define SECTORX(SectorID) (UINT8)(((SectorID % 16) + 1))
|
||||||
|
#define SECTORY(SectorID) (UINT8)(((SectorID / 16) + 1))
|
||||||
|
#endif
|
||||||
|
|
||||||
//Sector enumerations
|
//Sector enumerations
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user