Пример #1
0
        public GMExtension(GMAssets _a, Stream _s)
        {
            _s.ReadInteger();
            Name     = _s.ReadString();
            Folder   = _s.ReadString();
            Includes = new List <GMExtensionInclude>();
            int num = _s.ReadInteger();

            for (int i = 0; i < num; i++)
            {
                Includes.Add(new GMExtensionInclude(_s));
            }
            byte[] array = _s.ReadStream();
            if (array == null)
            {
                return;
            }
            MemoryStream memoryStream = new MemoryStream(array);
            int          key          = memoryStream.ReadInteger();

            GMAssets.Decrypt(key, array, memoryStream.Position + 1);
            ExtensionDLL = new List <byte[]>();
            for (int j = 0; j < Includes.Count; j++)
            {
                if (Includes[j].Kind != 3)
                {
                    ExtensionDLL.Add(memoryStream.ReadCompressedStream());
                }
            }
        }
Пример #2
0
        public GMScript(GMAssets _a, Stream _s)
        {
            switch (_s.ReadInteger())
            {
            case 400:
            {
                byte[] array = _s.ReadCompressedStream();
                GMAssets.Decrypt(12345, array, 0L);
                MemoryStream s = new MemoryStream(array);
                Script = s.ReadString();
                break;
            }

            case 800:
                Script = _s.ReadString();
                break;
            }
        }