unify function for checking for Wii images

various improvements and code-cleanup
This commit is contained in:
Christopher Roy Bratusek 2016-08-05 15:57:18 +02:00
parent ea0e6c921d
commit 3c976d0f89
36 changed files with 129 additions and 305 deletions

View File

@ -298,11 +298,9 @@ case ${GAME_TYPE} in
echo -e "\n*** 1) check_input_image" echo -e "\n*** 1) check_input_image"
check_input_image check_input_image
echo -e "\n*** 2) check_input_image_special" echo -e "\n*** 2) download_wiimm"
check_input_image_special
echo -e "\n*** 3) download_wiimm"
download_wiimm download_wiimm
echo -e "\n*** 4) patch_wiimm" echo -e "\n*** 3) patch_wiimm"
patch_wiimm patch_wiimm
;; ;;
@ -310,7 +308,7 @@ case ${GAME_TYPE} in
show_notes show_notes
echo -e "\n*** 1) check_input_image" echo -e "\n*** 1) check_input_image"
check_input_image check_input_image_special
echo -e "\n*** 2) pi_action" echo -e "\n*** 2) pi_action"
pi_action pi_action
;; ;;

View File

@ -201,88 +201,23 @@ check_directories () {
} }
check_input_image () { check_input_image () {
x=0 x=0
if [[ ! ${IMAGE} ]]; then if [[ ! ${IMAGE} ]]; then
if [[ -f BASE.wbfs ]]; then if test -f ${WBFS_MASK}.wbfs; then
x=1 x=1
IMAGE=BASE.wbfs IMAGE=${WBFS_MASK}.wbfs
elif [[ -f BASE.iso ]]; then elif test -f ${WBFS_MASK}.iso; then
x=1
IMAGE=BASE.iso
fi
fi
echo "*** >> status: ${x}"
}
check_input_image_nsmb () {
x=0
if [[ ! ${IMAGE} ]]; then
if test -f SMN?01.wbfs; then
x=1
IMAGE=SMN?01.wbfs
elif test -f SMN?01.iso; then
x=2 x=2
IMAGE=SMN?01.iso IMAGE=${WBFS_MASK}.iso
elif test -f "${PATCHIMAGE_WBFS_DIR}"/SMN?01.iso; then elif test -f "${PATCHIMAGE_WBFS_DIR}"/${WBFS_MASK}.iso; then
x=3 x=3
IMAGE="${PATCHIMAGE_WBFS_DIR}"/SMN?01.iso IMAGE="${PATCHIMAGE_WBFS_DIR}"/${WBFS_MASK}.iso
elif test -f "${PATCHIMAGE_WBFS_DIR}"/SMN?01.wbfs; then elif test -f "${PATCHIMAGE_WBFS_DIR}"/${WBFS_MASK}.wbfs; then
x=4 x=4
IMAGE="${PATCHIMAGE_WBFS_DIR}"/SMN?01.wbfs IMAGE="${PATCHIMAGE_WBFS_DIR}"/${WBFS_MASK}.wbfs
else
echo -e "please specify image to use with --iso=<path>"
exit 15
fi
fi
echo "*** >> status: ${x}"
}
check_input_image_kirby () {
x=0
if [[ ! ${IMAGE} ]]; then
if test -f SMN?01.wbfs; then
x=1
IMAGE=SMN?01.wbfs
elif test -f SMN?01.iso; then
x=2
IMAGE=SMN?01.iso
elif test -f "${PATCHIMAGE_WBFS_DIR}"/SUK?01.iso; then
x=3
IMAGE="${PATCHIMAGE_WBFS_DIR}"/SUK?01.iso
elif test -f "${PATCHIMAGE_WBFS_DIR}"/SUK?01.wbfs; then
x=4
IMAGE="${PATCHIMAGE_WBFS_DIR}"/SUK?01.wbfs
else
echo -e "please specify image to use with --iso=<path>"
exit 15
fi
fi
echo "*** >> status: ${x}"
}
check_input_image_mkwiimm () {
x=0
if [[ ! ${IMAGE} ]]; then
if test -f RMC?01.wbfs; then
x=1
IMAGE=RMC?01.wbfs
elif test -f RMC?01.iso; then
x=2
IMAGE=RMC?01.iso
elif test -f "${PATCHIMAGE_WBFS_DIR}"/RMC?01.iso; then
x=3
IMAGE="${PATCHIMAGE_WBFS_DIR}"/RMC?01.iso
elif test -f "${PATCHIMAGE_WBFS_DIR}"/RMC?01.wbfs; then
x=4
IMAGE="${PATCHIMAGE_WBFS_DIR}"/RMC?01.wbfs
else else
echo -e "please specify image to use with --iso=<path>" echo -e "please specify image to use with --iso=<path>"
exit 15 exit 15
@ -339,10 +274,8 @@ ask_input_image_mkwiimm () {
ALL patch all images" ALL patch all images"
for image in ${1}/RMC???.{iso,wbfs}; do for image in ${1}/RMC???.{iso,wbfs} ${PATCHIMAGE_WBFS_DIR}/RMC???.{iso,wbfs}; do
if [[ -e ${image} ]]; then [[ -f ${image} ]] && echo " ${image##*/} $(show_mkwiimm_db ${image##*/})"
echo " ${image##*/} $(show_mkwiimm_db ${image##*/})"
fi
done done
echo "" echo ""
@ -355,10 +288,17 @@ ask_input_image_nsmb () {
ALL patch all images" ALL patch all images"
for image in ${1}/SMN???.{iso,wbfs} ${1}/SLF???.{iso,wbfs} ${1}/SMM???.{iso,wbfs} ${1}/SMV???.{iso,wbfs} ${1}/MRR???.{iso,wbfs}; do for image in ${1}/SMN???.{iso,wbfs} \
if [[ -e ${image} ]]; then ${1}/SLF???.{iso,wbfs} \
echo " ${image##*/} $(show_nsmb_db ${image##*/})" ${1}/SMM???.{iso,wbfs} \
fi ${1}/SMV???.{iso,wbfs} \
${1}/MRR???.{iso,wbfs} \
${PATCHIMAGE_WBFS_DIR}/SMN???.{iso,wbfs} \
${PATCHIMAGE_WBFS_DIR}/SLF???.{iso,wbfs} \
${PATCHIMAGE_WBFS_DIR}/SMM???.{iso,wbfs} \
${PATCHIMAGE_WBFS_DIR}/SMV???.{iso,wbfs} \
${PATCHIMAGE_WBFS_DIR}/MRR???.{iso,wbfs}; do
[[ -f ${image} ]] && echo " ${image##*/} $(show_nsmb_db ${image##*/})"
done done
echo "" echo ""
@ -388,7 +328,7 @@ ask_input_image_wiimmfi () {
echo "Choose Wii Game Image to wiimmfi" echo "Choose Wii Game Image to wiimmfi"
for image in ${1}/*.{iso,wbfs}; do for image in ${PWD}/*.{iso,wbfs} ${PATCHIMAGE_WBFS_DIR}/*.${iso,wbfs}; do
if [[ -e ${image} && ! ${image} == "*/RMC*" && $(check_wfc ${image##*/}) == TRUE ]]; then if [[ -e ${image} && ! ${image} == "*/RMC*" && $(check_wfc ${image##*/}) == TRUE ]]; then
echo " ${image##*/} $(show_titles_db ${image##*/})" echo " ${image##*/} $(show_titles_db ${image##*/})"
fi fi

View File

@ -2,6 +2,8 @@
GAME_TYPE="WII_GENERIC" GAME_TYPE="WII_GENERIC"
GAME_NAME="Kirby's Adventure Wii" GAME_NAME="Kirby's Adventure Wii"
WBFS_MASK="SUK[PUJ]01"
PATH_HERO="files/g3d/step/chara/hero/"
show_notes () { show_notes () {
@ -15,7 +17,11 @@ Supported Versions: EUR, JAP, USA
} }
PATH_HERO="files/g3d/step/chara/hero/" check_input_image_special () {
check_input_image
}
exchange_kirby () { exchange_kirby () {
@ -47,8 +53,6 @@ exchange_hero () {
pi_action () { pi_action () {
check_input_image_kirby
echo "Choose character for first player echo "Choose character for first player
1 Kirby (blue) 1 Kirby (blue)

View File

@ -3,6 +3,7 @@
GAME_TYPE="MKWIIMM" GAME_TYPE="MKWIIMM"
GAME_NAME="Mario Kart Wiimm" GAME_NAME="Mario Kart Wiimm"
DOWNLOAD_LINK="http://download.wiimm.de/wiimmfi/patcher/mkw-wiimmfi-patcher-v3.7z" DOWNLOAD_LINK="http://download.wiimm.de/wiimmfi/patcher/mkw-wiimmfi-patcher-v3.7z"
WBFS_MASK="RMC[PUJ]01"
show_notes () { show_notes () {
@ -19,12 +20,6 @@ Supported Versions: EUR, JAP, USA
} }
check_input_image_special () {
check_input_image_mkwiimm
}
download_wiimm () { download_wiimm () {
echo "Choose a Mario Kart Wiimm Distribution echo "Choose a Mario Kart Wiimm Distribution

View File

@ -1,8 +1,9 @@
#!/bin/bash #!/bin/bash
GAME_TYPE="MKWIIMM" GAME_TYPE="WII_GENERIC"
GAME_NAME="Mario Kart Wiimm" GAME_NAME="Mario Kart Wiimm"
FSZS="files/Scene/UI/Font.szs" FSZS="files/Scene/UI/Font.szs"
WBFS_MASK="RMC[PUJ]01"
show_notes () { show_notes () {
@ -21,13 +22,15 @@ Supported Versions: EUR, JAP, USA
check_input_image_special () { check_input_image_special () {
check_input_image_mkwiimm ask_input_image_mkwiimm
ask_input_image_mkwiimm ${IMAGE%/*} echo -e "type ALL or RMC???.wbfs:\n"
echo -e "type RMC???.wbfs:\n"
read ID read ID
if [[ ! -f ${IMAGE%/*}/${ID} ]]; then if [[ -f ${PWD}/${ID} ]]; then
echo "wrong id from user-input given." GAMEDIR=${PWD}
elif [[ -f ${PATCHIMAGE_WBFS_DIR}/${ID} ]]; then
GAMEDIR=${PATCHIMAGE_WBFS_DIR}
else echo "invalid user input."
exit 75 exit 75
fi fi
@ -79,8 +82,9 @@ build_mkwiimm () {
} }
patch_wiimm () { pi_action () {
download_wiimm
build_mkwiimm build_mkwiimm
} }

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
GAME_TYPE="MKWIIMM" GAME_TYPE="WII_GENERIC"
GAME_NAME="Mario Kart Wiimm" GAME_NAME="Mario Kart Wiimm"
CSZS="files/Race/Common.szs" CSZS="files/Race/Common.szs"
CSZD="files/Race/Common.d" CSZD="files/Race/Common.d"
@ -22,14 +22,16 @@ Supported Versions: EUR, JAP, USA
check_input_image_special () { check_input_image_special () {
check_input_image_mkwiimm ask_input_image_mkwiimm
ask_input_image_mkwiimm ${IMAGE%/*} echo -e "type ALL or RMC???.wbfs:\n"
echo -e "type RMC???.wbfs:\n"
read ID read ID
if [[ ! -f ${IMAGE%/*}/${ID} ]]; then if [[ -f ${PWD}/${ID} ]]; then
echo "wrong id from user-input given." GAMEDIR=${PWD}
exit 1 elif [[ -f ${PATCHIMAGE_WBFS_DIR}/${ID} ]]; then
GAMEDIR=${PATCHIMAGE_WBFS_DIR}
else echo "invalid user input."
exit 75
fi fi
} }
@ -144,8 +146,9 @@ build_mkwiimm () {
} }
patch_wiimm () { pi_action () {
download_wiimm
build_mkwiimm build_mkwiimm
} }

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
GAME_TYPE="MKWIIMM" GAME_TYPE="WII_GENERIC"
GAME_NAME="Mario Kart Wiimm" GAME_NAME="Mario Kart Wiimm"
show_notes () { show_notes () {
@ -20,13 +20,15 @@ Supported Versions: EUR, JAP, USA
check_input_image_special () { check_input_image_special () {
check_input_image_mkwiimm ask_input_image_mkwiimm
ask_input_image_mkwiimm ${IMAGE%/*} echo -e "type ALL or RMC???.wbfs:\n"
echo -e "type RMC???.wbfs:\n"
read ID read ID
if [[ ! -f ${IMAGE%/*}/${ID} ]]; then if [[ -f ${PWD}/${ID} ]]; then
echo "wrong id from user-input given." GAMEDIR=${PWD}
elif [[ -f ${PATCHIMAGE_WBFS_DIR}/${ID} ]]; then
GAMEDIR=${PATCHIMAGE_WBFS_DIR}
else echo "invalid user input."
exit 75 exit 75
fi fi
@ -121,8 +123,9 @@ build_mkwiimm () {
} }
patch_wiimm () { pi_action () {
download_wiimm
build_mkwiimm build_mkwiimm
} }

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
DOWNLOAD_LINK="http://download.wiimm.de/wiimmfi/patcher/mkw-wiimmfi-patcher-v3.7z" DOWNLOAD_LINK="http://download.wiimm.de/wiimmfi/patcher/mkw-wiimmfi-patcher-v3.7z"
GAME_TYPE="MKWIIMM" GAME_TYPE="WII_GENERIC"
GAME_NAME="Mario Kart Wiimmfi" GAME_NAME="Mario Kart Wiimmfi"
show_notes () { show_notes () {
@ -21,11 +21,19 @@ Supported Versions: EUR, JAP, USA
check_input_image_special () { check_input_image_special () {
check_input_image_mkwiimm ask_input_image_mkwiimm
ask_input_image_mkwiimm ${IMAGE%/*}
echo -e "type ALL or RMC???.wbfs:\n" echo -e "type ALL or RMC???.wbfs:\n"
read ID read ID
if [[ -f ${PWD}/${ID} ]]; then
GAMEDIR=${PWD}
elif [[ -f ${PATCHIMAGE_WBFS_DIR}/${ID} ]]; then
GAMEDIR=${PATCHIMAGE_WBFS_DIR}
else echo "invalid user input."
exit 75
fi
} }
download_wiimm () { download_wiimm () {
@ -69,3 +77,10 @@ patch_wiimm () {
rm -rf ${HOME}/.patchimage/tools/wiimfi-patcher/ rm -rf ${HOME}/.patchimage/tools/wiimfi-patcher/
} }
pi_action () {
download_wiimm
patch_wiimm
}

View File

@ -12,6 +12,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="Riivolution/Another.xml" XML_FILE="Riivolution/Another.xml"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -30,12 +31,6 @@ Supported Versions: EURv1, USAv1, USAv2
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"/AwesomerSLM
XML_FILE="${RIIVOLUTION_DIR}"/riivolution/ASLMriivo.xml XML_FILE="${RIIVOLUTION_DIR}"/riivolution/ASLMriivo.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -29,12 +30,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"/Cannon/
XML_FILE="${RIIVOLUTION_DIR}"/riivolution/CannonP.xml XML_FILE="${RIIVOLUTION_DIR}"/riivolution/CannonP.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -29,12 +30,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/dusmbaePAL.xml XML_FILE="${RIIVOLUTION_DIR}"/dusmbaePAL.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -24,12 +25,6 @@ Supported Versions: EURv1, EURv2
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}/../riivolution/Devil SMWSP-Eng.xml" XML_FILE="${RIIVOLUTION_DIR}/../riivolution/Devil SMWSP-Eng.xml"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -24,12 +25,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"/ESBW/
XML_FILE="${RIIVOLUTION_DIR}"/riivolution/ESBWP.xml XML_FILE="${RIIVOLUTION_DIR}"/riivolution/ESBWP.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -26,12 +27,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}/../riivolution/Ghostly" XML_FILE="${RIIVOLUTION_DIR}/../riivolution/Ghostly"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -24,12 +25,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/KoopaP.xml XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/KoopaP.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -34,12 +35,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/LSYB XML_FILE="${RIIVOLUTION_DIR}"/LSYB
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -28,12 +29,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv1, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/MSMBWIIJALA.xml XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/MSMBWIIJALA.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -24,12 +25,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NewerApocalypse.xml XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NewerApocalypse.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -35,12 +36,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NewerFALLING.xml XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NewerFALLING.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -28,12 +29,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -12,6 +12,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="riivolution/Xmas" XML_FILE="riivolution/Xmas"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -30,12 +31,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -12,6 +12,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NewerSMBW.xml XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NewerSMBW.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -30,12 +31,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -12,6 +12,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"/SumSun/
XML_FILE="${RIIVOLUTION_DIR}"/riivolution/SumSunP.xml XML_FILE="${RIIVOLUTION_DIR}"/riivolution/SumSunP.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -29,12 +30,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}/../riivolution/OtherWorld" XML_FILE="${RIIVOLUTION_DIR}/../riivolution/OtherWorld"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -28,12 +29,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NSMBW3.XML XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NSMBW3.XML
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -26,12 +27,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -8,6 +8,7 @@ RIIVOLUTION_DIR="nsmb"
GAMENAME="New Super Mario Bros. 4" GAMENAME="New Super Mario Bros. 4"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -25,12 +26,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -20,13 +20,16 @@ Supported Versions: EUR, JAP, USA
check_input_image_special () { check_input_image_special () {
check_input_image_nsmb ask_input_image_nsmb
ask_input_image_nsmb ${IMAGE%/*}
echo -e "type SMN???.wbfs:\n" echo -e "type ??????.wbfs (or ??????.iso):\n"
read ID read ID
if [[ ! -f ${IMAGE%/*}/${ID} ]]; then if [[ -f ${PWD}/${ID} ]]; then
echo "wrong id from user-input given." GAMEDIR=${PWD}
elif [[ -f ${PATCHIMAGE_WBFS_DIR}/${ID} ]]; then
GAMEDIR=${PATCHIMAGE_WBFS_DIR}
else echo "invalid user input."
exit 75 exit 75
fi fi
@ -34,8 +37,6 @@ check_input_image_special () {
pi_action () { pi_action () {
check_input_image_special
if [[ -f ${HOME}/.patchimage.choice ]]; then if [[ -f ${HOME}/.patchimage.choice ]]; then
echo "Your choices from last time can be re-used." echo "Your choices from last time can be re-used."
echo "y (yes) or n (no)" echo "y (yes) or n (no)"

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}/../riivolution/NSMBtemplate.xml" XML_FILE="${RIIVOLUTION_DIR}/../riivolution/NSMBtemplate.xml"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -24,12 +25,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -8,6 +8,7 @@ RIIVOLUTION_DIR="Retro Remix"
GAMENAME="New Super Mario Bros. Wii Retro Remix" GAMENAME="New Super Mario Bros. Wii Retro Remix"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -27,12 +28,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}/"
XML_FILE="${RIIVOLUTION_DIR}/../riivolution/RSMBW.xml" XML_FILE="${RIIVOLUTION_DIR}/../riivolution/RSMBW.xml"
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -24,12 +25,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/rvlwii.xml XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/rvlwii.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -30,12 +31,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/Skyland.xml XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/Skyland.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -30,12 +31,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"/Vacation
XML_FILE="${RIIVOLUTION_DIR}"/riivolution/Vacation XML_FILE="${RIIVOLUTION_DIR}"/riivolution/Vacation
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -26,12 +27,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}/../riivolution/TLOY (" XML_FILE="${RIIVOLUTION_DIR}/../riivolution/TLOY ("
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -24,12 +25,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -10,6 +10,7 @@ XML_SOURCE="${RIIVOLUTION_DIR}"
XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/WinterMoon.xml XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/WinterMoon.xml
GAME_TYPE=RIIVOLUTION GAME_TYPE=RIIVOLUTION
BANNER_LOCATION=${WORKDIR}/files/opening.bnr BANNER_LOCATION=${WORKDIR}/files/opening.bnr
WBFS_MASK="SMN[PUJ]01"
show_notes () { show_notes () {
@ -37,12 +38,6 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1
} }
check_input_image_special () {
check_input_image_nsmb
}
detect_game_version () { detect_game_version () {
nsmbw_version nsmbw_version

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
DOWNLOAD_LINK="http://download.wiimm.de/wiimmfi/patcher/wiimmfi-patcher-v3.7z" DOWNLOAD_LINK="http://download.wiimm.de/wiimmfi/patcher/wiimmfi-patcher-v3.7z"
GAME_TYPE="MKWIIMM" GAME_TYPE="WII_GENERIC"
GAME_NAME="Mario Kart Wiimmfi" GAME_NAME="Mario Kart Wiimmfi"
show_notes () { show_notes () {
@ -21,32 +21,23 @@ Supported Versions: EUR, JAP, USA
check_input_image_special () { check_input_image_special () {
if [[ ${IMAGE} ]]; then ask_input_image_wiimmfi
ask_input_image_wiimmfi ${PWD}
GAMEDIR=${PWD}
else
ask_input_image_wiimmfi ${PATCHIMAGE_WBFS_DIR}
GAMEDIR=${PATCHIMAGE_WBFS_DIR}
fi
echo -e "type ??????.wbfs (or ??????.iso):\n" echo -e "type ??????.wbfs (or ??????.iso):\n"
read ID read ID
} if [[ -f ${PWD}/${ID} ]]; then
GAMEDIR=${PWD}
download_wiimm () { elif [[ -f ${PATCHIMAGE_WBFS_DIR}/${ID} ]]; then
GAMEDIR=${PATCHIMAGE_WBFS_DIR}
return 0 else echo "invalid user input."
}
patch_wiimm () {
if [[ ! -f ${GAMEDIR}/${ID} ]]; then
echo "unvalid game passed from user-input. exit"
exit 75 exit 75
fi fi
}
pi_action () {
cp -v ${GAMEDIR}/${ID} . 2>/dev/null cp -v ${GAMEDIR}/${ID} . 2>/dev/null
${WIT} cp -o ${ID} --DEST "${PATCHIMAGE_GAME_DIR}"/${ID} \ ${WIT} cp -o ${ID} --DEST "${PATCHIMAGE_GAME_DIR}"/${ID} \
--update --psel=data --wiimmfi >/dev/null || \ --update --psel=data --wiimmfi >/dev/null || \