mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: change return type of tile side getters to unsigned char
Value will never be higher than 7 as we only have 8 sides (0-7). Avoids having to cast as dtLink::side is an unsigned char.
This commit is contained in:
parent
b4e7bb7886
commit
d0a8549dc9
@ -715,7 +715,7 @@ dtStatus dtNavMesh::connectOffMeshLinks(const dtTileRef tileRef)
|
||||
const int nneis = getTilesAt(tx, ty, neis, MAX_NEIS);
|
||||
|
||||
const unsigned char side = rdClassifyPointOutsideBounds(&con->pos[3], header->bmin, header->bmax);
|
||||
const unsigned char oppositeSide = (side == 0xff) ? 0xff : (unsigned char)rdOppositeTile(side);
|
||||
const unsigned char oppositeSide = (side == 0xff) ? 0xff : rdOppositeTile(side);
|
||||
|
||||
for (int j = 0; j < nneis; ++j)
|
||||
{
|
||||
|
@ -617,8 +617,8 @@ inline unsigned int rdIlog2(unsigned int v)
|
||||
|
||||
inline int rdAlign4(int x) { return (x+3) & ~3; }
|
||||
|
||||
inline int rdWrapTileSide(int side) { return side & 0x7; }
|
||||
inline int rdOppositeTile(int side) { return rdWrapTileSide(side+4); }
|
||||
inline unsigned char rdWrapTileSide(const int side) { return side & 0x7; }
|
||||
inline unsigned char rdOppositeTile(const int side) { return rdWrapTileSide(side+4); }
|
||||
|
||||
inline void rdSwapByte(unsigned char* a, unsigned char* b)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user