Recast: add tile side wrapper

This allows for getting the direct side of a side by doing side-1, side+1, etc.. A useful case would be to get tiles at sides facing the normal of an edge on our own tile and doing anything with these tiles.
This commit is contained in:
Kawe Mazidjatari 2024-11-02 21:00:21 +01:00
parent 1e2c445cf3
commit 4ea7c3ebfc

View File

@ -617,7 +617,8 @@ inline unsigned int rdIlog2(unsigned int v)
inline int rdAlign4(int x) { return (x+3) & ~3; }
inline int rdOppositeTile(int side) { return (side+4) & 0x7; }
inline int rdWrapTileSide(int side) { return side & 0x7; }
inline int rdOppositeTile(int side) { return rdWrapTileSide(side+4); }
inline void rdSwapByte(unsigned char* a, unsigned char* b)
{