public static aafSectionHeaderInfo aaf_GetSectionHeaderInfo(jAAFIncludeRecord inc) { var ret = new aafSectionHeaderInfo(); switch (inc.hash) { //* Regular section looks like // i32_type,i32_offset,i32_size,i32_flags case 1: // Sound Table case 4: // BGM collection case 5: // Stream Map case 6: // Unknown case 7: // Unknown case 8: // Build Date Info ret.size = 3; break; case 2: case 3: case 0: return(null); default: cmdarg.assert($"cannot pack section type {inc.hash:X5}"); return(null); } return(ret); }
public static void aaf_PackSection(int start, int size, jAAFIncludeRecord inc, BeBinaryWriter blockWrite) { switch (inc.hash) { case 1: // Sound Table case 4: // BGM collection case 5: // Stream Map case 6: // Unknown case 7: // Unknown case 8: // Build Date Info blockWrite.Write(inc.hash); // sprawl out hash blockWrite.Write(start); blockWrite.Write(size); blockWrite.Write(inc.flags); break; default: cmdarg.assert($"cannot pack section type {inc.hash:X5}"); break; } }