several improvements

This commit is contained in:
Christopher Roy Bratusek 2014-05-16 19:34:12 +02:00
parent dba36f2324
commit af8912d692
14 changed files with 46 additions and 55 deletions

0
override/linux32/wbmgt Normal file → Executable file
View File

0
override/linux32/wimgt Normal file → Executable file
View File

0
override/linux32/wit Normal file → Executable file
View File

0
override/linux32/wstrt Normal file → Executable file
View File

0
override/linux32/wszst Normal file → Executable file
View File

0
override/linux64/wbmgt Normal file → Executable file
View File

0
override/linux64/wimgt Normal file → Executable file
View File

0
override/linux64/wit Normal file → Executable file
View File

0
override/linux64/wstrt Normal file → Executable file
View File

0
override/linux64/wszst Normal file → Executable file
View File

View File

@ -168,18 +168,14 @@ case ${GAME_TYPE} in
TMD_OPTS="--tt-id=K" TMD_OPTS="--tt-id=K"
fi fi
echo "*** 10) rebuild game" echo "*** 10) rebuild and store game"
${WIT} cp -q -B ${WORKDIR} ${GAMEID}.wbfs --disc-id=${GAMEID} ${TMD_OPTS} --name "${GAMENAME}" || exit 51 ${WIT} cp -o -q -B ${WORKDIR} -DEST "${PATCHIMAGE_GAME_DIR}"/${GAMEID}.wbfs \
--disc-id=${GAMEID} ${TMD_OPTS} --name "${GAMENAME}" || exit 51
if [[ -d ${PATCHIMAGE_GAME_DIR} && ${PATCHIMAGE_GAME_DIR} != ${PWD} ]]; then
echo "*** 11) store game"
mv ${GAMEID}.wbfs "${PATCHIMAGE_GAME_DIR}"/
fi
echo "*** 12) remove workdir" echo "*** 12) remove workdir"
rm -rf ${WORKDIR} rm -rf ${WORKDIR}
echo -e "\n >>> ${GAMENAME} saved as: ${PATCHIMAGE_WBFS_DIR}/${GAMEID}.wbfs\n" echo -e "\n >>> ${GAMENAME} saved as: ${PATCHIMAGE_GAME_DIR}/${GAMEID}.wbfs\n"
if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then
echo -e "\n*** Z) download_covers" echo -e "\n*** Z) download_covers"

View File

@ -17,6 +17,34 @@ Supported Versions: EUR, JAP, USA
PATH_HERO="files/g3d/step/chara/hero/" PATH_HERO="files/g3d/step/chara/hero/"
exchange_kirby () {
cp workdir/${PATH_HERO}/kirby/base/${1}.brres.cmp{,_tmp}
cp workdir/${PATH_HERO}/kirby/base/Pink.brres.cmp \
workdir/${PATH_HERO}/kirby/base/${1}.brres.cmp
mv workdir/${PATH_HERO}/kirby/base/${1}.brres.cmp_tmp \
workdir/${PATH_HERO}/kirby/base/Pink.brres.cmp
}
exchange_hero () {
cp workdir/${PATH_HERO}/${1}/base/Default.brres.cmp \
workdir/${PATH_HERO}/kirby/base/Pink.brres.cmp_temp
cp workdir/${PATH_HERO}/kirby/base/Pink.brres.cmp \
workdir/${PATH_HERO}/${1}/base/Default.brres.cmp
mv workdir/${PATH_HERO}/kirby/base/Pink.brres.cmp{_temp,}
for brres in workdir/${PATH_HERO}/${1}/normal/*.cmp ; do
xfile=${brres##*/}
xpath=${brres%/*}
cp ${brres} workdir/${PATH_HERO}/kirby/normal/${xfile}_temp
cp workdir/${PATH_HERO}/kirby/normal/${xfile} \
workdir/${PATH_HERO}/${1}/normal/
mv workdir/${PATH_HERO}/kirby/normal/${xfile}{_temp,}
done
}
pi_action () { pi_action () {
check_input_image_kirby check_input_image_kirby
@ -41,15 +69,15 @@ read ID
rm -rf workdir rm -rf workdir
echo -e "\n*** 3) extracting images" echo -e "\n*** 3) extracting image"
${WIT} extract ${IMAGE} --psel=data -d workdir -q || exit 51 ${WIT} extract ${IMAGE} --psel=data -d workdir -q || exit 51
if [[ ! -d "${PATCHIMAGE_RIIVOLUTION_DIR}"/hero/ ]]; then if [[ ! -d "${PATCHIMAGE_RIIVOLUTION_DIR}"/hero/ ]]; then
echo -e "\n*** 4) this is the first run, so backing up all characters echo "*** 4) this is the first run, so backing up all characters
(in ${PATCHIMAGE_RIIVOLUTION_DIR}) for future customizations" (in ${PATCHIMAGE_RIIVOLUTION_DIR}) for future customizations"
cp -r workdir/${PATH_HERO}/ "${PATCHIMAGE_RIIVOLUTION_DIR}" cp -r workdir/${PATH_HERO}/ "${PATCHIMAGE_RIIVOLUTION_DIR}"
else else
echo -e "\n*** 4) restoring original characters" echo "*** 4) restoring original characters"
cp -r "${PATCHIMAGE_RIIVOLUTION_DIR}"/hero/* workdir/${PATH_HERO}/ cp -r "${PATCHIMAGE_RIIVOLUTION_DIR}"/hero/* workdir/${PATH_HERO}/
fi fi
@ -63,47 +91,17 @@ read ID
[[ ${ID} != 7 ]] && echo "*** 5) exchanging characters" [[ ${ID} != 7 ]] && echo "*** 5) exchanging characters"
case ${ID} in case ${ID} in
1) cp workdir/${PATH_HERO}/kirby/base/Blue.brres.cmp{,_tmp} 1) exchange_kirby Blue ;;
cp workdir/${PATH_HERO}/kirby/base/{Pink,Blue}.brres.cmp 2) exchange_kirby Yellow ;;
mv workdir/${PATH_HERO}/kirby/base/{Blue.brres.cmp_tmp,Pink.brres.cmp} 3) exchange_kirby Green ;;
;; 4) exchange_hero dedede ;;
5) exchange_hero meta ;;
2) cp workdir/${PATH_HERO}/kirby/base/Yellow.brres.cmp{,_tmp} 6) exchange_hero dee ;;
cp workdir/${PATH_HERO}/kirby/base/{Pink,Yellow}.brres.cmp
mv workdir/${PATH_HERO}/kirby/base/{Yellow.brres.cmp_tmp,Pink.brres.cmp}
;;
3) cp workdir/${PATH_HERO}/kirby/base/Green.brres.cmp{,_tmp}
cp workdir/${PATH_HERO}/kirby/base/{Pink,Green}.brres.cmp
mv workdir/${PATH_HERO}/kirby/base/{Green.brres.cmp_tmp,Pink.brres.cmp}
;;
4) cp workdir/${PATH_HERO}/dedede/base/Default.brres.cmp \
workdir/${PATH_HERO}/kirby/base/Pink.brres.cmp
cp workdir/${PATH_HERO}/dedede/normal/*.cmp \
workdir/${PATH_HERO}/kirby/normal/
;;
5) cp workdir/${PATH_HERO}/meta/base/Default.brres.cmp \
workdir/${PATH_HERO}/kirby/base/Pink.brres.cmp
cp workdir/${PATH_HERO}/meta/normal/*.cmp \
workdir/${PATH_HERO}/kirby/normal/
;;
6) cp workdir/${PATH_HERO}/de/base/Default.brres.cmp \
workdir/${PATH_HERO}/kirby/base/Pink.brres.cmp
cp workdir/${PATH_HERO}/dee/normal/*.cmp \
workdir/${PATH_HERO}/kirby/normal/
;;
esac esac
echo "*** 6) rebuilding the game" echo "*** 6) rebuilding the game "
${WIT} cp -q -B workdir SUK${REG}01.wbfs || exit 51 echo " (storing game in ${PATCHIMAGE_GAME_DIR}/SUK${REG}01.wbfs)"
${WIT} cp -o -q -B workdir ${PATCHIMAGE_GAME_DIR}/SUK${REG}01.wbfs || exit 51
if [[ -d ${PATCHIMAGE_GAME_DIR} && ${PATCHIMAGE_GAME_DIR} != ${PWD} ]]; then
echo "*** 7) storing game in ${PATCHIMAGE_GAME_DIR}"
mv SUK${REG}01.wbfs "${PATCHIMAGE_GAME_DIR}"/
fi
rm -rf workdir rm -rf workdir

View File

@ -89,7 +89,7 @@ PRIV_SAVEGAME=${MKWIIMM_OWN_SAVE}" > ${PWD}/config.def
echo "patching >${DIST}< to use custom server..." echo "patching >${DIST}< to use custom server..."
${WIT} cp ${PWD}/RMC${REG}${ID}.wbfs --DEST \ ${WIT} cp ${PWD}/RMC${REG}${ID}.wbfs --DEST \
${PATCHIMAGE_GAME_DIR}/RMC${REG}${ID}.wbfs \ ${PATCHIMAGE_GAME_DIR}/RMC${REG}${ID}.wbfs \
--update --psel=data --wiimmfi >/dev/null --update --psel=data --wiimmfi -q -o
echo "cleaning up workdir..." echo "cleaning up workdir..."
cd .. cd ..

View File

@ -48,8 +48,7 @@ patch_wiimm () {
fi fi
cp -v ${GAMEDIR}/${ID} . 2>/dev/null cp -v ${GAMEDIR}/${ID} . 2>/dev/null
${WIT} cp ${ID} --DEST wiimmfi-images/ --update --psel=data --wiimmfi >/dev/null ${WIT} cp -o ${ID} --DEST "${PATCHIMAGE_GAME_DIR}"/${ID} --update --psel=data --wiimmfi >/dev/null
mv -v ./wiimmfi-images/${ID} "${PATCHIMAGE_GAME_DIR}"/
rm -f ${ID} rm -f ${ID}
if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then
@ -57,6 +56,4 @@ patch_wiimm () {
download_covers ${ID/.*} download_covers ${ID/.*}
fi fi
rmdir wiimmfi-images/
} }