fix: held items now glow (or not glow) under UV as they should

This commit is contained in:
minjaesong
2022-12-27 04:19:13 +09:00
parent 801acd2f24
commit 856bd93329
8 changed files with 89 additions and 31 deletions

View File

@@ -27,8 +27,8 @@ object PlayerBuilderTestSubject1 {
p.sprite!!.delays = floatArrayOf(2f, 1f/12f) // second value does nothing -- overridden by ActorHumanoid.updateSprite(float)
p.sprite!!.setRowsAndFrames(2, 4)*/
p.animDesc?.let { p.sprite = AssembledSpriteAnimation(it, p) }
p.animDescGlow?.let { p.spriteGlow = AssembledSpriteAnimation(it, p) }
p.animDesc?.let { p.sprite = AssembledSpriteAnimation(it, p, false) }
p.animDescGlow?.let { p.spriteGlow = AssembledSpriteAnimation(it, p, true) }
//p.reassembleSprite(p.sprite, p.spriteGlow, null)
p.setHitboxDimension(15, p.actorValue.getAsInt(AVKey.BASEHEIGHT) ?: ActorHumanoid.BASE_HEIGHT, 21, 0)

View File

@@ -29,8 +29,8 @@ object PlayerBuilderWerebeastTest {
p.sprite!!.delays = floatArrayOf(2f, 1f/12f) // second value does nothing -- overridden by ActorHumanoid.updateSprite(float)
p.sprite!!.setRowsAndFrames(2, 4)*/
p.animDesc?.let { p.sprite = AssembledSpriteAnimation(it, p) }
p.animDescGlow?.let { p.spriteGlow = AssembledSpriteAnimation(it, p) }
p.animDesc?.let { p.sprite = AssembledSpriteAnimation(it, p, false) }
p.animDescGlow?.let { p.spriteGlow = AssembledSpriteAnimation(it, p, true) }
//p.reassembleSprite(p.sprite, p.spriteGlow, null)
p.setHitboxDimension(22, p.actorValue.getAsInt(AVKey.BASEHEIGHT)!!, 30, 0)

View File

@@ -165,18 +165,20 @@ object ReadActor {
actor.animDesc = ADProperties(ByteArray64Reader(animFile!!.bytes, Common.CHARSET))
actor.sprite = AssembledSpriteAnimation(
actor.animDesc!!,
actor,
if (bodypartsFile != null) disk else null,
if (bodypartsFile != null) BODYPART_TO_ENTRY_MAP else null
actor.animDesc!!,
actor,
if (bodypartsFile != null) disk else null,
if (bodypartsFile != null) BODYPART_TO_ENTRY_MAP else null,
false
)
if (animFileGlow != null) {
actor.animDescGlow = ADProperties(ByteArray64Reader(animFileGlow.bytes, Common.CHARSET))
actor.spriteGlow = AssembledSpriteAnimation(
actor.animDescGlow!!,
actor,
if (bodypartsFile != null) disk else null,
if (bodypartsFile != null) BODYPARTGLOW_TO_ENTRY_MAP else null
actor.animDescGlow!!,
actor,
if (bodypartsFile != null) disk else null,
if (bodypartsFile != null) BODYPARTGLOW_TO_ENTRY_MAP else null,
true
)
}
@@ -190,8 +192,8 @@ object ReadActor {
actor.reassembleSprite(actor.sprite!!, actor.spriteGlow, heldItem)*/
}
else if (actor is ActorWithBody && actor is HasAssembledSprite) {
if (actor.animDesc != null) actor.sprite = AssembledSpriteAnimation(actor.animDesc!!, actor)
if (actor.animDescGlow != null) actor.spriteGlow = AssembledSpriteAnimation(actor.animDescGlow!!, actor)
if (actor.animDesc != null) actor.sprite = AssembledSpriteAnimation(actor.animDesc!!, actor, false)
if (actor.animDescGlow != null) actor.spriteGlow = AssembledSpriteAnimation(actor.animDescGlow!!, actor, true)
//actor.reassembleSprite(actor.sprite, actor.spriteGlow, null)
}