Skip to content

Commit

Permalink
修正几处主程序文本位置错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouroboros committed Feb 13, 2016
1 parent 7651aed commit a8d5549
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 21 deletions.
36 changes: 18 additions & 18 deletions tools/ed6_fc_text.json
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@
"translation": ""
},
{
"rva": "0015B2F6",
"rva": "0015B374",
"original": "━━━◆",
"translation": ""
},
Expand Down Expand Up @@ -920,7 +920,7 @@
"translation": ""
},
{
"rva": "0015B635",
"rva": "0015D070",
"original": " %4d",
"translation": ""
},
Expand All @@ -945,7 +945,7 @@
"translation": ""
},
{
"rva": "0015B632",
"rva": "0015D144",
"original": " %4d",
"translation": ""
},
Expand Down Expand Up @@ -1000,7 +1000,7 @@
"translation": ""
},
{
"rva": "0015B631",
"rva": "0015D210",
"original": " %4d",
"translation": ""
},
Expand Down Expand Up @@ -1320,7 +1320,7 @@
"translation": ""
},
{
"rva": "0015B2F2",
"rva": "0015B370",
"original": "━━━━━◆",
"translation": ""
},
Expand All @@ -1345,7 +1345,7 @@
"translation": ""
},
{
"rva": "0015B2E6",
"rva": "0015B364",
"original": "━━━━━━━━━━━◆",
"translation": ""
},
Expand Down Expand Up @@ -1415,7 +1415,7 @@
"translation": ""
},
{
"rva": "0015B315",
"rva": "0015DE80",
"original": "-----",
"translation": ""
},
Expand Down Expand Up @@ -1980,7 +1980,7 @@
"translation": ""
},
{
"rva": "0015E9A9",
"rva": "0015E9F0",
"original": " Mira ",
"translation": ""
},
Expand Down Expand Up @@ -2400,7 +2400,7 @@
"translation": "把%d个换成%d米拉。"
},
{
"rva": "0015B3EE",
"rva": "0015F664",
"original": "Sepith",
"translation": ""
},
Expand All @@ -2410,7 +2410,7 @@
"translation": ""
},
{
"rva": "0015B2FA",
"rva": "0015B378",
"original": "━◆",
"translation": ""
},
Expand Down Expand Up @@ -3605,12 +3605,12 @@
"translation": ""
},
{
"rva": "0015FE02",
"rva": "0016240C",
"original": "Junior Bracer - %s Class",
"translation": ""
},
{
"rva": "0015FE86",
"rva": "00162428",
"original": "準遊撃士・%s級",
"translation": "准游击士·%s级"
},
Expand Down Expand Up @@ -3670,7 +3670,7 @@
"translation": "手册"
},
{
"rva": "0015DFBA",
"rva": "00162708",
"original": "ステータス",
"translation": "人物状态"
},
Expand Down Expand Up @@ -3860,7 +3860,7 @@
"translation": "有效率(%)"
},
{
"rva": "0015B31E",
"rva": "00162E24",
"original": "Item",
"translation": ""
},
Expand Down Expand Up @@ -3910,12 +3910,12 @@
"translation": ""
},
{
"rva": "00001E42",
"rva": "0015FDA8",
"original": "",
"translation": ""
},
{
"rva": "0015B411",
"rva": "0015FDAC",
"original": "",
"translation": ""
},
Expand All @@ -3925,7 +3925,7 @@
"translation": ""
},
{
"rva": "00024B34",
"rva": "0015FDB4",
"original": "",
"translation": ""
},
Expand All @@ -3945,7 +3945,7 @@
"translation": ""
},
{
"rva": "0014E489",
"rva": "0015FDC4",
"original": "",
"translation": ""
},
Expand Down
24 changes: 21 additions & 3 deletions tools/text_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,27 @@ def main():
for t in text:
original = t['original']
if original:
original = original.encode('shiftjis') + b'\x00'
newrva = dump.find(original)
t['rva'] = '%08X' % newrva
original = original.encode('shiftjis')
original += (4 - (len(original) % 4)) * b'\x00'

start = 0
while start < len(dump):
newrva = dump.find(original, start)
if newrva == -1:
start = len(dump)
continue

if newrva % 4 != 0:
start = newrva + len(original)
if start == 7: ibp()
continue

t['rva'] = '%08X' % newrva
break

else:
print('missing %s' % original)
# ibp()

open('ed6_fc_text_update.json', 'wb').write(json.dumps(text, ensure_ascii = False, indent = ' ').encode('utf_8_sig'))

Expand Down
1 change: 1 addition & 0 deletions tools/update.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@echo off
cd/d "%~dp0"

move /y ed6_fc_text_update.json ed6_fc_text.json
call gentextbin.py
move /y ed6fc.text "D:\Game\Steam\steamapps\common\Trails in the Sky FC"
start "" "D:\Game\Steam\steamapps\common\Trails in the Sky FC\ed6_win_crack.exe"

0 comments on commit a8d5549

Please sign in to comment.