public static BaseScriptRecord[] ReadArray(BinaryReaderFont reader, int count, long start)
 {
     BaseScriptRecord[] array = new BaseScriptRecord[count];
     for (int i = 0; i < count; i++)
     {
         array[i] = Read(reader, start);
     }
     return(array);
 }
Example #2
0
        public static BaseScriptList Read(BinaryReaderFont reader)
        {
            long           position = reader.Position;
            BaseScriptList value    = new BaseScriptList {
                baseScriptCount = reader.ReadUInt16()
            };

            if (value.baseScriptCount != 0)
            {
                value.baseScriptRecords = BaseScriptRecord.ReadArray(
                    reader, value.baseScriptCount, position
                    );
            }
            return(value);
        }
        public static BaseScriptRecord Read(BinaryReaderFont reader, long start)
        {
            BaseScriptRecord value = new BaseScriptRecord {
                baseScriptTag    = reader.ReadTag(),
                baseScriptOffset = reader.ReadUInt16()
            };
            long position = reader.Position;

            if (value.baseScriptOffset != 0)
            {
                reader.Position  = start + value.baseScriptOffset;
                value.baseScript = BaseScript.Read(reader);
            }
            reader.Position = position;
            return(value);
        }