Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Render to center of subtile #167

Merged
merged 1 commit into from
Nov 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions d2render/animated_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down