2013-07-02 21:19:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
WORKDIR=nsmb.d
|
|
|
|
DOL=${WORKDIR}/sys/main.dol
|
2013-07-04 21:35:22 +02:00
|
|
|
DOWNLOAD_LINK="http://www.nanolx.org/riivolution/Cannon_Super_Mario_Bros._Wii_v1.1.zip"
|
2013-07-02 21:19:52 +02:00
|
|
|
RIIVOLUTION_ZIP="Cannon_Super_Mario_Bros._Wii_v1.1.zip"
|
|
|
|
RIIVOLUTION_DIR="Cannon_Super_Mario_Bros._Wii_v1.1"
|
|
|
|
GAMENAME="Cannon Super Mario Bros."
|
2013-07-03 16:43:25 +02:00
|
|
|
XML_SOURCE="${RIIVOLUTION_DIR}"/Cannon/
|
|
|
|
XML_FILE="${RIIVOLUTION_DIR}"/riivolution/CannonP.xml
|
2013-07-02 21:19:52 +02:00
|
|
|
GAME_TYPE=RIIVOLUTION
|
|
|
|
BANNER_LOCATION=${WORKDIR}/files/opening.bnr
|
2016-08-05 15:57:18 +02:00
|
|
|
WBFS_MASK="SMN[PUJ]01"
|
2013-07-02 21:19:52 +02:00
|
|
|
|
|
|
|
show_notes () {
|
|
|
|
|
|
|
|
echo -e \
|
|
|
|
"************************************************
|
|
|
|
${GAMENAME}
|
|
|
|
|
2013-07-04 21:35:22 +02:00
|
|
|
- 14 full new levels divided over 3 worlds
|
|
|
|
- Over 50 new goodies and retextured objects
|
|
|
|
- Many custom music composed over almost all levels
|
|
|
|
- And of course some custom tilesets
|
2013-07-02 21:19:52 +02:00
|
|
|
|
2013-07-04 21:35:22 +02:00
|
|
|
Source: http://www.rvlution.net/forums/viewtopic.php?f=20&t=1080
|
2013-07-02 21:19:52 +02:00
|
|
|
Base Image: New Super Mario Bros. Wii (SMN?01)
|
|
|
|
Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
|
|
|
|
************************************************"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
detect_game_version () {
|
|
|
|
|
2013-07-07 08:49:52 +02:00
|
|
|
nsmbw_version
|
2013-07-02 21:19:52 +02:00
|
|
|
|
|
|
|
GAMEID=SMN${REG_LETTER}04
|
|
|
|
CUSTOM_BANNER=http://dl.dropboxusercontent.com/u/101209384/${GAMEID}.bnr
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
place_files () {
|
|
|
|
|
2016-08-05 21:42:41 +02:00
|
|
|
NEW_DIRS=( "${WORKDIR}"/files/NewerRes )
|
|
|
|
for dir in "${NEW_DIRS[@]}"; do
|
|
|
|
mkdir -p "${dir}"
|
2013-07-02 21:19:52 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
case ${VERSION} in
|
|
|
|
EUR* )
|
|
|
|
LANGDIRS=( EngEU FraEU GerEU ItaEU SpaEU NedEU )
|
2016-08-05 21:42:41 +02:00
|
|
|
for dir in "${LANGDIRS[@]}"; do
|
|
|
|
cp -r "${RIIVOLUTION_DIR}"/Cannon/MessageEN/* "${WORKDIR}"/files/EU/"${dir}"/
|
2013-07-02 21:19:52 +02:00
|
|
|
done
|
2016-08-05 21:42:41 +02:00
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/OpeningP/* "${WORKDIR}"/files/EU/Layout/openingTitle/
|
2013-07-02 21:19:52 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
USAv* )
|
|
|
|
LANGDIRS=( FraUS EngUS SpaUS )
|
2016-08-05 21:42:41 +02:00
|
|
|
for dir in "${LANGDIRS[@]}"; do
|
|
|
|
cp -r "${RIIVOLUTION_DIR}"/Cannon/MessageEN/* "${WORKDIR}"/files/US/"${dir}"/
|
2013-07-02 21:19:52 +02:00
|
|
|
done
|
2016-08-05 21:42:41 +02:00
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/OpeningE/* "${WORKDIR}"/files/US/Layout/openingTitle/
|
2013-07-02 21:19:52 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
JPNv1 )
|
2016-08-05 21:42:41 +02:00
|
|
|
cp -r "${RIIVOLUTION_DIR}"/Cannon/MessageEN/* "${WORKDIR}"/files/JP/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/OpeningJ/* "${WORKDIR}"/files/JP/Layout/openingTitle/
|
2013-07-02 21:19:52 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2016-08-05 21:42:41 +02:00
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/Stage/Texture/* "${WORKDIR}"/files/Stage/Texture/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/NewerRes/* "${WORKDIR}"/files/NewerRes/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/Stage/*.arc "${WORKDIR}"/files/Stage/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/Env/* "${WORKDIR}"/files/Env/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/Sound/Stream/* "${WORKDIR}"/files/Sound/stream/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/Sound/*.brsar "${WORKDIR}"/files/Sound/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/WorldMap/* "${WORKDIR}"/files/WorldMap/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/Object/* "${WORKDIR}"/files/Object/
|
|
|
|
cp "${RIIVOLUTION_DIR}"/Cannon/MovieDemo/* "${WORKDIR}"/files/MovieDemo/
|
|
|
|
cp -r "${RIIVOLUTION_DIR}"/Cannon/Layout/ "${WORKDIR}"/files/
|
2013-07-02 21:19:52 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
dolpatch () {
|
|
|
|
|
|
|
|
cp "${XML_FILE}" "${XML_FILE}".new
|
|
|
|
sed -e 's/80001800/803482C0/g' -i "${XML_FILE}".new
|
|
|
|
XML_FILE="${XML_FILE}".new
|
|
|
|
|
|
|
|
${WIT} dolpatch ${DOL} xml="${XML_FILE}" -s "${XML_SOURCE}" \
|
|
|
|
"802F148C=53756D6D53756E#7769696D6A3264" \
|
|
|
|
"802F118C=53756D6D53756E#7769696D6A3264" \
|
|
|
|
"802F0F8C=53756D6D53756E#7769696D6A3264" \
|
2013-08-06 23:53:43 +02:00
|
|
|
xml="${PATCHIMAGE_PATCH_DIR}/Cannon-Loader.xml" -q
|
2013-07-02 21:19:52 +02:00
|
|
|
|
2013-08-06 23:53:43 +02:00
|
|
|
${WIT} dolpatch ${DOL} xml="${PATCHIMAGE_PATCH_DIR}/NSMBW_AP.xml" -q
|
2013-07-02 21:19:52 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|