more strings
This commit is contained in:
parent
877c5d90e4
commit
e9cf2c112e
|
@ -6,7 +6,7 @@ dialogue 0x900 0x2013F0 0x082220 3 2 0x000000 0x0A0000 True
|
||||||
enemy_names 384 0x200050 0x105C00 10 8
|
enemy_names 384 0x200050 0x105C00 10 8
|
||||||
items 0x100 0x111380 9
|
items 0x100 0x111380 9
|
||||||
job_names 22 0x115600 8
|
job_names 22 0x115600 8
|
||||||
job_and_ability_descs 133 0x117140 2 0x110000 0x110000
|
job_and_ability_descs 133 0x117140 2 0x110000 0x110000 True
|
||||||
magics 87 0x111C80 6
|
magics 87 0x111C80 6
|
||||||
magics2 73 0x111E8A 9
|
magics2 73 0x111E8A 9
|
||||||
menu_strings 139 0x00F987 2 0x270000 0x000000 True
|
menu_strings 139 0x00F987 2 0x270000 0x000000 True
|
||||||
|
|
|
|
@ -83,14 +83,30 @@ func load_snes_rom(rom: File, is_RPGe: bool = false) -> void:
|
||||||
else:
|
else:
|
||||||
for raw in raw_strings:
|
for raw in raw_strings:
|
||||||
strings.append(decode_string(raw, glyph_table_small))
|
strings.append(decode_string(raw, glyph_table_small))
|
||||||
tables_raw[block_name] = raw_strings
|
self.tables_raw[block_name] = raw_strings
|
||||||
tables[block_name] = strings
|
self.tables[block_name] = strings
|
||||||
|
|
||||||
func get_ability_name(id: int) -> String:
|
func get_ability_name(id: int) -> String:
|
||||||
if id < 128:
|
if id < 128:
|
||||||
return tables.battle_commands[id]
|
return self.tables.battle_commands[id]
|
||||||
else:
|
else:
|
||||||
return tables.ability_names[id-128]
|
return self.tables.ability_names[id-128]
|
||||||
|
|
||||||
|
func get_ability_desc(id: int) -> String:
|
||||||
|
# TODO: revisit for GBA
|
||||||
|
if id < 78:
|
||||||
|
return self.tables.job_and_ability_descs[id+22]
|
||||||
|
elif (id >= 128) and (id <= 161):
|
||||||
|
return self.tables.job_and_ability_descs[(id-128)+100]
|
||||||
|
else:
|
||||||
|
assert(false, 'ability id %d out of description ranges' % id)
|
||||||
|
return 'ability id %d out of description ranges' % id
|
||||||
|
|
||||||
|
func get_job_name(id: int) -> String:
|
||||||
|
return self.tables.job_names[id]
|
||||||
|
|
||||||
|
func get_job_desc(id: int) -> String:
|
||||||
|
return self.tables.job_and_ability_descs[id]
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -24,3 +24,12 @@ func _ready():
|
||||||
data.characters[2].equipped_abilities[3] = 0x9B
|
data.characters[2].equipped_abilities[3] = 0x9B
|
||||||
$PartyMenu.update_labels(data)
|
$PartyMenu.update_labels(data)
|
||||||
ThemeManager.set_menu_color_555(data.config.menu_color_r, data.config.menu_color_g, data.config.menu_color_b)
|
ThemeManager.set_menu_color_555(data.config.menu_color_r, data.config.menu_color_g, data.config.menu_color_b)
|
||||||
|
|
||||||
|
var lbl = Label.new()
|
||||||
|
for i in 22:
|
||||||
|
lbl.text = lbl.text + '%s - %s\n' % [StringLoader.get_job_name(i), StringLoader.get_job_desc(i)]
|
||||||
|
for i in 78:
|
||||||
|
lbl.text = lbl.text + '\n%s - %s' % [StringLoader.get_ability_name(i), StringLoader.get_ability_desc(i)]
|
||||||
|
for i in range(128, 161):
|
||||||
|
lbl.text = lbl.text + '\n%s - %s' % [StringLoader.get_ability_name(i), StringLoader.get_ability_desc(i)]
|
||||||
|
add_child(lbl)
|
||||||
|
|
Loading…
Reference in New Issue