Fix StreamPeer::get_data(size)[0] typoes

This commit is contained in:
Luke Hubmayer-Werner 2023-12-06 17:48:30 +10:30
parent 10669e0c1f
commit 47fc6d38ef
2 changed files with 3 additions and 3 deletions

View File

@ -176,7 +176,7 @@ func get_song_data(buffer: StreamPeerBuffer, id: int):
var tracks = []
for i in range(1, track_ptrs.size()-1):
var length = track_ptrs[i+1] - track_ptrs[i]
tracks.append(buffer.get_data(length)[0])
tracks.append(buffer.get_data(length)[1])
return tracks
func load_bgms(buffer: StreamPeerBuffer):

View File

@ -73,14 +73,14 @@ func load_snes_rom(buffer: StreamPeerBuffer, is_RPGe: bool = false) -> void:
buffer.seek(ptrs[i])
var size: int = ptrs[i+1] - ptrs[i]
if size > 0:
raw_strings.append(buffer.get_data(size)[0])
raw_strings.append(buffer.get_data(size)[1])
else:
print_debug('String pointer mismatch: "%s" index %d: 0x%06X:0x%06X, effective size of %d bytes' % [block_name, i, ptrs[i], ptrs[i+1], size])
raw_strings.append(PoolByteArray())
else:
# Get first level of data
for i in num_entries:
raw_strings.append(buffer.get_data(l1_width)[0])
raw_strings.append(buffer.get_data(l1_width)[1])
# Decode
if block.dialog: