Instalar Steam
iniciar sesión
|
idioma
简体中文 (chino simplificado)
繁體中文 (chino tradicional)
日本語 (japonés)
한국어 (coreano)
ไทย (tailandés)
Български (búlgaro)
Čeština (checo)
Dansk (danés)
Deutsch (alemán)
English (inglés)
Español de Hispanoamérica
Ελληνικά (griego)
Français (francés)
Italiano
Bahasa Indonesia (indonesio)
Magyar (húngaro)
Nederlands (holandés)
Norsk (noruego)
Polski (polaco)
Português (Portugués de Portugal)
Português-Brasil (portugués de Brasil)
Română (rumano)
Русский (ruso)
Suomi (finés)
Svenska (sueco)
Türkçe (turco)
Tiếng Việt (vietnamita)
Українська (ucraniano)
Comunicar un error de traducción
usage()
{
printf "%s\n%s\n" "usage: ${0} FILE [DIR]" "See ${0} --help"
exit
}
help()
{
cat << _EOF
usage: ${0} FILE [DIR]
FILE:
A BOHH (Border of her Heart) pak file (.pak)
DIR:
Optional directory to specify where to extract
_EOF
exit
}
[] && usage
[] && help
[] &&
{
printf "%s\n" "${1} is not a file"
usage
}
[] &&
{
printf "%s\n" "${1} is not a valid BOHH pak file"
usage
}
if []
then
mkdir -p ./"${2}"
else
mkdir -p ./"${1%%.*}"
fi
record_count=$(od -N 2 -j 8 -t u2 "${1}" | head -n 1 | sed 's/^.*\ //')
if
for record_index in $(seq "${record_count}")
do
value=$(( 12 + (record_index - 1) * 6 ))
file_name=$(od -N 2 -j "${value}" -t x2 "${1}" | head -n 1 | sed 's/^.*\ //')
file1_offset=$(od -N 4 -j "$(( value + 2 ))" -t u4 "${1}" | head -n 1 | sed 's/^.*\ //')
file2_offset=$(od -N 4 -j "$(( value + 8 ))" -t u4 "${1}" | head -n 1 | sed 's/^.*\ //')
file_size=$(( file2_offset - file1_offset ))
dd if="${1}" bs=1 count="${file_size}" skip="${file1_offset}" of="${2:-${1%%.*}}"/"${file_name}" 2> /dev/null
echo "\033[1m${record_index}\033[0m of \033[1m${record_count}\033[0m extracted"
tput cuu1
done
then
printf "\n%s\n" "Successfully extracted ${1}"
else
printf "\n%s\n" "Failed to extract ${1}"
exit
fi
id: bohhpak
application: Border of her Heart .pak file
endian: le
seq:
- id: magic
contents: [0x05, 0, 0, 0, 0x01, 0, 0, 0]
- id: recordcount
type: u2
- id: entrycount # probably for indexed filenames
type: u2
- id: filerecords
type: filerecord
repeat: expr
repeat-expr: recordcount
- id: empty
size: 2
- id: selfsize
type: u4
- id: entrytable
type: tableentry
repeat: expr
repeat-expr: entrycount
types:
filerecord:
seq:
- id: uniqueid
type: u2
- id: fileoffset
type: u4
tableentry:
seq:
- id: header
type: u2
- id: index
type: u2