mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 08:45:46 -04:00
GPU: Mask variable sprite/rectangle sizes
Fixes broken sprites in Gradius Deluxe Pack (Gradius II).
This commit is contained in:
@ -304,18 +304,19 @@ void GPU_HW::LoadVertices()
|
||||
default:
|
||||
{
|
||||
const u32 width_and_height = m_fifo.Pop();
|
||||
rectangle_width = static_cast<s32>(width_and_height & 0xFFFF);
|
||||
rectangle_height = static_cast<s32>(width_and_height >> 16);
|
||||
rectangle_width = static_cast<s32>(width_and_height & VRAM_WIDTH_MASK);
|
||||
rectangle_height = static_cast<s32>((width_and_height >> 16) & VRAM_HEIGHT_MASK);
|
||||
|
||||
if (rectangle_width >= MAX_PRIMITIVE_WIDTH || rectangle_height >= MAX_PRIMITIVE_HEIGHT)
|
||||
{
|
||||
Log_DebugPrintf("Culling too-large rectangle: %d,%d %dx%d", pos_x, pos_y, rectangle_width,
|
||||
rectangle_height);
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (rectangle_width >= MAX_PRIMITIVE_WIDTH || rectangle_height >= MAX_PRIMITIVE_HEIGHT)
|
||||
{
|
||||
Log_DebugPrintf("Culling too-large rectangle: %d,%d %dx%d", pos_x, pos_y, rectangle_width, rectangle_height);
|
||||
return;
|
||||
}
|
||||
|
||||
// we can split the rectangle up into potentially 8 quads
|
||||
DebugAssert(GetBatchVertexSpace() >= MAX_VERTICES_FOR_RECTANGLE);
|
||||
|
||||
|
Reference in New Issue
Block a user