diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2023-06-10 15:12:51 +0200 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2023-06-10 15:12:51 +0200 |
| commit | 551cb7209393d06e302a5bda489c341f38efd1f3 (patch) | |
| tree | 5e35657ef65d6cd14963cd1efc051251d1a433ce /include/entity.h | |
| parent | 99c0d42297567b54510056caff059fc374513458 (diff) | |
Extract some map data definitions
Diffstat (limited to 'include/entity.h')
| -rw-r--r-- | include/entity.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/entity.h b/include/entity.h index 78dcde47..dda579a0 100644 --- a/include/entity.h +++ b/include/entity.h @@ -519,6 +519,8 @@ extern u8 gManagerCount; /** @name Tile Macros */ /// @{ #define TILE(x, y) (((((x)-gRoomControls.origin_x) >> 4) & 0x3F) | ((((y)-gRoomControls.origin_y) >> 4) & 0x3F) << 6) +// Calculate metatilePosition from x and y coordinates where x and y are already relative to the current room. +#define TILE_LOCAL(x, y) ((((x) >> 4) & 0x3F) | (((y) >> 4) & 0x3F) << 6) #define TILE_POS(x, y) (x + (y << 6)) #define TILE_POS_X_COMPONENT 0x3f #define TILE_POS_Y_COMPONENT 0xfc0 |
