mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 06:24:06 +09:00
adding extra headroom to the assembled sprite so that a large held item wouldn't get cropped
This commit is contained in:
@@ -76,6 +76,8 @@ class ADProperties {
|
||||
|
||||
companion object {
|
||||
const val ALL_JOINT_SELECT_KEY = "ALL"
|
||||
const val EXTRA_HEADROOM_X = 32
|
||||
const val EXTRA_HEADROOM_Y = 16
|
||||
}
|
||||
|
||||
constructor(gdxFile: FileHandle) {
|
||||
@@ -118,8 +120,8 @@ class ADProperties {
|
||||
baseFilename = get("SPRITESHEET")[0].name
|
||||
extension = get("EXTENSION")[0].name
|
||||
val frameSizeVec = get("CONFIG").linearSearchBy { it.name == "SIZE" }!!.input as ADPropertyObject.Vector2i
|
||||
frameWidth = frameSizeVec.x
|
||||
frameHeight = frameSizeVec.y
|
||||
frameWidth = frameSizeVec.x + EXTRA_HEADROOM_X
|
||||
frameHeight = frameSizeVec.y + EXTRA_HEADROOM_Y
|
||||
originX = (get("CONFIG").linearSearchBy { it.name == "ORIGINX" }!!.input as Float).toInt()
|
||||
|
||||
var maxColFinder = -1
|
||||
|
||||
Reference in New Issue
Block a user