最初コミット

main
Pk11 3 years ago
commit 6bac5532fd

2
.gitignore vendored

@ -0,0 +1,2 @@
*.DS_Store
*._

@ -0,0 +1,19 @@
# 初音ミク -Project DIVA- MEGA39's f Edition 日本語訳
これは[Hatsune Miku: Project DIVA Mega Mix -f Edition-](https://youtu.be/m-UXOHaYEIw)を日本語に戻る。
## インストール
1. [英語版](https://youtu.be/m-UXOHaYEIw)をダウンロードしてインストール
- 翻訳がインストールまで、LiveArea™をリフレッシュしない
2. [このリポジトリ](https://git.ピケ.コム/pk11/mmfe-ja/archive/main.zip)をダウンロード
3. リポジトリのZIPを解凍して`dist`フォルダのコンテンツを`ux0:app/MMFE21622`にコピー
4. VitaShellにLiveArea™をリフレッシュ
## 状態
- [x] LiveArea™の名前
- [x] リズムゲームの楽曲の名前
- [ ] 楽曲の歌詞
- [ ] ○は決定、×はキャンセル
- [ ] UIテキスト
- [x] 公式テキスト
- [ ] 英語版の新テキスト
- [ ] UIイメージのテキスト

Binary file not shown.

8262
dist/rom/pv_db.txt vendored

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -0,0 +1,49 @@
#!/usr/bin/env python3
from argparse import ArgumentParser, FileType
from struct import pack, unpack
import json
import re
def str_array2json(input, output):
if input.endswith(".bin"):
# str_array.binからJSONへ
with open(input, "rb") as f:
offsets = []
while True:
offset, = unpack("<I", f.read(4))
if offset == 0:
break
offsets.append(offset)
strings = []
for offset in offsets:
f.seek(offset)
bstr = f.read(256)
strings.append(bstr[:bstr.find(b"\0")].decode("utf8"))
with open(output, "w") as out:
json.dump(strings, out, indent="\t", ensure_ascii=False)
else:
# JSONからstr_array.binへ
with open(input, "r") as f, open(output, "wb") as out:
strings = json.loads(re.sub("//.*", "", f.read(), flags=re.MULTILINE))
cur_ofs = (len(strings) + 1) * 4
for string in strings:
out.write(pack("<I", cur_ofs))
cur_ofs += len(string.encode("utf8")) + 1
out.write(pack("<I", 0))
for string in strings:
out.write(string.encode("utf8") + b"\0")
if __name__ == "__main__":
parser = ArgumentParser(description="Project DIVA fのstr_array.binをJSONに変換")
parser.add_argument("input", type=str)
parser.add_argument("output", type=str)
args = parser.parse_args()
str_array2json(args.input, args.output)
Loading…
Cancel
Save