Exemple #1
0
        private static Endianness GetTypeEndianness(NwTarget type)
        {
            switch (type)
            {
            case NwTarget.NX:
            case NwTarget.Ctr:
                return(Endianness.LittleEndian);

            default:
                return(Endianness.BigEndian);
            }
        }
Exemple #2
0
        private static NwVersion GetNwVersion(NwTarget type)
        {
            switch (type)
            {
            case NwTarget.Ctr:
                return(DefaultCtrVersion);

            case NwTarget.NX:
                return(DefaultNXVersion);

            case NwTarget.Cafe:
                return(DefaultBcstmVersion);

            default:
                return(DefaultNXVersion);    // idk
            }
        }
Exemple #3
0
        private int GetVersion(NwTarget type)
        {
            if (type == NwTarget.Cafe || type == NwTarget.NX)
            {
                return(IncludeUnalignedLoopPoints ? 4 : 3);
            }

            //All BCSTM files I've seen follow this pattern except for Kingdom Hearts 3D
            if (IncludeTrackInformation && IncludeRegionInfo)
            {
                return(0x201);
            }

            if (!IncludeTrackInformation && IncludeRegionInfo)
            {
                return(0x202);
            }

            return(0x200);
        }
Exemple #4
0
 public BCFstmWriter(NwTarget type)
 {
     Type = type;
 }
Exemple #5
0
 private static Endianness GetTypeEndianness(NwTarget type) =>
 type == NwTarget.Ctr ? Endianness.LittleEndian : Endianness.BigEndian;
 /// <summary>
 /// Creates a new FSTMExporter instance that uses the given encoding when it has to re-encode a file.
 /// </summary>
 /// <param name="defaultEncoding">The encoding to use</param>
 public FSTMExporter(NwCodec encoding, NwTarget target)
 {
     this.encoding = encoding;
     this.target   = target;
 }