Add new map and tileset files for Windows release

- Created test.tmj and test.tsj files in the maps directory.
- Added tileset.tsj with configuration for the MainTileset including image path and dimensions.
This commit is contained in:
2026-04-26 02:35:31 +02:00
parent 93abb31ba7
commit 16ae22bcba
255 changed files with 401031 additions and 237 deletions

View File

@@ -1,15 +1,15 @@
package entities
import (
"github.com/go-gl/mathgl/mgl64"
"github.com/hajimehoshi/ebiten/v2"
"github.com/go-gl/mathgl/mgl64"
"github.com/hajimehoshi/ebiten/v2"
)
type Tile struct {
pos mgl64.Vec3
health int
SideImg *ebiten.Image
TopImg *ebiten.Image
pos mgl64.Vec3
health int
SideImg *ebiten.Image
TopImg *ebiten.Image
}
func (t *Tile) Pos() mgl64.Vec3 { return t.pos }
@@ -17,26 +17,28 @@ func (t *Tile) SetPos(pos mgl64.Vec3) { t.pos = pos }
func (t *Tile) IsBlocking() bool { return true }
func (t *Tile) IsMovable() bool { return false }
func (t *Tile) Move(dx, dy, dz float64) {
// Not feasible for soil etc.
// Not feasible for soil etc.
}
func (t *Tile) Damage(am int) { t.health -= am }
func (t *Tile) Pickup() bool { return false }
func (t *Tile) GetHealth() int { return t.health }
func (t *Tile) DrawSide(screen interface{}, x, y float64) {
scr := screen.(*ebiten.Image)
if t.SideImg != nil {
op := &ebiten.DrawImageOptions{}
op.GeoM.Translate(x, y)
scr.DrawImage(t.SideImg, op)
}
func (t *Tile) DrawSide(screen interface{}, x, y float64, tint, alpha float32) {
scr := screen.(*ebiten.Image)
if t.SideImg != nil {
op := &ebiten.DrawImageOptions{}
op.GeoM.Translate(x, y)
op.ColorScale.Scale(tint, tint, tint, alpha)
scr.DrawImage(t.SideImg, op)
}
}
func (t *Tile) DrawTop(screen interface{}, x, y float64) {
scr := screen.(*ebiten.Image)
if t.TopImg != nil {
op := &ebiten.DrawImageOptions{}
op.GeoM.Translate(x, y)
scr.DrawImage(t.TopImg, op)
}
func (t *Tile) DrawTop(screen interface{}, x, y float64, tint, alpha float32) {
scr := screen.(*ebiten.Image)
if t.TopImg != nil {
op := &ebiten.DrawImageOptions{}
op.GeoM.Translate(x, y)
op.ColorScale.Scale(tint, tint, tint, alpha)
scr.DrawImage(t.TopImg, op)
}
}