NCSF: Revert uint32_t change as it violates spec and breaks a few NCSF game rip albums
--- a/src/in_ncsf/SSEQPlayer/INFOEntry.cpp
+++ b/src/in_ncsf/SSEQPlayer/INFOEntry.cpp
@@ -17,7 +17,8 @@
void INFOEntrySEQ::Read(PseudoFile &file)
{
- this->fileID = file.ReadLE<std::uint32_t>();
+ this->fileID = file.ReadLE<std::uint16_t>();
+ file.ReadLE<std::uint16_t>(); // unknown
this->bank = file.ReadLE<std::uint16_t>();
this->vol = file.ReadLE<std::uint8_t>();
if (!this->vol)
@@ -34,7 +35,8 @@
void INFOEntryBANK::Read(PseudoFile &file)
{
- this->fileID = file.ReadLE<std::uint32_t>();
+ this->fileID = file.ReadLE<std::uint16_t>();
+ file.ReadLE<std::uint16_t>(); // unknown
file.ReadLE(this->waveArc);
}
@@ -44,7 +46,8 @@
void INFOEntryWAVEARC::Read(PseudoFile &file)
{
- this->fileID = file.ReadLE<std::uint32_t>();
+ this->fileID = file.ReadLE<std::uint16_t>();
+ file.ReadLE<std::uint16_t>(); // unknown
}
INFOEntryPLAYER::INFOEntryPLAYER() : channelMask(0)
--- a/src/in_ncsf/SSEQPlayer/INFOEntry.h
+++ b/src/in_ncsf/SSEQPlayer/INFOEntry.h
@@ -23,7 +23,7 @@
struct INFOEntrySEQ : INFOEntry
{
- std::uint32_t fileID;
+ std::uint16_t fileID;
std::uint16_t bank;
std::uint8_t vol;
std::uint8_t ply;
@@ -35,7 +35,7 @@
struct INFOEntryBANK : INFOEntry
{
- std::uint32_t fileID;
+ std::uint16_t fileID;
std::uint16_t waveArc[4];
INFOEntryBANK();
@@ -45,7 +45,7 @@
struct INFOEntryWAVEARC : INFOEntry
{
- std::uint32_t fileID;
+ std::uint16_t fileID;
INFOEntryWAVEARC();
--- a/src/in_ncsf/SSEQPlayer/SDAT.cpp
+++ b/src/in_ncsf/SSEQPlayer/SDAT.cpp
@@ -53,7 +53,7 @@
// Read SSEQ
if (infoSection.SEQrecord.entries.count(sseqToLoad))
{
- std::uint32_t fileID = infoSection.SEQrecord.entries[sseqToLoad].fileID;
+ std::uint16_t fileID = infoSection.SEQrecord.entries[sseqToLoad].fileID;
std::string name = "SSEQ" + NumToHexString(fileID).substr(2);
if (SYMBOffset)
name = NumToHexString(sseqToLoad).substr(6) + " - " + symbSection.SEQrecord.entries[sseqToLoad];