diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2023-09-03 23:29:11 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2023-09-03 23:29:11 -0600 |
| commit | 50b6c6f65bc0da4a2c07e24c75dcd19baba60083 (patch) | |
| tree | 19fd3432904b3ad5cc4ad5ad7274f8a2434f2778 /lib | |
| parent | 063224c69d564d6e10dd4febf25caa9f59fccfda (diff) | |
Added full SM64 -> AIFF Decoding
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/binarytools/BinaryReader.cpp | 8 | ||||
| -rw-r--r-- | lib/binarytools/BinaryReader.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/binarytools/BinaryReader.cpp b/lib/binarytools/BinaryReader.cpp index 75044b0..f802885 100644 --- a/lib/binarytools/BinaryReader.cpp +++ b/lib/binarytools/BinaryReader.cpp @@ -58,7 +58,6 @@ int16_t LUS::BinaryReader::ReadInt16() { if (mEndianness != Endianness::Native) { result = BSWAP16(result); } - return result; } @@ -192,6 +191,7 @@ std::string LUS::BinaryReader::ReadString() { for (int i = 0; i < numChars; i++) { res += ReadChar(); } + return res; } @@ -211,6 +211,10 @@ std::string LUS::BinaryReader::ReadCString() { return res; } +size_t LUS::BinaryReader::GetLength() { + return mStream->GetLength(); +} + std::vector<char> LUS::BinaryReader::ToVector() { return mStream->ToVector(); -} +}
\ No newline at end of file diff --git a/lib/binarytools/BinaryReader.h b/lib/binarytools/BinaryReader.h index 91e2a40..02e65cc 100644 --- a/lib/binarytools/BinaryReader.h +++ b/lib/binarytools/BinaryReader.h @@ -23,6 +23,7 @@ class BinaryReader { void Seek(int32_t offset, SeekOffsetType seekType); uint32_t GetBaseAddress(); + size_t GetLength(); void Read(int32_t length); void Read(char* buffer, int32_t length); |
