2013-06-13 20:12:19 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2013-06-15 19:25:15 +02:00
|
|
|
# create wbfs image from riivolution patch
|
2013-06-13 20:12:19 +02:00
|
|
|
#
|
|
|
|
# Christopher Roy Bratusek <nano@tuxfamily.org>
|
|
|
|
#
|
|
|
|
# License: GPL v3
|
|
|
|
|
2013-06-20 20:34:57 +02:00
|
|
|
source script.d/common.sh
|
2013-06-15 19:58:07 +02:00
|
|
|
setup_tools
|
2013-06-13 20:12:19 +02:00
|
|
|
|
2013-06-15 19:25:15 +02:00
|
|
|
optparse "${@}"
|
2013-06-13 20:12:19 +02:00
|
|
|
|
2013-06-15 19:25:15 +02:00
|
|
|
if [[ ! ${GAME} ]]; then
|
|
|
|
ask_game
|
2013-06-13 20:12:19 +02:00
|
|
|
fi
|
|
|
|
|
2013-06-15 19:25:15 +02:00
|
|
|
case ${GAME} in
|
2013-06-13 20:12:19 +02:00
|
|
|
|
2013-06-20 21:22:39 +02:00
|
|
|
a | A | NewerSMB | NewerSMBW )
|
2013-06-20 20:34:57 +02:00
|
|
|
source script.d/newersmb.sh
|
2013-06-15 19:25:15 +02:00
|
|
|
;;
|
2013-06-13 20:12:19 +02:00
|
|
|
|
2013-06-20 21:22:39 +02:00
|
|
|
b | B | NewerSummerSun )
|
2013-06-20 20:34:57 +02:00
|
|
|
source script.d/newersummersun.sh
|
2013-06-15 19:58:07 +02:00
|
|
|
;;
|
|
|
|
|
2013-06-20 21:22:39 +02:00
|
|
|
c | C | ASMBW | AnotherSMBW )
|
2013-06-20 21:03:40 +02:00
|
|
|
source script.d/anothersmb.sh
|
|
|
|
;;
|
|
|
|
|
2013-06-20 21:22:39 +02:00
|
|
|
d | D | HolidaySpecial | "Newer: Holiday Special" )
|
|
|
|
source script.d/newerholiday.sh
|
|
|
|
;;
|
|
|
|
|
2013-07-03 17:30:30 +02:00
|
|
|
e | E | Cannon | "Cannon SMBW" )
|
|
|
|
source script.d/cannon.sh
|
|
|
|
;;
|
2013-06-22 19:30:30 +02:00
|
|
|
|
2013-07-02 20:20:20 +02:00
|
|
|
f | F | ESBW | "Epic Super Bowser World" )
|
|
|
|
source script.d/epicbowserworld.sh
|
|
|
|
;;
|
|
|
|
|
2013-07-03 16:44:26 +02:00
|
|
|
g | G | Koopa | "Koopa Country" )
|
|
|
|
source script.d/koopacountry.sh
|
|
|
|
;;
|
|
|
|
|
|
|
|
1 | ParallelWorlds | "The Legend of Zelda: Parallel Worlds" )
|
2013-06-22 19:02:37 +02:00
|
|
|
source script.d/parallelworlds.sh
|
|
|
|
;;
|
|
|
|
|
2013-06-15 19:25:15 +02:00
|
|
|
* )
|
|
|
|
echo -e "specified Game ${GAME} not recognized"
|
|
|
|
exit 1
|
|
|
|
;;
|
2013-06-13 20:12:19 +02:00
|
|
|
|
2013-06-15 19:25:15 +02:00
|
|
|
esac
|
2013-06-13 20:12:19 +02:00
|
|
|
|
2013-06-21 19:29:17 +02:00
|
|
|
case ${GAME_TYPE} in
|
|
|
|
"RIIVOLUTION" )
|
|
|
|
show_notes
|
2013-07-04 21:30:08 +02:00
|
|
|
rm -rf ${WORKDIR}
|
2013-06-21 19:29:17 +02:00
|
|
|
download_soundtrack
|
|
|
|
check_input_image
|
|
|
|
check_input_image_special
|
|
|
|
check_riivolution_patch
|
|
|
|
|
|
|
|
${WIT} extract "${IMAGE}" ${WORKDIR} --psel=DATA -vv || exit 1
|
|
|
|
|
|
|
|
detect_game_version
|
2013-07-04 21:30:08 +02:00
|
|
|
rm -f ${GAMEID}.wbfs ${CUSTOMID}.wbfs
|
2013-06-21 19:29:17 +02:00
|
|
|
place_files
|
2013-07-01 22:36:09 +02:00
|
|
|
|
2013-07-01 22:23:32 +02:00
|
|
|
download_banner
|
|
|
|
apply_banner
|
2013-06-21 19:29:17 +02:00
|
|
|
|
2013-07-01 22:36:09 +02:00
|
|
|
dolpatch
|
2013-06-21 19:29:17 +02:00
|
|
|
|
|
|
|
if [[ ${CUSTOMID} ]]; then
|
|
|
|
${WIT} cp -v -B ${WORKDIR} ${CUSTOMID}.wbfs -vv --disc-id=${CUSTOMID} ${TMD_OPTS} --name "${GAMENAME}"
|
|
|
|
else
|
|
|
|
${WIT} cp -v -B ${WORKDIR} ${GAMEID}.wbfs -vv --disc-id=${GAMEID} ${TMD_OPTS} --name "${GAMENAME}"
|
|
|
|
fi
|
|
|
|
;;
|
2013-06-22 19:02:37 +02:00
|
|
|
|
|
|
|
"IPS" )
|
|
|
|
show_notes
|
|
|
|
check_input_rom
|
|
|
|
|
2013-06-22 19:15:29 +02:00
|
|
|
if [[ -f ${PATCH} ]]; then
|
|
|
|
ext=${ROM/*.}
|
|
|
|
cp "${ROM}" "${GAMENAME}.${ext}"
|
|
|
|
${IPS} a "${PATCH}" "${GAMENAME}.${ext}"
|
|
|
|
else
|
|
|
|
echo -e "error: patch (${PATCH}) could not be found"
|
|
|
|
fi
|
2013-06-22 19:02:37 +02:00
|
|
|
;;
|
2013-06-21 19:29:17 +02:00
|
|
|
esac
|