コード例 #1
0
ファイル: AlwaysItem.cs プロジェクト: icup321/raymap
        protected override void ReadInternal(Reader reader)
        {
            off_superObject = Pointer.Read(reader);
            uint_04         = reader.ReadUInt32();
            uint_08         = reader.ReadUInt32();
            uint_0C         = reader.ReadUInt32();

            superObject = Load.FromOffsetOrRead <SuperObject>(reader, off_superObject);
        }
コード例 #2
0
        protected override void ReadInternal(Reader reader)
        {
            off_sectorSO = Pointer.Read(reader);
            if (Settings.s.game != Settings.Game.DD && Settings.s.game != Settings.Game.JungleBook)
            {
                word04 = reader.ReadInt16();
                word06 = reader.ReadInt16();
            }

            sectorSO = Load.FromOffsetOrRead <SuperObject>(reader, off_sectorSO);
        }
コード例 #3
0
ファイル: SuperObject.cs プロジェクト: icup321/raymap
        protected override void ReadInternal(Reader reader)
        {
            //Load.print("SuperObject @ " + Offset);
            typeCode  = reader.ReadUInt32();
            dataIndex = reader.ReadInt32();
            children  = LinkedList <SuperObject> .ReadHeader(reader, Pointer.Current(reader), LinkedList.Type.Double);

            off_next_brother = Pointer.Read(reader);       // 14
            off_prev_brother = Pointer.Read(reader);       // 18
            off_parent       = Pointer.Read(reader);       // 1c
            off_matrix1      = Pointer.Read(reader);       //
            if (Settings.s.game != Settings.Game.RRush)
            {
                off_matrix2 = Pointer.Read(reader);
                short_28    = reader.ReadInt16();
                short_2A    = reader.ReadInt16();
                short_2C    = reader.ReadInt16();
                short_2E    = reader.ReadInt16();
                short_30    = reader.ReadInt16();
                short_32    = reader.ReadInt16();
                short_34    = reader.ReadInt16();
                short_36    = reader.ReadInt16();
                if (isDynamic)
                {
                    uint_38 = reader.ReadUInt32();
                }
                else
                {
                    off_38 = Pointer.Read(reader);
                }
                short_3C = reader.ReadInt16();
                short_3E = reader.ReadInt16();
                short_40 = reader.ReadInt16();
                short_42 = reader.ReadInt16();
                short_44 = reader.ReadInt16();
                short_46 = reader.ReadInt16();
                short_48 = reader.ReadInt16();
                short_4A = reader.ReadInt16();
            }

            type = GetSOType(typeCode);
            Load.print(typeCode + "|" + type + " - " + Offset + " - " + children.Count + " - " + dataIndex);

            children.ReadEntries(ref reader, (off_child) => {
                SuperObject child = Load.FromOffsetOrRead <SuperObject>(reader, off_child, onPreRead: s => s.isDynamic = isDynamic);
                return(child);
            }, LinkedList.Flags.HasHeaderPointers);
            SuperObject parent = Load.FromOffsetOrRead <SuperObject>(reader, off_parent, onPreRead: s => s.isDynamic = isDynamic);

            matrix1 = Load.FromOffsetOrRead <PS1Matrix>(reader, off_matrix1);
            matrix2 = Load.FromOffsetOrRead <PS1Matrix>(reader, off_matrix2);
        }