22 lines
689 B
GDScript
22 lines
689 B
GDScript
extends Node2D
|
|
|
|
var save_slots = []
|
|
var save_slot_dicts = []
|
|
|
|
func _ready():
|
|
Engine.set_target_fps(60)
|
|
var save_file := File.new()
|
|
var error := save_file.open('test.srm', File.READ)
|
|
if error == OK:
|
|
for i in 4:
|
|
save_slots.append(SaveLoader.get_save_slot(save_file, i))
|
|
save_slot_dicts.append(SaveLoader.get_struct(save_slots[i], 'Save_slot'))
|
|
print('Loaded test save file')
|
|
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'))
|