1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-20 22:25:24 +00:00

Render to center of subtile (#167)

This commit is contained in:
Ziemas 2019-11-14 04:26:52 +01:00 committed by Tim Sarbin
parent 3abfa51b8f
commit ea134afe90

View File

@ -162,10 +162,9 @@ func (v *AnimatedEntity) Render(target *ebiten.Image, offsetX, offsetY int) {
continue
}
// TODO: Probably not pixel perfect, should render from center of sub-tile?
// Location within the current tile
localX := (v.subcellX - v.subcellY) * 16
localY := (v.subcellX + v.subcellY) * 8
localX := ((v.subcellX - v.subcellY) * 16)
localY := ((v.subcellX + v.subcellY) * 8) - 4
// TODO: Transparency op maybe, but it'l murder batch calls
opts := &ebiten.DrawImageOptions{}