fixed roundworld anormaly, camera zoom still broken

Former-commit-id: ec08c302349c962992a111e820b60eb0a46d7c2e
Former-commit-id: 5bcf3baf2ec194c431b009aa2839ff11caa4d82d
This commit is contained in:
Song Minjae
2016-12-18 01:39:03 +09:00
parent 56530a6041
commit 9c7e7ed266
9 changed files with 170 additions and 91 deletions

View File

@@ -909,6 +909,12 @@ open class ActorWithBody : Actor() {
(hitbox.posY + hitboxTranslateY * scale - (baseSpriteHeight - baseHitboxH) * scale + 2).toFloat(),
(scale).toFloat()
)
// Q&D fix for Roundworld anormaly
spriteGlow!!.render(g,
(hitbox.posX - hitboxTranslateX * scale).toFloat() + world.width * TILE_SIZE,
(hitbox.posY + hitboxTranslateY * scale - (baseSpriteHeight - baseHitboxH) * scale + 2).toFloat(),
(scale).toFloat()
)
}
else {
spriteGlow!!.render(g,
@@ -916,6 +922,12 @@ open class ActorWithBody : Actor() {
(hitbox.posY + hitboxTranslateY * scale - (baseSpriteHeight - baseHitboxH) * scale + 2).toFloat(),
(scale).toFloat()
)
// Q&D fix for Roundworld anormaly
spriteGlow!!.render(g,
(hitbox.posX - scale).toFloat() + world.width * TILE_SIZE,
(hitbox.posY + hitboxTranslateY * scale - (baseSpriteHeight - baseHitboxH) * scale + 2).toFloat(),
(scale).toFloat()
)
}
}
}
@@ -934,6 +946,12 @@ open class ActorWithBody : Actor() {
(hitbox.posY + hitboxTranslateY * scale - (baseSpriteHeight - baseHitboxH) * scale + 2).toFloat(),
(scale).toFloat()
)
// Q&D fix for Roundworld anormaly
sprite!!.render(g,
(hitbox.posX - hitboxTranslateX * scale).toFloat() + world.width * TILE_SIZE,
(hitbox.posY + hitboxTranslateY * scale - (baseSpriteHeight - baseHitboxH) * scale + 2).toFloat(),
(scale).toFloat()
)
}
else {
sprite!!.render(g,
@@ -941,6 +959,12 @@ open class ActorWithBody : Actor() {
(hitbox.posY + hitboxTranslateY * scale - (baseSpriteHeight - baseHitboxH) * scale + 2).toFloat(),
(scale).toFloat()
)
// Q&D fix for Roundworld anormaly
sprite!!.render(g,
(hitbox.posX - scale).toFloat() + world.width * TILE_SIZE,
(hitbox.posY + hitboxTranslateY * scale - (baseSpriteHeight - baseHitboxH) * scale + 2).toFloat(),
(scale).toFloat()
)
}
}
}

View File

@@ -28,13 +28,11 @@ class FixtureTikiTorch : FixtureBase(), Luminous {
sprite = SpriteAnimation()
sprite!!.setDimension(10, 27)
sprite!!.setSpriteImage("res/graphics/sprites/fixtures/tiki_torch.png")
sprite!!.setSpriteImage("assets/graphics/sprites/fixtures/tiki_torch.png")
sprite!!.setDelay(200)
sprite!!.setRowsAndFrames(1, 1)
sprite!!.setAsVisible()
actorValue[AVKey.BASEMASS] = 1.0
luminosity = TileCodex[Tile.TORCH].luminosity
}
}

View File

@@ -1,5 +1,7 @@
package net.torvald.terrarum.gameactors
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.mapdrawer.MapDrawer.TILE_SIZE
import net.torvald.terrarum.mapgenerator.RoguelikeRandomiser
import org.newdawn.slick.Color
import org.newdawn.slick.GameContainer
@@ -28,5 +30,11 @@ class PhysTestBall : ActorWithBody() {
hitbox.posY.toFloat(),
hitbox.width.toFloat(),
hitbox.height.toFloat())
g.fillOval(
hitbox.posX.toFloat() + Terrarum.ingame.world.width * TILE_SIZE,
hitbox.posY.toFloat(),
hitbox.width.toFloat(),
hitbox.height.toFloat())
}
}