[nostalgia/core] Specify a maximum for priority level
This commit is contained in:
parent
0093778f64
commit
8dd6adc554
@ -23,6 +23,9 @@ struct Sprite {
|
||||
unsigned spriteShape = 0;
|
||||
unsigned spriteSize = 0;
|
||||
unsigned flipX = 0;
|
||||
/**
|
||||
* Valid priorities: 0-3
|
||||
*/
|
||||
unsigned priority = 0;
|
||||
};
|
||||
|
||||
|
@ -113,7 +113,7 @@ static void setSpriteBufferObject(
|
||||
y *= -ymod;
|
||||
x -= 1.f;
|
||||
y += 1.f - ymod;
|
||||
auto const prif = static_cast<float>(priority) * 0.1f;
|
||||
auto const prif = static_cast<float>(priority) * 0.01f;
|
||||
auto const textureRowf = static_cast<float>(textureRow);
|
||||
float const L = flipX ? 1 : 0;
|
||||
float const R = flipX ? 0 : 1;
|
||||
@ -416,7 +416,7 @@ static void setSprite(
|
||||
fY,
|
||||
s.tileIdx + i,
|
||||
s.flipX,
|
||||
s.priority,
|
||||
s.priority & 0b11,
|
||||
vbo,
|
||||
ebo);
|
||||
++i;
|
||||
|
Loading…
Reference in New Issue
Block a user