2020-05-03 19:03:17 +00:00
|
|
|
#!/bin/bash
|
2019-06-22 19:50:24 +00:00
|
|
|
|
|
|
|
# run from project root directory
|
|
|
|
|
2020-03-16 15:14:24 +00:00
|
|
|
cat res/GAMES.CONF |
|
2022-07-29 23:53:56 +00:00
|
|
|
tr -d "\r" |
|
2020-03-19 01:49:07 +00:00
|
|
|
grep "," |
|
2019-06-29 11:32:15 +00:00
|
|
|
grep -v "^#" |
|
|
|
|
cut -d"," -f2 |
|
|
|
|
cut -d"=" -f1 | \
|
2019-06-22 19:50:24 +00:00
|
|
|
while read game; do
|
|
|
|
# initialize attract mode configuration file for this game
|
2020-05-03 19:03:17 +00:00
|
|
|
echo -e "#\n# Attract mode for $game\n# This file is automatically generated\n#\n" > /tmp/g
|
2019-06-29 11:32:15 +00:00
|
|
|
|
2019-06-22 19:50:24 +00:00
|
|
|
# add box art, if any
|
2021-11-18 01:38:34 +00:00
|
|
|
cat res/SS/SHR*.CONF |
|
2022-07-29 23:53:56 +00:00
|
|
|
tr -d "\r" |
|
2021-11-18 01:38:34 +00:00
|
|
|
egrep "(^|=)""$game""$" |
|
|
|
|
cut -d"=" -f1 |
|
|
|
|
sed -e "s/$/=C/g" |
|
|
|
|
sort |
|
|
|
|
uniq >> /tmp/g
|
2019-06-29 11:32:15 +00:00
|
|
|
|
|
|
|
# add DHGR action screenshots, if any
|
2020-03-16 15:14:24 +00:00
|
|
|
cat res/SS/ACTDHGR*.CONF |
|
2022-07-29 23:53:56 +00:00
|
|
|
tr -d "\r" |
|
2020-01-20 19:56:57 +00:00
|
|
|
egrep "(^|=)""$game""$" |
|
2019-06-29 11:32:15 +00:00
|
|
|
cut -d"=" -f1 |
|
2019-07-15 15:42:05 +00:00
|
|
|
sed -e "s/$/=B/g" |
|
2019-06-29 11:32:15 +00:00
|
|
|
sort |
|
|
|
|
uniq >> /tmp/g
|
|
|
|
|
|
|
|
# add HGR action screenshots, if any
|
2020-03-16 15:14:24 +00:00
|
|
|
cat res/SS/ACTION*.CONF |
|
2022-07-29 23:53:56 +00:00
|
|
|
tr -d "\r" |
|
2020-01-20 19:56:57 +00:00
|
|
|
egrep "(^|=)""$game""$" |
|
2019-06-29 11:32:15 +00:00
|
|
|
cut -d"=" -f1 |
|
2019-07-15 15:42:05 +00:00
|
|
|
sed -e "s/$/=A/g" |
|
|
|
|
sort |
|
|
|
|
uniq >> /tmp/g
|
|
|
|
|
|
|
|
# add GR action screenshots, if any
|
2020-03-16 15:14:24 +00:00
|
|
|
cat res/SS/ACTGR*.CONF |
|
2022-07-29 23:53:56 +00:00
|
|
|
tr -d "\r" |
|
2020-01-20 19:56:57 +00:00
|
|
|
egrep "(^|=)""$game""$" |
|
2019-07-15 15:42:05 +00:00
|
|
|
cut -d"=" -f1 |
|
|
|
|
sed -e "s/$/=D/g" |
|
2019-06-29 11:32:15 +00:00
|
|
|
sort |
|
|
|
|
uniq >> /tmp/g
|
|
|
|
|
2021-12-11 02:50:10 +00:00
|
|
|
# add DGR action screenshots, if any
|
|
|
|
cat res/SS/ACTDGR*.CONF |
|
2022-07-29 23:53:56 +00:00
|
|
|
tr -d "\r" |
|
2021-12-11 02:50:10 +00:00
|
|
|
egrep "(^|=)""$game""$" |
|
|
|
|
cut -d"=" -f1 |
|
|
|
|
sed -e "s/$/=E/g" |
|
|
|
|
sort |
|
|
|
|
uniq >> /tmp/g
|
|
|
|
|
2019-06-22 19:50:24 +00:00
|
|
|
# add self-running demo, if any
|
2020-03-16 15:14:24 +00:00
|
|
|
cat res/ATTRACT.CONF |
|
2022-07-29 23:53:56 +00:00
|
|
|
tr -d "\r" |
|
2019-06-29 11:32:15 +00:00
|
|
|
grep "^$game=0" >> /tmp/g
|
|
|
|
|
|
|
|
if [ "$game" == "SPARE.CHANGE" ]; then
|
2022-06-10 20:26:21 +00:00
|
|
|
echo "SPCARTOON.1.=0" >> /tmp/g
|
|
|
|
echo "SPCARTOON.2.=0" >> /tmp/g
|
|
|
|
echo "SPCARTOON.3.=0" >> /tmp/g
|
|
|
|
echo "SPCARTOON.4.=0" >> /tmp/g
|
|
|
|
echo "SPCARTOON.5.=0" >> /tmp/g
|
|
|
|
echo "SPCARTOON.6.=0" >> /tmp/g
|
2019-06-29 11:32:15 +00:00
|
|
|
fi
|
|
|
|
|
2019-07-01 00:49:27 +00:00
|
|
|
if [ "$game" == "PRINCEUNP" ]; then
|
2019-07-15 15:42:05 +00:00
|
|
|
echo "ARTWORK.SHR/POP.END=C" >> /tmp/g
|
2019-07-01 00:49:27 +00:00
|
|
|
fi
|
|
|
|
|
2019-06-22 19:50:24 +00:00
|
|
|
# add eof
|
2020-05-03 19:03:17 +00:00
|
|
|
echo -e "\n[eof]" >> /tmp/g
|
2019-06-29 11:32:15 +00:00
|
|
|
|
2020-03-23 01:58:26 +00:00
|
|
|
cat /tmp/g > res/ATTRACT/"$game"
|
2019-06-29 11:32:15 +00:00
|
|
|
|
|
|
|
# clean up
|
2019-06-26 02:44:39 +00:00
|
|
|
rm /tmp/g
|
2019-06-22 19:50:24 +00:00
|
|
|
done
|