Use RC_SPAN_HEIGHT_BITS when setting the bitfield size of smin and smax in rcSpan.
This commit is contained in:
parent
2ab396857b
commit
df6fac219b
@ -245,7 +245,7 @@ struct rcConfig
|
|||||||
/// Defines the number of bits allocated to rcSpan::smin and rcSpan::smax.
|
/// Defines the number of bits allocated to rcSpan::smin and rcSpan::smax.
|
||||||
static const int RC_SPAN_HEIGHT_BITS = 13;
|
static const int RC_SPAN_HEIGHT_BITS = 13;
|
||||||
/// Defines the maximum value for rcSpan::smin and rcSpan::smax.
|
/// Defines the maximum value for rcSpan::smin and rcSpan::smax.
|
||||||
static const int RC_SPAN_MAX_HEIGHT = (1<<RC_SPAN_HEIGHT_BITS)-1;
|
static const int RC_SPAN_MAX_HEIGHT = (1 << RC_SPAN_HEIGHT_BITS) - 1;
|
||||||
|
|
||||||
/// The number of spans allocated per span spool.
|
/// The number of spans allocated per span spool.
|
||||||
/// @see rcSpanPool
|
/// @see rcSpanPool
|
||||||
@ -255,8 +255,8 @@ static const int RC_SPANS_PER_POOL = 2048;
|
|||||||
/// @see rcHeightfield
|
/// @see rcHeightfield
|
||||||
struct rcSpan
|
struct rcSpan
|
||||||
{
|
{
|
||||||
unsigned int smin : 13; ///< The lower limit of the span. [Limit: < #smax]
|
unsigned int smin : RC_SPAN_HEIGHT_BITS; ///< 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 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.
|
unsigned int area : 6; ///< The area id assigned to the span.
|
||||||
rcSpan* next; ///< The next span higher up in column.
|
rcSpan* next; ///< The next span higher up in column.
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user