Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1.0 kB · 39 lines
12345678910111213141516171819202122232425262728293031323334353637383940@echo off
rem Simple batch file to assemble Game Boy ROMsrem usage: build.bat <sourcefile>
setlocalset _fn=%~n1
if exist %_fn%.gb del %_fn%.gb
echo Asset conversion...rem Convert *-tilemap.png files to 2bpp format including a tilemap (remove duplicate tiles)for %%f in (*-tilemap.png) do rgbgfx -u -o %%~nf.2bpp -t %%~nf.tilemap "%%f"
rem Convert *-ztiles.png files to 2bpp format column-by-column without a tilemap (keep duplicate tiles)for %%f in (*-ztiles.png) do rgbgfx -Z -o %%~nf.2bpp "%%f"
rem Convert *-tiles.png files to 2bpp format row-by-row without a tilemap (keep duplicate tiles)for %%f in (*-tiles.png) do rgbgfx -o %%~nf.2bpp "%%f"
echo Assembling...rgbasm -I ..\..\inc -o%_fn%.o %1if ERRORLEVEL 1 goto :errorecho Linking...rgblink -n%_fn%.sym -m%_fn%.map -o %_fn%.gb %_fn%.oif ERRORLEVEL 1 goto :errorecho Fixing...rgbfix -p 255 -v %_fn%.gbif ERRORLEVEL 1 goto :error
echo Created: %_fn%.gbdel *.ogoto :end
:errorecho Build failed.
:endendlocal