Improve LayerStruct

This commit is contained in:
octorock
2022-03-05 11:43:58 +01:00
parent d18fed1fb9
commit d6bbbf2db6
67 changed files with 720 additions and 1213 deletions
+1
View File
@@ -506,6 +506,7 @@ extern u8 gManagerCount;
/** @name Tile Macros */ /// @{
#define TILE(x, y) (((((x)-gRoomControls.origin_x) >> 4) & 0x3F) | ((((y)-gRoomControls.origin_y) >> 4) & 0x3F) << 6)
#define TILE_POS(x, y) (x + (y << 6))
#define COORD_TO_TILE(entity) TILE((entity)->x.HALF.HI, (entity)->y.HALF.HI)
#define COORD_TO_TILE_OFFSET(entity, xOff, yOff) TILE((entity)->x.HALF.HI - (xOff), (entity)->y.HALF.HI - (yOff))
/// @}