mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-22 21:32:39 +00:00
makefile sync
This commit is contained in:
parent
a1b8afe939
commit
980da73dde
21
Makefile
21
Makefile
@ -31,22 +31,25 @@ dsk: asm
|
|||||||
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/LAUNCHER.SYSTEM" >>build/log
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/LAUNCHER.SYSTEM" >>build/log
|
||||||
rsync -aP res/PREFS.CONF build/PREFS.CONF >> build/log
|
rsync -aP res/PREFS.CONF build/PREFS.CONF >> build/log
|
||||||
bin/padto.sh 512 build/PREFS.CONF >>build/log
|
bin/padto.sh 512 build/PREFS.CONF >>build/log
|
||||||
bin/buildhelp.sh "build/HELPFUL" "build/helper.inc" >>build/log
|
bin/buildhelp.sh "res/GAMES.CONF" "build/HELP.DATA" "build/HELPFUL" >>build/log
|
||||||
$(ACME) -r build/helper.lst src/helper/helper.a >>build/log
|
|
||||||
bin/buildokvs.sh "res/ATTRACT.CONF" "build/ATTRACT.DATA" >>build/log
|
bin/buildokvs.sh "res/ATTRACT.CONF" "build/ATTRACT.DATA" >>build/log
|
||||||
bin/buildfx.sh "res/FX.CONF" "build/FX.DATA" "build/FXFUL" >>build/log
|
bin/buildfx.sh "res/FX.CONF" "build/FX.DATA" "build/FXFUL" "build/FX" >>build/log
|
||||||
bin/buildfx.sh "res/DFX.CONF" "build/DFX.DATA" "build/DFXFUL" >>build/log
|
bin/buildfx.sh "res/DFX.CONF" "build/DFX.DATA" "build/DFXFUL" "build/FX" >>build/log
|
||||||
for f in res/TITLE res/COVER res/HELP res/GAMES.CONF build/ATTRACT.DATA build/FX.DATA build/FXFUL build/DFX.DATA build/DFXFUL build/PREFS.CONF res/CREDITS res/HELPTEXT build/HELPER build/HELPFUL res/DECRUNCH res/JOYSTICK res/Finder.Data res/Finder.Root; do $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; done
|
rm -f build/SSDIR.CONF && touch build/SSDIR.CONF
|
||||||
|
for f in res/SS/*; do bin/buildokvs.sh "$$f" "build/SS/$$(basename $$f)" && echo "$$(basename $$f)" >> build/SSDIR.CONF; done >>build/log
|
||||||
|
bin/buildfx.sh "build/SSDIR.CONF" "build/SS.DATA" "build/SSFUL" "build/SS" >>build/log
|
||||||
|
rm -f build/ATTRACTDIR.CONF && touch build/ATTRACTDIR.CONF
|
||||||
|
for f in res/ATTRACT/*; do bin/buildokvs.sh "$$f" "build/ATTRACT/$$(basename $$f)" && echo "$$(basename $$f)" >> build/ATTRACTDIR.CONF; done >>build/log
|
||||||
|
bin/buildfx.sh "build/ATTRACTDIR.CONF" "build/ATTRACTIVE" "build/ATTRACTFUL" "build/ATTRACT" >>build/log
|
||||||
|
for f in res/TITLE res/COVER res/HELP res/GAMES.CONF build/PREFS.CONF res/CREDITS res/HELPTEXT build/ATTRACT.DATA build/FX.DATA build/FXFUL build/DFX.DATA build/DFXFUL build/HELP.DATA build/HELPFUL build/SS.DATA build/SSFUL build/ATTRACTIVE build/ATTRACTFUL res/DECRUNCH res/JOYSTICK res/Finder.Data res/Finder.Root; do $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; done
|
||||||
bin/buildfileinfo.sh res/TITLE.HGR "06" "4000" >>build/log
|
bin/buildfileinfo.sh res/TITLE.HGR "06" "4000" >>build/log
|
||||||
bin/buildfileinfo.sh res/TITLE.DHGR "06" "4000" >>build/log
|
bin/buildfileinfo.sh res/TITLE.DHGR "06" "4000" >>build/log
|
||||||
bin/buildfileinfo.sh res/ACTION.HGR "06" "3FF8" >>build/log
|
bin/buildfileinfo.sh res/ACTION.HGR "06" "3FF8" >>build/log
|
||||||
bin/buildfileinfo.sh res/ACTION.DHGR "06" "3FF8" >>build/log
|
bin/buildfileinfo.sh res/ACTION.DHGR "06" "3FF8" >>build/log
|
||||||
bin/buildfileinfo.sh res/ACTION.GR "06" "6000" >>build/log
|
bin/buildfileinfo.sh res/ACTION.GR "06" "6000" >>build/log
|
||||||
bin/buildfileinfo.sh res/ARTWORK.SHR "06" "1FF8" >>build/log
|
bin/buildfileinfo.sh res/ARTWORK.SHR "06" "1FF8" >>build/log
|
||||||
bin/buildfileinfo.sh res/ATTRACT "04" "8000" >>build/log
|
|
||||||
bin/buildfileinfo.sh res/SS "04" "4000" >>build/log
|
|
||||||
bin/buildfileinfo.sh res/ICONS "CA" "0000" >>build/log
|
bin/buildfileinfo.sh res/ICONS "CA" "0000" >>build/log
|
||||||
for f in res/TITLE.HGR res/TITLE.DHGR res/ACTION.HGR res/ACTION.DHGR res/ACTION.GR res/ARTWORK.SHR res/ATTRACT res/SS res/DEMO res/TITLE.ANIMATED res/ICONS; do rm -f "$$f"/.DS_Store; $(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/$$(basename $$f)" "$$f" >>build/log; done
|
for f in res/TITLE.HGR res/TITLE.DHGR res/ACTION.HGR res/ACTION.DHGR res/ACTION.GR res/ARTWORK.SHR res/DEMO res/TITLE.ANIMATED res/ICONS; do rm -f "$$f"/.DS_Store; $(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/$$(basename $$f)" "$$f" >>build/log; done
|
||||||
for i in 1 2 3 4 5 6; do $(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.$${i}$${i}" "SPCARTOON.$${i}." >>build/log; done
|
for i in 1 2 3 4 5 6; do $(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.$${i}$${i}" "SPCARTOON.$${i}." >>build/log; done
|
||||||
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/$(VOLUME)/FX/" >>build/log
|
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/$(VOLUME)/FX/" >>build/log
|
||||||
for f in build/FX/COVERFADE build/FX/GR.FIZZLE build/FX/SHR.FIZZLE build/FX/*.DATA; do $(CADIUS) ADDFILE "build/$(DISK)" "/$(VOLUME)/FX/" "$$f"; done >>build/log
|
for f in build/FX/COVERFADE build/FX/GR.FIZZLE build/FX/SHR.FIZZLE build/FX/*.DATA; do $(CADIUS) ADDFILE "build/$(DISK)" "/$(VOLUME)/FX/" "$$f"; done >>build/log
|
||||||
@ -88,7 +91,7 @@ mount: dsk
|
|||||||
osascript bin/V2Make.scpt "`pwd`" bin/4cade.vii build/"$(DISK)"
|
osascript bin/V2Make.scpt "`pwd`" bin/4cade.vii build/"$(DISK)"
|
||||||
|
|
||||||
md:
|
md:
|
||||||
mkdir -p build/X build/FX build/PRELAUNCH
|
mkdir -p build/X build/FX build/PRELAUNCH build/ATTRACT build/SS
|
||||||
touch build/log
|
touch build/log
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# run from project root directory
|
||||||
|
|
||||||
|
# parameters
|
||||||
|
# 1 - input filename of text file containing list of effects (probably FX.CONF or DFX.CONF)
|
||||||
|
# 2 - output filename for index file
|
||||||
|
# 3 - output filename for merged-effects file
|
||||||
|
# 4 - input directory of (previously assembled) effects files
|
||||||
|
|
||||||
# create or truncate merged-effects file
|
# create or truncate merged-effects file
|
||||||
:>| "$3"
|
:>| "$3"
|
||||||
|
|
||||||
@ -16,7 +24,7 @@ source=$(mktemp)
|
|||||||
echo "!byte ${#key}" # OKVS key length
|
echo "!byte ${#key}" # OKVS key length
|
||||||
echo "!text \"$key\"" # OKVS key (effect name)
|
echo "!text \"$key\"" # OKVS key (effect name)
|
||||||
echo "!be24 $(wc -c <"$3")" # offset into merged-effects file
|
echo "!be24 $(wc -c <"$3")" # offset into merged-effects file
|
||||||
cat "build/FX/$key" >> "$3" # add effect code into merged-effects file
|
cat "$4/$key" >> "$3" # add effect code into merged-effects file
|
||||||
# (all effects were previously assembled)
|
# (all effects were previously assembled)
|
||||||
done < "$records") > "$source"
|
done < "$records") > "$source"
|
||||||
|
|
||||||
|
@ -2,21 +2,37 @@
|
|||||||
|
|
||||||
# run from project root directory
|
# run from project root directory
|
||||||
|
|
||||||
# make in-memory array of game filenames
|
# parameters
|
||||||
games=$(grep "," res/GAMES.CONF | grep -v "^#" | cut -d"," -f2 | cut -d"=" -f1 | sort)
|
# 1 - input filename of text file containing list of games (probably GAMES.CONF)
|
||||||
|
# 2 - output filename for index file
|
||||||
|
# 3 - output filename for merged-gamehelp file
|
||||||
|
|
||||||
|
# make temp file with list of game filenames
|
||||||
|
records=$(mktemp)
|
||||||
|
grep "," < "$1" | grep -v "^#" | cut -d"," -f2 | cut -d"=" -f1 | sort > "$records"
|
||||||
|
|
||||||
# first help text is the 'TODO' placeholder screen
|
# first help text is the 'TODO' placeholder screen
|
||||||
cp res/GAMEHELP/STANDARD "$1"
|
cp res/GAMEHELP/STANDARD "$3"
|
||||||
for c in {A..Z}; do
|
|
||||||
echo "group$c" # group games by first letter
|
# make temp assembly source file that represents the binary OKVS data structure
|
||||||
for game in $(echo "$games" | grep "^$c"); do
|
source=$(mktemp)
|
||||||
echo "!byte ${#game}" # key length
|
(echo "*=0" # dummy program counter for assembler
|
||||||
echo "!text \"$game\"" # key (game filename)
|
echo "!le16 $(wc -l <"$records"), 0" # OKVS header
|
||||||
if [ -f "res/GAMEHELP/$game" ]; then
|
while read -r key; do
|
||||||
echo "!be24 $(wc -c <"$1")" # value (3-byte big-endian offset into merged help file)
|
echo "!byte ${#key}+5" # OKVS record length
|
||||||
cat res/GAMEHELP/"$game" >> "$1"
|
echo "!byte ${#key}" # OKVS key length
|
||||||
else
|
echo "!text \"$key\"" # OKVS key (effect name)
|
||||||
echo "!be24 0" # if game has no help, reuse placeholder at offset 0
|
if [ -f "res/GAMEHELP/$key" ]; then
|
||||||
fi
|
echo "!be24 $(wc -c <"$3")" # value (3-byte big-endian offset into merged-gamehelp file)
|
||||||
done
|
cat res/GAMEHELP/"$key" >> "$3"
|
||||||
done > "$2"
|
else
|
||||||
|
echo "!be24 0" # if game has no help, reuse placeholder at offset 0
|
||||||
|
fi
|
||||||
|
done < "$records") > "$source"
|
||||||
|
|
||||||
|
# assemble temp source file to create binary OKVS data structure
|
||||||
|
acme -o "$2" "$source"
|
||||||
|
|
||||||
|
# clean up
|
||||||
|
rm "$source"
|
||||||
|
rm "$records"
|
||||||
|
Loading…
Reference in New Issue
Block a user