cook assets

This commit is contained in:
Fabien Freling 2025-03-10 14:05:15 +01:00
parent 5affd98436
commit 4a6437c323
10 changed files with 7 additions and 3 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
src/img/*.png

0
Tupfile.ini Normal file
View file

View file

@ -1,7 +1,7 @@
bin := "Rush.pdx"
alias b := build
build:
build: cook-assets
pdc --quiet --skip-unknown src {{ bin }}
alias s := simu
@ -10,3 +10,4 @@ simu: build
cook-assets:
@(which aseprite > /dev/null) || (echo "Missing aseprite program"; exit 1)
tup

2
src/img/Tupfile Normal file
View file

@ -0,0 +1,2 @@
: level_01.ase |> aseprite --batch --export-tileset %f --sheet %o |> %B-table-32-32.png
: player.ase |> aseprite --batch %f --save-as %o |> %B.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

BIN
src/img/player.ase Normal file

Binary file not shown.

Binary file not shown.

View file

@ -16,7 +16,7 @@ function gameInit()
playerSprite:moveTo(200, 120) -- (200,120) is the center of the Playdate screen
playerSprite:add()
atlas = gfx.imagetable.new("img/bg_atlas")
atlas = gfx.imagetable.new("img/level_01")
end
gameInit()
@ -47,5 +47,5 @@ function playdate.update()
gfx.sprite.update()
playdate.timer.updateTimers()
atlas:drawImage(1, 32, 32)
atlas:drawImage(2, 32, 32)
end