Exemple #1
0
 private static void WriteHelp(GMHelp _data, Stream _s, IFF _iff)
 {
     _s.WriteInteger(_data.BackgroundColour);
     _s.WriteBoolean(_data.Mimic);
     _iff.AddString(_s, _data.Caption);
     _s.WriteInteger(_data.Left);
     _s.WriteInteger(_data.Top);
     _s.WriteInteger(_data.Width);
     _s.WriteInteger(_data.Height);
     _s.WriteBoolean(_data.Border);
     _s.WriteBoolean(_data.Sizable);
     _s.WriteBoolean(_data.OnTop);
     _s.WriteBoolean(_data.Modal);
     _iff.AddString(_s, _data.Text);
 }
Exemple #2
0
 private static void WriteHeader(GMAssets _data, Stream _s, IFF _iff)
 {
     _s.WriteInteger(((!_data.Debug) ? 1 : 0) | 0x201);
     _iff.AddString(_s, Path.GetFileNameWithoutExtension(_data.FileName));
     _s.WriteInteger(_data.RoomMaxId);
     _s.WriteInteger(_data.RoomMaxTileId);
     _s.WriteInteger(_data.GameID);
     _s.WriteInteger(0);
     _s.WriteInteger(0);
     _s.WriteInteger(0);
     _s.WriteInteger(0);
     _s.WriteInteger(_data.RoomOrder.Count);
     foreach (int item in _data.RoomOrder)
     {
         _s.WriteInteger(item);
     }
 }
Exemple #3
0
        private static void WriteOptions(GMOptions _data, Stream _s, IFF _iff)
        {
            _s.WriteBoolean(_data.FullScreen);
            _s.WriteBoolean(_data.InterpolatePixels);
            _s.WriteBoolean(_data.NoBorder);
            _s.WriteBoolean(_data.ShowCursor);
            _s.WriteInteger(_data.Scale);
            _s.WriteBoolean(_data.Sizeable);
            _s.WriteBoolean(_data.StayOnTop);
            _s.WriteInteger(_data.WindowColour);
            _s.WriteBoolean(_data.ChangeResolution);
            _s.WriteInteger(_data.ColorDepth);
            _s.WriteInteger(_data.Resolution);
            _s.WriteInteger(_data.Frequency);
            _s.WriteBoolean(_data.NoButtons);
            _s.WriteInteger(_data.Sync_Vertex);
            _s.WriteBoolean(_data.ScreenKey);
            _s.WriteBoolean(_data.HelpKey);
            _s.WriteBoolean(_data.QuitKey);
            _s.WriteBoolean(_data.SaveKey);
            _s.WriteBoolean(_data.ScreenShotKey);
            _s.WriteBoolean(_data.CloseSec);
            _s.WriteInteger(_data.Priority);
            _s.WriteBoolean(_data.Freeze);
            _s.WriteBoolean(_data.ShowProgress);
            if (_data.BackImage != null && !Program.SplashOmit)
            {
                TexturePageEntry o = ms_tpageSprites.AddImage(_data.BackImage, true, false);
                _iff.AddPatch(_s, o);
            }
            else
            {
                _s.WriteInteger(0);
            }
            if (_data.FrontImage != null && !Program.SplashOmit)
            {
                TexturePageEntry o2 = ms_tpageSprites.AddImage(_data.FrontImage, true, false);
                _iff.AddPatch(_s, o2);
            }
            else
            {
                _s.WriteInteger(0);
            }
            if (_data.LoadImage != null && !Program.SplashOmit)
            {
                TexturePageEntry o3 = ms_tpageSprites.AddImage(_data.LoadImage, true, false);
                _iff.AddPatch(_s, o3);
            }
            else
            {
                _s.WriteInteger(0);
            }
            _s.WriteBoolean(_data.LoadTransparent);
            _s.WriteInteger(_data.LoadAlpha);
            _s.WriteBoolean(_data.ScaleProgress);
            _s.WriteBoolean(_data.DisplayErrors);
            _s.WriteBoolean(_data.WriteErrors);
            _s.WriteBoolean(_data.AbortErrors);
            _s.WriteBoolean(_data.VariableErrors);
            _s.WriteBoolean(_data.CreationEventOrder);
            int num = 0;

            foreach (KeyValuePair <string, string> constant in _data.Constants)
            {
                int value = 0;
                if (GMLCompile.ms_ConstantCount.TryGetValue(constant.Key, out value) && value > 0)
                {
                    num++;
                }
            }
            _s.WriteInteger(num);
            foreach (KeyValuePair <string, string> constant2 in _data.Constants)
            {
                int value2 = 0;
                if (GMLCompile.ms_ConstantCount.TryGetValue(constant2.Key, out value2) && value2 > 0)
                {
                    _iff.AddString(_s, constant2.Key);
                    _iff.AddString(_s, constant2.Value);
                }
            }
        }