fix minimap and compass for gpu mode

This commit is contained in:
Dennis
2018-12-20 01:26:18 +01:00
committed by Lucwousin
parent e49964ee1e
commit 93e1639ff3

View File

@@ -155,6 +155,21 @@ public abstract class RSSpriteMixin implements RSSprite
if (!hdMinimapEnabled)
{
rs$drawAlphaMapped(x, y, width, height, xOffset, yOffset, rotation, zoom, xOffsets, yOffsets);
// hack required for this to work with gpu mode because
// the alpha injector does not inject the copied method
int[] graphicsPixels = client.getGraphicsPixels();
int pixelOffset = x + y * client.getGraphicsPixelsWidth();
for (int h = 0; h < height; h++)
{
int offset = xOffsets[h];
int pixelIndex = pixelOffset + offset;
for (int w = -yOffsets[h]; w < 0; w++)
{
graphicsPixels[pixelIndex++] |= 0xFF000000;
}
pixelOffset += client.getGraphicsPixelsWidth();
}
return;
}
try