Exemple #1
0
        internal MissionStructure(MissionTable table, MissionTableType structure, BinaryReader reader)
            : base(table.Manager, "")
        {
            Elements  = new Dictionary <MissionTableColumn, object>();
            Structure = structure;
            Table     = table;

            foreach (MissionTableColumn column in structure.Columns)
            {
                object value;

                switch (column.Type.Name)
                {
                case "Int16": value = reader.ReadInt16(); break;

                case "Int32": value = reader.ReadInt32(); break;

                case "Single": value = reader.ReadSingle(); break;

                case "UInt16": value = reader.ReadUInt16(); break;

                case "UInt32": value = reader.ReadUInt32(); break;

                default: throw new NotImplementedException();
                }

                Elements[column] = value;
            }
        }
Exemple #2
0
        internal MissionStructure(MissionTable table, MissionTableType structure, BinaryReader reader)
            : base(table.Manager, "")
        {
            Elements = new Dictionary<MissionTableColumn, object>();
            Structure = structure;
            Table = table;

            foreach (MissionTableColumn column in structure.Columns) {
                object value;

                switch (column.Type.Name) {
                    case "Int16": value = reader.ReadInt16(); break;
                    case "Int32": value = reader.ReadInt32(); break;
                    case "Single": value = reader.ReadSingle(); break;
                    case "UInt16": value = reader.ReadUInt16(); break;
                    case "UInt32": value = reader.ReadUInt32(); break;
                    default: throw new NotImplementedException();
                }

                Elements[column] = value;
            }
        }
Exemple #3
0
 internal MissionRow(MissionTable table, MissionTableType structure, BinaryReader reader)
     : base(table, structure, reader)
 {
     Parent = table;
 }
Exemple #4
0
 internal MissionTableHeader(MissionTable table, MissionTableType structure, BinaryReader reader) : base(table, structure, reader)
 {
 }
Exemple #5
0
 internal MissionRow(MissionTable table, MissionTableType structure, BinaryReader reader)
     : base(table, structure, reader)
 {
     Parent = table;
 }
Exemple #6
0
 internal MissionTableHeader(MissionTable table, MissionTableType structure, BinaryReader reader)
     : base(table, structure, reader)
 {
 }