more kanji

This commit is contained in:
Luke Hubmayer-Werner 2017-07-23 01:40:44 +09:30
parent 7922925efe
commit 7c40ca97c1
2 changed files with 64 additions and 32 deletions

View File

@ -36,48 +36,78 @@ Glyphs_JP[0xD2] = '。'
Glyphs_JP[0xE3] = '[洋剣]'
Glyphs_JP[0xE7:0xF0] = ['[刂]', '[槍]', '[鉞]', '[刀]', '[棒]', '[杖]', '[弓]', '', '[鞭]']
Glyphs_JP2 = list(Glyphs_JP) # Japanese glyphs using the dakuten encoding
Glyphs_JP2[0x20:0x52] = [
Glyphs_JP2[0x20:0x53] = [
'','','','', '','','','', '','','','', '','','','', # 0x20
'','','','', '','','','', '','','','', '','','','', # 0x30
'','','','', '','','','', # 0x40-0x48
'','','','', '','','','', '',''] # 0x48-0x52
'','','','', '','','','', '', # 0x40-0x49
'','','','', '','','','', '',''] # 0x49-0x53
Glyphs_JP_large = list(Glyphs_JP2) # Large glyphs are subtly different again
Glyphs_JP_large[0xC7] = ''
Glyphs_JP_large[0xE0:0xEB] = ['','','+','', '', '', '', '°C', '', '', '']
Glyphs_JP_large[0xFF] = ' '
Glyphs_Kanji1 = ( # TODO: finish this
'','','','', '','','','', '','','','', '','','','', # 0x000
'','','','', '',' ',' ','', ' ',' ',' ','', '',' ',' ',' ', # 0x010
' ','','',' ', '',' ',' ',' ', ' ',' ',' ','', '',' ',' ',' ', # 0x020
' ',' ',' ',' ', ' ','',' ',' ', '',' ',' ',' ', ' ',' ',' ',' ', # 0x030
' ',' ',' ','', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ','',' ',' ', # 0x040
' ',' ','',' ', ' ',' ','殿',' ', ' ',' ',' ',' ', ' ','',' ',' ', # 0x050
' ',' ','',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x060
' ',' ','',' ', ' ',' ',' ',' ', ' ',' ','',' ', ' ',' ',' ',' ', # 0x070
'', '', '', '', '', '', '', '', # 0x000
'', '', '', '', '', '', '', '', # 0x008
'', '', '', '', '', '', ' ', '', # 0x010
' ', ' ', ' ', '', '', '', '', ' ', # 0x018
'', '', '', '', '', ' ', '', ' ', # 0x020
' ', '', '', '', '', '使', '', '', # 0x028
'', '', '', '', '', '', ' ', ' ', # 0x030
'', ' ', ' ', ' ', '', ' ', ' ', ' ', # 0x038
' ',' ',' ',' ', ' ',' ','','', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x080
' ',' ',' ',' ', ' ','',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x090
'',' ',' ',' ', ' ',' ',' ','', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x0A0
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ','','',' ', # 0x0B0
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ','',' ',' ', # 0x0C0
' ',' ',' ',' ', ' ',' ',' ','', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x0D0
' ',' ',' ',' ', ' ','',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x0E0
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x0F0
'', '', '', '', '', ' ', ' ', ' ', # 0x040
' ', ' ', ' ', ' ', ' ', '', ' ', ' ', # 0x048
'', '', '', '', ' ', ' ', '', '殿', # 0x050
' ', '', ' ', '', ' ', '', '', '', # 0x058
'', '', '', '', ' ', ' ', '', '', # 0x060
' ', '', ' ', ' ', ' ', ' ', '', '', # 0x068
'', '', '', ' ', ' ', ' ', ' ', '', # 0x070-7
' ', ' ', '', ' ', ' ', '', ' ', ' ', # 0x078-F
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x100
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x110
'',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x120
' ',' ',' ',' ', ' ',' ',' ',' ', '',' ',' ',' ', ' ',' ',' ',' ', # 0x130
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x140
'',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x150
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x160
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x170
'', '', '', ' ', ' ', '', '', '', # 0x080
' ', ' ', '', ' ', '', ' ', ' ', ' ', # 0x088
'', '', '', ' ', ' ', '', ' ', ' ', # 0x090
' ', '', ' ', ' ', '', ' ', ' ', ' ', # 0x098
'', '', '', '', ' ', ' ', ' ', '', # 0x0A0
'', '', '', '西', ' ', '', '', ' ', # 0x0A8
'', '', '', ' ', ' ', ' ', '', ' ', # 0x0B0
' ', ' ', ' ', '', ' ', '', '', '', # 0x0B8
' ',' ',' ',' ', ' ',' ',' ',' ', ' ','',' ',' ', ' ',' ',' ',' ', # 0x180
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ',' ',' ', # 0x190
' ',' ',' ',' ', ' ',' ',' ',' ', ' ',' ') # 0x1A0
Glyphs_Kanji = [g if g!=' ' else '${:03X}'.format(i) for (i,g) in enumerate(Glyphs_Kanji1)] # This is only until they are fully transcribed
'', '', '', '', ' ', ' ', '', '', # 0x0C0
' ', '', ' ', ' ', ' ', '', ' ', '', # 0x0C8
'', '', '', '', '', ' ', ' ', '', # 0x0D0
' ', '', ' ', ' ', ' ', ' ', '', ' ', # 0x0D8
'', '', '', '', ' ', '', ' ', ' ', # 0x0E0
'', '', ' ', ' ', ' ', ' ', ' ', ' ', # 0x0E8
'', '', '', ' ', ' ', ' ', '', ' ', # 0x0F0
' ', ' ', '', '宿', ' ', ' ', '', ' ', # 0x0F8
'', '', '', ' ', '', ' ', ' ', ' ', # 0x100
'', ' ', '', '', '', ' ', '', ' ', # 0x108
'', '', '', ' ', ' ', ' ', ' ', ' ', # 0x110
' ', ' ', ' ', ' ', ' ', ' ', ' ', '', # 0x118
'', '', '', ' ', ' ', ' ', ' ', ' ', # 0x120
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', # 0x128
'', '', '', ' ', ' ', ' ', ' ', ' ', # 0x130
'', ' ', ' ', ' ', '', '', ' ', ' ', # 0x138
'', '', ' ', ' ', ' ', ' ', ' ', ' ', # 0x140
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', # 0x148
'', '', '', ' ', ' ', ' ', ' ', '', # 0x150
' ', ' ', ' ', ' ', ' ', ' ', '', ' ', # 0x158
'', '', '', ' ', ' ', ' ', ' ', ' ', # 0x160
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', # 0x168
'', '', '', ' ', ' ', ' ', ' ', ' ', # 0x170
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', # 0x178
'', '', ' ', ' ', ' ', ' ', ' ', ' ', # 0x180
' ', '', ' ', ' ', ' ', ' ', ' ', '', # 0x188
'', '', '', ' ', ' ', ' ', ' ', ' ', # 0x190
' ', ' ', ' ', ' ', '', ' ', ' ', ' ', # 0x198
'', '', '', ' ', ' ', ' ', ' ', '', # 0x1A0
'', ' ') # 0x1A8
Glyphs_Kanji = [g if g != ' ' else '<${:03X}>'.format(i) for (i, g) in enumerate(Glyphs_Kanji1)] # This is only until they are fully transcribed
Dialogue_Macros_EN = {
0x02: [0x61, 0x7A, 0x8B, 0x8D, 0x93], # expands to Bartz (or whatever his name is)

View File

@ -116,6 +116,7 @@ class FF5Reader(QMainWindow):
magics = make_string_img_list(0x111C80, 6, 87)
more_magics = make_string_img_list(0x111E8A, 9, 73)
enemy_names = make_string_img_list(0x200050, 10, 0x180, 0x105C00, 8)
character_names = make_string_img_list(0x115500, 6, 5)
job_names = make_string_img_list(0x115600, 8, 22)
ability_names = make_string_img_list(0x116200, 8, 33)
battle_commands = make_string_img_list(0x201150, 7, 0x60, 0x115800, 5)
@ -227,6 +228,7 @@ class FF5Reader(QMainWindow):
strings_tab.addTab(make_table(imglist_headers, magics, row_labels=False), "Magics")
strings_tab.addTab(make_table(imglist_headers, more_magics, row_labels=False), "More Magics")
strings_tab.addTab(make_table(imglist_headers, enemy_names, row_labels=False), "Enemy Names")
strings_tab.addTab(make_table(imglist_headers, character_names, row_labels=False), "Character Names")
strings_tab.addTab(make_table(imglist_headers, job_names, row_labels=False), "Job Names")
strings_tab.addTab(make_table(imglist_headers, ability_names, row_labels=False), "Ability Names")
strings_tab.addTab(make_table(imglist_headers, battle_commands, row_labels=False), "Battle Commands")
@ -417,7 +419,7 @@ def make_string_img_large(bytestring, macros=None, jp=False):
string = ""
# Because the length of the input has little bearing on the size of the image thanks to linebreaks and macros, we overprovision then clip away.
max_width = 256 # This seems to check out, but the EN dialogue has linebreaks virtually everywhere anyway
max_height = 512 # I've seen up to 58 rows in EN, 36 in JP. Stay safe.
max_height = 1024 # I've seen up to 58 rows in EN, 36 in JP. Stay safe.
img = QImage(max_width, max_height, QImage.Format_RGB16)
img.fill(bg_color)
painter = QtGui.QPainter(img)