mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-06-15 10:04:05 +09:00
GDX: fixed wrong shadow col, support for flipped Y coord
This commit is contained in:
@@ -16,6 +16,11 @@ class TextureRegionPack(
|
||||
val vFrame: Int = 0
|
||||
) {
|
||||
|
||||
companion object {
|
||||
/** Intented for Y-down coord system, typically fon Non-GDX codebase */
|
||||
var globalFlipY = false
|
||||
}
|
||||
|
||||
val regions: Array<TextureRegion>
|
||||
|
||||
private val horizontalCount = (texture.width - 2 * hFrame + hGap) / (tileW + hGap)
|
||||
@@ -32,6 +37,8 @@ class TextureRegionPack(
|
||||
region.setRegion(texture)
|
||||
region.setRegion(rx, ry, tileW, tileH)
|
||||
|
||||
region.flip(false, globalFlipY)
|
||||
|
||||
/*return*/region
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user