From 4a1bd8c20c978becf7bf2d6a7c0eb41f827f991f Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Tue, 13 May 2014 17:49:00 +0200 Subject: [PATCH] generic wiimmfi patcher! --- patchimage.sh | 4 ++++ script.d/common.sh | 25 +++++++++++++++++++++---- script.d/wiimmfi.sh | 5 +++++ 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/patchimage.sh b/patchimage.sh index 0c25491..cc25e68 100755 --- a/patchimage.sh +++ b/patchimage.sh @@ -103,6 +103,10 @@ case ${GAME} in source ${PATCHIMAGE_SCRIPT_DIR}/wiimmfi.sh ;; + o | O | Wiimmpatch ) + source ${PATCHIMAGE_SCRIPT_DIR}/wiimmfi_generic.sh + ;; + 1 | ParallelWorlds | "The Legend of Zelda: Parallel Worlds" ) source ${PATCHIMAGE_SCRIPT_DIR}/parallelworlds.sh ;; diff --git a/script.d/common.sh b/script.d/common.sh index facfbb5..3d2b25d 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -9,7 +9,7 @@ setup_tools () { fi #if [[ $(which wit) ]]; then - WIT=$(which wit) + # WIT=$(which wit) #else # WIT=${PATCHIMAGE_TOOLS_DIR}/wit.${SUFFIX} #fi @@ -57,7 +57,8 @@ K NSMBW3: The Final Levels L Super Mario Vacation M Awesomer Super Luigi Mini -N Wiimfi Patcher. Patch all RMC??? to use Wiimm's server +N Wiimfi Patcher. Patch Mario Kart to use Wiimm's server +O Wiimfi Patcher. Patch WFC games to use Wiimm's server (exp) 1 The Legend of Zelda: Parallel Worlds " @@ -148,6 +149,10 @@ check_directories () { mkdir -p ${PATCHIMAGE_AUDIO_DIR} fi + if [[ ! -d ${PATCHIMAGE_COVER_DIR} ]]; then + mkdir -p ${PATCHIMAGE_COVER_DIR} + fi + } @@ -241,6 +246,20 @@ ask_input_image_mkwiimm () { } +ask_input_image_wiimmfi () { + + echo "Choose Wii Game Image to wiimmfi" + + for image in ${1}/RMC???.{iso,wbfs}; do + if [[ -e ${image} && ! ${image} == "*/RMC*" ]]; then + echo " ${image##*/}" + fi + done + + echo "" + +} + check_riivolution_patch () { x=0 @@ -280,8 +299,6 @@ check_riivolution_patch () { download_covers () { - [[ ! -d ${PATCHIMAGE_COVER_DIR} ]] && mkdir -p ${PATCHIMAGE_COVER_DIR} - for path in cover cover3D coverfull disc disccustom; do wget -O ${PATCHIMAGE_COVER_DIR}/${1}_${path}.png \ http://art.gametdb.com/wii/${path}/EN/${1}.png &>/dev/null \ diff --git a/script.d/wiimmfi.sh b/script.d/wiimmfi.sh index 6cf3ab5..aecd31b 100644 --- a/script.d/wiimmfi.sh +++ b/script.d/wiimmfi.sh @@ -60,6 +60,11 @@ patch_wiimm () { fi done else + if [[ ! -f ${IMAGE%/*}/${ID} ]]; then + echo "unvalid game passed from user-input. exit" + exit 1 + fi + cp -v ${IMAGE%/*}/${ID} . 2>/dev/null ./create-image.sh >/dev/null mv -v ./wiimmfi-images/${ID} "${PATCHIMAGE_GAME_DIR}"/