Merge pull request #78 from grahamboree/RC_SPAN_HEIGHT_BITS_fix

Use RC_SPAN_HEIGHT_BITS when setting the bitfield size of rcSpan::smin and rcSpan::smax
This commit is contained in:
Jakob Botsch Nielsen 2015-12-17 14:16:02 +01:00
commit 35fb7d5c16

View File

@ -255,8 +255,8 @@ static const int RC_SPANS_PER_POOL = 2048;
/// @see rcHeightfield
struct rcSpan
{
unsigned int smin : 13; ///< The lower limit of the span. [Limit: < #smax]
unsigned int smax : 13; ///< The upper limit of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT]
unsigned int smin : RC_SPAN_HEIGHT_BITS; ///< The lower limit of the span. [Limit: < #smax]
unsigned int smax : RC_SPAN_HEIGHT_BITS; ///< The upper limit of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT]
unsigned int area : 6; ///< The area id assigned to the span.
rcSpan* next; ///< The next span higher up in column.
};