예제 #1
0
            partial void CustomFactoryEnd(OverlayStream stream, int finalPos, int offset)
            {
                var fileNameEnd = 0x2 + BinaryPrimitives.ReadUInt16LittleEndian(_data.Slice(0x2)) + 2;

                stream.Position = fileNameEnd;
                int onBeginEnd;

                if (Flags.HasFlag(Flag.OnBegin))
                {
                    stream.Position = fileNameEnd;
                    OnBegin         = ScriptFragmentBinaryOverlay.ScriptFragmentFactory(stream, _package);
                    onBeginEnd      = stream.Position;
                }
                else
                {
                    onBeginEnd = fileNameEnd;
                }
                if (Flags.HasFlag(Flag.OnEnd))
                {
                    stream.Position = onBeginEnd;
                    OnEnd           = ScriptFragmentBinaryOverlay.ScriptFragmentFactory(stream, _package);
                    _onEndEnd       = stream.Position;
                }
                else
                {
                    _onEndEnd = onBeginEnd;
                }
            }
예제 #2
0
            protected void Initialize(OverlayStream stream)
            {
                var fileNameEnd = 0x2 + BinaryPrimitives.ReadUInt16LittleEndian(_data.Slice(0x2)) + 2;

                stream.Position = fileNameEnd;
                int onBeginEnd;

                if (Flags.HasFlag(Flag.OnBegin))
                {
                    stream.Position = fileNameEnd;
                    OnBegin         = ScriptFragmentBinaryOverlay.ScriptFragmentFactory(stream, _package);
                    onBeginEnd      = stream.Position;
                }
                else
                {
                    onBeginEnd = fileNameEnd;
                }
                if (Flags.HasFlag(Flag.OnEnd))
                {
                    stream.Position = onBeginEnd;
                    OnEnd           = ScriptFragmentBinaryOverlay.ScriptFragmentFactory(stream, _package);
                    FlagsEndingPos  = stream.Position;
                }
                else
                {
                    FlagsEndingPos = onBeginEnd;
                }
            }