Permanent fix for inv sprite offset

Regression was caused by some Playground work to generate high-res sprites, and it needed a higher canvas size.
(Thanks Woahscam!)
This commit is contained in:
Pazaz 2022-08-05 07:51:26 -04:00
parent 844acc7db8
commit efba04cbe4
2 changed files with 2 additions and 2 deletions

View file

@ -693,7 +693,7 @@ public class Cs1ScriptRunner {
} else if (component == MiniMenu.pressedInventoryComponent && local270 == MiniMenu.anInt5444) {
sprite.renderAlpha(x, y, 128);
} else {
sprite.render(x - 2, y); // TODO: x - 2 is a temp fix! look at commit b57d5a00315df977aba3d60f4dce7947a5acf909
sprite.render(x, y);
// downscale:
// sprite.renderResized(x, y, 36, 32);
}

View file

@ -215,7 +215,7 @@ public final class Inv extends Node {
@Pc(133) SoftwareSprite canvas = new SoftwareSprite(canvasWidth, canvasHeight);
SoftwareRaster.setSize(canvas.pixels, canvasWidth, canvasHeight);
Rasteriser.prepare();
Rasteriser.setBounds(canvasWidth / 2, canvasHeight / 2);
Rasteriser.setBounds(16, 16); // canvasWidth / 2, canvasHeight / 2);
Rasteriser.jagged = false;
@Pc(145) int zoom = objType.zoom2d; // / 4;