From b0425aff3b7928417bd4a9a8e1929c28c780f5cb Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 7 Apr 2011 21:15:42 +1200 Subject: [PATCH] Renormalize line endings and fix copyright headers again. --- FileExtractor/FileExtractor.cs | 16 +- FileExtractor/Main.cs | 10 + OpenRA.Editor/ErrorListDialog.Designer.cs | 188 +-- OpenRA.Editor/ErrorListDialog.cs | 36 +- OpenRA.Editor/Form1.Designer.cs | 1084 +++++++++-------- OpenRA.Editor/Form1.cs | 28 +- OpenRA.Editor/Form1.resx | 1084 ++++++++--------- OpenRA.Editor/LegacyMapImporter.cs | 110 +- OpenRA.Editor/MapSelect.Designer.cs | 758 ++++++------ OpenRA.Editor/MapSelect.cs | 158 +-- OpenRA.Editor/MapSelect.resx | 352 +++--- OpenRA.Editor/NewMapDialog.Designer.cs | 580 ++++----- OpenRA.Editor/NewMapDialog.resx | 238 ++-- OpenRA.Editor/OpenRA.Editor.csproj | 316 ++--- OpenRA.Editor/Program.cs | 22 +- OpenRA.Editor/Properties/AssemblyInfo.cs | 82 +- .../Properties/Resources.Designer.cs | 142 +-- OpenRA.Editor/Properties/Settings.Designer.cs | 60 +- OpenRA.Editor/Properties/Settings.settings | 14 +- OpenRA.Editor/PropertiesDialog.Designer.cs | 352 +++--- OpenRA.Editor/PropertiesDialog.resx | 238 ++-- OpenRA.Editor/ResizeDialog.Designer.cs | 460 +++---- OpenRA.Editor/ResizeDialog.resx | 238 ++-- OpenRA.Editor/Surface.cs | 54 +- OpenRA.FileFormats/Exts.cs | 72 +- OpenRA.FileFormats/Filesystem/Folder.cs | 4 +- .../Graphics/IGraphicsDevice.cs | 2 +- OpenRA.FileFormats/Graphics/PngLoader.cs | 362 +++--- OpenRA.FileFormats/Graphics/ShpWriter.cs | 102 +- OpenRA.FileFormats/MiniYaml.cs | 38 +- OpenRA.FileFormats/Mod.cs | 82 +- OpenRA.FileFormats/OpenRA.FileFormats.csproj | 246 ++-- OpenRA.FileFormats/Primitives/Cache.cs | 10 +- OpenRA.FileFormats/Primitives/Lazy.cs | 10 +- OpenRA.FileFormats/Primitives/Pair.cs | 50 +- OpenRA.FileFormats/Properties/AssemblyInfo.cs | 62 +- OpenRA.Game/Actor.cs | 12 +- OpenRA.Game/Game.cs | 20 +- OpenRA.Game/GameRules/ActorInfo.cs | 66 +- OpenRA.Game/Graphics/Animation.cs | 18 +- OpenRA.Game/Graphics/HardwarePalette.cs | 4 +- OpenRA.Game/Graphics/Util.cs | 14 +- OpenRA.Game/Graphics/Viewport.cs | 10 +- OpenRA.Game/Graphics/WorldRenderer.cs | 54 +- OpenRA.Game/Map.cs | 20 +- OpenRA.Game/Network/FrameData.cs | 132 +- OpenRA.Game/Network/OrderManager.cs | 24 +- OpenRA.Game/Network/ReplayConnection.cs | 230 ++-- OpenRA.Game/Network/UnitOrders.cs | 6 +- OpenRA.Game/ObjectCreator.cs | 18 +- OpenRA.Game/OpenRA.Game.csproj | 480 ++++---- OpenRA.Game/Properties/AssemblyInfo.cs | 64 +- OpenRA.Game/TraitDictionary.cs | 10 +- .../Traits/Activities/CancelableActivity.cs | 86 +- OpenRA.Game/Traits/Health.cs | 32 +- OpenRA.Game/Traits/Player/DeveloperMode.cs | 16 +- OpenRA.Game/Traits/Selectable.cs | 134 +- OpenRA.Game/Traits/SubcellInit.cs | 62 +- OpenRA.Game/Traits/TraitsInterfaces.cs | 464 +++---- OpenRA.Game/UiOverlay.cs | 6 +- OpenRA.Game/Widgets/Widget.cs | 730 +++++------ .../WorldInteractionControllerWidget.cs | 24 +- OpenRA.Game/World.cs | 12 +- OpenRA.Game/WorldUtils.cs | 72 +- OpenRA.Mods.Cnc/AttackPopupTurreted.cs | 36 +- OpenRA.Mods.Cnc/Missions/Gdi01Script.cs | 4 +- OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs | 82 +- OpenRA.Mods.RA/Activities/UnloadCargo.cs | 6 +- OpenRA.Mods.RA/Air/FlyCircle.cs | 74 +- OpenRA.Mods.RA/Air/Plane.cs | 22 +- OpenRA.Mods.RA/Air/ReturnOnIdle.cs | 56 +- OpenRA.Mods.RA/Air/ReturnToBase.cs | 16 +- OpenRA.Mods.RA/BaseBuilding.cs | 26 +- .../Buildings/RepairableBuilding.cs | 4 +- OpenRA.Mods.RA/Buildings/Sell.cs | 8 +- OpenRA.Mods.RA/Cloak.cs | 22 +- OpenRA.Mods.RA/ConquestVictoryConditions.cs | 6 +- OpenRA.Mods.RA/Crate.cs | 16 +- OpenRA.Mods.RA/CrateDrop.cs | 66 +- OpenRA.Mods.RA/Effects/Bullet.cs | 20 +- OpenRA.Mods.RA/Effects/CashTick.cs | 2 +- OpenRA.Mods.RA/Effects/Missile.cs | 16 +- OpenRA.Mods.RA/Effects/RepairIndicator.cs | 2 +- OpenRA.Mods.RA/Explodes.cs | 8 +- OpenRA.Mods.RA/GainsExperience.cs | 88 +- OpenRA.Mods.RA/Harvester.cs | 8 +- OpenRA.Mods.RA/InvisibleToOthers.cs | 4 +- .../Lint/LintBuildablePrerequisites.cs | 42 +- OpenRA.Mods.RA/Move/PathFinder.cs | 70 +- OpenRA.Mods.RA/Move/PathSearch.cs | 86 +- OpenRA.Mods.RA/Orders/DeployOrderTargeter.cs | 94 +- OpenRA.Mods.RA/OreRefinery.cs | 18 +- OpenRA.Mods.RA/ParaDrop.cs | 142 +-- .../Player/ClassicProductionQueue.cs | 6 +- OpenRA.Mods.RA/Player/ProductionQueue.cs | 44 +- OpenRA.Mods.RA/ProductionBar.cs | 86 +- OpenRA.Mods.RA/Properties/AssemblyInfo.cs | 82 +- OpenRA.Mods.RA/ProximityCapturable.cs | 396 +++--- OpenRA.Mods.RA/Render/RenderEditorOnly.cs | 44 +- OpenRA.Mods.RA/RenderRangeCircle.cs | 2 +- OpenRA.Mods.RA/Reservable.cs | 4 +- OpenRA.Mods.RA/SpawnMapActors.cs | 10 +- OpenRA.Mods.RA/Spy.cs | 20 +- OpenRA.Mods.RA/Strategic/StrategicPoint.cs | 102 +- .../SupportPowers/AirstrikePower.cs | 18 +- OpenRA.Mods.RA/SupportPowers/GpsPower.cs | 50 +- .../SupportPowers/ParatroopersPower.cs | 26 +- .../SupportPowers/SupportPowerChargeBar.cs | 74 +- .../SupportPowers/SupportPowerManager.cs | 36 +- OpenRA.Mods.RA/WaterPaletteRotation.cs | 28 +- .../Delegates/ConnectionDialogsDelegate.cs | 2 +- .../Delegates/DeveloperModeDelegate.cs | 18 +- .../Widgets/Delegates/GameInitDelegate.cs | 82 +- .../Widgets/Delegates/LobbyDelegate.cs | 18 +- .../Delegates/ServerBrowserDelegate.cs | 40 +- OpenRA.Mods.RA/Widgets/RadarBinWidget.cs | 6 +- .../Widgets/StrategicProgressWidget.cs | 256 ++-- OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs | 254 ++-- OpenRA.Renderer.Cg/GraphicsDevice.cs | 10 +- OpenRA.Renderer.Cg/IndexBuffer.cs | 4 +- OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs | 82 +- OpenRA.Renderer.Cg/Texture.cs | 44 +- OpenRA.Renderer.Gl/GraphicsDevice.cs | 8 +- OpenRA.Renderer.Gl/IndexBuffer.cs | 6 +- OpenRA.Renderer.Gl/Texture.cs | 58 +- OpenRA.Renderer.Null/NullGraphicsDevice.cs | 6 +- .../Properties/AssemblyInfo.cs | 82 +- OpenRA.TilesetBuilder/Form1.Designer.cs | 642 +++++----- .../Properties/AssemblyInfo.cs | 82 +- .../Properties/Resources.Designer.cs | 142 +-- .../Properties/Settings.Designer.cs | 60 +- OpenRA.TilesetBuilder/Surface.cs | 238 ++-- OpenRA.TilesetBuilder/Template.cs | 48 +- OpenRA.Utility/Program.cs | 2 +- OpenRA.Utility/Properties/AssemblyInfo.cs | 82 +- OpenRA.Utility/Util.cs | 18 +- RALint/Properties/AssemblyInfo.cs | 82 +- RALint/RALint.cs | 24 +- SequenceEditor/Form1.Designer.cs | 298 ++--- SequenceEditor/GetTextForm.Designer.cs | 196 +-- SequenceEditor/Properties/AssemblyInfo.cs | 82 +- .../Properties/Resources.Designer.cs | 142 +-- .../Properties/Settings.Designer.cs | 60 +- packaging/fixheader.cs | 96 +- 144 files changed, 8076 insertions(+), 7746 deletions(-) diff --git a/FileExtractor/FileExtractor.cs b/FileExtractor/FileExtractor.cs index c1c084a473..4325994d59 100644 --- a/FileExtractor/FileExtractor.cs +++ b/FileExtractor/FileExtractor.cs @@ -1,5 +1,15 @@ -using System; -using System.IO; +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.IO; using OpenRA.FileFormats; namespace FileExtractor @@ -17,7 +27,7 @@ namespace FileExtractor } var mods = args[0].Split(','); - var manifest = new Manifest(mods); + var manifest = new Manifest(mods); FileSystem.LoadFromManifest( manifest ); try diff --git a/FileExtractor/Main.cs b/FileExtractor/Main.cs index 2fefff38fa..31015ea947 100644 --- a/FileExtractor/Main.cs +++ b/FileExtractor/Main.cs @@ -1,3 +1,13 @@ +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + using System; namespace FileExtractor diff --git a/OpenRA.Editor/ErrorListDialog.Designer.cs b/OpenRA.Editor/ErrorListDialog.Designer.cs index 5f88bb1241..3ff75fe297 100644 --- a/OpenRA.Editor/ErrorListDialog.Designer.cs +++ b/OpenRA.Editor/ErrorListDialog.Designer.cs @@ -1,90 +1,100 @@ -namespace OpenRA.Editor -{ - partial class ErrorListDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.listBox1 = new System.Windows.Forms.ListBox(); - this.button1 = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label1.Location = new System.Drawing.Point(10, 9); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(610, 23); - this.label1.TabIndex = 0; - this.label1.Text = "Your map import completed, but with errors:"; - // - // listBox1 - // - this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.listBox1.FormattingEnabled = true; - this.listBox1.Location = new System.Drawing.Point(13, 30); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(607, 316); - this.listBox1.TabIndex = 1; - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.button1.Location = new System.Drawing.Point(545, 359); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 2; - this.button1.Text = "Close"; - this.button1.UseVisualStyleBackColor = true; - // - // ErrorListDialog - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(632, 394); - this.Controls.Add(this.button1); - this.Controls.Add(this.listBox1); - this.Controls.Add(this.label1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "ErrorListDialog"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Map Import Errors"; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.ListBox listBox1; - private System.Windows.Forms.Button button1; - } +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.Editor +{ + partial class ErrorListDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Location = new System.Drawing.Point(10, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(610, 23); + this.label1.TabIndex = 0; + this.label1.Text = "Your map import completed, but with errors:"; + // + // listBox1 + // + this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listBox1.FormattingEnabled = true; + this.listBox1.Location = new System.Drawing.Point(13, 30); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(607, 316); + this.listBox1.TabIndex = 1; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.button1.Location = new System.Drawing.Point(545, 359); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 2; + this.button1.Text = "Close"; + this.button1.UseVisualStyleBackColor = true; + // + // ErrorListDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 394); + this.Controls.Add(this.button1); + this.Controls.Add(this.listBox1); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "ErrorListDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Map Import Errors"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.Button button1; + } } \ No newline at end of file diff --git a/OpenRA.Editor/ErrorListDialog.cs b/OpenRA.Editor/ErrorListDialog.cs index def8d6f31b..9929feb3ec 100644 --- a/OpenRA.Editor/ErrorListDialog.cs +++ b/OpenRA.Editor/ErrorListDialog.cs @@ -1,25 +1,25 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007-2011 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. For more information, * see COPYING. - */ + */ #endregion - -using System.Collections.Generic; -using System.Windows.Forms; - -namespace OpenRA.Editor -{ - public partial class ErrorListDialog : Form - { - public ErrorListDialog( IEnumerable errors ) - { - InitializeComponent(); - foreach (var e in errors) - listBox1.Items.Add(e); - } - } -} + +using System.Collections.Generic; +using System.Windows.Forms; + +namespace OpenRA.Editor +{ + public partial class ErrorListDialog : Form + { + public ErrorListDialog( IEnumerable errors ) + { + InitializeComponent(); + foreach (var e in errors) + listBox1.Items.Add(e); + } + } +} diff --git a/OpenRA.Editor/Form1.Designer.cs b/OpenRA.Editor/Form1.Designer.cs index 8cac7eb949..21685e920f 100755 --- a/OpenRA.Editor/Form1.Designer.cs +++ b/OpenRA.Editor/Form1.Designer.cs @@ -1,537 +1,547 @@ -namespace OpenRA.Editor -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.pmMiniMap = new System.Windows.Forms.PictureBox(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.tilePalette = new System.Windows.Forms.FlowLayoutPanel(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.actorPalette = new System.Windows.Forms.FlowLayoutPanel(); - this.tabPage3 = new System.Windows.Forms.TabPage(); - this.resourcePalette = new System.Windows.Forms.FlowLayoutPanel(); - this.surface1 = new OpenRA.Editor.Surface(); - this.tt = new System.Windows.Forms.ToolTip(this.components); - this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); - this.splitContainer3 = new System.Windows.Forms.SplitContainer(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.cCRedAlertMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.bitmapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mnuExport = new System.Windows.Forms.ToolStripMenuItem(); - this.mnuMinimapToPNG = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.propertiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.resizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripComboBox1 = new System.Windows.Forms.ToolStripComboBox(); - this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); - this.statusStrip1 = new System.Windows.Forms.StatusStrip(); - this.toolStripStatusLabelFiller = new System.Windows.Forms.ToolStripStatusLabel(); - this.toolStripStatusLabelMousePosition = new System.Windows.Forms.ToolStripStatusLabel(); - this.showActorNamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.splitContainer2.Panel1.SuspendLayout(); - this.splitContainer2.Panel2.SuspendLayout(); - this.splitContainer2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pmMiniMap)).BeginInit(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.tabPage2.SuspendLayout(); - this.tabPage3.SuspendLayout(); - this.splitContainer3.Panel1.SuspendLayout(); - this.splitContainer3.Panel2.SuspendLayout(); - this.splitContainer3.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - this.statusStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // splitContainer1 - // - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.Location = new System.Drawing.Point(0, 0); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.surface1); - this.splitContainer1.Size = new System.Drawing.Size(985, 744); - this.splitContainer1.SplitterDistance = 198; - this.splitContainer1.TabIndex = 0; - // - // splitContainer2 - // - this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.Location = new System.Drawing.Point(0, 0); - this.splitContainer2.Name = "splitContainer2"; - this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer2.Panel1 - // - this.splitContainer2.Panel1.Controls.Add(this.pmMiniMap); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.tabControl1); - this.splitContainer2.Size = new System.Drawing.Size(198, 744); - this.splitContainer2.SplitterDistance = 164; - this.splitContainer2.TabIndex = 1; - // - // pmMiniMap - // - this.pmMiniMap.BackColor = System.Drawing.Color.Black; - this.pmMiniMap.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.pmMiniMap.Dock = System.Windows.Forms.DockStyle.Fill; - this.pmMiniMap.Location = new System.Drawing.Point(0, 0); - this.pmMiniMap.Name = "pmMiniMap"; - this.pmMiniMap.Size = new System.Drawing.Size(198, 164); - this.pmMiniMap.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pmMiniMap.TabIndex = 1; - this.pmMiniMap.TabStop = false; - // - // tabControl1 - // - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage3); - this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl1.Location = new System.Drawing.Point(0, 0); - this.tabControl1.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); - this.tabControl1.Multiline = true; - this.tabControl1.Name = "tabControl1"; - this.tabControl1.Padding = new System.Drawing.Point(6, 0); - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(198, 576); - this.tabControl1.TabIndex = 0; - // - // tabPage1 - // - this.tabPage1.Controls.Add(this.tilePalette); - this.tabPage1.Location = new System.Drawing.Point(4, 20); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(190, 552); - this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Templates"; - this.tabPage1.UseVisualStyleBackColor = true; - // - // tilePalette - // - this.tilePalette.AutoScroll = true; - this.tilePalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.tilePalette.Dock = System.Windows.Forms.DockStyle.Fill; - this.tilePalette.Location = new System.Drawing.Point(3, 3); - this.tilePalette.Name = "tilePalette"; - this.tilePalette.Size = new System.Drawing.Size(184, 546); - this.tilePalette.TabIndex = 1; - // - // tabPage2 - // - this.tabPage2.Controls.Add(this.actorPalette); - this.tabPage2.Location = new System.Drawing.Point(4, 20); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(190, 552); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "Actors"; - this.tabPage2.UseVisualStyleBackColor = true; - // - // actorPalette - // - this.actorPalette.AutoScroll = true; - this.actorPalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.actorPalette.Dock = System.Windows.Forms.DockStyle.Fill; - this.actorPalette.Location = new System.Drawing.Point(3, 3); - this.actorPalette.Name = "actorPalette"; - this.actorPalette.Size = new System.Drawing.Size(184, 546); - this.actorPalette.TabIndex = 2; - // - // tabPage3 - // - this.tabPage3.Controls.Add(this.resourcePalette); - this.tabPage3.Location = new System.Drawing.Point(4, 20); - this.tabPage3.Name = "tabPage3"; - this.tabPage3.Size = new System.Drawing.Size(190, 552); - this.tabPage3.TabIndex = 2; - this.tabPage3.Text = "Resources"; - this.tabPage3.UseVisualStyleBackColor = true; - // - // resourcePalette - // - this.resourcePalette.AutoScroll = true; - this.resourcePalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.resourcePalette.Dock = System.Windows.Forms.DockStyle.Fill; - this.resourcePalette.Location = new System.Drawing.Point(0, 0); - this.resourcePalette.Name = "resourcePalette"; - this.resourcePalette.Size = new System.Drawing.Size(190, 552); - this.resourcePalette.TabIndex = 3; - // - // surface1 - // - this.surface1.BackColor = System.Drawing.Color.Black; - this.surface1.Dock = System.Windows.Forms.DockStyle.Fill; - this.surface1.Location = new System.Drawing.Point(0, 0); - this.surface1.Name = "surface1"; - this.surface1.Size = new System.Drawing.Size(783, 744); - this.surface1.TabIndex = 5; - this.surface1.Text = "surface1"; - // - // tt - // - this.tt.ShowAlways = true; - // - // saveFileDialog - // - this.saveFileDialog.DefaultExt = "*.png"; - this.saveFileDialog.Filter = "PNG Image (*.png)|"; - this.saveFileDialog.Title = "Export minimap to PNG"; - // - // splitContainer3 - // - this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer3.IsSplitterFixed = true; - this.splitContainer3.Location = new System.Drawing.Point(0, 0); - this.splitContainer3.Name = "splitContainer3"; - this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer3.Panel1 - // - this.splitContainer3.Panel1.Controls.Add(this.menuStrip1); - // - // splitContainer3.Panel2 - // - this.splitContainer3.Panel2.Controls.Add(this.splitContainer1); - this.splitContainer3.Size = new System.Drawing.Size(985, 773); - this.splitContainer3.SplitterDistance = 25; - this.splitContainer3.TabIndex = 6; - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileToolStripMenuItem, - this.mapToolStripMenuItem, - this.toolStripComboBox1, - this.toolStripLabel1}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(985, 27); - this.menuStrip1.TabIndex = 1; - this.menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newToolStripMenuItem, - this.toolStripSeparator1, - this.openToolStripMenuItem, - this.saveToolStripMenuItem, - this.saveAsToolStripMenuItem, - this.toolStripSeparator2, - this.toolStripMenuItem1, - this.mnuExport, - this.toolStripSeparator3, - this.exitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 23); - this.fileToolStripMenuItem.Text = "&File"; - // - // newToolStripMenuItem - // - this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image"))); - this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Fuchsia; - this.newToolStripMenuItem.Name = "newToolStripMenuItem"; - this.newToolStripMenuItem.Size = new System.Drawing.Size(123, 22); - this.newToolStripMenuItem.Text = "&New..."; - this.newToolStripMenuItem.Click += new System.EventHandler(this.NewClicked); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(120, 6); - // - // openToolStripMenuItem - // - this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image"))); - this.openToolStripMenuItem.Name = "openToolStripMenuItem"; - this.openToolStripMenuItem.Size = new System.Drawing.Size(123, 22); - this.openToolStripMenuItem.Text = "&Open..."; - this.openToolStripMenuItem.Click += new System.EventHandler(this.OpenClicked); - // - // saveToolStripMenuItem - // - this.saveToolStripMenuItem.Enabled = false; - this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image"))); - this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; - this.saveToolStripMenuItem.Size = new System.Drawing.Size(123, 22); - this.saveToolStripMenuItem.Text = "&Save"; - this.saveToolStripMenuItem.Click += new System.EventHandler(this.SaveClicked); - // - // saveAsToolStripMenuItem - // - this.saveAsToolStripMenuItem.Enabled = false; - this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; - this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(123, 22); - this.saveAsToolStripMenuItem.Text = "Save &As..."; - this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.SaveAsClicked); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(120, 6); - // - // toolStripMenuItem1 - // - this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.cCRedAlertMapToolStripMenuItem, - this.bitmapToolStripMenuItem}); - this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(123, 22); - this.toolStripMenuItem1.Text = "&Import"; - // - // cCRedAlertMapToolStripMenuItem - // - this.cCRedAlertMapToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cCRedAlertMapToolStripMenuItem.Image"))); - this.cCRedAlertMapToolStripMenuItem.Name = "cCRedAlertMapToolStripMenuItem"; - this.cCRedAlertMapToolStripMenuItem.Size = new System.Drawing.Size(195, 22); - this.cCRedAlertMapToolStripMenuItem.Text = "&C&&C / Red Alert Map..."; - this.cCRedAlertMapToolStripMenuItem.Click += new System.EventHandler(this.ImportLegacyMapClicked); - // - // bitmapToolStripMenuItem - // - this.bitmapToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("bitmapToolStripMenuItem.Image"))); - this.bitmapToolStripMenuItem.Name = "bitmapToolStripMenuItem"; - this.bitmapToolStripMenuItem.Size = new System.Drawing.Size(195, 22); - this.bitmapToolStripMenuItem.Text = "&Bitmap..."; - this.bitmapToolStripMenuItem.Visible = false; - // - // mnuExport - // - this.mnuExport.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.mnuMinimapToPNG}); - this.mnuExport.Name = "mnuExport"; - this.mnuExport.Size = new System.Drawing.Size(123, 22); - this.mnuExport.Text = "&Export"; - // - // mnuMinimapToPNG - // - this.mnuMinimapToPNG.Enabled = false; - this.mnuMinimapToPNG.Image = ((System.Drawing.Image)(resources.GetObject("mnuMinimapToPNG.Image"))); - this.mnuMinimapToPNG.Name = "mnuMinimapToPNG"; - this.mnuMinimapToPNG.Size = new System.Drawing.Size(163, 22); - this.mnuMinimapToPNG.Text = "Minimap to PNG"; - this.mnuMinimapToPNG.Click += new System.EventHandler(this.ExportMinimap); - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(120, 6); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(123, 22); - this.exitToolStripMenuItem.Text = "E&xit"; - this.exitToolStripMenuItem.Click += new System.EventHandler(this.CloseClicked); - // - // mapToolStripMenuItem - // - this.mapToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.propertiesToolStripMenuItem, - this.resizeToolStripMenuItem, - this.showActorNamesToolStripMenuItem}); - this.mapToolStripMenuItem.Name = "mapToolStripMenuItem"; - this.mapToolStripMenuItem.Size = new System.Drawing.Size(43, 23); - this.mapToolStripMenuItem.Text = "&Map"; - // - // propertiesToolStripMenuItem - // - this.propertiesToolStripMenuItem.Enabled = false; - this.propertiesToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("propertiesToolStripMenuItem.Image"))); - this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem"; - this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(175, 22); - this.propertiesToolStripMenuItem.Text = "&Properties..."; - this.propertiesToolStripMenuItem.Click += new System.EventHandler(this.PropertiesClicked); - // - // resizeToolStripMenuItem - // - this.resizeToolStripMenuItem.Enabled = false; - this.resizeToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("resizeToolStripMenuItem.Image"))); - this.resizeToolStripMenuItem.Name = "resizeToolStripMenuItem"; - this.resizeToolStripMenuItem.Size = new System.Drawing.Size(175, 22); - this.resizeToolStripMenuItem.Text = "&Resize..."; - this.resizeToolStripMenuItem.Click += new System.EventHandler(this.ResizeClicked); - // - // toolStripComboBox1 - // - this.toolStripComboBox1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; - this.toolStripComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.toolStripComboBox1.Name = "toolStripComboBox1"; - this.toolStripComboBox1.Size = new System.Drawing.Size(121, 23); - // - // toolStripLabel1 - // - this.toolStripLabel1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; - this.toolStripLabel1.Name = "toolStripLabel1"; - this.toolStripLabel1.Size = new System.Drawing.Size(71, 20); - this.toolStripLabel1.Text = "Active Mod:"; - // - // statusStrip1 - // - this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripStatusLabelFiller, - this.toolStripStatusLabelMousePosition}); - this.statusStrip1.Location = new System.Drawing.Point(0, 751); - this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(985, 22); - this.statusStrip1.TabIndex = 7; - this.statusStrip1.Text = "statusStrip1"; - // - // toolStripStatusLabelFiller - // - this.toolStripStatusLabelFiller.Name = "toolStripStatusLabelFiller"; - this.toolStripStatusLabelFiller.Size = new System.Drawing.Size(948, 17); - this.toolStripStatusLabelFiller.Spring = true; - // - // toolStripStatusLabelMousePosition - // - this.toolStripStatusLabelMousePosition.Name = "toolStripStatusLabelMousePosition"; - this.toolStripStatusLabelMousePosition.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.toolStripStatusLabelMousePosition.Size = new System.Drawing.Size(22, 17); - this.toolStripStatusLabelMousePosition.Text = "0,0"; - // - // showActorNamesToolStripMenuItem - // - this.showActorNamesToolStripMenuItem.Name = "showActorNamesToolStripMenuItem"; - this.showActorNamesToolStripMenuItem.Size = new System.Drawing.Size(175, 22); - this.showActorNamesToolStripMenuItem.Text = "Show Actor &Names"; - this.showActorNamesToolStripMenuItem.Click += new System.EventHandler(this.ShowActorNamesClicked); - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(985, 773); - this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.splitContainer3); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.KeyPreview = true; - this.MainMenuStrip = this.menuStrip1; - this.Name = "Form1"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "OpenRA Editor"; - this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - this.splitContainer1.ResumeLayout(false); - this.splitContainer2.Panel1.ResumeLayout(false); - this.splitContainer2.Panel2.ResumeLayout(false); - this.splitContainer2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pmMiniMap)).EndInit(); - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.tabPage2.ResumeLayout(false); - this.tabPage3.ResumeLayout(false); - this.splitContainer3.Panel1.ResumeLayout(false); - this.splitContainer3.Panel1.PerformLayout(); - this.splitContainer3.Panel2.ResumeLayout(false); - this.splitContainer3.ResumeLayout(false); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.statusStrip1.ResumeLayout(false); - this.statusStrip1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.ToolTip tt; - private System.Windows.Forms.TabControl tabControl1; - private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.FlowLayoutPanel tilePalette; - private System.Windows.Forms.TabPage tabPage2; - private System.Windows.Forms.FlowLayoutPanel actorPalette; - private System.Windows.Forms.TabPage tabPage3; - private System.Windows.Forms.FlowLayoutPanel resourcePalette; - private Surface surface1; - private System.Windows.Forms.PictureBox pmMiniMap; - private System.Windows.Forms.SplitContainer splitContainer2; - private System.Windows.Forms.SaveFileDialog saveFileDialog; - private System.Windows.Forms.SplitContainer splitContainer3; - private System.Windows.Forms.StatusStrip statusStrip1; - private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelMousePosition; - private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelFiller; - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; - private System.Windows.Forms.ToolStripMenuItem cCRedAlertMapToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem bitmapToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem mnuExport; - private System.Windows.Forms.ToolStripMenuItem mnuMinimapToPNG; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem mapToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem resizeToolStripMenuItem; - private System.Windows.Forms.ToolStripLabel toolStripLabel1; - private System.Windows.Forms.ToolStripComboBox toolStripComboBox1; - private System.Windows.Forms.ToolStripMenuItem showActorNamesToolStripMenuItem; - - } -} - +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.Editor +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.pmMiniMap = new System.Windows.Forms.PictureBox(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tilePalette = new System.Windows.Forms.FlowLayoutPanel(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.actorPalette = new System.Windows.Forms.FlowLayoutPanel(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.resourcePalette = new System.Windows.Forms.FlowLayoutPanel(); + this.surface1 = new OpenRA.Editor.Surface(); + this.tt = new System.Windows.Forms.ToolTip(this.components); + this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.cCRedAlertMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bitmapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mnuExport = new System.Windows.Forms.ToolStripMenuItem(); + this.mnuMinimapToPNG = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.propertiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.resizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripComboBox1 = new System.Windows.Forms.ToolStripComboBox(); + this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabelFiller = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabelMousePosition = new System.Windows.Forms.ToolStripStatusLabel(); + this.showActorNamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pmMiniMap)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.statusStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.surface1); + this.splitContainer1.Size = new System.Drawing.Size(985, 744); + this.splitContainer1.SplitterDistance = 198; + this.splitContainer1.TabIndex = 0; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.pmMiniMap); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.tabControl1); + this.splitContainer2.Size = new System.Drawing.Size(198, 744); + this.splitContainer2.SplitterDistance = 164; + this.splitContainer2.TabIndex = 1; + // + // pmMiniMap + // + this.pmMiniMap.BackColor = System.Drawing.Color.Black; + this.pmMiniMap.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.pmMiniMap.Dock = System.Windows.Forms.DockStyle.Fill; + this.pmMiniMap.Location = new System.Drawing.Point(0, 0); + this.pmMiniMap.Name = "pmMiniMap"; + this.pmMiniMap.Size = new System.Drawing.Size(198, 164); + this.pmMiniMap.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pmMiniMap.TabIndex = 1; + this.pmMiniMap.TabStop = false; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Controls.Add(this.tabPage3); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); + this.tabControl1.Multiline = true; + this.tabControl1.Name = "tabControl1"; + this.tabControl1.Padding = new System.Drawing.Point(6, 0); + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(198, 576); + this.tabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.tilePalette); + this.tabPage1.Location = new System.Drawing.Point(4, 20); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(190, 552); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Templates"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tilePalette + // + this.tilePalette.AutoScroll = true; + this.tilePalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tilePalette.Dock = System.Windows.Forms.DockStyle.Fill; + this.tilePalette.Location = new System.Drawing.Point(3, 3); + this.tilePalette.Name = "tilePalette"; + this.tilePalette.Size = new System.Drawing.Size(184, 546); + this.tilePalette.TabIndex = 1; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.actorPalette); + this.tabPage2.Location = new System.Drawing.Point(4, 20); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(190, 552); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Actors"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // actorPalette + // + this.actorPalette.AutoScroll = true; + this.actorPalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.actorPalette.Dock = System.Windows.Forms.DockStyle.Fill; + this.actorPalette.Location = new System.Drawing.Point(3, 3); + this.actorPalette.Name = "actorPalette"; + this.actorPalette.Size = new System.Drawing.Size(184, 546); + this.actorPalette.TabIndex = 2; + // + // tabPage3 + // + this.tabPage3.Controls.Add(this.resourcePalette); + this.tabPage3.Location = new System.Drawing.Point(4, 20); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Size = new System.Drawing.Size(190, 552); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "Resources"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // resourcePalette + // + this.resourcePalette.AutoScroll = true; + this.resourcePalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.resourcePalette.Dock = System.Windows.Forms.DockStyle.Fill; + this.resourcePalette.Location = new System.Drawing.Point(0, 0); + this.resourcePalette.Name = "resourcePalette"; + this.resourcePalette.Size = new System.Drawing.Size(190, 552); + this.resourcePalette.TabIndex = 3; + // + // surface1 + // + this.surface1.BackColor = System.Drawing.Color.Black; + this.surface1.Dock = System.Windows.Forms.DockStyle.Fill; + this.surface1.Location = new System.Drawing.Point(0, 0); + this.surface1.Name = "surface1"; + this.surface1.Size = new System.Drawing.Size(783, 744); + this.surface1.TabIndex = 5; + this.surface1.Text = "surface1"; + // + // tt + // + this.tt.ShowAlways = true; + // + // saveFileDialog + // + this.saveFileDialog.DefaultExt = "*.png"; + this.saveFileDialog.Filter = "PNG Image (*.png)|"; + this.saveFileDialog.Title = "Export minimap to PNG"; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer3.IsSplitterFixed = true; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.menuStrip1); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.splitContainer1); + this.splitContainer3.Size = new System.Drawing.Size(985, 773); + this.splitContainer3.SplitterDistance = 25; + this.splitContainer3.TabIndex = 6; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.mapToolStripMenuItem, + this.toolStripComboBox1, + this.toolStripLabel1}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(985, 27); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.toolStripSeparator1, + this.openToolStripMenuItem, + this.saveToolStripMenuItem, + this.saveAsToolStripMenuItem, + this.toolStripSeparator2, + this.toolStripMenuItem1, + this.mnuExport, + this.toolStripSeparator3, + this.exitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 23); + this.fileToolStripMenuItem.Text = "&File"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image"))); + this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Fuchsia; + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.Size = new System.Drawing.Size(123, 22); + this.newToolStripMenuItem.Text = "&New..."; + this.newToolStripMenuItem.Click += new System.EventHandler(this.NewClicked); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(120, 6); + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image"))); + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.Size = new System.Drawing.Size(123, 22); + this.openToolStripMenuItem.Text = "&Open..."; + this.openToolStripMenuItem.Click += new System.EventHandler(this.OpenClicked); + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Enabled = false; + this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image"))); + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.Size = new System.Drawing.Size(123, 22); + this.saveToolStripMenuItem.Text = "&Save"; + this.saveToolStripMenuItem.Click += new System.EventHandler(this.SaveClicked); + // + // saveAsToolStripMenuItem + // + this.saveAsToolStripMenuItem.Enabled = false; + this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; + this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(123, 22); + this.saveAsToolStripMenuItem.Text = "Save &As..."; + this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.SaveAsClicked); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(120, 6); + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.cCRedAlertMapToolStripMenuItem, + this.bitmapToolStripMenuItem}); + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(123, 22); + this.toolStripMenuItem1.Text = "&Import"; + // + // cCRedAlertMapToolStripMenuItem + // + this.cCRedAlertMapToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cCRedAlertMapToolStripMenuItem.Image"))); + this.cCRedAlertMapToolStripMenuItem.Name = "cCRedAlertMapToolStripMenuItem"; + this.cCRedAlertMapToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.cCRedAlertMapToolStripMenuItem.Text = "&C&&C / Red Alert Map..."; + this.cCRedAlertMapToolStripMenuItem.Click += new System.EventHandler(this.ImportLegacyMapClicked); + // + // bitmapToolStripMenuItem + // + this.bitmapToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("bitmapToolStripMenuItem.Image"))); + this.bitmapToolStripMenuItem.Name = "bitmapToolStripMenuItem"; + this.bitmapToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.bitmapToolStripMenuItem.Text = "&Bitmap..."; + this.bitmapToolStripMenuItem.Visible = false; + // + // mnuExport + // + this.mnuExport.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.mnuMinimapToPNG}); + this.mnuExport.Name = "mnuExport"; + this.mnuExport.Size = new System.Drawing.Size(123, 22); + this.mnuExport.Text = "&Export"; + // + // mnuMinimapToPNG + // + this.mnuMinimapToPNG.Enabled = false; + this.mnuMinimapToPNG.Image = ((System.Drawing.Image)(resources.GetObject("mnuMinimapToPNG.Image"))); + this.mnuMinimapToPNG.Name = "mnuMinimapToPNG"; + this.mnuMinimapToPNG.Size = new System.Drawing.Size(163, 22); + this.mnuMinimapToPNG.Text = "Minimap to PNG"; + this.mnuMinimapToPNG.Click += new System.EventHandler(this.ExportMinimap); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(120, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(123, 22); + this.exitToolStripMenuItem.Text = "E&xit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.CloseClicked); + // + // mapToolStripMenuItem + // + this.mapToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.propertiesToolStripMenuItem, + this.resizeToolStripMenuItem, + this.showActorNamesToolStripMenuItem}); + this.mapToolStripMenuItem.Name = "mapToolStripMenuItem"; + this.mapToolStripMenuItem.Size = new System.Drawing.Size(43, 23); + this.mapToolStripMenuItem.Text = "&Map"; + // + // propertiesToolStripMenuItem + // + this.propertiesToolStripMenuItem.Enabled = false; + this.propertiesToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("propertiesToolStripMenuItem.Image"))); + this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem"; + this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(175, 22); + this.propertiesToolStripMenuItem.Text = "&Properties..."; + this.propertiesToolStripMenuItem.Click += new System.EventHandler(this.PropertiesClicked); + // + // resizeToolStripMenuItem + // + this.resizeToolStripMenuItem.Enabled = false; + this.resizeToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("resizeToolStripMenuItem.Image"))); + this.resizeToolStripMenuItem.Name = "resizeToolStripMenuItem"; + this.resizeToolStripMenuItem.Size = new System.Drawing.Size(175, 22); + this.resizeToolStripMenuItem.Text = "&Resize..."; + this.resizeToolStripMenuItem.Click += new System.EventHandler(this.ResizeClicked); + // + // toolStripComboBox1 + // + this.toolStripComboBox1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.toolStripComboBox1.Name = "toolStripComboBox1"; + this.toolStripComboBox1.Size = new System.Drawing.Size(121, 23); + // + // toolStripLabel1 + // + this.toolStripLabel1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripLabel1.Name = "toolStripLabel1"; + this.toolStripLabel1.Size = new System.Drawing.Size(71, 20); + this.toolStripLabel1.Text = "Active Mod:"; + // + // statusStrip1 + // + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabelFiller, + this.toolStripStatusLabelMousePosition}); + this.statusStrip1.Location = new System.Drawing.Point(0, 751); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(985, 22); + this.statusStrip1.TabIndex = 7; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabelFiller + // + this.toolStripStatusLabelFiller.Name = "toolStripStatusLabelFiller"; + this.toolStripStatusLabelFiller.Size = new System.Drawing.Size(948, 17); + this.toolStripStatusLabelFiller.Spring = true; + // + // toolStripStatusLabelMousePosition + // + this.toolStripStatusLabelMousePosition.Name = "toolStripStatusLabelMousePosition"; + this.toolStripStatusLabelMousePosition.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.toolStripStatusLabelMousePosition.Size = new System.Drawing.Size(22, 17); + this.toolStripStatusLabelMousePosition.Text = "0,0"; + // + // showActorNamesToolStripMenuItem + // + this.showActorNamesToolStripMenuItem.Name = "showActorNamesToolStripMenuItem"; + this.showActorNamesToolStripMenuItem.Size = new System.Drawing.Size(175, 22); + this.showActorNamesToolStripMenuItem.Text = "Show Actor &Names"; + this.showActorNamesToolStripMenuItem.Click += new System.EventHandler(this.ShowActorNamesClicked); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(985, 773); + this.Controls.Add(this.statusStrip1); + this.Controls.Add(this.splitContainer3); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "OpenRA Editor"; + this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pmMiniMap)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.tabPage3.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel1.PerformLayout(); + this.splitContainer3.Panel2.ResumeLayout(false); + this.splitContainer3.ResumeLayout(false); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.ToolTip tt; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.FlowLayoutPanel tilePalette; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.FlowLayoutPanel actorPalette; + private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.FlowLayoutPanel resourcePalette; + private Surface surface1; + private System.Windows.Forms.PictureBox pmMiniMap; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.SaveFileDialog saveFileDialog; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelMousePosition; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelFiller; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem cCRedAlertMapToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem bitmapToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem mnuExport; + private System.Windows.Forms.ToolStripMenuItem mnuMinimapToPNG; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem mapToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem resizeToolStripMenuItem; + private System.Windows.Forms.ToolStripLabel toolStripLabel1; + private System.Windows.Forms.ToolStripComboBox toolStripComboBox1; + private System.Windows.Forms.ToolStripMenuItem showActorNamesToolStripMenuItem; + + } +} + diff --git a/OpenRA.Editor/Form1.cs b/OpenRA.Editor/Form1.cs index dd78d4d3c4..ad08af801d 100755 --- a/OpenRA.Editor/Form1.cs +++ b/OpenRA.Editor/Form1.cs @@ -386,14 +386,14 @@ namespace OpenRA.Editor * but something's not right internally in it, unless loaded via the real maploader */ var savePath = Path.Combine(Path.GetTempPath(), "OpenRA.Import"); - Directory.CreateDirectory(savePath); - - var errors = new List(); - - var map = LegacyMapImporter.Import(ofd.FileName, a => errors.Add(a)); - - if (errors.Count > 0) - using (var eld = new ErrorListDialog(errors)) + Directory.CreateDirectory(savePath); + + var errors = new List(); + + var map = LegacyMapImporter.Import(ofd.FileName, a => errors.Add(a)); + + if (errors.Count > 0) + using (var eld = new ErrorListDialog(errors)) eld.ShowDialog(); if (!map.Players.ContainsKey("Neutral")) @@ -441,12 +441,12 @@ namespace OpenRA.Editor if (DialogResult.OK == saveFileDialog.ShowDialog()) pmMiniMap.Image.Save(saveFileDialog.FileName); - } - - void ShowActorNamesClicked(object sender, EventArgs e) - { - showActorNamesToolStripMenuItem.Checked ^= true; - surface1.ShowActorNames = showActorNamesToolStripMenuItem.Checked; + } + + void ShowActorNamesClicked(object sender, EventArgs e) + { + showActorNamesToolStripMenuItem.Checked ^= true; + surface1.ShowActorNames = showActorNamesToolStripMenuItem.Checked; } } } diff --git a/OpenRA.Editor/Form1.resx b/OpenRA.Editor/Form1.resx index 4b24bdacaa..e21860adab 100755 --- a/OpenRA.Editor/Form1.resx +++ b/OpenRA.Editor/Form1.resx @@ -1,543 +1,543 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 76, 17 - - - 198, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHNSURBVDhPjZNdTxNREIb5LV54azSRxJ8gt95445XGa/8A - CU0MMVgIWNmgRSioGN0AapQaISAWrEaITQTkQyhL2WbbWtt1+7ll+7h7SDdBocskk3Mm58xzZt7JaWmx - bTdyk9/rPsz0fbYmz2JqfvSdHhJLPpxzTzMUid13F0D3k/h41V57iU+dI7/dfTqA8zKGBLUohjpurxER - 7/24i/RkSnj/47csLsWOB27IZ1DmrlDQJrHIU8q8EbE63UrD7oVe09p243iIqEAPQGVOQJxKRJwfdgE9 - gxO8X1wRkIWv/1Ri7A0QD5/HSrWT/HTNTgwIDapayAV0DTwXyQ0/IqwSvXU4hWQn6uwl4usPKCl9pGI+ - F2DV6zwaX2BQjgjIiZPpHXrpJjU2di7lao2sX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MEBRQBAQEVAAAAJRwl - KoJSeY7ubKLI/3Cjwv9WfKz/isPg/16Qvf86cZ//DRQlZAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAEAAAABAAAABgAAAA4DAwQ+ERcaa0BccbdWfpDWZY+092GVtvsJDxE3AAAAAQAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAABQAAABYLEBJGHC02gQAAAAYAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAADwD4MD8AeAA+AAAAfgAAAH4AAAD+AAAAPAAAAAgAAAAIAAAACAAAAAgAAAAIAA - AACAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAwAAAAMAAAAHAAAABwAAAAIAAAACAAAAD4AA - AA/4AAAf/4AAH//wAB///gAf///wPw== - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 76, 17 + + + 198, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHNSURBVDhPjZNdTxNREIb5LV54azSRxJ8gt95445XGa/8A + CU0MMVgIWNmgRSioGN0AapQaISAWrEaITQTkQyhL2WbbWt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9po8r/WYq5/4nN5/4rSGe7AAAADQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAuFB0ieE9zhsNonLbpXo+k32SNo+CQxeD9ldHu/4K9 + 3P9fkbz/Un6x/4jA4P9vocn/S4Wv/ypEU4wAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAABQMEBRQBAQEVAAAAJRwl + KoJSeY7ubKLI/3Cjwv9WfKz/isPg/16Qvf86cZ//DRQlZAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAEAAAABAAAABgAAAA4DAwQ+ERcaa0BccbdWfpDWZY+092GVtvsJDxE3AAAAAQAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAABQAAABYLEBJGHC02gQAAAAYAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAADwD4MD8AeAA+AAAAfgAAAH4AAAD+AAAAPAAAAAgAAAAIAAAACAAAAAgAAAAIAA + AACAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAwAAAAMAAAAHAAAABwAAAAIAAAACAAAAD4AA + AA/4AAAf/4AAH//wAB///gAf///wPw== + + \ No newline at end of file diff --git a/OpenRA.Editor/LegacyMapImporter.cs b/OpenRA.Editor/LegacyMapImporter.cs index 2549c129a4..036e7852c1 100644 --- a/OpenRA.Editor/LegacyMapImporter.cs +++ b/OpenRA.Editor/LegacyMapImporter.cs @@ -100,17 +100,17 @@ namespace OpenRA.Editor int MapSize; int ActorCount = 0; Map Map = new Map(); - List Players = new List(); + List Players = new List(); Action errorHandler; LegacyMapImporter(string filename, Action errorHandler) - { + { this.errorHandler = errorHandler; ConvertIniMap(filename); } public static Map Import(string filename, Action errorHandler) - { + { var converter = new LegacyMapImporter(filename, errorHandler); return converter.Map; } @@ -364,45 +364,45 @@ namespace OpenRA.Editor { //Structures: num=owner,type,health,location,turret-facing,trigger //Units: num=owner,type,health,location,facing,action,trigger - //Infantry: num=owner,type,health,location,subcell,action,facing,trigger - - try - { - - var parts = s.Value.Split(','); - var loc = int.Parse(parts[3]); - if (parts[0] == "") - parts[0] = "Neutral"; - - - if (!Players.Contains(parts[0])) - Players.Add(parts[0]); - - var stance = ActorStance.Stance.None; - switch (parts[5]) - { - case "Area Guard": - case "Guard": - stance = ActorStance.Stance.Guard; - break; - case "Defend Base": - stance = ActorStance.Stance.Defend; - break; - case "Hunt": - case "Rampage": - case "Attack Base": - case "Attack Units": - case "Attack Civil.": - case "Attack Tarcom": - stance = ActorStance.Stance.Hunt; - break; - case "Retreat": - case "Return": - stance = ActorStance.Stance.Retreat; - break; - // do we care about `Harvest' and `Sticky'? - } - + //Infantry: num=owner,type,health,location,subcell,action,facing,trigger + + try + { + + var parts = s.Value.Split(','); + var loc = int.Parse(parts[3]); + if (parts[0] == "") + parts[0] = "Neutral"; + + + if (!Players.Contains(parts[0])) + Players.Add(parts[0]); + + var stance = ActorStance.Stance.None; + switch (parts[5]) + { + case "Area Guard": + case "Guard": + stance = ActorStance.Stance.Guard; + break; + case "Defend Base": + stance = ActorStance.Stance.Defend; + break; + case "Hunt": + case "Rampage": + case "Attack Base": + case "Attack Units": + case "Attack Civil.": + case "Attack Tarcom": + stance = ActorStance.Stance.Hunt; + break; + case "Retreat": + case "Return": + stance = ActorStance.Stance.Retreat; + break; + // do we care about `Harvest' and `Sticky'? + } + var actor = new ActorReference(parts[1].ToLowerInvariant()) { new LocationInit(new int2(loc % MapSize, loc / MapSize)), @@ -410,19 +410,19 @@ namespace OpenRA.Editor new HealthInit(float.Parse(parts[2], NumberFormatInfo.InvariantInfo)/256), new FacingInit((section == "INFANTRY") ? int.Parse(parts[6]) : int.Parse(parts[4])), new ActorStanceInit(stance), - }; - - if (section == "INFANTRY") - actor.Add(new SubCellInit(int.Parse(parts[4]))); - - if (!Rules.Info.ContainsKey(parts[1].ToLowerInvariant())) - errorHandler("Ignoring unknown actor type: `{0}`".F(parts[1].ToLowerInvariant())); - else - Map.Actors.Value.Add("Actor" + ActorCount++, actor); - } - catch (Exception) - { - errorHandler("Malformed actor definition: `{0}`".F(s)); + }; + + if (section == "INFANTRY") + actor.Add(new SubCellInit(int.Parse(parts[4]))); + + if (!Rules.Info.ContainsKey(parts[1].ToLowerInvariant())) + errorHandler("Ignoring unknown actor type: `{0}`".F(parts[1].ToLowerInvariant())); + else + Map.Actors.Value.Add("Actor" + ActorCount++, actor); + } + catch (Exception) + { + errorHandler("Malformed actor definition: `{0}`".F(s)); } } } diff --git a/OpenRA.Editor/MapSelect.Designer.cs b/OpenRA.Editor/MapSelect.Designer.cs index ea8c06a828..9184aadb3e 100644 --- a/OpenRA.Editor/MapSelect.Designer.cs +++ b/OpenRA.Editor/MapSelect.Designer.cs @@ -1,375 +1,385 @@ -namespace OpenRA.Editor -{ - partial class MapSelect - { - /// - /// TODO - /// - private System.ComponentModel.IContainer components = null; - - /// - /// TODO - /// - /// TODO - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором форм Windows - - /// - /// TODO - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MapSelect)); - this.MapList = new System.Windows.Forms.ListView(); - this.colMapName = new System.Windows.Forms.ColumnHeader("(отсутствует)"); - this.MapIconsList = new System.Windows.Forms.ImageList(this.components); - this.btnCancel = new System.Windows.Forms.Button(); - this.btnOk = new System.Windows.Forms.Button(); - this.lblNew = new System.Windows.Forms.Label(); - this.txtNew = new System.Windows.Forms.TextBox(); - this.pbMinimap = new System.Windows.Forms.PictureBox(); - this.pnlBottom = new System.Windows.Forms.Panel(); - this.txtPathOut = new System.Windows.Forms.TextBox(); - this.lblPathOut = new System.Windows.Forms.Label(); - this.lblPath = new System.Windows.Forms.Label(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.lblMapList = new System.Windows.Forms.Label(); - this.txtDesc = new System.Windows.Forms.TextBox(); - this.lblDesc = new System.Windows.Forms.Label(); - this.txtTheater = new System.Windows.Forms.TextBox(); - this.lblTheater = new System.Windows.Forms.Label(); - this.txtAuthor = new System.Windows.Forms.TextBox(); - this.lblAuthor = new System.Windows.Forms.Label(); - this.txtTitle = new System.Windows.Forms.TextBox(); - this.lblMapName = new System.Windows.Forms.Label(); - this.lblMinimap = new System.Windows.Forms.Label(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - ((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).BeginInit(); - this.pnlBottom.SuspendLayout(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // MapList - // - this.MapList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.MapList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.colMapName}); - this.MapList.FullRowSelect = true; - this.MapList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.MapList.LargeImageList = this.MapIconsList; - this.MapList.Location = new System.Drawing.Point(15, 25); - this.MapList.MultiSelect = false; - this.MapList.Name = "MapList"; - this.MapList.Size = new System.Drawing.Size(273, 294); - this.MapList.SmallImageList = this.MapIconsList; - this.MapList.StateImageList = this.MapIconsList; - this.MapList.TabIndex = 0; - this.MapList.UseCompatibleStateImageBehavior = false; - this.MapList.View = System.Windows.Forms.View.Details; - this.MapList.SelectedIndexChanged += new System.EventHandler(this.MapList_SelectedIndexChanged); - // - // colMapName - // - this.colMapName.Text = "Map name"; - this.colMapName.Width = 240; - // - // MapIconsList - // - this.MapIconsList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; - this.MapIconsList.ImageSize = new System.Drawing.Size(24, 24); - this.MapIconsList.TransparentColor = System.Drawing.Color.Transparent; - // - // btnCancel - // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(407, 35); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 3; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - // - // btnOk - // - this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOk.Location = new System.Drawing.Point(326, 35); - this.btnOk.Name = "btnOk"; - this.btnOk.Size = new System.Drawing.Size(75, 23); - this.btnOk.TabIndex = 2; - this.btnOk.Text = "Open"; - this.btnOk.UseVisualStyleBackColor = true; - // - // lblNew - // - this.lblNew.AutoSize = true; - this.lblNew.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.lblNew.Location = new System.Drawing.Point(12, 40); - this.lblNew.Name = "lblNew"; - this.lblNew.Size = new System.Drawing.Size(69, 13); - this.lblNew.TabIndex = 3; - this.lblNew.Text = "Map name:"; - // - // txtNew - // - this.txtNew.BackColor = System.Drawing.SystemColors.Window; - this.txtNew.Location = new System.Drawing.Point(88, 37); - this.txtNew.Name = "txtNew"; - this.txtNew.ReadOnly = true; - this.txtNew.Size = new System.Drawing.Size(232, 20); - this.txtNew.TabIndex = 1; - // - // pbMinimap - // - this.pbMinimap.BackColor = System.Drawing.Color.Black; - this.pbMinimap.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.pbMinimap.Location = new System.Drawing.Point(32, 25); - this.pbMinimap.Name = "pbMinimap"; - this.pbMinimap.Size = new System.Drawing.Size(124, 124); - this.pbMinimap.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pbMinimap.TabIndex = 5; - this.pbMinimap.TabStop = false; - // - // pnlBottom - // - this.pnlBottom.Controls.Add(this.pictureBox1); - this.pnlBottom.Controls.Add(this.txtPathOut); - this.pnlBottom.Controls.Add(this.lblPathOut); - this.pnlBottom.Controls.Add(this.lblPath); - this.pnlBottom.Controls.Add(this.btnCancel); - this.pnlBottom.Controls.Add(this.btnOk); - this.pnlBottom.Controls.Add(this.txtNew); - this.pnlBottom.Controls.Add(this.lblNew); - this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlBottom.Location = new System.Drawing.Point(0, 332); - this.pnlBottom.MaximumSize = new System.Drawing.Size(0, 70); - this.pnlBottom.Name = "pnlBottom"; - this.pnlBottom.Size = new System.Drawing.Size(494, 70); - this.pnlBottom.TabIndex = 6; - // - // txtPathOut - // - this.txtPathOut.BackColor = System.Drawing.SystemColors.Window; - this.txtPathOut.Location = new System.Drawing.Point(55, 10); - this.txtPathOut.Name = "txtPathOut"; - this.txtPathOut.ReadOnly = true; - this.txtPathOut.Size = new System.Drawing.Size(265, 20); - this.txtPathOut.TabIndex = 0; - this.txtPathOut.TextChanged += new System.EventHandler(this.txtPathOut_TextChanged); - // - // lblPathOut - // - this.lblPathOut.AutoSize = true; - this.lblPathOut.Location = new System.Drawing.Point(55, 13); - this.lblPathOut.Name = "lblPathOut"; - this.lblPathOut.Size = new System.Drawing.Size(0, 13); - this.lblPathOut.TabIndex = 6; - // - // lblPath - // - this.lblPath.AutoSize = true; - this.lblPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.lblPath.Location = new System.Drawing.Point(12, 13); - this.lblPath.Name = "lblPath"; - this.lblPath.Size = new System.Drawing.Size(37, 13); - this.lblPath.TabIndex = 5; - this.lblPath.Text = "Path:"; - // - // splitContainer1 - // - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.Location = new System.Drawing.Point(0, 0); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.lblMapList); - this.splitContainer1.Panel1.Controls.Add(this.MapList); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.txtDesc); - this.splitContainer1.Panel2.Controls.Add(this.lblDesc); - this.splitContainer1.Panel2.Controls.Add(this.txtTheater); - this.splitContainer1.Panel2.Controls.Add(this.lblTheater); - this.splitContainer1.Panel2.Controls.Add(this.txtAuthor); - this.splitContainer1.Panel2.Controls.Add(this.lblAuthor); - this.splitContainer1.Panel2.Controls.Add(this.txtTitle); - this.splitContainer1.Panel2.Controls.Add(this.lblMapName); - this.splitContainer1.Panel2.Controls.Add(this.lblMinimap); - this.splitContainer1.Panel2.Controls.Add(this.pbMinimap); - this.splitContainer1.Size = new System.Drawing.Size(494, 332); - this.splitContainer1.SplitterDistance = 300; - this.splitContainer1.TabIndex = 7; - // - // lblMapList - // - this.lblMapList.AutoSize = true; - this.lblMapList.Location = new System.Drawing.Point(12, 9); - this.lblMapList.Name = "lblMapList"; - this.lblMapList.Size = new System.Drawing.Size(81, 13); - this.lblMapList.TabIndex = 1; - this.lblMapList.Text = "Available maps:"; - // - // txtDesc - // - this.txtDesc.BackColor = System.Drawing.SystemColors.ButtonFace; - this.txtDesc.Location = new System.Drawing.Point(16, 289); - this.txtDesc.Name = "txtDesc"; - this.txtDesc.ReadOnly = true; - this.txtDesc.Size = new System.Drawing.Size(162, 20); - this.txtDesc.TabIndex = 14; - // - // lblDesc - // - this.lblDesc.AutoSize = true; - this.lblDesc.Location = new System.Drawing.Point(13, 273); - this.lblDesc.Name = "lblDesc"; - this.lblDesc.Size = new System.Drawing.Size(63, 13); - this.lblDesc.TabIndex = 13; - this.lblDesc.Text = "Description:"; - // - // txtTheater - // - this.txtTheater.BackColor = System.Drawing.SystemColors.ButtonFace; - this.txtTheater.Location = new System.Drawing.Point(16, 252); - this.txtTheater.Name = "txtTheater"; - this.txtTheater.ReadOnly = true; - this.txtTheater.Size = new System.Drawing.Size(162, 20); - this.txtTheater.TabIndex = 12; - // - // lblTheater - // - this.lblTheater.AutoSize = true; - this.lblTheater.Location = new System.Drawing.Point(13, 236); - this.lblTheater.Name = "lblTheater"; - this.lblTheater.Size = new System.Drawing.Size(47, 13); - this.lblTheater.TabIndex = 11; - this.lblTheater.Text = "Tileset:"; - // - // txtAuthor - // - this.txtAuthor.BackColor = System.Drawing.SystemColors.ButtonFace; - this.txtAuthor.Location = new System.Drawing.Point(16, 214); - this.txtAuthor.Name = "txtAuthor"; - this.txtAuthor.ReadOnly = true; - this.txtAuthor.Size = new System.Drawing.Size(162, 20); - this.txtAuthor.TabIndex = 10; - // - // lblAuthor - // - this.lblAuthor.AutoSize = true; - this.lblAuthor.Location = new System.Drawing.Point(13, 198); - this.lblAuthor.Name = "lblAuthor"; - this.lblAuthor.Size = new System.Drawing.Size(41, 13); - this.lblAuthor.TabIndex = 9; - this.lblAuthor.Text = "Author:"; - // - // txtTitle - // - this.txtTitle.BackColor = System.Drawing.SystemColors.ButtonFace; - this.txtTitle.Location = new System.Drawing.Point(16, 177); - this.txtTitle.Name = "txtTitle"; - this.txtTitle.ReadOnly = true; - this.txtTitle.Size = new System.Drawing.Size(162, 20); - this.txtTitle.TabIndex = 8; - // - // lblMapName - // - this.lblMapName.AutoSize = true; - this.lblMapName.Location = new System.Drawing.Point(13, 161); - this.lblMapName.Name = "lblMapName"; - this.lblMapName.Size = new System.Drawing.Size(30, 13); - this.lblMapName.TabIndex = 7; - this.lblMapName.Text = "Title:"; - // - // lblMinimap - // - this.lblMinimap.AutoSize = true; - this.lblMinimap.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.lblMinimap.Location = new System.Drawing.Point(29, 9); - this.lblMinimap.Name = "lblMinimap"; - this.lblMinimap.Size = new System.Drawing.Size(71, 13); - this.lblMinimap.TabIndex = 6; - this.lblMinimap.Text = "Map preview:"; - // - // pictureBox1 - // - this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); - this.pictureBox1.Location = new System.Drawing.Point(336, -9); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(54, 35); - this.pictureBox1.TabIndex = 7; - this.pictureBox1.TabStop = false; - this.pictureBox1.Visible = false; - // - // MapSelect - // - this.AcceptButton = this.btnOk; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(494, 402); - this.Controls.Add(this.splitContainer1); - this.Controls.Add(this.pnlBottom); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "MapSelect"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Select map"; - this.Load += new System.EventHandler(this.MapSelect_Load); - ((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).EndInit(); - this.pnlBottom.ResumeLayout(false); - this.pnlBottom.PerformLayout(); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel1.PerformLayout(); - this.splitContainer1.Panel2.ResumeLayout(false); - this.splitContainer1.Panel2.PerformLayout(); - this.splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - public System.Windows.Forms.ListView MapList; - public System.Windows.Forms.Button btnCancel; - public System.Windows.Forms.Button btnOk; - public System.Windows.Forms.Label lblNew; - public System.Windows.Forms.TextBox txtNew; - public System.Windows.Forms.ColumnHeader colMapName; - public System.Windows.Forms.ImageList MapIconsList; - public System.Windows.Forms.PictureBox pbMinimap; - public System.Windows.Forms.Panel pnlBottom; - public System.Windows.Forms.SplitContainer splitContainer1; - public System.Windows.Forms.Label lblMinimap; - public System.Windows.Forms.TextBox txtTheater; - public System.Windows.Forms.Label lblTheater; - public System.Windows.Forms.TextBox txtAuthor; - public System.Windows.Forms.Label lblAuthor; - public System.Windows.Forms.TextBox txtTitle; - public System.Windows.Forms.Label lblMapName; - public System.Windows.Forms.TextBox txtDesc; - public System.Windows.Forms.Label lblDesc; - public System.Windows.Forms.Label lblMapList; - public System.Windows.Forms.Label lblPathOut; - public System.Windows.Forms.Label lblPath; - public System.Windows.Forms.TextBox txtPathOut; - private System.Windows.Forms.PictureBox pictureBox1; - } +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.Editor +{ + partial class MapSelect + { + /// + /// TODO + /// + private System.ComponentModel.IContainer components = null; + + /// + /// TODO + /// + /// TODO + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// TODO + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MapSelect)); + this.MapList = new System.Windows.Forms.ListView(); + this.colMapName = new System.Windows.Forms.ColumnHeader("(отсутствует)"); + this.MapIconsList = new System.Windows.Forms.ImageList(this.components); + this.btnCancel = new System.Windows.Forms.Button(); + this.btnOk = new System.Windows.Forms.Button(); + this.lblNew = new System.Windows.Forms.Label(); + this.txtNew = new System.Windows.Forms.TextBox(); + this.pbMinimap = new System.Windows.Forms.PictureBox(); + this.pnlBottom = new System.Windows.Forms.Panel(); + this.txtPathOut = new System.Windows.Forms.TextBox(); + this.lblPathOut = new System.Windows.Forms.Label(); + this.lblPath = new System.Windows.Forms.Label(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.lblMapList = new System.Windows.Forms.Label(); + this.txtDesc = new System.Windows.Forms.TextBox(); + this.lblDesc = new System.Windows.Forms.Label(); + this.txtTheater = new System.Windows.Forms.TextBox(); + this.lblTheater = new System.Windows.Forms.Label(); + this.txtAuthor = new System.Windows.Forms.TextBox(); + this.lblAuthor = new System.Windows.Forms.Label(); + this.txtTitle = new System.Windows.Forms.TextBox(); + this.lblMapName = new System.Windows.Forms.Label(); + this.lblMinimap = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).BeginInit(); + this.pnlBottom.SuspendLayout(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // MapList + // + this.MapList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.MapList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.colMapName}); + this.MapList.FullRowSelect = true; + this.MapList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.MapList.LargeImageList = this.MapIconsList; + this.MapList.Location = new System.Drawing.Point(15, 25); + this.MapList.MultiSelect = false; + this.MapList.Name = "MapList"; + this.MapList.Size = new System.Drawing.Size(273, 294); + this.MapList.SmallImageList = this.MapIconsList; + this.MapList.StateImageList = this.MapIconsList; + this.MapList.TabIndex = 0; + this.MapList.UseCompatibleStateImageBehavior = false; + this.MapList.View = System.Windows.Forms.View.Details; + this.MapList.SelectedIndexChanged += new System.EventHandler(this.MapList_SelectedIndexChanged); + // + // colMapName + // + this.colMapName.Text = "Map name"; + this.colMapName.Width = 240; + // + // MapIconsList + // + this.MapIconsList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; + this.MapIconsList.ImageSize = new System.Drawing.Size(24, 24); + this.MapIconsList.TransparentColor = System.Drawing.Color.Transparent; + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(407, 35); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 3; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // btnOk + // + this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; + this.btnOk.Location = new System.Drawing.Point(326, 35); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(75, 23); + this.btnOk.TabIndex = 2; + this.btnOk.Text = "Open"; + this.btnOk.UseVisualStyleBackColor = true; + // + // lblNew + // + this.lblNew.AutoSize = true; + this.lblNew.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.lblNew.Location = new System.Drawing.Point(12, 40); + this.lblNew.Name = "lblNew"; + this.lblNew.Size = new System.Drawing.Size(69, 13); + this.lblNew.TabIndex = 3; + this.lblNew.Text = "Map name:"; + // + // txtNew + // + this.txtNew.BackColor = System.Drawing.SystemColors.Window; + this.txtNew.Location = new System.Drawing.Point(88, 37); + this.txtNew.Name = "txtNew"; + this.txtNew.ReadOnly = true; + this.txtNew.Size = new System.Drawing.Size(232, 20); + this.txtNew.TabIndex = 1; + // + // pbMinimap + // + this.pbMinimap.BackColor = System.Drawing.Color.Black; + this.pbMinimap.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.pbMinimap.Location = new System.Drawing.Point(32, 25); + this.pbMinimap.Name = "pbMinimap"; + this.pbMinimap.Size = new System.Drawing.Size(124, 124); + this.pbMinimap.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbMinimap.TabIndex = 5; + this.pbMinimap.TabStop = false; + // + // pnlBottom + // + this.pnlBottom.Controls.Add(this.pictureBox1); + this.pnlBottom.Controls.Add(this.txtPathOut); + this.pnlBottom.Controls.Add(this.lblPathOut); + this.pnlBottom.Controls.Add(this.lblPath); + this.pnlBottom.Controls.Add(this.btnCancel); + this.pnlBottom.Controls.Add(this.btnOk); + this.pnlBottom.Controls.Add(this.txtNew); + this.pnlBottom.Controls.Add(this.lblNew); + this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlBottom.Location = new System.Drawing.Point(0, 332); + this.pnlBottom.MaximumSize = new System.Drawing.Size(0, 70); + this.pnlBottom.Name = "pnlBottom"; + this.pnlBottom.Size = new System.Drawing.Size(494, 70); + this.pnlBottom.TabIndex = 6; + // + // txtPathOut + // + this.txtPathOut.BackColor = System.Drawing.SystemColors.Window; + this.txtPathOut.Location = new System.Drawing.Point(55, 10); + this.txtPathOut.Name = "txtPathOut"; + this.txtPathOut.ReadOnly = true; + this.txtPathOut.Size = new System.Drawing.Size(265, 20); + this.txtPathOut.TabIndex = 0; + this.txtPathOut.TextChanged += new System.EventHandler(this.txtPathOut_TextChanged); + // + // lblPathOut + // + this.lblPathOut.AutoSize = true; + this.lblPathOut.Location = new System.Drawing.Point(55, 13); + this.lblPathOut.Name = "lblPathOut"; + this.lblPathOut.Size = new System.Drawing.Size(0, 13); + this.lblPathOut.TabIndex = 6; + // + // lblPath + // + this.lblPath.AutoSize = true; + this.lblPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.lblPath.Location = new System.Drawing.Point(12, 13); + this.lblPath.Name = "lblPath"; + this.lblPath.Size = new System.Drawing.Size(37, 13); + this.lblPath.TabIndex = 5; + this.lblPath.Text = "Path:"; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.lblMapList); + this.splitContainer1.Panel1.Controls.Add(this.MapList); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.txtDesc); + this.splitContainer1.Panel2.Controls.Add(this.lblDesc); + this.splitContainer1.Panel2.Controls.Add(this.txtTheater); + this.splitContainer1.Panel2.Controls.Add(this.lblTheater); + this.splitContainer1.Panel2.Controls.Add(this.txtAuthor); + this.splitContainer1.Panel2.Controls.Add(this.lblAuthor); + this.splitContainer1.Panel2.Controls.Add(this.txtTitle); + this.splitContainer1.Panel2.Controls.Add(this.lblMapName); + this.splitContainer1.Panel2.Controls.Add(this.lblMinimap); + this.splitContainer1.Panel2.Controls.Add(this.pbMinimap); + this.splitContainer1.Size = new System.Drawing.Size(494, 332); + this.splitContainer1.SplitterDistance = 300; + this.splitContainer1.TabIndex = 7; + // + // lblMapList + // + this.lblMapList.AutoSize = true; + this.lblMapList.Location = new System.Drawing.Point(12, 9); + this.lblMapList.Name = "lblMapList"; + this.lblMapList.Size = new System.Drawing.Size(81, 13); + this.lblMapList.TabIndex = 1; + this.lblMapList.Text = "Available maps:"; + // + // txtDesc + // + this.txtDesc.BackColor = System.Drawing.SystemColors.ButtonFace; + this.txtDesc.Location = new System.Drawing.Point(16, 289); + this.txtDesc.Name = "txtDesc"; + this.txtDesc.ReadOnly = true; + this.txtDesc.Size = new System.Drawing.Size(162, 20); + this.txtDesc.TabIndex = 14; + // + // lblDesc + // + this.lblDesc.AutoSize = true; + this.lblDesc.Location = new System.Drawing.Point(13, 273); + this.lblDesc.Name = "lblDesc"; + this.lblDesc.Size = new System.Drawing.Size(63, 13); + this.lblDesc.TabIndex = 13; + this.lblDesc.Text = "Description:"; + // + // txtTheater + // + this.txtTheater.BackColor = System.Drawing.SystemColors.ButtonFace; + this.txtTheater.Location = new System.Drawing.Point(16, 252); + this.txtTheater.Name = "txtTheater"; + this.txtTheater.ReadOnly = true; + this.txtTheater.Size = new System.Drawing.Size(162, 20); + this.txtTheater.TabIndex = 12; + // + // lblTheater + // + this.lblTheater.AutoSize = true; + this.lblTheater.Location = new System.Drawing.Point(13, 236); + this.lblTheater.Name = "lblTheater"; + this.lblTheater.Size = new System.Drawing.Size(47, 13); + this.lblTheater.TabIndex = 11; + this.lblTheater.Text = "Tileset:"; + // + // txtAuthor + // + this.txtAuthor.BackColor = System.Drawing.SystemColors.ButtonFace; + this.txtAuthor.Location = new System.Drawing.Point(16, 214); + this.txtAuthor.Name = "txtAuthor"; + this.txtAuthor.ReadOnly = true; + this.txtAuthor.Size = new System.Drawing.Size(162, 20); + this.txtAuthor.TabIndex = 10; + // + // lblAuthor + // + this.lblAuthor.AutoSize = true; + this.lblAuthor.Location = new System.Drawing.Point(13, 198); + this.lblAuthor.Name = "lblAuthor"; + this.lblAuthor.Size = new System.Drawing.Size(41, 13); + this.lblAuthor.TabIndex = 9; + this.lblAuthor.Text = "Author:"; + // + // txtTitle + // + this.txtTitle.BackColor = System.Drawing.SystemColors.ButtonFace; + this.txtTitle.Location = new System.Drawing.Point(16, 177); + this.txtTitle.Name = "txtTitle"; + this.txtTitle.ReadOnly = true; + this.txtTitle.Size = new System.Drawing.Size(162, 20); + this.txtTitle.TabIndex = 8; + // + // lblMapName + // + this.lblMapName.AutoSize = true; + this.lblMapName.Location = new System.Drawing.Point(13, 161); + this.lblMapName.Name = "lblMapName"; + this.lblMapName.Size = new System.Drawing.Size(30, 13); + this.lblMapName.TabIndex = 7; + this.lblMapName.Text = "Title:"; + // + // lblMinimap + // + this.lblMinimap.AutoSize = true; + this.lblMinimap.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.lblMinimap.Location = new System.Drawing.Point(29, 9); + this.lblMinimap.Name = "lblMinimap"; + this.lblMinimap.Size = new System.Drawing.Size(71, 13); + this.lblMinimap.TabIndex = 6; + this.lblMinimap.Text = "Map preview:"; + // + // pictureBox1 + // + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(336, -9); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(54, 35); + this.pictureBox1.TabIndex = 7; + this.pictureBox1.TabStop = false; + this.pictureBox1.Visible = false; + // + // MapSelect + // + this.AcceptButton = this.btnOk; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(494, 402); + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.pnlBottom); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "MapSelect"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Select map"; + this.Load += new System.EventHandler(this.MapSelect_Load); + ((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).EndInit(); + this.pnlBottom.ResumeLayout(false); + this.pnlBottom.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.Panel2.PerformLayout(); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + public System.Windows.Forms.ListView MapList; + public System.Windows.Forms.Button btnCancel; + public System.Windows.Forms.Button btnOk; + public System.Windows.Forms.Label lblNew; + public System.Windows.Forms.TextBox txtNew; + public System.Windows.Forms.ColumnHeader colMapName; + public System.Windows.Forms.ImageList MapIconsList; + public System.Windows.Forms.PictureBox pbMinimap; + public System.Windows.Forms.Panel pnlBottom; + public System.Windows.Forms.SplitContainer splitContainer1; + public System.Windows.Forms.Label lblMinimap; + public System.Windows.Forms.TextBox txtTheater; + public System.Windows.Forms.Label lblTheater; + public System.Windows.Forms.TextBox txtAuthor; + public System.Windows.Forms.Label lblAuthor; + public System.Windows.Forms.TextBox txtTitle; + public System.Windows.Forms.Label lblMapName; + public System.Windows.Forms.TextBox txtDesc; + public System.Windows.Forms.Label lblDesc; + public System.Windows.Forms.Label lblMapList; + public System.Windows.Forms.Label lblPathOut; + public System.Windows.Forms.Label lblPath; + public System.Windows.Forms.TextBox txtPathOut; + private System.Windows.Forms.PictureBox pictureBox1; + } } \ No newline at end of file diff --git a/OpenRA.Editor/MapSelect.cs b/OpenRA.Editor/MapSelect.cs index f043db68c3..76715cd2c2 100644 --- a/OpenRA.Editor/MapSelect.cs +++ b/OpenRA.Editor/MapSelect.cs @@ -1,74 +1,84 @@ -using System; -using System.IO; -using System.Windows.Forms; -using OpenRA.FileFormats; -using OpenRA.Graphics; -using System.Linq; - -namespace OpenRA.Editor -{ - public partial class MapSelect : Form - { - public string MapFolderPath; - - public MapSelect(string currentMod) - { - MapFolderPath = new string[] { Environment.CurrentDirectory, "mods", currentMod, "maps" } - .Aggregate(Path.Combine); - - InitializeComponent(); - MapIconsList.Images.Add(pictureBox1.Image); - } - - void MapSelect_Load(object sender, EventArgs e) - { - MapList.Items.Clear(); - txtPathOut.Text = MapFolderPath; - - foreach (var map in ModData.FindMapsIn(MapFolderPath)) - { - ListViewItem map1 = new ListViewItem(); - map1.Tag = map; - map1.Text = Path.GetFileNameWithoutExtension(map); - map1.ImageIndex = 0; - MapList.Items.Add(map1); - } - - // hack - if (txtNew.Text != "unnamed") - MapList.Items[0].Selected = true; - } - - void MapList_SelectedIndexChanged(object sender, EventArgs e) - { - if (MapList.SelectedItems.Count == 1) - { - txtNew.Text = MapList.SelectedItems[0].Text; - txtNew.Tag = MapList.SelectedItems[0].Tag; - - var map = new Map(txtNew.Tag as string); - txtTitle.Text = map.Title; - txtAuthor.Text = map.Author; - txtTheater.Text = map.Tileset; - txtDesc.Text = map.Description; - pbMinimap.Image = null; - - try - { - pbMinimap.Image = Minimap.AddStaticResources(map, Minimap.TerrainBitmap(map, true)); - } - catch (Exception ed) - { - Console.WriteLine("No map preview image found: {0}", ed.ToString()); - } - finally { } - } - } - - void txtPathOut_TextChanged(object sender, EventArgs e) - { - MapFolderPath = txtPathOut.Text; - } - - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.IO; +using System.Windows.Forms; +using OpenRA.FileFormats; +using OpenRA.Graphics; +using System.Linq; + +namespace OpenRA.Editor +{ + public partial class MapSelect : Form + { + public string MapFolderPath; + + public MapSelect(string currentMod) + { + MapFolderPath = new string[] { Environment.CurrentDirectory, "mods", currentMod, "maps" } + .Aggregate(Path.Combine); + + InitializeComponent(); + MapIconsList.Images.Add(pictureBox1.Image); + } + + void MapSelect_Load(object sender, EventArgs e) + { + MapList.Items.Clear(); + txtPathOut.Text = MapFolderPath; + + foreach (var map in ModData.FindMapsIn(MapFolderPath)) + { + ListViewItem map1 = new ListViewItem(); + map1.Tag = map; + map1.Text = Path.GetFileNameWithoutExtension(map); + map1.ImageIndex = 0; + MapList.Items.Add(map1); + } + + // hack + if (txtNew.Text != "unnamed") + MapList.Items[0].Selected = true; + } + + void MapList_SelectedIndexChanged(object sender, EventArgs e) + { + if (MapList.SelectedItems.Count == 1) + { + txtNew.Text = MapList.SelectedItems[0].Text; + txtNew.Tag = MapList.SelectedItems[0].Tag; + + var map = new Map(txtNew.Tag as string); + txtTitle.Text = map.Title; + txtAuthor.Text = map.Author; + txtTheater.Text = map.Tileset; + txtDesc.Text = map.Description; + pbMinimap.Image = null; + + try + { + pbMinimap.Image = Minimap.AddStaticResources(map, Minimap.TerrainBitmap(map, true)); + } + catch (Exception ed) + { + Console.WriteLine("No map preview image found: {0}", ed.ToString()); + } + finally { } + } + } + + void txtPathOut_TextChanged(object sender, EventArgs e) + { + MapFolderPath = txtPathOut.Text; + } + + } +} diff --git a/OpenRA.Editor/MapSelect.resx b/OpenRA.Editor/MapSelect.resx index f95d2731d3..8086131093 100644 --- a/OpenRA.Editor/MapSelect.resx +++ b/OpenRA.Editor/MapSelect.resx @@ -1,177 +1,177 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAArjSURBVFhHrVcJUFRXFmVpkE0Wg0ZEMoIBl8RodGSMmVES - R0NiChVxCyIIAmFfhe6maeh9AZodZHFpUFQWcQmKisiuLKLEKFFEcIuljtZMYmI5Uc/c14EZYyapmpq8 - qlP/9/+/373v3HPu+19P7/cf+jSlEWHCOEuzZfNn2Yvo3Pj3D/PTjCwYAwtgyeFwFk163Tos2tvtWJZw - zeUjmYFP6vL9fhw31vRPI8/9LnmMrtCWZhtPcJ7hbC/W8DwfnS0LR0t5NKoFazHcqsaprE3YGbMQLrYW - W/7fBAxogjGEd5wcXuPK4jxa60qD75VrfIbKMrYMD7VlPX/Ul49rp8RoyPbFIaEnhpuU6NRGoVa2HKuX - zEj/X8vAVmlIsDY2Nna2sjBd+ee5b7Yq4tfgfm8a7pxNw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nYt9or06TOmCJ7HTbGxgADpndmaJMU29QxAQKvTo - vhnHkN1nX12/OlgCNoT3CZsIvgRWc9ao2IT/bTD3+BID7N1/zisBWCKOBB/CagKf8PboJP8CoUmu3yhA - ga8AAAAASUVORK5CYII= - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAArjSURBVFhHrVcJUFRXFmVpkE0Wg0ZEMoIBl8RodGSMmVES + R0NiChVxCyIIAmFfhe6maeh9AZodZHFpUFQWcQmKisiuLKLEKFFEcIuljtZMYmI5Uc/c14EZYyapmpq8 + qlP/9/+/373v3HPu+19P7/cf+jSlEWHCOEuzZfNn2Yvo3Pj3D/PTjCwYAwtgyeFwFk163Tos2tvtWJZw + zeUjmYFP6vL9fhw31vRPI8/9LnmMrtCWZhtPcJ7hbC/W8DwfnS0LR0t5NKoFazHcqsaprE3YGbMQLrYW + W/7fBAxogjGEd5wcXuPK4jxa60qD75VrfIbKMrYMD7VlPX/Ul49rp8RoyPbFIaEnhpuU6NRGoVa2HKuX + zEj/X8vAVmlIsDY2Nna2sjBd+ee5b7Yq4tfgfm8a7pxNw60OFa6e4uFmhxr/uFSIexfz0VsZh7PaIJzb + F42u8hAcV2/ANz3KF8Hub52kucb+Fv+jAccbm5quWOfxYX5y6Mcnq/IDh1oreX/vOcx9drdbjTudUgye + Tsb1piT0H4/DACUw0JiEh33ZePhlFi7UxOCLtI1o2x6IW2cUqM/egLtdediV9MnjS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XI1zohy24MAFd4u9tj8YLpmD71DTiMtwGHY1A7ygB7 + 52N29CLULV7qeT+HnFCoPairu87/RC9rTjE8JYJoY/p4lR8lVQAp7Rc+/pHY7OKE61NN8a21MbQpfwC+ + m4fbQ7MQNdcCfWMMsTPWDi2yyRgyNkDhOGPYGhpeo97jP5oAcwJjYQ4hk3DOyzvwn9v3HtUJjHXAzSFc + RHHlCAznIyAsCZa2k56u3xT2gtHPmGHCdXtnHh47mKBqjS1K5Q7ITrCjlf8RqXPM0bDUCr3bp2C9nj70 + DDinKMYSwmujCbAjY4G9ZrN3tyMLP/D4IT1vP/J21CBeoKaa55MTUhAeK8J7i91v0DMdxqZmgw7Oc74N + iFQ8T5YX6ZzisWI9Uiebo8rKCOcsjLAv1Z72BydUxE5ElcTuKf2P9RunEeGzmD8bTIzsI0I7wc7xdgyf + NiayWVoueZ1qz7zPT8l5McnBqZieYZsYO/a4zF7yaKWP4HlASMKLj9xX4WrXWzhdMxUFlkaI1tPDAZE9 + Htc4wWuhOas5Y/oXgUezYDdZdmK2N6zzCfuB1V1GFkulNswT5cFllms73f+QMIWwjCDjGJnUW1rbfu2z + wvXJk85pUH5gieNJdugvd8QV7RSc0TjgiMwevkvH3np1xa/+ZplZE9jecNh14UcPmO8VmnLyfzGr/feU + mB/dY7VjybItdSZhrb6+fvEYY6PuMWOMn7ZbGeILfQNYmnN+mO1o/OBdCw74HAMsMjR8NjL/r+Yx+p3H + XhjKZs93uxMZr4Z/uOb54qWf3bGf4pw3EpC1UPYsS3g0EU9K4uBsI86zYHPOY3MOp4zuRRLyDfT1O941 + Mrzvb86Bob4h+0r6zcEmdiFICA2vvT55kLFBYOJhnYt9or06TOmCJ7HTbGxgADpndmaJMU29QxAQKvTo + vhnHkN1nX12/OlgCNoT3CZsIvgRWc9ao2IT/bTD3+BID7N1/zisBWCKOBB/CagKf8PboJP8CoUmu3yhA + ga8AAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/OpenRA.Editor/NewMapDialog.Designer.cs b/OpenRA.Editor/NewMapDialog.Designer.cs index 71252d4b67..48df76d0cd 100755 --- a/OpenRA.Editor/NewMapDialog.Designer.cs +++ b/OpenRA.Editor/NewMapDialog.Designer.cs @@ -1,286 +1,296 @@ -namespace OpenRA.Editor -{ - partial class NewMapDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.button2 = new System.Windows.Forms.Button(); - this.button1 = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.cordonBottom = new System.Windows.Forms.NumericUpDown(); - this.cordonTop = new System.Windows.Forms.NumericUpDown(); - this.cordonRight = new System.Windows.Forms.NumericUpDown(); - this.cordonLeft = new System.Windows.Forms.NumericUpDown(); - this.height = new System.Windows.Forms.NumericUpDown(); - this.width = new System.Windows.Forms.NumericUpDown(); - this.label4 = new System.Windows.Forms.Label(); - this.theater = new System.Windows.Forms.ComboBox(); - ((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonTop)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonRight)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.height)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.width)).BeginInit(); - this.SuspendLayout(); - // - // button2 - // - this.button2.DialogResult = System.Windows.Forms.DialogResult.OK; - this.button2.Location = new System.Drawing.Point(229, 160); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 7; - this.button2.Text = "OK"; - this.button2.UseVisualStyleBackColor = true; - // - // button1 - // - this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.button1.Location = new System.Drawing.Point(310, 160); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 8; - this.button1.Text = "Cancel"; - this.button1.UseVisualStyleBackColor = true; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(31, 77); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(107, 13); - this.label3.TabIndex = 9; - this.label3.Text = "Cordon Right/Bottom"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(31, 51); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(86, 13); - this.label2.TabIndex = 11; - this.label2.Text = "Cordon Left/Top"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(31, 25); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(27, 13); - this.label1.TabIndex = 10; - this.label1.Text = "Size"; - // - // cordonBottom - // - this.cordonBottom.Location = new System.Drawing.Point(280, 75); - this.cordonBottom.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.cordonBottom.Name = "cordonBottom"; - this.cordonBottom.Size = new System.Drawing.Size(105, 20); - this.cordonBottom.TabIndex = 5; - this.cordonBottom.Value = new decimal(new int[] { - 112, - 0, - 0, - 0}); - this.cordonBottom.Enter += new System.EventHandler(this.SelectText); - // - // cordonTop - // - this.cordonTop.Location = new System.Drawing.Point(280, 49); - this.cordonTop.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.cordonTop.Name = "cordonTop"; - this.cordonTop.Size = new System.Drawing.Size(105, 20); - this.cordonTop.TabIndex = 3; - this.cordonTop.Value = new decimal(new int[] { - 16, - 0, - 0, - 0}); - this.cordonTop.Enter += new System.EventHandler(this.SelectText); - // - // cordonRight - // - this.cordonRight.Location = new System.Drawing.Point(169, 75); - this.cordonRight.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.cordonRight.Name = "cordonRight"; - this.cordonRight.Size = new System.Drawing.Size(105, 20); - this.cordonRight.TabIndex = 4; - this.cordonRight.Value = new decimal(new int[] { - 112, - 0, - 0, - 0}); - this.cordonRight.Enter += new System.EventHandler(this.SelectText); - // - // cordonLeft - // - this.cordonLeft.Location = new System.Drawing.Point(169, 49); - this.cordonLeft.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.cordonLeft.Name = "cordonLeft"; - this.cordonLeft.Size = new System.Drawing.Size(105, 20); - this.cordonLeft.TabIndex = 2; - this.cordonLeft.Value = new decimal(new int[] { - 16, - 0, - 0, - 0}); - this.cordonLeft.Enter += new System.EventHandler(this.SelectText); - // - // height - // - this.height.Increment = new decimal(new int[] { - 8, - 0, - 0, - 0}); - this.height.Location = new System.Drawing.Point(280, 23); - this.height.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.height.Name = "height"; - this.height.Size = new System.Drawing.Size(105, 20); - this.height.TabIndex = 1; - this.height.Value = new decimal(new int[] { - 128, - 0, - 0, - 0}); - this.height.Enter += new System.EventHandler(this.SelectText); - // - // width - // - this.width.Increment = new decimal(new int[] { - 8, - 0, - 0, - 0}); - this.width.Location = new System.Drawing.Point(169, 23); - this.width.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.width.Name = "width"; - this.width.Size = new System.Drawing.Size(105, 20); - this.width.TabIndex = 0; - this.width.Value = new decimal(new int[] { - 128, - 0, - 0, - 0}); - this.width.Enter += new System.EventHandler(this.SelectText); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(31, 124); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(44, 13); - this.label4.TabIndex = 14; - this.label4.Text = "Tileset"; - // - // theater - // - this.theater.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.theater.FormattingEnabled = true; - this.theater.Location = new System.Drawing.Point(169, 121); - this.theater.Name = "theater"; - this.theater.Size = new System.Drawing.Size(216, 21); - this.theater.TabIndex = 6; - // - // NewMapDialog - // - this.AcceptButton = this.button2; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.button1; - this.ClientSize = new System.Drawing.Size(418, 210); - this.Controls.Add(this.theater); - this.Controls.Add(this.label4); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.cordonBottom); - this.Controls.Add(this.cordonTop); - this.Controls.Add(this.cordonRight); - this.Controls.Add(this.cordonLeft); - this.Controls.Add(this.height); - this.Controls.Add(this.width); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "NewMapDialog"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "New Map"; - ((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonTop)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonRight)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.height)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.width)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - public System.Windows.Forms.NumericUpDown cordonBottom; - public System.Windows.Forms.NumericUpDown cordonTop; - public System.Windows.Forms.NumericUpDown cordonRight; - public System.Windows.Forms.NumericUpDown cordonLeft; - public System.Windows.Forms.NumericUpDown height; - public System.Windows.Forms.NumericUpDown width; - private System.Windows.Forms.Label label4; - public System.Windows.Forms.ComboBox theater; - } +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.Editor +{ + partial class NewMapDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.cordonBottom = new System.Windows.Forms.NumericUpDown(); + this.cordonTop = new System.Windows.Forms.NumericUpDown(); + this.cordonRight = new System.Windows.Forms.NumericUpDown(); + this.cordonLeft = new System.Windows.Forms.NumericUpDown(); + this.height = new System.Windows.Forms.NumericUpDown(); + this.width = new System.Windows.Forms.NumericUpDown(); + this.label4 = new System.Windows.Forms.Label(); + this.theater = new System.Windows.Forms.ComboBox(); + ((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonTop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonRight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.height)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.width)).BeginInit(); + this.SuspendLayout(); + // + // button2 + // + this.button2.DialogResult = System.Windows.Forms.DialogResult.OK; + this.button2.Location = new System.Drawing.Point(229, 160); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 7; + this.button2.Text = "OK"; + this.button2.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.button1.Location = new System.Drawing.Point(310, 160); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 8; + this.button1.Text = "Cancel"; + this.button1.UseVisualStyleBackColor = true; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(31, 77); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(107, 13); + this.label3.TabIndex = 9; + this.label3.Text = "Cordon Right/Bottom"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(31, 51); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(86, 13); + this.label2.TabIndex = 11; + this.label2.Text = "Cordon Left/Top"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(31, 25); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(27, 13); + this.label1.TabIndex = 10; + this.label1.Text = "Size"; + // + // cordonBottom + // + this.cordonBottom.Location = new System.Drawing.Point(280, 75); + this.cordonBottom.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.cordonBottom.Name = "cordonBottom"; + this.cordonBottom.Size = new System.Drawing.Size(105, 20); + this.cordonBottom.TabIndex = 5; + this.cordonBottom.Value = new decimal(new int[] { + 112, + 0, + 0, + 0}); + this.cordonBottom.Enter += new System.EventHandler(this.SelectText); + // + // cordonTop + // + this.cordonTop.Location = new System.Drawing.Point(280, 49); + this.cordonTop.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.cordonTop.Name = "cordonTop"; + this.cordonTop.Size = new System.Drawing.Size(105, 20); + this.cordonTop.TabIndex = 3; + this.cordonTop.Value = new decimal(new int[] { + 16, + 0, + 0, + 0}); + this.cordonTop.Enter += new System.EventHandler(this.SelectText); + // + // cordonRight + // + this.cordonRight.Location = new System.Drawing.Point(169, 75); + this.cordonRight.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.cordonRight.Name = "cordonRight"; + this.cordonRight.Size = new System.Drawing.Size(105, 20); + this.cordonRight.TabIndex = 4; + this.cordonRight.Value = new decimal(new int[] { + 112, + 0, + 0, + 0}); + this.cordonRight.Enter += new System.EventHandler(this.SelectText); + // + // cordonLeft + // + this.cordonLeft.Location = new System.Drawing.Point(169, 49); + this.cordonLeft.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.cordonLeft.Name = "cordonLeft"; + this.cordonLeft.Size = new System.Drawing.Size(105, 20); + this.cordonLeft.TabIndex = 2; + this.cordonLeft.Value = new decimal(new int[] { + 16, + 0, + 0, + 0}); + this.cordonLeft.Enter += new System.EventHandler(this.SelectText); + // + // height + // + this.height.Increment = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.height.Location = new System.Drawing.Point(280, 23); + this.height.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.height.Name = "height"; + this.height.Size = new System.Drawing.Size(105, 20); + this.height.TabIndex = 1; + this.height.Value = new decimal(new int[] { + 128, + 0, + 0, + 0}); + this.height.Enter += new System.EventHandler(this.SelectText); + // + // width + // + this.width.Increment = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.width.Location = new System.Drawing.Point(169, 23); + this.width.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.width.Name = "width"; + this.width.Size = new System.Drawing.Size(105, 20); + this.width.TabIndex = 0; + this.width.Value = new decimal(new int[] { + 128, + 0, + 0, + 0}); + this.width.Enter += new System.EventHandler(this.SelectText); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(31, 124); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(44, 13); + this.label4.TabIndex = 14; + this.label4.Text = "Tileset"; + // + // theater + // + this.theater.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.theater.FormattingEnabled = true; + this.theater.Location = new System.Drawing.Point(169, 121); + this.theater.Name = "theater"; + this.theater.Size = new System.Drawing.Size(216, 21); + this.theater.TabIndex = 6; + // + // NewMapDialog + // + this.AcceptButton = this.button2; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.button1; + this.ClientSize = new System.Drawing.Size(418, 210); + this.Controls.Add(this.theater); + this.Controls.Add(this.label4); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.cordonBottom); + this.Controls.Add(this.cordonTop); + this.Controls.Add(this.cordonRight); + this.Controls.Add(this.cordonLeft); + this.Controls.Add(this.height); + this.Controls.Add(this.width); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "NewMapDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "New Map"; + ((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonTop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonRight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.height)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.width)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + public System.Windows.Forms.NumericUpDown cordonBottom; + public System.Windows.Forms.NumericUpDown cordonTop; + public System.Windows.Forms.NumericUpDown cordonRight; + public System.Windows.Forms.NumericUpDown cordonLeft; + public System.Windows.Forms.NumericUpDown height; + public System.Windows.Forms.NumericUpDown width; + private System.Windows.Forms.Label label4; + public System.Windows.Forms.ComboBox theater; + } } \ No newline at end of file diff --git a/OpenRA.Editor/NewMapDialog.resx b/OpenRA.Editor/NewMapDialog.resx index ff31a6db56..19dc0dd8b3 100644 --- a/OpenRA.Editor/NewMapDialog.resx +++ b/OpenRA.Editor/NewMapDialog.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/OpenRA.Editor/OpenRA.Editor.csproj b/OpenRA.Editor/OpenRA.Editor.csproj index 1ba2ea80c5..bfe0cced83 100644 --- a/OpenRA.Editor/OpenRA.Editor.csproj +++ b/OpenRA.Editor/OpenRA.Editor.csproj @@ -1,159 +1,159 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {00038B75-405B-44F5-8691-BD2546DBE224} - WinExe - Properties - OpenRA.Editor - OpenRA.Editor - v3.5 - 512 - OpenRA.Editor.Icon.ico - - - true - full - false - ..\ - DEBUG;TRACE - prompt - 4 - true - x86 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - true - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - - - Form - - - ErrorListDialog.cs - - - Form - - - Form1.cs - - - - - Form - - - MapSelect.cs - - - Form - - - NewMapDialog.cs - - - - Form - - - PropertiesDialog.cs - - - - Form1.cs - - - MapSelect.cs - - - NewMapDialog.cs - - - PropertiesDialog.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - ResizeDialog.cs - - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - Form - - - ResizeDialog.cs - - - - Component - - - - - {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA} - OpenRA.FileFormats - - - {0DFB103F-2962-400F-8C6D-E2C28CCBA633} - OpenRA.Game - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {00038B75-405B-44F5-8691-BD2546DBE224} + WinExe + Properties + OpenRA.Editor + OpenRA.Editor + v3.5 + 512 + OpenRA.Editor.Icon.ico + + + true + full + false + ..\ + DEBUG;TRACE + prompt + 4 + true + x86 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + true + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + + Form + + + ErrorListDialog.cs + + + Form + + + Form1.cs + + + + + Form + + + MapSelect.cs + + + Form + + + NewMapDialog.cs + + + + Form + + + PropertiesDialog.cs + + + + Form1.cs + + + MapSelect.cs + + + NewMapDialog.cs + + + PropertiesDialog.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + ResizeDialog.cs + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + Form + + + ResizeDialog.cs + + + + Component + + + + + {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA} + OpenRA.FileFormats + + + {0DFB103F-2962-400F-8C6D-E2C28CCBA633} + OpenRA.Game + + + + + + + \ No newline at end of file diff --git a/OpenRA.Editor/Program.cs b/OpenRA.Editor/Program.cs index b893365e76..b063b563aa 100644 --- a/OpenRA.Editor/Program.cs +++ b/OpenRA.Editor/Program.cs @@ -6,13 +6,13 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Windows.Forms; +#endregion + +using System; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Windows.Forms; using OpenRA.FileFormats; namespace OpenRA.Editor @@ -46,10 +46,10 @@ namespace OpenRA.Editor foreach (var path in ModData.FindMapsIn(MapFolderPath)) { var map = new Map(path); - // Touch the lazy bits to initialize them - map.Actors.Force(); - map.Smudges.Force(); - map.MapTiles.Force(); + // Touch the lazy bits to initialize them + map.Actors.Force(); + map.Smudges.Force(); + map.MapTiles.Force(); map.MapResources.Force(); map.Save(path); } diff --git a/OpenRA.Editor/Properties/AssemblyInfo.cs b/OpenRA.Editor/Properties/AssemblyInfo.cs index d92b6eb6e5..1fedfc5aa9 100644 --- a/OpenRA.Editor/Properties/AssemblyInfo.cs +++ b/OpenRA.Editor/Properties/AssemblyInfo.cs @@ -1,36 +1,46 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Editor")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("OpenRA.Editor")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e18ea68f-f344-46c9-b026-8bda76fa91f8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenRA.Editor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("OpenRA.Editor")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e18ea68f-f344-46c9-b026-8bda76fa91f8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Editor/Properties/Resources.Designer.cs b/OpenRA.Editor/Properties/Resources.Designer.cs index 6a878cefe0..ac67c0e14f 100644 --- a/OpenRA.Editor/Properties/Resources.Designer.cs +++ b/OpenRA.Editor/Properties/Resources.Designer.cs @@ -1,71 +1,71 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenRA.Editor.Properties -{ - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenRA.Editor.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OpenRA.Editor.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenRA.Editor.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/OpenRA.Editor/Properties/Settings.Designer.cs b/OpenRA.Editor/Properties/Settings.Designer.cs index 3f36e0bd0e..3964109408 100644 --- a/OpenRA.Editor/Properties/Settings.Designer.cs +++ b/OpenRA.Editor/Properties/Settings.Designer.cs @@ -1,30 +1,30 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenRA.Editor.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OpenRA.Editor.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/OpenRA.Editor/Properties/Settings.settings b/OpenRA.Editor/Properties/Settings.settings index abf36c5d3d..39645652af 100644 --- a/OpenRA.Editor/Properties/Settings.settings +++ b/OpenRA.Editor/Properties/Settings.settings @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/OpenRA.Editor/PropertiesDialog.Designer.cs b/OpenRA.Editor/PropertiesDialog.Designer.cs index 0410d9c72d..a23a8c98e2 100644 --- a/OpenRA.Editor/PropertiesDialog.Designer.cs +++ b/OpenRA.Editor/PropertiesDialog.Designer.cs @@ -1,172 +1,182 @@ -namespace OpenRA.Editor -{ - partial class PropertiesDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.button2 = new System.Windows.Forms.Button(); - this.button1 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.title = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.desc = new System.Windows.Forms.TextBox(); - this.selectable = new System.Windows.Forms.CheckBox(); - this.label3 = new System.Windows.Forms.Label(); - this.author = new System.Windows.Forms.TextBox(); - this.useAsShellmap = new System.Windows.Forms.CheckBox(); - this.SuspendLayout(); - // - // button2 - // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button2.DialogResult = System.Windows.Forms.DialogResult.OK; - this.button2.Location = new System.Drawing.Point(196, 193); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 14; - this.button2.Text = "OK"; - this.button2.UseVisualStyleBackColor = true; - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.button1.Location = new System.Drawing.Point(277, 193); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 15; - this.button1.Text = "Cancel"; - this.button1.UseVisualStyleBackColor = true; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 50); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(27, 13); - this.label1.TabIndex = 16; - this.label1.Text = "Title"; - // - // title - // - this.title.Location = new System.Drawing.Point(66, 47); - this.title.Name = "title"; - this.title.Size = new System.Drawing.Size(286, 20); - this.title.TabIndex = 17; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(12, 76); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(32, 13); - this.label2.TabIndex = 16; - this.label2.Text = "Desc"; - // - // desc - // - this.desc.Location = new System.Drawing.Point(66, 73); - this.desc.Name = "desc"; - this.desc.Size = new System.Drawing.Size(286, 20); - this.desc.TabIndex = 17; - // - // selectable - // - this.selectable.AutoSize = true; - this.selectable.Location = new System.Drawing.Point(118, 138); - this.selectable.Name = "selectable"; - this.selectable.Size = new System.Drawing.Size(130, 17); - this.selectable.TabIndex = 18; - this.selectable.Text = "Show in Map Chooser"; - this.selectable.UseVisualStyleBackColor = true; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(12, 102); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(38, 13); - this.label3.TabIndex = 16; - this.label3.Text = "Author"; - // - // author - // - this.author.Location = new System.Drawing.Point(66, 99); - this.author.Name = "author"; - this.author.Size = new System.Drawing.Size(286, 20); - this.author.TabIndex = 17; - // - // checkBox1 - // - this.useAsShellmap.AutoSize = true; - this.useAsShellmap.Location = new System.Drawing.Point(118, 161); - this.useAsShellmap.Name = "checkBox1"; - this.useAsShellmap.Size = new System.Drawing.Size(105, 17); - this.useAsShellmap.TabIndex = 18; - this.useAsShellmap.Text = "Use as Shellmap"; - this.useAsShellmap.UseVisualStyleBackColor = true; - // - // PropertiesDialog - // - this.AcceptButton = this.button2; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.button1; - this.ClientSize = new System.Drawing.Size(370, 228); - this.Controls.Add(this.useAsShellmap); - this.Controls.Add(this.selectable); - this.Controls.Add(this.author); - this.Controls.Add(this.label3); - this.Controls.Add(this.desc); - this.Controls.Add(this.label2); - this.Controls.Add(this.title); - this.Controls.Add(this.label1); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "PropertiesDialog"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "PropertiesDialog"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Label label1; - public System.Windows.Forms.TextBox title; - private System.Windows.Forms.Label label2; - public System.Windows.Forms.TextBox desc; - public System.Windows.Forms.CheckBox selectable; - private System.Windows.Forms.Label label3; - public System.Windows.Forms.TextBox author; - public System.Windows.Forms.CheckBox useAsShellmap; - } +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.Editor +{ + partial class PropertiesDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.title = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.desc = new System.Windows.Forms.TextBox(); + this.selectable = new System.Windows.Forms.CheckBox(); + this.label3 = new System.Windows.Forms.Label(); + this.author = new System.Windows.Forms.TextBox(); + this.useAsShellmap = new System.Windows.Forms.CheckBox(); + this.SuspendLayout(); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button2.DialogResult = System.Windows.Forms.DialogResult.OK; + this.button2.Location = new System.Drawing.Point(196, 193); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 14; + this.button2.Text = "OK"; + this.button2.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.button1.Location = new System.Drawing.Point(277, 193); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 15; + this.button1.Text = "Cancel"; + this.button1.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 50); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(27, 13); + this.label1.TabIndex = 16; + this.label1.Text = "Title"; + // + // title + // + this.title.Location = new System.Drawing.Point(66, 47); + this.title.Name = "title"; + this.title.Size = new System.Drawing.Size(286, 20); + this.title.TabIndex = 17; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 76); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(32, 13); + this.label2.TabIndex = 16; + this.label2.Text = "Desc"; + // + // desc + // + this.desc.Location = new System.Drawing.Point(66, 73); + this.desc.Name = "desc"; + this.desc.Size = new System.Drawing.Size(286, 20); + this.desc.TabIndex = 17; + // + // selectable + // + this.selectable.AutoSize = true; + this.selectable.Location = new System.Drawing.Point(118, 138); + this.selectable.Name = "selectable"; + this.selectable.Size = new System.Drawing.Size(130, 17); + this.selectable.TabIndex = 18; + this.selectable.Text = "Show in Map Chooser"; + this.selectable.UseVisualStyleBackColor = true; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(12, 102); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(38, 13); + this.label3.TabIndex = 16; + this.label3.Text = "Author"; + // + // author + // + this.author.Location = new System.Drawing.Point(66, 99); + this.author.Name = "author"; + this.author.Size = new System.Drawing.Size(286, 20); + this.author.TabIndex = 17; + // + // checkBox1 + // + this.useAsShellmap.AutoSize = true; + this.useAsShellmap.Location = new System.Drawing.Point(118, 161); + this.useAsShellmap.Name = "checkBox1"; + this.useAsShellmap.Size = new System.Drawing.Size(105, 17); + this.useAsShellmap.TabIndex = 18; + this.useAsShellmap.Text = "Use as Shellmap"; + this.useAsShellmap.UseVisualStyleBackColor = true; + // + // PropertiesDialog + // + this.AcceptButton = this.button2; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.button1; + this.ClientSize = new System.Drawing.Size(370, 228); + this.Controls.Add(this.useAsShellmap); + this.Controls.Add(this.selectable); + this.Controls.Add(this.author); + this.Controls.Add(this.label3); + this.Controls.Add(this.desc); + this.Controls.Add(this.label2); + this.Controls.Add(this.title); + this.Controls.Add(this.label1); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "PropertiesDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "PropertiesDialog"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label1; + public System.Windows.Forms.TextBox title; + private System.Windows.Forms.Label label2; + public System.Windows.Forms.TextBox desc; + public System.Windows.Forms.CheckBox selectable; + private System.Windows.Forms.Label label3; + public System.Windows.Forms.TextBox author; + public System.Windows.Forms.CheckBox useAsShellmap; + } } \ No newline at end of file diff --git a/OpenRA.Editor/PropertiesDialog.resx b/OpenRA.Editor/PropertiesDialog.resx index ff31a6db56..19dc0dd8b3 100644 --- a/OpenRA.Editor/PropertiesDialog.resx +++ b/OpenRA.Editor/PropertiesDialog.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/OpenRA.Editor/ResizeDialog.Designer.cs b/OpenRA.Editor/ResizeDialog.Designer.cs index 3b39cc685c..c084db8210 100644 --- a/OpenRA.Editor/ResizeDialog.Designer.cs +++ b/OpenRA.Editor/ResizeDialog.Designer.cs @@ -1,226 +1,236 @@ -namespace OpenRA.Editor -{ - partial class ResizeDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.width = new System.Windows.Forms.NumericUpDown(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.cordonLeft = new System.Windows.Forms.NumericUpDown(); - this.cordonTop = new System.Windows.Forms.NumericUpDown(); - this.cordonRight = new System.Windows.Forms.NumericUpDown(); - this.cordonBottom = new System.Windows.Forms.NumericUpDown(); - this.label3 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.height = new System.Windows.Forms.NumericUpDown(); - ((System.ComponentModel.ISupportInitialize)(this.width)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonTop)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonRight)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.height)).BeginInit(); - this.SuspendLayout(); - // - // width - // - this.width.Increment = new decimal(new int[] { - 8, - 0, - 0, - 0}); - this.width.Location = new System.Drawing.Point(161, 18); - this.width.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.width.Name = "width"; - this.width.Size = new System.Drawing.Size(105, 20); - this.width.TabIndex = 0; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(23, 20); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(27, 13); - this.label1.TabIndex = 1; - this.label1.Text = "Size"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(23, 46); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(86, 13); - this.label2.TabIndex = 1; - this.label2.Text = "Cordon Left/Top"; - // - // cordonLeft - // - this.cordonLeft.Location = new System.Drawing.Point(161, 44); - this.cordonLeft.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.cordonLeft.Name = "cordonLeft"; - this.cordonLeft.Size = new System.Drawing.Size(105, 20); - this.cordonLeft.TabIndex = 0; - // - // cordonTop - // - this.cordonTop.Location = new System.Drawing.Point(272, 44); - this.cordonTop.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.cordonTop.Name = "cordonTop"; - this.cordonTop.Size = new System.Drawing.Size(105, 20); - this.cordonTop.TabIndex = 0; - // - // cordonRight - // - this.cordonRight.Location = new System.Drawing.Point(161, 70); - this.cordonRight.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.cordonRight.Name = "cordonRight"; - this.cordonRight.Size = new System.Drawing.Size(105, 20); - this.cordonRight.TabIndex = 0; - // - // cordonBottom - // - this.cordonBottom.Location = new System.Drawing.Point(272, 70); - this.cordonBottom.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.cordonBottom.Name = "cordonBottom"; - this.cordonBottom.Size = new System.Drawing.Size(105, 20); - this.cordonBottom.TabIndex = 0; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(23, 72); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(107, 13); - this.label3.TabIndex = 1; - this.label3.Text = "Cordon Right/Bottom"; - // - // button1 - // - this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.button1.Location = new System.Drawing.Point(302, 111); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 2; - this.button1.Text = "Cancel"; - this.button1.UseVisualStyleBackColor = true; - // - // button2 - // - this.button2.DialogResult = System.Windows.Forms.DialogResult.OK; - this.button2.Location = new System.Drawing.Point(221, 111); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 2; - this.button2.Text = "OK"; - this.button2.UseVisualStyleBackColor = true; - // - // height - // - this.height.Increment = new decimal(new int[] { - 8, - 0, - 0, - 0}); - this.height.Location = new System.Drawing.Point(272, 18); - this.height.Maximum = new decimal(new int[] { - 2048, - 0, - 0, - 0}); - this.height.Name = "height"; - this.height.Size = new System.Drawing.Size(105, 20); - this.height.TabIndex = 0; - // - // ResizeDialog - // - this.AcceptButton = this.button2; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.button1; - this.ClientSize = new System.Drawing.Size(409, 146); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.cordonBottom); - this.Controls.Add(this.cordonTop); - this.Controls.Add(this.cordonRight); - this.Controls.Add(this.cordonLeft); - this.Controls.Add(this.height); - this.Controls.Add(this.width); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "ResizeDialog"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Resize Map"; - ((System.ComponentModel.ISupportInitialize)(this.width)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonTop)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonRight)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.height)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; - public System.Windows.Forms.NumericUpDown width; - public System.Windows.Forms.NumericUpDown cordonLeft; - public System.Windows.Forms.NumericUpDown cordonTop; - public System.Windows.Forms.NumericUpDown cordonRight; - public System.Windows.Forms.NumericUpDown cordonBottom; - public System.Windows.Forms.NumericUpDown height; - } +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.Editor +{ + partial class ResizeDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.width = new System.Windows.Forms.NumericUpDown(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.cordonLeft = new System.Windows.Forms.NumericUpDown(); + this.cordonTop = new System.Windows.Forms.NumericUpDown(); + this.cordonRight = new System.Windows.Forms.NumericUpDown(); + this.cordonBottom = new System.Windows.Forms.NumericUpDown(); + this.label3 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.height = new System.Windows.Forms.NumericUpDown(); + ((System.ComponentModel.ISupportInitialize)(this.width)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonTop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonRight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.height)).BeginInit(); + this.SuspendLayout(); + // + // width + // + this.width.Increment = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.width.Location = new System.Drawing.Point(161, 18); + this.width.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.width.Name = "width"; + this.width.Size = new System.Drawing.Size(105, 20); + this.width.TabIndex = 0; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(23, 20); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(27, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Size"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(23, 46); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(86, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Cordon Left/Top"; + // + // cordonLeft + // + this.cordonLeft.Location = new System.Drawing.Point(161, 44); + this.cordonLeft.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.cordonLeft.Name = "cordonLeft"; + this.cordonLeft.Size = new System.Drawing.Size(105, 20); + this.cordonLeft.TabIndex = 0; + // + // cordonTop + // + this.cordonTop.Location = new System.Drawing.Point(272, 44); + this.cordonTop.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.cordonTop.Name = "cordonTop"; + this.cordonTop.Size = new System.Drawing.Size(105, 20); + this.cordonTop.TabIndex = 0; + // + // cordonRight + // + this.cordonRight.Location = new System.Drawing.Point(161, 70); + this.cordonRight.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.cordonRight.Name = "cordonRight"; + this.cordonRight.Size = new System.Drawing.Size(105, 20); + this.cordonRight.TabIndex = 0; + // + // cordonBottom + // + this.cordonBottom.Location = new System.Drawing.Point(272, 70); + this.cordonBottom.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.cordonBottom.Name = "cordonBottom"; + this.cordonBottom.Size = new System.Drawing.Size(105, 20); + this.cordonBottom.TabIndex = 0; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(23, 72); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(107, 13); + this.label3.TabIndex = 1; + this.label3.Text = "Cordon Right/Bottom"; + // + // button1 + // + this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.button1.Location = new System.Drawing.Point(302, 111); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 2; + this.button1.Text = "Cancel"; + this.button1.UseVisualStyleBackColor = true; + // + // button2 + // + this.button2.DialogResult = System.Windows.Forms.DialogResult.OK; + this.button2.Location = new System.Drawing.Point(221, 111); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 2; + this.button2.Text = "OK"; + this.button2.UseVisualStyleBackColor = true; + // + // height + // + this.height.Increment = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.height.Location = new System.Drawing.Point(272, 18); + this.height.Maximum = new decimal(new int[] { + 2048, + 0, + 0, + 0}); + this.height.Name = "height"; + this.height.Size = new System.Drawing.Size(105, 20); + this.height.TabIndex = 0; + // + // ResizeDialog + // + this.AcceptButton = this.button2; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.button1; + this.ClientSize = new System.Drawing.Size(409, 146); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.cordonBottom); + this.Controls.Add(this.cordonTop); + this.Controls.Add(this.cordonRight); + this.Controls.Add(this.cordonLeft); + this.Controls.Add(this.height); + this.Controls.Add(this.width); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "ResizeDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Resize Map"; + ((System.ComponentModel.ISupportInitialize)(this.width)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonTop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonRight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.height)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + public System.Windows.Forms.NumericUpDown width; + public System.Windows.Forms.NumericUpDown cordonLeft; + public System.Windows.Forms.NumericUpDown cordonTop; + public System.Windows.Forms.NumericUpDown cordonRight; + public System.Windows.Forms.NumericUpDown cordonBottom; + public System.Windows.Forms.NumericUpDown height; + } } \ No newline at end of file diff --git a/OpenRA.Editor/ResizeDialog.resx b/OpenRA.Editor/ResizeDialog.resx index ff31a6db56..19dc0dd8b3 100644 --- a/OpenRA.Editor/ResizeDialog.resx +++ b/OpenRA.Editor/ResizeDialog.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/OpenRA.Editor/Surface.cs b/OpenRA.Editor/Surface.cs index 02825aa149..39b30747e9 100755 --- a/OpenRA.Editor/Surface.cs +++ b/OpenRA.Editor/Surface.cs @@ -34,7 +34,7 @@ namespace OpenRA.Editor ITool Tool; - public bool IsPanning; + public bool IsPanning; public bool ShowActorNames; public event Action AfterChange = () => { }; @@ -338,22 +338,22 @@ namespace OpenRA.Editor Map.Bounds.Left * TileSet.TileSize * Zoom + Offset.X, Map.Bounds.Top * TileSet.TileSize * Zoom + Offset.Y, Map.Bounds.Width * TileSet.TileSize * Zoom, - Map.Bounds.Height * TileSet.TileSize * Zoom); - - foreach (var ar in Map.Actors.Value) - { - if (ActorTemplates.ContainsKey(ar.Value.Type)) - DrawActor(e.Graphics, ar.Value.Location(), ActorTemplates[ar.Value.Type], - GetPaletteForActor(ar.Value)); - } - - if (ShowActorNames) - foreach (var ar in Map.Actors.Value) - if (!ar.Key.StartsWith("Actor")) // if it has a custom name - e.Graphics.DrawStringContrast(Font, ar.Key, - (int)(ar.Value.Location().X * TileSet.TileSize * Zoom + Offset.X), - (int)(ar.Value.Location().Y * TileSet.TileSize * Zoom + Offset.Y), - Brushes.White, + Map.Bounds.Height * TileSet.TileSize * Zoom); + + foreach (var ar in Map.Actors.Value) + { + if (ActorTemplates.ContainsKey(ar.Value.Type)) + DrawActor(e.Graphics, ar.Value.Location(), ActorTemplates[ar.Value.Type], + GetPaletteForActor(ar.Value)); + } + + if (ShowActorNames) + foreach (var ar in Map.Actors.Value) + if (!ar.Key.StartsWith("Actor")) // if it has a custom name + e.Graphics.DrawStringContrast(Font, ar.Key, + (int)(ar.Value.Location().X * TileSet.TileSize * Zoom + Offset.X), + (int)(ar.Value.Location().Y * TileSet.TileSize * Zoom + Offset.Y), + Brushes.White, Brushes.Black); if (Tool != null) @@ -373,16 +373,16 @@ namespace OpenRA.Editor public static int2 Location(this ActorReference ar) { return ar.InitDict.Get().value; - } - - public static void DrawStringContrast(this SGraphics g, Font f, string s, int x, int y, Brush fg, Brush bg) - { - g.DrawString(s, f, bg, x - 1, y - 1); - g.DrawString(s, f, bg, x + 1, y - 1); - g.DrawString(s, f, bg, x - 1, y + 1); - g.DrawString(s, f, bg, x + 1, y + 1); - - g.DrawString(s, f, fg, x, y); + } + + public static void DrawStringContrast(this SGraphics g, Font f, string s, int x, int y, Brush fg, Brush bg) + { + g.DrawString(s, f, bg, x - 1, y - 1); + g.DrawString(s, f, bg, x + 1, y - 1); + g.DrawString(s, f, bg, x - 1, y + 1); + g.DrawString(s, f, bg, x + 1, y + 1); + + g.DrawString(s, f, fg, x, y); } } } \ No newline at end of file diff --git a/OpenRA.FileFormats/Exts.cs b/OpenRA.FileFormats/Exts.cs index 30ce755b0c..c5444c9791 100755 --- a/OpenRA.FileFormats/Exts.cs +++ b/OpenRA.FileFormats/Exts.cs @@ -105,11 +105,11 @@ namespace OpenRA public static bool Contains(this RectangleF r, int2 p) { return r.Contains(p.ToPointF()); - } - - public static bool HasModifier(this Modifiers k, Modifiers mod) - { - return (k & mod) == mod; + } + + public static bool HasModifier(this Modifiers k, Modifiers mod) + { + return (k & mod) == mod; } public static bool IsValidInput(this KeyInput key) @@ -117,37 +117,37 @@ namespace OpenRA return char.IsLetter(key.UnicodeChar) || char.IsDigit(key.UnicodeChar) || char.IsSymbol(key.UnicodeChar) || char.IsSeparator(key.UnicodeChar) || char.IsPunctuation(key.UnicodeChar); - } - - public static V GetOrAdd(this Dictionary d, K k) - where V : new() - { - return d.GetOrAdd(k, _ => new V()); - } - - public static V GetOrAdd(this Dictionary d, K k, Func createFn) - { - V ret; - if (!d.TryGetValue(k, out ret)) - d.Add(k, ret = createFn(k)); - return ret; - } - - public static T Random(this IEnumerable ts, Thirdparty.Random r) - { - var xs = ts.ToArray(); - return xs[r.Next(xs.Length)]; - } - - public static float Product(this IEnumerable xs) - { - return xs.Aggregate(1f, (a, x) => a * x); - } - - public static IEnumerable SymmetricDifference(this IEnumerable xs, IEnumerable ys) - { - // this is probably a shockingly-slow way to do this, but it's concise. - return xs.Except(ys).Concat(ys.Except(xs)); + } + + public static V GetOrAdd(this Dictionary d, K k) + where V : new() + { + return d.GetOrAdd(k, _ => new V()); + } + + public static V GetOrAdd(this Dictionary d, K k, Func createFn) + { + V ret; + if (!d.TryGetValue(k, out ret)) + d.Add(k, ret = createFn(k)); + return ret; + } + + public static T Random(this IEnumerable ts, Thirdparty.Random r) + { + var xs = ts.ToArray(); + return xs[r.Next(xs.Length)]; + } + + public static float Product(this IEnumerable xs) + { + return xs.Aggregate(1f, (a, x) => a * x); + } + + public static IEnumerable SymmetricDifference(this IEnumerable xs, IEnumerable ys) + { + // this is probably a shockingly-slow way to do this, but it's concise. + return xs.Except(ys).Concat(ys.Except(xs)); } } } diff --git a/OpenRA.FileFormats/Filesystem/Folder.cs b/OpenRA.FileFormats/Filesystem/Folder.cs index 89ff8fe778..0da19eafc2 100644 --- a/OpenRA.FileFormats/Filesystem/Folder.cs +++ b/OpenRA.FileFormats/Filesystem/Folder.cs @@ -63,8 +63,8 @@ namespace OpenRA.FileFormats } public void Write(Dictionary contents) - { - if (!Directory.Exists(path)) + { + if (!Directory.Exists(path)) Directory.CreateDirectory(path); foreach (var file in contents) diff --git a/OpenRA.FileFormats/Graphics/IGraphicsDevice.cs b/OpenRA.FileFormats/Graphics/IGraphicsDevice.cs index 572c1d1c76..272f2bb414 100755 --- a/OpenRA.FileFormats/Graphics/IGraphicsDevice.cs +++ b/OpenRA.FileFormats/Graphics/IGraphicsDevice.cs @@ -35,7 +35,7 @@ namespace OpenRA.FileFormats.Graphics ITexture CreateTexture(); IShader CreateShader( string name ); - Size WindowSize { get; } + Size WindowSize { get; } int GpuMemoryUsed { get; } void Clear( Color color ); diff --git a/OpenRA.FileFormats/Graphics/PngLoader.cs b/OpenRA.FileFormats/Graphics/PngLoader.cs index f977d9f5f7..da6ce4bd2a 100644 --- a/OpenRA.FileFormats/Graphics/PngLoader.cs +++ b/OpenRA.FileFormats/Graphics/PngLoader.cs @@ -1,181 +1,181 @@ -#region Copyright & License Information -/* - * Copyright 2007-2010 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. For more information, - * see COPYING. - */ -#endregion - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Imaging; -using System.IO; -using System.IO.Compression; -using System.Net; -using System.Runtime.InteropServices; -using System.Text; - -namespace OpenRA.FileFormats.Graphics -{ - public static class PngLoader - { - public static Bitmap Load(string filename) - { - return Load(File.OpenRead(filename)); - } - - public static Bitmap Load(Stream s) - { - using (var br = new BinaryReader(s)) - { - var signature = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10 }; - foreach (var b in signature) - if (br.ReadByte() != b) - throw new InvalidDataException("PNG Signature is bogus"); - - Bitmap bitmap = null; - Color[] palette = null; - List data = new List(); - - for (; ; ) - { - var length = IPAddress.NetworkToHostOrder(br.ReadInt32()); - var type = Encoding.UTF8.GetString(br.ReadBytes(4)); - var content = br.ReadBytes(length); - var crc = br.ReadInt32(); - - using (var ms = new MemoryStream(content)) - using (var cr = new BinaryReader(ms)) - switch (type) - { - case "IHDR": - { - - var width = IPAddress.NetworkToHostOrder(cr.ReadInt32()); - var height = IPAddress.NetworkToHostOrder(cr.ReadInt32()); - var bitDepth = cr.ReadByte(); - var colorType = (PngColorType)cr.ReadByte(); - var compression = cr.ReadByte(); - var filter = cr.ReadByte(); - var interlace = cr.ReadByte(); - - if (compression != 0) throw new InvalidDataException("Compression method not supported"); - if (interlace != 0) throw new InvalidDataException("Interlacing not supported"); - - bitmap = new Bitmap(width, height, MakePixelFormat(bitDepth, colorType)); - - } - break; - - case "PLTE": - { - palette = new Color[256]; - for (var i = 0; i < 256; i++) - { - var r = cr.ReadByte(); var g = cr.ReadByte(); var b = cr.ReadByte(); - palette[i] = Color.FromArgb(r, g, b); - } - } - break; - - case "tRNS": - { - for (var i = 0; i < length; i++) - palette[i] = Color.FromArgb(cr.ReadByte(), palette[i]); - } - break; - - case "IDAT": - { - data.AddRange(content); - } - break; - - case "IEND": - { - var bits = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), - ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); - - using (var ns = new MemoryStream(data.ToArray())) - { - // 'zlib' flags bytes; confuses the DeflateStream. - var flags = (byte)ns.ReadByte(); - var moreFlags = (byte)ns.ReadByte(); - - using (var ds = new DeflateStream(ns, CompressionMode.Decompress)) - using (var dr = new BinaryReader(ds)) - { - var prevLine = new byte[bitmap.Width]; // all zero - for (var y = 0; y < bitmap.Height; y++) - { - var filter = (PngFilter)dr.ReadByte(); - var line = dr.ReadBytes(bitmap.Width); - - for (var i = 0; i < bitmap.Width; i++) - line[i] = i > 0 - ? UnapplyFilter(filter, line[i], line[i - 1], prevLine[i], prevLine[i - 1]) - : UnapplyFilter(filter, line[i], 0, prevLine[i], 0); - - Marshal.Copy(line, 0, new IntPtr(bits.Scan0.ToInt64() + y * bits.Stride), line.Length); - prevLine = line; - } - } - } - - bitmap.UnlockBits(bits); - - using (var temp = new Bitmap(1, 1, PixelFormat.Format8bppIndexed)) - { - var cp = temp.Palette; - for (var i = 0; i < 256; i++) - cp.Entries[i] = palette[i]; // finalize the palette. - bitmap.Palette = cp; - return bitmap; - } - } - } - } - } - } - - static byte UnapplyFilter(PngFilter f, byte x, byte a, byte b, byte c) - { - switch (f) - { - case PngFilter.None: return x; - case PngFilter.Sub: return (byte)(x + a); - case PngFilter.Up: return (byte)(x + b); - case PngFilter.Average: return (byte)(x + (a + b) / 2); - case PngFilter.Paeth: return (byte)(x + Paeth(a, b, c)); - default: - throw new InvalidOperationException("Unsupported Filter"); - } - } - - static byte Paeth(byte a, byte b, byte c) - { - var p = a + b - c; - var pa = Math.Abs(p - a); - var pb = Math.Abs(p - b); - var pc = Math.Abs(p - c); - - return (pa <= pb && pa <= pc) ? a : - (pb <= pc) ? b : c; - } - - [Flags] - enum PngColorType { Indexed = 1, Color = 2, Alpha = 4 }; - enum PngFilter { None, Sub, Up, Average, Paeth }; - - static PixelFormat MakePixelFormat(byte bitDepth, PngColorType colorType) - { - if (bitDepth == 8 && colorType == (PngColorType.Indexed | PngColorType.Color)) - return PixelFormat.Format8bppIndexed; - - throw new InvalidDataException("Unknown pixelformat"); - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2010 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using System.IO.Compression; +using System.Net; +using System.Runtime.InteropServices; +using System.Text; + +namespace OpenRA.FileFormats.Graphics +{ + public static class PngLoader + { + public static Bitmap Load(string filename) + { + return Load(File.OpenRead(filename)); + } + + public static Bitmap Load(Stream s) + { + using (var br = new BinaryReader(s)) + { + var signature = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10 }; + foreach (var b in signature) + if (br.ReadByte() != b) + throw new InvalidDataException("PNG Signature is bogus"); + + Bitmap bitmap = null; + Color[] palette = null; + List data = new List(); + + for (; ; ) + { + var length = IPAddress.NetworkToHostOrder(br.ReadInt32()); + var type = Encoding.UTF8.GetString(br.ReadBytes(4)); + var content = br.ReadBytes(length); + var crc = br.ReadInt32(); + + using (var ms = new MemoryStream(content)) + using (var cr = new BinaryReader(ms)) + switch (type) + { + case "IHDR": + { + + var width = IPAddress.NetworkToHostOrder(cr.ReadInt32()); + var height = IPAddress.NetworkToHostOrder(cr.ReadInt32()); + var bitDepth = cr.ReadByte(); + var colorType = (PngColorType)cr.ReadByte(); + var compression = cr.ReadByte(); + var filter = cr.ReadByte(); + var interlace = cr.ReadByte(); + + if (compression != 0) throw new InvalidDataException("Compression method not supported"); + if (interlace != 0) throw new InvalidDataException("Interlacing not supported"); + + bitmap = new Bitmap(width, height, MakePixelFormat(bitDepth, colorType)); + + } + break; + + case "PLTE": + { + palette = new Color[256]; + for (var i = 0; i < 256; i++) + { + var r = cr.ReadByte(); var g = cr.ReadByte(); var b = cr.ReadByte(); + palette[i] = Color.FromArgb(r, g, b); + } + } + break; + + case "tRNS": + { + for (var i = 0; i < length; i++) + palette[i] = Color.FromArgb(cr.ReadByte(), palette[i]); + } + break; + + case "IDAT": + { + data.AddRange(content); + } + break; + + case "IEND": + { + var bits = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), + ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); + + using (var ns = new MemoryStream(data.ToArray())) + { + // 'zlib' flags bytes; confuses the DeflateStream. + var flags = (byte)ns.ReadByte(); + var moreFlags = (byte)ns.ReadByte(); + + using (var ds = new DeflateStream(ns, CompressionMode.Decompress)) + using (var dr = new BinaryReader(ds)) + { + var prevLine = new byte[bitmap.Width]; // all zero + for (var y = 0; y < bitmap.Height; y++) + { + var filter = (PngFilter)dr.ReadByte(); + var line = dr.ReadBytes(bitmap.Width); + + for (var i = 0; i < bitmap.Width; i++) + line[i] = i > 0 + ? UnapplyFilter(filter, line[i], line[i - 1], prevLine[i], prevLine[i - 1]) + : UnapplyFilter(filter, line[i], 0, prevLine[i], 0); + + Marshal.Copy(line, 0, new IntPtr(bits.Scan0.ToInt64() + y * bits.Stride), line.Length); + prevLine = line; + } + } + } + + bitmap.UnlockBits(bits); + + using (var temp = new Bitmap(1, 1, PixelFormat.Format8bppIndexed)) + { + var cp = temp.Palette; + for (var i = 0; i < 256; i++) + cp.Entries[i] = palette[i]; // finalize the palette. + bitmap.Palette = cp; + return bitmap; + } + } + } + } + } + } + + static byte UnapplyFilter(PngFilter f, byte x, byte a, byte b, byte c) + { + switch (f) + { + case PngFilter.None: return x; + case PngFilter.Sub: return (byte)(x + a); + case PngFilter.Up: return (byte)(x + b); + case PngFilter.Average: return (byte)(x + (a + b) / 2); + case PngFilter.Paeth: return (byte)(x + Paeth(a, b, c)); + default: + throw new InvalidOperationException("Unsupported Filter"); + } + } + + static byte Paeth(byte a, byte b, byte c) + { + var p = a + b - c; + var pa = Math.Abs(p - a); + var pb = Math.Abs(p - b); + var pc = Math.Abs(p - c); + + return (pa <= pb && pa <= pc) ? a : + (pb <= pc) ? b : c; + } + + [Flags] + enum PngColorType { Indexed = 1, Color = 2, Alpha = 4 }; + enum PngFilter { None, Sub, Up, Average, Paeth }; + + static PixelFormat MakePixelFormat(byte bitDepth, PngColorType colorType) + { + if (bitDepth == 8 && colorType == (PngColorType.Indexed | PngColorType.Color)) + return PixelFormat.Format8bppIndexed; + + throw new InvalidDataException("Unknown pixelformat"); + } + } +} diff --git a/OpenRA.FileFormats/Graphics/ShpWriter.cs b/OpenRA.FileFormats/Graphics/ShpWriter.cs index b778d095e8..8e3cf1521c 100644 --- a/OpenRA.FileFormats/Graphics/ShpWriter.cs +++ b/OpenRA.FileFormats/Graphics/ShpWriter.cs @@ -1,46 +1,56 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; - -namespace OpenRA.FileFormats.Graphics -{ - // format80-only SHP writer - - public static class ShpWriter - { - public static void Write(Stream s, int width, int height, IEnumerable frames) - { - var compressedFrames = frames.Select(f => Format80.Encode(f)).ToArray(); - - // note: end-of-file and all-zeroes headers - var dataOffset = 14 + (compressedFrames.Length + 2) * ImageHeader.SizeOnDisk; - - using (var bw = new BinaryWriter(s)) - { - bw.Write((ushort)compressedFrames.Length); - bw.Write((ushort)0); // unused - bw.Write((ushort)0); // unused - bw.Write((ushort)width); - bw.Write((ushort)height); - bw.Write((uint)0); // unused - - foreach (var f in compressedFrames) - { - var ih = new ImageHeader { Format = Format.Format80, Offset = (uint)dataOffset }; - dataOffset += f.Length; - - ih.WriteTo(bw); - } - - var eof = new ImageHeader { Offset = (uint)dataOffset }; - eof.WriteTo(bw); - - var allZeroes = new ImageHeader { }; - allZeroes.WriteTo(bw); - - foreach (var f in compressedFrames) - bw.Write(f); - } - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace OpenRA.FileFormats.Graphics +{ + // format80-only SHP writer + + public static class ShpWriter + { + public static void Write(Stream s, int width, int height, IEnumerable frames) + { + var compressedFrames = frames.Select(f => Format80.Encode(f)).ToArray(); + + // note: end-of-file and all-zeroes headers + var dataOffset = 14 + (compressedFrames.Length + 2) * ImageHeader.SizeOnDisk; + + using (var bw = new BinaryWriter(s)) + { + bw.Write((ushort)compressedFrames.Length); + bw.Write((ushort)0); // unused + bw.Write((ushort)0); // unused + bw.Write((ushort)width); + bw.Write((ushort)height); + bw.Write((uint)0); // unused + + foreach (var f in compressedFrames) + { + var ih = new ImageHeader { Format = Format.Format80, Offset = (uint)dataOffset }; + dataOffset += f.Length; + + ih.WriteTo(bw); + } + + var eof = new ImageHeader { Offset = (uint)dataOffset }; + eof.WriteTo(bw); + + var allZeroes = new ImageHeader { }; + allZeroes.WriteTo(bw); + + foreach (var f in compressedFrames) + bw.Write(f); + } + } + } +} diff --git a/OpenRA.FileFormats/MiniYaml.cs b/OpenRA.FileFormats/MiniYaml.cs index 04d3a1b9f9..fdd207d570 100755 --- a/OpenRA.FileFormats/MiniYaml.cs +++ b/OpenRA.FileFormats/MiniYaml.cs @@ -21,8 +21,8 @@ namespace OpenRA.FileFormats { public struct SourceLocation { - public string Filename; public int Line; - public override string ToString() { return "{0}:{1}".F(Filename, Line); } + public string Filename; public int Line; + public override string ToString() { return "{0}:{1}".F(Filename, Line); } } public SourceLocation Location; @@ -53,11 +53,11 @@ namespace OpenRA.FileFormats public MiniYamlNode( string k, string v, List n, SourceLocation loc ) : this( k, new MiniYaml( v, n ), loc ) { - } - - public override string ToString() - { - return "{{YamlNode: {0} @ {1}}}".F(Key, Location); + } + + public override string ToString() + { + return "{{YamlNode: {0} @ {1}}}".F(Key, Location); } } @@ -175,8 +175,8 @@ namespace OpenRA.FileFormats var aDict = a.ToDictionary( x => x.Key ); var bDict = b.ToDictionary( x => x.Key ); - var keys = aDict.Keys.Union( bDict.Keys ).ToList(); - + var keys = aDict.Keys.Union( bDict.Keys ).ToList(); + var noInherit = keys.Where(x => x.Length > 0 && x[0] == '-') .ToDictionary(x => x.Substring(1), x => false); @@ -189,7 +189,7 @@ namespace OpenRA.FileFormats if( noInherit.ContainsKey( key ) ) { // if( aa != null ) - // ret.Add( aa ); + // ret.Add( aa ); noInherit[key] = true; } else @@ -198,10 +198,10 @@ namespace OpenRA.FileFormats var merged = ( aa == null || bb == null ) ? aa ?? bb : new MiniYamlNode( key, Merge( aa.Value, bb.Value ), loc ); ret.Add( merged ); } - } - - if (noInherit.ContainsValue(false)) - throw new YamlException("Bogus yaml removals: {0}".F( + } + + if (noInherit.ContainsValue(false)) + throw new YamlException("Bogus yaml removals: {0}".F( string.Join(", ", noInherit.Where(x => !x.Value).Select(x => x.Key).ToArray()))); return ret; @@ -248,10 +248,10 @@ namespace OpenRA.FileFormats yield return ""; } } - } - - public class YamlException : Exception - { - public YamlException(string s) : base(s) { } + } + + public class YamlException : Exception + { + public YamlException(string s) : base(s) { } } } diff --git a/OpenRA.FileFormats/Mod.cs b/OpenRA.FileFormats/Mod.cs index 7caf342ae6..d12f9e72de 100644 --- a/OpenRA.FileFormats/Mod.cs +++ b/OpenRA.FileFormats/Mod.cs @@ -1,47 +1,47 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007-2011 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. For more information, * see COPYING. - */ -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -namespace OpenRA.FileFormats -{ - public class Mod - { - public string Title; - public string Description; - public string Version; - public string Author; - public string Requires; - public bool Standalone = false; - - public static readonly Dictionary AllMods = ValidateMods(Directory.GetDirectories("mods").Select(x => x.Substring(5)).ToArray()); - - public static Dictionary ValidateMods(string[] mods) - { - var ret = new Dictionary(); - foreach (var m in mods) - { - if (!File.Exists("mods" + Path.DirectorySeparatorChar + m + Path.DirectorySeparatorChar + "mod.yaml")) - continue; - - var yaml = new MiniYaml(null, MiniYaml.FromFile("mods" + Path.DirectorySeparatorChar + m + Path.DirectorySeparatorChar + "mod.yaml")); - if (!yaml.NodesDict.ContainsKey("Metadata")) - continue; - - ret.Add(m, FieldLoader.Load(yaml.NodesDict["Metadata"])); - } - return ret; - } - } -} + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; + +namespace OpenRA.FileFormats +{ + public class Mod + { + public string Title; + public string Description; + public string Version; + public string Author; + public string Requires; + public bool Standalone = false; + + public static readonly Dictionary AllMods = ValidateMods(Directory.GetDirectories("mods").Select(x => x.Substring(5)).ToArray()); + + public static Dictionary ValidateMods(string[] mods) + { + var ret = new Dictionary(); + foreach (var m in mods) + { + if (!File.Exists("mods" + Path.DirectorySeparatorChar + m + Path.DirectorySeparatorChar + "mod.yaml")) + continue; + + var yaml = new MiniYaml(null, MiniYaml.FromFile("mods" + Path.DirectorySeparatorChar + m + Path.DirectorySeparatorChar + "mod.yaml")); + if (!yaml.NodesDict.ContainsKey("Metadata")) + continue; + + ret.Add(m, FieldLoader.Load(yaml.NodesDict["Metadata"])); + } + return ret; + } + } +} diff --git a/OpenRA.FileFormats/OpenRA.FileFormats.csproj b/OpenRA.FileFormats/OpenRA.FileFormats.csproj index 2fad3ee4c2..e5eb2d25b6 100644 --- a/OpenRA.FileFormats/OpenRA.FileFormats.csproj +++ b/OpenRA.FileFormats/OpenRA.FileFormats.csproj @@ -1,124 +1,124 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA} - Library - Properties - OpenRA.FileFormats - OpenRA.FileFormats - - - 2.0 - - - v3.5 - - - true - ..\ - DEBUG;TRACE - true - full - AnyCPU - prompt - 4 - false - - - bin\Release\ - TRACE - true - true - pdbonly - AnyCPU - prompt - 4 - - - - - 3.5 - - - - - - - False - ..\thirdparty\Tao\Tao.Sdl.dll - - - 3.0 - - - False - ..\thirdparty\ICSharpCode.SharpZipLib.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA} + Library + Properties + OpenRA.FileFormats + OpenRA.FileFormats + + + 2.0 + + + v3.5 + + + true + ..\ + DEBUG;TRACE + true + full + AnyCPU + prompt + 4 + false + + + bin\Release\ + TRACE + true + true + pdbonly + AnyCPU + prompt + 4 + + + + + 3.5 + + + + + + + False + ..\thirdparty\Tao\Tao.Sdl.dll + + + 3.0 + + + False + ..\thirdparty\ICSharpCode.SharpZipLib.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OpenRA.FileFormats/Primitives/Cache.cs b/OpenRA.FileFormats/Primitives/Cache.cs index 7e350a5f74..fefbc5460e 100644 --- a/OpenRA.FileFormats/Primitives/Cache.cs +++ b/OpenRA.FileFormats/Primitives/Cache.cs @@ -15,7 +15,7 @@ using System.Collections.Generic; namespace OpenRA.FileFormats { public class Cache : IEnumerable> - { + { Dictionary hax; Func loader; @@ -26,10 +26,10 @@ namespace OpenRA.FileFormats throw new ArgumentNullException(); this.loader = loader; - } - - public Cache(Func loader) - : this(loader, EqualityComparer.Default) { } + } + + public Cache(Func loader) + : this(loader, EqualityComparer.Default) { } public U this[T key] { diff --git a/OpenRA.FileFormats/Primitives/Lazy.cs b/OpenRA.FileFormats/Primitives/Lazy.cs index c2735b99a2..d037ef25fd 100644 --- a/OpenRA.FileFormats/Primitives/Lazy.cs +++ b/OpenRA.FileFormats/Primitives/Lazy.cs @@ -36,11 +36,11 @@ namespace OpenRA.FileFormats p = null; return value; } - } - - public void Force() - { - var ignored = Value; + } + + public void Force() + { + var ignored = Value; } } diff --git a/OpenRA.FileFormats/Primitives/Pair.cs b/OpenRA.FileFormats/Primitives/Pair.cs index 7603795801..47004138e6 100644 --- a/OpenRA.FileFormats/Primitives/Pair.cs +++ b/OpenRA.FileFormats/Primitives/Pair.cs @@ -8,8 +8,8 @@ */ #endregion -using System.Collections.Generic; -using System; +using System.Collections.Generic; +using System; using System.Drawing; namespace OpenRA.FileFormats @@ -25,7 +25,7 @@ namespace OpenRA.FileFormats Second = second; } - internal static IEqualityComparer tc = EqualityComparer.Default; + internal static IEqualityComparer tc = EqualityComparer.Default; internal static IEqualityComparer uc = EqualityComparer.Default; public static bool operator ==(Pair a, Pair b) @@ -60,31 +60,31 @@ namespace OpenRA.FileFormats public override string ToString() { return "({0},{1})".F(First, Second); - } - - class PairEqualityComparer : IEqualityComparer> - { - public bool Equals(Pair x, Pair y) { return x == y; } - public int GetHashCode(Pair obj) { return obj.GetHashCode(); } - } - + } + + class PairEqualityComparer : IEqualityComparer> + { + public bool Equals(Pair x, Pair y) { return x == y; } + public int GetHashCode(Pair obj) { return obj.GetHashCode(); } + } + public static IEqualityComparer> EqualityComparer { get { return new PairEqualityComparer(); } } } public static class Pair - { - public static Pair New(T t, U u) { return new Pair(t, u); } - - static Pair() - { - Pair.uc = new ColorEqualityComparer(); - } - - // avoid the default crappy one - class ColorEqualityComparer : IEqualityComparer - { - public bool Equals(Color x, Color y) { return x.ToArgb() == y.ToArgb(); } - public int GetHashCode(Color obj) { return obj.GetHashCode(); } - } + { + public static Pair New(T t, U u) { return new Pair(t, u); } + + static Pair() + { + Pair.uc = new ColorEqualityComparer(); + } + + // avoid the default crappy one + class ColorEqualityComparer : IEqualityComparer + { + public bool Equals(Color x, Color y) { return x.ToArgb() == y.ToArgb(); } + public int GetHashCode(Color obj) { return obj.GetHashCode(); } + } } } diff --git a/OpenRA.FileFormats/Properties/AssemblyInfo.cs b/OpenRA.FileFormats/Properties/AssemblyInfo.cs index cc37fbbb81..6a133254e4 100644 --- a/OpenRA.FileFormats/Properties/AssemblyInfo.cs +++ b/OpenRA.FileFormats/Properties/AssemblyInfo.cs @@ -1,36 +1,26 @@ -#region Copyright & License Information -/* - * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. - * This file is part of OpenRA. - * - * OpenRA is free software: you can redistribute it and/or modify - * it 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. - * - * OpenRA is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with OpenRA. If not, see . - */ -#endregion - -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("OpenRA.FileFormats")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.FileFormats")] -[assembly: AssemblyCopyright("Copyright © 2007,2009,2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("OpenRA.FileFormats")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenRA.FileFormats")] +[assembly: AssemblyCopyright("Copyright © 2007,2009,2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index 9c5b258b7f..08c5e350b7 100755 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -65,7 +65,7 @@ namespace OpenRA return firstSprite.Sprite.size * firstSprite.Scale; }); - ApplyIRender = x => x.Render(this); + ApplyIRender = x => x.Render(this); ApplyRenderModifier = (m, p) => p.ModifyRender(this, m); } @@ -83,14 +83,14 @@ namespace OpenRA get { return currentActivity == null; } } - OpenRA.FileFormats.Lazy Size; - - // note: these delegates are cached to avoid massive allocation. - Func> ApplyIRender; + OpenRA.FileFormats.Lazy Size; + + // note: these delegates are cached to avoid massive allocation. + Func> ApplyIRender; Func, IRenderModifier, IEnumerable> ApplyRenderModifier; public IEnumerable Render() { - var mods = TraitsImplementing(); + var mods = TraitsImplementing(); var sprites = TraitsImplementing().SelectMany(ApplyIRender); return mods.Aggregate(sprites, ApplyRenderModifier); } diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 5152ba991e..8c2a67d76a 100755 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -266,11 +266,11 @@ namespace OpenRA var mm = mods.Where( m => Mod.AllMods.ContainsKey( m ) ).ToArray(); Console.WriteLine("Loading mods: {0}",string.Join(",",mm)); Settings.Game.Mods = mm; - Settings.Save(); - - Sound.StopMusic(); + Settings.Save(); + + Sound.StopMusic(); Sound.StopVideo(); - Sound.Initialize(); + Sound.Initialize(); modData = new ModData( mm ); modData.LoadInitialAssets(); @@ -366,11 +366,11 @@ namespace OpenRA { server = new Server.Server(modData, settings, map); JoinServer(IPAddress.Loopback.ToString(), settings.Server.ListenPort); - } - - public static bool IsCurrentWorld(World world) - { - return orderManager != null && orderManager.world == world; - } + } + + public static bool IsCurrentWorld(World world) + { + return orderManager != null && orderManager.world == world; + } } } diff --git a/OpenRA.Game/GameRules/ActorInfo.cs b/OpenRA.Game/GameRules/ActorInfo.cs index f421c34138..ec3b8c358d 100644 --- a/OpenRA.Game/GameRules/ActorInfo.cs +++ b/OpenRA.Game/GameRules/ActorInfo.cs @@ -22,29 +22,29 @@ namespace OpenRA public readonly TypeDictionary Traits = new TypeDictionary(); public ActorInfo( string name, MiniYaml node, Dictionary allUnits ) - { - try - { - var mergedNode = MergeWithParent(node, allUnits).NodesDict; - - Name = name; - foreach (var t in mergedNode) - if (t.Key != "Inherits" && !t.Key.StartsWith("-")) - Traits.Add(LoadTraitInfo(t.Key.Split('@')[0], t.Value)); - } - catch (YamlException e) - { - throw new YamlException("Actor type {0}: {1}".F(name, e.Message)); + { + try + { + var mergedNode = MergeWithParent(node, allUnits).NodesDict; + + Name = name; + foreach (var t in mergedNode) + if (t.Key != "Inherits" && !t.Key.StartsWith("-")) + Traits.Add(LoadTraitInfo(t.Key.Split('@')[0], t.Value)); + } + catch (YamlException e) + { + throw new YamlException("Actor type {0}: {1}".F(name, e.Message)); + } + } + + static IEnumerable GetInheritanceChain(MiniYaml node, Dictionary allUnits) + { + while (node != null) + { + yield return node; + node = GetParent(node, allUnits); } - } - - static IEnumerable GetInheritanceChain(MiniYaml node, Dictionary allUnits) - { - while (node != null) - { - yield return node; - node = GetParent(node, allUnits); - } } static MiniYaml GetParent( MiniYaml node, Dictionary allUnits ) @@ -55,9 +55,9 @@ namespace OpenRA return null; MiniYaml parent; - allUnits.TryGetValue( inherits.Value, out parent ); - if (parent == null) - throw new InvalidOperationException( + allUnits.TryGetValue( inherits.Value, out parent ); + if (parent == null) + throw new InvalidOperationException( "Bogus inheritance -- actor type {0} does not exist".F(inherits.Value)); return parent; @@ -65,14 +65,14 @@ namespace OpenRA static MiniYaml MergeWithParent( MiniYaml node, Dictionary allUnits ) { - var parent = GetParent( node, allUnits ); - if (parent != null) - { - var result = MiniYaml.Merge(node, MergeWithParent(parent, allUnits)); - - // strip the '-' - result.Nodes.RemoveAll(a => a.Key.StartsWith("-")); - return result; + var parent = GetParent( node, allUnits ); + if (parent != null) + { + var result = MiniYaml.Merge(node, MergeWithParent(parent, allUnits)); + + // strip the '-' + result.Nodes.RemoveAll(a => a.Key.StartsWith("-")); + return result; } return node; } diff --git a/OpenRA.Game/Graphics/Animation.cs b/OpenRA.Game/Graphics/Animation.cs index c780096062..f3e0ca318b 100644 --- a/OpenRA.Game/Graphics/Animation.cs +++ b/OpenRA.Game/Graphics/Animation.cs @@ -53,15 +53,15 @@ namespace OpenRA.Graphics public void PlayRepeating( string sequenceName ) { - backwards = false; - tickAlways = false; - CurrentSequence = SequenceProvider.GetSequence(name, sequenceName); - frame = 0; - tickFunc = () => - { - ++frame; - if (frame >= CurrentSequence.Length) - frame = 0; + backwards = false; + tickAlways = false; + CurrentSequence = SequenceProvider.GetSequence(name, sequenceName); + frame = 0; + tickFunc = () => + { + ++frame; + if (frame >= CurrentSequence.Length) + frame = 0; }; } diff --git a/OpenRA.Game/Graphics/HardwarePalette.cs b/OpenRA.Game/Graphics/HardwarePalette.cs index 57a39c2ecf..fc626d336f 100644 --- a/OpenRA.Game/Graphics/HardwarePalette.cs +++ b/OpenRA.Game/Graphics/HardwarePalette.cs @@ -56,8 +56,8 @@ namespace OpenRA.Graphics palettes.Add(name, p); indices.Add(name, allocated++); - } - + } + uint[,] data = new uint[MaxPalettes, 256]; public void Update(IEnumerable paletteMods) { diff --git a/OpenRA.Game/Graphics/Util.cs b/OpenRA.Game/Graphics/Util.cs index ead333b2ff..43eebdb35c 100644 --- a/OpenRA.Game/Graphics/Util.cs +++ b/OpenRA.Game/Graphics/Util.cs @@ -55,20 +55,20 @@ namespace OpenRA.Graphics vertices[nv + 2] = new Vertex(new float2(o.X, o.Y + size.Y), r.FastMapTextureCoords(2), attrib); vertices[nv + 3] = new Vertex(new float2(o.X + size.X, o.Y + size.Y), - r.FastMapTextureCoords(3), attrib); - - indices[ni] = (uint)(nv); - indices[ni + 1] = indices[ni + 3] = (uint)(nv + 1); + r.FastMapTextureCoords(3), attrib); + + indices[ni] = (uint)(nv); + indices[ni + 1] = indices[ni + 3] = (uint)(nv + 1); indices[ni + 2] = indices[ni + 5] = (uint)(nv + 2); indices[ni + 4] = (uint)(nv + 3); - } - + } + static readonly int[] channelMasks = { 2, 1, 0, 3 }; // yes, our channel order is nuts. public static void FastCopyIntoChannel(Sprite dest, byte[] src) { var data = dest.sheet.Data; var srcStride = dest.bounds.Width; - var destStride = dest.sheet.Size.Width * 4; + var destStride = dest.sheet.Size.Width * 4; var destOffset = destStride * dest.bounds.Top + dest.bounds.Left * 4 + channelMasks[(int)dest.channel]; var destSkip = destStride - 4 * srcStride; var height = dest.bounds.Height; diff --git a/OpenRA.Game/Graphics/Viewport.cs b/OpenRA.Game/Graphics/Viewport.cs index 1e45c10b93..3fd6c7aae8 100755 --- a/OpenRA.Game/Graphics/Viewport.cs +++ b/OpenRA.Game/Graphics/Viewport.cs @@ -86,11 +86,11 @@ namespace OpenRA.Graphics wr.Draw(); Widget.DoDraw(); - var cursorName = Widget.RootWidget.GetCursorOuter(Viewport.LastMousePos) ?? "default"; - var cursorSequence = CursorProvider.GetCursorSequence(cursorName); - - cursorSequence.GetSprite((int)cursorFrame).DrawAt( - Viewport.LastMousePos + Location - cursorSequence.Hotspot, + var cursorName = Widget.RootWidget.GetCursorOuter(Viewport.LastMousePos) ?? "default"; + var cursorSequence = CursorProvider.GetCursorSequence(cursorName); + + cursorSequence.GetSprite((int)cursorFrame).DrawAt( + Viewport.LastMousePos + Location - cursorSequence.Hotspot, Game.modData.Palette.GetPaletteIndex(cursorSequence.Palette)); renderer.EndFrame( inputHandler ); diff --git a/OpenRA.Game/Graphics/WorldRenderer.cs b/OpenRA.Game/Graphics/WorldRenderer.cs index 6dbe5759a5..fb33bd894f 100644 --- a/OpenRA.Game/Graphics/WorldRenderer.cs +++ b/OpenRA.Game/Graphics/WorldRenderer.cs @@ -122,33 +122,33 @@ namespace OpenRA.Graphics Game.Renderer.LineRenderer.DrawLine(a + b, a + b + c, color, color); Game.Renderer.LineRenderer.DrawLine(a + b + c, a + c, color, color); Game.Renderer.LineRenderer.DrawLine(a, a + c, color, color); - } - - public void DrawSelectionBox(Actor selectedUnit, Color c) - { - var bounds = selectedUnit.GetBounds(false); - - var xy = new float2(bounds.Left, bounds.Top); - var Xy = new float2(bounds.Right, bounds.Top); - var xY = new float2(bounds.Left, bounds.Bottom); - var XY = new float2(bounds.Right, bounds.Bottom); - - Game.Renderer.LineRenderer.DrawLine(xy, xy + new float2(4, 0), c, c); - Game.Renderer.LineRenderer.DrawLine(xy, xy + new float2(0, 4), c, c); - Game.Renderer.LineRenderer.DrawLine(Xy, Xy + new float2(-4, 0), c, c); - Game.Renderer.LineRenderer.DrawLine(Xy, Xy + new float2(0, 4), c, c); - - Game.Renderer.LineRenderer.DrawLine(xY, xY + new float2(4, 0), c, c); - Game.Renderer.LineRenderer.DrawLine(xY, xY + new float2(0, -4), c, c); - Game.Renderer.LineRenderer.DrawLine(XY, XY + new float2(-4, 0), c, c); - Game.Renderer.LineRenderer.DrawLine(XY, XY + new float2(0, -4), c, c); - } - - public void DrawRollover(Actor unit) - { - var selectable = unit.TraitOrDefault(); - if (selectable != null) - selectable.DrawRollover(this, unit); + } + + public void DrawSelectionBox(Actor selectedUnit, Color c) + { + var bounds = selectedUnit.GetBounds(false); + + var xy = new float2(bounds.Left, bounds.Top); + var Xy = new float2(bounds.Right, bounds.Top); + var xY = new float2(bounds.Left, bounds.Bottom); + var XY = new float2(bounds.Right, bounds.Bottom); + + Game.Renderer.LineRenderer.DrawLine(xy, xy + new float2(4, 0), c, c); + Game.Renderer.LineRenderer.DrawLine(xy, xy + new float2(0, 4), c, c); + Game.Renderer.LineRenderer.DrawLine(Xy, Xy + new float2(-4, 0), c, c); + Game.Renderer.LineRenderer.DrawLine(Xy, Xy + new float2(0, 4), c, c); + + Game.Renderer.LineRenderer.DrawLine(xY, xY + new float2(4, 0), c, c); + Game.Renderer.LineRenderer.DrawLine(xY, xY + new float2(0, -4), c, c); + Game.Renderer.LineRenderer.DrawLine(XY, XY + new float2(-4, 0), c, c); + Game.Renderer.LineRenderer.DrawLine(XY, XY + new float2(0, -4), c, c); + } + + public void DrawRollover(Actor unit) + { + var selectable = unit.TraitOrDefault(); + if (selectable != null) + selectable.DrawRollover(this, unit); } public void DrawLocus(Color c, int2[] cells) diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs index 6892a782dc..eeef9fc445 100644 --- a/OpenRA.Game/Map.cs +++ b/OpenRA.Game/Map.cs @@ -375,11 +375,11 @@ namespace OpenRA // File header consists of a version byte, followed by 2 ushorts for width and height writer.Write(TileFormat); writer.Write((ushort)MapSize.X); - writer.Write((ushort)MapSize.Y); - - if (!OpenRA.Rules.TileSets.ContainsKey(Tileset)) - throw new InvalidOperationException( - "Tileset used by the map ({0}) does not exist in this mod. Valid tilesets are: {1}" + writer.Write((ushort)MapSize.Y); + + if (!OpenRA.Rules.TileSets.ContainsKey(Tileset)) + throw new InvalidOperationException( + "Tileset used by the map ({0}) does not exist in this mod. Valid tilesets are: {1}" .F(Tileset, string.Join(",", OpenRA.Rules.TileSets.Keys.ToArray()))); // Tile data @@ -423,11 +423,11 @@ namespace OpenRA } public void Resize(int width, int height) // editor magic. - { - var oldMapTiles = MapTiles.Value; - var oldMapResources = MapResources.Value; - - MapTiles = Lazy.New(() => ResizeArray(oldMapTiles, oldMapTiles[0, 0], width, height)); + { + var oldMapTiles = MapTiles.Value; + var oldMapResources = MapResources.Value; + + MapTiles = Lazy.New(() => ResizeArray(oldMapTiles, oldMapTiles[0, 0], width, height)); MapResources = Lazy.New(() => ResizeArray(oldMapResources, oldMapResources[0, 0], width, height)); MapSize = new int2(width, height); } diff --git a/OpenRA.Game/Network/FrameData.cs b/OpenRA.Game/Network/FrameData.cs index e3e4d2c635..a8ce757268 100755 --- a/OpenRA.Game/Network/FrameData.cs +++ b/OpenRA.Game/Network/FrameData.cs @@ -1,61 +1,71 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace OpenRA.Network -{ - class FrameData - { - public struct ClientOrder - { - public int Client; - public Order Order; - } - - readonly Dictionary clientQuitTimes = new Dictionary(); - readonly Dictionary> framePackets = new Dictionary>(); - - public IEnumerable ClientsPlayingInFrame( int frame ) - { - return clientQuitTimes - .Where( x => frame <= x.Value ) - .Select( x => x.Key ) - .OrderBy( x => x ); - } - - public void ClientQuit( int clientId, int lastClientFrame ) - { - clientQuitTimes[clientId] = lastClientFrame; - } - - public void AddFrameOrders( int clientId, int frame, byte[] orders ) - { - var frameData = framePackets.GetOrAdd( frame ); - frameData.Add( clientId, orders ); - } - - public bool IsReadyForFrame(int frame) - { - return !ClientsNotReadyForFrame(frame).Any(); - } - - public IEnumerable ClientsNotReadyForFrame(int frame) - { - var frameData = framePackets.GetOrAdd(frame); - return ClientsPlayingInFrame(frame) - .Where(client => !frameData.ContainsKey(client)); - } - - public IEnumerable OrdersForFrame( World world, int frame ) - { - var frameData = framePackets[ frame ]; - var clientData = ClientsPlayingInFrame( frame ) - .ToDictionary( k => k, v => frameData[ v ] ); - - return clientData - .SelectMany( x => x.Value - .ToOrderList( world ) - .Select( o => new ClientOrder { Client = x.Key, Order = o } ) ); - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace OpenRA.Network +{ + class FrameData + { + public struct ClientOrder + { + public int Client; + public Order Order; + } + + readonly Dictionary clientQuitTimes = new Dictionary(); + readonly Dictionary> framePackets = new Dictionary>(); + + public IEnumerable ClientsPlayingInFrame( int frame ) + { + return clientQuitTimes + .Where( x => frame <= x.Value ) + .Select( x => x.Key ) + .OrderBy( x => x ); + } + + public void ClientQuit( int clientId, int lastClientFrame ) + { + clientQuitTimes[clientId] = lastClientFrame; + } + + public void AddFrameOrders( int clientId, int frame, byte[] orders ) + { + var frameData = framePackets.GetOrAdd( frame ); + frameData.Add( clientId, orders ); + } + + public bool IsReadyForFrame(int frame) + { + return !ClientsNotReadyForFrame(frame).Any(); + } + + public IEnumerable ClientsNotReadyForFrame(int frame) + { + var frameData = framePackets.GetOrAdd(frame); + return ClientsPlayingInFrame(frame) + .Where(client => !frameData.ContainsKey(client)); + } + + public IEnumerable OrdersForFrame( World world, int frame ) + { + var frameData = framePackets[ frame ]; + var clientData = ClientsPlayingInFrame( frame ) + .ToDictionary( k => k, v => frameData[ v ] ); + + return clientData + .SelectMany( x => x.Value + .ToOrderList( world ) + .Select( o => new ClientOrder { Client = x.Key, Order = o } ) ); + } + } +} diff --git a/OpenRA.Game/Network/OrderManager.cs b/OpenRA.Game/Network/OrderManager.cs index 1c34dcc57c..853dd36d35 100755 --- a/OpenRA.Game/Network/OrderManager.cs +++ b/OpenRA.Game/Network/OrderManager.cs @@ -155,18 +155,18 @@ namespace OpenRA.Network public bool IsReadyForNextFrame { get { return NetFrameNumber >= 1 && frameData.IsReadyForFrame( NetFrameNumber ); } - } - - static readonly IEnumerable NoClients = new Session.Client[] {}; - public IEnumerable GetClientsNotReadyForNextFrame - { - get - { - return NetFrameNumber >= 1 - ? frameData.ClientsNotReadyForFrame(NetFrameNumber) - .Select(a => LobbyInfo.ClientWithIndex(a)) - : NoClients; - } + } + + static readonly IEnumerable NoClients = new Session.Client[] {}; + public IEnumerable GetClientsNotReadyForNextFrame + { + get + { + return NetFrameNumber >= 1 + ? frameData.ClientsNotReadyForFrame(NetFrameNumber) + .Select(a => LobbyInfo.ClientWithIndex(a)) + : NoClients; + } } public void Tick() diff --git a/OpenRA.Game/Network/ReplayConnection.cs b/OpenRA.Game/Network/ReplayConnection.cs index 357d37d3bd..34055db1fa 100755 --- a/OpenRA.Game/Network/ReplayConnection.cs +++ b/OpenRA.Game/Network/ReplayConnection.cs @@ -1,110 +1,120 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -namespace OpenRA.Network -{ - public class ReplayConnection : IConnection - { - //uint nextFrame = 1; - FileStream replayStream; - - public ReplayConnection( string replayFilename ) - { - replayStream = File.OpenRead( replayFilename ); - } - - public int LocalClientId - { - get { return 0; } - } - - public ConnectionState ConnectionState - { - get { return ConnectionState.Connected; } - } - - // do nothing; ignore locally generated orders - public void Send( int frame, List orders ) { } - public void SendImmediate( List orders ) { } - public void SendSync( int frame, byte[] syncData ) - { - var ms = new MemoryStream(); - ms.Write( BitConverter.GetBytes( frame ) ); - ms.Write( syncData ); - sync.Add( ms.ToArray() ); - } - - List sync = new List(); - - public void Receive( Action packetFn ) - { - while( sync.Count != 0 ) - { - packetFn( LocalClientId, sync[ 0 ] ); - sync.RemoveAt( 0 ); - } - if( replayStream == null ) return; - - var reader = new BinaryReader( replayStream ); - while( replayStream.Position < replayStream.Length ) - { - var client = reader.ReadInt32(); - var packetLen = reader.ReadInt32(); - var packet = reader.ReadBytes( packetLen ); - packetFn( client, packet ); - } - replayStream = null; - } - - public void Dispose() { } - } - - class ReplayRecorderConnection : IConnection - { - IConnection inner; - BinaryWriter writer; - - public ReplayRecorderConnection( IConnection inner, FileStream replayFile ) - { - this.inner = inner; - this.writer = new BinaryWriter( replayFile ); - } - - public int LocalClientId { get { return inner.LocalClientId; } } - public ConnectionState ConnectionState { get { return inner.ConnectionState; } } - - public void Send( int frame, List orders ) { inner.Send( frame, orders ); } - public void SendImmediate( List orders ) { inner.SendImmediate( orders ); } - public void SendSync( int frame, byte[] syncData ) { inner.SendSync( frame, syncData ); } - - public void Receive( Action packetFn ) - { - inner.Receive( ( client, data ) => - { - writer.Write( client ); - writer.Write( data.Length ); - writer.Write( data ); - packetFn( client, data ); - } ); - } - - bool disposed; - - public void Dispose() - { - if( disposed ) - return; - - writer.Close(); - disposed = true; - } - - ~ReplayRecorderConnection() - { - Dispose(); - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; + +namespace OpenRA.Network +{ + public class ReplayConnection : IConnection + { + //uint nextFrame = 1; + FileStream replayStream; + + public ReplayConnection( string replayFilename ) + { + replayStream = File.OpenRead( replayFilename ); + } + + public int LocalClientId + { + get { return 0; } + } + + public ConnectionState ConnectionState + { + get { return ConnectionState.Connected; } + } + + // do nothing; ignore locally generated orders + public void Send( int frame, List orders ) { } + public void SendImmediate( List orders ) { } + public void SendSync( int frame, byte[] syncData ) + { + var ms = new MemoryStream(); + ms.Write( BitConverter.GetBytes( frame ) ); + ms.Write( syncData ); + sync.Add( ms.ToArray() ); + } + + List sync = new List(); + + public void Receive( Action packetFn ) + { + while( sync.Count != 0 ) + { + packetFn( LocalClientId, sync[ 0 ] ); + sync.RemoveAt( 0 ); + } + if( replayStream == null ) return; + + var reader = new BinaryReader( replayStream ); + while( replayStream.Position < replayStream.Length ) + { + var client = reader.ReadInt32(); + var packetLen = reader.ReadInt32(); + var packet = reader.ReadBytes( packetLen ); + packetFn( client, packet ); + } + replayStream = null; + } + + public void Dispose() { } + } + + class ReplayRecorderConnection : IConnection + { + IConnection inner; + BinaryWriter writer; + + public ReplayRecorderConnection( IConnection inner, FileStream replayFile ) + { + this.inner = inner; + this.writer = new BinaryWriter( replayFile ); + } + + public int LocalClientId { get { return inner.LocalClientId; } } + public ConnectionState ConnectionState { get { return inner.ConnectionState; } } + + public void Send( int frame, List orders ) { inner.Send( frame, orders ); } + public void SendImmediate( List orders ) { inner.SendImmediate( orders ); } + public void SendSync( int frame, byte[] syncData ) { inner.SendSync( frame, syncData ); } + + public void Receive( Action packetFn ) + { + inner.Receive( ( client, data ) => + { + writer.Write( client ); + writer.Write( data.Length ); + writer.Write( data ); + packetFn( client, data ); + } ); + } + + bool disposed; + + public void Dispose() + { + if( disposed ) + return; + + writer.Close(); + disposed = true; + } + + ~ReplayRecorderConnection() + { + Dispose(); + } + } +} diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index 9620789787..f356a3d252 100755 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -188,9 +188,9 @@ namespace OpenRA.Network var oldStance = p.Stances[target]; p.Stances[target] = s; if (target == w.LocalPlayer) - w.WorldActor.Trait().UpdatePlayerStance(w, p, oldStance, s); - - foreach (var nsc in w.ActorsWithTrait()) + w.WorldActor.Trait().UpdatePlayerStance(w, p, oldStance, s); + + foreach (var nsc in w.ActorsWithTrait()) nsc.Trait.StanceChanged(nsc.Actor, p, target, oldStance, s); } } diff --git a/OpenRA.Game/ObjectCreator.cs b/OpenRA.Game/ObjectCreator.cs index e98043ac67..57ae925731 100755 --- a/OpenRA.Game/ObjectCreator.cs +++ b/OpenRA.Game/ObjectCreator.cs @@ -82,15 +82,15 @@ namespace OpenRA a[ i ] = args[ key ]; } return ctor.Invoke( a ); - } - - public IEnumerable GetTypesImplementing() - { - var it = typeof(T); - return ModAssemblies.Select( ma => ma.First ).Distinct() - .SelectMany(ma => ma.GetTypes() - .Where(t => t != it && it.IsAssignableFrom(t))); - } + } + + public IEnumerable GetTypesImplementing() + { + var it = typeof(T); + return ModAssemblies.Select( ma => ma.First ).Distinct() + .SelectMany(ma => ma.GetTypes() + .Where(t => t != it && it.IsAssignableFrom(t))); + } [AttributeUsage( AttributeTargets.Parameter )] public class ParamAttribute : Attribute diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index 7ae374b1bb..d8da606afa 100755 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -1,241 +1,241 @@ - - - - Debug - x86 - 9.0.30729 - 2.0 - {0DFB103F-2962-400F-8C6D-E2C28CCBA633} - WinExe - Properties - OpenRA - OpenRA.Game - - - 2.0 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v3.5 - OpenRA.ico - - - true - ..\ - TRACE;DEBUG - true - full - x86 - false - prompt - 4 - false - - - bin\Release\ - TRACE - true - true - pdbonly - x86 - false - prompt - 4 - - - - - 3.5 - - - - - - - False - ..\thirdparty\Tao\Tao.FreeType.dll - - - False - ..\thirdparty\Tao\Tao.OpenAl.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA} - OpenRA.FileFormats - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - - - - + + + + Debug + x86 + 9.0.30729 + 2.0 + {0DFB103F-2962-400F-8C6D-E2C28CCBA633} + WinExe + Properties + OpenRA + OpenRA.Game + + + 2.0 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + v3.5 + OpenRA.ico + + + true + ..\ + TRACE;DEBUG + true + full + x86 + false + prompt + 4 + false + + + bin\Release\ + TRACE + true + true + pdbonly + x86 + false + prompt + 4 + + + + + 3.5 + + + + + + + False + ..\thirdparty\Tao\Tao.FreeType.dll + + + False + ..\thirdparty\Tao\Tao.OpenAl.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA} + OpenRA.FileFormats + + + + + + + + + + + + + + + + + + + + + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + + + + + + + + \ No newline at end of file diff --git a/OpenRA.Game/Properties/AssemblyInfo.cs b/OpenRA.Game/Properties/AssemblyInfo.cs index 35d5841240..58907345dc 100644 --- a/OpenRA.Game/Properties/AssemblyInfo.cs +++ b/OpenRA.Game/Properties/AssemblyInfo.cs @@ -1,37 +1,27 @@ -#region Copyright & License Information -/* - * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. - * This file is part of OpenRA. - * - * OpenRA is free software: you can redistribute it and/or modify - * it 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. - * - * OpenRA is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with OpenRA. If not, see . - */ -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("OpenRA")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA")] -[assembly: AssemblyCopyright("Copyright © 2007,2009,2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("OpenRA")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenRA")] +[assembly: AssemblyCopyright("Copyright © 2007,2009,2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Game/TraitDictionary.cs b/OpenRA.Game/TraitDictionary.cs index 0524cbb765..e1f89d09c9 100755 --- a/OpenRA.Game/TraitDictionary.cs +++ b/OpenRA.Game/TraitDictionary.cs @@ -17,14 +17,14 @@ namespace OpenRA { class TraitDictionary { - Dictionary traits = new Dictionary(); - + Dictionary traits = new Dictionary(); + ITraitContainer InnerGet( Type t ) { return traits.GetOrAdd( t, doCreateTraitContainer ); - } - - // construct this delegate once. + } + + // construct this delegate once. static Func doCreateTraitContainer = CreateTraitContainer; static ITraitContainer CreateTraitContainer( Type t ) { diff --git a/OpenRA.Game/Traits/Activities/CancelableActivity.cs b/OpenRA.Game/Traits/Activities/CancelableActivity.cs index da392c5eef..273e9bb407 100755 --- a/OpenRA.Game/Traits/Activities/CancelableActivity.cs +++ b/OpenRA.Game/Traits/Activities/CancelableActivity.cs @@ -1,38 +1,48 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace OpenRA.Traits.Activities -{ - public abstract class CancelableActivity : IActivity - { - protected IActivity NextActivity { get; private set; } - protected bool IsCanceled { get; private set; } - - public abstract IActivity Tick( Actor self ); - protected virtual bool OnCancel( Actor self ) { return true; } - - public void Cancel( Actor self ) - { - IsCanceled = OnCancel( self ); - if( IsCanceled ) - NextActivity = null; - else if (NextActivity != null) - NextActivity.Cancel( self ); - } - - public void Queue( IActivity activity ) - { - if( NextActivity != null ) - NextActivity.Queue( activity ); - else - NextActivity = activity; - } - - public virtual IEnumerable GetCurrentPath() - { - yield break; - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OpenRA.Traits.Activities +{ + public abstract class CancelableActivity : IActivity + { + protected IActivity NextActivity { get; private set; } + protected bool IsCanceled { get; private set; } + + public abstract IActivity Tick( Actor self ); + protected virtual bool OnCancel( Actor self ) { return true; } + + public void Cancel( Actor self ) + { + IsCanceled = OnCancel( self ); + if( IsCanceled ) + NextActivity = null; + else if (NextActivity != null) + NextActivity.Cancel( self ); + } + + public void Queue( IActivity activity ) + { + if( NextActivity != null ) + NextActivity.Queue( activity ); + else + NextActivity = activity; + } + + public virtual IEnumerable GetCurrentPath() + { + yield break; + } + } +} diff --git a/OpenRA.Game/Traits/Health.cs b/OpenRA.Game/Traits/Health.cs index b74c08b4ac..b52f1dcb46 100755 --- a/OpenRA.Game/Traits/Health.cs +++ b/OpenRA.Game/Traits/Health.cs @@ -28,16 +28,16 @@ namespace OpenRA.Traits public readonly HealthInfo Info; [Sync] - int hp; - + int hp; + public int DisplayHp { get; private set; } public Health(ActorInitializer init, HealthInfo info) { Info = info; - MaxHP = info.HP; - - hp = init.Contains() ? (int)(init.Get() * MaxHP) : MaxHP; + MaxHP = info.HP; + + hp = init.Contains() ? (int)(init.Get() * MaxHP) : MaxHP; DisplayHp = hp; } @@ -122,16 +122,16 @@ namespace OpenRA.Traits } if (hp > MaxHP) hp = MaxHP; - } - - public void Tick(Actor self) - { - if (hp > DisplayHp) - DisplayHp = hp; - - if (DisplayHp > hp) - DisplayHp = (2 * DisplayHp + hp) / 3; - } + } + + public void Tick(Actor self) + { + if (hp > DisplayHp) + DisplayHp = hp; + + if (DisplayHp > hp) + DisplayHp = (2 * DisplayHp + hp) / 3; + } } @@ -165,7 +165,7 @@ namespace OpenRA.Traits } public static DamageState GetDamageState(this Actor self) - { + { if (self.Destroyed) return DamageState.Dead; var health = self.TraitOrDefault(); diff --git a/OpenRA.Game/Traits/Player/DeveloperMode.cs b/OpenRA.Game/Traits/Player/DeveloperMode.cs index 7185df51ba..da23899459 100644 --- a/OpenRA.Game/Traits/Player/DeveloperMode.cs +++ b/OpenRA.Game/Traits/Player/DeveloperMode.cs @@ -20,7 +20,7 @@ namespace OpenRA.Traits public bool DisableShroud = false; public bool PathDebug = false; public bool UnitInfluenceDebug = false; - public bool UnlimitedPower; + public bool UnlimitedPower; public bool BuildAnywhere; public object Create (ActorInitializer init) { return new DeveloperMode(this); } @@ -35,7 +35,7 @@ namespace OpenRA.Traits [Sync] public bool DisableShroud; [Sync] public bool PathDebug; [Sync] public bool UnitInfluenceDebug; - [Sync] public bool UnlimitedPower; + [Sync] public bool UnlimitedPower; [Sync] public bool BuildAnywhere; public DeveloperMode(DeveloperModeInfo info) @@ -46,7 +46,7 @@ namespace OpenRA.Traits DisableShroud = info.DisableShroud; PathDebug = info.PathDebug; UnitInfluenceDebug = info.UnitInfluenceDebug; - UnlimitedPower = info.UnlimitedPower; + UnlimitedPower = info.UnlimitedPower; BuildAnywhere = info.BuildAnywhere; } @@ -103,11 +103,11 @@ namespace OpenRA.Traits { UnlimitedPower ^= true; break; - } - case "DevBuildAnywhere": - { - BuildAnywhere ^= true; - break; + } + case "DevBuildAnywhere": + { + BuildAnywhere ^= true; + break; } default: return; diff --git a/OpenRA.Game/Traits/Selectable.cs b/OpenRA.Game/Traits/Selectable.cs index ef6a25b696..be7ea1d263 100644 --- a/OpenRA.Game/Traits/Selectable.cs +++ b/OpenRA.Game/Traits/Selectable.cs @@ -49,33 +49,33 @@ namespace OpenRA.Traits DrawControlGroup(wr, self, xy); DrawPips(wr, self, xY); DrawTags(wr, self, new float2(.5f * (bounds.Left + bounds.Right), bounds.Top)); - DrawUnitPath(self); + DrawUnitPath(self); DrawExtraBars(self, xy, Xy); - } - - public void DrawRollover(WorldRenderer wr, Actor self) - { + } + + public void DrawRollover(WorldRenderer wr, Actor self) + { var bounds = self.GetBounds(false); - + var xy = new float2(bounds.Left, bounds.Top); var Xy = new float2(bounds.Right, bounds.Top); - - DrawHealthBar(self, xy, Xy); - DrawExtraBars(self, xy, Xy); - } - - void DrawExtraBars(Actor self, float2 xy, float2 Xy) - { - foreach (var extraBar in self.TraitsImplementing()) - { - var value = extraBar.GetValue(); - if (value != 0) - { - xy.Y += 4; - Xy.Y += 4; - DrawSelectionBar(self, xy, Xy, extraBar.GetValue(), extraBar.GetColor()); - } - } + + DrawHealthBar(self, xy, Xy); + DrawExtraBars(self, xy, Xy); + } + + void DrawExtraBars(Actor self, float2 xy, float2 Xy) + { + foreach (var extraBar in self.TraitsImplementing()) + { + var value = extraBar.GetValue(); + if (value != 0) + { + xy.Y += 4; + Xy.Y += 4; + DrawSelectionBar(self, xy, Xy, extraBar.GetValue(), extraBar.GetColor()); + } + } } void DrawSelectionBox(Actor self, float2 xy, float2 Xy, float2 xY, float2 XY, Color c) @@ -89,29 +89,29 @@ namespace OpenRA.Traits Game.Renderer.LineRenderer.DrawLine(xY, xY + new float2(0, -4), c, c); Game.Renderer.LineRenderer.DrawLine(XY, XY + new float2(-4, 0), c, c); Game.Renderer.LineRenderer.DrawLine(XY, XY + new float2(0, -4), c, c); - } - - void DrawSelectionBar(Actor self, float2 xy, float2 Xy, float value, Color barColor) - { - if (!self.IsInWorld) return; - - var health = self.TraitOrDefault(); - if (health == null || health.IsDead) return; - - var c = Color.FromArgb(128, 30, 30, 30); - var c2 = Color.FromArgb(128, 10, 10, 10); - - var barColor2 = Color.FromArgb(255, barColor.R / 2, barColor.G / 2, barColor.B / 2); - - var z = float2.Lerp(xy, Xy, value); - - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -4), Xy + new float2(0, -4), c, c); - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -3), Xy + new float2(0, -3), c2, c2); - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -2), Xy + new float2(0, -2), c, c); - - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -3), z + new float2(0, -3), barColor, barColor); - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -2), z + new float2(0, -2), barColor2, barColor2); - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -4), z + new float2(0, -4), barColor2, barColor2); + } + + void DrawSelectionBar(Actor self, float2 xy, float2 Xy, float value, Color barColor) + { + if (!self.IsInWorld) return; + + var health = self.TraitOrDefault(); + if (health == null || health.IsDead) return; + + var c = Color.FromArgb(128, 30, 30, 30); + var c2 = Color.FromArgb(128, 10, 10, 10); + + var barColor2 = Color.FromArgb(255, barColor.R / 2, barColor.G / 2, barColor.B / 2); + + var z = float2.Lerp(xy, Xy, value); + + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -4), Xy + new float2(0, -4), c, c); + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -3), Xy + new float2(0, -3), c2, c2); + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -2), Xy + new float2(0, -2), c, c); + + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -3), z + new float2(0, -3), barColor, barColor); + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -2), z + new float2(0, -2), barColor2, barColor2); + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -4), z + new float2(0, -4), barColor2, barColor2); } void DrawHealthBar(Actor self, float2 xy, float2 Xy) @@ -121,7 +121,7 @@ namespace OpenRA.Traits var health = self.TraitOrDefault(); if (health == null || health.IsDead) return; - var c = Color.FromArgb(128, 30, 30, 30); + var c = Color.FromArgb(128, 30, 30, 30); var c2 = Color.FromArgb(128, 10, 10, 10); var healthColor = (health.DamageState == DamageState.Critical) ? Color.Red : @@ -133,30 +133,30 @@ namespace OpenRA.Traits healthColor.G / 2, healthColor.B / 2); - var z = float2.Lerp(xy, Xy, health.HPFraction); - - - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -4), Xy + new float2(0, -4), c, c); - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -3), Xy + new float2(0, -3), c2, c2); + var z = float2.Lerp(xy, Xy, health.HPFraction); + + + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -4), Xy + new float2(0, -4), c, c); + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -3), Xy + new float2(0, -3), c2, c2); Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -2), Xy + new float2(0, -2), c, c); Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -3), z + new float2(0, -3), healthColor, healthColor); Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -2), z + new float2(0, -2), healthColor2, healthColor2); - Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -4), z + new float2(0, -4), healthColor2, healthColor2); - - if (health.DisplayHp != health.HP) - { - var deltaColor = Color.OrangeRed; - var deltaColor2 = Color.FromArgb( - 255, - deltaColor.R / 2, - deltaColor.G / 2, - deltaColor.B / 2); - var zz = float2.Lerp(xy, Xy, (float)health.DisplayHp / health.MaxHP); - - Game.Renderer.LineRenderer.DrawLine(z + new float2(0, -3), zz + new float2(0, -3), deltaColor, deltaColor); - Game.Renderer.LineRenderer.DrawLine(z + new float2(0, -2), zz + new float2(0, -2), deltaColor2, deltaColor2); - Game.Renderer.LineRenderer.DrawLine(z + new float2(0, -4), zz + new float2(0, -4), deltaColor2, deltaColor2); + Game.Renderer.LineRenderer.DrawLine(xy + new float2(0, -4), z + new float2(0, -4), healthColor2, healthColor2); + + if (health.DisplayHp != health.HP) + { + var deltaColor = Color.OrangeRed; + var deltaColor2 = Color.FromArgb( + 255, + deltaColor.R / 2, + deltaColor.G / 2, + deltaColor.B / 2); + var zz = float2.Lerp(xy, Xy, (float)health.DisplayHp / health.MaxHP); + + Game.Renderer.LineRenderer.DrawLine(z + new float2(0, -3), zz + new float2(0, -3), deltaColor, deltaColor); + Game.Renderer.LineRenderer.DrawLine(z + new float2(0, -2), zz + new float2(0, -2), deltaColor2, deltaColor2); + Game.Renderer.LineRenderer.DrawLine(z + new float2(0, -4), zz + new float2(0, -4), deltaColor2, deltaColor2); } } diff --git a/OpenRA.Game/Traits/SubcellInit.cs b/OpenRA.Game/Traits/SubcellInit.cs index 01a64d4781..95ff4671ba 100644 --- a/OpenRA.Game/Traits/SubcellInit.cs +++ b/OpenRA.Game/Traits/SubcellInit.cs @@ -1,26 +1,36 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using OpenRA.FileFormats; - -namespace OpenRA.Traits -{ - public class SubCellInit : IActorInit - { - [FieldFromYamlKey] - public readonly int value = 0; - - public SubCellInit() { } - - public SubCellInit(int init) - { - value = init; - } - - public SubCell Value(World world) - { - return (SubCell)value; - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using OpenRA.FileFormats; + +namespace OpenRA.Traits +{ + public class SubCellInit : IActorInit + { + [FieldFromYamlKey] + public readonly int value = 0; + + public SubCellInit() { } + + public SubCellInit(int init) + { + value = init; + } + + public SubCell Value(World world) + { + return (SubCell)value; + } + } +} diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index d3e259241e..39e194a01b 100755 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -13,236 +13,236 @@ using System.Drawing; using OpenRA.FileFormats; using OpenRA.GameRules; using OpenRA.Graphics; -using OpenRA.Network; -using System; - -namespace OpenRA.Traits -{ - // depends on the order of pips in WorldRenderer.cs! - public enum PipType { Transparent, Green, Yellow, Red, Gray }; - public enum TagType { None, Fake, Primary }; - public enum Stance { Enemy, Neutral, Ally }; - - public class AttackInfo - { - public Actor Attacker; - public WarheadInfo Warhead; - public int Damage; - public DamageState DamageState; - public DamageState PreviousDamageState; - public bool DamageStateChanged; - public int PreviousHealth; - public int Health; - } - - public interface ITick { void Tick(Actor self); } - public interface IRender { IEnumerable Render(Actor self); } - - public interface IIssueOrder - { - IEnumerable Orders { get; } - Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued); - } - - public interface IOrderTargeter - { - string OrderID { get; } - int OrderPriority { get; } - bool CanTargetActor(Actor self, Actor target, bool forceAttack, bool forceMove, bool forceQueue, ref string cursor); - bool CanTargetLocation(Actor self, int2 location, List actorsAtLocation, bool forceAttack, bool forceQueue, bool forceMove, ref string cursor); - bool IsQueued { get; } - } - - public interface IResolveOrder { void ResolveOrder(Actor self, Order order); } - public interface IValidateOrder { bool OrderValidation(OrderManager orderManager, World world, int clientId, Order order); } - public interface IOrderCursor { string CursorForOrder(Actor self, Order order); } - public interface IOrderVoice { string VoicePhraseForOrder(Actor self, Order order); } - public interface ICustomUnitOrderGenerator : IOrderGenerator { }; - public interface INotifySold { void Selling(Actor self); void Sold(Actor self); } - public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } - public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); } - public interface INotifyBuildComplete { void BuildingComplete(Actor self); } - public interface INotifyProduction { void UnitProduced(Actor self, Actor other, int2 exit); } - public interface INotifyCapture { void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner); } - public interface INotifyOtherCaptured { void OnActorCaptured(Actor self, Actor captured, Actor captor, Player oldOwner, Player newOwner); } - public interface IAcceptSpy { void OnInfiltrate(Actor self, Actor spy); } - public interface IStoreOre { int Capacity { get; } } - public interface IToolTip - { - string Name(); - Player Owner(); - Stance Stance(); - } - - public interface IDisable { bool Disabled { get; } } - public interface IExplodeModifier { bool ShouldExplode(Actor self); } - public interface INudge { void OnNudge(Actor self, Actor nudger); } - - public interface IRadarSignature - { - IEnumerable RadarSignatureCells(Actor self); - Color RadarSignatureColor(Actor self); - } - - public interface IVisibilityModifier { bool IsVisible(Actor self); } - public interface IRadarColorModifier { Color RadarColorOverride(Actor self); } - public interface IHasLocation - { - int2 PxPosition { get; } - } - - public enum SubCell - { - FullCell, - TopLeft, - TopRight, - Center, - BottomLeft, - BottomRight - } - - public interface IOccupySpace : IHasLocation - { - int2 TopLeft { get; } - IEnumerable> OccupiedCells(); - } - - public static class IOccupySpaceExts - { - public static int2 NearestCellTo(this IOccupySpace ios, int2 other) - { - var nearest = ios.TopLeft; - var nearestDistance = int.MaxValue; - foreach (var cell in ios.OccupiedCells()) - { - var dist = (other - cell.First).LengthSquared; - if (dist < nearestDistance) - { - nearest = cell.First; - nearestDistance = dist; - } - } - return nearest; - } - } - - public interface INotifyAttack { void Attacking(Actor self, Target target); } - public interface IRenderModifier { IEnumerable ModifyRender(Actor self, IEnumerable r); } - public interface IDamageModifier { float GetDamageModifier(Actor attacker, WarheadInfo warhead); } - public interface ISpeedModifier { decimal GetSpeedModifier(); } - public interface IFirepowerModifier { float GetFirepowerModifier(); } - public interface ISelectionColorModifier { Color GetSelectionColorModifier(Actor self, Color defaultColor); } - public interface IPalette { void InitPalette(WorldRenderer wr); } - public interface IPaletteModifier { void AdjustPalette(Dictionary b); } - public interface IPips { IEnumerable GetPips(Actor self); } - public interface ITags { IEnumerable GetTags(); } - public interface ISelectionBar { float GetValue(); Color GetColor(); } - - public interface ITeleportable : IHasLocation /* crap name! */ - { - bool CanEnterCell(int2 location); - void SetPosition(Actor self, int2 cell); - void SetPxPosition(Actor self, int2 px); - void AdjustPxPosition(Actor self, int2 px); /* works like SetPxPosition, but visual only */ - } - - public interface IMove : ITeleportable - { - int Altitude { get; set; } - } - - public interface IFacing - { - int ROT { get; } - int Facing { get; set; } - int InitialFacing { get; } - } - - public interface ICrushable - { - void OnCrush(Actor crusher); - IEnumerable CrushClasses { get; } - } - - public struct Renderable - { - public readonly Sprite Sprite; - public readonly float2 Pos; - public readonly string Palette; - public readonly int Z; - public readonly int ZOffset; - public float Scale; - - public Renderable(Sprite sprite, float2 pos, string palette, int z, int zOffset, float scale) - { - Sprite = sprite; - Pos = pos; - Palette = palette; - Z = z; - ZOffset = zOffset; - Scale = scale; /* default */ - } - - public Renderable(Sprite sprite, float2 pos, string palette, int z) - : this(sprite, pos, palette, z, 0, 1f) { } - - public Renderable(Sprite sprite, float2 pos, string palette, int z, float scale) - : this(sprite, pos, palette, z, 0, scale) { } - - public Renderable WithScale(float newScale) { return new Renderable(Sprite, Pos, Palette, Z, ZOffset, newScale); } - public Renderable WithPalette(string newPalette) { return new Renderable(Sprite, Pos, newPalette, Z, ZOffset, Scale); } - public Renderable WithZOffset(int newOffset) { return new Renderable(Sprite, Pos, Palette, Z, newOffset, Scale); } - public Renderable WithPos(float2 newPos) { return new Renderable(Sprite, newPos, Palette, Z, ZOffset, Scale); } - } - - public interface ITraitInfo { object Create(ActorInitializer init); } - - public class TraitInfo : ITraitInfo where T : new() { public virtual object Create(ActorInitializer init) { return new T(); } } - - public interface ITraitPrerequisite where T : ITraitInfo { } - - public interface INotifySelection { void SelectionChanged(); } - public interface IWorldLoaded { void WorldLoaded(World w); } - public interface ICreatePlayers { void CreatePlayers(World w); } - - public interface IBotInfo { string Name { get; } } - public interface IBot - { - void Activate(Player p); - IBotInfo Info { get; } - } - - public interface IActivity - { - IActivity Tick(Actor self); - void Cancel(Actor self); - void Queue(IActivity activity); - IEnumerable GetCurrentPath(); - } - - public interface IRenderOverlay { void Render(WorldRenderer wr); } - public interface INotifyIdle { void TickIdle(Actor self); } - - public interface IBlocksBullets { } - - public interface IPostRender { void RenderAfterWorld(WorldRenderer wr, Actor self); } - - public interface IPostRenderSelection { void RenderAfterWorld(WorldRenderer wr, Actor self); } - public interface IPreRenderSelection { void RenderBeforeWorld(WorldRenderer wr, Actor self); } - public interface IRenderAsTerrain { IEnumerable RenderAsTerrain(Actor self); } - - public interface ITargetable - { - string[] TargetTypes { get; } - IEnumerable TargetableCells(Actor self); - bool TargetableBy(Actor self, Actor byActor); - } - - public interface INotifyStanceChanged - { - void StanceChanged(Actor self, Player a, Player b, - Stance oldStance, Stance newStance); - } - - public interface ILintPass { void Run(Action emitError); } +using OpenRA.Network; +using System; + +namespace OpenRA.Traits +{ + // depends on the order of pips in WorldRenderer.cs! + public enum PipType { Transparent, Green, Yellow, Red, Gray }; + public enum TagType { None, Fake, Primary }; + public enum Stance { Enemy, Neutral, Ally }; + + public class AttackInfo + { + public Actor Attacker; + public WarheadInfo Warhead; + public int Damage; + public DamageState DamageState; + public DamageState PreviousDamageState; + public bool DamageStateChanged; + public int PreviousHealth; + public int Health; + } + + public interface ITick { void Tick(Actor self); } + public interface IRender { IEnumerable Render(Actor self); } + + public interface IIssueOrder + { + IEnumerable Orders { get; } + Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued); + } + + public interface IOrderTargeter + { + string OrderID { get; } + int OrderPriority { get; } + bool CanTargetActor(Actor self, Actor target, bool forceAttack, bool forceMove, bool forceQueue, ref string cursor); + bool CanTargetLocation(Actor self, int2 location, List actorsAtLocation, bool forceAttack, bool forceQueue, bool forceMove, ref string cursor); + bool IsQueued { get; } + } + + public interface IResolveOrder { void ResolveOrder(Actor self, Order order); } + public interface IValidateOrder { bool OrderValidation(OrderManager orderManager, World world, int clientId, Order order); } + public interface IOrderCursor { string CursorForOrder(Actor self, Order order); } + public interface IOrderVoice { string VoicePhraseForOrder(Actor self, Order order); } + public interface ICustomUnitOrderGenerator : IOrderGenerator { }; + public interface INotifySold { void Selling(Actor self); void Sold(Actor self); } + public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } + public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); } + public interface INotifyBuildComplete { void BuildingComplete(Actor self); } + public interface INotifyProduction { void UnitProduced(Actor self, Actor other, int2 exit); } + public interface INotifyCapture { void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner); } + public interface INotifyOtherCaptured { void OnActorCaptured(Actor self, Actor captured, Actor captor, Player oldOwner, Player newOwner); } + public interface IAcceptSpy { void OnInfiltrate(Actor self, Actor spy); } + public interface IStoreOre { int Capacity { get; } } + public interface IToolTip + { + string Name(); + Player Owner(); + Stance Stance(); + } + + public interface IDisable { bool Disabled { get; } } + public interface IExplodeModifier { bool ShouldExplode(Actor self); } + public interface INudge { void OnNudge(Actor self, Actor nudger); } + + public interface IRadarSignature + { + IEnumerable RadarSignatureCells(Actor self); + Color RadarSignatureColor(Actor self); + } + + public interface IVisibilityModifier { bool IsVisible(Actor self); } + public interface IRadarColorModifier { Color RadarColorOverride(Actor self); } + public interface IHasLocation + { + int2 PxPosition { get; } + } + + public enum SubCell + { + FullCell, + TopLeft, + TopRight, + Center, + BottomLeft, + BottomRight + } + + public interface IOccupySpace : IHasLocation + { + int2 TopLeft { get; } + IEnumerable> OccupiedCells(); + } + + public static class IOccupySpaceExts + { + public static int2 NearestCellTo(this IOccupySpace ios, int2 other) + { + var nearest = ios.TopLeft; + var nearestDistance = int.MaxValue; + foreach (var cell in ios.OccupiedCells()) + { + var dist = (other - cell.First).LengthSquared; + if (dist < nearestDistance) + { + nearest = cell.First; + nearestDistance = dist; + } + } + return nearest; + } + } + + public interface INotifyAttack { void Attacking(Actor self, Target target); } + public interface IRenderModifier { IEnumerable ModifyRender(Actor self, IEnumerable r); } + public interface IDamageModifier { float GetDamageModifier(Actor attacker, WarheadInfo warhead); } + public interface ISpeedModifier { decimal GetSpeedModifier(); } + public interface IFirepowerModifier { float GetFirepowerModifier(); } + public interface ISelectionColorModifier { Color GetSelectionColorModifier(Actor self, Color defaultColor); } + public interface IPalette { void InitPalette(WorldRenderer wr); } + public interface IPaletteModifier { void AdjustPalette(Dictionary b); } + public interface IPips { IEnumerable GetPips(Actor self); } + public interface ITags { IEnumerable GetTags(); } + public interface ISelectionBar { float GetValue(); Color GetColor(); } + + public interface ITeleportable : IHasLocation /* crap name! */ + { + bool CanEnterCell(int2 location); + void SetPosition(Actor self, int2 cell); + void SetPxPosition(Actor self, int2 px); + void AdjustPxPosition(Actor self, int2 px); /* works like SetPxPosition, but visual only */ + } + + public interface IMove : ITeleportable + { + int Altitude { get; set; } + } + + public interface IFacing + { + int ROT { get; } + int Facing { get; set; } + int InitialFacing { get; } + } + + public interface ICrushable + { + void OnCrush(Actor crusher); + IEnumerable CrushClasses { get; } + } + + public struct Renderable + { + public readonly Sprite Sprite; + public readonly float2 Pos; + public readonly string Palette; + public readonly int Z; + public readonly int ZOffset; + public float Scale; + + public Renderable(Sprite sprite, float2 pos, string palette, int z, int zOffset, float scale) + { + Sprite = sprite; + Pos = pos; + Palette = palette; + Z = z; + ZOffset = zOffset; + Scale = scale; /* default */ + } + + public Renderable(Sprite sprite, float2 pos, string palette, int z) + : this(sprite, pos, palette, z, 0, 1f) { } + + public Renderable(Sprite sprite, float2 pos, string palette, int z, float scale) + : this(sprite, pos, palette, z, 0, scale) { } + + public Renderable WithScale(float newScale) { return new Renderable(Sprite, Pos, Palette, Z, ZOffset, newScale); } + public Renderable WithPalette(string newPalette) { return new Renderable(Sprite, Pos, newPalette, Z, ZOffset, Scale); } + public Renderable WithZOffset(int newOffset) { return new Renderable(Sprite, Pos, Palette, Z, newOffset, Scale); } + public Renderable WithPos(float2 newPos) { return new Renderable(Sprite, newPos, Palette, Z, ZOffset, Scale); } + } + + public interface ITraitInfo { object Create(ActorInitializer init); } + + public class TraitInfo : ITraitInfo where T : new() { public virtual object Create(ActorInitializer init) { return new T(); } } + + public interface ITraitPrerequisite where T : ITraitInfo { } + + public interface INotifySelection { void SelectionChanged(); } + public interface IWorldLoaded { void WorldLoaded(World w); } + public interface ICreatePlayers { void CreatePlayers(World w); } + + public interface IBotInfo { string Name { get; } } + public interface IBot + { + void Activate(Player p); + IBotInfo Info { get; } + } + + public interface IActivity + { + IActivity Tick(Actor self); + void Cancel(Actor self); + void Queue(IActivity activity); + IEnumerable GetCurrentPath(); + } + + public interface IRenderOverlay { void Render(WorldRenderer wr); } + public interface INotifyIdle { void TickIdle(Actor self); } + + public interface IBlocksBullets { } + + public interface IPostRender { void RenderAfterWorld(WorldRenderer wr, Actor self); } + + public interface IPostRenderSelection { void RenderAfterWorld(WorldRenderer wr, Actor self); } + public interface IPreRenderSelection { void RenderBeforeWorld(WorldRenderer wr, Actor self); } + public interface IRenderAsTerrain { IEnumerable RenderAsTerrain(Actor self); } + + public interface ITargetable + { + string[] TargetTypes { get; } + IEnumerable TargetableCells(Actor self); + bool TargetableBy(Actor self, Actor byActor); + } + + public interface INotifyStanceChanged + { + void StanceChanged(Actor self, Player a, Player b, + Stance oldStance, Stance newStance); + } + + public interface ILintPass { void Run(Action emitError); } } diff --git a/OpenRA.Game/UiOverlay.cs b/OpenRA.Game/UiOverlay.cs index 56c6becd06..d7e93a85b7 100644 --- a/OpenRA.Game/UiOverlay.cs +++ b/OpenRA.Game/UiOverlay.cs @@ -9,9 +9,9 @@ #endregion using System.Collections.Generic; -using System.Drawing; -using OpenRA.Graphics; - +using System.Drawing; +using OpenRA.Graphics; + namespace OpenRA { public class UiOverlay diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index 306326ed74..25d1f1cb72 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -13,369 +13,369 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.FileFormats; -using OpenRA.Graphics; - -namespace OpenRA.Widgets -{ - public abstract class Widget - { - // Info defined in YAML - public string Id = null; - public string X = "0"; - public string Y = "0"; - public string Width = "0"; - public string Height = "0"; - public string Delegate = null; - public string EventHandler = null; - public bool Visible = true; - - public readonly List Children = new List(); - - // Calculated internally - public Rectangle Bounds; - public Widget Parent = null; - - public static Stack WindowList = new Stack(); - - // Common Funcs that most widgets will want - public Func OnMouseDown = mi => false; - public Func OnMouseUp = mi => false; - public Action OnMouseMove = mi => { }; - public Func OnKeyPress = e => false; - - public Func IsVisible; - - public Widget() { IsVisible = () => Visible; } - - public static Widget RootWidget - { - get { return rootWidget; } - set { rootWidget = value; } - } - private static Widget rootWidget = new ContainerWidget(); - - public Widget(Widget widget) - { - Id = widget.Id; - X = widget.X; - Y = widget.Y; - Width = widget.Width; - Height = widget.Height; - Delegate = widget.Delegate; - Visible = widget.Visible; - - Bounds = widget.Bounds; - Parent = widget.Parent; - - OnMouseDown = widget.OnMouseDown; - OnMouseUp = widget.OnMouseUp; - OnMouseMove = widget.OnMouseMove; - OnKeyPress = widget.OnKeyPress; - - IsVisible = widget.IsVisible; - - foreach (var child in widget.Children) - AddChild(child.Clone()); - } - - public virtual Widget Clone() - { - throw new InvalidOperationException("Widget type `{0}` is not cloneable.".F(GetType().Name)); - } - - public virtual int2 RenderOrigin - { - get - { - var offset = (Parent == null) ? int2.Zero : Parent.ChildOrigin; - return new int2(Bounds.X, Bounds.Y) + offset; - } - } - - public virtual int2 ChildOrigin { get { return RenderOrigin; } } - public virtual Rectangle RenderBounds { get { return new Rectangle(RenderOrigin.X, RenderOrigin.Y, Bounds.Width, Bounds.Height); } } - - public virtual void Initialize() - { - // Parse the YAML equations to find the widget bounds - var parentBounds = (Parent == null) - ? new Rectangle(0, 0, Game.viewport.Width, Game.viewport.Height) - : Parent.Bounds; - - var substitutions = new Dictionary(); - substitutions.Add("WINDOW_RIGHT", Game.viewport.Width); - substitutions.Add("WINDOW_BOTTOM", Game.viewport.Height); - substitutions.Add("PARENT_RIGHT", parentBounds.Width); - substitutions.Add("PARENT_LEFT", parentBounds.Left); - substitutions.Add("PARENT_TOP", parentBounds.Top); - substitutions.Add("PARENT_BOTTOM", parentBounds.Height); - int width = Evaluator.Evaluate(Width, substitutions); - int height = Evaluator.Evaluate(Height, substitutions); - - substitutions.Add("WIDTH", width); - substitutions.Add("HEIGHT", height); - - Bounds = new Rectangle(Evaluator.Evaluate(X, substitutions), - Evaluator.Evaluate(Y, substitutions), - width, - height); - } - - public void PostInit(Dictionary args) - { - if (Delegate == null) - return; - - args["widget"] = this; - - var iwd = Game.modData.ObjectCreator.CreateObject(Delegate, args) - as IWidgetDelegateEx; - if (iwd != null) - iwd.Init(); - - args.Remove("widget"); - } - - public virtual Rectangle EventBounds { get { return RenderBounds; } } - public virtual Rectangle GetEventBounds() - { - return Children - .Where(c => c.IsVisible()) - .Select(c => c.GetEventBounds()) - .Aggregate(EventBounds, Rectangle.Union); - } - - public static Widget SelectedWidget; - public bool Focused { get { return SelectedWidget == this; } } - public virtual bool TakeFocus(MouseInput mi) - { - if (Focused) - return true; - - if (SelectedWidget != null && !SelectedWidget.LoseFocus(mi)) - return false; - SelectedWidget = this; - return true; - } - - // Remove focus from this widget; return false if you don't want to give it up - public virtual bool LoseFocus(MouseInput mi) - { - // Some widgets may need to override focus depending on mouse click - return LoseFocus(); - } - - public virtual bool LoseFocus() - { - if (SelectedWidget == this) - SelectedWidget = null; - - return true; - } - - public virtual string GetCursor(int2 pos) { return "default"; } - public string GetCursorOuter(int2 pos) - { - // Is the cursor on top of us? - if (!(IsVisible() && GetEventBounds().Contains(pos))) - return null; - - // Do any of our children specify a cursor? - foreach (var child in Children.OfType().Reverse()) - { - var cc = child.GetCursorOuter(pos); - if (cc != null) - return cc; - } - - return EventBounds.Contains(pos) ? GetCursor(pos) : null; - } - - public static bool HandleInput(MouseInput mi) - { - bool handled = false; - if (SelectedWidget != null && SelectedWidget.HandleMouseInputOuter(mi)) - handled = true; - - if (!handled && RootWidget.HandleMouseInputOuter(mi)) - handled = true; - - if (mi.Event == MouseInputEvent.Move) - { - Viewport.LastMousePos = mi.Location; - Viewport.TicksSinceLastMove = 0; - } - return handled; - } - - public bool HandleMouseInputOuter(MouseInput mi) - { - // Are we able to handle this event? - if (!(Focused || (IsVisible() && GetEventBounds().Contains(mi.Location.X, mi.Location.Y)))) - return false; - - // Send the event to the deepest children first and bubble up if unhandled - foreach (var child in Children.OfType().Reverse()) - if (child.HandleMouseInputOuter(mi)) - return true; - - return HandleMouseInput(mi); - } - - // Hack: Don't eat mouse input that others want - // TODO: Solve this properly - public virtual bool HandleMouseInput(MouseInput mi) - { - // Apply any special logic added by delegates; they return true if they caught the input - if (mi.Event == MouseInputEvent.Down && OnMouseDown(mi)) return true; - if (mi.Event == MouseInputEvent.Up && OnMouseUp(mi)) return true; - if (mi.Event == MouseInputEvent.Move) - OnMouseMove(mi); - - return false; - } - - public virtual bool HandleKeyPressInner(KeyInput e) { return false; } - public virtual bool HandleKeyPressOuter(KeyInput e) - { - if (!IsVisible()) - return false; - - // Can any of our children handle this? - foreach (var child in Children) - if (child.HandleKeyPressOuter(e)) - return true; - - // Do any widgety behavior (enter text etc) - var handled = HandleKeyPressInner(e); - - // Apply any special logic added by delegates; they return true if they caught the input - if (OnKeyPress(e)) return true; - - return handled; - } - - public static bool HandleKeyPress(KeyInput e) - { - if (SelectedWidget != null) - return SelectedWidget.HandleKeyPressOuter(e); - - if (RootWidget.HandleKeyPressOuter(e)) - return true; - return false; - } - - public abstract void DrawInner(); - - public virtual void Draw() - { - if (IsVisible()) - { - DrawInner(); - foreach (var child in Children) - child.Draw(); - } - } - - public virtual void Tick() - { - if (IsVisible()) - foreach (var child in Children) - child.Tick(); - } - - public virtual void AddChild(Widget child) - { - child.Parent = this; - Children.Add(child); - } - public virtual void RemoveChild(Widget child) { Children.Remove(child); } - public virtual void RemoveChildren() { Children.Clear(); } - - public Widget GetWidget(string id) - { - if (this.Id == id) - return this; - - foreach (var child in Children) - { - var w = child.GetWidget(id); - if (w != null) - return w; - } - return null; - } - - public T GetWidget(string id) where T : Widget - { - var widget = GetWidget(id); - return (widget != null) ? (T)widget : null; - } - - public static void CloseWindow() - { - RootWidget.Children.Remove(WindowList.Pop()); - if (WindowList.Count > 0) - rootWidget.Children.Add(WindowList.Peek()); - } - - public static Widget OpenWindow(string id) - { - return OpenWindow(id, new Dictionary()); - } - - public static Widget OpenWindow(string id, Dictionary args) - { - var window = Game.modData.WidgetLoader.LoadWidget(args, rootWidget, id); - if (WindowList.Count > 0) - rootWidget.Children.Remove(WindowList.Peek()); - WindowList.Push(window); - return window; - } - - public static void DoTick() - { - RootWidget.Tick(); - } - - public static void DoDraw() - { - RootWidget.Draw(); - } - } - - public class ContainerWidget : Widget - { - public Func GetBackground; - public string Background = null; - - public ContainerWidget() - : base() - { - GetBackground = () => Background; - } - - public ContainerWidget(ContainerWidget other) - : base(other) - { - Background = other.Background; - GetBackground = other.GetBackground; - } - - public override void DrawInner() - { - var bg = GetBackground(); - if (bg != null) - WidgetUtils.DrawPanel(bg, RenderBounds); - } - - public override string GetCursor(int2 pos) { return null; } - public override Widget Clone() { return new ContainerWidget(this); } - } - - public interface IWidgetDelegate { } - public interface IWidgetDelegateEx : IWidgetDelegate - { - void Init(); - } +using OpenRA.Graphics; + +namespace OpenRA.Widgets +{ + public abstract class Widget + { + // Info defined in YAML + public string Id = null; + public string X = "0"; + public string Y = "0"; + public string Width = "0"; + public string Height = "0"; + public string Delegate = null; + public string EventHandler = null; + public bool Visible = true; + + public readonly List Children = new List(); + + // Calculated internally + public Rectangle Bounds; + public Widget Parent = null; + + public static Stack WindowList = new Stack(); + + // Common Funcs that most widgets will want + public Func OnMouseDown = mi => false; + public Func OnMouseUp = mi => false; + public Action OnMouseMove = mi => { }; + public Func OnKeyPress = e => false; + + public Func IsVisible; + + public Widget() { IsVisible = () => Visible; } + + public static Widget RootWidget + { + get { return rootWidget; } + set { rootWidget = value; } + } + private static Widget rootWidget = new ContainerWidget(); + + public Widget(Widget widget) + { + Id = widget.Id; + X = widget.X; + Y = widget.Y; + Width = widget.Width; + Height = widget.Height; + Delegate = widget.Delegate; + Visible = widget.Visible; + + Bounds = widget.Bounds; + Parent = widget.Parent; + + OnMouseDown = widget.OnMouseDown; + OnMouseUp = widget.OnMouseUp; + OnMouseMove = widget.OnMouseMove; + OnKeyPress = widget.OnKeyPress; + + IsVisible = widget.IsVisible; + + foreach (var child in widget.Children) + AddChild(child.Clone()); + } + + public virtual Widget Clone() + { + throw new InvalidOperationException("Widget type `{0}` is not cloneable.".F(GetType().Name)); + } + + public virtual int2 RenderOrigin + { + get + { + var offset = (Parent == null) ? int2.Zero : Parent.ChildOrigin; + return new int2(Bounds.X, Bounds.Y) + offset; + } + } + + public virtual int2 ChildOrigin { get { return RenderOrigin; } } + public virtual Rectangle RenderBounds { get { return new Rectangle(RenderOrigin.X, RenderOrigin.Y, Bounds.Width, Bounds.Height); } } + + public virtual void Initialize() + { + // Parse the YAML equations to find the widget bounds + var parentBounds = (Parent == null) + ? new Rectangle(0, 0, Game.viewport.Width, Game.viewport.Height) + : Parent.Bounds; + + var substitutions = new Dictionary(); + substitutions.Add("WINDOW_RIGHT", Game.viewport.Width); + substitutions.Add("WINDOW_BOTTOM", Game.viewport.Height); + substitutions.Add("PARENT_RIGHT", parentBounds.Width); + substitutions.Add("PARENT_LEFT", parentBounds.Left); + substitutions.Add("PARENT_TOP", parentBounds.Top); + substitutions.Add("PARENT_BOTTOM", parentBounds.Height); + int width = Evaluator.Evaluate(Width, substitutions); + int height = Evaluator.Evaluate(Height, substitutions); + + substitutions.Add("WIDTH", width); + substitutions.Add("HEIGHT", height); + + Bounds = new Rectangle(Evaluator.Evaluate(X, substitutions), + Evaluator.Evaluate(Y, substitutions), + width, + height); + } + + public void PostInit(Dictionary args) + { + if (Delegate == null) + return; + + args["widget"] = this; + + var iwd = Game.modData.ObjectCreator.CreateObject(Delegate, args) + as IWidgetDelegateEx; + if (iwd != null) + iwd.Init(); + + args.Remove("widget"); + } + + public virtual Rectangle EventBounds { get { return RenderBounds; } } + public virtual Rectangle GetEventBounds() + { + return Children + .Where(c => c.IsVisible()) + .Select(c => c.GetEventBounds()) + .Aggregate(EventBounds, Rectangle.Union); + } + + public static Widget SelectedWidget; + public bool Focused { get { return SelectedWidget == this; } } + public virtual bool TakeFocus(MouseInput mi) + { + if (Focused) + return true; + + if (SelectedWidget != null && !SelectedWidget.LoseFocus(mi)) + return false; + SelectedWidget = this; + return true; + } + + // Remove focus from this widget; return false if you don't want to give it up + public virtual bool LoseFocus(MouseInput mi) + { + // Some widgets may need to override focus depending on mouse click + return LoseFocus(); + } + + public virtual bool LoseFocus() + { + if (SelectedWidget == this) + SelectedWidget = null; + + return true; + } + + public virtual string GetCursor(int2 pos) { return "default"; } + public string GetCursorOuter(int2 pos) + { + // Is the cursor on top of us? + if (!(IsVisible() && GetEventBounds().Contains(pos))) + return null; + + // Do any of our children specify a cursor? + foreach (var child in Children.OfType().Reverse()) + { + var cc = child.GetCursorOuter(pos); + if (cc != null) + return cc; + } + + return EventBounds.Contains(pos) ? GetCursor(pos) : null; + } + + public static bool HandleInput(MouseInput mi) + { + bool handled = false; + if (SelectedWidget != null && SelectedWidget.HandleMouseInputOuter(mi)) + handled = true; + + if (!handled && RootWidget.HandleMouseInputOuter(mi)) + handled = true; + + if (mi.Event == MouseInputEvent.Move) + { + Viewport.LastMousePos = mi.Location; + Viewport.TicksSinceLastMove = 0; + } + return handled; + } + + public bool HandleMouseInputOuter(MouseInput mi) + { + // Are we able to handle this event? + if (!(Focused || (IsVisible() && GetEventBounds().Contains(mi.Location.X, mi.Location.Y)))) + return false; + + // Send the event to the deepest children first and bubble up if unhandled + foreach (var child in Children.OfType().Reverse()) + if (child.HandleMouseInputOuter(mi)) + return true; + + return HandleMouseInput(mi); + } + + // Hack: Don't eat mouse input that others want + // TODO: Solve this properly + public virtual bool HandleMouseInput(MouseInput mi) + { + // Apply any special logic added by delegates; they return true if they caught the input + if (mi.Event == MouseInputEvent.Down && OnMouseDown(mi)) return true; + if (mi.Event == MouseInputEvent.Up && OnMouseUp(mi)) return true; + if (mi.Event == MouseInputEvent.Move) + OnMouseMove(mi); + + return false; + } + + public virtual bool HandleKeyPressInner(KeyInput e) { return false; } + public virtual bool HandleKeyPressOuter(KeyInput e) + { + if (!IsVisible()) + return false; + + // Can any of our children handle this? + foreach (var child in Children) + if (child.HandleKeyPressOuter(e)) + return true; + + // Do any widgety behavior (enter text etc) + var handled = HandleKeyPressInner(e); + + // Apply any special logic added by delegates; they return true if they caught the input + if (OnKeyPress(e)) return true; + + return handled; + } + + public static bool HandleKeyPress(KeyInput e) + { + if (SelectedWidget != null) + return SelectedWidget.HandleKeyPressOuter(e); + + if (RootWidget.HandleKeyPressOuter(e)) + return true; + return false; + } + + public abstract void DrawInner(); + + public virtual void Draw() + { + if (IsVisible()) + { + DrawInner(); + foreach (var child in Children) + child.Draw(); + } + } + + public virtual void Tick() + { + if (IsVisible()) + foreach (var child in Children) + child.Tick(); + } + + public virtual void AddChild(Widget child) + { + child.Parent = this; + Children.Add(child); + } + public virtual void RemoveChild(Widget child) { Children.Remove(child); } + public virtual void RemoveChildren() { Children.Clear(); } + + public Widget GetWidget(string id) + { + if (this.Id == id) + return this; + + foreach (var child in Children) + { + var w = child.GetWidget(id); + if (w != null) + return w; + } + return null; + } + + public T GetWidget(string id) where T : Widget + { + var widget = GetWidget(id); + return (widget != null) ? (T)widget : null; + } + + public static void CloseWindow() + { + RootWidget.Children.Remove(WindowList.Pop()); + if (WindowList.Count > 0) + rootWidget.Children.Add(WindowList.Peek()); + } + + public static Widget OpenWindow(string id) + { + return OpenWindow(id, new Dictionary()); + } + + public static Widget OpenWindow(string id, Dictionary args) + { + var window = Game.modData.WidgetLoader.LoadWidget(args, rootWidget, id); + if (WindowList.Count > 0) + rootWidget.Children.Remove(WindowList.Peek()); + WindowList.Push(window); + return window; + } + + public static void DoTick() + { + RootWidget.Tick(); + } + + public static void DoDraw() + { + RootWidget.Draw(); + } + } + + public class ContainerWidget : Widget + { + public Func GetBackground; + public string Background = null; + + public ContainerWidget() + : base() + { + GetBackground = () => Background; + } + + public ContainerWidget(ContainerWidget other) + : base(other) + { + Background = other.Background; + GetBackground = other.GetBackground; + } + + public override void DrawInner() + { + var bg = GetBackground(); + if (bg != null) + WidgetUtils.DrawPanel(bg, RenderBounds); + } + + public override string GetCursor(int2 pos) { return null; } + public override Widget Clone() { return new ContainerWidget(this); } + } + + public interface IWidgetDelegate { } + public interface IWidgetDelegateEx : IWidgetDelegate + { + void Init(); + } } \ No newline at end of file diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs index 6558a90602..18b349a6b1 100644 --- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs @@ -31,13 +31,13 @@ namespace OpenRA.Widgets public override void DrawInner() { - var selbox = SelectionBox; - if (selbox == null) - { - foreach (var u in SelectActorsInBox(world, Game.CellSize * dragStart, Game.CellSize * dragStart)) - worldRenderer.DrawRollover(u); - - return; + var selbox = SelectionBox; + if (selbox == null) + { + foreach (var u in SelectActorsInBox(world, Game.CellSize * dragStart, Game.CellSize * dragStart)) + worldRenderer.DrawRollover(u); + + return; } var a = selbox.Value.First; @@ -47,9 +47,9 @@ namespace OpenRA.Widgets Game.Renderer.LineRenderer.DrawLine(a, a + b, Color.White, Color.White); Game.Renderer.LineRenderer.DrawLine(a + b, a + b + c, Color.White, Color.White); Game.Renderer.LineRenderer.DrawLine(a + b + c, a + c, Color.White, Color.White); - Game.Renderer.LineRenderer.DrawLine(a, a + c, Color.White, Color.White); - - foreach (var u in SelectActorsInBox(world, selbox.Value.First, selbox.Value.Second)) + Game.Renderer.LineRenderer.DrawLine(a, a + c, Color.White, Color.White); + + foreach (var u in SelectActorsInBox(world, selbox.Value.First, selbox.Value.Second)) worldRenderer.DrawRollover(u); } @@ -102,8 +102,8 @@ namespace OpenRA.Widgets if (world.OrderGenerator == null) return; var orders = world.OrderGenerator.Order(world, xy.ToInt2(), mi).ToArray(); - orders.Do( o => world.IssueOrder( o ) ); - + orders.Do( o => world.IssueOrder( o ) ); + world.PlayVoiceForOrders(orders); } diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index 421b2b7de8..3d010f66b0 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -15,7 +15,7 @@ using OpenRA.Effects; using OpenRA.FileFormats; using OpenRA.Network; using OpenRA.Orders; -using OpenRA.Traits; +using OpenRA.Traits; using XRandom = OpenRA.Thirdparty.Random; namespace OpenRA @@ -200,11 +200,11 @@ namespace OpenRA return ret; } - } - - public IEnumerable> ActorsWithTrait() - { - return traitDict.ActorsWithTraitMultiple(this); + } + + public IEnumerable> ActorsWithTrait() + { + return traitDict.ActorsWithTraitMultiple(this); } } diff --git a/OpenRA.Game/WorldUtils.cs b/OpenRA.Game/WorldUtils.cs index 95be68d72c..9432f212e4 100755 --- a/OpenRA.Game/WorldUtils.cs +++ b/OpenRA.Game/WorldUtils.cs @@ -6,15 +6,15 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using OpenRA.FileFormats; -using OpenRA.GameRules; -using OpenRA.Support; +#endregion + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using OpenRA.FileFormats; +using OpenRA.GameRules; +using OpenRA.Support; using OpenRA.Traits; namespace OpenRA @@ -125,33 +125,33 @@ namespace OpenRA if (!a.Info.Traits.Contains()) return null; var v = a.Info.Traits.Get().Voice; return (v == null) ? null : Rules.Voices[v]; - } - - public static void PlayVoiceForOrders(this World w, Order[] orders) - { - // Find an actor with a phrase to say - foreach (var o in orders) - { - if (o.Subject.Destroyed) continue; - foreach (var v in o.Subject.TraitsImplementing()) - if (Sound.PlayVoice(v.VoicePhraseForOrder(o.Subject, o), - o.Subject, o.Subject.Owner.Country.Race)) - return; - } - } - - public static void DoTimed(this IEnumerable e, Action a, string text, double time) - { - var sw = new Stopwatch(); - - e.Do(x => - { - var t = sw.ElapsedTime(); - a(x); - var dt = sw.ElapsedTime() - t; - if (dt > time) - Log.Write("perf", text, x, dt * 1000, Game.LocalTick); - }); + } + + public static void PlayVoiceForOrders(this World w, Order[] orders) + { + // Find an actor with a phrase to say + foreach (var o in orders) + { + if (o.Subject.Destroyed) continue; + foreach (var v in o.Subject.TraitsImplementing()) + if (Sound.PlayVoice(v.VoicePhraseForOrder(o.Subject, o), + o.Subject, o.Subject.Owner.Country.Race)) + return; + } + } + + public static void DoTimed(this IEnumerable e, Action a, string text, double time) + { + var sw = new Stopwatch(); + + e.Do(x => + { + var t = sw.ElapsedTime(); + a(x); + var dt = sw.ElapsedTime() - t; + if (dt > time) + Log.Write("perf", text, x, dt * 1000, Game.LocalTick); + }); } } } diff --git a/OpenRA.Mods.Cnc/AttackPopupTurreted.cs b/OpenRA.Mods.Cnc/AttackPopupTurreted.cs index 4876e073a7..a6de6758b1 100644 --- a/OpenRA.Mods.Cnc/AttackPopupTurreted.cs +++ b/OpenRA.Mods.Cnc/AttackPopupTurreted.cs @@ -6,17 +6,17 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System; -using System.Linq; -using OpenRA.GameRules; -using OpenRA.Mods.RA; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Move; -using OpenRA.Mods.RA.Render; -using OpenRA.Traits; +#endregion + +using System; +using System.Linq; +using OpenRA.GameRules; +using OpenRA.Mods.RA; +using OpenRA.Mods.RA.Activities; +using OpenRA.Mods.RA.Buildings; +using OpenRA.Mods.RA.Move; +using OpenRA.Mods.RA.Render; +using OpenRA.Traits; using OpenRA.Traits.Activities; namespace OpenRA.Mods.Cnc @@ -48,14 +48,14 @@ namespace OpenRA.Mods.Cnc public AttackPopupTurreted(ActorInitializer init, AttackPopupTurretedInfo info) : base(init.self) { Info = info; - Turret = init.self.Trait(); - if (init.Contains()) - { - State = PopupState.Closed; - init.self.Trait() - .PlayCustomAnimRepeating(init.self, "closed-idle"); + Turret = init.self.Trait(); + if (init.Contains()) + { + State = PopupState.Closed; + init.self.Trait() + .PlayCustomAnimRepeating(init.self, "closed-idle"); Turret.desiredFacing = null; - buildComplete = true; + buildComplete = true; } } diff --git a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs index 4cf8641575..5a4423da8a 100644 --- a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs +++ b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs @@ -112,7 +112,7 @@ namespace OpenRA.Mods.Cnc }); } // GoodGuy win conditions - // BadGuy is dead + // BadGuy is dead var badcount = self.World.Actors.Count(a => a.Owner == Players["BadGuy"] && !a.IsDead()); if (badcount != lastBadCount) { @@ -123,7 +123,7 @@ namespace OpenRA.Mods.Cnc OnVictory(self.World); } - //GoodGuy lose conditions + //GoodGuy lose conditions var goodCount = self.World.Actors.Count(a => a.Owner == Players["GoodGuy"] && !a.IsDead()); if (goodCount == 0) OnLose(self.World); diff --git a/OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs b/OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs index e05f9bb228..db90a36308 100644 --- a/OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs +++ b/OpenRA.Mods.Cnc/Properties/AssemblyInfo.cs @@ -1,36 +1,46 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Mods.Cnc")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.Mods.Cnc")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3b31edcf-34e4-4a58-8130-88b15b046d10")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenRA.Mods.Cnc")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenRA.Mods.Cnc")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3b31edcf-34e4-4a58-8130-88b15b046d10")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Mods.RA/Activities/UnloadCargo.cs b/OpenRA.Mods.RA/Activities/UnloadCargo.cs index 71a5c93315..f3bde020d8 100644 --- a/OpenRA.Mods.RA/Activities/UnloadCargo.cs +++ b/OpenRA.Mods.RA/Activities/UnloadCargo.cs @@ -66,11 +66,11 @@ namespace OpenRA.Mods.RA.Activities self.World.AddFrameEndTask(w => { - if (actor.Destroyed) return; + if (actor.Destroyed) return; var mobile = actor.Trait(); - mobile.SetPosition(actor, self.Location); - + mobile.SetPosition(actor, self.Location); + w.Add(actor); actor.CancelActivity(); actor.QueueActivity(mobile.MoveTo(exitTile.Value, 0)); diff --git a/OpenRA.Mods.RA/Air/FlyCircle.cs b/OpenRA.Mods.RA/Air/FlyCircle.cs index 498f954fb5..69aa82fe24 100644 --- a/OpenRA.Mods.RA/Air/FlyCircle.cs +++ b/OpenRA.Mods.RA/Air/FlyCircle.cs @@ -1,43 +1,43 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007-2011 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. For more information, * see COPYING. - */ -#endregion - -using System.Collections.Generic; -using OpenRA.Traits; -using OpenRA.Traits.Activities; - -namespace OpenRA.Mods.RA.Air -{ - public class FlyCircle : CancelableActivity - { - public override IActivity Tick(Actor self) - { - var cruiseAltitude = self.Info.Traits.Get().CruiseAltitude; - - if (IsCanceled) return NextActivity; - - var aircraft = self.Trait(); - - var desiredFacing = aircraft.Facing + 64; // we can't possibly turn this fast. - if (aircraft.Altitude == cruiseAltitude) - aircraft.Facing = Util.TickFacing(aircraft.Facing, desiredFacing, aircraft.ROT); - - if (aircraft.Altitude < cruiseAltitude) - ++aircraft.Altitude; - - FlyUtil.Fly(self, cruiseAltitude); - return this; - } - - public override IEnumerable GetCurrentPath() - { - yield break; - } - } -} + */ +#endregion + +using System.Collections.Generic; +using OpenRA.Traits; +using OpenRA.Traits.Activities; + +namespace OpenRA.Mods.RA.Air +{ + public class FlyCircle : CancelableActivity + { + public override IActivity Tick(Actor self) + { + var cruiseAltitude = self.Info.Traits.Get().CruiseAltitude; + + if (IsCanceled) return NextActivity; + + var aircraft = self.Trait(); + + var desiredFacing = aircraft.Facing + 64; // we can't possibly turn this fast. + if (aircraft.Altitude == cruiseAltitude) + aircraft.Facing = Util.TickFacing(aircraft.Facing, desiredFacing, aircraft.ROT); + + if (aircraft.Altitude < cruiseAltitude) + ++aircraft.Altitude; + + FlyUtil.Fly(self, cruiseAltitude); + return this; + } + + public override IEnumerable GetCurrentPath() + { + yield break; + } + } +} diff --git a/OpenRA.Mods.RA/Air/Plane.cs b/OpenRA.Mods.RA/Air/Plane.cs index aa57cd71f9..119db439be 100755 --- a/OpenRA.Mods.RA/Air/Plane.cs +++ b/OpenRA.Mods.RA/Air/Plane.cs @@ -6,11 +6,11 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - +#endregion + using System.Collections.Generic; using System.Drawing; -using System.Linq; +using System.Linq; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Orders; @@ -40,13 +40,13 @@ namespace OpenRA.Mods.RA.Air { /* not spawning in the air, so try to assoc. with our afld. this is a hack. */ var afld = self.World.FindUnits(self.CenterLocation, self.CenterLocation) - .FirstOrDefault( a => a.HasTrait() ); - - if (afld != null) - { - var res = afld.Trait(); - if (res != null) - reservation = res.Reserve(afld, self, this); + .FirstOrDefault( a => a.HasTrait() ); + + if (afld != null) + { + var res = afld.Trait(); + if (res != null) + reservation = res.Reserve(afld, self, this); } } } @@ -88,7 +88,7 @@ namespace OpenRA.Mods.RA.Air var target = self.World.ClampToWorld(order.TargetLocation); self.SetTargetLine(Target.FromCell(target), Color.Green); self.CancelActivity(); - self.QueueActivity(Fly.ToCell(target)); + self.QueueActivity(Fly.ToCell(target)); self.QueueActivity(new FlyCircle()); } diff --git a/OpenRA.Mods.RA/Air/ReturnOnIdle.cs b/OpenRA.Mods.RA/Air/ReturnOnIdle.cs index 5ee94a9c87..288b8e2795 100755 --- a/OpenRA.Mods.RA/Air/ReturnOnIdle.cs +++ b/OpenRA.Mods.RA/Air/ReturnOnIdle.cs @@ -6,11 +6,11 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System.Linq; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Buildings; +#endregion + +using System.Linq; +using OpenRA.Mods.RA.Activities; +using OpenRA.Mods.RA.Buildings; using OpenRA.Traits; namespace OpenRA.Mods.RA.Air @@ -33,29 +33,29 @@ namespace OpenRA.Mods.RA.Air self.QueueActivity(new Rearm()); } else - { - // nowhere to land, pick something friendly and circle over it. - - // i'd prefer something we own - var someBuilding = self.World.ActorsWithTrait() - .Select( a => a.Actor ) - .FirstOrDefault(a => a.Owner == self.Owner); - - // failing that, something unlikely to shoot at us - if (someBuilding == null) - someBuilding = self.World.ActorsWithTrait() - .Select( a => a.Actor ) - .FirstOrDefault(a => self.Owner.Stances[a.Owner] == Stance.Ally); - - if (someBuilding == null) - { - // ... going down the garden to eat worms ... - self.QueueActivity(new FlyOffMap()); - self.QueueActivity(new RemoveSelf()); - return; - } - - self.QueueActivity(Fly.ToCell(someBuilding.Location)); + { + // nowhere to land, pick something friendly and circle over it. + + // i'd prefer something we own + var someBuilding = self.World.ActorsWithTrait() + .Select( a => a.Actor ) + .FirstOrDefault(a => a.Owner == self.Owner); + + // failing that, something unlikely to shoot at us + if (someBuilding == null) + someBuilding = self.World.ActorsWithTrait() + .Select( a => a.Actor ) + .FirstOrDefault(a => self.Owner.Stances[a.Owner] == Stance.Ally); + + if (someBuilding == null) + { + // ... going down the garden to eat worms ... + self.QueueActivity(new FlyOffMap()); + self.QueueActivity(new RemoveSelf()); + return; + } + + self.QueueActivity(Fly.ToCell(someBuilding.Location)); self.QueueActivity(new FlyCircle()); } } diff --git a/OpenRA.Mods.RA/Air/ReturnToBase.cs b/OpenRA.Mods.RA/Air/ReturnToBase.cs index befc0a21f7..6124719d2e 100755 --- a/OpenRA.Mods.RA/Air/ReturnToBase.cs +++ b/OpenRA.Mods.RA/Air/ReturnToBase.cs @@ -11,7 +11,7 @@ using System; using System.Linq; using OpenRA.Traits; -using OpenRA.Traits.Activities; +using OpenRA.Traits.Activities; using OpenRA.Mods.RA.Buildings; namespace OpenRA.Mods.RA.Air @@ -24,13 +24,13 @@ namespace OpenRA.Mods.RA.Air int2 w1, w2, w3; /* tangent points to turn circles */ public static Actor ChooseAirfield(Actor self) - { - return self.World.ActorsWithTrait() - .Where(a => a.Actor.Owner == self.Owner) - .Where(a => self.Info.Traits.Get().RearmBuildings.Contains(a.Actor.Info.Name) - && !Reservable.IsReserved(a.Actor)) - .OrderBy(a => (a.Actor.CenterLocation - self.CenterLocation).LengthSquared) - .Select(a => a.Actor) + { + return self.World.ActorsWithTrait() + .Where(a => a.Actor.Owner == self.Owner) + .Where(a => self.Info.Traits.Get().RearmBuildings.Contains(a.Actor.Info.Name) + && !Reservable.IsReserved(a.Actor)) + .OrderBy(a => (a.Actor.CenterLocation - self.CenterLocation).LengthSquared) + .Select(a => a.Actor) .FirstOrDefault(); } diff --git a/OpenRA.Mods.RA/BaseBuilding.cs b/OpenRA.Mods.RA/BaseBuilding.cs index 83780c82f0..59384284e6 100644 --- a/OpenRA.Mods.RA/BaseBuilding.cs +++ b/OpenRA.Mods.RA/BaseBuilding.cs @@ -1,8 +1,18 @@ -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - /* tag trait for "bases": mcv/fact */ - public class BaseBuildingInfo : TraitInfo { } - public class BaseBuilding { } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + /* tag trait for "bases": mcv/fact */ + public class BaseBuildingInfo : TraitInfo { } + public class BaseBuilding { } +} diff --git a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs b/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs index 50985dbe1e..5599d270f3 100755 --- a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs +++ b/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs @@ -53,8 +53,8 @@ namespace OpenRA.Mods.RA.Buildings if (remainingTicks == 0) { var csv = self.Info.Traits.GetOrDefault(); - var buildingValue = csv != null ? csv.Value : self.Info.Traits.Get().Cost; - + var buildingValue = csv != null ? csv.Value : self.Info.Traits.Get().Cost; + var hpToRepair = Math.Min(Info.RepairStep, Health.MaxHP - Health.HP); var cost = (hpToRepair * Info.RepairPercent * buildingValue) / (Health.MaxHP * 100); if (!self.Owner.PlayerActor.Trait().TakeCash(cost)) diff --git a/OpenRA.Mods.RA/Buildings/Sell.cs b/OpenRA.Mods.RA/Buildings/Sell.cs index 85da84baa9..b114da5224 100755 --- a/OpenRA.Mods.RA/Buildings/Sell.cs +++ b/OpenRA.Mods.RA/Buildings/Sell.cs @@ -9,7 +9,7 @@ #endregion using System.Collections.Generic; -using OpenRA.Traits; +using OpenRA.Traits; using OpenRA.Mods.RA.Effects; namespace OpenRA.Mods.RA.Buildings @@ -35,9 +35,9 @@ namespace OpenRA.Mods.RA.Buildings pr.GiveCash(refund); foreach (var ns in self.TraitsImplementing()) - ns.Sold(self); - - if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally) + ns.Sold(self); + + if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally) self.World.AddFrameEndTask(w => w.Add(new CashTick(refund, 30, 2, self.CenterLocation, self.Owner.ColorRamp.GetColor(0)))); self.Destroy(); diff --git a/OpenRA.Mods.RA/Cloak.cs b/OpenRA.Mods.RA/Cloak.cs index 81409b3d64..57db9f09fa 100644 --- a/OpenRA.Mods.RA/Cloak.cs +++ b/OpenRA.Mods.RA/Cloak.cs @@ -68,18 +68,18 @@ namespace OpenRA.Mods.RA canCloak = (e.DamageState < DamageState.Critical); if (Cloaked && !canCloak) DoUncloak(); - } - + } + static readonly Renderable[] Nothing = { }; public IEnumerable ModifyRender(Actor self, IEnumerable rs) { if (remainingTime > 0) - return rs; - - if (Cloaked && IsVisible(self)) - return rs.Select(a => a.WithPalette("shadow")); - else + return rs; + + if (Cloaked && IsVisible(self)) + return rs.Select(a => a.WithPalette("shadow")); + else return Nothing; } @@ -107,10 +107,10 @@ namespace OpenRA.Mods.RA if (!Cloaked || self.Owner == self.World.LocalPlayer || self.World.LocalPlayer == null || self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally) - return true; - - return self.World.ActorsWithTrait().Any(a => - a.Actor.Owner.Stances[self.Owner] != Stance.Ally && + return true; + + return self.World.ActorsWithTrait().Any(a => + a.Actor.Owner.Stances[self.Owner] != Stance.Ally && (self.Location - a.Actor.Location).Length < a.Actor.Info.Traits.Get().Range); } diff --git a/OpenRA.Mods.RA/ConquestVictoryConditions.cs b/OpenRA.Mods.RA/ConquestVictoryConditions.cs index 511a6ffee0..9a0d770c4c 100644 --- a/OpenRA.Mods.RA/ConquestVictoryConditions.cs +++ b/OpenRA.Mods.RA/ConquestVictoryConditions.cs @@ -47,9 +47,9 @@ namespace OpenRA.Mods.RA if (self.Owner.WinState == WinState.Lost) return; self.Owner.WinState = WinState.Lost; - Game.Debug("{0} is defeated.".F(self.Owner.PlayerName)); - - foreach (var a in self.World.Actors.Where(a => a.Owner == self.Owner)) + Game.Debug("{0} is defeated.".F(self.Owner.PlayerName)); + + foreach (var a in self.World.Actors.Where(a => a.Owner == self.Owner)) a.Kill(a); if (self.Owner == self.World.LocalPlayer) diff --git a/OpenRA.Mods.RA/Crate.cs b/OpenRA.Mods.RA/Crate.cs index 4e868d454e..64696bacf5 100644 --- a/OpenRA.Mods.RA/Crate.cs +++ b/OpenRA.Mods.RA/Crate.cs @@ -11,7 +11,7 @@ using System.Collections.Generic; using System.Linq; using OpenRA.FileFormats; -using OpenRA.Traits; +using OpenRA.Traits; using OpenRA.Mods.RA.Buildings; /* @@ -95,13 +95,13 @@ namespace OpenRA.Mods.RA public bool CanEnterCell(int2 cell) { if (!self.World.Map.IsInMap(cell.X, cell.Y)) return false; - var type = self.World.GetTerrainType(cell); - if (!Info.TerrainTypes.Contains(type)) - return false; - - if (self.World.WorldActor.Trait().GetBuildingAt(cell) != null) return false; - if (self.World.WorldActor.Trait().GetUnitsAt(cell).Any()) return false; - + var type = self.World.GetTerrainType(cell); + if (!Info.TerrainTypes.Contains(type)) + return false; + + if (self.World.WorldActor.Trait().GetBuildingAt(cell) != null) return false; + if (self.World.WorldActor.Trait().GetUnitsAt(cell).Any()) return false; + return true; } diff --git a/OpenRA.Mods.RA/CrateDrop.cs b/OpenRA.Mods.RA/CrateDrop.cs index 8a3aaad42f..f8213164b7 100644 --- a/OpenRA.Mods.RA/CrateDrop.cs +++ b/OpenRA.Mods.RA/CrateDrop.cs @@ -48,45 +48,45 @@ namespace OpenRA.Mods.RA for (var n = 0; n < toSpawn; n++) SpawnCrate(self, info); } - } - - void SpawnCrate(Actor self, CrateDropInfo info) - { - var threshold = 100; - var inWater = self.World.SharedRandom.NextDouble() < info.WaterChance; - - for (var n = 0; n < threshold; n++) - { - var p = self.World.ChooseRandomCell(self.World.SharedRandom); - - // Is this valid terrain? - var terrainType = self.World.GetTerrainType(p); - if (!(inWater ? info.ValidWater : info.ValidGround).Contains(terrainType)) continue; - - // Don't drop on any actors - if (self.World.WorldActor.Trait().GetBuildingAt(p) != null) continue; - if (self.World.WorldActor.Trait().GetUnitsAt(p).Any()) continue; - - self.World.AddFrameEndTask(w => - { - var crate = w.CreateActor(false, "crate", new TypeDictionary { new OwnerInit(w.WorldActor.Owner) }); - crates.Add(crate); - - var startPos = w.ChooseRandomEdgeCell(); + } + + void SpawnCrate(Actor self, CrateDropInfo info) + { + var threshold = 100; + var inWater = self.World.SharedRandom.NextDouble() < info.WaterChance; + + for (var n = 0; n < threshold; n++) + { + var p = self.World.ChooseRandomCell(self.World.SharedRandom); + + // Is this valid terrain? + var terrainType = self.World.GetTerrainType(p); + if (!(inWater ? info.ValidWater : info.ValidGround).Contains(terrainType)) continue; + + // Don't drop on any actors + if (self.World.WorldActor.Trait().GetBuildingAt(p) != null) continue; + if (self.World.WorldActor.Trait().GetUnitsAt(p).Any()) continue; + + self.World.AddFrameEndTask(w => + { + var crate = w.CreateActor(false, "crate", new TypeDictionary { new OwnerInit(w.WorldActor.Owner) }); + crates.Add(crate); + + var startPos = w.ChooseRandomEdgeCell(); var plane = w.CreateActor("badr", new TypeDictionary { new LocationInit( startPos ), new OwnerInit( w.WorldActor.Owner), new FacingInit( Util.GetFacing(p - startPos, 0) ), new AltitudeInit( Rules.Info["badr"].Traits.Get().CruiseAltitude ), - }); - plane.CancelActivity(); - plane.QueueActivity(new FlyAttackLoop(p)); - plane.Trait().SetLZ(p); - plane.Trait().Load(plane, crate); - }); - return; - } + }); + plane.CancelActivity(); + plane.QueueActivity(new FlyAttackLoop(p)); + plane.Trait().SetLZ(p); + plane.Trait().Load(plane, crate); + }); + return; + } } } } diff --git a/OpenRA.Mods.RA/Effects/Bullet.cs b/OpenRA.Mods.RA/Effects/Bullet.cs index 99b73c38c4..d41e06d30f 100755 --- a/OpenRA.Mods.RA/Effects/Bullet.cs +++ b/OpenRA.Mods.RA/Effects/Bullet.cs @@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA.Effects public readonly int Arm = 0; public readonly bool Shadow = false; public readonly bool Proximity = false; - public readonly float Angle = 0; + public readonly float Angle = 0; public readonly int TrailInterval = 2; public IEffect Create(ProjectileArgs args) { return new Bullet( this, args ); } @@ -82,8 +82,8 @@ namespace OpenRA.Mods.RA.Effects return (int)(rawFacing < 128 ? rawFacing - scale * attitude : rawFacing + scale * attitude); - } - + } + int ticksToNextSmoke; public void Tick( World world ) @@ -102,13 +102,13 @@ namespace OpenRA.Mods.RA.Effects var highPos = (Info.High || Info.Angle > 0) ? (pos - new float2(0, GetAltitude())) - : pos; - - if (--ticksToNextSmoke < 0) - { - world.AddFrameEndTask(w => w.Add( - new Smoke(w, highPos.ToInt2(), Info.Trail))); - ticksToNextSmoke = Info.TrailInterval; + : pos; + + if (--ticksToNextSmoke < 0) + { + world.AddFrameEndTask(w => w.Add( + new Smoke(w, highPos.ToInt2(), Info.Trail))); + ticksToNextSmoke = Info.TrailInterval; } } diff --git a/OpenRA.Mods.RA/Effects/CashTick.cs b/OpenRA.Mods.RA/Effects/CashTick.cs index d8cc845f05..3030a71625 100644 --- a/OpenRA.Mods.RA/Effects/CashTick.cs +++ b/OpenRA.Mods.RA/Effects/CashTick.cs @@ -10,7 +10,7 @@ using System.Collections.Generic; using System.Drawing; -using OpenRA.Effects; +using OpenRA.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA.Effects diff --git a/OpenRA.Mods.RA/Effects/Missile.cs b/OpenRA.Mods.RA/Effects/Missile.cs index 231975712a..90f179075f 100755 --- a/OpenRA.Mods.RA/Effects/Missile.cs +++ b/OpenRA.Mods.RA/Effects/Missile.cs @@ -30,7 +30,7 @@ namespace OpenRA.Mods.RA.Effects public readonly string Image = null; public readonly int ROT = 5; public readonly int RangeLimit = 0; - public readonly bool TurboBoost = false; + public readonly bool TurboBoost = false; public readonly int TrailInterval = 2; public IEffect Create(ProjectileArgs args) { return new Missile( this, args ); } @@ -70,7 +70,7 @@ namespace OpenRA.Mods.RA.Effects } // In pixels - const int MissileCloseEnough = 7; + const int MissileCloseEnough = 7; int ticksToNextSmoke; public void Tick( World world ) @@ -107,12 +107,12 @@ namespace OpenRA.Mods.RA.Effects if (Info.Trail != null) { - var sp = (SubPxPosition - (move * 3) / 2) / 1024 - new int2(0, Altitude); - - if (--ticksToNextSmoke < 0) - { - world.AddFrameEndTask(w => w.Add(new Smoke(w, sp, Info.Trail))); - ticksToNextSmoke = Info.TrailInterval; + var sp = (SubPxPosition - (move * 3) / 2) / 1024 - new int2(0, Altitude); + + if (--ticksToNextSmoke < 0) + { + world.AddFrameEndTask(w => w.Add(new Smoke(w, sp, Info.Trail))); + ticksToNextSmoke = Info.TrailInterval; } } diff --git a/OpenRA.Mods.RA/Effects/RepairIndicator.cs b/OpenRA.Mods.RA/Effects/RepairIndicator.cs index 491e6f2c98..4b177f00f3 100755 --- a/OpenRA.Mods.RA/Effects/RepairIndicator.cs +++ b/OpenRA.Mods.RA/Effects/RepairIndicator.cs @@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA.Effects public RepairIndicator(Actor a, int frames) { - this.a = a; anim.PlayRepeating("repair"); + this.a = a; anim.PlayRepeating("repair"); framesLeft = frames; } diff --git a/OpenRA.Mods.RA/Explodes.cs b/OpenRA.Mods.RA/Explodes.cs index a3078ff8f6..d3e3be9e11 100644 --- a/OpenRA.Mods.RA/Explodes.cs +++ b/OpenRA.Mods.RA/Explodes.cs @@ -18,8 +18,8 @@ namespace OpenRA.Mods.RA [WeaponReference] public readonly string Weapon = "UnitExplode"; [WeaponReference] - public readonly string EmptyWeapon = "UnitExplode"; - + public readonly string EmptyWeapon = "UnitExplode"; + public readonly int Chance = 100; } @@ -28,8 +28,8 @@ namespace OpenRA.Mods.RA public void Damaged(Actor self, AttackInfo e) { if (e.DamageState == DamageState.Dead) - { - if (self.World.SharedRandom.Next(100) > self.Info.Traits.Get().Chance) + { + if (self.World.SharedRandom.Next(100) > self.Info.Traits.Get().Chance) return; var weapon = ChooseWeaponForExplosion(self); diff --git a/OpenRA.Mods.RA/GainsExperience.cs b/OpenRA.Mods.RA/GainsExperience.cs index 277df341a0..fd2d880d45 100644 --- a/OpenRA.Mods.RA/GainsExperience.cs +++ b/OpenRA.Mods.RA/GainsExperience.cs @@ -13,7 +13,7 @@ using System.Linq; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Mods.RA.Effects; -using OpenRA.Traits; +using OpenRA.Traits; using OpenRA.FileFormats; namespace OpenRA.Mods.RA @@ -41,14 +41,14 @@ namespace OpenRA.Mods.RA var cost = self.Info.Traits.Get().Cost; Levels = Info.CostThreshold.Select(t => (int)(t * cost)).ToArray(); RankAnim = new Animation("rank"); - RankAnim.PlayFetchIndex("rank", () => Level - 1); - - if (init.Contains()) - { - Experience = init.Get(); - - while (Level < Levels.Length && Experience >= Levels[Level]) - Level++; + RankAnim.PlayFetchIndex("rank", () => Level - 1); + + if (init.Contains()) + { + Experience = init.Get(); + + while (Level < Levels.Length && Experience >= Levels[Level]) + Level++; } } @@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA int Level = 0; public void GiveOneLevel() - { + { if (Level < Levels.Length) GiveExperience(Levels[Level] - Experience); } @@ -94,40 +94,40 @@ namespace OpenRA.Mods.RA } public IEnumerable ModifyRender(Actor self, IEnumerable rs) - { - if (self.Owner == self.World.LocalPlayer && Level > 0) - return InnerModifyRender(self, rs); - else - return rs; - } - - IEnumerable InnerModifyRender(Actor self, IEnumerable rs) - { - foreach (var r in rs) - yield return r; - - RankAnim.Tick(); // hack - var bounds = self.GetBounds(false); - yield return new Renderable(RankAnim.Image, - new float2(bounds.Right - 6, bounds.Bottom - 8), "effect", (int)self.CenterLocation.Y); + { + if (self.Owner == self.World.LocalPlayer && Level > 0) + return InnerModifyRender(self, rs); + else + return rs; + } + + IEnumerable InnerModifyRender(Actor self, IEnumerable rs) + { + foreach (var r in rs) + yield return r; + + RankAnim.Tick(); // hack + var bounds = self.GetBounds(false); + yield return new Renderable(RankAnim.Image, + new float2(bounds.Right - 6, bounds.Bottom - 8), "effect", (int)self.CenterLocation.Y); + } + } + + class ExperienceInit : IActorInit + { + [FieldFromYamlKey] + public readonly int value = 0; + + public ExperienceInit() { } + + public ExperienceInit(int init) + { + value = init; + } + + public int Value(World world) + { + return value; } - } - - class ExperienceInit : IActorInit - { - [FieldFromYamlKey] - public readonly int value = 0; - - public ExperienceInit() { } - - public ExperienceInit(int init) - { - value = init; - } - - public int Value(World world) - { - return value; - } } } diff --git a/OpenRA.Mods.RA/Harvester.cs b/OpenRA.Mods.RA/Harvester.cs index 99fb1c14e8..a7d9c41ad0 100644 --- a/OpenRA.Mods.RA/Harvester.cs +++ b/OpenRA.Mods.RA/Harvester.cs @@ -63,13 +63,13 @@ namespace OpenRA.Mods.RA } Actor ClosestProc(Actor self, Actor ignore) - { - var refs = self.World.ActorsWithTrait() - .Where(x => x.Actor != ignore && x.Actor.Owner == self.Owner) + { + var refs = self.World.ActorsWithTrait() + .Where(x => x.Actor != ignore && x.Actor.Owner == self.Owner) .ToList(); var mi = self.Info.Traits.Get(); var path = self.World.WorldActor.Trait().FindPath( - PathSearch.FromPoints(self.World, mi, + PathSearch.FromPoints(self.World, mi, refs.Select(r => r.Actor.Location + r.Trait.DeliverOffset), self.Location, false)); path.Reverse(); diff --git a/OpenRA.Mods.RA/InvisibleToOthers.cs b/OpenRA.Mods.RA/InvisibleToOthers.cs index 16a0a5754d..0c102f681a 100644 --- a/OpenRA.Mods.RA/InvisibleToOthers.cs +++ b/OpenRA.Mods.RA/InvisibleToOthers.cs @@ -26,8 +26,8 @@ namespace OpenRA.Mods.RA public Color RadarColorOverride(Actor self) { return Color.FromArgb(128, self.Owner.ColorRamp.GetColor(0)); - } - + } + static readonly Renderable[] Nothing = { }; public IEnumerable ModifyRender(Actor self, IEnumerable r) { diff --git a/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs b/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs index 1578c25699..557e479627 100644 --- a/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs +++ b/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs @@ -1,16 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - class LintBuildablePrerequisites : ILintPass - { - public void Run(Action emitError) - { - emitError("Hello World"); - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + class LintBuildablePrerequisites : ILintPass + { + public void Run(Action emitError) + { + emitError("Hello World"); + } + } +} diff --git a/OpenRA.Mods.RA/Move/PathFinder.cs b/OpenRA.Mods.RA/Move/PathFinder.cs index 9be2e19f5d..633e3c7a47 100755 --- a/OpenRA.Mods.RA/Move/PathFinder.cs +++ b/OpenRA.Mods.RA/Move/PathFinder.cs @@ -87,12 +87,12 @@ namespace OpenRA.Mods.RA.Move { using (new PerfSample("Pathfinder")) { - using(search) - while (!search.queue.Empty) - { - var p = search.Expand(world); - if (search.heuristic(p) == 0) - return MakePath(search.cellInfo, p); + using(search) + while (!search.queue.Empty) + { + var p = search.Expand(world); + if (search.heuristic(p) == 0) + return MakePath(search.cellInfo, p); } // no path exists @@ -114,35 +114,35 @@ namespace OpenRA.Mods.RA.Move ret.Add(pathNode); CheckSanePath(ret); return ret; - } - - - - public List FindBidiPath( /* searches from both ends toward each other */ - PathSearch fromSrc, - PathSearch fromDest) - { - using (new PerfSample("Pathfinder")) - { - using (fromSrc) - using (fromDest) - while (!fromSrc.queue.Empty && !fromDest.queue.Empty) - { - /* make some progress on the first search */ - var p = fromSrc.Expand(world); - - if (fromDest.cellInfo[p.X, p.Y].Seen && fromDest.cellInfo[p.X, p.Y].MinCost < float.PositiveInfinity) - return MakeBidiPath(fromSrc, fromDest, p); - - /* make some progress on the second search */ - var q = fromDest.Expand(world); - - if (fromSrc.cellInfo[q.X, q.Y].Seen && fromSrc.cellInfo[q.X, q.Y].MinCost < float.PositiveInfinity) - return MakeBidiPath(fromSrc, fromDest, q); - } - - return new List(); - } + } + + + + public List FindBidiPath( /* searches from both ends toward each other */ + PathSearch fromSrc, + PathSearch fromDest) + { + using (new PerfSample("Pathfinder")) + { + using (fromSrc) + using (fromDest) + while (!fromSrc.queue.Empty && !fromDest.queue.Empty) + { + /* make some progress on the first search */ + var p = fromSrc.Expand(world); + + if (fromDest.cellInfo[p.X, p.Y].Seen && fromDest.cellInfo[p.X, p.Y].MinCost < float.PositiveInfinity) + return MakeBidiPath(fromSrc, fromDest, p); + + /* make some progress on the second search */ + var q = fromDest.Expand(world); + + if (fromSrc.cellInfo[q.X, q.Y].Seen && fromSrc.cellInfo[q.X, q.Y].MinCost < float.PositiveInfinity) + return MakeBidiPath(fromSrc, fromDest, q); + } + + return new List(); + } } static List MakeBidiPath(PathSearch a, PathSearch b, int2 p) diff --git a/OpenRA.Mods.RA/Move/PathSearch.cs b/OpenRA.Mods.RA/Move/PathSearch.cs index 1ef09cacf0..23cb1ec4ab 100755 --- a/OpenRA.Mods.RA/Move/PathSearch.cs +++ b/OpenRA.Mods.RA/Move/PathSearch.cs @@ -191,37 +191,37 @@ namespace OpenRA.Mods.RA.Move search.AddInitialCell( sl ); return search; - } - - static readonly Queue cellInfoPool = new Queue(); - - static CellInfo[,] GetFromPool() - { - lock (cellInfoPool) - return cellInfoPool.Dequeue(); - } - - static void PutBackIntoPool(CellInfo[,] ci) - { - lock (cellInfoPool) - cellInfoPool.Enqueue(ci); + } + + static readonly Queue cellInfoPool = new Queue(); + + static CellInfo[,] GetFromPool() + { + lock (cellInfoPool) + return cellInfoPool.Dequeue(); + } + + static void PutBackIntoPool(CellInfo[,] ci) + { + lock (cellInfoPool) + cellInfoPool.Enqueue(ci); } CellInfo[ , ] InitCellInfo() - { - CellInfo[,] result = null; - while (cellInfoPool.Count > 0) - { - var cellInfo = GetFromPool(); - if (cellInfo.GetUpperBound(0) != world.Map.MapSize.X - 1 || - cellInfo.GetUpperBound(1) != world.Map.MapSize.Y - 1) - { - Log.Write("debug", "Discarding old pooled CellInfo of wrong size."); - continue; - } - - result = cellInfo; - break; + { + CellInfo[,] result = null; + while (cellInfoPool.Count > 0) + { + var cellInfo = GetFromPool(); + if (cellInfo.GetUpperBound(0) != world.Map.MapSize.X - 1 || + cellInfo.GetUpperBound(1) != world.Map.MapSize.Y - 1) + { + Log.Write("debug", "Discarding old pooled CellInfo of wrong size."); + continue; + } + + result = cellInfo; + break; } if (result == null) @@ -243,20 +243,20 @@ namespace OpenRA.Mods.RA.Move int straight = Math.Abs( d.X - d.Y ); return (3400 * diag / 24) + (100 * straight); }; - } - - bool disposed; - public void Dispose() - { - if (disposed) - return; - - disposed = true; - GC.SuppressFinalize(this); - PutBackIntoPool(cellInfo); - cellInfo = null; - } - - ~PathSearch() { Dispose(); } + } + + bool disposed; + public void Dispose() + { + if (disposed) + return; + + disposed = true; + GC.SuppressFinalize(this); + PutBackIntoPool(cellInfo); + cellInfo = null; + } + + ~PathSearch() { Dispose(); } } } diff --git a/OpenRA.Mods.RA/Orders/DeployOrderTargeter.cs b/OpenRA.Mods.RA/Orders/DeployOrderTargeter.cs index aa06824055..e5f8addb2a 100755 --- a/OpenRA.Mods.RA/Orders/DeployOrderTargeter.cs +++ b/OpenRA.Mods.RA/Orders/DeployOrderTargeter.cs @@ -1,42 +1,52 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA.Orders -{ - public class DeployOrderTargeter : IOrderTargeter - { - readonly Func useDeployCursor; - - public DeployOrderTargeter( string order, int priority ) - : this( order, priority, () => true ) - { - } - - public DeployOrderTargeter( string order, int priority, Func useDeployCursor ) - { - this.OrderID = order; - this.OrderPriority = priority; - this.useDeployCursor = useDeployCursor; - } - - public string OrderID { get; private set; } - public int OrderPriority { get; private set; } - - public bool CanTargetActor( Actor self, Actor target, bool forceAttack, bool forceMove, bool forceQueued, ref string cursor ) - { - IsQueued = forceQueued; - cursor = useDeployCursor() ? "deploy" : "deploy-blocked"; - return self == target; - } - - public bool CanTargetLocation(Actor self, int2 location, List actorsAtLocation, bool forceAttack, bool forceMove, bool forceQueued, ref string cursor) - { - return false; - } - - public bool IsQueued { get; protected set; } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA.Orders +{ + public class DeployOrderTargeter : IOrderTargeter + { + readonly Func useDeployCursor; + + public DeployOrderTargeter( string order, int priority ) + : this( order, priority, () => true ) + { + } + + public DeployOrderTargeter( string order, int priority, Func useDeployCursor ) + { + this.OrderID = order; + this.OrderPriority = priority; + this.useDeployCursor = useDeployCursor; + } + + public string OrderID { get; private set; } + public int OrderPriority { get; private set; } + + public bool CanTargetActor( Actor self, Actor target, bool forceAttack, bool forceMove, bool forceQueued, ref string cursor ) + { + IsQueued = forceQueued; + cursor = useDeployCursor() ? "deploy" : "deploy-blocked"; + return self == target; + } + + public bool CanTargetLocation(Actor self, int2 location, List actorsAtLocation, bool forceAttack, bool forceMove, bool forceQueued, ref string cursor) + { + return false; + } + + public bool IsQueued { get; protected set; } + } +} diff --git a/OpenRA.Mods.RA/OreRefinery.cs b/OpenRA.Mods.RA/OreRefinery.cs index ea9ba97cc6..029610457c 100644 --- a/OpenRA.Mods.RA/OreRefinery.cs +++ b/OpenRA.Mods.RA/OreRefinery.cs @@ -6,15 +6,15 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Effects; -using OpenRA.Mods.RA.Move; -using OpenRA.Mods.RA.Render; +#endregion + +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using OpenRA.Mods.RA.Activities; +using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.RA.Move; +using OpenRA.Mods.RA.Render; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/ParaDrop.cs b/OpenRA.Mods.RA/ParaDrop.cs index 0c3aec892d..484ff54a86 100644 --- a/OpenRA.Mods.RA/ParaDrop.cs +++ b/OpenRA.Mods.RA/ParaDrop.cs @@ -6,75 +6,75 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System.Collections.Generic; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Air; -using OpenRA.Mods.RA.Effects; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - public class ParaDropInfo : TraitInfo - { - public readonly int LZRange = 4; - public readonly string ChuteSound = "chute1.aud"; - } - - public class ParaDrop : ITick - { - readonly List droppedAt = new List(); - int2 lz; - - public void SetLZ(int2 lz) - { - this.lz = lz; - droppedAt.Clear(); - } - - public void Tick(Actor self) - { - var info = self.Info.Traits.Get(); - var r = info.LZRange; - - if ((self.Location - lz).LengthSquared <= r * r && !droppedAt.Contains(self.Location)) - { - var cargo = self.Trait(); - if (cargo.IsEmpty(self)) - FinishedDropping(self); - else - { - if (!IsSuitableCell(cargo.Peek(self), self.Location)) - return; - - // unload a dude here - droppedAt.Add(self.Location); - - var a = cargo.Unload(self); - var rs = a.Trait(); - - var aircraft = self.Trait(); - self.World.AddFrameEndTask(w => w.Add( - new Parachute(self.Owner, rs.anim.Name, - Util.CenterOfCell(Util.CellContaining(self.CenterLocation)), - aircraft.Altitude, a))); - - Sound.Play(info.ChuteSound, self.CenterLocation); - } - } - } - - bool IsSuitableCell(Actor actorToDrop, int2 p) - { - return actorToDrop.Trait().CanEnterCell(p); - } - - void FinishedDropping(Actor self) - { - self.CancelActivity(); - self.QueueActivity(new FlyOffMap { Interruptible = false }); - self.QueueActivity(new RemoveSelf()); - } - } +#endregion + +using System.Collections.Generic; +using OpenRA.Mods.RA.Activities; +using OpenRA.Mods.RA.Air; +using OpenRA.Mods.RA.Effects; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + public class ParaDropInfo : TraitInfo + { + public readonly int LZRange = 4; + public readonly string ChuteSound = "chute1.aud"; + } + + public class ParaDrop : ITick + { + readonly List droppedAt = new List(); + int2 lz; + + public void SetLZ(int2 lz) + { + this.lz = lz; + droppedAt.Clear(); + } + + public void Tick(Actor self) + { + var info = self.Info.Traits.Get(); + var r = info.LZRange; + + if ((self.Location - lz).LengthSquared <= r * r && !droppedAt.Contains(self.Location)) + { + var cargo = self.Trait(); + if (cargo.IsEmpty(self)) + FinishedDropping(self); + else + { + if (!IsSuitableCell(cargo.Peek(self), self.Location)) + return; + + // unload a dude here + droppedAt.Add(self.Location); + + var a = cargo.Unload(self); + var rs = a.Trait(); + + var aircraft = self.Trait(); + self.World.AddFrameEndTask(w => w.Add( + new Parachute(self.Owner, rs.anim.Name, + Util.CenterOfCell(Util.CellContaining(self.CenterLocation)), + aircraft.Altitude, a))); + + Sound.Play(info.ChuteSound, self.CenterLocation); + } + } + } + + bool IsSuitableCell(Actor actorToDrop, int2 p) + { + return actorToDrop.Trait().CanEnterCell(p); + } + + void FinishedDropping(Actor self) + { + self.CancelActivity(); + self.QueueActivity(new FlyOffMap { Interruptible = false }); + self.QueueActivity(new RemoveSelf()); + } + } } diff --git a/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs b/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs index ca30e74bab..d692eeb4d8 100755 --- a/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs @@ -34,8 +34,8 @@ namespace OpenRA.Mods.RA .Any(); base.Tick(self); - } - + } + static ActorInfo[] None = { }; public override IEnumerable AllItems() { @@ -51,7 +51,7 @@ namespace OpenRA.Mods.RA { // Find a production structure to build this actor var producers = self.World - .ActorsWithTrait() + .ActorsWithTrait() .Where(x => x.Actor.Owner == self.Owner) .Where(x => x.Trait.Info.Produces.Contains(Info.Type)) .OrderByDescending(x => x.Actor.IsPrimaryBuilding() ? 1 : 0 ); // prioritize the primary. diff --git a/OpenRA.Mods.RA/Player/ProductionQueue.cs b/OpenRA.Mods.RA/Player/ProductionQueue.cs index 83abccf368..f85e5f79da 100755 --- a/OpenRA.Mods.RA/Player/ProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ProductionQueue.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA public readonly Actor self; public ProductionQueueInfo Info; PowerManager PlayerPower; - PlayerResources PlayerResources; + PlayerResources PlayerResources; string Race; // A list of things we are currently building @@ -55,7 +55,7 @@ namespace OpenRA.Mods.RA [Sync] public bool CurrentDone { get { return QueueLength == 0 ? false : Queue[0].Done; } } - // A list of things we could possibly build, even if our race doesn't normally get it + // A list of things we could possibly build, even if our race doesn't normally get it public Dictionary Produceable; public ProductionQueue( Actor self, Actor playerActor, ProductionQueueInfo info ) @@ -65,7 +65,7 @@ namespace OpenRA.Mods.RA PlayerResources = playerActor.Trait(); PlayerPower = playerActor.Trait(); - Race = self.Owner.Country.Race; + Race = self.Owner.Country.Race; Produceable = InitTech(playerActor); } @@ -75,26 +75,26 @@ namespace OpenRA.Mods.RA PlayerResources = newOwner.PlayerActor.Trait(); Queue.Clear(); - // Produceable contains the tech from the original owner - this is desired so we don't clear it. + // Produceable contains the tech from the original owner - this is desired so we don't clear it. Produceable = InitTech(self.Owner.PlayerActor); - } - - Dictionary InitTech(Actor playerActor) - { - var tech = new Dictionary(); - var ttc = playerActor.Trait(); - - foreach (var a in AllBuildables(Info.Type)) - { - var bi = a.Traits.Get(); - // Can our race build this by satisfying normal prereqs? - var buildable = bi.Owner.Contains(Race); - tech.Add(a, new ProductionState() { Visible = buildable && !bi.Hidden }); - if (buildable) - ttc.Add(a.Name, a.Traits.Get().Prerequisites.ToList(), this); - } - - return tech; + } + + Dictionary InitTech(Actor playerActor) + { + var tech = new Dictionary(); + var ttc = playerActor.Trait(); + + foreach (var a in AllBuildables(Info.Type)) + { + var bi = a.Traits.Get(); + // Can our race build this by satisfying normal prereqs? + var buildable = bi.Owner.Contains(Race); + tech.Add(a, new ProductionState() { Visible = buildable && !bi.Hidden }); + if (buildable) + ttc.Add(a.Name, a.Traits.Get().Prerequisites.ToList(), this); + } + + return tech; } IEnumerable AllBuildables(string category) diff --git a/OpenRA.Mods.RA/ProductionBar.cs b/OpenRA.Mods.RA/ProductionBar.cs index 10f1ae0dd0..8179113323 100644 --- a/OpenRA.Mods.RA/ProductionBar.cs +++ b/OpenRA.Mods.RA/ProductionBar.cs @@ -1,49 +1,49 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007-2011 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. For more information, * see COPYING. - */ -#endregion - -using System.Drawing; -using System.Linq; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - class ProductionBarInfo : ITraitInfo - { - public object Create(ActorInitializer init) { return new ProductionBar( init.self ); } - } - - class ProductionBar : ISelectionBar - { - Actor self; - public ProductionBar(Actor self) { this.self = self; } - - public float GetValue() - { - // only people we like should see our production status. - if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] != Stance.Ally) - return 0; - - var queue = self.TraitsImplementing().FirstOrDefault(q => q.CurrentItem() != null); - if (queue == null) - { - var produces = self.Trait().Info.Produces; - queue = self.Owner.PlayerActor.TraitsImplementing() - .FirstOrDefault(q => produces.Contains(q.Info.Type)); - } - - if (queue == null || queue.CurrentItem() == null) - return 0f; - - return 1 - (float)queue.CurrentItem().RemainingCost / queue.CurrentItem().TotalCost; - } - - public Color GetColor() { return Color.SkyBlue; } - } -} + */ +#endregion + +using System.Drawing; +using System.Linq; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + class ProductionBarInfo : ITraitInfo + { + public object Create(ActorInitializer init) { return new ProductionBar( init.self ); } + } + + class ProductionBar : ISelectionBar + { + Actor self; + public ProductionBar(Actor self) { this.self = self; } + + public float GetValue() + { + // only people we like should see our production status. + if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] != Stance.Ally) + return 0; + + var queue = self.TraitsImplementing().FirstOrDefault(q => q.CurrentItem() != null); + if (queue == null) + { + var produces = self.Trait().Info.Produces; + queue = self.Owner.PlayerActor.TraitsImplementing() + .FirstOrDefault(q => produces.Contains(q.Info.Type)); + } + + if (queue == null || queue.CurrentItem() == null) + return 0f; + + return 1 - (float)queue.CurrentItem().RemainingCost / queue.CurrentItem().TotalCost; + } + + public Color GetColor() { return Color.SkyBlue; } + } +} diff --git a/OpenRA.Mods.RA/Properties/AssemblyInfo.cs b/OpenRA.Mods.RA/Properties/AssemblyInfo.cs index db550e7faa..06774d9dcf 100644 --- a/OpenRA.Mods.RA/Properties/AssemblyInfo.cs +++ b/OpenRA.Mods.RA/Properties/AssemblyInfo.cs @@ -1,36 +1,46 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Mods.RA")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.Mods.RA")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("23828b43-3536-4681-bc2f-2eb2e0972354")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenRA.Mods.RA")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenRA.Mods.RA")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("23828b43-3536-4681-bc2f-2eb2e0972354")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Mods.RA/ProximityCapturable.cs b/OpenRA.Mods.RA/ProximityCapturable.cs index 31e8803c22..30fbc0b77d 100644 --- a/OpenRA.Mods.RA/ProximityCapturable.cs +++ b/OpenRA.Mods.RA/ProximityCapturable.cs @@ -1,206 +1,206 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007-2011 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. For more information, * see COPYING. - */ -#endregion - -using System.Linq; -using OpenRA.Effects; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - public class ProximityCapturableInfo : ITraitInfo - { - public readonly bool Permanent = false; - public readonly int Range = 5; - public readonly bool MustBeClear = false; - public readonly string[] CaptorTypes = {"Vehicle", "Tank", "Infantry"}; - - public object Create(ActorInitializer init) { return new ProximityCapturable(init.self, this); } - } - - public class ProximityCapturable : ITick, ISync - { - [Sync] - public Player Owner { get { return Captured ? Self.Owner : OriginalOwner; } } - - [Sync] - public readonly Player OriginalOwner; - - public ProximityCapturableInfo Info; - - [Sync] - public int Range; - - [Sync] - public bool Permanent; - - [Sync] - public bool Captured = false; - - [Sync] - public bool MustBeClear = false; - - public string[] CaptorTypes = {}; - - public Actor Self; - - public ProximityCapturable(Actor self, ProximityCapturableInfo info) - { - Info = info; - Range = info.Range; - Permanent = info.Permanent; - MustBeClear = info.MustBeClear; - Self = self; - OriginalOwner = self.Owner; - CaptorTypes = info.CaptorTypes; - } - - public void Tick(Actor self) - { - if (Captured && Permanent) return; // Permanent capture - - //var playersNear = CountPlayersNear(self, OriginalOwner, Range); - - if (!Captured) - { - var captor = GetInRange(self, OriginalOwner, Range, CaptorTypes); - - if (captor != null) - { - if (MustBeClear && !IsClear(self, captor.Owner, Range, OriginalOwner, CaptorTypes)) return; - - ChangeOwnership(self, captor, OriginalOwner); - } - - return; - } - - // if the area must be clear, and there is more than 1 player nearby => return ownership to default - if (MustBeClear && !IsClear(self, Owner, Range, OriginalOwner, CaptorTypes)) - { - // Revert Ownership - ChangeOwnership(self, Owner, OriginalOwner); - return; - } - - // See if the 'temporary' owner still is in range - if (!IsStillInRange(self, self.Owner, Range, CaptorTypes)) - { - // no.. So find a new one - var captor = GetInRange(self, OriginalOwner, Range, CaptorTypes); - - if (captor != null) // got one - { - ChangeOwnership(self, captor, Owner); - return; - } - - // Revert Ownership otherwise - ChangeOwnership(self, Owner, OriginalOwner); - } - } - - private void ChangeOwnership(Actor self, Player previousOwner, Player originalOwner) - { - self.World.AddFrameEndTask(w => - { - if (self.Destroyed) return; - - // momentarily remove from world so the ownership queries don't get confused - w.Remove(self); - self.Owner = originalOwner; - w.Add(self); - - if (self.Owner == self.World.LocalPlayer) - w.Add(new FlashTarget(self)); - - Captured = false; - - foreach (var t in self.TraitsImplementing()) - t.OnCapture(self, self, previousOwner, self.Owner); - }); - } - - private void ChangeOwnership(Actor self, Actor captor, Player previousOwner) - { - self.World.AddFrameEndTask(w => - { - if (self.Destroyed || (captor.Destroyed || !captor.IsInWorld)) return; - - // momentarily remove from world so the ownership queries don't get confused - w.Remove(self); - self.Owner = captor.Owner; - w.Add(self); - - if (self.Owner == self.World.LocalPlayer) - w.Add(new FlashTarget(self)); - - Captured = true; - - foreach (var t in self.TraitsImplementing()) - t.OnCapture(self, captor, previousOwner, self.Owner); - }); - } - - static bool AreMutualAllies(Player a, Player b) - { - return a.Stances[b] == Stance.Ally && - b.Stances[a] == Stance.Ally; - } - - public static bool IsClear(Actor self, Player currentOwner, int range, Player originalOwner, string[] actorTypes) - { - var unitsInRange = self.World.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range); + */ +#endregion - return unitsInRange.Where(a => !a.Destroyed && a.IsInWorld && a != self && !a.Owner.NonCombatant && a.Owner != originalOwner) - .Where(a => a.Owner != currentOwner) - .Where(a => actorTypes.Length == 0 || (a.HasTrait() && a.Trait().HasAny(actorTypes))) +using System.Linq; +using OpenRA.Effects; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + public class ProximityCapturableInfo : ITraitInfo + { + public readonly bool Permanent = false; + public readonly int Range = 5; + public readonly bool MustBeClear = false; + public readonly string[] CaptorTypes = {"Vehicle", "Tank", "Infantry"}; + + public object Create(ActorInitializer init) { return new ProximityCapturable(init.self, this); } + } + + public class ProximityCapturable : ITick, ISync + { + [Sync] + public Player Owner { get { return Captured ? Self.Owner : OriginalOwner; } } + + [Sync] + public readonly Player OriginalOwner; + + public ProximityCapturableInfo Info; + + [Sync] + public int Range; + + [Sync] + public bool Permanent; + + [Sync] + public bool Captured = false; + + [Sync] + public bool MustBeClear = false; + + public string[] CaptorTypes = {}; + + public Actor Self; + + public ProximityCapturable(Actor self, ProximityCapturableInfo info) + { + Info = info; + Range = info.Range; + Permanent = info.Permanent; + MustBeClear = info.MustBeClear; + Self = self; + OriginalOwner = self.Owner; + CaptorTypes = info.CaptorTypes; + } + + public void Tick(Actor self) + { + if (Captured && Permanent) return; // Permanent capture + + //var playersNear = CountPlayersNear(self, OriginalOwner, Range); + + if (!Captured) + { + var captor = GetInRange(self, OriginalOwner, Range, CaptorTypes); + + if (captor != null) + { + if (MustBeClear && !IsClear(self, captor.Owner, Range, OriginalOwner, CaptorTypes)) return; + + ChangeOwnership(self, captor, OriginalOwner); + } + + return; + } + + // if the area must be clear, and there is more than 1 player nearby => return ownership to default + if (MustBeClear && !IsClear(self, Owner, Range, OriginalOwner, CaptorTypes)) + { + // Revert Ownership + ChangeOwnership(self, Owner, OriginalOwner); + return; + } + + // See if the 'temporary' owner still is in range + if (!IsStillInRange(self, self.Owner, Range, CaptorTypes)) + { + // no.. So find a new one + var captor = GetInRange(self, OriginalOwner, Range, CaptorTypes); + + if (captor != null) // got one + { + ChangeOwnership(self, captor, Owner); + return; + } + + // Revert Ownership otherwise + ChangeOwnership(self, Owner, OriginalOwner); + } + } + + private void ChangeOwnership(Actor self, Player previousOwner, Player originalOwner) + { + self.World.AddFrameEndTask(w => + { + if (self.Destroyed) return; + + // momentarily remove from world so the ownership queries don't get confused + w.Remove(self); + self.Owner = originalOwner; + w.Add(self); + + if (self.Owner == self.World.LocalPlayer) + w.Add(new FlashTarget(self)); + + Captured = false; + + foreach (var t in self.TraitsImplementing()) + t.OnCapture(self, self, previousOwner, self.Owner); + }); + } + + private void ChangeOwnership(Actor self, Actor captor, Player previousOwner) + { + self.World.AddFrameEndTask(w => + { + if (self.Destroyed || (captor.Destroyed || !captor.IsInWorld)) return; + + // momentarily remove from world so the ownership queries don't get confused + w.Remove(self); + self.Owner = captor.Owner; + w.Add(self); + + if (self.Owner == self.World.LocalPlayer) + w.Add(new FlashTarget(self)); + + Captured = true; + + foreach (var t in self.TraitsImplementing()) + t.OnCapture(self, captor, previousOwner, self.Owner); + }); + } + + static bool AreMutualAllies(Player a, Player b) + { + return a.Stances[b] == Stance.Ally && + b.Stances[a] == Stance.Ally; + } + + public static bool IsClear(Actor self, Player currentOwner, int range, Player originalOwner, string[] actorTypes) + { + var unitsInRange = self.World.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range); + + return unitsInRange.Where(a => !a.Destroyed && a.IsInWorld && a != self && !a.Owner.NonCombatant && a.Owner != originalOwner) + .Where(a => a.Owner != currentOwner) + .Where(a => actorTypes.Length == 0 || (a.HasTrait() && a.Trait().HasAny(actorTypes))) .All(a => AreMutualAllies(a.Owner, currentOwner)); - } - - // TODO exclude other NeutralActor that arent permanent - public static bool IsStillInRange(Actor self, Player currentOwner, int range, string[] actorTypes) - { - var unitsInRange = self.World.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range); - - return unitsInRange - .Where(a => a.Owner == currentOwner && !a.Destroyed && a.IsInWorld && a != self) - .Where(a => actorTypes.Length == 0 || (a.HasTrait() && a.Trait().HasAny(actorTypes))) - .Any(); - } - - // TODO exclude other NeutralActor that arent permanent - public static Actor GetInRange(Actor self, Player originalOwner, int range, string[] actorTypes) - { - var unitsInRange = self.World.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range); - - return unitsInRange - .Where(a => a.Owner != originalOwner && !a.Destroyed && a.IsInWorld && a != self) - .Where(a => !a.Owner.PlayerRef.OwnsWorld) - .Where(a => !a.Owner.PlayerRef.NonCombatant) - .Where(a => actorTypes.Length == 0 || (a.HasTrait() && a.Trait().HasAny(actorTypes))) - .OrderBy(a => (a.CenterLocation - self.CenterLocation).LengthSquared) - .FirstOrDefault(); - } - - public static int CountPlayersNear(Actor self, Player ignoreMe, int range, string[] actorTypes) - { - var unitsInRange = self.World.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range); - - return unitsInRange - .Where(a => a.Owner != ignoreMe && !a.Destroyed && a.IsInWorld && a != self) - .Where(a => !a.Owner.PlayerRef.OwnsWorld) - .Where(a => !a.Owner.PlayerRef.NonCombatant) - .Where(a =>actorTypes.Length == 0 || ( a.HasTrait() && a.Trait().HasAny(actorTypes))) - .Select(a => a.Owner) - .Distinct() - .Count(); - } - } -} + } + + // TODO exclude other NeutralActor that arent permanent + public static bool IsStillInRange(Actor self, Player currentOwner, int range, string[] actorTypes) + { + var unitsInRange = self.World.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range); + + return unitsInRange + .Where(a => a.Owner == currentOwner && !a.Destroyed && a.IsInWorld && a != self) + .Where(a => actorTypes.Length == 0 || (a.HasTrait() && a.Trait().HasAny(actorTypes))) + .Any(); + } + + // TODO exclude other NeutralActor that arent permanent + public static Actor GetInRange(Actor self, Player originalOwner, int range, string[] actorTypes) + { + var unitsInRange = self.World.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range); + + return unitsInRange + .Where(a => a.Owner != originalOwner && !a.Destroyed && a.IsInWorld && a != self) + .Where(a => !a.Owner.PlayerRef.OwnsWorld) + .Where(a => !a.Owner.PlayerRef.NonCombatant) + .Where(a => actorTypes.Length == 0 || (a.HasTrait() && a.Trait().HasAny(actorTypes))) + .OrderBy(a => (a.CenterLocation - self.CenterLocation).LengthSquared) + .FirstOrDefault(); + } + + public static int CountPlayersNear(Actor self, Player ignoreMe, int range, string[] actorTypes) + { + var unitsInRange = self.World.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range); + + return unitsInRange + .Where(a => a.Owner != ignoreMe && !a.Destroyed && a.IsInWorld && a != self) + .Where(a => !a.Owner.PlayerRef.OwnsWorld) + .Where(a => !a.Owner.PlayerRef.NonCombatant) + .Where(a =>actorTypes.Length == 0 || ( a.HasTrait() && a.Trait().HasAny(actorTypes))) + .Select(a => a.Owner) + .Distinct() + .Count(); + } + } +} diff --git a/OpenRA.Mods.RA/Render/RenderEditorOnly.cs b/OpenRA.Mods.RA/Render/RenderEditorOnly.cs index 252335e095..70d820b1b0 100644 --- a/OpenRA.Mods.RA/Render/RenderEditorOnly.cs +++ b/OpenRA.Mods.RA/Render/RenderEditorOnly.cs @@ -1,28 +1,28 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007-2011 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. For more information, * see COPYING. - */ -#endregion - -using System.Collections.Generic; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA.Render -{ - class RenderEditorOnlyInfo : RenderSimpleInfo - { - public override object Create(ActorInitializer init) { return new RenderEditorOnly(init.self); } - } - - class RenderEditorOnly : RenderSimple - { - public RenderEditorOnly(Actor self) : base(self, () => 0) { } - - static readonly Renderable[] Nothing = { }; - public override IEnumerable Render(Actor self) { return Nothing; } - } -} + */ +#endregion + +using System.Collections.Generic; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA.Render +{ + class RenderEditorOnlyInfo : RenderSimpleInfo + { + public override object Create(ActorInitializer init) { return new RenderEditorOnly(init.self); } + } + + class RenderEditorOnly : RenderSimple + { + public RenderEditorOnly(Actor self) : base(self, () => 0) { } + + static readonly Renderable[] Nothing = { }; + public override IEnumerable Render(Actor self) { return Nothing; } + } +} diff --git a/OpenRA.Mods.RA/RenderRangeCircle.cs b/OpenRA.Mods.RA/RenderRangeCircle.cs index c5e81922fd..cca5e7ae85 100644 --- a/OpenRA.Mods.RA/RenderRangeCircle.cs +++ b/OpenRA.Mods.RA/RenderRangeCircle.cs @@ -8,7 +8,7 @@ */ #endregion -using System.Drawing; +using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Reservable.cs b/OpenRA.Mods.RA/Reservable.cs index 56db199610..31cd57dcbd 100755 --- a/OpenRA.Mods.RA/Reservable.cs +++ b/OpenRA.Mods.RA/Reservable.cs @@ -33,8 +33,8 @@ namespace OpenRA.Mods.RA public IDisposable Reserve(Actor self, Actor forActor, Aircraft derp) { reservedFor = forActor; - herp = derp; - + herp = derp; + // NOTE: we really dont care about the GC eating DisposableActions that apply to a world *other* than // the one we're playing in. diff --git a/OpenRA.Mods.RA/SpawnMapActors.cs b/OpenRA.Mods.RA/SpawnMapActors.cs index 5f32dbeeee..ba9fc6e655 100644 --- a/OpenRA.Mods.RA/SpawnMapActors.cs +++ b/OpenRA.Mods.RA/SpawnMapActors.cs @@ -8,7 +8,7 @@ */ #endregion -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using OpenRA.Traits; @@ -23,10 +23,10 @@ namespace OpenRA.Mods.RA public void WorldLoaded(World world) { foreach (var actorReference in world.Map.Actors.Value) - { - // if there is no real player associated, dont spawn it. - var ownerName = actorReference.Value.InitDict.Get().PlayerName; - if (!world.players.Values.Any(p => p.InternalName == ownerName)) + { + // if there is no real player associated, dont spawn it. + var ownerName = actorReference.Value.InitDict.Get().PlayerName; + if (!world.players.Values.Any(p => p.InternalName == ownerName)) continue; var initDict = actorReference.Value.InitDict; diff --git a/OpenRA.Mods.RA/Spy.cs b/OpenRA.Mods.RA/Spy.cs index 899954938b..de377cee35 100644 --- a/OpenRA.Mods.RA/Spy.cs +++ b/OpenRA.Mods.RA/Spy.cs @@ -132,16 +132,16 @@ namespace OpenRA.Mods.RA public string VoicePhraseForOrder(Actor self, Order order) { return order.OrderString == "Disguise" ? "Attack" : null; - } - - public Color RadarColorOverride(Actor self) - { - if (!Disguised || self.World.LocalPlayer == null || - self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally) - return self.Owner.ColorRamp.GetColor(0); - - return disguisedAsPlayer.ColorRamp.GetColor(0); - } + } + + public Color RadarColorOverride(Actor self) + { + if (!Disguised || self.World.LocalPlayer == null || + self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally) + return self.Owner.ColorRamp.GetColor(0); + + return disguisedAsPlayer.ColorRamp.GetColor(0); + } } class IgnoresDisguiseInfo : TraitInfo {} diff --git a/OpenRA.Mods.RA/Strategic/StrategicPoint.cs b/OpenRA.Mods.RA/Strategic/StrategicPoint.cs index 37b4a47acb..9cf6d16c9d 100644 --- a/OpenRA.Mods.RA/Strategic/StrategicPoint.cs +++ b/OpenRA.Mods.RA/Strategic/StrategicPoint.cs @@ -1,46 +1,56 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - public class StrategicPointInfo : ITraitInfo - { - public readonly bool Critical = false; - - public object Create(ActorInitializer init) { return new StrategicPoint(init.self, this); } - } - - public class StrategicPoint : INotifyCapture, ITick, ISync - { - [Sync] public Actor Self; - [Sync] public bool Critical; - [Sync] public Player OriginalOwner; - [Sync] public int TicksOwned = 0; - - public StrategicPointInfo Info; - - public StrategicPoint(Actor self, StrategicPointInfo info) - { - Self = self; - Info = info; - OriginalOwner = self.Owner; - - Critical = info.Critical; - } - - public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner) - { - TicksOwned = 0; - } - - public void Tick(Actor self) - { - if (OriginalOwner == self.Owner || self.Owner.WinState != WinState.Undefined) return; - - TicksOwned++; - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + public class StrategicPointInfo : ITraitInfo + { + public readonly bool Critical = false; + + public object Create(ActorInitializer init) { return new StrategicPoint(init.self, this); } + } + + public class StrategicPoint : INotifyCapture, ITick, ISync + { + [Sync] public Actor Self; + [Sync] public bool Critical; + [Sync] public Player OriginalOwner; + [Sync] public int TicksOwned = 0; + + public StrategicPointInfo Info; + + public StrategicPoint(Actor self, StrategicPointInfo info) + { + Self = self; + Info = info; + OriginalOwner = self.Owner; + + Critical = info.Critical; + } + + public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner) + { + TicksOwned = 0; + } + + public void Tick(Actor self) + { + if (OriginalOwner == self.Owner || self.Owner.WinState != WinState.Undefined) return; + + TicksOwned++; + } + } +} diff --git a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs index bbd276f943..babbca5886 100755 --- a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs +++ b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs @@ -10,7 +10,7 @@ using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Air; +using OpenRA.Mods.RA.Air; using OpenRA.Traits; namespace OpenRA.Mods.RA @@ -20,8 +20,8 @@ namespace OpenRA.Mods.RA [ActorReference] public readonly string UnitType = "badr.bomber"; [ActorReference] - public readonly string FlareType = null; - + public readonly string FlareType = null; + public readonly int FlareTime = 25 * 60 * 2; // 2 minutes public override object Create(ActorInitializer init) { return new AirstrikePower(init.self, this); } @@ -40,12 +40,12 @@ namespace OpenRA.Mods.RA { new LocationInit( order.TargetLocation ), new OwnerInit( self.Owner ), - }) : null; - - if (flare != null) - { - flare.QueueActivity(new Wait(info.FlareTime)); - flare.QueueActivity(new RemoveSelf()); + }) : null; + + if (flare != null) + { + flare.QueueActivity(new Wait(info.FlareTime)); + flare.QueueActivity(new RemoveSelf()); } var a = w.CreateActor(info.UnitType, new TypeDictionary diff --git a/OpenRA.Mods.RA/SupportPowers/GpsPower.cs b/OpenRA.Mods.RA/SupportPowers/GpsPower.cs index 397e04b184..95308724be 100755 --- a/OpenRA.Mods.RA/SupportPowers/GpsPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/GpsPower.cs @@ -46,40 +46,40 @@ namespace OpenRA.Mods.RA w.Add(new DelayedAction((Info as GpsPowerInfo).RevealDelay * 25, () => { Granted = true; RefreshGps(self); })); }); - } - - public void Selling(Actor self) - { - DisableGps(); - } - + } + + public void Selling(Actor self) + { + DisableGps(); + } + public void Sold(Actor self) { } public void Damaged(Actor self, AttackInfo e) { if (e.DamageState == DamageState.Dead) - { + { DisableGps(); } - } - - void DisableGps() - { - Granted = false; - RefreshGps(self); + } + + void DisableGps() + { + Granted = false; + RefreshGps(self); } void RefreshGps(Actor self) - { - if (self.World.LocalPlayer != null) - self.World.LocalShroud.Disabled = self.World.ActorsWithTrait() - .Any(p => p.Actor.Owner.Stances[self.World.LocalPlayer] == Stance.Ally && - p.Trait.Granted); - } - - public void StanceChanged(Actor self, Player a, Player b, Stance oldStance, Stance newStance) - { - RefreshGps(self); - } + { + if (self.World.LocalPlayer != null) + self.World.LocalShroud.Disabled = self.World.ActorsWithTrait() + .Any(p => p.Actor.Owner.Stances[self.World.LocalPlayer] == Stance.Ally && + p.Trait.Granted); + } + + public void StanceChanged(Actor self, Player a, Player b, Stance oldStance, Stance newStance) + { + RefreshGps(self); + } } } diff --git a/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs b/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs index da91faca07..d0bf1cbac3 100755 --- a/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs @@ -6,11 +6,11 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using OpenRA.FileFormats; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Air; +#endregion + +using OpenRA.FileFormats; +using OpenRA.Mods.RA.Activities; +using OpenRA.Mods.RA.Air; using OpenRA.Traits; namespace OpenRA.Mods.RA @@ -22,8 +22,8 @@ namespace OpenRA.Mods.RA [ActorReference] public string UnitType = "badr"; [ActorReference] - public string FlareType = "flare"; - + public string FlareType = "flare"; + public readonly int FlareTime = 25 * 60 * 2; // 2 minutes public override object Create(ActorInitializer init) { return new ParatroopersPower(init.self, this); } @@ -45,12 +45,12 @@ namespace OpenRA.Mods.RA { new LocationInit( order.TargetLocation ), new OwnerInit( self.Owner ), - }) : null; - - if (flare != null) - { - flare.QueueActivity(new Wait(info.FlareTime)); - flare.QueueActivity(new RemoveSelf()); + }) : null; + + if (flare != null) + { + flare.QueueActivity(new Wait(info.FlareTime)); + flare.QueueActivity(new RemoveSelf()); } var a = w.CreateActor(info.UnitType, new TypeDictionary diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPowerChargeBar.cs b/OpenRA.Mods.RA/SupportPowers/SupportPowerChargeBar.cs index 073c0e11e6..c20c3b5e60 100644 --- a/OpenRA.Mods.RA/SupportPowers/SupportPowerChargeBar.cs +++ b/OpenRA.Mods.RA/SupportPowers/SupportPowerChargeBar.cs @@ -1,43 +1,43 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007-2011 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. For more information, * see COPYING. - */ -#endregion - -using System.Drawing; -using System.Linq; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - class SupportPowerChargeBarInfo : ITraitInfo - { - public object Create(ActorInitializer init) { return new SupportPowerChargeBar(init.self); } - } - - class SupportPowerChargeBar : ISelectionBar - { - Actor self; - public SupportPowerChargeBar(Actor self) { this.self = self; } - - public float GetValue() - { - // only people we like should see our charge status. - if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] != Stance.Ally) - return 0; - - var spm = self.Owner.PlayerActor.Trait(); - var power = spm.GetPowersForActor(self).FirstOrDefault(sp => !sp.Disabled); - - if (power == null) return 0; - - return 1 - (float)power.RemainingTime / power.TotalTime; - } - - public Color GetColor() { return Color.Magenta; } - } -} + */ +#endregion + +using System.Drawing; +using System.Linq; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + class SupportPowerChargeBarInfo : ITraitInfo + { + public object Create(ActorInitializer init) { return new SupportPowerChargeBar(init.self); } + } + + class SupportPowerChargeBar : ISelectionBar + { + Actor self; + public SupportPowerChargeBar(Actor self) { this.self = self; } + + public float GetValue() + { + // only people we like should see our charge status. + if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] != Stance.Ally) + return 0; + + var spm = self.Owner.PlayerActor.Trait(); + var power = spm.GetPowersForActor(self).FirstOrDefault(sp => !sp.Disabled); + + if (power == null) return 0; + + return 1 - (float)power.RemainingTime / power.TotalTime; + } + + public Color GetColor() { return Color.Magenta; } + } +} diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs index 832e4eba73..ba8bc688ef 100755 --- a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs @@ -34,11 +34,11 @@ namespace OpenRA.Mods.RA init.world.ActorAdded += ActorAdded; init.world.ActorRemoved += ActorRemoved; - } - - static string MakeKey(SupportPower sp) - { - return sp.Info.AllowMultiple ? sp.Info.OrderName + "_" + sp.self.ActorID : sp.Info.OrderName; + } + + static string MakeKey(SupportPower sp) + { + return sp.Info.AllowMultiple ? sp.Info.OrderName + "_" + sp.self.ActorID : sp.Info.OrderName; } void ActorAdded(Actor a) @@ -47,7 +47,7 @@ namespace OpenRA.Mods.RA return; foreach (var t in a.TraitsImplementing()) - { + { var key = MakeKey(t); if (Powers.ContainsKey(key)) @@ -74,7 +74,7 @@ namespace OpenRA.Mods.RA return; foreach (var t in a.TraitsImplementing()) - { + { var key = MakeKey(t); Powers[key].Instances.Remove(t); if (Powers[key].Instances.Count == 0 && !Powers[key].Disabled) @@ -99,17 +99,17 @@ namespace OpenRA.Mods.RA { if (Powers.ContainsKey(key)) Powers[key].Target(); - } - - static readonly SupportPowerInstance[] NoInstances = {}; - - public IEnumerable GetPowersForActor(Actor a) - { - if (a.Owner != self.Owner || !a.HasTrait()) - return NoInstances; - - return a.TraitsImplementing() - .Select(t => Powers[MakeKey(t)]); + } + + static readonly SupportPowerInstance[] NoInstances = {}; + + public IEnumerable GetPowersForActor(Actor a) + { + if (a.Owner != self.Owner || !a.HasTrait()) + return NoInstances; + + return a.TraitsImplementing() + .Select(t => Powers[MakeKey(t)]); } public class SupportPowerInstance diff --git a/OpenRA.Mods.RA/WaterPaletteRotation.cs b/OpenRA.Mods.RA/WaterPaletteRotation.cs index 47043892bd..4917bde189 100644 --- a/OpenRA.Mods.RA/WaterPaletteRotation.cs +++ b/OpenRA.Mods.RA/WaterPaletteRotation.cs @@ -6,11 +6,11 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System.Collections.Generic; -using System.Linq; -using OpenRA.FileFormats; +#endregion + +using System.Collections.Generic; +using System.Linq; +using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA @@ -22,9 +22,9 @@ namespace OpenRA.Mods.RA public void Tick(Actor self) { t += .25f; - } - - static string[] excludePalettes = { "cursor", "chrome", "colorpicker" }; + } + + static string[] excludePalettes = { "cursor", "chrome", "colorpicker" }; static uint[] temp = new uint[7]; public void AdjustPalette(Dictionary palettes) @@ -32,15 +32,15 @@ namespace OpenRA.Mods.RA foreach (var pal in palettes) { if (excludePalettes.Contains(pal.Key)) - continue; - + continue; + var colors = pal.Value.Values; var rotate = (int)t % 7; - for (var i = 0; i < 7; i++) - temp[(rotate + i) % 7] = colors[0x60 + i]; - - for (var i = 0; i < 7; i++) + for (var i = 0; i < 7; i++) + temp[(rotate + i) % 7] = colors[0x60 + i]; + + for (var i = 0; i < 7; i++) pal.Value.SetColor(0x60 + i, temp[i]); } } diff --git a/OpenRA.Mods.RA/Widgets/Delegates/ConnectionDialogsDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/ConnectionDialogsDelegate.cs index bce395508a..f6efcebea3 100644 --- a/OpenRA.Mods.RA/Widgets/Delegates/ConnectionDialogsDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/ConnectionDialogsDelegate.cs @@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates widget.GetWidget("CONNECTING_DESC").GetText = () => "Connecting to {0}:{1}...".F(host, port); - } + } } public class ConnectionFailedDelegate : IWidgetDelegate diff --git a/OpenRA.Mods.RA/Widgets/Delegates/DeveloperModeDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/DeveloperModeDelegate.cs index 6c62aade38..c786f88745 100644 --- a/OpenRA.Mods.RA/Widgets/Delegates/DeveloperModeDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/DeveloperModeDelegate.cs @@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates { [ObjectCreator.UseCtor] public DeveloperModeDelegate( [ObjectCreator.Param] World world ) - { + { var devmodeBG = Widget.RootWidget.GetWidget("INGAME_ROOT").GetWidget("DEVELOPERMODE_BG"); var devModeButton = Widget.RootWidget.GetWidget("INGAME_DEVELOPERMODE_BUTTON"); @@ -65,15 +65,15 @@ namespace OpenRA.Mods.RA.Widgets.Delegates devmodeBG.GetWidget("ENABLE_TECH").OnChange += _ => Order(world, "DevEnableTech"); devmodeBG.GetWidget("UNLIMITED_POWER").BindReadOnly(devTrait, "UnlimitedPower"); - devmodeBG.GetWidget("UNLIMITED_POWER").OnChange += _ => Order(world, "DevUnlimitedPower"); - - devmodeBG.GetWidget("BUILD_ANYWHERE").BindReadOnly(devTrait, "BuildAnywhere"); + devmodeBG.GetWidget("UNLIMITED_POWER").OnChange += _ => Order(world, "DevUnlimitedPower"); + + devmodeBG.GetWidget("BUILD_ANYWHERE").BindReadOnly(devTrait, "BuildAnywhere"); devmodeBG.GetWidget("BUILD_ANYWHERE").OnChange += _ => Order(world, "DevBuildAnywhere"); - - devmodeBG.GetWidget("GIVE_EXPLORATION").OnMouseUp = mi => - { - world.IssueOrder(new Order("DevGiveExploration", world.LocalPlayer.PlayerActor, false)); - return true; + + devmodeBG.GetWidget("GIVE_EXPLORATION").OnMouseUp = mi => + { + world.IssueOrder(new Order("DevGiveExploration", world.LocalPlayer.PlayerActor, false)); + return true; }; devModeButton.IsVisible = () => { return world.LobbyInfo.GlobalSettings.AllowCheats; }; diff --git a/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs index 20a4338e1b..9412d63e86 100755 --- a/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs @@ -31,44 +31,44 @@ namespace OpenRA.Mods.RA.Widgets.Delegates public GameInitDelegate([ObjectCreator.Param] Widget widget) { Info = (widget as GameInitInfoWidget); - } - - public void Init() - { - Game.ConnectionStateChanged += orderManager => - { - Widget.CloseWindow(); - switch (orderManager.Connection.ConnectionState) - { - case ConnectionState.PreConnecting: - Widget.OpenWindow("MAINMENU_BG"); - break; - case ConnectionState.Connecting: - Widget.OpenWindow("CONNECTING_BG", - new Dictionary { { "host", orderManager.Host }, { "port", orderManager.Port } }); - break; - case ConnectionState.NotConnected: - Widget.OpenWindow("CONNECTION_FAILED_BG", - new Dictionary { { "orderManager", orderManager } }); - break; - case ConnectionState.Connected: - var lobby = Game.OpenWindow(orderManager.world, "SERVER_LOBBY"); - lobby.GetWidget("CHAT_DISPLAY").ClearChat(); - lobby.GetWidget("CHANGEMAP_BUTTON").Visible = true; - lobby.GetWidget("LOCKTEAMS_CHECKBOX").Visible = true; - lobby.GetWidget("ALLOWCHEATS_CHECKBOX").Visible = true; - lobby.GetWidget("DISCONNECT_BUTTON").Visible = true; - break; - } - }; - - if (FileSystem.Exists(Info.TestFile)) - ContinueLoading(); - else - { - MainMenuButtonsDelegate.DisplayModSelector(); - ShowInstallMethodDialog(); - } + } + + public void Init() + { + Game.ConnectionStateChanged += orderManager => + { + Widget.CloseWindow(); + switch (orderManager.Connection.ConnectionState) + { + case ConnectionState.PreConnecting: + Widget.OpenWindow("MAINMENU_BG"); + break; + case ConnectionState.Connecting: + Widget.OpenWindow("CONNECTING_BG", + new Dictionary { { "host", orderManager.Host }, { "port", orderManager.Port } }); + break; + case ConnectionState.NotConnected: + Widget.OpenWindow("CONNECTION_FAILED_BG", + new Dictionary { { "orderManager", orderManager } }); + break; + case ConnectionState.Connected: + var lobby = Game.OpenWindow(orderManager.world, "SERVER_LOBBY"); + lobby.GetWidget("CHAT_DISPLAY").ClearChat(); + lobby.GetWidget("CHANGEMAP_BUTTON").Visible = true; + lobby.GetWidget("LOCKTEAMS_CHECKBOX").Visible = true; + lobby.GetWidget("ALLOWCHEATS_CHECKBOX").Visible = true; + lobby.GetWidget("DISCONNECT_BUTTON").Visible = true; + break; + } + }; + + if (FileSystem.Exists(Info.TestFile)) + ContinueLoading(); + else + { + MainMenuButtonsDelegate.DisplayModSelector(); + ShowInstallMethodDialog(); + } } void ShowInstallMethodDialog() @@ -116,8 +116,8 @@ namespace OpenRA.Mods.RA.Widgets.Delegates }; Action onComplete = () => - { - if (!error) + { + if (!error) Game.RunAfterTick(ContinueLoading); }; @@ -221,6 +221,6 @@ namespace OpenRA.Mods.RA.Widgets.Delegates wc.CancelAsync(); cancelled = true; } - } + } } } diff --git a/OpenRA.Mods.RA/Widgets/Delegates/LobbyDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/LobbyDelegate.cs index d5f14001d4..5a467474e7 100755 --- a/OpenRA.Mods.RA/Widgets/Delegates/LobbyDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/LobbyDelegate.cs @@ -112,15 +112,15 @@ namespace OpenRA.Mods.RA.Widgets.Delegates if (Game.IsHost) orderManager.IssueOrder(Order.Command( "lockteams {0}".F(!orderManager.LobbyInfo.GlobalSettings.LockTeams))); - }; - - var allowCheats = lobby.GetWidget("ALLOWCHEATS_CHECKBOX"); - allowCheats.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.AllowCheats; - allowCheats.OnChange += _ => - { - if (Game.IsHost) - orderManager.IssueOrder(Order.Command( - "allowcheats {0}".F(!orderManager.LobbyInfo.GlobalSettings.AllowCheats))); + }; + + var allowCheats = lobby.GetWidget("ALLOWCHEATS_CHECKBOX"); + allowCheats.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.AllowCheats; + allowCheats.OnChange += _ => + { + if (Game.IsHost) + orderManager.IssueOrder(Order.Command( + "allowcheats {0}".F(!orderManager.LobbyInfo.GlobalSettings.AllowCheats))); }; var startGameButton = lobby.GetWidget("START_GAME_BUTTON"); diff --git a/OpenRA.Mods.RA/Widgets/Delegates/ServerBrowserDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/ServerBrowserDelegate.cs index 269c37a13a..a60bb9bd25 100644 --- a/OpenRA.Mods.RA/Widgets/Delegates/ServerBrowserDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/ServerBrowserDelegate.cs @@ -8,7 +8,7 @@ */ #endregion -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using OpenRA.FileFormats; using OpenRA.Server; @@ -185,25 +185,25 @@ namespace OpenRA.Mods.RA.Widgets.Delegates { var dc = widget.GetWidget("DIRECTCONNECT_BG"); - dc.GetWidget("SERVER_ADDRESS").Text = Game.Settings.Player.LastServer; - - dc.GetWidget("JOIN_BUTTON").OnMouseUp = mi => - { - var address = dc.GetWidget("SERVER_ADDRESS").Text; - var cpts = address.Split(':').ToArray(); - if (cpts.Length < 1 || cpts.Length > 2) - return true; - - int port; - if (cpts.Length != 2 || !int.TryParse(cpts[1], out port)) - port = 1234; - - Game.Settings.Player.LastServer = address; - Game.Settings.Save(); - - Widget.CloseWindow(); - Game.JoinServer(cpts[0], port); - return true; + dc.GetWidget("SERVER_ADDRESS").Text = Game.Settings.Player.LastServer; + + dc.GetWidget("JOIN_BUTTON").OnMouseUp = mi => + { + var address = dc.GetWidget("SERVER_ADDRESS").Text; + var cpts = address.Split(':').ToArray(); + if (cpts.Length < 1 || cpts.Length > 2) + return true; + + int port; + if (cpts.Length != 2 || !int.TryParse(cpts[1], out port)) + port = 1234; + + Game.Settings.Player.LastServer = address; + Game.Settings.Save(); + + Widget.CloseWindow(); + Game.JoinServer(cpts[0], port); + return true; }; dc.GetWidget("CANCEL_BUTTON").OnMouseUp = mi => diff --git a/OpenRA.Mods.RA/Widgets/RadarBinWidget.cs b/OpenRA.Mods.RA/Widgets/RadarBinWidget.cs index 4937032f60..36dabc104f 100755 --- a/OpenRA.Mods.RA/Widgets/RadarBinWidget.cs +++ b/OpenRA.Mods.RA/Widgets/RadarBinWidget.cs @@ -164,9 +164,9 @@ namespace OpenRA.Mods.RA.Widgets int updateTicks = 0; public override void Tick() - { - var hasRadarNew = world - .ActorsWithTrait() + { + var hasRadarNew = world + .ActorsWithTrait() .Any(a => a.Actor.Owner == world.LocalPlayer && a.Trait.IsActive); if (hasRadarNew != hasRadar) diff --git a/OpenRA.Mods.RA/Widgets/StrategicProgressWidget.cs b/OpenRA.Mods.RA/Widgets/StrategicProgressWidget.cs index 37ba6817f0..573a4d4434 100644 --- a/OpenRA.Mods.RA/Widgets/StrategicProgressWidget.cs +++ b/OpenRA.Mods.RA/Widgets/StrategicProgressWidget.cs @@ -1,123 +1,133 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using OpenRA.Graphics; -using OpenRA.Traits; -using OpenRA.Widgets; - -namespace OpenRA.Mods.RA.Widgets -{ - public class StrategicProgressWidget : Widget - { - bool Initialised = false; - readonly World world; - readonly WorldRenderer worldRenderer; - [ObjectCreator.UseCtor] - public StrategicProgressWidget([ObjectCreator.Param] World world, [ObjectCreator.Param] WorldRenderer worldRenderer) - { - IsVisible = () => true; - this.world = world; - this.worldRenderer = worldRenderer; - } - - public override void DrawInner() - { - if (!Initialised) - Init(); - - if (!IsVisible()) return; - int2 offset = int2.Zero; - - var svc = world.players.Select(p => p.Value.PlayerActor.TraitOrDefault()).FirstOrDefault(); - - var totalWidth = (svc.Total + svc.TotalCritical)*32; - int curX = -(totalWidth / 2); - - foreach (var a in world.Actors.Where(a => !a.Destroyed && a.HasTrait() && !a.TraitOrDefault().Critical)) - { - WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "unowned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); - - if (a.Owner == worldRenderer.world.LocalPlayer || (a.Owner.Stances[world.LocalPlayer] == Stance.Ally && world.LocalPlayer.Stances[a.Owner] == Stance.Ally)) - WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "player_owned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); - else if (!a.Owner.NonCombatant) - WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "enemy_owned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); - curX += 32; - } - - foreach (var a in world.Actors.Where(a => !a.Destroyed && a.HasTrait() && a.TraitOrDefault().Critical)) - { - WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "critical_unowned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); - - if (a.Owner == world.LocalPlayer || (a.Owner.Stances[world.LocalPlayer] == Stance.Ally && world.LocalPlayer.Stances[a.Owner] == Stance.Ally)) - WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "player_owned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); - else if (!a.Owner.NonCombatant) - WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "enemy_owned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); - - curX += 32; - } - offset += new int2(0, 32); - - var pendingWinner = FindFirstWinningPlayer(world); - if (pendingWinner == null) return; - svc = pendingWinner.PlayerActor.TraitOrDefault(); - - if (world.LocalPlayer != null) - { - var tc = ""; - - if (pendingWinner != world.LocalPlayer && (pendingWinner.Stances[world.LocalPlayer] != Stance.Ally || world.LocalPlayer.Stances[pendingWinner] != Stance.Ally)) - { - // losing - tc = "Strategic defeat in " + - ((svc.CriticalTicksLeft > svc.TicksLeft) ? WidgetUtils.FormatTime(svc.CriticalTicksLeft) : WidgetUtils.FormatTime(svc.TicksLeft)); - }else - { - // winning - tc = "Strategic victory in " + - ((svc.CriticalTicksLeft > svc.TicksLeft) ? WidgetUtils.FormatTime(svc.CriticalTicksLeft) : WidgetUtils.FormatTime(svc.TicksLeft)); - } - - var size = Game.Renderer.BoldFont.Measure(tc); - - Game.Renderer.BoldFont.DrawText(tc, offset + new float2(RenderBounds.Left - size.X / 2 + 1, RenderBounds.Top + 1), Color.Black); - Game.Renderer.BoldFont.DrawText(tc, offset + new float2(RenderBounds.Left - size.X / 2, RenderBounds.Top), Color.WhiteSmoke); - offset += new int2(0, size.Y + 1); - } - - } - - public Player FindFirstWinningPlayer(World world) - { - // loop through all players, see who is 'winning' and get the one with the shortest 'time to win' - int shortest = int.MaxValue; - Player shortestPlayer = null; - - foreach (var p in world.players.Select(p => p.Value).Where(p => !p.NonCombatant)) - { - var svc = p.PlayerActor.TraitOrDefault(); - - if (svc.HoldingCritical && svc.CriticalTicksLeft > 0 && svc.CriticalTicksLeft < shortest) - { - shortest = svc.CriticalTicksLeft; - shortestPlayer = p; - } - - if (svc.Holding && svc.TicksLeft > 0 && svc.TicksLeft < shortest) - { - shortest = svc.TicksLeft; - shortestPlayer = p; - } - } - - return shortestPlayer; - } - - private void Init() - { - IsVisible = () => (world.Actors.Where(a => a.HasTrait()).Any() && world.Actors.Where(a => a.HasTrait()).Any()); - Initialised = true; - } - } -} +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using OpenRA.Graphics; +using OpenRA.Traits; +using OpenRA.Widgets; + +namespace OpenRA.Mods.RA.Widgets +{ + public class StrategicProgressWidget : Widget + { + bool Initialised = false; + readonly World world; + readonly WorldRenderer worldRenderer; + [ObjectCreator.UseCtor] + public StrategicProgressWidget([ObjectCreator.Param] World world, [ObjectCreator.Param] WorldRenderer worldRenderer) + { + IsVisible = () => true; + this.world = world; + this.worldRenderer = worldRenderer; + } + + public override void DrawInner() + { + if (!Initialised) + Init(); + + if (!IsVisible()) return; + int2 offset = int2.Zero; + + var svc = world.players.Select(p => p.Value.PlayerActor.TraitOrDefault()).FirstOrDefault(); + + var totalWidth = (svc.Total + svc.TotalCritical)*32; + int curX = -(totalWidth / 2); + + foreach (var a in world.Actors.Where(a => !a.Destroyed && a.HasTrait() && !a.TraitOrDefault().Critical)) + { + WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "unowned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); + + if (a.Owner == worldRenderer.world.LocalPlayer || (a.Owner.Stances[world.LocalPlayer] == Stance.Ally && world.LocalPlayer.Stances[a.Owner] == Stance.Ally)) + WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "player_owned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); + else if (!a.Owner.NonCombatant) + WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "enemy_owned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); + curX += 32; + } + + foreach (var a in world.Actors.Where(a => !a.Destroyed && a.HasTrait() && a.TraitOrDefault().Critical)) + { + WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "critical_unowned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); + + if (a.Owner == world.LocalPlayer || (a.Owner.Stances[world.LocalPlayer] == Stance.Ally && world.LocalPlayer.Stances[a.Owner] == Stance.Ally)) + WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "player_owned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); + else if (!a.Owner.NonCombatant) + WidgetUtils.DrawRGBA(ChromeProvider.GetImage("strategic", "enemy_owned"), offset + new float2(RenderBounds.Left + curX, RenderBounds.Top)); + + curX += 32; + } + offset += new int2(0, 32); + + var pendingWinner = FindFirstWinningPlayer(world); + if (pendingWinner == null) return; + svc = pendingWinner.PlayerActor.TraitOrDefault(); + + if (world.LocalPlayer != null) + { + var tc = ""; + + if (pendingWinner != world.LocalPlayer && (pendingWinner.Stances[world.LocalPlayer] != Stance.Ally || world.LocalPlayer.Stances[pendingWinner] != Stance.Ally)) + { + // losing + tc = "Strategic defeat in " + + ((svc.CriticalTicksLeft > svc.TicksLeft) ? WidgetUtils.FormatTime(svc.CriticalTicksLeft) : WidgetUtils.FormatTime(svc.TicksLeft)); + }else + { + // winning + tc = "Strategic victory in " + + ((svc.CriticalTicksLeft > svc.TicksLeft) ? WidgetUtils.FormatTime(svc.CriticalTicksLeft) : WidgetUtils.FormatTime(svc.TicksLeft)); + } + + var size = Game.Renderer.BoldFont.Measure(tc); + + Game.Renderer.BoldFont.DrawText(tc, offset + new float2(RenderBounds.Left - size.X / 2 + 1, RenderBounds.Top + 1), Color.Black); + Game.Renderer.BoldFont.DrawText(tc, offset + new float2(RenderBounds.Left - size.X / 2, RenderBounds.Top), Color.WhiteSmoke); + offset += new int2(0, size.Y + 1); + } + + } + + public Player FindFirstWinningPlayer(World world) + { + // loop through all players, see who is 'winning' and get the one with the shortest 'time to win' + int shortest = int.MaxValue; + Player shortestPlayer = null; + + foreach (var p in world.players.Select(p => p.Value).Where(p => !p.NonCombatant)) + { + var svc = p.PlayerActor.TraitOrDefault(); + + if (svc.HoldingCritical && svc.CriticalTicksLeft > 0 && svc.CriticalTicksLeft < shortest) + { + shortest = svc.CriticalTicksLeft; + shortestPlayer = p; + } + + if (svc.Holding && svc.TicksLeft > 0 && svc.TicksLeft < shortest) + { + shortest = svc.TicksLeft; + shortestPlayer = p; + } + } + + return shortestPlayer; + } + + private void Init() + { + IsVisible = () => (world.Actors.Where(a => a.HasTrait()).Any() && world.Actors.Where(a => a.HasTrait()).Any()); + Initialised = true; + } + } +} diff --git a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs index 239b06e5f6..a1d5d57532 100644 --- a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs +++ b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs @@ -1,123 +1,133 @@ -using System; -using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Graphics; -using OpenRA.Network; -using OpenRA.Orders; -using OpenRA.Widgets; - -namespace OpenRA.Mods.RA.Widgets -{ - public class WorldCommandWidget : Widget - { - public World World { get { return OrderManager.world; } } - - public string AttackMoveKey = "a"; - public string StopKey = "s"; - public string ScatterKey = "x"; - public string DeployKey = "f"; - public string BaseCycleKey = "backspace"; - public readonly OrderManager OrderManager; - - [ObjectCreator.UseCtor] - public WorldCommandWidget([ObjectCreator.Param] OrderManager orderManager ) - { - OrderManager = orderManager; - } - - public override void DrawInner() { } - - public override string GetCursor(int2 pos) { return null; } - - public override bool HandleKeyPressInner(KeyInput e) - { - if (World == null) return false; - if (World.LocalPlayer == null) return false; - - return ProcessInput(e); - } - - bool ProcessInput(KeyInput e) - { - if (e.Modifiers == Modifiers.None && e.Event == KeyInputEvent.Down) - { - if (e.KeyName == BaseCycleKey) - return CycleBases(); - - if (!World.Selection.Actors.Any()) - return false; - - if (e.KeyName == AttackMoveKey) - return PerformAttackMove(); - - if (e.KeyName == StopKey) - return PerformStop(); - - if (e.KeyName == ScatterKey) - return PerformScatter(); - - if (e.KeyName == DeployKey) - return PerformDeploy(); - } - - return false; - } - - // todo: take ALL this garbage and route it through the OrderTargeter stuff. - - bool PerformAttackMove() - { - World.OrderGenerator = new GenericSelectTarget(World.Selection.Actors, "AttackMove", - "attackmove", MouseButton.Right); - - return true; - } - - void PerformKeyboardOrderOnSelection(Func f) - { - var orders = World.Selection.Actors.Select(f).ToArray(); - foreach (var o in orders) World.IssueOrder(o); - World.PlayVoiceForOrders(orders); - } - - bool PerformStop() - { - PerformKeyboardOrderOnSelection(a => new Order("Stop", a, false)); - return true; - } - - bool PerformScatter() - { - PerformKeyboardOrderOnSelection(a => new Order("Scatter", a, false)); - return true; - } - - bool PerformDeploy() - { - /* hack: two orders here -- DeployTransform and Unload. */ - PerformKeyboardOrderOnSelection(a => new Order("DeployTransform", a, false)); - PerformKeyboardOrderOnSelection(a => new Order("Unload", a, false)); - return true; - } - - bool CycleBases() - { - var bases = World.ActorsWithTrait() - .Where( a => a.Actor.Owner == World.LocalPlayer ).ToArray(); - if (!bases.Any()) return true; - - var next = bases - .Select(b => b.Actor) - .SkipWhile(b => !World.Selection.Actors.Contains(b)) - .Skip(1) - .FirstOrDefault(); - - if (next == null) - next = bases.Select(b => b.Actor).First(); - - World.Selection.Combine(World, new Actor[] { next }, false, true); - Game.viewport.Center(World.Selection.Actors); - return true; - } - } +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.Linq; +using OpenRA.FileFormats; +using OpenRA.Graphics; +using OpenRA.Network; +using OpenRA.Orders; +using OpenRA.Widgets; + +namespace OpenRA.Mods.RA.Widgets +{ + public class WorldCommandWidget : Widget + { + public World World { get { return OrderManager.world; } } + + public string AttackMoveKey = "a"; + public string StopKey = "s"; + public string ScatterKey = "x"; + public string DeployKey = "f"; + public string BaseCycleKey = "backspace"; + public readonly OrderManager OrderManager; + + [ObjectCreator.UseCtor] + public WorldCommandWidget([ObjectCreator.Param] OrderManager orderManager ) + { + OrderManager = orderManager; + } + + public override void DrawInner() { } + + public override string GetCursor(int2 pos) { return null; } + + public override bool HandleKeyPressInner(KeyInput e) + { + if (World == null) return false; + if (World.LocalPlayer == null) return false; + + return ProcessInput(e); + } + + bool ProcessInput(KeyInput e) + { + if (e.Modifiers == Modifiers.None && e.Event == KeyInputEvent.Down) + { + if (e.KeyName == BaseCycleKey) + return CycleBases(); + + if (!World.Selection.Actors.Any()) + return false; + + if (e.KeyName == AttackMoveKey) + return PerformAttackMove(); + + if (e.KeyName == StopKey) + return PerformStop(); + + if (e.KeyName == ScatterKey) + return PerformScatter(); + + if (e.KeyName == DeployKey) + return PerformDeploy(); + } + + return false; + } + + // todo: take ALL this garbage and route it through the OrderTargeter stuff. + + bool PerformAttackMove() + { + World.OrderGenerator = new GenericSelectTarget(World.Selection.Actors, "AttackMove", + "attackmove", MouseButton.Right); + + return true; + } + + void PerformKeyboardOrderOnSelection(Func f) + { + var orders = World.Selection.Actors.Select(f).ToArray(); + foreach (var o in orders) World.IssueOrder(o); + World.PlayVoiceForOrders(orders); + } + + bool PerformStop() + { + PerformKeyboardOrderOnSelection(a => new Order("Stop", a, false)); + return true; + } + + bool PerformScatter() + { + PerformKeyboardOrderOnSelection(a => new Order("Scatter", a, false)); + return true; + } + + bool PerformDeploy() + { + /* hack: two orders here -- DeployTransform and Unload. */ + PerformKeyboardOrderOnSelection(a => new Order("DeployTransform", a, false)); + PerformKeyboardOrderOnSelection(a => new Order("Unload", a, false)); + return true; + } + + bool CycleBases() + { + var bases = World.ActorsWithTrait() + .Where( a => a.Actor.Owner == World.LocalPlayer ).ToArray(); + if (!bases.Any()) return true; + + var next = bases + .Select(b => b.Actor) + .SkipWhile(b => !World.Selection.Actors.Contains(b)) + .Skip(1) + .FirstOrDefault(); + + if (next == null) + next = bases.Select(b => b.Actor).First(); + + World.Selection.Combine(World, new Actor[] { next }, false, true); + Game.viewport.Center(World.Selection.Actors); + return true; + } + } } \ No newline at end of file diff --git a/OpenRA.Renderer.Cg/GraphicsDevice.cs b/OpenRA.Renderer.Cg/GraphicsDevice.cs index d13b3f089d..86684850c3 100755 --- a/OpenRA.Renderer.Cg/GraphicsDevice.cs +++ b/OpenRA.Renderer.Cg/GraphicsDevice.cs @@ -287,7 +287,7 @@ namespace OpenRA.Renderer.Cg public void DrawIndexedPrimitives( PrimitiveType pt, int numVerts, int numPrimitives ) { - Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ), + Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ), Gl.GL_UNSIGNED_INT, IntPtr.Zero); CheckGlError(); } @@ -318,9 +318,9 @@ namespace OpenRA.Renderer.Cg public IIndexBuffer CreateIndexBuffer( int size ) { return new IndexBuffer( this, size ); } public ITexture CreateTexture() { return new Texture( this ); } public ITexture CreateTexture( Bitmap bitmap ) { return new Texture( this, bitmap ); } - public IShader CreateShader( string name ) { return new Shader( this, name ); } - - - public int GpuMemoryUsed { get { return 0; } } + public IShader CreateShader( string name ) { return new Shader( this, name ); } + + + public int GpuMemoryUsed { get { return 0; } } } } diff --git a/OpenRA.Renderer.Cg/IndexBuffer.cs b/OpenRA.Renderer.Cg/IndexBuffer.cs index ddf37aa276..b2fb618b39 100644 --- a/OpenRA.Renderer.Cg/IndexBuffer.cs +++ b/OpenRA.Renderer.Cg/IndexBuffer.cs @@ -10,8 +10,8 @@ using System; using OpenRA.FileFormats.Graphics; -using Tao.OpenGl; - +using Tao.OpenGl; + using ElemType = System.UInt32; namespace OpenRA.Renderer.Cg diff --git a/OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs b/OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs index cb3698539a..b0f38107f0 100644 --- a/OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs +++ b/OpenRA.Renderer.Cg/Properties/AssemblyInfo.cs @@ -1,36 +1,46 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Renderer.Cg")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("OpenRA.Renderer.Cg")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5531344c-b25d-4641-bc3c-fe035cc777bd")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenRA.Renderer.Cg")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("OpenRA.Renderer.Cg")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5531344c-b25d-4641-bc3c-fe035cc777bd")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.Renderer.Cg/Texture.cs b/OpenRA.Renderer.Cg/Texture.cs index 4df049180a..696cb0bb8a 100644 --- a/OpenRA.Renderer.Cg/Texture.cs +++ b/OpenRA.Renderer.Cg/Texture.cs @@ -6,13 +6,13 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.IO; -using OpenRA.FileFormats.Graphics; +#endregion + +using System; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using OpenRA.FileFormats.Graphics; using Tao.OpenGl; namespace OpenRA.Renderer.Cg @@ -32,16 +32,16 @@ namespace OpenRA.Renderer.Cg Gl.glGenTextures(1, out texture); GraphicsDevice.CheckGlError(); SetData(bitmap); - } - - void PrepareTexture() - { - Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture); - GraphicsDevice.CheckGlError(); - Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_BASE_LEVEL, 0); - GraphicsDevice.CheckGlError(); - Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAX_LEVEL, 0); - GraphicsDevice.CheckGlError(); + } + + void PrepareTexture() + { + Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture); + GraphicsDevice.CheckGlError(); + Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_BASE_LEVEL, 0); + GraphicsDevice.CheckGlError(); + Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAX_LEVEL, 0); + GraphicsDevice.CheckGlError(); } public void SetData(byte[] colors, int width, int height) @@ -53,8 +53,8 @@ namespace OpenRA.Renderer.Cg { fixed (byte* ptr = &colors[0]) { - IntPtr intPtr = new IntPtr((void*)ptr); - + IntPtr intPtr = new IntPtr((void*)ptr); + PrepareTexture(); Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, width, height, 0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, intPtr); @@ -76,8 +76,8 @@ namespace OpenRA.Renderer.Cg { fixed (uint* ptr = &colors[0,0]) { - IntPtr intPtr = new IntPtr((void *) ptr); - + IntPtr intPtr = new IntPtr((void *) ptr); + PrepareTexture(); Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, width, height, 0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, intPtr); @@ -97,7 +97,7 @@ namespace OpenRA.Renderer.Cg var bits = bitmap.LockBits( new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, - PixelFormat.Format32bppArgb); + PixelFormat.Format32bppArgb); PrepareTexture(); Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, bits.Width, bits.Height, diff --git a/OpenRA.Renderer.Gl/GraphicsDevice.cs b/OpenRA.Renderer.Gl/GraphicsDevice.cs index 128cb88f45..6561fe0132 100755 --- a/OpenRA.Renderer.Gl/GraphicsDevice.cs +++ b/OpenRA.Renderer.Gl/GraphicsDevice.cs @@ -283,7 +283,7 @@ namespace OpenRA.Renderer.Glsl public void DrawIndexedPrimitives( PrimitiveType pt, int numVerts, int numPrimitives ) { - Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ), + Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ), Gl.GL_UNSIGNED_INT, IntPtr.Zero); CheckGlError(); } @@ -314,8 +314,8 @@ namespace OpenRA.Renderer.Glsl public IIndexBuffer CreateIndexBuffer( int size ) { return new IndexBuffer( this, size ); } public ITexture CreateTexture() { return new Texture( this ); } public ITexture CreateTexture( Bitmap bitmap ) { return new Texture( this, bitmap ); } - public IShader CreateShader( string name ) { return new Shader( this, name ); } - - public int GpuMemoryUsed { get; internal set; } + public IShader CreateShader( string name ) { return new Shader( this, name ); } + + public int GpuMemoryUsed { get; internal set; } } } diff --git a/OpenRA.Renderer.Gl/IndexBuffer.cs b/OpenRA.Renderer.Gl/IndexBuffer.cs index aba056f9ee..d8cd8c2053 100644 --- a/OpenRA.Renderer.Gl/IndexBuffer.cs +++ b/OpenRA.Renderer.Gl/IndexBuffer.cs @@ -30,13 +30,13 @@ namespace OpenRA.Renderer.Glsl new ElemType[ size ], Gl.GL_DYNAMIC_DRAW); GraphicsDevice.CheckGlError(); - } - + } + public void SetData(ElemType[] data, int length) { Bind(); Gl.glBufferSubData(Gl.GL_ELEMENT_ARRAY_BUFFER, - IntPtr.Zero, + IntPtr.Zero, new IntPtr(sizeof(ElemType) * length), data); GraphicsDevice.CheckGlError(); diff --git a/OpenRA.Renderer.Gl/Texture.cs b/OpenRA.Renderer.Gl/Texture.cs index 81e07055a8..8ec88db429 100644 --- a/OpenRA.Renderer.Gl/Texture.cs +++ b/OpenRA.Renderer.Gl/Texture.cs @@ -6,25 +6,25 @@ * as published by the Free Software Foundation. For more information, * see COPYING. */ -#endregion - -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.IO; -using OpenRA.FileFormats.Graphics; +#endregion + +using System; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using OpenRA.FileFormats.Graphics; using Tao.OpenGl; namespace OpenRA.Renderer.Glsl { public class Texture : ITexture { - internal int texture; - internal int memory; + internal int texture; + internal int memory; GraphicsDevice dev; public Texture(GraphicsDevice dev) - { + { this.dev = dev; Gl.glGenTextures(1, out texture); @@ -32,7 +32,7 @@ namespace OpenRA.Renderer.Glsl } public Texture(GraphicsDevice dev, Bitmap bitmap) - { + { this.dev = dev; Gl.glGenTextures(1, out texture); @@ -54,18 +54,18 @@ namespace OpenRA.Renderer.Glsl GraphicsDevice.CheckGlError(); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAX_LEVEL, 0); GraphicsDevice.CheckGlError(); - } - - void UpdateMemoryUsage( int newSize ) - { - if (newSize == memory) - return; - - dev.GpuMemoryUsed -= memory; - memory = newSize; - dev.GpuMemoryUsed += memory; - - Log.Write("debug", "GPU Memory: {0:F2} MiB", dev.GpuMemoryUsed / 1024 / 1024f); + } + + void UpdateMemoryUsage( int newSize ) + { + if (newSize == memory) + return; + + dev.GpuMemoryUsed -= memory; + memory = newSize; + dev.GpuMemoryUsed += memory; + + Log.Write("debug", "GPU Memory: {0:F2} MiB", dev.GpuMemoryUsed / 1024 / 1024f); } public void SetData(byte[] colors, int width, int height) @@ -83,8 +83,8 @@ namespace OpenRA.Renderer.Glsl 0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, intPtr); GraphicsDevice.CheckGlError(); } - } - + } + UpdateMemoryUsage(colors.Length); } @@ -107,8 +107,8 @@ namespace OpenRA.Renderer.Glsl 0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, intPtr); GraphicsDevice.CheckGlError(); } - } - + } + UpdateMemoryUsage(width * height * sizeof(uint)); } @@ -129,8 +129,8 @@ namespace OpenRA.Renderer.Glsl Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, bits.Width, bits.Height, 0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, bits.Scan0); // todo: weird strides GraphicsDevice.CheckGlError(); - bitmap.UnlockBits(bits); - + bitmap.UnlockBits(bits); + UpdateMemoryUsage(bitmap.Width * bitmap.Height * sizeof(uint)); } diff --git a/OpenRA.Renderer.Null/NullGraphicsDevice.cs b/OpenRA.Renderer.Null/NullGraphicsDevice.cs index ef4dedc6d1..a416fe30a1 100644 --- a/OpenRA.Renderer.Null/NullGraphicsDevice.cs +++ b/OpenRA.Renderer.Null/NullGraphicsDevice.cs @@ -46,9 +46,9 @@ namespace OpenRA.Renderer.Null public IIndexBuffer CreateIndexBuffer(int size) { return new NullIndexBuffer(); } public ITexture CreateTexture() { return new NullTexture(); } public ITexture CreateTexture(Bitmap bitmap) { return new NullTexture(); } - public IShader CreateShader(string name) { return new NullShader(); } - - public int GpuMemoryUsed { get { return 0; } } + public IShader CreateShader(string name) { return new NullShader(); } + + public int GpuMemoryUsed { get { return 0; } } } public class NullIndexBuffer : IIndexBuffer diff --git a/OpenRA.Renderer.Null/Properties/AssemblyInfo.cs b/OpenRA.Renderer.Null/Properties/AssemblyInfo.cs index a7c065c7e0..8c0f1d342e 100644 --- a/OpenRA.Renderer.Null/Properties/AssemblyInfo.cs +++ b/OpenRA.Renderer.Null/Properties/AssemblyInfo.cs @@ -1,36 +1,46 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.Renderer.Null")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.Renderer.Null")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c7dff231-d517-400e-bc98-ff10c99fd660")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenRA.Renderer.Null")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenRA.Renderer.Null")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c7dff231-d517-400e-bc98-ff10c99fd660")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.TilesetBuilder/Form1.Designer.cs b/OpenRA.TilesetBuilder/Form1.Designer.cs index 66c1fc556d..89322ff618 100644 --- a/OpenRA.TilesetBuilder/Form1.Designer.cs +++ b/OpenRA.TilesetBuilder/Form1.Designer.cs @@ -1,316 +1,326 @@ -namespace OpenRA.TilesetBuilder -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); - this.panel1 = new System.Windows.Forms.Panel(); - this.surface1 = new OpenRA.TilesetBuilder.Surface(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton14 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripButton4 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton12 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton11 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton10 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton9 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton8 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton7 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton6 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton5 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton13 = new System.Windows.Forms.ToolStripButton(); - this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); - this.toolStripContainer1.ContentPanel.SuspendLayout(); - this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); - this.toolStripContainer1.SuspendLayout(); - this.panel1.SuspendLayout(); - this.toolStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // toolStripContainer1 - // - // - // toolStripContainer1.ContentPanel - // - this.toolStripContainer1.ContentPanel.Controls.Add(this.panel1); - this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(745, 571); - this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); - this.toolStripContainer1.Name = "toolStripContainer1"; - this.toolStripContainer1.Size = new System.Drawing.Size(745, 596); - this.toolStripContainer1.TabIndex = 0; - this.toolStripContainer1.Text = "toolStripContainer1"; - // - // toolStripContainer1.TopToolStripPanel - // - this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); - // - // panel1 - // - this.panel1.AutoScroll = true; - this.panel1.Controls.Add(this.surface1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(745, 571); - this.panel1.TabIndex = 0; - // - // surface1 - // - this.surface1.BackColor = System.Drawing.Color.Black; - this.surface1.Location = new System.Drawing.Point(0, 0); - this.surface1.Name = "surface1"; - this.surface1.Size = new System.Drawing.Size(598, 372); - this.surface1.TabIndex = 2; - this.surface1.Text = "surface1"; - // - // toolStrip1 - // - this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripButton2, - this.toolStripButton14, - this.toolStripButton3, - this.toolStripSeparator1, - this.toolStripButton4, - this.toolStripButton12, - this.toolStripButton11, - this.toolStripButton10, - this.toolStripButton9, - this.toolStripButton8, - this.toolStripButton7, - this.toolStripButton6, - this.toolStripButton5, - this.toolStripButton13, - this.toolStripButton1}); - this.toolStrip1.Location = new System.Drawing.Point(3, 0); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(602, 25); - this.toolStrip1.TabIndex = 0; - // - // toolStripButton2 - // - this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); - this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton2.Name = "toolStripButton2"; - this.toolStripButton2.Size = new System.Drawing.Size(51, 22); - this.toolStripButton2.Text = "Save"; - this.toolStripButton2.Click += new System.EventHandler(this.SaveClicked); - // - // toolStripButton14 - // - this.toolStripButton14.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton14.Image"))); - this.toolStripButton14.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton14.Name = "toolStripButton14"; - this.toolStripButton14.Size = new System.Drawing.Size(60, 22); - this.toolStripButton14.Text = "Export"; - this.toolStripButton14.Click += new System.EventHandler(this.ExportClicked); - // - // toolStripButton3 - // - this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image"))); - this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton3.Name = "toolStripButton3"; - this.toolStripButton3.Size = new System.Drawing.Size(104, 22); - this.toolStripButton3.Text = "Show Overlays"; - this.toolStripButton3.Click += new System.EventHandler(this.ShowOverlaysClicked); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); - // - // toolStripButton4 - // - this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image"))); - this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton4.Name = "toolStripButton4"; - this.toolStripButton4.Size = new System.Drawing.Size(25, 22); - this.toolStripButton4.Tag = "0"; - this.toolStripButton4.Text = "tt0"; - this.toolStripButton4.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton12 - // - this.toolStripButton12.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton12.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton12.Image"))); - this.toolStripButton12.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton12.Name = "toolStripButton12"; - this.toolStripButton12.Size = new System.Drawing.Size(25, 22); - this.toolStripButton12.Tag = "1"; - this.toolStripButton12.Text = "tt1"; - this.toolStripButton12.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton11 - // - this.toolStripButton11.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton11.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton11.Image"))); - this.toolStripButton11.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton11.Name = "toolStripButton11"; - this.toolStripButton11.Size = new System.Drawing.Size(25, 22); - this.toolStripButton11.Tag = "2"; - this.toolStripButton11.Text = "tt2"; - this.toolStripButton11.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton10 - // - this.toolStripButton10.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton10.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton10.Image"))); - this.toolStripButton10.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton10.Name = "toolStripButton10"; - this.toolStripButton10.Size = new System.Drawing.Size(25, 22); - this.toolStripButton10.Tag = "3"; - this.toolStripButton10.Text = "tt3"; - this.toolStripButton10.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton9 - // - this.toolStripButton9.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton9.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton9.Image"))); - this.toolStripButton9.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton9.Name = "toolStripButton9"; - this.toolStripButton9.Size = new System.Drawing.Size(25, 22); - this.toolStripButton9.Tag = "4"; - this.toolStripButton9.Text = "tt4"; - this.toolStripButton9.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton8 - // - this.toolStripButton8.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton8.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton8.Image"))); - this.toolStripButton8.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton8.Name = "toolStripButton8"; - this.toolStripButton8.Size = new System.Drawing.Size(25, 22); - this.toolStripButton8.Tag = "5"; - this.toolStripButton8.Text = "tt5"; - this.toolStripButton8.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton7 - // - this.toolStripButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton7.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton7.Image"))); - this.toolStripButton7.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton7.Name = "toolStripButton7"; - this.toolStripButton7.Size = new System.Drawing.Size(25, 22); - this.toolStripButton7.Tag = "6"; - this.toolStripButton7.Text = "tt6"; - this.toolStripButton7.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton6 - // - this.toolStripButton6.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton6.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton6.Image"))); - this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton6.Name = "toolStripButton6"; - this.toolStripButton6.Size = new System.Drawing.Size(25, 22); - this.toolStripButton6.Tag = "7"; - this.toolStripButton6.Text = "tt7"; - this.toolStripButton6.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton5 - // - this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image"))); - this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton5.Name = "toolStripButton5"; - this.toolStripButton5.Size = new System.Drawing.Size(25, 22); - this.toolStripButton5.Tag = "8"; - this.toolStripButton5.Text = "tt8"; - this.toolStripButton5.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // toolStripButton13 - // - this.toolStripButton13.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton13.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton13.Image"))); - this.toolStripButton13.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton13.Name = "toolStripButton13"; - this.toolStripButton13.Size = new System.Drawing.Size(25, 22); - this.toolStripButton13.Tag = "9"; - this.toolStripButton13.Text = "tt9"; - // - // toolStripButton1 - // - this.toolStripButton1.Checked = true; - this.toolStripButton1.CheckState = System.Windows.Forms.CheckState.Checked; - this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); - this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton1.Name = "toolStripButton1"; - this.toolStripButton1.Size = new System.Drawing.Size(88, 22); - this.toolStripButton1.Text = "Template Tool"; - this.toolStripButton1.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(745, 596); - this.Controls.Add(this.toolStripContainer1); - this.Name = "Form1"; - this.Text = "Tileset Builder"; - this.toolStripContainer1.ContentPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.PerformLayout(); - this.toolStripContainer1.ResumeLayout(false); - this.toolStripContainer1.PerformLayout(); - this.panel1.ResumeLayout(false); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.ToolStripContainer toolStripContainer1; - private System.Windows.Forms.Panel panel1; - private Surface surface1; - private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripButton toolStripButton1; - private System.Windows.Forms.ToolStripButton toolStripButton2; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripButton toolStripButton3; - private System.Windows.Forms.ToolStripButton toolStripButton4; - private System.Windows.Forms.ToolStripButton toolStripButton12; - private System.Windows.Forms.ToolStripButton toolStripButton11; - private System.Windows.Forms.ToolStripButton toolStripButton10; - private System.Windows.Forms.ToolStripButton toolStripButton9; - private System.Windows.Forms.ToolStripButton toolStripButton8; - private System.Windows.Forms.ToolStripButton toolStripButton7; - private System.Windows.Forms.ToolStripButton toolStripButton6; - private System.Windows.Forms.ToolStripButton toolStripButton5; - private System.Windows.Forms.ToolStripButton toolStripButton13; - private System.Windows.Forms.ToolStripButton toolStripButton14; - - } -} - +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.TilesetBuilder +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.panel1 = new System.Windows.Forms.Panel(); + this.surface1 = new OpenRA.TilesetBuilder.Surface(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton14 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton4 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton12 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton11 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton10 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton9 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton8 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton7 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton6 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton5 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton13 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.toolStripContainer1.ContentPanel.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // toolStripContainer1 + // + // + // toolStripContainer1.ContentPanel + // + this.toolStripContainer1.ContentPanel.Controls.Add(this.panel1); + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(745, 571); + this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); + this.toolStripContainer1.Name = "toolStripContainer1"; + this.toolStripContainer1.Size = new System.Drawing.Size(745, 596); + this.toolStripContainer1.TabIndex = 0; + this.toolStripContainer1.Text = "toolStripContainer1"; + // + // toolStripContainer1.TopToolStripPanel + // + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); + // + // panel1 + // + this.panel1.AutoScroll = true; + this.panel1.Controls.Add(this.surface1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(745, 571); + this.panel1.TabIndex = 0; + // + // surface1 + // + this.surface1.BackColor = System.Drawing.Color.Black; + this.surface1.Location = new System.Drawing.Point(0, 0); + this.surface1.Name = "surface1"; + this.surface1.Size = new System.Drawing.Size(598, 372); + this.surface1.TabIndex = 2; + this.surface1.Text = "surface1"; + // + // toolStrip1 + // + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButton2, + this.toolStripButton14, + this.toolStripButton3, + this.toolStripSeparator1, + this.toolStripButton4, + this.toolStripButton12, + this.toolStripButton11, + this.toolStripButton10, + this.toolStripButton9, + this.toolStripButton8, + this.toolStripButton7, + this.toolStripButton6, + this.toolStripButton5, + this.toolStripButton13, + this.toolStripButton1}); + this.toolStrip1.Location = new System.Drawing.Point(3, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(602, 25); + this.toolStrip1.TabIndex = 0; + // + // toolStripButton2 + // + this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); + this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton2.Name = "toolStripButton2"; + this.toolStripButton2.Size = new System.Drawing.Size(51, 22); + this.toolStripButton2.Text = "Save"; + this.toolStripButton2.Click += new System.EventHandler(this.SaveClicked); + // + // toolStripButton14 + // + this.toolStripButton14.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton14.Image"))); + this.toolStripButton14.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton14.Name = "toolStripButton14"; + this.toolStripButton14.Size = new System.Drawing.Size(60, 22); + this.toolStripButton14.Text = "Export"; + this.toolStripButton14.Click += new System.EventHandler(this.ExportClicked); + // + // toolStripButton3 + // + this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image"))); + this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton3.Name = "toolStripButton3"; + this.toolStripButton3.Size = new System.Drawing.Size(104, 22); + this.toolStripButton3.Text = "Show Overlays"; + this.toolStripButton3.Click += new System.EventHandler(this.ShowOverlaysClicked); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + // + // toolStripButton4 + // + this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image"))); + this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton4.Name = "toolStripButton4"; + this.toolStripButton4.Size = new System.Drawing.Size(25, 22); + this.toolStripButton4.Tag = "0"; + this.toolStripButton4.Text = "tt0"; + this.toolStripButton4.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton12 + // + this.toolStripButton12.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton12.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton12.Image"))); + this.toolStripButton12.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton12.Name = "toolStripButton12"; + this.toolStripButton12.Size = new System.Drawing.Size(25, 22); + this.toolStripButton12.Tag = "1"; + this.toolStripButton12.Text = "tt1"; + this.toolStripButton12.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton11 + // + this.toolStripButton11.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton11.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton11.Image"))); + this.toolStripButton11.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton11.Name = "toolStripButton11"; + this.toolStripButton11.Size = new System.Drawing.Size(25, 22); + this.toolStripButton11.Tag = "2"; + this.toolStripButton11.Text = "tt2"; + this.toolStripButton11.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton10 + // + this.toolStripButton10.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton10.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton10.Image"))); + this.toolStripButton10.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton10.Name = "toolStripButton10"; + this.toolStripButton10.Size = new System.Drawing.Size(25, 22); + this.toolStripButton10.Tag = "3"; + this.toolStripButton10.Text = "tt3"; + this.toolStripButton10.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton9 + // + this.toolStripButton9.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton9.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton9.Image"))); + this.toolStripButton9.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton9.Name = "toolStripButton9"; + this.toolStripButton9.Size = new System.Drawing.Size(25, 22); + this.toolStripButton9.Tag = "4"; + this.toolStripButton9.Text = "tt4"; + this.toolStripButton9.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton8 + // + this.toolStripButton8.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton8.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton8.Image"))); + this.toolStripButton8.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton8.Name = "toolStripButton8"; + this.toolStripButton8.Size = new System.Drawing.Size(25, 22); + this.toolStripButton8.Tag = "5"; + this.toolStripButton8.Text = "tt5"; + this.toolStripButton8.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton7 + // + this.toolStripButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton7.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton7.Image"))); + this.toolStripButton7.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton7.Name = "toolStripButton7"; + this.toolStripButton7.Size = new System.Drawing.Size(25, 22); + this.toolStripButton7.Tag = "6"; + this.toolStripButton7.Text = "tt6"; + this.toolStripButton7.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton6 + // + this.toolStripButton6.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton6.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton6.Image"))); + this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton6.Name = "toolStripButton6"; + this.toolStripButton6.Size = new System.Drawing.Size(25, 22); + this.toolStripButton6.Tag = "7"; + this.toolStripButton6.Text = "tt7"; + this.toolStripButton6.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton5 + // + this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image"))); + this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton5.Name = "toolStripButton5"; + this.toolStripButton5.Size = new System.Drawing.Size(25, 22); + this.toolStripButton5.Tag = "8"; + this.toolStripButton5.Text = "tt8"; + this.toolStripButton5.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // toolStripButton13 + // + this.toolStripButton13.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton13.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton13.Image"))); + this.toolStripButton13.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton13.Name = "toolStripButton13"; + this.toolStripButton13.Size = new System.Drawing.Size(25, 22); + this.toolStripButton13.Tag = "9"; + this.toolStripButton13.Text = "tt9"; + // + // toolStripButton1 + // + this.toolStripButton1.Checked = true; + this.toolStripButton1.CheckState = System.Windows.Forms.CheckState.Checked; + this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); + this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton1.Name = "toolStripButton1"; + this.toolStripButton1.Size = new System.Drawing.Size(88, 22); + this.toolStripButton1.Text = "Template Tool"; + this.toolStripButton1.Click += new System.EventHandler(this.TerrainTypeSelectorClicked); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(745, 596); + this.Controls.Add(this.toolStripContainer1); + this.Name = "Form1"; + this.Text = "Tileset Builder"; + this.toolStripContainer1.ContentPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.panel1.ResumeLayout(false); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStripContainer toolStripContainer1; + private System.Windows.Forms.Panel panel1; + private Surface surface1; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton toolStripButton1; + private System.Windows.Forms.ToolStripButton toolStripButton2; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripButton toolStripButton3; + private System.Windows.Forms.ToolStripButton toolStripButton4; + private System.Windows.Forms.ToolStripButton toolStripButton12; + private System.Windows.Forms.ToolStripButton toolStripButton11; + private System.Windows.Forms.ToolStripButton toolStripButton10; + private System.Windows.Forms.ToolStripButton toolStripButton9; + private System.Windows.Forms.ToolStripButton toolStripButton8; + private System.Windows.Forms.ToolStripButton toolStripButton7; + private System.Windows.Forms.ToolStripButton toolStripButton6; + private System.Windows.Forms.ToolStripButton toolStripButton5; + private System.Windows.Forms.ToolStripButton toolStripButton13; + private System.Windows.Forms.ToolStripButton toolStripButton14; + + } +} + diff --git a/OpenRA.TilesetBuilder/Properties/AssemblyInfo.cs b/OpenRA.TilesetBuilder/Properties/AssemblyInfo.cs index 98243827bb..bbd3ee46a6 100644 --- a/OpenRA.TilesetBuilder/Properties/AssemblyInfo.cs +++ b/OpenRA.TilesetBuilder/Properties/AssemblyInfo.cs @@ -1,36 +1,46 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenRA.TilesetBuilder")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRA.TilesetBuilder")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9efec6a6-74f7-4a7d-a509-aba2aae75bcc")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#region Copyright & License Information +/* + * Copyright 2007-2011 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. For more information, + * see COPYING. + */ +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenRA.TilesetBuilder")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenRA.TilesetBuilder")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9efec6a6-74f7-4a7d-a509-aba2aae75bcc")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRA.TilesetBuilder/Properties/Resources.Designer.cs b/OpenRA.TilesetBuilder/Properties/Resources.Designer.cs index d3640899ac..a5ef06ff92 100644 --- a/OpenRA.TilesetBuilder/Properties/Resources.Designer.cs +++ b/OpenRA.TilesetBuilder/Properties/Resources.Designer.cs @@ -1,71 +1,71 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4200 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenRA.TilesetBuilder.Properties -{ - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenRA.TilesetBuilder.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OpenRA.TilesetBuilder.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenRA.TilesetBuilder.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/OpenRA.TilesetBuilder/Properties/Settings.Designer.cs b/OpenRA.TilesetBuilder/Properties/Settings.Designer.cs index 58a775578e..8b2583a3eb 100644 --- a/OpenRA.TilesetBuilder/Properties/Settings.Designer.cs +++ b/OpenRA.TilesetBuilder/Properties/Settings.Designer.cs @@ -1,30 +1,30 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4200 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenRA.TilesetBuilder.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OpenRA.TilesetBuilder.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/OpenRA.TilesetBuilder/Surface.cs b/OpenRA.TilesetBuilder/Surface.cs index d19c9db1d4..906a4cd0af 100644 --- a/OpenRA.TilesetBuilder/Surface.cs +++ b/OpenRA.TilesetBuilder/Surface.cs @@ -1,114 +1,124 @@ -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Windows.Forms; - -namespace OpenRA.TilesetBuilder -{ - class Surface : Control - { - public Bitmap Image; - public int[,] TerrainTypes; - public List