diff --git a/patchimage.sh b/patchimage.sh index b1a561b..4984dc0 100755 --- a/patchimage.sh +++ b/patchimage.sh @@ -59,12 +59,11 @@ case ${GAME_TYPE} in detect_game_version place_files + download_banner apply_banner - prepare_xml - ${WIT} dolpatch ${DOL} xml="${XML_FILE}" --source "${XML_SOURCE}" -q - dolpatch_extra + dolpatch if [[ ${CUSTOMID} ]]; then ${WIT} cp -v -B ${WORKDIR} ${CUSTOMID}.wbfs -vv --disc-id=${CUSTOMID} ${TMD_OPTS} --name "${GAMENAME}" diff --git a/script.d/anothersmb.sh b/script.d/anothersmb.sh index a08f808..46026d1 100644 --- a/script.d/anothersmb.sh +++ b/script.d/anothersmb.sh @@ -133,17 +133,13 @@ place_files () { } -prepare_xml () { +dolpatch () { cp "${XML_FILE}" "${XML_FILE}".new sed -e 's/80001800/803482C0/g' -i "${XML_FILE}".new XML_FILE="${XML_FILE}".new -} - -dolpatch_extra () { - - ${WIT} dolpatch ${DOL} xml="patches/AnotherSMB-Loader.xml" -q + ${WIT} dolpatch ${DOL} xml="${XML_FILE}" -s "${XML_SOURCE}" xml="patches/AnotherSMB-Loader.xml" -q ${WIT} dolpatch ${DOL} xml="patches/NSMBW_AP.xml" -q } diff --git a/script.d/newerholiday.sh b/script.d/newerholiday.sh index e4be10b..ba47757 100644 --- a/script.d/newerholiday.sh +++ b/script.d/newerholiday.sh @@ -115,15 +115,9 @@ place_files () { } -prepare_xml () { +dolpatch () { - echo -ne - -} - -dolpatch_extra () { - - ${WIT} dolpatch ${DOL} xml="patches/HolidaySpecial-Loader.xml" -q + ${WIT} dolpatch ${DOL} xml="${XML_FILE}" -s "${XML_SOURCE}" xml="patches/HolidaySpecial-Loader.xml" -q ${WIT} dolpatch ${DOL} xml="patches/NSMBW_AP.xml" -q } diff --git a/script.d/newersmb.sh b/script.d/newersmb.sh index 4c0b4c2..e6c797f 100644 --- a/script.d/newersmb.sh +++ b/script.d/newersmb.sh @@ -149,17 +149,13 @@ place_files () { } -prepare_xml () { +dolpatch () { cp "${XML_FILE}" "${XML_FILE}".new sed -e 's/80001800/803482C0/g' -i "${XML_FILE}".new XML_FILE="${XML_FILE}".new -} - -dolpatch_extra () { - - ${WIT} dolpatch ${DOL} xml="patches/NewerSMBW-Loader.xml" -q + ${WIT} dolpatch ${DOL} xml="${XML_FILE}" -s "${XML_SOURCE}" xml="patches/NewerSMBW-Loader.xml" -q ${WIT} dolpatch ${DOL} xml="patches/NSMBW_AP.xml" -q } diff --git a/script.d/newersummersun.sh b/script.d/newersummersun.sh index e4b354e..07f7609 100644 --- a/script.d/newersummersun.sh +++ b/script.d/newersummersun.sh @@ -117,20 +117,18 @@ place_files () { } -prepare_xml () { +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" \ + xml="patches/SummerSun-Loader.xml" -q -dolpatch_extra () { - - ${WIT} dolpatch ${DOL} "802F148C=53756D6D53756E#7769696D6A3264" -q - ${WIT} dolpatch ${DOL} "802F118C=53756D6D53756E#7769696D6A3264" -q - ${WIT} dolpatch ${DOL} "802F0F8C=53756D6D53756E#7769696D6A3264" -q - ${WIT} dolpatch ${DOL} xml="patches/SummerSun-Loader.xml" -q ${WIT} dolpatch ${DOL} xml="patches/NSMBW_AP.xml" -q }