-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·48 lines (39 loc) · 937 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
PROJECTNAME="gbcompo23"
BuildError () {
PROJECTNAME=
echo Build failed, aborting...
exit 1
}
echo "Converting sprites... (this may take a while)"
cd GFX/Player
for file in *.ec; do
fname=`basename $file .ec`
echo $fname
python3 ../../Tools/extractcels.py -v $fname.ec $fname.png $fname.2bpp $fname.sdef
done
cd ../..
echo "Converting maps... (This may take a while)"
cd Levels
for file in *.json; do
python3 ../Tools/convertmap.py -c $file
done
cd ..
echo Assembling...
rgbasm -o $PROJECTNAME.obj -p 255 Main.asm -Wno-numeric-string -Wno-obsolete
if test $? -eq 1; then
BuildError
fi
echo Linking...
rgblink -p 255 -o $PROJECTNAME.gbc -n $PROJECTNAME.sym $PROJECTNAME.obj
if test $? -eq 1; then
BuildError
fi
echo Fixing...
rgbfix -v -p 255 $PROJECTNAME.gbc
echo Cleaning up...
rm $PROJECTNAME.obj
echo Build complete.
# unset vars
PROJECTNAME=
echo "** Build finished with no errors **"