Not supposed to calculate height in rendering pixel array values

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 2 years ago committed by GitHub
parent 7ec9aefae6
commit 046a56ba2a
  1. BIN
      RabiClone_0.0a.zip
  2. BIN
      bin/RabiClone.jar
  3. 2
      src/sig/objects/LevelRenderer.java

Binary file not shown.

Binary file not shown.

@ -123,7 +123,7 @@ public class LevelRenderer extends Object{
//Draw the water background at double size because it's half the screen's width and height.
int index = y*RabiClone.BASE_WIDTH+x;
p[index] = Sprite.WATER_OVERLAY.getBi_array()[
((y/2)*Sprite.WATER_OVERLAY.getCanvasHeight())*Sprite.WATER_OVERLAY.getCanvasWidth()+(x/2)*Sprite.WATER_OVERLAY.getCanvasWidth()
(y/2)*Sprite.WATER_OVERLAY.getCanvasWidth()+(x/2)*Sprite.WATER_OVERLAY.getCanvasWidth()
];
}
}

Loading…
Cancel
Save