Make pos->pixelPos conversion more readable

This commit is contained in:
DizzyEggg
2025-02-26 15:09:10 +01:00
parent d1b81605e4
commit 9d723ee37c
10 changed files with 32 additions and 49 deletions

View File

@@ -19,6 +19,9 @@ typedef struct PixelPos
/* 0x4 */ s32 y;
} PixelPos;
#define X_POS_TO_PIXELPOS(x)((((x) * 24) + 12) << 8)
#define Y_POS_TO_PIXELPOS(y)((((y) * 24) + 16) << 8)
/**
* Currently only used in script data, for entities and GroundLink data.
* DungeonPos expressed in terms of *graphics* tiles, 8 pixels per unit.