Globals.cs 2.9 KB

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