mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-14 15:46:06 +09:00
more SANE way of drawing elements (actor zoom broken)
Former-commit-id: edca68d5d25c4e45be209da46449ad9e0b2c35cf Former-commit-id: 38858d235b553e41bea7d506b402fe0a92a1aab0
This commit is contained in:
@@ -120,9 +120,6 @@ constructor() {
|
||||
* @param scale
|
||||
*/
|
||||
@JvmOverloads fun render(g: Graphics, posX: Float, posY: Float, scale: Float = 1f) {
|
||||
var scale = scale
|
||||
scale *= Terrarum.ingame.screenZoom
|
||||
|
||||
// Null checking
|
||||
if (currentImage == null) {
|
||||
currentImage = getScaledSprite(scale)
|
||||
@@ -139,8 +136,8 @@ constructor() {
|
||||
|
||||
flippedImage.startUse()
|
||||
flippedImage.drawEmbedded(
|
||||
Math.round(posX * Terrarum.ingame.screenZoom).toFloat(),
|
||||
FastMath.floor(posY * Terrarum.ingame.screenZoom).toFloat(),
|
||||
Math.round(posX).toFloat(),
|
||||
FastMath.floor(posY).toFloat(),
|
||||
FastMath.floor(width * scale).toFloat(),
|
||||
FastMath.floor(height * scale).toFloat()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user