mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
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:
parent
1e2c445cf3
commit
4ea7c3ebfc
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user