From ab4a7e35581d40c2689ecae802f1c5a1eac3e044 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 3 Feb 2019 21:29:18 +0000 Subject: [PATCH] Replace System.Drawing primitives with our own. --- OpenRA.Game/Actor.cs | 1 - OpenRA.Game/CVec.cs | 2 +- OpenRA.Game/ExternalMods.cs | 1 - OpenRA.Game/Exts.cs | 2 +- OpenRA.Game/FieldLoader.cs | 1 - OpenRA.Game/FieldSaver.cs | 1 - OpenRA.Game/FileFormats/Png.cs | 15 +- OpenRA.Game/Game.cs | 1 - OpenRA.Game/Graphics/Animation.cs | 2 +- OpenRA.Game/Graphics/AnimationWithOffset.cs | 2 +- OpenRA.Game/Graphics/HSLColor.cs | 2 +- OpenRA.Game/Graphics/HardwareCursor.cs | 2 +- OpenRA.Game/Graphics/MappedImage.cs | 2 +- OpenRA.Game/Graphics/Model.cs | 2 +- OpenRA.Game/Graphics/ModelAnimation.cs | 2 +- OpenRA.Game/Graphics/ModelRenderer.cs | 1 - OpenRA.Game/Graphics/Palette.cs | 2 +- OpenRA.Game/Graphics/PlatformInterfaces.cs | 2 +- OpenRA.Game/Graphics/PlayerColorRemap.cs | 1 - OpenRA.Game/Graphics/Renderable.cs | 2 +- OpenRA.Game/Graphics/RgbaColorRenderer.cs | 2 +- OpenRA.Game/Graphics/SequenceProvider.cs | 2 +- OpenRA.Game/Graphics/Sheet.cs | 2 +- OpenRA.Game/Graphics/SheetBuilder.cs | 12 +- OpenRA.Game/Graphics/Sprite.cs | 2 +- OpenRA.Game/Graphics/SpriteFont.cs | 1 - OpenRA.Game/Graphics/SpriteLoader.cs | 1 - OpenRA.Game/Graphics/SpriteRenderable.cs | 2 +- OpenRA.Game/Graphics/SpriteRenderer.cs | 2 +- OpenRA.Game/Graphics/TargetLineRenderable.cs | 2 +- OpenRA.Game/Graphics/TerrainSpriteLayer.cs | 2 +- OpenRA.Game/Graphics/Theater.cs | 2 +- OpenRA.Game/Graphics/UISpriteRenderable.cs | 2 +- OpenRA.Game/Graphics/Util.cs | 2 +- OpenRA.Game/Graphics/Viewport.cs | 2 +- OpenRA.Game/Graphics/WorldRenderer.cs | 2 +- OpenRA.Game/InstalledMods.cs | 1 - OpenRA.Game/MPos.cs | 2 +- OpenRA.Game/Map/CellLayer.cs | 2 +- OpenRA.Game/Map/Map.cs | 1 - OpenRA.Game/Map/MapGrid.cs | 2 +- OpenRA.Game/Map/MapPreview.cs | 1 - OpenRA.Game/Map/TileSet.cs | 1 - OpenRA.Game/Network/OrderManager.cs | 1 - OpenRA.Game/Network/UnitOrders.cs | 2 +- OpenRA.Game/OpenRA.Game.csproj | 3 + OpenRA.Game/Player.cs | 1 - OpenRA.Game/PlayerDatabase.cs | 2 +- OpenRA.Game/Primitives/Color.cs | 361 ++++++++++++++++++ OpenRA.Game/Primitives/Pair.cs | 1 - OpenRA.Game/Primitives/Rectangle.cs | 120 ++++++ OpenRA.Game/Primitives/Size.cs | 67 ++++ .../Primitives/SpatiallyPartitioned.cs | 1 - OpenRA.Game/Primitives/float2.cs | 2 +- OpenRA.Game/Primitives/int2.cs | 14 +- OpenRA.Game/Renderer.cs | 2 +- OpenRA.Game/SelectableExts.cs | 2 +- OpenRA.Game/Support/PerfHistory.cs | 1 - OpenRA.Game/Support/PerfItem.cs | 2 +- OpenRA.Game/Traits/Interactable.cs | 2 +- OpenRA.Game/Traits/Player/FrozenActorLayer.cs | 1 - .../Traits/Player/IndexedPlayerPalette.cs | 2 +- .../Traits/Player/PlayerHighlightPalette.cs | 2 +- OpenRA.Game/Traits/TraitsInterfaces.cs | 1 - OpenRA.Game/Traits/World/ScreenMap.cs | 1 - OpenRA.Game/Widgets/Widget.cs | 2 +- OpenRA.Game/Widgets/WidgetUtils.cs | 2 +- OpenRA.Mods.Cnc/Activities/Infiltrate.cs | 3 +- OpenRA.Mods.Cnc/Activities/LeapAttack.cs | 3 +- OpenRA.Mods.Cnc/CncLoadScreen.cs | 2 +- .../Graphics/TeslaZapRenderable.cs | 2 +- OpenRA.Mods.Cnc/Graphics/Voxel.cs | 2 +- OpenRA.Mods.Cnc/Graphics/VoxelLoader.cs | 1 - OpenRA.Mods.Cnc/SpriteLoaders/TmpTSLoader.cs | 1 - OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs | 1 - OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs | 1 - OpenRA.Mods.Cnc/Traits/Disguise.cs | 1 - .../Traits/Infiltration/Infiltrates.cs | 1 - OpenRA.Mods.Cnc/Traits/MadTank.cs | 1 - OpenRA.Mods.Cnc/Traits/Minelayer.cs | 2 +- .../ChronoshiftPaletteEffect.cs | 2 +- OpenRA.Mods.Cnc/Traits/PortableChrono.cs | 2 +- .../Traits/Render/RenderJammerCircle.cs | 2 +- .../Traits/Render/RenderShroudCircle.cs | 2 +- OpenRA.Mods.Cnc/Traits/Render/WithCargo.cs | 1 - .../Traits/Render/WithVoxelUnloadBody.cs | 2 +- .../Traits/Render/WithVoxelWalkerBody.cs | 1 - .../Traits/SupportPowers/AttackOrderPower.cs | 2 +- .../Traits/SupportPowers/ChronoshiftPower.cs | 2 +- OpenRA.Mods.Cnc/Traits/TDGunboat.cs | 1 - .../UtilityCommands/ImportTSMapCommand.cs | 2 +- OpenRA.Mods.Common/Activities/Air/Fly.cs | 2 +- .../Activities/Air/FlyAttack.cs | 2 +- .../Activities/Air/FlyFollow.cs | 2 +- .../Activities/Air/HeliAttack.cs | 2 +- OpenRA.Mods.Common/Activities/Air/HeliFly.cs | 2 +- .../Activities/Air/HeliReturnToBase.cs | 2 +- .../Activities/Air/ReturnToBase.cs | 2 +- OpenRA.Mods.Common/Activities/Attack.cs | 2 +- OpenRA.Mods.Common/Activities/CaptureActor.cs | 3 +- .../Activities/DeliverResources.cs | 2 +- OpenRA.Mods.Common/Activities/Demolish.cs | 3 +- OpenRA.Mods.Common/Activities/DonateCash.cs | 2 +- .../Activities/DonateExperience.cs | 4 +- OpenRA.Mods.Common/Activities/Enter.cs | 4 +- .../Activities/EnterTransport.cs | 2 +- .../Activities/FindResources.cs | 2 +- OpenRA.Mods.Common/Activities/Move/Follow.cs | 2 +- .../Activities/Move/MoveAdjacentTo.cs | 2 +- .../Activities/Move/MoveWithinRange.cs | 2 +- OpenRA.Mods.Common/Activities/PickupUnit.cs | 2 +- OpenRA.Mods.Common/Activities/RepairBridge.cs | 2 +- .../Activities/RepairBuilding.cs | 2 +- OpenRA.Mods.Common/Activities/UnloadCargo.cs | 1 - OpenRA.Mods.Common/ActorExts.cs | 2 +- OpenRA.Mods.Common/ColorValidator.cs | 2 +- .../EditorBrushes/EditorTileBrush.cs | 2 +- OpenRA.Mods.Common/Effects/FloatingText.cs | 2 +- .../Effects/MapNotificationEffect.cs | 2 +- OpenRA.Mods.Common/Graphics/ActorPreview.cs | 1 - OpenRA.Mods.Common/Graphics/BeamRenderable.cs | 2 +- .../Graphics/ContrailRenderable.cs | 2 +- .../Graphics/DefaultSpriteSequence.cs | 2 +- .../Graphics/DetectionCircleRenderable.cs | 2 +- .../Graphics/ModelActorPreview.cs | 2 +- .../Graphics/ModelRenderable.cs | 1 - .../Graphics/RailgunRenderable.cs | 2 +- .../Graphics/RangeCircleRenderable.cs | 2 +- .../Graphics/SelectionBarsRenderable.cs | 2 +- .../Graphics/SelectionBoxRenderable.cs | 2 +- .../Graphics/SpriteActorPreview.cs | 2 +- OpenRA.Mods.Common/Graphics/TextRenderable.cs | 2 +- OpenRA.Mods.Common/HitShapes/Capsule.cs | 2 +- OpenRA.Mods.Common/HitShapes/Circle.cs | 2 +- OpenRA.Mods.Common/HitShapes/Polygon.cs | 2 +- OpenRA.Mods.Common/HitShapes/Rectangle.cs | 2 +- .../LoadScreens/LogoStripeLoadScreen.cs | 2 +- .../LoadScreens/ModContentLoadScreen.cs | 2 +- .../Pathfinder/CellInfoLayerPool.cs | 2 +- OpenRA.Mods.Common/Projectiles/AreaBeam.cs | 2 +- OpenRA.Mods.Common/Projectiles/Bullet.cs | 2 +- OpenRA.Mods.Common/Projectiles/LaserZap.cs | 2 +- OpenRA.Mods.Common/Projectiles/Missile.cs | 2 +- OpenRA.Mods.Common/Projectiles/Railgun.cs | 2 +- .../Scripting/Global/HSLColorGlobal.cs | 2 +- .../Scripting/Global/MediaGlobal.cs | 2 +- .../Scripting/Global/UserInterfaceGlobal.cs | 2 +- .../Properties/DeliveryProperties.cs | 2 +- .../SpriteLoaders/PngSheetLoader.cs | 1 - .../SpriteLoaders/ShpD2Loader.cs | 1 - .../SpriteLoaders/ShpTDLoader.cs | 1 - .../SpriteLoaders/ShpTSLoader.cs | 1 - .../SpriteLoaders/TmpRALoader.cs | 1 - .../SpriteLoaders/TmpTDLoader.cs | 1 - OpenRA.Mods.Common/Traits/Air/Aircraft.cs | 1 - .../Traits/Attack/AttackBase.cs | 2 +- .../Traits/Attack/AttackFollow.cs | 2 +- .../Traits/Attack/AttackGarrisoned.cs | 3 +- OpenRA.Mods.Common/Traits/AttackMove.cs | 2 +- OpenRA.Mods.Common/Traits/AutoTarget.cs | 1 - .../Traits/Buildings/BaseProvider.cs | 2 +- OpenRA.Mods.Common/Traits/Buildings/Bridge.cs | 1 - .../Traits/CapturableProgressBar.cs | 2 +- .../Traits/CaptureProgressBar.cs | 1 - OpenRA.Mods.Common/Traits/Captures.cs | 1 - OpenRA.Mods.Common/Traits/Carryall.cs | 1 - OpenRA.Mods.Common/Traits/Cloak.cs | 1 - .../Traits/CombatDebugOverlay.cs | 2 +- .../Conditions/GrantConditionOnProduction.cs | 2 +- OpenRA.Mods.Common/Traits/Contrail.cs | 2 +- OpenRA.Mods.Common/Traits/DeliversCash.cs | 2 +- .../Traits/DeliversExperience.cs | 2 +- OpenRA.Mods.Common/Traits/Demolition.cs | 2 +- OpenRA.Mods.Common/Traits/EngineerRepair.cs | 2 +- OpenRA.Mods.Common/Traits/EntersTunnels.cs | 2 +- .../Traits/ExitsDebugOverlay.cs | 2 +- OpenRA.Mods.Common/Traits/Guard.cs | 2 +- OpenRA.Mods.Common/Traits/Harvester.cs | 2 +- OpenRA.Mods.Common/Traits/Mobile.cs | 1 - .../Traits/Modifiers/FrozenUnderFog.cs | 1 - .../Traits/Modifiers/HiddenUnderShroud.cs | 2 +- .../Traits/Modifiers/WithColoredOverlay.cs | 2 +- .../PaletteEffects/CloakPaletteEffect.cs | 2 +- .../PaletteEffects/FlashPaletteEffect.cs | 2 +- .../PaletteEffects/MenuPaletteEffect.cs | 2 +- OpenRA.Mods.Common/Traits/Passenger.cs | 2 +- .../Traits/Player/BaseAttackNotifier.cs | 2 +- .../Player/ConquestVictoryConditions.cs | 2 +- .../Traits/Player/HarvesterAttackNotifier.cs | 2 +- .../Player/StrategicVictoryConditions.cs | 2 +- .../Traits/Power/AffectedByPowerOutage.cs | 2 +- OpenRA.Mods.Common/Traits/Production.cs | 1 - .../Traits/ProductionFromMapEdge.cs | 1 - .../Traits/ProductionParadrop.cs | 1 - .../Traits/Radar/AppearsOnRadar.cs | 1 - .../Traits/Radar/RadarColorFromTerrain.cs | 2 +- .../Traits/Render/CashTricklerBar.cs | 2 +- .../Traits/Render/DrawLineToTarget.cs | 2 +- OpenRA.Mods.Common/Traits/Render/Hovers.cs | 2 +- .../Traits/Render/ProductionBar.cs | 2 +- .../Traits/Render/ReloadArmamentsBar.cs | 2 +- .../Traits/Render/RenderDebugState.cs | 2 +- .../Traits/Render/RenderDetectionCircle.cs | 2 +- .../Traits/Render/RenderNameTag.cs | 2 +- .../Traits/Render/RenderRangeCircle.cs | 2 +- .../Traits/Render/RenderSprites.cs | 1 - .../Traits/Render/RenderVoxels.cs | 2 +- .../Traits/Render/SelectionDecorations.cs | 2 +- .../Traits/Render/SupportPowerChargeBar.cs | 2 +- .../Traits/Render/TimedConditionBar.cs | 2 +- .../Traits/Render/WithMuzzleOverlay.cs | 2 +- .../Traits/Render/WithParachute.cs | 2 +- .../Traits/Render/WithRangeCircle.cs | 2 +- .../Traits/Render/WithShadow.cs | 2 +- .../Traits/Render/WithSpriteBody.cs | 2 +- .../Render/WithTextControlGroupDecoration.cs | 2 +- .../Traits/Render/WithTextDecoration.cs | 2 +- .../Traits/Render/WithVoxelBody.cs | 2 +- OpenRA.Mods.Common/Traits/Repairable.cs | 2 +- OpenRA.Mods.Common/Traits/RepairableNear.cs | 2 +- OpenRA.Mods.Common/Traits/RepairsBridges.cs | 2 +- .../Traits/Sound/AnnounceOnSeen.cs | 2 +- .../GrantExternalConditionPower.cs | 2 +- .../Traits/TemporaryOwnerManager.cs | 2 +- OpenRA.Mods.Common/Traits/World/ActorMap.cs | 2 +- .../Traits/World/EditorActorLayer.cs | 1 - .../Traits/World/EditorActorPreview.cs | 1 - .../Traits/World/PaletteFromGimpOrJascFile.cs | 2 +- .../World/PaletteFromPaletteWithAlpha.cs | 2 +- .../Traits/World/PaletteFromRGBA.cs | 2 +- OpenRA.Mods.Common/Traits/World/RadarPings.cs | 2 +- .../Traits/World/ShroudPalette.cs | 2 +- .../Traits/World/TerrainGeometryOverlay.cs | 2 +- .../Traits/World/WarheadDebugOverlay.cs | 2 +- .../Traits/World/WeatherOverlay.cs | 2 +- OpenRA.Mods.Common/TraitsInterfaces.cs | 1 - OpenRA.Mods.Common/Util.cs | 2 +- .../UtilityCommands/ConvertPngToShpCommand.cs | 2 +- .../ConvertSpriteToPngCommand.cs | 1 - .../UtilityCommands/RemapShpCommand.cs | 2 +- OpenRA.Mods.Common/Warheads/Warhead.cs | 1 - .../Widgets/ActorPreviewWidget.cs | 1 - .../Widgets/BackgroundWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/ButtonWidget.cs | 2 +- .../Widgets/ChatDisplayWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/CheckboxWidget.cs | 2 +- .../Widgets/ColorBlockWidget.cs | 2 +- .../Widgets/ColorMixerWidget.cs | 2 +- .../Widgets/DropDownButtonWidget.cs | 2 +- .../Widgets/ExponentialSliderWidget.cs | 3 - .../Widgets/HotkeyEntryWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/HueSliderWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/LabelWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/LineGraphWidget.cs | 2 +- .../ButtonTooltipWithDescHighlightLogic.cs | 2 +- .../Logic/Ingame/GameInfoObjectivesLogic.cs | 2 +- .../Logic/Ingame/GameInfoStatsLogic.cs | 1 - .../Widgets/Logic/Ingame/IngameChatLogic.cs | 2 +- .../Logic/Ingame/IngamePowerBarLogic.cs | 2 +- .../Logic/Ingame/IngamePowerCounterLogic.cs | 2 +- .../Logic/Ingame/IngameRadarDisplayLogic.cs | 2 +- .../Logic/Ingame/IngameSiloBarLogic.cs | 2 +- .../Ingame/ObserverShroudSelectorLogic.cs | 2 +- .../Logic/Ingame/ObserverStatsLogic.cs | 2 +- .../Logic/Ingame/ProductionTooltipLogic.cs | 2 +- .../Logic/Ingame/SupportPowerTooltipLogic.cs | 2 +- .../Widgets/Logic/Ingame/WorldTooltipLogic.cs | 2 +- .../Widgets/Logic/Lobby/LobbyLogic.cs | 2 +- .../Widgets/Logic/Lobby/LobbyUtils.cs | 1 - .../Widgets/Logic/MuteHotkeyLogic.cs | 2 +- .../Widgets/Logic/ServerCreationLogic.cs | 2 +- .../Widgets/Logic/ServerListLogic.cs | 2 +- .../Widgets/MapPreviewWidget.cs | 2 +- .../Widgets/ObserverProductionIconsWidget.cs | 2 +- .../ObserverSupportPowerIconsWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/PerfGraphWidget.cs | 2 +- .../Widgets/ProductionPaletteWidget.cs | 2 +- .../Widgets/ProductionTabsWidget.cs | 2 +- .../Widgets/ProgressBarWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/RadarWidget.cs | 1 - .../Widgets/ResourceBarWidget.cs | 2 +- .../Widgets/ScrollPanelWidget.cs | 1 - OpenRA.Mods.Common/Widgets/SliderWidget.cs | 2 +- .../Widgets/StrategicProgressWidget.cs | 2 +- .../Widgets/SupportPowerTimerWidget.cs | 1 - .../Widgets/SupportPowersWidget.cs | 2 +- .../Widgets/TerrainTemplatePreviewWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/TextFieldWidget.cs | 2 +- .../Widgets/TooltipContainerWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs | 2 +- .../WorldInteractionControllerWidget.cs | 2 +- OpenRA.Mods.D2k/Activities/SwallowActor.cs | 2 +- OpenRA.Mods.D2k/SpriteLoaders/R8Loader.cs | 1 - OpenRA.Mods.D2k/Traits/Sandworm.cs | 2 +- .../Traits/World/PaletteFromScaledPalette.cs | 2 +- .../UtilityCommands/D2kMapImporter.cs | 1 - OpenRA.Platforms.Default/DefaultPlatform.cs | 2 +- OpenRA.Platforms.Default/FrameBuffer.cs | 2 +- .../Sdl2GraphicsContext.cs | 4 +- .../Sdl2HardwareCursor.cs | 2 +- .../Sdl2PlatformWindow.cs | 2 +- OpenRA.Platforms.Default/Texture.cs | 2 +- .../ThreadedGraphicsContext.cs | 2 +- .../OpenRA.Game/SpatiallyPartitionedTest.cs | 1 - 304 files changed, 795 insertions(+), 335 deletions(-) create mode 100644 OpenRA.Game/Primitives/Color.cs create mode 100644 OpenRA.Game/Primitives/Rectangle.cs create mode 100644 OpenRA.Game/Primitives/Size.cs diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index 57160c9549..efbec300a8 100644 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using Eluant; using Eluant.ObjectBinding; diff --git a/OpenRA.Game/CVec.cs b/OpenRA.Game/CVec.cs index 68b0693c11..7bc6df3895 100644 --- a/OpenRA.Game/CVec.cs +++ b/OpenRA.Game/CVec.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using Eluant; using Eluant.ObjectBinding; +using OpenRA.Primitives; using OpenRA.Scripting; namespace OpenRA diff --git a/OpenRA.Game/ExternalMods.cs b/OpenRA.Game/ExternalMods.cs index 0c677367eb..75106c728c 100644 --- a/OpenRA.Game/ExternalMods.cs +++ b/OpenRA.Game/ExternalMods.cs @@ -12,7 +12,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileFormats; diff --git a/OpenRA.Game/Exts.cs b/OpenRA.Game/Exts.cs index ce09bfdb6f..af5b35fb1a 100644 --- a/OpenRA.Game/Exts.cs +++ b/OpenRA.Game/Exts.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Globalization; using System.Linq; using System.Reflection; +using OpenRA.Primitives; using OpenRA.Support; using OpenRA.Traits; diff --git a/OpenRA.Game/FieldLoader.cs b/OpenRA.Game/FieldLoader.cs index 7041d75c34..2464f929c8 100644 --- a/OpenRA.Game/FieldLoader.cs +++ b/OpenRA.Game/FieldLoader.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Drawing; using System.Globalization; using System.IO; using System.Linq; diff --git a/OpenRA.Game/FieldSaver.cs b/OpenRA.Game/FieldSaver.cs index 38ca413931..ac0349c74f 100644 --- a/OpenRA.Game/FieldSaver.cs +++ b/OpenRA.Game/FieldSaver.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Drawing; using System.Globalization; using System.Linq; using System.Reflection; diff --git a/OpenRA.Game/FileFormats/Png.cs b/OpenRA.Game/FileFormats/Png.cs index 1b73567dce..0439678115 100644 --- a/OpenRA.Game/FileFormats/Png.cs +++ b/OpenRA.Game/FileFormats/Png.cs @@ -11,8 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Net; @@ -20,6 +18,7 @@ using System.Runtime.InteropServices; using System.Text; using ICSharpCode.SharpZipLib.Checksums; using ICSharpCode.SharpZipLib.Zip.Compression.Streams; +using OpenRA.Primitives; namespace OpenRA.FileFormats { @@ -231,22 +230,22 @@ namespace OpenRA.FileFormats public byte[] Save() { - var pixelFormat = Palette != null ? PixelFormat.Format8bppIndexed : PixelFormat.Format32bppArgb; + var pixelFormat = Palette != null ? System.Drawing.Imaging.PixelFormat.Format8bppIndexed : System.Drawing.Imaging.PixelFormat.Format32bppArgb; // Save to a memory stream that we can then parse to add the embedded data using (var bitmapStream = new MemoryStream()) { - using (var bitmap = new Bitmap(Width, Height, pixelFormat)) + using (var bitmap = new System.Drawing.Bitmap(Width, Height, pixelFormat)) { if (Palette != null) { // Setting bitmap.Palette.Entries directly doesn't work var bPal = bitmap.Palette; for (var i = 0; i < 256; i++) - bPal.Entries[i] = Palette[i]; + bPal.Entries[i] = System.Drawing.Color.FromArgb(Palette[i].ToArgb()); bitmap.Palette = bPal; - var bd = bitmap.LockBits(new Rectangle(0, 0, Width, Height), ImageLockMode.WriteOnly, + var bd = bitmap.LockBits(new System.Drawing.Rectangle(0, 0, Width, Height), System.Drawing.Imaging.ImageLockMode.WriteOnly, pixelFormat); for (var i = 0; i < Height; i++) Marshal.Copy(Data, i * Width, IntPtr.Add(bd.Scan0, i * bd.Stride), Width); @@ -257,7 +256,7 @@ namespace OpenRA.FileFormats { unsafe { - var bd = bitmap.LockBits(new Rectangle(0, 0, Width, Height), ImageLockMode.WriteOnly, pixelFormat); + var bd = bitmap.LockBits(new System.Drawing.Rectangle(0, 0, Width, Height), System.Drawing.Imaging.ImageLockMode.WriteOnly, pixelFormat); var colors = (int*)bd.Scan0; for (var y = 0; y < Height; y++) { @@ -275,7 +274,7 @@ namespace OpenRA.FileFormats } } - bitmap.Save(bitmapStream, ImageFormat.Png); + bitmap.Save(bitmapStream, System.Drawing.Imaging.ImageFormat.Png); } if (!EmbeddedData.Any()) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 8d9f665db2..3df37874bb 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Drawing; using System.Globalization; using System.IO; using System.Linq; diff --git a/OpenRA.Game/Graphics/Animation.cs b/OpenRA.Game/Graphics/Animation.cs index 700e883d0b..11d33ec8bf 100644 --- a/OpenRA.Game/Graphics/Animation.cs +++ b/OpenRA.Game/Graphics/Animation.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Support; namespace OpenRA.Graphics diff --git a/OpenRA.Game/Graphics/AnimationWithOffset.cs b/OpenRA.Game/Graphics/AnimationWithOffset.cs index 66c93657bc..b3e6871e85 100644 --- a/OpenRA.Game/Graphics/AnimationWithOffset.cs +++ b/OpenRA.Game/Graphics/AnimationWithOffset.cs @@ -10,7 +10,7 @@ #endregion using System; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/HSLColor.cs b/OpenRA.Game/Graphics/HSLColor.cs index bd27345c4c..7917e10657 100644 --- a/OpenRA.Game/Graphics/HSLColor.cs +++ b/OpenRA.Game/Graphics/HSLColor.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using System.Globalization; +using OpenRA.Primitives; using OpenRA.Scripting; namespace OpenRA.Graphics diff --git a/OpenRA.Game/Graphics/HardwareCursor.cs b/OpenRA.Game/Graphics/HardwareCursor.cs index a3dc51680e..5675b76942 100644 --- a/OpenRA.Game/Graphics/HardwareCursor.cs +++ b/OpenRA.Game/Graphics/HardwareCursor.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/MappedImage.cs b/OpenRA.Game/Graphics/MappedImage.cs index b8d765f25d..fbaceebfc8 100644 --- a/OpenRA.Game/Graphics/MappedImage.cs +++ b/OpenRA.Game/Graphics/MappedImage.cs @@ -10,7 +10,7 @@ #endregion using System.Collections.Generic; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/Model.cs b/OpenRA.Game/Graphics/Model.cs index 03e43b916f..a11dd774f5 100644 --- a/OpenRA.Game/Graphics/Model.cs +++ b/OpenRA.Game/Graphics/Model.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.FileSystem; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/ModelAnimation.cs b/OpenRA.Game/Graphics/ModelAnimation.cs index bb653149b9..2db0d8f418 100644 --- a/OpenRA.Game/Graphics/ModelAnimation.cs +++ b/OpenRA.Game/Graphics/ModelAnimation.cs @@ -11,7 +11,7 @@ using System; using System.Collections.Generic; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/ModelRenderer.cs b/OpenRA.Game/Graphics/ModelRenderer.cs index 7c61c2fc5e..20b5a777db 100644 --- a/OpenRA.Game/Graphics/ModelRenderer.cs +++ b/OpenRA.Game/Graphics/ModelRenderer.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Primitives; diff --git a/OpenRA.Game/Graphics/Palette.cs b/OpenRA.Game/Graphics/Palette.cs index 8e7f238b61..81e49b9b98 100644 --- a/OpenRA.Game/Graphics/Palette.cs +++ b/OpenRA.Game/Graphics/Palette.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/PlatformInterfaces.cs b/OpenRA.Game/Graphics/PlatformInterfaces.cs index 9a79ba649c..276d3ac522 100644 --- a/OpenRA.Game/Graphics/PlatformInterfaces.cs +++ b/OpenRA.Game/Graphics/PlatformInterfaces.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA { diff --git a/OpenRA.Game/Graphics/PlayerColorRemap.cs b/OpenRA.Game/Graphics/PlayerColorRemap.cs index 43b5e0338a..43f865bb58 100644 --- a/OpenRA.Game/Graphics/PlayerColorRemap.cs +++ b/OpenRA.Game/Graphics/PlayerColorRemap.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Primitives; diff --git a/OpenRA.Game/Graphics/Renderable.cs b/OpenRA.Game/Graphics/Renderable.cs index f2b930bd2f..716ddfa97e 100644 --- a/OpenRA.Game/Graphics/Renderable.cs +++ b/OpenRA.Game/Graphics/Renderable.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/RgbaColorRenderer.cs b/OpenRA.Game/Graphics/RgbaColorRenderer.cs index 234d0868ee..f1153693b3 100644 --- a/OpenRA.Game/Graphics/RgbaColorRenderer.cs +++ b/OpenRA.Game/Graphics/RgbaColorRenderer.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/SequenceProvider.cs b/OpenRA.Game/Graphics/SequenceProvider.cs index 86f9318b36..d6e8188510 100644 --- a/OpenRA.Game/Graphics/SequenceProvider.cs +++ b/OpenRA.Game/Graphics/SequenceProvider.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.FileSystem; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/Sheet.cs b/OpenRA.Game/Graphics/Sheet.cs index 512ac47c03..5a5df7efd3 100644 --- a/OpenRA.Game/Graphics/Sheet.cs +++ b/OpenRA.Game/Graphics/Sheet.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.IO; using OpenRA.FileFormats; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/SheetBuilder.cs b/OpenRA.Game/Graphics/SheetBuilder.cs index d7a9aaf755..83b009c54d 100644 --- a/OpenRA.Game/Graphics/SheetBuilder.cs +++ b/OpenRA.Game/Graphics/SheetBuilder.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.FileFormats; +using OpenRA.Primitives; namespace OpenRA.Graphics { @@ -40,7 +40,7 @@ namespace OpenRA.Graphics Sheet current; TextureChannel channel; int rowHeight = 0; - Point p; + int2 p; public static Sheet AllocateSheet(SheetType type, int sheetSize) { @@ -107,7 +107,7 @@ namespace OpenRA.Graphics { if (imageSize.Width + p.X > current.Size.Width) { - p = new Point(0, p.Y + rowHeight); + p = new int2(0, p.Y + rowHeight); rowHeight = imageSize.Height; } @@ -128,11 +128,11 @@ namespace OpenRA.Graphics channel = next.Value; rowHeight = imageSize.Height; - p = new Point(0, 0); + p = int2.Zero; } - var rect = new Sprite(current, new Rectangle(p, imageSize), zRamp, spriteOffset, channel, BlendMode.Alpha); - p.X += imageSize.Width; + var rect = new Sprite(current, new Rectangle(p.X, p.Y, imageSize.Width, imageSize.Height), zRamp, spriteOffset, channel, BlendMode.Alpha); + p += new int2(imageSize.Width, 0); return rect; } diff --git a/OpenRA.Game/Graphics/Sprite.cs b/OpenRA.Game/Graphics/Sprite.cs index 1ecc76dabb..a5b415e813 100644 --- a/OpenRA.Game/Graphics/Sprite.cs +++ b/OpenRA.Game/Graphics/Sprite.cs @@ -10,7 +10,7 @@ #endregion using System; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/SpriteFont.cs b/OpenRA.Game/Graphics/SpriteFont.cs index a6e45b90b7..7977a0c9dc 100644 --- a/OpenRA.Game/Graphics/SpriteFont.cs +++ b/OpenRA.Game/Graphics/SpriteFont.cs @@ -10,7 +10,6 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Primitives; using OpenRA.Support; diff --git a/OpenRA.Game/Graphics/SpriteLoader.cs b/OpenRA.Game/Graphics/SpriteLoader.cs index dde6b9fc4f..38aeacdd8b 100644 --- a/OpenRA.Game/Graphics/SpriteLoader.cs +++ b/OpenRA.Game/Graphics/SpriteLoader.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileSystem; diff --git a/OpenRA.Game/Graphics/SpriteRenderable.cs b/OpenRA.Game/Graphics/SpriteRenderable.cs index 5e45a14356..30dceb76c3 100644 --- a/OpenRA.Game/Graphics/SpriteRenderable.cs +++ b/OpenRA.Game/Graphics/SpriteRenderable.cs @@ -10,7 +10,7 @@ #endregion using System.Collections.Generic; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/SpriteRenderer.cs b/OpenRA.Game/Graphics/SpriteRenderer.cs index 31a092e75e..88d6d2d8e7 100644 --- a/OpenRA.Game/Graphics/SpriteRenderer.cs +++ b/OpenRA.Game/Graphics/SpriteRenderer.cs @@ -10,7 +10,7 @@ #endregion using System; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/TargetLineRenderable.cs b/OpenRA.Game/Graphics/TargetLineRenderable.cs index 166ddb8541..de34310663 100644 --- a/OpenRA.Game/Graphics/TargetLineRenderable.cs +++ b/OpenRA.Game/Graphics/TargetLineRenderable.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/TerrainSpriteLayer.cs b/OpenRA.Game/Graphics/TerrainSpriteLayer.cs index 7cab3f3949..31ede7dae8 100644 --- a/OpenRA.Game/Graphics/TerrainSpriteLayer.cs +++ b/OpenRA.Game/Graphics/TerrainSpriteLayer.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/Theater.cs b/OpenRA.Game/Graphics/Theater.cs index 702289bbd0..6a25f43add 100644 --- a/OpenRA.Game/Graphics/Theater.cs +++ b/OpenRA.Game/Graphics/Theater.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Support; namespace OpenRA.Graphics diff --git a/OpenRA.Game/Graphics/UISpriteRenderable.cs b/OpenRA.Game/Graphics/UISpriteRenderable.cs index 3bb4446219..b3892394a1 100644 --- a/OpenRA.Game/Graphics/UISpriteRenderable.cs +++ b/OpenRA.Game/Graphics/UISpriteRenderable.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/Util.cs b/OpenRA.Game/Graphics/Util.cs index d254474eb6..ccee8aba85 100644 --- a/OpenRA.Game/Graphics/Util.cs +++ b/OpenRA.Game/Graphics/Util.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.FileFormats; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/Viewport.cs b/OpenRA.Game/Graphics/Viewport.cs index 51d5d108ef..e562888085 100644 --- a/OpenRA.Game/Graphics/Viewport.cs +++ b/OpenRA.Game/Graphics/Viewport.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/WorldRenderer.cs b/OpenRA.Game/Graphics/WorldRenderer.cs index a0d730f538..c10ff1a394 100644 --- a/OpenRA.Game/Graphics/WorldRenderer.cs +++ b/OpenRA.Game/Graphics/WorldRenderer.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Effects; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Graphics diff --git a/OpenRA.Game/InstalledMods.cs b/OpenRA.Game/InstalledMods.cs index 4bed8cd046..b7079532d0 100644 --- a/OpenRA.Game/InstalledMods.cs +++ b/OpenRA.Game/InstalledMods.cs @@ -12,7 +12,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileFormats; diff --git a/OpenRA.Game/MPos.cs b/OpenRA.Game/MPos.cs index 9dd2cc41f7..31d960cc75 100644 --- a/OpenRA.Game/MPos.cs +++ b/OpenRA.Game/MPos.cs @@ -10,7 +10,7 @@ #endregion using System; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA { diff --git a/OpenRA.Game/Map/CellLayer.cs b/OpenRA.Game/Map/CellLayer.cs index 89b2b63a41..96f5c45887 100644 --- a/OpenRA.Game/Map/CellLayer.cs +++ b/OpenRA.Game/Map/CellLayer.cs @@ -12,7 +12,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA { diff --git a/OpenRA.Game/Map/Map.cs b/OpenRA.Game/Map/Map.cs index a155f3343b..49356974d2 100644 --- a/OpenRA.Game/Map/Map.cs +++ b/OpenRA.Game/Map/Map.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using System.Reflection; diff --git a/OpenRA.Game/Map/MapGrid.cs b/OpenRA.Game/Map/MapGrid.cs index f4f7c21119..6caa2ababd 100644 --- a/OpenRA.Game/Map/MapGrid.cs +++ b/OpenRA.Game/Map/MapGrid.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA diff --git a/OpenRA.Game/Map/MapPreview.cs b/OpenRA.Game/Map/MapPreview.cs index f81e665795..165609b50f 100644 --- a/OpenRA.Game/Map/MapPreview.cs +++ b/OpenRA.Game/Map/MapPreview.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Drawing; using System.IO; using System.Linq; using System.Net; diff --git a/OpenRA.Game/Map/TileSet.cs b/OpenRA.Game/Map/TileSet.cs index ebb222190e..8f75cc8a99 100644 --- a/OpenRA.Game/Map/TileSet.cs +++ b/OpenRA.Game/Map/TileSet.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileSystem; diff --git a/OpenRA.Game/Network/OrderManager.cs b/OpenRA.Game/Network/OrderManager.cs index 1febeb4d72..cfda029aea 100644 --- a/OpenRA.Game/Network/OrderManager.cs +++ b/OpenRA.Game/Network/OrderManager.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Primitives; using OpenRA.Support; diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index 0635c47d56..88242a6340 100644 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Network diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index fce7da4b72..060ec121ae 100644 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -106,6 +106,7 @@ + @@ -160,7 +161,9 @@ + + diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs index 2b98f4fed4..2e1387312e 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using Eluant; using Eluant.ObjectBinding; diff --git a/OpenRA.Game/PlayerDatabase.cs b/OpenRA.Game/PlayerDatabase.cs index b0bfa234f8..ae64f25335 100644 --- a/OpenRA.Game/PlayerDatabase.cs +++ b/OpenRA.Game/PlayerDatabase.cs @@ -11,12 +11,12 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using System.Net; using OpenRA.FileFormats; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA { diff --git a/OpenRA.Game/Primitives/Color.cs b/OpenRA.Game/Primitives/Color.cs new file mode 100644 index 0000000000..9f00b7917e --- /dev/null +++ b/OpenRA.Game/Primitives/Color.cs @@ -0,0 +1,361 @@ +#region Copyright & License Information +/* + * Copyright 2007-2019 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. For more + * information, see COPYING. + */ +#endregion + +using System; +using System.Globalization; +using OpenRA.Scripting; + +namespace OpenRA.Primitives +{ + public struct Color : IScriptBindable + { + readonly long argb; + + public static Color FromArgb(int red, int green, int blue) + { + return FromArgb(byte.MaxValue, red, green, blue); + } + + public static Color FromArgb(int alpha, int red, int green, int blue) + { + return new Color(((byte)alpha << 24) + ((byte)red << 16) + ((byte)green << 8) + (byte)blue); + } + + public static Color FromAhsl(int alpha, float h, float s, float l) + { + // Convert from HSL to RGB + var q = (l < 0.5f) ? l * (1 + s) : l + s - (l * s); + var p = 2 * l - q; + + float[] trgb = { h + 1 / 3.0f, h, h - 1 / 3.0f }; + float[] rgb = { 0, 0, 0 }; + + for (var k = 0; k < 3; k++) + { + while (trgb[k] < 0) trgb[k] += 1.0f; + while (trgb[k] > 1) trgb[k] -= 1.0f; + } + + for (var k = 0; k < 3; k++) + { + if (trgb[k] < 1 / 6.0f) + rgb[k] = p + ((q - p) * 6 * trgb[k]); + else if (trgb[k] >= 1 / 6.0f && trgb[k] < 0.5) + rgb[k] = q; + else if (trgb[k] >= 0.5f && trgb[k] < 2.0f / 3) + rgb[k] = p + ((q - p) * 6 * (2.0f / 3 - trgb[k])); + else + rgb[k] = p; + } + + return FromArgb(alpha, (int)(rgb[0] * 255), (int)(rgb[1] * 255), (int)(rgb[2] * 255)); + } + + public static Color FromAhsl(float h, float s, float l) + { + return FromAhsl(255, h, s, l); + } + + public static Color FromAhsv(int alpha, float h, float s, float v) + { + var ll = 0.5f * (2 - s) * v; + var ss = (ll >= 1 || v <= 0) ? 0 : 0.5f * s * v / (ll <= 0.5f ? ll : 1 - ll); + return FromAhsl(alpha, h, ss, ll); + } + + public static Color FromAhsv(float h, float s, float v) + { + return FromAhsv(255, h, s, v); + } + + public void ToAhsv(out int a, out float h, out float s, out float v) + { + var ll = 2 * GetBrightness(); + var ss = GetSaturation() * ((ll <= 1) ? ll : 2 - ll); + + a = A; + h = GetHue() / 360f; + s = (2 * ss) / (ll + ss); + v = (ll + ss) / 2; + } + + Color(long argb) + { + this.argb = argb; + } + + public int ToArgb() + { + return (int)argb; + } + + public static Color FromArgb(int alpha, Color baseColor) + { + return FromArgb(alpha, baseColor.R, baseColor.G, baseColor.B); + } + + public static Color FromArgb(int argb) + { + return FromArgb((byte)(argb >> 24), (byte)(argb >> 16), (byte)(argb >> 8), (byte)argb); + } + + public static Color FromArgb(uint argb) + { + return FromArgb((byte)(argb >> 24), (byte)(argb >> 16), (byte)(argb >> 8), (byte)argb); + } + + public static bool TryParse(string value, out Color color) + { + color = new Color(); + value = value.Trim(); + if (value.Length != 6 && value.Length != 8) + return false; + + byte red, green, blue, alpha = 255; + if (!byte.TryParse(value.Substring(0, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out red) + || !byte.TryParse(value.Substring(2, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out green) + || !byte.TryParse(value.Substring(4, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out blue)) + return false; + + if (value.Length == 8 + && !byte.TryParse(value.Substring(6, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out alpha)) + return false; + + color = FromArgb(alpha, red, green, blue); + return true; + } + + public static bool operator ==(Color left, Color right) + { + return left.argb == right.argb; + } + + public static bool operator !=(Color left, Color right) + { + return !(left == right); + } + + public float GetBrightness() + { + var min = Math.Min(R, Math.Min(G, B)); + var max = Math.Max(R, Math.Max(G, B)); + return (max + min) / 510f; + } + + public float GetSaturation() + { + var min = Math.Min(R, Math.Min(G, B)); + var max = Math.Max(R, Math.Max(G, B)); + if (max == min) + return 0.0f; + + var sum = max + min; + if (sum > byte.MaxValue) + sum = 510 - sum; + + return (float)(max - min) / sum; + } + + public float GetHue() + { + var min = Math.Min(R, Math.Min(G, B)); + var max = Math.Max(R, Math.Max(G, B)); + if (max == min) + return 0.0f; + + var diff = (float)(max - min); + var rNorm = (max - R) / diff; + var gNorm = (max - G) / diff; + var bNorm = (max - B) / diff; + + var hue = 0.0f; + if (R == max) + hue = 60.0f * (6.0f + bNorm - gNorm); + if (G == max) + hue = 60.0f * (2.0f + rNorm - bNorm); + if (B == max) + hue = 60.0f * (4.0f + gNorm - rNorm); + + if (hue > 360.0f) + hue -= 360f; + + return hue; + } + + public byte A { get { return (byte)(argb >> 24); } } + public byte R { get { return (byte)(argb >> 16); } } + public byte G { get { return (byte)(argb >> 8); } } + public byte B { get { return (byte)argb; } } + + public override bool Equals(object obj) + { + if (!(obj is Color)) + return false; + + return this == (Color)obj; + } + + public override int GetHashCode() + { + return (int)(argb ^ argb >> 32); + } + + public override string ToString() + { + if (A == 255) + return R.ToString("X2") + G.ToString("X2") + B.ToString("X2"); + + return R.ToString("X2") + G.ToString("X2") + B.ToString("X2") + A.ToString("X2"); + } + + public static Color Transparent { get { return FromArgb(0x00FFFFFF); } } + public static Color AliceBlue { get { return FromArgb(0xFFF0F8FF); } } + public static Color AntiqueWhite { get { return FromArgb(0xFFFAEBD7); } } + public static Color Aqua { get { return FromArgb(0xFF00FFFF); } } + public static Color Aquamarine { get { return FromArgb(0xFF7FFFD4); } } + public static Color Azure { get { return FromArgb(0xFFF0FFFF); } } + public static Color Beige { get { return FromArgb(0xFFF5F5DC); } } + public static Color Bisque { get { return FromArgb(0xFFFFE4C4); } } + public static Color Black { get { return FromArgb(0xFF000000); } } + public static Color BlanchedAlmond { get { return FromArgb(0xFFFFEBCD); } } + public static Color Blue { get { return FromArgb(0xFF0000FF); } } + public static Color BlueViolet { get { return FromArgb(0xFF8A2BE2); } } + public static Color Brown { get { return FromArgb(0xFFA52A2A); } } + public static Color BurlyWood { get { return FromArgb(0xFFDEB887); } } + public static Color CadetBlue { get { return FromArgb(0xFF5F9EA0); } } + public static Color Chartreuse { get { return FromArgb(0xFF7FFF00); } } + public static Color Chocolate { get { return FromArgb(0xFFD2691E); } } + public static Color Coral { get { return FromArgb(0xFFFF7F50); } } + public static Color CornflowerBlue { get { return FromArgb(0xFF6495ED); } } + public static Color Cornsilk { get { return FromArgb(0xFFFFF8DC); } } + public static Color Crimson { get { return FromArgb(0xFFDC143C); } } + public static Color Cyan { get { return FromArgb(0xFF00FFFF); } } + public static Color DarkBlue { get { return FromArgb(0xFF00008B); } } + public static Color DarkCyan { get { return FromArgb(0xFF008B8B); } } + public static Color DarkGoldenrod { get { return FromArgb(0xFFB8860B); } } + public static Color DarkGray { get { return FromArgb(0xFFA9A9A9); } } + public static Color DarkGreen { get { return FromArgb(0xFF006400); } } + public static Color DarkKhaki { get { return FromArgb(0xFFBDB76B); } } + public static Color DarkMagenta { get { return FromArgb(0xFF8B008B); } } + public static Color DarkOliveGreen { get { return FromArgb(0xFF556B2F); } } + public static Color DarkOrange { get { return FromArgb(0xFFFF8C00); } } + public static Color DarkOrchid { get { return FromArgb(0xFF9932CC); } } + public static Color DarkRed { get { return FromArgb(0xFF8B0000); } } + public static Color DarkSalmon { get { return FromArgb(0xFFE9967A); } } + public static Color DarkSeaGreen { get { return FromArgb(0xFF8FBC8B); } } + public static Color DarkSlateBlue { get { return FromArgb(0xFF483D8B); } } + public static Color DarkSlateGray { get { return FromArgb(0xFF2F4F4F); } } + public static Color DarkTurquoise { get { return FromArgb(0xFF00CED1); } } + public static Color DarkViolet { get { return FromArgb(0xFF9400D3); } } + public static Color DeepPink { get { return FromArgb(0xFFFF1493); } } + public static Color DeepSkyBlue { get { return FromArgb(0xFF00BFFF); } } + public static Color DimGray { get { return FromArgb(0xFF696969); } } + public static Color DodgerBlue { get { return FromArgb(0xFF1E90FF); } } + public static Color Firebrick { get { return FromArgb(0xFFB22222); } } + public static Color FloralWhite { get { return FromArgb(0xFFFFFAF0); } } + public static Color ForestGreen { get { return FromArgb(0xFF228B22); } } + public static Color Fuchsia { get { return FromArgb(0xFFFF00FF); } } + public static Color Gainsboro { get { return FromArgb(0xFFDCDCDC); } } + public static Color GhostWhite { get { return FromArgb(0xFFF8F8FF); } } + public static Color Gold { get { return FromArgb(0xFFFFD700); } } + public static Color Goldenrod { get { return FromArgb(0xFFDAA520); } } + public static Color Gray { get { return FromArgb(0xFF808080); } } + public static Color Green { get { return FromArgb(0xFF008000); } } + public static Color GreenYellow { get { return FromArgb(0xFFADFF2F); } } + public static Color Honeydew { get { return FromArgb(0xFFF0FFF0); } } + public static Color HotPink { get { return FromArgb(0xFFFF69B4); } } + public static Color IndianRed { get { return FromArgb(0xFFCD5C5C); } } + public static Color Indigo { get { return FromArgb(0xFF4B0082); } } + public static Color Ivory { get { return FromArgb(0xFFFFFFF0); } } + public static Color Khaki { get { return FromArgb(0xFFF0E68C); } } + public static Color Lavender { get { return FromArgb(0xFFE6E6FA); } } + public static Color LavenderBlush { get { return FromArgb(0xFFFFF0F5); } } + public static Color LawnGreen { get { return FromArgb(0xFF7CFC00); } } + public static Color LemonChiffon { get { return FromArgb(0xFFFFFACD); } } + public static Color LightBlue { get { return FromArgb(0xFFADD8E6); } } + public static Color LightCoral { get { return FromArgb(0xFFF08080); } } + public static Color LightCyan { get { return FromArgb(0xFFE0FFFF); } } + public static Color LightGoldenrodYellow { get { return FromArgb(0xFFFAFAD2); } } + public static Color LightGray { get { return FromArgb(0xFFD3D3D3); } } + public static Color LightGreen { get { return FromArgb(0xFF90EE90); } } + public static Color LightPink { get { return FromArgb(0xFFFFB6C1); } } + public static Color LightSalmon { get { return FromArgb(0xFFFFA07A); } } + public static Color LightSeaGreen { get { return FromArgb(0xFF20B2AA); } } + public static Color LightSkyBlue { get { return FromArgb(0xFF87CEFA); } } + public static Color LightSlateGray { get { return FromArgb(0xFF778899); } } + public static Color LightSteelBlue { get { return FromArgb(0xFFB0C4DE); } } + public static Color LightYellow { get { return FromArgb(0xFFFFFFE0); } } + public static Color Lime { get { return FromArgb(0xFF00FF00); } } + public static Color LimeGreen { get { return FromArgb(0xFF32CD32); } } + public static Color Linen { get { return FromArgb(0xFFFAF0E6); } } + public static Color Magenta { get { return FromArgb(0xFFFF00FF); } } + public static Color Maroon { get { return FromArgb(0xFF800000); } } + public static Color MediumAquamarine { get { return FromArgb(0xFF66CDAA); } } + public static Color MediumBlue { get { return FromArgb(0xFF0000CD); } } + public static Color MediumOrchid { get { return FromArgb(0xFFBA55D3); } } + public static Color MediumPurple { get { return FromArgb(0xFF9370DB); } } + public static Color MediumSeaGreen { get { return FromArgb(0xFF3CB371); } } + public static Color MediumSlateBlue { get { return FromArgb(0xFF7B68EE); } } + public static Color MediumSpringGreen { get { return FromArgb(0xFF00FA9A); } } + public static Color MediumTurquoise { get { return FromArgb(0xFF48D1CC); } } + public static Color MediumVioletRed { get { return FromArgb(0xFFC71585); } } + public static Color MidnightBlue { get { return FromArgb(0xFF191970); } } + public static Color MintCream { get { return FromArgb(0xFFF5FFFA); } } + public static Color MistyRose { get { return FromArgb(0xFFFFE4E1); } } + public static Color Moccasin { get { return FromArgb(0xFFFFE4B5); } } + public static Color NavajoWhite { get { return FromArgb(0xFFFFDEAD); } } + public static Color Navy { get { return FromArgb(0xFF000080); } } + public static Color OldLace { get { return FromArgb(0xFFFDF5E6); } } + public static Color Olive { get { return FromArgb(0xFF808000); } } + public static Color OliveDrab { get { return FromArgb(0xFF6B8E23); } } + public static Color Orange { get { return FromArgb(0xFFFFA500); } } + public static Color OrangeRed { get { return FromArgb(0xFFFF4500); } } + public static Color Orchid { get { return FromArgb(0xFFDA70D6); } } + public static Color PaleGoldenrod { get { return FromArgb(0xFFEEE8AA); } } + public static Color PaleGreen { get { return FromArgb(0xFF98FB98); } } + public static Color PaleTurquoise { get { return FromArgb(0xFFAFEEEE); } } + public static Color PaleVioletRed { get { return FromArgb(0xFFDB7093); } } + public static Color PapayaWhip { get { return FromArgb(0xFFFFEFD5); } } + public static Color PeachPuff { get { return FromArgb(0xFFFFDAB9); } } + public static Color Peru { get { return FromArgb(0xFFCD853F); } } + public static Color Pink { get { return FromArgb(0xFFFFC0CB); } } + public static Color Plum { get { return FromArgb(0xFFDDA0DD); } } + public static Color PowderBlue { get { return FromArgb(0xFFB0E0E6); } } + public static Color Purple { get { return FromArgb(0xFF800080); } } + public static Color Red { get { return FromArgb(0xFFFF0000); } } + public static Color RosyBrown { get { return FromArgb(0xFFBC8F8F); } } + public static Color RoyalBlue { get { return FromArgb(0xFF4169E1); } } + public static Color SaddleBrown { get { return FromArgb(0xFF8B4513); } } + public static Color Salmon { get { return FromArgb(0xFFFA8072); } } + public static Color SandyBrown { get { return FromArgb(0xFFF4A460); } } + public static Color SeaGreen { get { return FromArgb(0xFF2E8B57); } } + public static Color SeaShell { get { return FromArgb(0xFFFFF5EE); } } + public static Color Sienna { get { return FromArgb(0xFFA0522D); } } + public static Color Silver { get { return FromArgb(0xFFC0C0C0); } } + public static Color SkyBlue { get { return FromArgb(0xFF87CEEB); } } + public static Color SlateBlue { get { return FromArgb(0xFF6A5ACD); } } + public static Color SlateGray { get { return FromArgb(0xFF708090); } } + public static Color Snow { get { return FromArgb(0xFFFFFAFA); } } + public static Color SpringGreen { get { return FromArgb(0xFF00FF7F); } } + public static Color SteelBlue { get { return FromArgb(0xFF4682B4); } } + public static Color Tan { get { return FromArgb(0xFFD2B48C); } } + public static Color Teal { get { return FromArgb(0xFF008080); } } + public static Color Thistle { get { return FromArgb(0xFFD8BFD8); } } + public static Color Tomato { get { return FromArgb(0xFFFF6347); } } + public static Color Turquoise { get { return FromArgb(0xFF40E0D0); } } + public static Color Violet { get { return FromArgb(0xFFEE82EE); } } + public static Color Wheat { get { return FromArgb(0xFFF5DEB3); } } + public static Color White { get { return FromArgb(0xFFFFFFFF); } } + public static Color WhiteSmoke { get { return FromArgb(0xFFF5F5F5); } } + public static Color Yellow { get { return FromArgb(0xFFFFFF00); } } + public static Color YellowGreen { get { return FromArgb(0xFF9ACD32); } } + } +} diff --git a/OpenRA.Game/Primitives/Pair.cs b/OpenRA.Game/Primitives/Pair.cs index 01a50e392c..c9d31c6998 100644 --- a/OpenRA.Game/Primitives/Pair.cs +++ b/OpenRA.Game/Primitives/Pair.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; namespace OpenRA.Primitives { diff --git a/OpenRA.Game/Primitives/Rectangle.cs b/OpenRA.Game/Primitives/Rectangle.cs new file mode 100644 index 0000000000..165b0a0ddc --- /dev/null +++ b/OpenRA.Game/Primitives/Rectangle.cs @@ -0,0 +1,120 @@ +#region Copyright & License Information +/* + * Copyright 2007-2019 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. For more + * information, see COPYING. + */ +#endregion + +using System; + +namespace OpenRA.Primitives +{ + public struct Rectangle + { + // TODO: Make these readonly: this will require a lot of changes to the UI logic + public int X; + public int Y; + public int Width; + public int Height; + public static readonly Rectangle Empty; + + public static Rectangle FromLTRB(int left, int top, int right, int bottom) + { + return new Rectangle(left, top, right - left, bottom - top); + } + + public static Rectangle Union(Rectangle a, Rectangle b) + { + return FromLTRB(Math.Min(a.Left, b.Left), Math.Min(a.Top, b.Top), Math.Max(a.Right, b.Right), Math.Max(a.Bottom, b.Bottom)); + } + + public static bool operator ==(Rectangle left, Rectangle right) + { + return left.Location == right.Location && left.Size == right.Size; + } + + public static bool operator !=(Rectangle left, Rectangle right) + { + return !(left == right); + } + + public Rectangle(int x, int y, int width, int height) + { + X = x; + Y = y; + Width = width; + Height = height; + } + + public Rectangle(int2 location, Size size) + { + X = location.X; + Y = location.Y; + Width = size.Width; + Height = size.Height; + } + + public int Left { get { return X; } } + public int Right { get { return X + Width; } } + public int Top { get { return Y; } } + public int Bottom { get { return Y + Height; } } + public bool IsEmpty { get { return X == 0 && Y == 0 && Width == 0 && Height == 0; } } + public int2 Location { get { return new int2(X, Y); } } + public Size Size { get { return new Size(Width, Height); } } + + public bool Contains(int x, int y) + { + return x >= Left && x < Right && y >= Top && y < Bottom; + } + + public bool Contains(int2 pt) + { + return Contains(pt.X, pt.Y); + } + + public override bool Equals(object obj) + { + if (!(obj is Rectangle)) + return false; + + return this == (Rectangle)obj; + } + + public override int GetHashCode() + { + return Height + Width ^ X + Y; + } + + public bool IntersectsWith(Rectangle rect) + { + return Left < rect.Right && Right > rect.Left && Top < rect.Bottom && Bottom > rect.Top; + } + + bool IntersectsWithInclusive(Rectangle r) + { + return Left <= r.Right && Right >= r.Left && Top <= r.Bottom && Bottom >= r.Top; + } + + public static Rectangle Intersect(Rectangle a, Rectangle b) + { + if (!a.IntersectsWithInclusive(b)) + return Empty; + + return FromLTRB(Math.Max(a.Left, b.Left), Math.Max(a.Top, b.Top), Math.Min(a.Right, b.Right), Math.Min(a.Bottom, b.Bottom)); + } + + public bool Contains(Rectangle rect) + { + return rect == Intersect(this, rect); + } + + public override string ToString() + { + return string.Format("{{X={0},Y={1},Width={2},Height={3}}}", X, Y, Width, Height); + } + } +} diff --git a/OpenRA.Game/Primitives/Size.cs b/OpenRA.Game/Primitives/Size.cs new file mode 100644 index 0000000000..3a5b26c11d --- /dev/null +++ b/OpenRA.Game/Primitives/Size.cs @@ -0,0 +1,67 @@ +#region Copyright & License Information +/* + * Copyright 2007-2019 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. For more + * information, see COPYING. + */ +#endregion + +using System; + +namespace OpenRA.Primitives +{ + public struct Size + { + public readonly int Width; + public readonly int Height; + + public static Size operator +(Size left, Size right) + { + return new Size(left.Width + right.Width, left.Height + right.Height); + } + + public static bool operator ==(Size left, Size right) + { + return left.Width == right.Width && left.Height == right.Height; + } + + public static bool operator !=(Size left, Size right) + { + return !(left == right); + } + + public static Size operator -(Size sz1, Size sz2) + { + return new Size(sz1.Width - sz2.Width, sz1.Height - sz2.Height); + } + + public Size(int width, int height) + { + Width = width; + Height = height; + } + + public bool IsEmpty { get { return Width == 0 && Height == 0; } } + + public override bool Equals(object obj) + { + if (!(obj is Size)) + return false; + + return this == (Size)obj; + } + + public override int GetHashCode() + { + return Width ^ Height; + } + + public override string ToString() + { + return string.Format("{{Width={0}, Height={1}}}", Width, Height); + } + } +} diff --git a/OpenRA.Game/Primitives/SpatiallyPartitioned.cs b/OpenRA.Game/Primitives/SpatiallyPartitioned.cs index 0d381a86f1..52a5b8d67e 100644 --- a/OpenRA.Game/Primitives/SpatiallyPartitioned.cs +++ b/OpenRA.Game/Primitives/SpatiallyPartitioned.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; namespace OpenRA.Primitives { diff --git a/OpenRA.Game/Primitives/float2.cs b/OpenRA.Game/Primitives/float2.cs index 9ce8aa6cf9..519c286fbe 100644 --- a/OpenRA.Game/Primitives/float2.cs +++ b/OpenRA.Game/Primitives/float2.cs @@ -11,8 +11,8 @@ using System; using System.Diagnostics.CodeAnalysis; -using System.Drawing; using System.Runtime.InteropServices; +using OpenRA.Primitives; namespace OpenRA { diff --git a/OpenRA.Game/Primitives/int2.cs b/OpenRA.Game/Primitives/int2.cs index 8bf6d3eb72..df52b89d71 100644 --- a/OpenRA.Game/Primitives/int2.cs +++ b/OpenRA.Game/Primitives/int2.cs @@ -11,7 +11,7 @@ using System; using System.Diagnostics.CodeAnalysis; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA { @@ -23,6 +23,7 @@ namespace OpenRA public int2(Size p) { X = p.Width; Y = p.Height; } public static int2 operator +(int2 a, int2 b) { return new int2(a.X + b.X, a.Y + b.Y); } + public static int2 operator +(int2 a, Size b) { return new int2(a.X + b.Width, a.Y + b.Height); } public static int2 operator -(int2 a, int2 b) { return new int2(a.X - b.X, a.Y - b.Y); } public static int2 operator *(int a, int2 b) { return new int2(a * b.X, a * b.Y); } public static int2 operator *(int2 b, int a) { return new int2(a * b.X, a * b.Y); } @@ -84,16 +85,5 @@ namespace OpenRA } public static int Dot(int2 a, int2 b) { return a.X * b.X + a.Y * b.Y; } - - // Temporary shims that will be removed when System.Drawing.Rectangle is replaced with our own implementation - public static implicit operator Point(int2 xy) - { - return new Point(xy.X, xy.Y); - } - - public static implicit operator int2(Point xy) - { - return new int2(xy.X, xy.Y); - } } } diff --git a/OpenRA.Game/Renderer.cs b/OpenRA.Game/Renderer.cs index 331f8d47b9..3bce59537c 100644 --- a/OpenRA.Game/Renderer.cs +++ b/OpenRA.Game/Renderer.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Support; namespace OpenRA diff --git a/OpenRA.Game/SelectableExts.cs b/OpenRA.Game/SelectableExts.cs index c9333231dc..17c738359b 100644 --- a/OpenRA.Game/SelectableExts.cs +++ b/OpenRA.Game/SelectableExts.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; namespace OpenRA.Traits { diff --git a/OpenRA.Game/Support/PerfHistory.cs b/OpenRA.Game/Support/PerfHistory.cs index 12ffaaeaf8..bb65091931 100644 --- a/OpenRA.Game/Support/PerfHistory.cs +++ b/OpenRA.Game/Support/PerfHistory.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using OpenRA.Primitives; namespace OpenRA.Support diff --git a/OpenRA.Game/Support/PerfItem.cs b/OpenRA.Game/Support/PerfItem.cs index 89681d6fbd..cb3655fe87 100644 --- a/OpenRA.Game/Support/PerfItem.cs +++ b/OpenRA.Game/Support/PerfItem.cs @@ -10,7 +10,7 @@ #endregion using System.Collections.Generic; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Support { diff --git a/OpenRA.Game/Traits/Interactable.cs b/OpenRA.Game/Traits/Interactable.cs index a52be60f49..579d637ed8 100644 --- a/OpenRA.Game/Traits/Interactable.cs +++ b/OpenRA.Game/Traits/Interactable.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Traits { diff --git a/OpenRA.Game/Traits/Player/FrozenActorLayer.cs b/OpenRA.Game/Traits/Player/FrozenActorLayer.cs index bf7b81e1d9..67e9fdb5f7 100644 --- a/OpenRA.Game/Traits/Player/FrozenActorLayer.cs +++ b/OpenRA.Game/Traits/Player/FrozenActorLayer.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Game/Traits/Player/IndexedPlayerPalette.cs b/OpenRA.Game/Traits/Player/IndexedPlayerPalette.cs index 0da578c0f5..0147879001 100644 --- a/OpenRA.Game/Traits/Player/IndexedPlayerPalette.cs +++ b/OpenRA.Game/Traits/Player/IndexedPlayerPalette.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.IO; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Traits { diff --git a/OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs b/OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs index 161d8eeaaa..3207245195 100644 --- a/OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs +++ b/OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Traits { diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index df7b56abad..71e92affaf 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Drawing; using OpenRA.FileSystem; using OpenRA.Graphics; using OpenRA.Network; diff --git a/OpenRA.Game/Traits/World/ScreenMap.cs b/OpenRA.Game/Traits/World/ScreenMap.cs index 2f7b71c28e..9cc3672fb8 100644 --- a/OpenRA.Game/Traits/World/ScreenMap.cs +++ b/OpenRA.Game/Traits/World/ScreenMap.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Effects; using OpenRA.Graphics; diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index 6ac032718b..5c5d489616 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Support; namespace OpenRA.Widgets diff --git a/OpenRA.Game/Widgets/WidgetUtils.cs b/OpenRA.Game/Widgets/WidgetUtils.cs index 506b3f8dd6..3bce392538 100644 --- a/OpenRA.Game/Widgets/WidgetUtils.cs +++ b/OpenRA.Game/Widgets/WidgetUtils.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Widgets { diff --git a/OpenRA.Mods.Cnc/Activities/Infiltrate.cs b/OpenRA.Mods.Cnc/Activities/Infiltrate.cs index 08dbde6161..a5d478d64b 100644 --- a/OpenRA.Mods.Cnc/Activities/Infiltrate.cs +++ b/OpenRA.Mods.Cnc/Activities/Infiltrate.cs @@ -9,12 +9,11 @@ */ #endregion -using System; -using System.Drawing; using System.Linq; using OpenRA.Mods.Cnc.Traits; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Activities diff --git a/OpenRA.Mods.Cnc/Activities/LeapAttack.cs b/OpenRA.Mods.Cnc/Activities/LeapAttack.cs index 7c26581289..e1c94edcb3 100644 --- a/OpenRA.Mods.Cnc/Activities/LeapAttack.cs +++ b/OpenRA.Mods.Cnc/Activities/LeapAttack.cs @@ -9,14 +9,13 @@ */ #endregion -using System; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Cnc.Traits; using OpenRA.Mods.Common; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Activities diff --git a/OpenRA.Mods.Cnc/CncLoadScreen.cs b/OpenRA.Mods.Cnc/CncLoadScreen.cs index 68d7db7802..9b2eae7b35 100644 --- a/OpenRA.Mods.Cnc/CncLoadScreen.cs +++ b/OpenRA.Mods.Cnc/CncLoadScreen.cs @@ -11,9 +11,9 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.LoadScreens; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Cnc diff --git a/OpenRA.Mods.Cnc/Graphics/TeslaZapRenderable.cs b/OpenRA.Mods.Cnc/Graphics/TeslaZapRenderable.cs index 04e760d6c6..2d4ec1e382 100644 --- a/OpenRA.Mods.Cnc/Graphics/TeslaZapRenderable.cs +++ b/OpenRA.Mods.Cnc/Graphics/TeslaZapRenderable.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Cnc.Graphics { diff --git a/OpenRA.Mods.Cnc/Graphics/Voxel.cs b/OpenRA.Mods.Cnc/Graphics/Voxel.cs index c24a7d9814..c1b374a0ba 100644 --- a/OpenRA.Mods.Cnc/Graphics/Voxel.cs +++ b/OpenRA.Mods.Cnc/Graphics/Voxel.cs @@ -10,10 +10,10 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Cnc.FileFormats; +using OpenRA.Primitives; namespace OpenRA.Mods.Cnc.Graphics { diff --git a/OpenRA.Mods.Cnc/Graphics/VoxelLoader.cs b/OpenRA.Mods.Cnc/Graphics/VoxelLoader.cs index f1192e5e79..339b27a416 100644 --- a/OpenRA.Mods.Cnc/Graphics/VoxelLoader.cs +++ b/OpenRA.Mods.Cnc/Graphics/VoxelLoader.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.FileSystem; using OpenRA.Graphics; diff --git a/OpenRA.Mods.Cnc/SpriteLoaders/TmpTSLoader.cs b/OpenRA.Mods.Cnc/SpriteLoaders/TmpTSLoader.cs index d21a368ae2..45fc62fadd 100644 --- a/OpenRA.Mods.Cnc/SpriteLoaders/TmpTSLoader.cs +++ b/OpenRA.Mods.Cnc/SpriteLoaders/TmpTSLoader.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using System.IO; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs b/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs index 1ccacdd78b..1dca9978ac 100644 --- a/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs +++ b/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using OpenRA.Mods.Cnc.Activities; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Traits; diff --git a/OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs b/OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs index bedc926763..fd6c92335e 100644 --- a/OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs +++ b/OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common; using OpenRA.Mods.Common.Traits; diff --git a/OpenRA.Mods.Cnc/Traits/Disguise.cs b/OpenRA.Mods.Cnc/Traits/Disguise.cs index 7841306a1f..e84de6ffcb 100644 --- a/OpenRA.Mods.Cnc/Traits/Disguise.cs +++ b/OpenRA.Mods.Cnc/Traits/Disguise.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Orders; using OpenRA.Mods.Common.Traits; diff --git a/OpenRA.Mods.Cnc/Traits/Infiltration/Infiltrates.cs b/OpenRA.Mods.Cnc/Traits/Infiltration/Infiltrates.cs index 6339ef04ba..9245e6fafc 100644 --- a/OpenRA.Mods.Cnc/Traits/Infiltration/Infiltrates.cs +++ b/OpenRA.Mods.Cnc/Traits/Infiltration/Infiltrates.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Mods.Cnc.Activities; using OpenRA.Mods.Common; using OpenRA.Mods.Common.Activities; diff --git a/OpenRA.Mods.Cnc/Traits/MadTank.cs b/OpenRA.Mods.Cnc/Traits/MadTank.cs index 493fe776fe..11949d0b03 100644 --- a/OpenRA.Mods.Cnc/Traits/MadTank.cs +++ b/OpenRA.Mods.Cnc/Traits/MadTank.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.GameRules; diff --git a/OpenRA.Mods.Cnc/Traits/Minelayer.cs b/OpenRA.Mods.Cnc/Traits/Minelayer.cs index eb49274eb3..3339aa3cf4 100644 --- a/OpenRA.Mods.Cnc/Traits/Minelayer.cs +++ b/OpenRA.Mods.Cnc/Traits/Minelayer.cs @@ -11,12 +11,12 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Cnc.Activities; using OpenRA.Mods.Common.Orders; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits diff --git a/OpenRA.Mods.Cnc/Traits/PaletteEffects/ChronoshiftPaletteEffect.cs b/OpenRA.Mods.Cnc/Traits/PaletteEffects/ChronoshiftPaletteEffect.cs index 15a98f607d..c5d8c651d9 100644 --- a/OpenRA.Mods.Cnc/Traits/PaletteEffects/ChronoshiftPaletteEffect.cs +++ b/OpenRA.Mods.Cnc/Traits/PaletteEffects/ChronoshiftPaletteEffect.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits diff --git a/OpenRA.Mods.Cnc/Traits/PortableChrono.cs b/OpenRA.Mods.Cnc/Traits/PortableChrono.cs index 7c66da6071..fb8b6263b0 100644 --- a/OpenRA.Mods.Cnc/Traits/PortableChrono.cs +++ b/OpenRA.Mods.Cnc/Traits/PortableChrono.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Cnc.Activities; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits diff --git a/OpenRA.Mods.Cnc/Traits/Render/RenderJammerCircle.cs b/OpenRA.Mods.Cnc/Traits/Render/RenderJammerCircle.cs index 1c7038b573..dc8a81ddfd 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/RenderJammerCircle.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/RenderJammerCircle.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits diff --git a/OpenRA.Mods.Cnc/Traits/Render/RenderShroudCircle.cs b/OpenRA.Mods.Cnc/Traits/Render/RenderShroudCircle.cs index 5de7f5ab83..f5eaf9b653 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/RenderShroudCircle.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/RenderShroudCircle.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithCargo.cs b/OpenRA.Mods.Cnc/Traits/Render/WithCargo.cs index dd6117db2f..bbd3a2a57b 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/WithCargo.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/WithCargo.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common; diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithVoxelUnloadBody.cs b/OpenRA.Mods.Cnc/Traits/Render/WithVoxelUnloadBody.cs index 90590c4f70..78ba9d3df2 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/WithVoxelUnloadBody.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/WithVoxelUnloadBody.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits.Render; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits.Render diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithVoxelWalkerBody.cs b/OpenRA.Mods.Cnc/Traits/Render/WithVoxelWalkerBody.cs index 84db90fda5..4301f98bd2 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/WithVoxelWalkerBody.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/WithVoxelWalkerBody.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; diff --git a/OpenRA.Mods.Cnc/Traits/SupportPowers/AttackOrderPower.cs b/OpenRA.Mods.Cnc/Traits/SupportPowers/AttackOrderPower.cs index 999673b97c..12e5a759f1 100644 --- a/OpenRA.Mods.Cnc/Traits/SupportPowers/AttackOrderPower.cs +++ b/OpenRA.Mods.Cnc/Traits/SupportPowers/AttackOrderPower.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits diff --git a/OpenRA.Mods.Cnc/Traits/SupportPowers/ChronoshiftPower.cs b/OpenRA.Mods.Cnc/Traits/SupportPowers/ChronoshiftPower.cs index f285e08fd6..68b5825856 100644 --- a/OpenRA.Mods.Cnc/Traits/SupportPowers/ChronoshiftPower.cs +++ b/OpenRA.Mods.Cnc/Traits/SupportPowers/ChronoshiftPower.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits diff --git a/OpenRA.Mods.Cnc/Traits/TDGunboat.cs b/OpenRA.Mods.Cnc/Traits/TDGunboat.cs index f55dbb46c8..d346684a1a 100644 --- a/OpenRA.Mods.Cnc/Traits/TDGunboat.cs +++ b/OpenRA.Mods.Cnc/Traits/TDGunboat.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common; diff --git a/OpenRA.Mods.Cnc/UtilityCommands/ImportTSMapCommand.cs b/OpenRA.Mods.Cnc/UtilityCommands/ImportTSMapCommand.cs index 897cda5abe..19e26cf585 100644 --- a/OpenRA.Mods.Cnc/UtilityCommands/ImportTSMapCommand.cs +++ b/OpenRA.Mods.Cnc/UtilityCommands/ImportTSMapCommand.cs @@ -11,13 +11,13 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileSystem; using OpenRA.Mods.Common; using OpenRA.Mods.Common.FileFormats; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Cnc.UtilityCommands diff --git a/OpenRA.Mods.Common/Activities/Air/Fly.cs b/OpenRA.Mods.Common/Activities/Air/Fly.cs index 16102b0e59..6301cf8362 100644 --- a/OpenRA.Mods.Common/Activities/Air/Fly.cs +++ b/OpenRA.Mods.Common/Activities/Air/Fly.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Air/FlyAttack.cs b/OpenRA.Mods.Common/Activities/Air/FlyAttack.cs index 4be9c03752..a0a412e3b0 100644 --- a/OpenRA.Mods.Common/Activities/Air/FlyAttack.cs +++ b/OpenRA.Mods.Common/Activities/Air/FlyAttack.cs @@ -9,10 +9,10 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Air/FlyFollow.cs b/OpenRA.Mods.Common/Activities/Air/FlyFollow.cs index bdc4b61728..6b0c0972da 100644 --- a/OpenRA.Mods.Common/Activities/Air/FlyFollow.cs +++ b/OpenRA.Mods.Common/Activities/Air/FlyFollow.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Air/HeliAttack.cs b/OpenRA.Mods.Common/Activities/Air/HeliAttack.cs index d5a8e288b6..f81930fdec 100644 --- a/OpenRA.Mods.Common/Activities/Air/HeliAttack.cs +++ b/OpenRA.Mods.Common/Activities/Air/HeliAttack.cs @@ -9,10 +9,10 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Air/HeliFly.cs b/OpenRA.Mods.Common/Activities/Air/HeliFly.cs index ef69fef888..f05355b629 100644 --- a/OpenRA.Mods.Common/Activities/Air/HeliFly.cs +++ b/OpenRA.Mods.Common/Activities/Air/HeliFly.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Air/HeliReturnToBase.cs b/OpenRA.Mods.Common/Activities/Air/HeliReturnToBase.cs index 2293ea02f5..5bfde505f7 100644 --- a/OpenRA.Mods.Common/Activities/Air/HeliReturnToBase.cs +++ b/OpenRA.Mods.Common/Activities/Air/HeliReturnToBase.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Air/ReturnToBase.cs b/OpenRA.Mods.Common/Activities/Air/ReturnToBase.cs index 200d61dec0..22dab5f870 100644 --- a/OpenRA.Mods.Common/Activities/Air/ReturnToBase.cs +++ b/OpenRA.Mods.Common/Activities/Air/ReturnToBase.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Attack.cs b/OpenRA.Mods.Common/Activities/Attack.cs index 782b284d02..6900ffaddf 100644 --- a/OpenRA.Mods.Common/Activities/Attack.cs +++ b/OpenRA.Mods.Common/Activities/Attack.cs @@ -10,10 +10,10 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/CaptureActor.cs b/OpenRA.Mods.Common/Activities/CaptureActor.cs index 69347e4dd6..03d9bb654d 100644 --- a/OpenRA.Mods.Common/Activities/CaptureActor.cs +++ b/OpenRA.Mods.Common/Activities/CaptureActor.cs @@ -9,9 +9,8 @@ */ #endregion -using System.Drawing; -using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/DeliverResources.cs b/OpenRA.Mods.Common/Activities/DeliverResources.cs index 33138cc745..4ceac383a4 100644 --- a/OpenRA.Mods.Common/Activities/DeliverResources.cs +++ b/OpenRA.Mods.Common/Activities/DeliverResources.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Demolish.cs b/OpenRA.Mods.Common/Activities/Demolish.cs index 66fb4c8822..36e3342e39 100644 --- a/OpenRA.Mods.Common/Activities/Demolish.cs +++ b/OpenRA.Mods.Common/Activities/Demolish.cs @@ -9,11 +9,10 @@ */ #endregion -using System; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/DonateCash.cs b/OpenRA.Mods.Common/Activities/DonateCash.cs index f7a4cfce7f..313dcc1415 100644 --- a/OpenRA.Mods.Common/Activities/DonateCash.cs +++ b/OpenRA.Mods.Common/Activities/DonateCash.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/DonateExperience.cs b/OpenRA.Mods.Common/Activities/DonateExperience.cs index 8106ab7949..5a70e08f89 100644 --- a/OpenRA.Mods.Common/Activities/DonateExperience.cs +++ b/OpenRA.Mods.Common/Activities/DonateExperience.cs @@ -9,10 +9,8 @@ */ #endregion -using System.Drawing; -using OpenRA.Activities; -using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Enter.cs b/OpenRA.Mods.Common/Activities/Enter.cs index 89bd303aa6..3040da5a8a 100644 --- a/OpenRA.Mods.Common/Activities/Enter.cs +++ b/OpenRA.Mods.Common/Activities/Enter.cs @@ -9,11 +9,9 @@ */ #endregion -using System; -using System.Drawing; -using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/EnterTransport.cs b/OpenRA.Mods.Common/Activities/EnterTransport.cs index d22d8569d0..7499f06961 100644 --- a/OpenRA.Mods.Common/Activities/EnterTransport.cs +++ b/OpenRA.Mods.Common/Activities/EnterTransport.cs @@ -10,10 +10,10 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/FindResources.cs b/OpenRA.Mods.Common/Activities/FindResources.cs index 91a3c1f1b8..1c9c024441 100644 --- a/OpenRA.Mods.Common/Activities/FindResources.cs +++ b/OpenRA.Mods.Common/Activities/FindResources.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Activities; using OpenRA.Mods.Common.Pathfinder; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Move/Follow.cs b/OpenRA.Mods.Common/Activities/Move/Follow.cs index ff333879a8..85132b8e82 100644 --- a/OpenRA.Mods.Common/Activities/Move/Follow.cs +++ b/OpenRA.Mods.Common/Activities/Move/Follow.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Move/MoveAdjacentTo.cs b/OpenRA.Mods.Common/Activities/Move/MoveAdjacentTo.cs index 572c3fef80..0c7596d7fb 100644 --- a/OpenRA.Mods.Common/Activities/Move/MoveAdjacentTo.cs +++ b/OpenRA.Mods.Common/Activities/Move/MoveAdjacentTo.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Pathfinder; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/Move/MoveWithinRange.cs b/OpenRA.Mods.Common/Activities/Move/MoveWithinRange.cs index 40d490fd82..ff5eaa1446 100644 --- a/OpenRA.Mods.Common/Activities/Move/MoveWithinRange.cs +++ b/OpenRA.Mods.Common/Activities/Move/MoveWithinRange.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/PickupUnit.cs b/OpenRA.Mods.Common/Activities/PickupUnit.cs index f807afcb4f..b0a80f6eff 100644 --- a/OpenRA.Mods.Common/Activities/PickupUnit.cs +++ b/OpenRA.Mods.Common/Activities/PickupUnit.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/RepairBridge.cs b/OpenRA.Mods.Common/Activities/RepairBridge.cs index d5584c9bab..28717c688e 100644 --- a/OpenRA.Mods.Common/Activities/RepairBridge.cs +++ b/OpenRA.Mods.Common/Activities/RepairBridge.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/RepairBuilding.cs b/OpenRA.Mods.Common/Activities/RepairBuilding.cs index f6c3ad06d6..0e25cd95d2 100644 --- a/OpenRA.Mods.Common/Activities/RepairBuilding.cs +++ b/OpenRA.Mods.Common/Activities/RepairBuilding.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities diff --git a/OpenRA.Mods.Common/Activities/UnloadCargo.cs b/OpenRA.Mods.Common/Activities/UnloadCargo.cs index 186dc1a324..0489746fa6 100644 --- a/OpenRA.Mods.Common/Activities/UnloadCargo.cs +++ b/OpenRA.Mods.Common/Activities/UnloadCargo.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; diff --git a/OpenRA.Mods.Common/ActorExts.cs b/OpenRA.Mods.Common/ActorExts.cs index 885db05f0c..2fcb1a6d10 100644 --- a/OpenRA.Mods.Common/ActorExts.cs +++ b/OpenRA.Mods.Common/ActorExts.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common diff --git a/OpenRA.Mods.Common/ColorValidator.cs b/OpenRA.Mods.Common/ColorValidator.cs index b3049a8a84..0dc391a438 100644 --- a/OpenRA.Mods.Common/ColorValidator.cs +++ b/OpenRA.Mods.Common/ColorValidator.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Support; namespace OpenRA.Mods.Common diff --git a/OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs b/OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs index 3a01519524..5c52412f37 100644 --- a/OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs +++ b/OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Widgets { diff --git a/OpenRA.Mods.Common/Effects/FloatingText.cs b/OpenRA.Mods.Common/Effects/FloatingText.cs index b6ad42e047..f035319a3c 100644 --- a/OpenRA.Mods.Common/Effects/FloatingText.cs +++ b/OpenRA.Mods.Common/Effects/FloatingText.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Effects; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Effects { diff --git a/OpenRA.Mods.Common/Effects/MapNotificationEffect.cs b/OpenRA.Mods.Common/Effects/MapNotificationEffect.cs index f11016ea13..e48f866bf4 100644 --- a/OpenRA.Mods.Common/Effects/MapNotificationEffect.cs +++ b/OpenRA.Mods.Common/Effects/MapNotificationEffect.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Effects; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Effects { diff --git a/OpenRA.Mods.Common/Graphics/ActorPreview.cs b/OpenRA.Mods.Common/Graphics/ActorPreview.cs index c21ef74fa1..cf5c15dadd 100644 --- a/OpenRA.Mods.Common/Graphics/ActorPreview.cs +++ b/OpenRA.Mods.Common/Graphics/ActorPreview.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/Graphics/BeamRenderable.cs b/OpenRA.Mods.Common/Graphics/BeamRenderable.cs index 1154f9c76e..2ec74af222 100644 --- a/OpenRA.Mods.Common/Graphics/BeamRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/BeamRenderable.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/ContrailRenderable.cs b/OpenRA.Mods.Common/Graphics/ContrailRenderable.cs index dc62d0d1ed..edad44ef5e 100644 --- a/OpenRA.Mods.Common/Graphics/ContrailRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/ContrailRenderable.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs b/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs index ee764d556d..8a84f87a66 100644 --- a/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs +++ b/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/DetectionCircleRenderable.cs b/OpenRA.Mods.Common/Graphics/DetectionCircleRenderable.cs index 491c554d3c..4b985008ef 100644 --- a/OpenRA.Mods.Common/Graphics/DetectionCircleRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/DetectionCircleRenderable.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/ModelActorPreview.cs b/OpenRA.Mods.Common/Graphics/ModelActorPreview.cs index 91636baf4a..21f0075343 100644 --- a/OpenRA.Mods.Common/Graphics/ModelActorPreview.cs +++ b/OpenRA.Mods.Common/Graphics/ModelActorPreview.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/ModelRenderable.cs b/OpenRA.Mods.Common/Graphics/ModelRenderable.cs index 0621d80e5b..b5ab29d956 100644 --- a/OpenRA.Mods.Common/Graphics/ModelRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/ModelRenderable.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/Graphics/RailgunRenderable.cs b/OpenRA.Mods.Common/Graphics/RailgunRenderable.cs index cdb8ce8574..feb46c1ff2 100644 --- a/OpenRA.Mods.Common/Graphics/RailgunRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/RailgunRenderable.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Projectiles; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/RangeCircleRenderable.cs b/OpenRA.Mods.Common/Graphics/RangeCircleRenderable.cs index 58860b2883..ff7e1483b8 100644 --- a/OpenRA.Mods.Common/Graphics/RangeCircleRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/RangeCircleRenderable.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/SelectionBarsRenderable.cs b/OpenRA.Mods.Common/Graphics/SelectionBarsRenderable.cs index e75be651a7..11ea044d77 100644 --- a/OpenRA.Mods.Common/Graphics/SelectionBarsRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/SelectionBarsRenderable.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Graphics diff --git a/OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs b/OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs index b8045f3a20..096d8a0cd9 100644 --- a/OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/SpriteActorPreview.cs b/OpenRA.Mods.Common/Graphics/SpriteActorPreview.cs index 41a0ca7f85..4fa6af9f1a 100644 --- a/OpenRA.Mods.Common/Graphics/SpriteActorPreview.cs +++ b/OpenRA.Mods.Common/Graphics/SpriteActorPreview.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Graphics { diff --git a/OpenRA.Mods.Common/Graphics/TextRenderable.cs b/OpenRA.Mods.Common/Graphics/TextRenderable.cs index f1d008e512..d816877c31 100644 --- a/OpenRA.Mods.Common/Graphics/TextRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/TextRenderable.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Graphics diff --git a/OpenRA.Mods.Common/HitShapes/Capsule.cs b/OpenRA.Mods.Common/HitShapes/Capsule.cs index 12a190961b..54b8700328 100644 --- a/OpenRA.Mods.Common/HitShapes/Capsule.cs +++ b/OpenRA.Mods.Common/HitShapes/Capsule.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.HitShapes { diff --git a/OpenRA.Mods.Common/HitShapes/Circle.cs b/OpenRA.Mods.Common/HitShapes/Circle.cs index 0efa4c649f..adb8519f7a 100644 --- a/OpenRA.Mods.Common/HitShapes/Circle.cs +++ b/OpenRA.Mods.Common/HitShapes/Circle.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.HitShapes { diff --git a/OpenRA.Mods.Common/HitShapes/Polygon.cs b/OpenRA.Mods.Common/HitShapes/Polygon.cs index 5e241d2f84..68c7a8f32f 100644 --- a/OpenRA.Mods.Common/HitShapes/Polygon.cs +++ b/OpenRA.Mods.Common/HitShapes/Polygon.cs @@ -10,10 +10,10 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.HitShapes { diff --git a/OpenRA.Mods.Common/HitShapes/Rectangle.cs b/OpenRA.Mods.Common/HitShapes/Rectangle.cs index 7f6a642ebd..246ccb1187 100644 --- a/OpenRA.Mods.Common/HitShapes/Rectangle.cs +++ b/OpenRA.Mods.Common/HitShapes/Rectangle.cs @@ -10,10 +10,10 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.HitShapes { diff --git a/OpenRA.Mods.Common/LoadScreens/LogoStripeLoadScreen.cs b/OpenRA.Mods.Common/LoadScreens/LogoStripeLoadScreen.cs index 562cc6f14d..421457b80d 100644 --- a/OpenRA.Mods.Common/LoadScreens/LogoStripeLoadScreen.cs +++ b/OpenRA.Mods.Common/LoadScreens/LogoStripeLoadScreen.cs @@ -11,8 +11,8 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.LoadScreens diff --git a/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs b/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs index eebbf5e39a..d2aef9de15 100644 --- a/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs +++ b/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.LoadScreens diff --git a/OpenRA.Mods.Common/Pathfinder/CellInfoLayerPool.cs b/OpenRA.Mods.Common/Pathfinder/CellInfoLayerPool.cs index 70d6258a8e..7e4c7cfd58 100644 --- a/OpenRA.Mods.Common/Pathfinder/CellInfoLayerPool.cs +++ b/OpenRA.Mods.Common/Pathfinder/CellInfoLayerPool.cs @@ -11,7 +11,7 @@ using System; using System.Collections.Generic; -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Pathfinder { diff --git a/OpenRA.Mods.Common/Projectiles/AreaBeam.cs b/OpenRA.Mods.Common/Projectiles/AreaBeam.cs index 2ce3d867b5..325a33d378 100644 --- a/OpenRA.Mods.Common/Projectiles/AreaBeam.cs +++ b/OpenRA.Mods.Common/Projectiles/AreaBeam.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Projectiles diff --git a/OpenRA.Mods.Common/Projectiles/Bullet.cs b/OpenRA.Mods.Common/Projectiles/Bullet.cs index 01cf6e05ad..9ca8e55dc8 100644 --- a/OpenRA.Mods.Common/Projectiles/Bullet.cs +++ b/OpenRA.Mods.Common/Projectiles/Bullet.cs @@ -11,13 +11,13 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Projectiles diff --git a/OpenRA.Mods.Common/Projectiles/LaserZap.cs b/OpenRA.Mods.Common/Projectiles/LaserZap.cs index 1c83877f7a..dc469f8b70 100644 --- a/OpenRA.Mods.Common/Projectiles/LaserZap.cs +++ b/OpenRA.Mods.Common/Projectiles/LaserZap.cs @@ -10,12 +10,12 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Projectiles diff --git a/OpenRA.Mods.Common/Projectiles/Missile.cs b/OpenRA.Mods.Common/Projectiles/Missile.cs index 6ed7e96c8b..22f7f54aa3 100644 --- a/OpenRA.Mods.Common/Projectiles/Missile.cs +++ b/OpenRA.Mods.Common/Projectiles/Missile.cs @@ -10,13 +10,13 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Projectiles diff --git a/OpenRA.Mods.Common/Projectiles/Railgun.cs b/OpenRA.Mods.Common/Projectiles/Railgun.cs index e609435c47..e3e24223ae 100644 --- a/OpenRA.Mods.Common/Projectiles/Railgun.cs +++ b/OpenRA.Mods.Common/Projectiles/Railgun.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Projectiles diff --git a/OpenRA.Mods.Common/Scripting/Global/HSLColorGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/HSLColorGlobal.cs index 9ccb3cab1a..f7f26401cd 100644 --- a/OpenRA.Mods.Common/Scripting/Global/HSLColorGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/HSLColorGlobal.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using Eluant; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Scripting; namespace OpenRA.Mods.Common.Scripting.Global diff --git a/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs index afcba9d148..46a24a4527 100644 --- a/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs @@ -10,7 +10,6 @@ #endregion using System; -using System.Drawing; using System.IO; using Eluant; using OpenRA.Effects; @@ -19,6 +18,7 @@ using OpenRA.Graphics; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.FileFormats; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Scripting; namespace OpenRA.Mods.Common.Scripting diff --git a/OpenRA.Mods.Common/Scripting/Global/UserInterfaceGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/UserInterfaceGlobal.cs index 0a0ecc54b2..f5e19aa565 100644 --- a/OpenRA.Mods.Common/Scripting/Global/UserInterfaceGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/UserInterfaceGlobal.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Widgets; +using OpenRA.Primitives; using OpenRA.Scripting; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Common/Scripting/Properties/DeliveryProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/DeliveryProperties.cs index 20b4e4a9e2..827c2e2b4b 100644 --- a/OpenRA.Mods.Common/Scripting/Properties/DeliveryProperties.cs +++ b/OpenRA.Mods.Common/Scripting/Properties/DeliveryProperties.cs @@ -9,10 +9,10 @@ */ #endregion -using System.Drawing; using Eluant; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/SpriteLoaders/PngSheetLoader.cs b/OpenRA.Mods.Common/SpriteLoaders/PngSheetLoader.cs index 050bdbf7e5..4a35cc4381 100644 --- a/OpenRA.Mods.Common/SpriteLoaders/PngSheetLoader.cs +++ b/OpenRA.Mods.Common/SpriteLoaders/PngSheetLoader.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileFormats; diff --git a/OpenRA.Mods.Common/SpriteLoaders/ShpD2Loader.cs b/OpenRA.Mods.Common/SpriteLoaders/ShpD2Loader.cs index 7016311d50..01f4e7c82d 100644 --- a/OpenRA.Mods.Common/SpriteLoaders/ShpD2Loader.cs +++ b/OpenRA.Mods.Common/SpriteLoaders/ShpD2Loader.cs @@ -10,7 +10,6 @@ #endregion using System; -using System.Drawing; using System.IO; using OpenRA.Graphics; using OpenRA.Mods.Common.FileFormats; diff --git a/OpenRA.Mods.Common/SpriteLoaders/ShpTDLoader.cs b/OpenRA.Mods.Common/SpriteLoaders/ShpTDLoader.cs index 83f477c426..0372944cf6 100644 --- a/OpenRA.Mods.Common/SpriteLoaders/ShpTDLoader.cs +++ b/OpenRA.Mods.Common/SpriteLoaders/ShpTDLoader.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.Graphics; diff --git a/OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs b/OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs index 85d767aa17..e440a6ee84 100644 --- a/OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs +++ b/OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using System.IO; using OpenRA.Graphics; using OpenRA.Mods.Common.FileFormats; diff --git a/OpenRA.Mods.Common/SpriteLoaders/TmpRALoader.cs b/OpenRA.Mods.Common/SpriteLoaders/TmpRALoader.cs index 537f86be84..8492ad06fa 100644 --- a/OpenRA.Mods.Common/SpriteLoaders/TmpRALoader.cs +++ b/OpenRA.Mods.Common/SpriteLoaders/TmpRALoader.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using System.IO; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/SpriteLoaders/TmpTDLoader.cs b/OpenRA.Mods.Common/SpriteLoaders/TmpTDLoader.cs index c378b16bce..6f75e000f1 100644 --- a/OpenRA.Mods.Common/SpriteLoaders/TmpTDLoader.cs +++ b/OpenRA.Mods.Common/SpriteLoaders/TmpTDLoader.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using System.IO; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 68d38b2195..167075048b 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Activities; diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index 06aecddcab..0845e6be4b 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Warheads; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs b/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs index 63558b2686..cb6a4ad0b9 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Activities; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs b/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs index e8b7b08d44..f286ce4e3f 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs @@ -11,10 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits.Render; +using OpenRA.Primitives; + using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/AttackMove.cs b/OpenRA.Mods.Common/Traits/AttackMove.cs index d0dd8c0580..0a5b676e43 100644 --- a/OpenRA.Mods.Common/Traits/AttackMove.cs +++ b/OpenRA.Mods.Common/Traits/AttackMove.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Activities; using OpenRA.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/AutoTarget.cs b/OpenRA.Mods.Common/Traits/AutoTarget.cs index 16190d62ed..b41436ada5 100644 --- a/OpenRA.Mods.Common/Traits/AutoTarget.cs +++ b/OpenRA.Mods.Common/Traits/AutoTarget.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/Traits/Buildings/BaseProvider.cs b/OpenRA.Mods.Common/Traits/Buildings/BaseProvider.cs index ca6fd8ae56..cbceaa485b 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/BaseProvider.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/BaseProvider.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Buildings/Bridge.cs b/OpenRA.Mods.Common/Traits/Buildings/Bridge.cs index 3be7a8f4a6..1858278da6 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/Bridge.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Bridge.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Effects; using OpenRA.GameRules; diff --git a/OpenRA.Mods.Common/Traits/CapturableProgressBar.cs b/OpenRA.Mods.Common/Traits/CapturableProgressBar.cs index 8d6d18508f..926ff99e51 100644 --- a/OpenRA.Mods.Common/Traits/CapturableProgressBar.cs +++ b/OpenRA.Mods.Common/Traits/CapturableProgressBar.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/CaptureProgressBar.cs b/OpenRA.Mods.Common/Traits/CaptureProgressBar.cs index b86fb2d43c..b18bdd7aad 100644 --- a/OpenRA.Mods.Common/Traits/CaptureProgressBar.cs +++ b/OpenRA.Mods.Common/Traits/CaptureProgressBar.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/Traits/Captures.cs b/OpenRA.Mods.Common/Traits/Captures.cs index aedb8e0a5b..714c156902 100644 --- a/OpenRA.Mods.Common/Traits/Captures.cs +++ b/OpenRA.Mods.Common/Traits/Captures.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/Traits/Carryall.cs b/OpenRA.Mods.Common/Traits/Carryall.cs index f668865c16..10d165f310 100644 --- a/OpenRA.Mods.Common/Traits/Carryall.cs +++ b/OpenRA.Mods.Common/Traits/Carryall.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Activities; diff --git a/OpenRA.Mods.Common/Traits/Cloak.cs b/OpenRA.Mods.Common/Traits/Cloak.cs index 77dd94b6f7..6b8e8d1436 100644 --- a/OpenRA.Mods.Common/Traits/Cloak.cs +++ b/OpenRA.Mods.Common/Traits/Cloak.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Graphics; diff --git a/OpenRA.Mods.Common/Traits/CombatDebugOverlay.cs b/OpenRA.Mods.Common/Traits/CombatDebugOverlay.cs index c91d65e921..2efb128b11 100644 --- a/OpenRA.Mods.Common/Traits/CombatDebugOverlay.cs +++ b/OpenRA.Mods.Common/Traits/CombatDebugOverlay.cs @@ -10,10 +10,10 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Effects; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnProduction.cs b/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnProduction.cs index 6fdf4b2f6b..0211fed283 100644 --- a/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnProduction.cs +++ b/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnProduction.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Contrail.cs b/OpenRA.Mods.Common/Traits/Contrail.cs index a61a5332c6..446ae7dc96 100644 --- a/OpenRA.Mods.Common/Traits/Contrail.cs +++ b/OpenRA.Mods.Common/Traits/Contrail.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/DeliversCash.cs b/OpenRA.Mods.Common/Traits/DeliversCash.cs index 45aadb5777..af45eb7008 100644 --- a/OpenRA.Mods.Common/Traits/DeliversCash.cs +++ b/OpenRA.Mods.Common/Traits/DeliversCash.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/DeliversExperience.cs b/OpenRA.Mods.Common/Traits/DeliversExperience.cs index ff8153f66c..32183b0236 100644 --- a/OpenRA.Mods.Common/Traits/DeliversExperience.cs +++ b/OpenRA.Mods.Common/Traits/DeliversExperience.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Demolition.cs b/OpenRA.Mods.Common/Traits/Demolition.cs index dc1f0804f1..1581c0705c 100644 --- a/OpenRA.Mods.Common/Traits/Demolition.cs +++ b/OpenRA.Mods.Common/Traits/Demolition.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/EngineerRepair.cs b/OpenRA.Mods.Common/Traits/EngineerRepair.cs index 9f8e317393..4c406208a7 100644 --- a/OpenRA.Mods.Common/Traits/EngineerRepair.cs +++ b/OpenRA.Mods.Common/Traits/EngineerRepair.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/EntersTunnels.cs b/OpenRA.Mods.Common/Traits/EntersTunnels.cs index c07ad75b6f..d625a999ea 100644 --- a/OpenRA.Mods.Common/Traits/EntersTunnels.cs +++ b/OpenRA.Mods.Common/Traits/EntersTunnels.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/ExitsDebugOverlay.cs b/OpenRA.Mods.Common/Traits/ExitsDebugOverlay.cs index 84e5f849f4..9e04e80957 100644 --- a/OpenRA.Mods.Common/Traits/ExitsDebugOverlay.cs +++ b/OpenRA.Mods.Common/Traits/ExitsDebugOverlay.cs @@ -9,10 +9,10 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Guard.cs b/OpenRA.Mods.Common/Traits/Guard.cs index d132d727c4..54160ec5c9 100644 --- a/OpenRA.Mods.Common/Traits/Guard.cs +++ b/OpenRA.Mods.Common/Traits/Guard.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Mods.Common.Activities; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Harvester.cs b/OpenRA.Mods.Common/Traits/Harvester.cs index edeff8f50d..51c21d252e 100644 --- a/OpenRA.Mods.Common/Traits/Harvester.cs +++ b/OpenRA.Mods.Common/Traits/Harvester.cs @@ -10,12 +10,12 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; using OpenRA.Mods.Common.Pathfinder; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 0c664c894f..150f198739 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Activities; diff --git a/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs index ac7b5035bb..4375b3e463 100644 --- a/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs +++ b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs b/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs index 34576d2357..e056a64530 100644 --- a/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs +++ b/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Modifiers/WithColoredOverlay.cs b/OpenRA.Mods.Common/Traits/Modifiers/WithColoredOverlay.cs index e9f00069c7..c14891da0c 100644 --- a/OpenRA.Mods.Common/Traits/Modifiers/WithColoredOverlay.cs +++ b/OpenRA.Mods.Common/Traits/Modifiers/WithColoredOverlay.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/PaletteEffects/CloakPaletteEffect.cs b/OpenRA.Mods.Common/Traits/PaletteEffects/CloakPaletteEffect.cs index 9ba045574a..da64c51bdf 100644 --- a/OpenRA.Mods.Common/Traits/PaletteEffects/CloakPaletteEffect.cs +++ b/OpenRA.Mods.Common/Traits/PaletteEffects/CloakPaletteEffect.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/PaletteEffects/FlashPaletteEffect.cs b/OpenRA.Mods.Common/Traits/PaletteEffects/FlashPaletteEffect.cs index 28536b2ee8..2b51ceb4fe 100644 --- a/OpenRA.Mods.Common/Traits/PaletteEffects/FlashPaletteEffect.cs +++ b/OpenRA.Mods.Common/Traits/PaletteEffects/FlashPaletteEffect.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/PaletteEffects/MenuPaletteEffect.cs b/OpenRA.Mods.Common/Traits/PaletteEffects/MenuPaletteEffect.cs index 613df06289..5ae9c3066e 100644 --- a/OpenRA.Mods.Common/Traits/PaletteEffects/MenuPaletteEffect.cs +++ b/OpenRA.Mods.Common/Traits/PaletteEffects/MenuPaletteEffect.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Passenger.cs b/OpenRA.Mods.Common/Traits/Passenger.cs index 4b12c4b37a..dea47efe80 100644 --- a/OpenRA.Mods.Common/Traits/Passenger.cs +++ b/OpenRA.Mods.Common/Traits/Passenger.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Player/BaseAttackNotifier.cs b/OpenRA.Mods.Common/Traits/Player/BaseAttackNotifier.cs index ab43e17839..0f2bdf8e55 100644 --- a/OpenRA.Mods.Common/Traits/Player/BaseAttackNotifier.cs +++ b/OpenRA.Mods.Common/Traits/Player/BaseAttackNotifier.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Player/ConquestVictoryConditions.cs b/OpenRA.Mods.Common/Traits/Player/ConquestVictoryConditions.cs index 122976c520..d79badf5ae 100644 --- a/OpenRA.Mods.Common/Traits/Player/ConquestVictoryConditions.cs +++ b/OpenRA.Mods.Common/Traits/Player/ConquestVictoryConditions.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Player/HarvesterAttackNotifier.cs b/OpenRA.Mods.Common/Traits/Player/HarvesterAttackNotifier.cs index 05c86ffde3..e372bce861 100644 --- a/OpenRA.Mods.Common/Traits/Player/HarvesterAttackNotifier.cs +++ b/OpenRA.Mods.Common/Traits/Player/HarvesterAttackNotifier.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs b/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs index 0c7d85a0ed..f92d461018 100644 --- a/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs +++ b/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Power/AffectedByPowerOutage.cs b/OpenRA.Mods.Common/Traits/Power/AffectedByPowerOutage.cs index 3d21898bdc..957addfb4a 100644 --- a/OpenRA.Mods.Common/Traits/Power/AffectedByPowerOutage.cs +++ b/OpenRA.Mods.Common/Traits/Power/AffectedByPowerOutage.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Production.cs b/OpenRA.Mods.Common/Traits/Production.cs index 206ffce1d7..cda6242d56 100644 --- a/OpenRA.Mods.Common/Traits/Production.cs +++ b/OpenRA.Mods.Common/Traits/Production.cs @@ -10,7 +10,6 @@ #endregion using System; -using System.Drawing; using OpenRA.Mods.Common.Activities; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/Traits/ProductionFromMapEdge.cs b/OpenRA.Mods.Common/Traits/ProductionFromMapEdge.cs index 7cb63103e8..8d22bebe52 100644 --- a/OpenRA.Mods.Common/Traits/ProductionFromMapEdge.cs +++ b/OpenRA.Mods.Common/Traits/ProductionFromMapEdge.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/Traits/ProductionParadrop.cs b/OpenRA.Mods.Common/Traits/ProductionParadrop.cs index 8ce6e9f2f0..e61d79e810 100644 --- a/OpenRA.Mods.Common/Traits/ProductionParadrop.cs +++ b/OpenRA.Mods.Common/Traits/ProductionParadrop.cs @@ -10,7 +10,6 @@ #endregion using System; -using System.Drawing; using OpenRA.Activities; using OpenRA.Mods.Common.Activities; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/Traits/Radar/AppearsOnRadar.cs b/OpenRA.Mods.Common/Traits/Radar/AppearsOnRadar.cs index e16a415750..767b25b457 100644 --- a/OpenRA.Mods.Common/Traits/Radar/AppearsOnRadar.cs +++ b/OpenRA.Mods.Common/Traits/Radar/AppearsOnRadar.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/Traits/Radar/RadarColorFromTerrain.cs b/OpenRA.Mods.Common/Traits/Radar/RadarColorFromTerrain.cs index d25d90d40b..c28bea96b1 100644 --- a/OpenRA.Mods.Common/Traits/Radar/RadarColorFromTerrain.cs +++ b/OpenRA.Mods.Common/Traits/Radar/RadarColorFromTerrain.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Radar diff --git a/OpenRA.Mods.Common/Traits/Render/CashTricklerBar.cs b/OpenRA.Mods.Common/Traits/Render/CashTricklerBar.cs index 7fe67b713a..709f5e3ec9 100644 --- a/OpenRA.Mods.Common/Traits/Render/CashTricklerBar.cs +++ b/OpenRA.Mods.Common/Traits/Render/CashTricklerBar.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/DrawLineToTarget.cs b/OpenRA.Mods.Common/Traits/Render/DrawLineToTarget.cs index 5ea82dc0e7..f5e6a1868d 100644 --- a/OpenRA.Mods.Common/Traits/Render/DrawLineToTarget.cs +++ b/OpenRA.Mods.Common/Traits/Render/DrawLineToTarget.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Render/Hovers.cs b/OpenRA.Mods.Common/Traits/Render/Hovers.cs index 506f2c96b3..f930b25d01 100644 --- a/OpenRA.Mods.Common/Traits/Render/Hovers.cs +++ b/OpenRA.Mods.Common/Traits/Render/Hovers.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/ProductionBar.cs b/OpenRA.Mods.Common/Traits/Render/ProductionBar.cs index cb2c69e37b..6625e610d7 100644 --- a/OpenRA.Mods.Common/Traits/Render/ProductionBar.cs +++ b/OpenRA.Mods.Common/Traits/Render/ProductionBar.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/ReloadArmamentsBar.cs b/OpenRA.Mods.Common/Traits/Render/ReloadArmamentsBar.cs index c8238b33f4..a551a95f00 100644 --- a/OpenRA.Mods.Common/Traits/Render/ReloadArmamentsBar.cs +++ b/OpenRA.Mods.Common/Traits/Render/ReloadArmamentsBar.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/RenderDebugState.cs b/OpenRA.Mods.Common/Traits/Render/RenderDebugState.cs index 035d73de57..cdbbb043fe 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderDebugState.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderDebugState.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/RenderDetectionCircle.cs b/OpenRA.Mods.Common/Traits/Render/RenderDetectionCircle.cs index 7488ec1faf..b7f8c28df6 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderDetectionCircle.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderDetectionCircle.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/RenderNameTag.cs b/OpenRA.Mods.Common/Traits/Render/RenderNameTag.cs index 3c2281bd5a..0abae91fd0 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderNameTag.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderNameTag.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/RenderRangeCircle.cs b/OpenRA.Mods.Common/Traits/Render/RenderRangeCircle.cs index 492a67ac06..289bb865bd 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderRangeCircle.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderRangeCircle.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/RenderSprites.cs b/OpenRA.Mods.Common/Traits/Render/RenderSprites.cs index f793cdd93f..198b8e97ac 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderSprites.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderSprites.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; diff --git a/OpenRA.Mods.Common/Traits/Render/RenderVoxels.cs b/OpenRA.Mods.Common/Traits/Render/RenderVoxels.cs index 1c18f25c8c..5341520f30 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderVoxels.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderVoxels.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/SelectionDecorations.cs b/OpenRA.Mods.Common/Traits/Render/SelectionDecorations.cs index a63956fe84..fb5181730b 100644 --- a/OpenRA.Mods.Common/Traits/Render/SelectionDecorations.cs +++ b/OpenRA.Mods.Common/Traits/Render/SelectionDecorations.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/SupportPowerChargeBar.cs b/OpenRA.Mods.Common/Traits/Render/SupportPowerChargeBar.cs index 9c3d26c639..c023c9843a 100644 --- a/OpenRA.Mods.Common/Traits/Render/SupportPowerChargeBar.cs +++ b/OpenRA.Mods.Common/Traits/Render/SupportPowerChargeBar.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/TimedConditionBar.cs b/OpenRA.Mods.Common/Traits/Render/TimedConditionBar.cs index 8e42fd8f0b..9cc906b142 100644 --- a/OpenRA.Mods.Common/Traits/Render/TimedConditionBar.cs +++ b/OpenRA.Mods.Common/Traits/Render/TimedConditionBar.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs b/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs index 4119feca7a..871775e90e 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/WithParachute.cs b/OpenRA.Mods.Common/Traits/Render/WithParachute.cs index 3257ac22be..ea559ac43c 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithParachute.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithParachute.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/WithRangeCircle.cs b/OpenRA.Mods.Common/Traits/Render/WithRangeCircle.cs index f445c6ccbe..5fd3c3807e 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithRangeCircle.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithRangeCircle.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/WithShadow.cs b/OpenRA.Mods.Common/Traits/Render/WithShadow.cs index a739ccb37d..8552927667 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithShadow.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithShadow.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs b/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs index f1035a0872..73d9a79367 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/WithTextControlGroupDecoration.cs b/OpenRA.Mods.Common/Traits/Render/WithTextControlGroupDecoration.cs index 4c4f5cc175..b17fd93b28 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithTextControlGroupDecoration.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithTextControlGroupDecoration.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/WithTextDecoration.cs b/OpenRA.Mods.Common/Traits/Render/WithTextDecoration.cs index 83a449adb4..6763d9e14f 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithTextDecoration.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithTextDecoration.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Render/WithVoxelBody.cs b/OpenRA.Mods.Common/Traits/Render/WithVoxelBody.cs index 2d0aa8082f..8805c9c781 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithVoxelBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithVoxelBody.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Render diff --git a/OpenRA.Mods.Common/Traits/Repairable.cs b/OpenRA.Mods.Common/Traits/Repairable.cs index e5a1fc14ce..908b270a90 100644 --- a/OpenRA.Mods.Common/Traits/Repairable.cs +++ b/OpenRA.Mods.Common/Traits/Repairable.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/RepairableNear.cs b/OpenRA.Mods.Common/Traits/RepairableNear.cs index 48df61c907..b79c0d7d24 100644 --- a/OpenRA.Mods.Common/Traits/RepairableNear.cs +++ b/OpenRA.Mods.Common/Traits/RepairableNear.cs @@ -10,10 +10,10 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/RepairsBridges.cs b/OpenRA.Mods.Common/Traits/RepairsBridges.cs index b0063eb3d4..6b7a6d04a0 100644 --- a/OpenRA.Mods.Common/Traits/RepairsBridges.cs +++ b/OpenRA.Mods.Common/Traits/RepairsBridges.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Orders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/Sound/AnnounceOnSeen.cs b/OpenRA.Mods.Common/Traits/Sound/AnnounceOnSeen.cs index 565f3c464a..6d3d9b256b 100644 --- a/OpenRA.Mods.Common/Traits/Sound/AnnounceOnSeen.cs +++ b/OpenRA.Mods.Common/Traits/Sound/AnnounceOnSeen.cs @@ -10,7 +10,7 @@ #endregion using System; -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits.Sound diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs index 2a5d0820da..cda229847d 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Traits.Render; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs b/OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs index 5999e879a4..e78cf24456 100644 --- a/OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs +++ b/OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/ActorMap.cs b/OpenRA.Mods.Common/Traits/World/ActorMap.cs index 60e25ac9b2..46496c4d06 100644 --- a/OpenRA.Mods.Common/Traits/World/ActorMap.cs +++ b/OpenRA.Mods.Common/Traits/World/ActorMap.cs @@ -12,8 +12,8 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs b/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs index 77dc11c30d..925551d815 100644 --- a/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits.Render; diff --git a/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs b/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs index 7b6598379e..a039452a22 100644 --- a/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs +++ b/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.Graphics; diff --git a/OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs b/OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs index edd82ef97c..b73355d4b6 100644 --- a/OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs +++ b/OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs @@ -11,9 +11,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/PaletteFromPaletteWithAlpha.cs b/OpenRA.Mods.Common/Traits/World/PaletteFromPaletteWithAlpha.cs index 9f74fc040d..a859d79485 100644 --- a/OpenRA.Mods.Common/Traits/World/PaletteFromPaletteWithAlpha.cs +++ b/OpenRA.Mods.Common/Traits/World/PaletteFromPaletteWithAlpha.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/PaletteFromRGBA.cs b/OpenRA.Mods.Common/Traits/World/PaletteFromRGBA.cs index 5bd6bc9c15..fb97d2e5c1 100644 --- a/OpenRA.Mods.Common/Traits/World/PaletteFromRGBA.cs +++ b/OpenRA.Mods.Common/Traits/World/PaletteFromRGBA.cs @@ -9,9 +9,9 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/RadarPings.cs b/OpenRA.Mods.Common/Traits/World/RadarPings.cs index 1efc395138..d2da969f2c 100644 --- a/OpenRA.Mods.Common/Traits/World/RadarPings.cs +++ b/OpenRA.Mods.Common/Traits/World/RadarPings.cs @@ -11,7 +11,7 @@ using System; using System.Collections.Generic; -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/ShroudPalette.cs b/OpenRA.Mods.Common/Traits/World/ShroudPalette.cs index 8f88b1c7a3..46c2708d5a 100644 --- a/OpenRA.Mods.Common/Traits/World/ShroudPalette.cs +++ b/OpenRA.Mods.Common/Traits/World/ShroudPalette.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/TerrainGeometryOverlay.cs b/OpenRA.Mods.Common/Traits/World/TerrainGeometryOverlay.cs index 4c6efaa425..8e7724c348 100644 --- a/OpenRA.Mods.Common/Traits/World/TerrainGeometryOverlay.cs +++ b/OpenRA.Mods.Common/Traits/World/TerrainGeometryOverlay.cs @@ -9,10 +9,10 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Commands; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/WarheadDebugOverlay.cs b/OpenRA.Mods.Common/Traits/World/WarheadDebugOverlay.cs index 4837194cc8..1fcd99bca0 100644 --- a/OpenRA.Mods.Common/Traits/World/WarheadDebugOverlay.cs +++ b/OpenRA.Mods.Common/Traits/World/WarheadDebugOverlay.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs b/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs index de23c977c1..1481f2e312 100644 --- a/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs +++ b/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits diff --git a/OpenRA.Mods.Common/TraitsInterfaces.cs b/OpenRA.Mods.Common/TraitsInterfaces.cs index 0e1e5fd001..50776c9c1b 100644 --- a/OpenRA.Mods.Common/TraitsInterfaces.cs +++ b/OpenRA.Mods.Common/TraitsInterfaces.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Activities; using OpenRA.Graphics; using OpenRA.Mods.Common.Activities; diff --git a/OpenRA.Mods.Common/Util.cs b/OpenRA.Mods.Common/Util.cs index 8b6ea9dede..28cf43116a 100644 --- a/OpenRA.Mods.Common/Util.cs +++ b/OpenRA.Mods.Common/Util.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Support; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/UtilityCommands/ConvertPngToShpCommand.cs b/OpenRA.Mods.Common/UtilityCommands/ConvertPngToShpCommand.cs index e75635af43..76c6ac87d3 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ConvertPngToShpCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ConvertPngToShpCommand.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileFormats; using OpenRA.Mods.Common.SpriteLoaders; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.UtilityCommands { diff --git a/OpenRA.Mods.Common/UtilityCommands/ConvertSpriteToPngCommand.cs b/OpenRA.Mods.Common/UtilityCommands/ConvertSpriteToPngCommand.cs index 82cddb69c5..e6cdf0b8d9 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ConvertSpriteToPngCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ConvertSpriteToPngCommand.cs @@ -10,7 +10,6 @@ #endregion using System; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileFormats; diff --git a/OpenRA.Mods.Common/UtilityCommands/RemapShpCommand.cs b/OpenRA.Mods.Common/UtilityCommands/RemapShpCommand.cs index d906f2a1d6..a5ff1e15b8 100644 --- a/OpenRA.Mods.Common/UtilityCommands/RemapShpCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/RemapShpCommand.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.SpriteLoaders; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.UtilityCommands diff --git a/OpenRA.Mods.Common/Warheads/Warhead.cs b/OpenRA.Mods.Common/Warheads/Warhead.cs index ced852fc6b..5b60c3560a 100644 --- a/OpenRA.Mods.Common/Warheads/Warhead.cs +++ b/OpenRA.Mods.Common/Warheads/Warhead.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/Widgets/ActorPreviewWidget.cs b/OpenRA.Mods.Common/Widgets/ActorPreviewWidget.cs index 2cca084353..decec547e5 100644 --- a/OpenRA.Mods.Common/Widgets/ActorPreviewWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ActorPreviewWidget.cs @@ -10,7 +10,6 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; diff --git a/OpenRA.Mods.Common/Widgets/BackgroundWidget.cs b/OpenRA.Mods.Common/Widgets/BackgroundWidget.cs index 65fd4c5b4d..eb6aa3adaf 100644 --- a/OpenRA.Mods.Common/Widgets/BackgroundWidget.cs +++ b/OpenRA.Mods.Common/Widgets/BackgroundWidget.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs index 73570d0a34..5ea8b464bd 100644 --- a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ChatDisplayWidget.cs b/OpenRA.Mods.Common/Widgets/ChatDisplayWidget.cs index e8d1365b25..84f3fc3b12 100644 --- a/OpenRA.Mods.Common/Widgets/ChatDisplayWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ChatDisplayWidget.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/CheckboxWidget.cs b/OpenRA.Mods.Common/Widgets/CheckboxWidget.cs index bfd8d44c33..2f106cd7c2 100644 --- a/OpenRA.Mods.Common/Widgets/CheckboxWidget.cs +++ b/OpenRA.Mods.Common/Widgets/CheckboxWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs b/OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs index 53410ed7d5..af906cac31 100644 --- a/OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs @@ -10,7 +10,7 @@ #endregion using System; -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ColorMixerWidget.cs b/OpenRA.Mods.Common/Widgets/ColorMixerWidget.cs index d0e8e41afa..08499658ba 100644 --- a/OpenRA.Mods.Common/Widgets/ColorMixerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ColorMixerWidget.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.Threading; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/DropDownButtonWidget.cs b/OpenRA.Mods.Common/Widgets/DropDownButtonWidget.cs index 65ffef6ae9..676cbd9912 100644 --- a/OpenRA.Mods.Common/Widgets/DropDownButtonWidget.cs +++ b/OpenRA.Mods.Common/Widgets/DropDownButtonWidget.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ExponentialSliderWidget.cs b/OpenRA.Mods.Common/Widgets/ExponentialSliderWidget.cs index 168b43686b..ffbfd593cf 100644 --- a/OpenRA.Mods.Common/Widgets/ExponentialSliderWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ExponentialSliderWidget.cs @@ -10,9 +10,6 @@ #endregion using System; -using System.Drawing; -using OpenRA.Graphics; -using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets { diff --git a/OpenRA.Mods.Common/Widgets/HotkeyEntryWidget.cs b/OpenRA.Mods.Common/Widgets/HotkeyEntryWidget.cs index 7b5178800e..cfc96f6c5d 100644 --- a/OpenRA.Mods.Common/Widgets/HotkeyEntryWidget.cs +++ b/OpenRA.Mods.Common/Widgets/HotkeyEntryWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/HueSliderWidget.cs b/OpenRA.Mods.Common/Widgets/HueSliderWidget.cs index 47a72c5e61..e7a2f0b9e3 100644 --- a/OpenRA.Mods.Common/Widgets/HueSliderWidget.cs +++ b/OpenRA.Mods.Common/Widgets/HueSliderWidget.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/LabelWidget.cs b/OpenRA.Mods.Common/Widgets/LabelWidget.cs index 7dc5cbc367..7484d34c44 100644 --- a/OpenRA.Mods.Common/Widgets/LabelWidget.cs +++ b/OpenRA.Mods.Common/Widgets/LabelWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/LineGraphWidget.cs b/OpenRA.Mods.Common/Widgets/LineGraphWidget.cs index f59610bcd9..4e8ae667d9 100644 --- a/OpenRA.Mods.Common/Widgets/LineGraphWidget.cs +++ b/OpenRA.Mods.Common/Widgets/LineGraphWidget.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/Logic/ButtonTooltipWithDescHighlightLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ButtonTooltipWithDescHighlightLogic.cs index cb77f1047c..4a84183cdb 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ButtonTooltipWithDescHighlightLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ButtonTooltipWithDescHighlightLogic.cs @@ -11,7 +11,7 @@ using System; using System.Collections.Generic; -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoObjectivesLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoObjectivesLogic.cs index ecf648158a..0fe40696c5 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoObjectivesLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoObjectivesLogic.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoStatsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoStatsLogic.cs index 52032960a5..0c829d95aa 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoStatsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoStatsLogic.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs index e7c1fb1099..42a54ce8c4 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Commands; using OpenRA.Mods.Common.Traits; using OpenRA.Network; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerBarLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerBarLogic.cs index 06ecfc74cc..96bfab6320 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerBarLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerBarLogic.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerCounterLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerCounterLogic.cs index 4bd2a096dd..00f8ab43cc 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerCounterLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerCounterLogic.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameRadarDisplayLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameRadarDisplayLogic.cs index c34a160f60..8e79297649 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameRadarDisplayLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameRadarDisplayLogic.cs @@ -9,10 +9,10 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits.Radar; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameSiloBarLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameSiloBarLogic.cs index 142cfdc8e7..39c905aec9 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameSiloBarLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameSiloBarLogic.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverShroudSelectorLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverShroudSelectorLogic.cs index 6882103432..29c40cc5ed 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverShroudSelectorLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverShroudSelectorLogic.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Lint; using OpenRA.Network; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs index 09bcda97d1..c55d775485 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs @@ -11,12 +11,12 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Lint; using OpenRA.Mods.Common.Traits; using OpenRA.Network; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ProductionTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ProductionTooltipLogic.cs index 344d89f9a9..e7841c1077 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ProductionTooltipLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ProductionTooltipLogic.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs index 7ee07a86ed..453f6eecea 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs index 9b41a4b22a..39340dceeb 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs @@ -10,7 +10,7 @@ #endregion using System; -using System.Drawing; +using OpenRA.Primitives; using OpenRA.Traits; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 77e6e75b4b..136b22149a 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using System.Threading.Tasks; using OpenRA.Graphics; using OpenRA.Network; +using OpenRA.Primitives; using OpenRA.Traits; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyUtils.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyUtils.cs index 63208ff131..8d2a2641f2 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyUtils.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyUtils.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using System.Net; using OpenRA.Graphics; diff --git a/OpenRA.Mods.Common/Widgets/Logic/MuteHotkeyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MuteHotkeyLogic.cs index a88404e730..33448bf193 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MuteHotkeyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MuteHotkeyLogic.cs @@ -10,8 +10,8 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Mods.Common.Lint; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/ServerCreationLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ServerCreationLogic.cs index e377353576..cccd431dde 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ServerCreationLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ServerCreationLogic.cs @@ -10,10 +10,10 @@ #endregion using System; -using System.Drawing; using System.Linq; using System.Net; using OpenRA.Network; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic diff --git a/OpenRA.Mods.Common/Widgets/Logic/ServerListLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ServerListLogic.cs index f9886d8bbc..37bbd194b1 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ServerListLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ServerListLogic.cs @@ -11,12 +11,12 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using System.Net; using System.Text; using BeaconLib; using OpenRA.Network; +using OpenRA.Primitives; using OpenRA.Server; using OpenRA.Traits; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Common/Widgets/MapPreviewWidget.cs b/OpenRA.Mods.Common/Widgets/MapPreviewWidget.cs index e29bcff5f3..6c5d080ca6 100644 --- a/OpenRA.Mods.Common/Widgets/MapPreviewWidget.cs +++ b/OpenRA.Mods.Common/Widgets/MapPreviewWidget.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Network; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ObserverProductionIconsWidget.cs b/OpenRA.Mods.Common/Widgets/ObserverProductionIconsWidget.cs index 738787241a..f569fdcd6d 100644 --- a/OpenRA.Mods.Common/Widgets/ObserverProductionIconsWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ObserverProductionIconsWidget.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits.Render; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ObserverSupportPowerIconsWidget.cs b/OpenRA.Mods.Common/Widgets/ObserverSupportPowerIconsWidget.cs index c6d1e73ecf..209f98550e 100644 --- a/OpenRA.Mods.Common/Widgets/ObserverSupportPowerIconsWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ObserverSupportPowerIconsWidget.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/PerfGraphWidget.cs b/OpenRA.Mods.Common/Widgets/PerfGraphWidget.cs index 01ed7254a6..d19715f8cc 100644 --- a/OpenRA.Mods.Common/Widgets/PerfGraphWidget.cs +++ b/OpenRA.Mods.Common/Widgets/PerfGraphWidget.cs @@ -9,8 +9,8 @@ */ #endregion -using System.Drawing; using System.Linq; +using OpenRA.Primitives; using OpenRA.Support; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs index 083548e88b..81b1c93d6f 100644 --- a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Lint; @@ -19,6 +18,7 @@ using OpenRA.Mods.Common.Orders; using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits.Render; using OpenRA.Network; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ProductionTabsWidget.cs b/OpenRA.Mods.Common/Widgets/ProductionTabsWidget.cs index cac15a38f1..f9ae035011 100644 --- a/OpenRA.Mods.Common/Widgets/ProductionTabsWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProductionTabsWidget.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ProgressBarWidget.cs b/OpenRA.Mods.Common/Widgets/ProgressBarWidget.cs index 273f0f9c47..65cd5c14db 100644 --- a/OpenRA.Mods.Common/Widgets/ProgressBarWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProgressBarWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/RadarWidget.cs b/OpenRA.Mods.Common/Widgets/RadarWidget.cs index b579099076..7f28d2c57d 100644 --- a/OpenRA.Mods.Common/Widgets/RadarWidget.cs +++ b/OpenRA.Mods.Common/Widgets/RadarWidget.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; diff --git a/OpenRA.Mods.Common/Widgets/ResourceBarWidget.cs b/OpenRA.Mods.Common/Widgets/ResourceBarWidget.cs index a75d5957b4..6a59446464 100644 --- a/OpenRA.Mods.Common/Widgets/ResourceBarWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ResourceBarWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/ScrollPanelWidget.cs b/OpenRA.Mods.Common/Widgets/ScrollPanelWidget.cs index d4033f0e50..873984e214 100644 --- a/OpenRA.Mods.Common/Widgets/ScrollPanelWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ScrollPanelWidget.cs @@ -10,7 +10,6 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/Widgets/SliderWidget.cs b/OpenRA.Mods.Common/Widgets/SliderWidget.cs index 3aa7bd71d3..86d3c77e4b 100644 --- a/OpenRA.Mods.Common/Widgets/SliderWidget.cs +++ b/OpenRA.Mods.Common/Widgets/SliderWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/StrategicProgressWidget.cs b/OpenRA.Mods.Common/Widgets/StrategicProgressWidget.cs index d5e6b47467..ba313a53fe 100644 --- a/OpenRA.Mods.Common/Widgets/StrategicProgressWidget.cs +++ b/OpenRA.Mods.Common/Widgets/StrategicProgressWidget.cs @@ -9,10 +9,10 @@ */ #endregion -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/SupportPowerTimerWidget.cs b/OpenRA.Mods.Common/Widgets/SupportPowerTimerWidget.cs index dd761db2c6..d91458fc3b 100644 --- a/OpenRA.Mods.Common/Widgets/SupportPowerTimerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/SupportPowerTimerWidget.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Traits; using OpenRA.Primitives; diff --git a/OpenRA.Mods.Common/Widgets/SupportPowersWidget.cs b/OpenRA.Mods.Common/Widgets/SupportPowersWidget.cs index 7e0ec341d9..b6d4fbf410 100644 --- a/OpenRA.Mods.Common/Widgets/SupportPowersWidget.cs +++ b/OpenRA.Mods.Common/Widgets/SupportPowersWidget.cs @@ -11,11 +11,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Lint; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/TerrainTemplatePreviewWidget.cs b/OpenRA.Mods.Common/Widgets/TerrainTemplatePreviewWidget.cs index eea0153b03..339bc5bd80 100644 --- a/OpenRA.Mods.Common/Widgets/TerrainTemplatePreviewWidget.cs +++ b/OpenRA.Mods.Common/Widgets/TerrainTemplatePreviewWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs b/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs index bda2ac3825..a21acf22e0 100644 --- a/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs +++ b/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.IO; using System.Linq; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/TooltipContainerWidget.cs b/OpenRA.Mods.Common/Widgets/TooltipContainerWidget.cs index f94bfa1ab9..1adafadcff 100644 --- a/OpenRA.Mods.Common/Widgets/TooltipContainerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/TooltipContainerWidget.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs b/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs index da385277b2..8affb71f33 100644 --- a/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.FileFormats; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets diff --git a/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs index c8b8bbc7ee..dc1b526282 100644 --- a/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs @@ -10,11 +10,11 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Effects; using OpenRA.Orders; +using OpenRA.Primitives; using OpenRA.Traits; using OpenRA.Widgets; diff --git a/OpenRA.Mods.D2k/Activities/SwallowActor.cs b/OpenRA.Mods.D2k/Activities/SwallowActor.cs index 71a460b0ad..c750c62cd3 100644 --- a/OpenRA.Mods.D2k/Activities/SwallowActor.cs +++ b/OpenRA.Mods.D2k/Activities/SwallowActor.cs @@ -10,13 +10,13 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.GameRules; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Traits; using OpenRA.Mods.D2k.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.D2k.Activities diff --git a/OpenRA.Mods.D2k/SpriteLoaders/R8Loader.cs b/OpenRA.Mods.D2k/SpriteLoaders/R8Loader.cs index f545bfb6e7..48878e192c 100644 --- a/OpenRA.Mods.D2k/SpriteLoaders/R8Loader.cs +++ b/OpenRA.Mods.D2k/SpriteLoaders/R8Loader.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.Graphics; diff --git a/OpenRA.Mods.D2k/Traits/Sandworm.cs b/OpenRA.Mods.D2k/Traits/Sandworm.cs index b476dcd6eb..38f67bdd21 100644 --- a/OpenRA.Mods.D2k/Traits/Sandworm.cs +++ b/OpenRA.Mods.D2k/Traits/Sandworm.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.D2k.Traits diff --git a/OpenRA.Mods.D2k/Traits/World/PaletteFromScaledPalette.cs b/OpenRA.Mods.D2k/Traits/World/PaletteFromScaledPalette.cs index 322c5eef17..6ca889e3a2 100644 --- a/OpenRA.Mods.D2k/Traits/World/PaletteFromScaledPalette.cs +++ b/OpenRA.Mods.D2k/Traits/World/PaletteFromScaledPalette.cs @@ -10,9 +10,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.D2k.Traits diff --git a/OpenRA.Mods.D2k/UtilityCommands/D2kMapImporter.cs b/OpenRA.Mods.D2k/UtilityCommands/D2kMapImporter.cs index d2b07b8a5b..e1babaae70 100644 --- a/OpenRA.Mods.D2k/UtilityCommands/D2kMapImporter.cs +++ b/OpenRA.Mods.D2k/UtilityCommands/D2kMapImporter.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.Primitives; diff --git a/OpenRA.Platforms.Default/DefaultPlatform.cs b/OpenRA.Platforms.Default/DefaultPlatform.cs index f87cbc6078..6492d56270 100644 --- a/OpenRA.Platforms.Default/DefaultPlatform.cs +++ b/OpenRA.Platforms.Default/DefaultPlatform.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Drawing; +using OpenRA.Primitives; namespace OpenRA.Platforms.Default { diff --git a/OpenRA.Platforms.Default/FrameBuffer.cs b/OpenRA.Platforms.Default/FrameBuffer.cs index 952c6d349c..c19e9a73dc 100644 --- a/OpenRA.Platforms.Default/FrameBuffer.cs +++ b/OpenRA.Platforms.Default/FrameBuffer.cs @@ -11,8 +11,8 @@ using System; using System.Diagnostics; -using System.Drawing; using System.IO; +using OpenRA.Primitives; namespace OpenRA.Platforms.Default { diff --git a/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs b/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs index 77e045819b..74e8a193e9 100644 --- a/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs +++ b/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs @@ -10,12 +10,10 @@ #endregion using System; -using System.Drawing; -using System.IO; using System.Threading; using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Support; +using OpenRA.Primitives; using SDL2; namespace OpenRA.Platforms.Default diff --git a/OpenRA.Platforms.Default/Sdl2HardwareCursor.cs b/OpenRA.Platforms.Default/Sdl2HardwareCursor.cs index ea3065f747..01cdb9d3ef 100644 --- a/OpenRA.Platforms.Default/Sdl2HardwareCursor.cs +++ b/OpenRA.Platforms.Default/Sdl2HardwareCursor.cs @@ -10,9 +10,9 @@ #endregion using System; -using System.Drawing; using System.IO; using System.Runtime.InteropServices; +using OpenRA.Primitives; using SDL2; namespace OpenRA.Platforms.Default diff --git a/OpenRA.Platforms.Default/Sdl2PlatformWindow.cs b/OpenRA.Platforms.Default/Sdl2PlatformWindow.cs index de9dc877eb..570691adf2 100644 --- a/OpenRA.Platforms.Default/Sdl2PlatformWindow.cs +++ b/OpenRA.Platforms.Default/Sdl2PlatformWindow.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using System.Runtime.InteropServices; +using OpenRA.Primitives; using SDL2; namespace OpenRA.Platforms.Default diff --git a/OpenRA.Platforms.Default/Texture.cs b/OpenRA.Platforms.Default/Texture.cs index 701e2d2b99..c76bf59aec 100644 --- a/OpenRA.Platforms.Default/Texture.cs +++ b/OpenRA.Platforms.Default/Texture.cs @@ -10,8 +10,8 @@ #endregion using System; -using System.Drawing; using System.IO; +using OpenRA.Primitives; namespace OpenRA.Platforms.Default { diff --git a/OpenRA.Platforms.Default/ThreadedGraphicsContext.cs b/OpenRA.Platforms.Default/ThreadedGraphicsContext.cs index 1d2174f229..d28b0cbe6a 100644 --- a/OpenRA.Platforms.Default/ThreadedGraphicsContext.cs +++ b/OpenRA.Platforms.Default/ThreadedGraphicsContext.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Runtime.ExceptionServices; using System.Threading; using OpenRA.Graphics; +using OpenRA.Primitives; namespace OpenRA.Platforms.Default { diff --git a/OpenRA.Test/OpenRA.Game/SpatiallyPartitionedTest.cs b/OpenRA.Test/OpenRA.Game/SpatiallyPartitionedTest.cs index ec4fa41218..be9d3b41b1 100644 --- a/OpenRA.Test/OpenRA.Game/SpatiallyPartitionedTest.cs +++ b/OpenRA.Test/OpenRA.Game/SpatiallyPartitionedTest.cs @@ -9,7 +9,6 @@ */ #endregion -using System.Drawing; using NUnit.Framework; using OpenRA.Primitives;