安裝 Steam
登入
|
語言
簡體中文
日本語(日文)
한국어(韓文)
ไทย(泰文)
Български(保加利亞文)
Čeština(捷克文)
Dansk(丹麥文)
Deutsch(德文)
English(英文)
Español - España(西班牙文 - 西班牙)
Español - Latinoamérica(西班牙文 - 拉丁美洲)
Ελληνικά(希臘文)
Français(法文)
Italiano(義大利文)
Bahasa Indonesia(印尼語)
Magyar(匈牙利文)
Nederlands(荷蘭文)
Norsk(挪威文)
Polski(波蘭文)
Português(葡萄牙文 - 葡萄牙)
Português - Brasil(葡萄牙文 - 巴西)
Română(羅馬尼亞文)
Русский(俄文)
Suomi(芬蘭文)
Svenska(瑞典文)
Türkçe(土耳其文)
tiếng Việt(越南文)
Українська(烏克蘭文)
回報翻譯問題
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