2023-08-04 18:17:08 +09:30
|
|
|
extends Control
|
2023-08-08 00:22:11 +09:30
|
|
|
const palette_mat := preload('res://palette_mat.tres')
|
2023-07-29 01:53:03 +09:30
|
|
|
var save_slots = []
|
|
|
|
var save_slot_dicts = []
|
|
|
|
|
2023-07-25 14:21:10 +09:30
|
|
|
func _ready():
|
|
|
|
Engine.set_target_fps(60)
|
2023-07-29 01:53:03 +09:30
|
|
|
var save_file := File.new()
|
2023-08-04 22:11:42 +09:30
|
|
|
#var error := save_file.open('test.srm', File.READ)
|
|
|
|
var error := save_file.open('/home/luke/.config/Mesen2/Saves/FF5_SCC_WepTweaks_Inus_Dash.srm', File.READ)
|
2023-07-29 01:53:03 +09:30
|
|
|
if error == OK:
|
|
|
|
for i in 4:
|
|
|
|
save_slots.append(SaveLoader.get_save_slot(save_file, i))
|
2023-08-04 18:17:08 +09:30
|
|
|
save_slot_dicts.append(SaveLoader.load_save_slot(save_slots[i]))
|
2023-07-29 01:53:03 +09:30
|
|
|
print('Loaded test save file')
|
2023-07-31 15:18:02 +09:30
|
|
|
save_file.close()
|
|
|
|
# error = save_file.open('downloaded_saves/psx_world1.gme', File.READ)
|
|
|
|
# if error == OK:
|
|
|
|
# var buffer := StreamPeerBuffer.new()
|
|
|
|
# save_file.seek(0x2FA0)
|
|
|
|
# buffer.data_array = save_file.get_buffer(0x600)
|
|
|
|
# save_slot_dicts.append(SaveLoader.get_struct(buffer, 'Save_slot'))
|
2023-08-04 22:11:42 +09:30
|
|
|
var data = save_slot_dicts[0]
|
2023-08-05 22:11:02 +09:30
|
|
|
data.characters[2].equipped_abilities[3] = 0x9B
|
2023-08-04 22:11:42 +09:30
|
|
|
$PartyMenu.update_labels(data)
|
|
|
|
ThemeManager.set_menu_color_555(data.config.menu_color_r, data.config.menu_color_g, data.config.menu_color_b)
|
2023-08-07 01:18:07 +09:30
|
|
|
|
2023-08-08 00:22:11 +09:30
|
|
|
var monster_box := GridContainer.new()
|
|
|
|
monster_box.columns = 8
|
|
|
|
add_child(monster_box)
|
|
|
|
for mon in RomLoader.snes_data.monster_battle_sprites:
|
|
|
|
var t := TextureRect.new()
|
|
|
|
t.material = palette_mat.duplicate()
|
|
|
|
t.texture = mon.sprite
|
|
|
|
t.material.set_shader_param('palette', mon.palette)
|
|
|
|
monster_box.add_child(t)
|
|
|
|
|
2023-08-15 16:20:40 +09:30
|
|
|
#var battle_bg := OptionButton.new()
|
|
|
|
#for i in len(SpriteLoader.battle_backgrounds):
|
|
|
|
# battle_bg.add_item('BG %d' % i)
|
|
|
|
#battle_bg.connect('item_focused', $BattleScene, 'set_bg')
|
|
|
|
#battle_bg.connect('item_selected', $BattleScene, 'set_bg')
|
|
|
|
#add_child(battle_bg)
|
|
|
|
var bbg := SpinBox.new()
|
|
|
|
bbg.max_value = len(SpriteLoader.battle_backgrounds) - 1
|
|
|
|
bbg.connect('value_changed', $BattleScene, 'set_bg')
|
|
|
|
bbg.rect_min_size.x = 32
|
2023-08-16 00:35:59 +09:30
|
|
|
bbg.rect_position.y = 218
|
2023-08-15 16:20:40 +09:30
|
|
|
bbg.align = LineEdit.ALIGN_RIGHT
|
|
|
|
add_child(bbg)
|
|
|
|
|
2023-08-16 15:27:20 +09:30
|
|
|
var fontbox := TextureRect.new()
|
|
|
|
fontbox.texture = SpriteLoader.font_atlas_texture
|
|
|
|
add_child(fontbox)
|
|
|
|
|
2023-08-07 21:20:35 +09:30
|
|
|
# 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)
|