CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

Globals.cs (2984B)


      1 //
      2 // Copyright 2020 Electronic Arts Inc.
      3 //
      4 // The Command & Conquer Map Editor and corresponding source code is free 
      5 // software: you can redistribute it and/or modify it under the terms of 
      6 // the GNU General Public License as published by the Free Software Foundation, 
      7 // either version 3 of the License, or (at your option) any later version.
      8 
      9 // The Command & Conquer Map Editor and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 using MobiusEditor.Utility;
     16 using System;
     17 using System.Drawing;
     18 using System.IO;
     19 
     20 namespace MobiusEditor
     21 {
     22     public static class Globals
     23     {
     24         static Globals()
     25         {
     26             TileScale = Properties.Settings.Default.Quality;
     27         }
     28 
     29         public const string TilesetsXMLPath = @"DATA\XML\TILESETS.XML";
     30         public const string TexturesPath = @"DATA\ART\TEXTURES\SRGB";
     31         public const string MegafilePath = @"DATA";
     32         public const string GameTextFilenameFormat = @"DATA\TEXT\MASTERTEXTFILE_{0}.LOC";
     33 
     34         public const int OriginalTileWidth = 128;
     35         public const int OriginalTileHeight = 128;
     36         public static readonly Size OriginalTileSize = new Size(OriginalTileWidth, OriginalTileHeight);
     37 
     38         public static int TileScale { get; set; }
     39         public static int TileWidth => OriginalTileWidth / TileScale;
     40         public static int TileHeight => OriginalTileHeight / TileScale;
     41         public static Size TileSize => new Size(TileWidth, TileHeight);
     42 
     43         public const int PixelWidth = 24;
     44         public const int PixelHeight = 24;
     45 
     46         public static readonly Size MapPreviewSize = new Size(512, 512);
     47         public static readonly Size WorkshopPreviewSize = new Size(512, 512);
     48 
     49         public static readonly string[] Edges = new string[] { "North", "South", "West", "East" };
     50         public const int NumInfantryStops = 5;
     51 
     52         public const int MaxTeamClasses = 5;
     53         public const int MaxTeamMissions = 20;
     54 
     55         public const long MaxMapSize = 131072;
     56 
     57         public static MegafileManager TheMegafileManager;
     58         public static TextureManager TheTextureManager;
     59         public static TilesetManager TheTilesetManager;
     60         public static TeamColorManager TheTeamColorManager;
     61         public static GameTextManager TheGameTextManager;
     62 
     63         public static readonly string RootSaveDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), @"CnCRemastered\Local_Custom_Maps");
     64 
     65 #if DEVELOPER
     66         public static class Developer
     67         {
     68             public static bool ShowOverlapCells = false;
     69         }
     70 #endif
     71     }
     72 }