adding in-game GUI gamefile extractor/converter
also fixing EOL for TilesetBuilder with monoDevelop
This commit is contained in:
@@ -59,30 +59,9 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="D2kLoadScreen.cs" />
|
<Compile Include="D2kLoadScreen.cs" />
|
||||||
<Compile Include="Render\RenderBuildingSeparateTurret.cs" />
|
<Compile Include="Render\RenderBuildingSeparateTurret.cs" />
|
||||||
<Compile Include="Widgets\Logic\D2kInstallFromCDLogic.cs" />
|
|
||||||
<Compile Include="Widgets\Logic\D2kInstallLogic.cs" />
|
<Compile Include="Widgets\Logic\D2kInstallLogic.cs" />
|
||||||
</ItemGroup>
|
<Compile Include="Widgets\Logic\D2kExtractGameFilesLogic.cs" />
|
||||||
<ItemGroup>
|
<Compile Include="Widgets\Logic\D2kInstallFromCDLogic.cs" />
|
||||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
|
||||||
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
|
|
||||||
<Name>OpenRA.FileFormats</Name>
|
|
||||||
<Private>False</Private>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
|
||||||
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
|
|
||||||
<Name>OpenRA.Game</Name>
|
|
||||||
<Private>False</Private>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\OpenRA.Mods.RA\OpenRA.Mods.RA.csproj">
|
|
||||||
<Project>{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}</Project>
|
|
||||||
<Name>OpenRA.Mods.RA</Name>
|
|
||||||
<Private>False</Private>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\OpenRA.Mods.Cnc\OpenRA.Mods.Cnc.csproj">
|
|
||||||
<Project>{2881135D-4D62-493E-8F83-5EEE92CCC6BE}</Project>
|
|
||||||
<Name>OpenRA.Mods.Cnc</Name>
|
|
||||||
<Private>False</Private>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -90,4 +69,22 @@
|
|||||||
copy "$(TargetPath)" "$(SolutionDir)mods/d2k/"
|
copy "$(TargetPath)" "$(SolutionDir)mods/d2k/"
|
||||||
cd "$(SolutionDir)"</PostBuildEvent>
|
cd "$(SolutionDir)"</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\OpenRA.Utility\OpenRA.Utility.csproj">
|
||||||
|
<Project>{F33337BE-CB69-4B24-850F-07D23E408DDF}</Project>
|
||||||
|
<Name>OpenRA.Utility</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||||
|
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
|
||||||
|
<Name>OpenRA.Game</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||||
|
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
|
||||||
|
<Name>OpenRA.FileFormats</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\OpenRA.TilesetBuilder\OpenRA.TilesetBuilder.csproj">
|
||||||
|
<Project>{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}</Project>
|
||||||
|
<Name>OpenRA.TilesetBuilder</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
20
OpenRA.Mods.D2k/OpenRA.Mods.D2k.sln
Normal file
20
OpenRA.Mods.D2k/OpenRA.Mods.D2k.sln
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.Mods.D2k.csproj", "{C0B0465C-6BE2-409C-8770-3A9BF64C4344}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(MonoDevelopProperties) = preSolution
|
||||||
|
StartupItem = OpenRA.Mods.D2k.csproj
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
48
OpenRA.Mods.D2k/Render/RenderBuildingSeparateTurret.cs
Normal file
48
OpenRA.Mods.D2k/Render/RenderBuildingSeparateTurret.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2012 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 OpenRA.Mods.RA.Buildings;
|
||||||
|
using OpenRA.Graphics;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Render
|
||||||
|
{
|
||||||
|
class RenderBuildingSeparateTurretInfo : RenderBuildingInfo, Requires<TurretedInfo>, Requires<AttackBaseInfo>
|
||||||
|
{
|
||||||
|
public override object Create(ActorInitializer init) { return new RenderBuildingSeparateTurret( init, this ); }
|
||||||
|
}
|
||||||
|
|
||||||
|
class RenderBuildingSeparateTurret : RenderBuilding
|
||||||
|
{
|
||||||
|
public RenderBuildingSeparateTurret( ActorInitializer init, RenderBuildingInfo info )
|
||||||
|
: base(init, info, MakeTurretFacingFunc(init.self))
|
||||||
|
{
|
||||||
|
var turretAnim = new Animation(GetImage(self), () => turreted.turretFacing );
|
||||||
|
turretAnim.Play( "turret" );
|
||||||
|
|
||||||
|
for( var i = 0; i < attack.Turrets.Count; i++ )
|
||||||
|
{
|
||||||
|
var turret = attack.Turrets[i];
|
||||||
|
anims.Add( "turret_{0}".F(i),
|
||||||
|
new AnimationWithOffset( turretAnim,
|
||||||
|
() => Combat.GetTurretPosition( self, facing, turret ),
|
||||||
|
null));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Func<int> MakeTurretFacingFunc(Actor self)
|
||||||
|
{
|
||||||
|
var turreted = self.Trait<Turreted>();
|
||||||
|
return () => turreted.turretFacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} */
|
||||||
488
OpenRA.Mods.D2k/Widgets/Logic/D2kExtractGameFilesLogic.cs
Normal file
488
OpenRA.Mods.D2k/Widgets/Logic/D2kExtractGameFilesLogic.cs
Normal file
@@ -0,0 +1,488 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2012 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.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.FileFormats.Graphics;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Utility;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.D2k.Widgets.Logic
|
||||||
|
{
|
||||||
|
public class D2kExtractGameFilesLogic
|
||||||
|
{
|
||||||
|
Widget panel;
|
||||||
|
ProgressBarWidget progressBar;
|
||||||
|
LabelWidget statusLabel;
|
||||||
|
ButtonWidget retryButton, backButton;
|
||||||
|
Widget extractingContainer, copyFilesContainer;
|
||||||
|
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public D2kExtractGameFilesLogic(Widget widget)
|
||||||
|
{
|
||||||
|
panel = widget.Get("EXTRACT_GAMEFILES_PANEL");
|
||||||
|
progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
|
||||||
|
statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");
|
||||||
|
|
||||||
|
backButton = panel.Get<ButtonWidget>("BACK_BUTTON");
|
||||||
|
backButton.OnClick = Ui.CloseWindow;
|
||||||
|
|
||||||
|
retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON");
|
||||||
|
retryButton.OnClick = Extract;
|
||||||
|
|
||||||
|
extractingContainer = panel.Get("EXTRACTING");
|
||||||
|
copyFilesContainer = panel.Get("COPY_FILES");
|
||||||
|
Extract();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Extract()
|
||||||
|
{
|
||||||
|
backButton.IsDisabled = () => true;
|
||||||
|
retryButton.IsDisabled = () => true;
|
||||||
|
copyFilesContainer.IsVisible = () => false;
|
||||||
|
extractingContainer.IsVisible = () => true;
|
||||||
|
|
||||||
|
var PathToDataR8 = Path.Combine(Platform.SupportDir, "Content/d2k/DATA.R8");
|
||||||
|
var PathToPalette = "mods/d2k/bits/d2k.pal";
|
||||||
|
var PathToImages = Path.Combine(Platform.SupportDir, "Content/d2k/SHPs");
|
||||||
|
|
||||||
|
var ExtractGameFiles = new string[][]
|
||||||
|
{
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "0", "2", Path.Combine(PathToImages, "overlay")},
|
||||||
|
//new string[] {"--r8", PathToDataR8, PathToPalette, "40", "101", Path.Combine(PathToImages, "shadow")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "102", "105", Path.Combine(PathToImages, "crates")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "107", "109", Path.Combine(PathToImages, "spicebloom")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "114", "129", Path.Combine(PathToImages, "rockcrater1")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "130", "145", Path.Combine(PathToImages, "rockcrater2")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "146", "161", Path.Combine(PathToImages, "sandcrater1")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "162", "177", Path.Combine(PathToImages, "sandcrater2")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "206", "381", Path.Combine(PathToImages, "rifle"), "--infantry"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "382", "457", Path.Combine(PathToImages, "rifledeath"), "--infantrydeath"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "458", "693", Path.Combine(PathToImages, "rocket"), "--infantry"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "694", "929", Path.Combine(PathToImages, "fremen"), "--infantry"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "930", "1165", Path.Combine(PathToImages, "sardaukar"), "--infantry"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1166", "1221", Path.Combine(PathToImages, "engineer"), "--infantry"}, // death animation 1342..1401
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1402", "1502", Path.Combine(PathToImages, "thumper"), "--infantry"}, // death animations 1543..1602
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1603", "1634", Path.Combine(PathToImages, "missile"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1635", "1666", Path.Combine(PathToImages, "trike"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1667", "1698", Path.Combine(PathToImages, "quad"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1699", "1730", Path.Combine(PathToImages, "harvester"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1731", "1762", Path.Combine(PathToImages, "combata"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1763", "1794", Path.Combine(PathToImages, "siege"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1795", "1826", Path.Combine(PathToImages, "dmcv"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1827", "1858", Path.Combine(PathToImages, "sonic"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1859", "1890", Path.Combine(PathToImages, "combataturret"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1891", "1922", Path.Combine(PathToImages, "siegeturret"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1923", "1954", Path.Combine(PathToImages, "carryall"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "1955", "2050", Path.Combine(PathToImages, "orni"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2051", "2082", Path.Combine(PathToImages, "combath"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2083", "2114", Path.Combine(PathToImages, "devast"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2115", "2146", Path.Combine(PathToImages, "combathturret"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2147", "2148", Path.Combine(PathToImages, "deathhandmissile")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2245", "2284", Path.Combine(PathToImages, "saboteur"), "--infantry"}, //#death animations 2325..2388
|
||||||
|
//rifleinfantry repetitions?
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2389", "2420", Path.Combine(PathToImages, "deviator"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2421", "2452", Path.Combine(PathToImages, "raider"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2453", "2484", Path.Combine(PathToImages, "combato"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2485", "2516", Path.Combine(PathToImages, "combatoturret"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2517", "2517", Path.Combine(PathToImages, "frigate"), "--vehicle"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2518", "2520", Path.Combine(PathToImages, "heavya"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2521", "2522", Path.Combine(PathToImages, "radara"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2523", "2524", Path.Combine(PathToImages, "pwra"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2525", "2526", Path.Combine(PathToImages, "barra"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2527", "2558", Path.Combine(PathToImages, "wall"), "--wall"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2559", "2560", Path.Combine(PathToImages, "conyarda"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2561", "2563", Path.Combine(PathToImages, "refa"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2564", "2565", Path.Combine(PathToImages, "hightecha"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2566", "2570", Path.Combine(PathToImages, "siloa"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2571", "2572", Path.Combine(PathToImages, "repaira"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2573", "2588", Path.Combine(PathToImages, "guntower"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2589", "2620", Path.Combine(PathToImages, "gunturret"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2621", "2636", Path.Combine(PathToImages, "rockettower"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2637", "2668", Path.Combine(PathToImages, "rocketturreta"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2669", "2670", Path.Combine(PathToImages, "researcha"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2671", "2672", Path.Combine(PathToImages, "starporta"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2673", "2675", Path.Combine(PathToImages, "lighta"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2676", "2677", Path.Combine(PathToImages, "palacea"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2678", "2680", Path.Combine(PathToImages, "heavyh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2681", "2682", Path.Combine(PathToImages, "radarh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2683", "2684", Path.Combine(PathToImages, "pwrh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2685", "2686", Path.Combine(PathToImages, "barrh"), "--building"},
|
||||||
|
// identical wall
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2719", "2720", Path.Combine(PathToImages, "conyardh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2721", "2723", Path.Combine(PathToImages, "refh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2724", "2725", Path.Combine(PathToImages, "hightechh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2726", "2730", Path.Combine(PathToImages, "siloh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2731", "2732", Path.Combine(PathToImages, "repairh"), "--building"},
|
||||||
|
// identical guntower
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2749", "2780", Path.Combine(PathToImages, "gunturreth"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2797", "2828", Path.Combine(PathToImages, "rocketturreth"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2829", "2830", Path.Combine(PathToImages, "researchh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2831", "2832", Path.Combine(PathToImages, "starporth"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2833", "2835", Path.Combine(PathToImages, "lighth"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2836", "2837", Path.Combine(PathToImages, "palaceh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2838", "2840", Path.Combine(PathToImages, "heavyo"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2841", "2842", Path.Combine(PathToImages, "radaro"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2843", "2844", Path.Combine(PathToImages, "pwro"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2845", "2846", Path.Combine(PathToImages, "barro"), "--building"},
|
||||||
|
// identical wall
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2879", "2880", Path.Combine(PathToImages, "conyardo"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2881", "2883", Path.Combine(PathToImages, "refo"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2884", "2885", Path.Combine(PathToImages, "hightecho"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2886", "2890", Path.Combine(PathToImages, "siloo"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2891", "2892", Path.Combine(PathToImages, "repairo"), "--building"},
|
||||||
|
// identical guntower
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2909", "2940", Path.Combine(PathToImages, "gunturreto"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2957", "2988", Path.Combine(PathToImages, "rocketturreto"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2989", "2990", Path.Combine(PathToImages, "researcho"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2991", "2992", Path.Combine(PathToImages, "starporto"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2993", "2995", Path.Combine(PathToImages, "lighto"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "2996", "2997", Path.Combine(PathToImages, "palaceo"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "3549", "3564", Path.Combine(PathToImages, "sandwormmouth")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "3565", "3585", Path.Combine(PathToImages, "sandwormdust")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "3586", "3600", Path.Combine(PathToImages, "wormsigns1")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "3601", "3610", Path.Combine(PathToImages, "wormsigns2")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "3611", "3615", Path.Combine(PathToImages, "wormsigns3")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "3616", "3620", Path.Combine(PathToImages, "wormsigns4")},
|
||||||
|
//new string[] {"--r8", PathToDataR8, PathToPalette, "3679", "3686", "sell"},
|
||||||
|
//explosions and muzzle flash
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4011", "4011", Path.Combine(PathToImages, "rifleicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4012", "4012", Path.Combine(PathToImages, "bazookaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4013", "4013", Path.Combine(PathToImages, "engineericon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4014", "4014", Path.Combine(PathToImages, "thumpericon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4015", "4015", Path.Combine(PathToImages, "sadaukaricon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4016", "4016", Path.Combine(PathToImages, "trikeicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4017", "4017", Path.Combine(PathToImages, "raidericon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4018", "4018", Path.Combine(PathToImages, "quadicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4019", "4019", Path.Combine(PathToImages, "harvestericon")}, // == 4044
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4020", "4020", Path.Combine(PathToImages, "combataicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4021", "4021", Path.Combine(PathToImages, "combathicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4022", "4022", Path.Combine(PathToImages, "combatoicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4023", "4023", Path.Combine(PathToImages, "mcvicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4024", "4024", Path.Combine(PathToImages, "missileicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4025", "4025", Path.Combine(PathToImages, "deviatoricon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4026", "4026", Path.Combine(PathToImages, "siegeicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4027", "4027", Path.Combine(PathToImages, "sonicicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4028", "4028", Path.Combine(PathToImages, "devasticon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4029", "4029", Path.Combine(PathToImages, "carryallicon")}, // == 4030
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4031", "4031", Path.Combine(PathToImages, "orniicon")}, // == 4062
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4032", "4032", Path.Combine(PathToImages, "fremenicon")}, // == 4033
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4034", "4034", Path.Combine(PathToImages, "saboteuricon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4035", "4035", Path.Combine(PathToImages, "deathhandicon")},
|
||||||
|
// "4036..4045 = repetitions
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4046", "4046", Path.Combine(PathToImages, "conyardaicon")}, // == 4049
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4047", "4047", Path.Combine(PathToImages, "conyardhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4048", "4048", Path.Combine(PathToImages, "conyardoicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4050", "4050", Path.Combine(PathToImages, "4plateicon")}, // == 4051..4052
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4053", "4053", Path.Combine(PathToImages, "6plateicon")}, // == 4054..4055
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4056", "4056", Path.Combine(PathToImages, "pwraicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4057", "4057", Path.Combine(PathToImages, "pwrhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4058", "4058", Path.Combine(PathToImages, "pwroicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4059", "4059", Path.Combine(PathToImages, "barraicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4060", "4060", Path.Combine(PathToImages, "barrhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4061", "4061", Path.Combine(PathToImages, "barroicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4063", "4063", Path.Combine(PathToImages, "wallicon")}, // == 4061..4062
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4066", "4066", Path.Combine(PathToImages, "refaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4067", "4067", Path.Combine(PathToImages, "refhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4068", "4068", Path.Combine(PathToImages, "refoicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4069", "4069", Path.Combine(PathToImages, "turreticon")}, // == 4070..4071
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4072", "4072", Path.Combine(PathToImages, "radaraicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4072", "4072", Path.Combine(PathToImages, "radaraicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4073", "4073", Path.Combine(PathToImages, "radarhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4074", "4074", Path.Combine(PathToImages, "radaroicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4075", "4075", Path.Combine(PathToImages, "rturreticon")}, // == 4076..4077
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4078", "4078", Path.Combine(PathToImages, "hightechaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4079", "4079", Path.Combine(PathToImages, "hightechhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4080", "4080", Path.Combine(PathToImages, "hightechoicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4081", "4081", Path.Combine(PathToImages, "lightaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4082", "4082", Path.Combine(PathToImages, "lighthicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4083", "4083", Path.Combine(PathToImages, "lightoicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4084", "4084", Path.Combine(PathToImages, "siloaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4085", "4085", Path.Combine(PathToImages, "silohicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4086", "4086", Path.Combine(PathToImages, "silooicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4087", "4087", Path.Combine(PathToImages, "heavyaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4088", "4088", Path.Combine(PathToImages, "heavyhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4089", "4089", Path.Combine(PathToImages, "heavyoicon")},
|
||||||
|
// 4090 == orniicon
|
||||||
|
// 4091 == heavyhicon
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4092", "4092", Path.Combine(PathToImages, "starportaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4093", "4093", Path.Combine(PathToImages, "starporthicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4094", "4094", Path.Combine(PathToImages, "starportoicon")},
|
||||||
|
// 4095 = orniicon
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4096", "4096", Path.Combine(PathToImages, "repairaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4097", "4097", Path.Combine(PathToImages, "repairhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4098", "4098", Path.Combine(PathToImages, "repairoicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4099", "4099", Path.Combine(PathToImages, "researchaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4100", "4100", Path.Combine(PathToImages, "researchhicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4101", "4101", Path.Combine(PathToImages, "researchoicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4102", "4102", Path.Combine(PathToImages, "palaceaicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4103", "4103", Path.Combine(PathToImages, "palacehicon")},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4104", "4104", Path.Combine(PathToImages, "palaceoicon")},
|
||||||
|
// 4105 = orniicon
|
||||||
|
// 4106..4107 = radaraicon
|
||||||
|
// 4108 = conyardaicon
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4109", "4150", Path.Combine(PathToImages, "conmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4151", "4174", Path.Combine(PathToImages, "wtrpmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4175", "4194", Path.Combine(PathToImages, "barramake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4231", "4253", Path.Combine(PathToImages, "refmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4254", "4273", Path.Combine(PathToImages, "radarmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4274", "4294", Path.Combine(PathToImages, "highmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4295", "4312", Path.Combine(PathToImages, "lightmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4313", "4327", Path.Combine(PathToImages, "silomake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4328", "4346", Path.Combine(PathToImages, "heavymake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4347", "4369", Path.Combine(PathToImages, "starportmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4370", "4390", Path.Combine(PathToImages, "repairmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4391", "4412", Path.Combine(PathToImages, "researchmake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4413", "4435", Path.Combine(PathToImages, "palacemake"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4436", "4449", Path.Combine(PathToImages, "cranea"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4450", "4463", Path.Combine(PathToImages, "craneh"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4463", "4477", Path.Combine(PathToImages, "craneo"), "--building"},
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4760", "4819", Path.Combine(PathToImages, "windtrap_anim"), "--building"}, //?
|
||||||
|
new string[] {"--r8", PathToDataR8, PathToPalette, "4820", "4840", Path.Combine(PathToImages, "missile_launch"), "--building"},
|
||||||
|
new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/MOUSE.R8"), PathToPalette, "0", "264", Path.Combine(PathToImages, "mouse"), "--transparent"},
|
||||||
|
new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBASE.R8"), PathToPalette, "0", "799", Path.Combine(PathToImages, "BASE"), "--tileset"},
|
||||||
|
new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBASE.R8"), PathToPalette, "748", "749", Path.Combine(PathToImages, "spice0")},
|
||||||
|
};
|
||||||
|
|
||||||
|
var SHPsToCreate = new string[][]
|
||||||
|
{
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "overlay.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "crates.png"), "32"},
|
||||||
|
//new string[] {"--shp", Path.Combine(PathToImages, "shadow.png"), "32
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "spicebloom.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rockcrater1.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rockcrater2.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "sandcrater1.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "sandcrater2.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rifle.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rifledeath.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rocket.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "fremen.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "sardaukar.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "engineer.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "thumper.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "missile.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "trike.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "quad.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "harvester.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combata.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "siege.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "dmcv.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "sonic.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combataturret.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "siegeturret.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "carryall.png"), "64"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "orni.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combath.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "devast.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combathturret.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "deathhandmissile.png"), "24"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "saboteur.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "deviator.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "raider.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combato.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combatoturret.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "frigate.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "heavya.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "radara.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "pwra.png"), "64"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "barra.png"), "80"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "wall.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "conyarda.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "refa.png"), "120"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "hightecha.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "siloa.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "repaira.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "guntower.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "gunturret.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rockettower.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rocketturreta.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "researcha.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "starporta.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "lighta.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "palacea.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "heavyh.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "radarh.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "pwrh.png"), "64"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "barrh.png"), "64"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "conyardh.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "refh.png"), "120"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "hightechh.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "siloh.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "repairh.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "gunturreth.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rocketturreth.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "researchh.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "starporth.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "lighth.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "palaceh.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "heavyo.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "radaro.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "pwro.png"), "64"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "barro.png"), "64"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "conyardo.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "refo.png"), "120"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "hightecho.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "siloo.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "repairo.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "gunturreto.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rocketturreto.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "researcho.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "starporto.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "lighto.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "palaceo.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "sandwormmouth.png"), "68"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "sandwormdust.png"), "68"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "wormsigns1.png"), "16"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "wormsigns2.png"), "16"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "wormsigns3.png"), "16"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "wormsigns4.png"), "16"},
|
||||||
|
//new string[] {"--shp", Path.Combine(PathToImages, "sell.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rifleicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "bazookaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "engineericon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "thumpericon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "sadaukaricon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "trikeicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "raidericon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "quadicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "harvestericon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combataicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combathicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "combatoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "mcvicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "missileicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "deviatoricon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "siegeicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "sonicicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "devasticon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "carryallicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "orniicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "fremenicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "saboteuricon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "deathhandicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "conyardaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "conyardhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "conyardoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "4plateicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "6plateicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "pwraicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "pwrhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "pwroicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "barraicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "barrhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "barroicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "wallicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "refaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "refhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "refoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "turreticon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "radaraicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "radarhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "radaroicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "rturreticon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "hightechaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "hightechhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "hightechoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "lightaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "lighthicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "lightoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "siloaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "silohicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "silooicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "heavyaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "heavyhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "heavyoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "starportaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "starporthicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "starportoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "repairaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "repairhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "repairoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "researchaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "researchhicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "researchoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "palaceaicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "palacehicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "palaceoicon.png"), "60"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "conmake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "wtrpmake.png"), "64"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "barramake.png"), "80"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "refmake.png"), "120"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "radarmake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "highmake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "lightmake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "silomake.png"), "32"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "heavymake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "starportmake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "repairmake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "researchmake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "palacemake.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "cranea.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "craneh.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "craneo.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "windtrap_anim.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "missile_launch.png"), "96"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "mouse.png"), "48"},
|
||||||
|
new string[] {"--shp", Path.Combine(PathToImages, "spice0.png"), "32"},
|
||||||
|
};
|
||||||
|
|
||||||
|
var onError = (Action<string>)(s => Game.RunAfterTick(() =>
|
||||||
|
{
|
||||||
|
statusLabel.GetText = () => "Error: "+s;
|
||||||
|
backButton.IsDisabled = () => false;
|
||||||
|
retryButton.IsDisabled = () => false;
|
||||||
|
}));
|
||||||
|
|
||||||
|
var t = new Thread( _ =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
for (int i = 0; i < ExtractGameFiles.Length; i++)
|
||||||
|
{
|
||||||
|
progressBar.Percentage = i*100/ExtractGameFiles.Count();
|
||||||
|
statusLabel.GetText = () => "Extracting...";
|
||||||
|
Utility.Command.ConvertR8ToPng(ExtractGameFiles[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < SHPsToCreate.Length; i++)
|
||||||
|
{
|
||||||
|
progressBar.Percentage = i*100/SHPsToCreate.Count();
|
||||||
|
statusLabel.GetText = () => "Converting...";
|
||||||
|
Utility.Command.ConvertPngToShp(SHPsToCreate[i]);
|
||||||
|
File.Delete(SHPsToCreate[i][1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
File.Delete(Path.Combine(PathToImages, "BASE.tsx"));
|
||||||
|
File.Copy("mods/d2k/tilesets/BASE.tsx", Path.Combine(PathToImages, "BASE.tsx"));
|
||||||
|
// this is ugly: a GUI will open and close immediately after some delay
|
||||||
|
Process.Start("OpenRA.TilesetBuilder.exe", Path.Combine(PathToImages, "BASE.png")+" 32 --export Content/d2k/Tilesets");
|
||||||
|
File.Delete(Path.Combine(PathToImages, "BASE.tsx"));
|
||||||
|
|
||||||
|
Game.RunAfterTick(() =>
|
||||||
|
{
|
||||||
|
progressBar.Percentage = 100;
|
||||||
|
statusLabel.GetText = () => "Extraction and conversion complete.";
|
||||||
|
backButton.IsDisabled = () => false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
onError("Installation failed");
|
||||||
|
}
|
||||||
|
}) { IsBackground = true };
|
||||||
|
t.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ using System.Threading;
|
|||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
using OpenRA.FileFormats.Graphics;
|
using OpenRA.FileFormats.Graphics;
|
||||||
using OpenRA.Widgets;
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Utility;
|
||||||
|
|
||||||
namespace OpenRA.Mods.D2k.Widgets.Logic
|
namespace OpenRA.Mods.D2k.Widgets.Logic
|
||||||
{
|
{
|
||||||
@@ -74,14 +75,16 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
insertDiskContainer.IsVisible = () => false;
|
insertDiskContainer.IsVisible = () => false;
|
||||||
installingContainer.IsVisible = () => true;
|
installingContainer.IsVisible = () => true;
|
||||||
|
|
||||||
var dest = new string[] { Platform.SupportDir, "Content", "d2k" }.Aggregate(Path.Combine);
|
var dest = new string[] { Platform.SupportDir, "Content", "d2k", "Music" }.Aggregate(Path.Combine);
|
||||||
var copyFiles = new string[] { "music/ambush.aud" };
|
var copyFiles = new string[] { "music/ambush.aud", "music/arakatak.aud", "music/atregain.aud", "music/entordos.aud", "music/fightpwr.aud", "music/fremen.aud", "music/hark_bat.aud", "music/landsand.aud", "music/options.aud", "music/plotting.aud", "music/risehark.aud", "music/robotix.aud", "music/score.aud", "music/soldappr.aud", "music/spicesct.aud", "music/undercon.aud", "music/waitgame.aud" };
|
||||||
|
|
||||||
var extractPackage = "setup/setup.z";
|
// TODO: won't work yet:
|
||||||
var extractFiles = new string[] { "DATA.R8", "MOUSE.R8", "BLOXBASE.R8" };
|
//var extractPackage = "setup/setup.z";
|
||||||
|
//var extractFiles = new string[] { "DATA.R8", "MOUSE.R8", "BLOXBASE.R8", "BLOXBAT.R8", "BLOXBGBS.R8", "BLOXICE.R8", "BLOXTREE.R8", "BLOXWAST.R8" };
|
||||||
|
|
||||||
var installCounter = 0;
|
var installCounter = 0;
|
||||||
var installTotal = copyFiles.Count() + extractFiles.Count();
|
var installTotal = copyFiles.Count(); //+ extractFiles.Count();
|
||||||
|
|
||||||
var onProgress = (Action<string>)(s => Game.RunAfterTick(() =>
|
var onProgress = (Action<string>)(s => Game.RunAfterTick(() =>
|
||||||
{
|
{
|
||||||
progressBar.Percentage = installCounter*100/installTotal;
|
progressBar.Percentage = installCounter*100/installTotal;
|
||||||
@@ -104,13 +107,13 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
if (!InstallUtils.CopyFiles(source, copyFiles, dest, onProgress, onError))
|
if (!InstallUtils.CopyFiles(source, copyFiles, dest, onProgress, onError))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, dest, onProgress, onError))
|
//if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, dest, onProgress, onError))
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
Game.RunAfterTick(() =>
|
Game.RunAfterTick(() =>
|
||||||
{
|
{
|
||||||
Ui.CloseWindow();
|
statusLabel.GetText = () => "Music has been copied.";
|
||||||
Game.Exit();
|
backButton.IsDisabled = () => false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|||||||
@@ -26,9 +26,12 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
{ "installData", installData }
|
{ "installData", installData }
|
||||||
};
|
};
|
||||||
|
|
||||||
panel.Get<ButtonWidget>("INSTALL_BUTTON").OnClick = () =>
|
panel.Get<ButtonWidget>("COPY_BUTTON").OnClick = () =>
|
||||||
Ui.OpenWindow("INSTALL_FROMCD_PANEL", args);
|
Ui.OpenWindow("INSTALL_FROMCD_PANEL", args);
|
||||||
|
|
||||||
|
panel.Get<ButtonWidget>("EXTRACT_BUTTON").OnClick = () =>
|
||||||
|
Ui.OpenWindow("EXTRACT_GAMEFILES_PANEL", args);
|
||||||
|
|
||||||
panel.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
|
panel.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<ProjectGuid>{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}</ProjectGuid>
|
<ProjectGuid>{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>OpenRA.TilesetBuilder2</RootNamespace>
|
<RootNamespace>OpenRA.TilesetBuilder</RootNamespace>
|
||||||
<AssemblyName>OpenRA.TilesetBuilder2</AssemblyName>
|
<AssemblyName>OpenRA.TilesetBuilder2</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>..\</OutputPath>
|
<OutputPath>.</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
|||||||
@@ -1,38 +1,38 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
* see COPYING.
|
* see COPYING.
|
||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace OpenRA.TilesetBuilder
|
namespace OpenRA.TilesetBuilder
|
||||||
{
|
{
|
||||||
static class Program
|
static class Program
|
||||||
{
|
{
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
//Console.WriteLine("{0} {1} {2} {3}",args[0], args[1], args[2], args[3]);
|
//Console.WriteLine("{0} {1} {2} {3}",args[0], args[1], args[2], args[3]);
|
||||||
if (args.Length < 1)
|
if (args.Length < 1)
|
||||||
{
|
{
|
||||||
Application.Run(new frmBuilder("", "0", false, "Tilesets"));
|
Application.Run(new frmBuilder("", "0", false, "Tilesets"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (args.Contains("--export"))
|
if (args.Contains("--export"))
|
||||||
Application.Run(new frmBuilder(args[0], args[1], true, args[3]));
|
Application.Run(new frmBuilder(args[0], args[1], true, args[3]));
|
||||||
else
|
else
|
||||||
Application.Run(new frmBuilder(args[0], args[1], false, "Tilesets"));
|
Application.Run(new frmBuilder(args[0], args[1], false, "Tilesets"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,139 +1,139 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace OpenRA.TilesetBuilder
|
namespace OpenRA.TilesetBuilder
|
||||||
{
|
{
|
||||||
class Surface : Control
|
class Surface : Control
|
||||||
{
|
{
|
||||||
public Bitmap Image;
|
public Bitmap Image;
|
||||||
private ImageList ImagesListControl;
|
private ImageList ImagesListControl;
|
||||||
public int[,] TerrainTypes;
|
public int[,] TerrainTypes;
|
||||||
public List<Template> Templates = new List<Template>();
|
public List<Template> Templates = new List<Template>();
|
||||||
private bool bShowTerrainTypes;
|
private bool bShowTerrainTypes;
|
||||||
public string InputMode;
|
public string InputMode;
|
||||||
public Bitmap[] icon;
|
public Bitmap[] icon;
|
||||||
public int TileSize;
|
public int TileSize;
|
||||||
//private System.ComponentModel.IContainer components;
|
//private System.ComponentModel.IContainer components;
|
||||||
|
|
||||||
Template CurrentTemplate;
|
Template CurrentTemplate;
|
||||||
|
|
||||||
public bool ShowTerrainTypes
|
public bool ShowTerrainTypes
|
||||||
{
|
{
|
||||||
get { return bShowTerrainTypes; }
|
get { return bShowTerrainTypes; }
|
||||||
set { bShowTerrainTypes = value; }
|
set { bShowTerrainTypes = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageList ImagesList
|
public ImageList ImagesList
|
||||||
{
|
{
|
||||||
get { return ImagesListControl; }
|
get { return ImagesListControl; }
|
||||||
set { ImagesListControl = value; }
|
set { ImagesListControl = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public Surface()
|
public Surface()
|
||||||
{
|
{
|
||||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||||
SetStyle(ControlStyles.ResizeRedraw, true);
|
SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
UpdateStyles();
|
UpdateStyles();
|
||||||
}
|
}
|
||||||
|
|
||||||
Brush currentBrush = new SolidBrush(Color.FromArgb(60, Color.White));
|
Brush currentBrush = new SolidBrush(Color.FromArgb(60, Color.White));
|
||||||
|
|
||||||
protected override void OnPaint(PaintEventArgs e)
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
{
|
{
|
||||||
if (Image == null || TerrainTypes == null || Templates == null)
|
if (Image == null || TerrainTypes == null || Templates == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* draw the background */
|
/* draw the background */
|
||||||
e.Graphics.DrawImageUnscaled(Image, 0, 0);
|
e.Graphics.DrawImageUnscaled(Image, 0, 0);
|
||||||
/* draw terrain type overlays */
|
/* draw terrain type overlays */
|
||||||
if (ShowTerrainTypes)
|
if (ShowTerrainTypes)
|
||||||
{
|
{
|
||||||
for (var i = 0; i <= TerrainTypes.GetUpperBound(0); i++)
|
for (var i = 0; i <= TerrainTypes.GetUpperBound(0); i++)
|
||||||
for (var j = 0; j <= TerrainTypes.GetUpperBound(1); j++)
|
for (var j = 0; j <= TerrainTypes.GetUpperBound(1); j++)
|
||||||
if (TerrainTypes[i, j] != 0)
|
if (TerrainTypes[i, j] != 0)
|
||||||
{
|
{
|
||||||
//e.Graphics.FillRectangle(Brushes.Black, TileSize * i + 8, TileSize * j + 8, 16, 16);
|
//e.Graphics.FillRectangle(Brushes.Black, TileSize * i + 8, TileSize * j + 8, 16, 16);
|
||||||
|
|
||||||
e.Graphics.DrawImage(icon[TerrainTypes[i, j]], TileSize * i + 8, TileSize * j + 8, 16, 16);
|
e.Graphics.DrawImage(icon[TerrainTypes[i, j]], TileSize * i + 8, TileSize * j + 8, 16, 16);
|
||||||
|
|
||||||
//e.Graphics.DrawString(TerrainTypes[i, j].ToString(),
|
//e.Graphics.DrawString(TerrainTypes[i, j].ToString(),
|
||||||
//Font, Brushes.LimeGreen, TileSize * i + 10, TileSize * j + 10);
|
//Font, Brushes.LimeGreen, TileSize * i + 10, TileSize * j + 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draw template outlines */
|
/* draw template outlines */
|
||||||
foreach (var t in Templates)
|
foreach (var t in Templates)
|
||||||
{
|
{
|
||||||
foreach (var c in t.Cells.Keys)
|
foreach (var c in t.Cells.Keys)
|
||||||
{
|
{
|
||||||
if (CurrentTemplate == t)
|
if (CurrentTemplate == t)
|
||||||
e.Graphics.FillRectangle(currentBrush, TileSize * c.X, TileSize * c.Y, TileSize, TileSize);
|
e.Graphics.FillRectangle(currentBrush, TileSize * c.X, TileSize * c.Y, TileSize, TileSize);
|
||||||
|
|
||||||
if (!t.Cells.ContainsKey(c + new int2(-1, 0)))
|
if (!t.Cells.ContainsKey(c + new int2(-1, 0)))
|
||||||
e.Graphics.DrawLine(Pens.Red, (TileSize * c).ToPoint(), (TileSize * (c + new int2(0, 1))).ToPoint());
|
e.Graphics.DrawLine(Pens.Red, (TileSize * c).ToPoint(), (TileSize * (c + new int2(0, 1))).ToPoint());
|
||||||
if (!t.Cells.ContainsKey(c + new int2(+1, 0)))
|
if (!t.Cells.ContainsKey(c + new int2(+1, 0)))
|
||||||
e.Graphics.DrawLine(Pens.Red, (TileSize * (c + new int2(1, 0))).ToPoint(), (TileSize * (c + new int2(1, 1))).ToPoint());
|
e.Graphics.DrawLine(Pens.Red, (TileSize * (c + new int2(1, 0))).ToPoint(), (TileSize * (c + new int2(1, 1))).ToPoint());
|
||||||
if (!t.Cells.ContainsKey(c + new int2(0, +1)))
|
if (!t.Cells.ContainsKey(c + new int2(0, +1)))
|
||||||
e.Graphics.DrawLine(Pens.Red, (TileSize * (c + new int2(0, 1))).ToPoint(), (TileSize * (c + new int2(1, 1))).ToPoint());
|
e.Graphics.DrawLine(Pens.Red, (TileSize * (c + new int2(0, 1))).ToPoint(), (TileSize * (c + new int2(1, 1))).ToPoint());
|
||||||
if (!t.Cells.ContainsKey(c + new int2(0, -1)))
|
if (!t.Cells.ContainsKey(c + new int2(0, -1)))
|
||||||
e.Graphics.DrawLine(Pens.Red, (TileSize * c).ToPoint(), (TileSize * (c + new int2(1, 0))).ToPoint());
|
e.Graphics.DrawLine(Pens.Red, (TileSize * c).ToPoint(), (TileSize * (c + new int2(1, 0))).ToPoint());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
var pos = new int2(e.X / TileSize, e.Y / TileSize);
|
var pos = new int2(e.X / TileSize, e.Y / TileSize);
|
||||||
|
|
||||||
if (InputMode == null)
|
if (InputMode == null)
|
||||||
{
|
{
|
||||||
if (e.Button == MouseButtons.Left)
|
if (e.Button == MouseButtons.Left)
|
||||||
{
|
{
|
||||||
CurrentTemplate = Templates.FirstOrDefault(t => t.Cells.ContainsKey(pos));
|
CurrentTemplate = Templates.FirstOrDefault(t => t.Cells.ContainsKey(pos));
|
||||||
if (CurrentTemplate == null)
|
if (CurrentTemplate == null)
|
||||||
Templates.Add(CurrentTemplate = new Template { Cells = new Dictionary<int2, bool> { { pos, true } } });
|
Templates.Add(CurrentTemplate = new Template { Cells = new Dictionary<int2, bool> { { pos, true } } });
|
||||||
|
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Right)
|
if (e.Button == MouseButtons.Right)
|
||||||
{
|
{
|
||||||
Templates.RemoveAll(t => t.Cells.ContainsKey(pos));
|
Templates.RemoveAll(t => t.Cells.ContainsKey(pos));
|
||||||
CurrentTemplate = null;
|
CurrentTemplate = null;
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TerrainTypes[pos.X, pos.Y] = int.Parse(InputMode);
|
TerrainTypes[pos.X, pos.Y] = int.Parse(InputMode);
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
var pos = new int2(e.X / TileSize, e.Y / TileSize);
|
var pos = new int2(e.X / TileSize, e.Y / TileSize);
|
||||||
|
|
||||||
if (InputMode == null)
|
if (InputMode == null)
|
||||||
{
|
{
|
||||||
if (e.Button == MouseButtons.Left && CurrentTemplate != null)
|
if (e.Button == MouseButtons.Left && CurrentTemplate != null)
|
||||||
{
|
{
|
||||||
if (!CurrentTemplate.Cells.ContainsKey(pos))
|
if (!CurrentTemplate.Cells.ContainsKey(pos))
|
||||||
{
|
{
|
||||||
CurrentTemplate.Cells[pos] = true;
|
CurrentTemplate.Cells[pos] = true;
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace OpenRA.TilesetBuilder
|
namespace OpenRA.TilesetBuilder
|
||||||
{
|
{
|
||||||
class Template
|
class Template
|
||||||
{
|
{
|
||||||
public Dictionary<int2, bool> Cells = new Dictionary<int2, bool>();
|
public Dictionary<int2, bool> Cells = new Dictionary<int2, bool>();
|
||||||
|
|
||||||
public int Left { get { return Cells.Keys.Min(c => c.X); } }
|
public int Left { get { return Cells.Keys.Min(c => c.X); } }
|
||||||
public int Top { get { return Cells.Keys.Min(c => c.Y); } }
|
public int Top { get { return Cells.Keys.Min(c => c.Y); } }
|
||||||
|
|
||||||
public int Right { get { return Cells.Keys.Max(c => c.X) + 1; } }
|
public int Right { get { return Cells.Keys.Max(c => c.X) + 1; } }
|
||||||
public int Bottom { get { return Cells.Keys.Max(c => c.Y) + 1; } }
|
public int Bottom { get { return Cells.Keys.Max(c => c.Y) + 1; } }
|
||||||
|
|
||||||
public int Width { get { return Right - Left; } }
|
public int Width { get { return Right - Left; } }
|
||||||
public int Height { get { return Bottom - Top; } }
|
public int Height { get { return Bottom - Top; } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,455 +1,455 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2012 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2012 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
* see COPYING.
|
* see COPYING.
|
||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
|
|
||||||
namespace OpenRA.TilesetBuilder
|
namespace OpenRA.TilesetBuilder
|
||||||
{
|
{
|
||||||
public partial class frmBuilder : Form
|
public partial class frmBuilder : Form
|
||||||
{
|
{
|
||||||
string srcfile;
|
string srcfile;
|
||||||
int size;
|
int size;
|
||||||
public TerrainTypeInfo[] TerrainType;
|
public TerrainTypeInfo[] TerrainType;
|
||||||
public Palette tpal;
|
public Palette tpal;
|
||||||
public bool PaletteFromImage = true;
|
public bool PaletteFromImage = true;
|
||||||
public string PaletteFile = "";
|
public string PaletteFile = "";
|
||||||
public string ImageFile = "";
|
public string ImageFile = "";
|
||||||
public int TileSize = 24;
|
public int TileSize = 24;
|
||||||
|
|
||||||
private int ColorDiff(Color color, Color curr)
|
private int ColorDiff(Color color, Color curr)
|
||||||
{
|
{
|
||||||
return Math.Abs(color.R - curr.R) + Math.Abs(color.G - curr.G) + Math.Abs(color.B - curr.B);
|
return Math.Abs(color.R - curr.R) + Math.Abs(color.G - curr.G) + Math.Abs(color.B - curr.B);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateNewTileset()
|
public void CreateNewTileset()
|
||||||
{
|
{
|
||||||
this.Show();
|
this.Show();
|
||||||
using (var fNew = new frmNew { })
|
using (var fNew = new frmNew { })
|
||||||
if (DialogResult.OK == fNew.ShowDialog())
|
if (DialogResult.OK == fNew.ShowDialog())
|
||||||
{
|
{
|
||||||
PaletteFromImage = fNew.PaletteFromImage;
|
PaletteFromImage = fNew.PaletteFromImage;
|
||||||
PaletteFile = fNew.PaletteFile;
|
PaletteFile = fNew.PaletteFile;
|
||||||
ImageFile = fNew.ImageFile;
|
ImageFile = fNew.ImageFile;
|
||||||
TileSize = fNew.TileSize;
|
TileSize = fNew.TileSize;
|
||||||
|
|
||||||
srcfile = ImageFile;
|
srcfile = ImageFile;
|
||||||
this.size = TileSize;
|
this.size = TileSize;
|
||||||
surface1.TileSize = TileSize;
|
surface1.TileSize = TileSize;
|
||||||
|
|
||||||
Bitmap fbitmap = new Bitmap(ImageFile);
|
Bitmap fbitmap = new Bitmap(ImageFile);
|
||||||
Bitmap rbitmap = fbitmap.Clone(new Rectangle(0, 0, fbitmap.Width, fbitmap.Height),
|
Bitmap rbitmap = fbitmap.Clone(new Rectangle(0, 0, fbitmap.Width, fbitmap.Height),
|
||||||
fbitmap.PixelFormat);
|
fbitmap.PixelFormat);
|
||||||
|
|
||||||
if (!PaletteFromImage)
|
if (!PaletteFromImage)
|
||||||
{
|
{
|
||||||
tpal = Palette.Load(PaletteFile, false);
|
tpal = Palette.Load(PaletteFile, false);
|
||||||
rbitmap.Palette = tpal.AsSystemPalette();
|
rbitmap.Palette = tpal.AsSystemPalette();
|
||||||
}
|
}
|
||||||
|
|
||||||
surface1.Image = (Bitmap)rbitmap;
|
surface1.Image = (Bitmap)rbitmap;
|
||||||
surface1.Image.SetResolution(96, 96); // people keep being noobs about DPI, and GDI+ cares.
|
surface1.Image.SetResolution(96, 96); // people keep being noobs about DPI, and GDI+ cares.
|
||||||
surface1.TerrainTypes = new int[surface1.Image.Width / size, surface1.Image.Height / size]; /* all passable by default */
|
surface1.TerrainTypes = new int[surface1.Image.Width / size, surface1.Image.Height / size]; /* all passable by default */
|
||||||
surface1.Templates = new List<Template>();
|
surface1.Templates = new List<Template>();
|
||||||
surface1.Size = surface1.Image.Size;
|
surface1.Size = surface1.Image.Size;
|
||||||
surface1.Enabled = true;
|
surface1.Enabled = true;
|
||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public frmBuilder(string src, string tsize, bool AutoExport, string OutputDir)
|
public frmBuilder(string src, string tsize, bool AutoExport, string OutputDir)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Dictionary<string, TerrainTypeInfo> DefTerrain = new Dictionary<string, TerrainTypeInfo>();
|
Dictionary<string, TerrainTypeInfo> DefTerrain = new Dictionary<string, TerrainTypeInfo>();
|
||||||
|
|
||||||
int size = int.Parse(tsize);
|
int size = int.Parse(tsize);
|
||||||
|
|
||||||
var yaml = MiniYaml.DictFromFile("OpenRA.TilesetBuilder/defaults.yaml");
|
var yaml = MiniYaml.DictFromFile("OpenRA.TilesetBuilder/defaults.yaml");
|
||||||
DefTerrain = yaml["Terrain"].NodesDict.Values.Select(y => new TerrainTypeInfo(y)).ToDictionary(t => t.Type);
|
DefTerrain = yaml["Terrain"].NodesDict.Values.Select(y => new TerrainTypeInfo(y)).ToDictionary(t => t.Type);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
surface1.icon = new Bitmap[DefTerrain.Keys.Count];
|
surface1.icon = new Bitmap[DefTerrain.Keys.Count];
|
||||||
TerrainType = new TerrainTypeInfo[DefTerrain.Keys.Count];
|
TerrainType = new TerrainTypeInfo[DefTerrain.Keys.Count];
|
||||||
surface1.Enabled = false;
|
surface1.Enabled = false;
|
||||||
foreach (var deftype in DefTerrain)
|
foreach (var deftype in DefTerrain)
|
||||||
{
|
{
|
||||||
Bitmap icon = new Bitmap(16, 16);
|
Bitmap icon = new Bitmap(16, 16);
|
||||||
int x, y;
|
int x, y;
|
||||||
// Loop through the images pixels to reset color.
|
// Loop through the images pixels to reset color.
|
||||||
for (x = 0; x < icon.Width; x++)
|
for (x = 0; x < icon.Width; x++)
|
||||||
{
|
{
|
||||||
for (y = 0; y < icon.Height; y++)
|
for (y = 0; y < icon.Height; y++)
|
||||||
{
|
{
|
||||||
Color newColor = deftype.Value.Color;
|
Color newColor = deftype.Value.Color;
|
||||||
icon.SetPixel(x, y, newColor);
|
icon.SetPixel(x, y, newColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
surface1.icon[i] = icon;
|
surface1.icon[i] = icon;
|
||||||
TerrainType[i] = deftype.Value;
|
TerrainType[i] = deftype.Value;
|
||||||
|
|
||||||
ToolStripButton TerrainTypeButton = new ToolStripButton(deftype.Key, icon, TerrainTypeSelectorClicked);
|
ToolStripButton TerrainTypeButton = new ToolStripButton(deftype.Key, icon, TerrainTypeSelectorClicked);
|
||||||
TerrainTypeButton.ToolTipText = deftype.Key;
|
TerrainTypeButton.ToolTipText = deftype.Key;
|
||||||
TerrainTypeButton.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText;
|
TerrainTypeButton.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText;
|
||||||
TerrainTypeButton.Tag = i.ToString();
|
TerrainTypeButton.Tag = i.ToString();
|
||||||
i++;
|
i++;
|
||||||
tsTerrainTypes.Items.Add(TerrainTypeButton);
|
tsTerrainTypes.Items.Add(TerrainTypeButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src.Length > 0)
|
if (src.Length > 0)
|
||||||
{
|
{
|
||||||
srcfile = src;
|
srcfile = src;
|
||||||
this.size = size;
|
this.size = size;
|
||||||
surface1.TileSize = size;
|
surface1.TileSize = size;
|
||||||
surface1.Image = (Bitmap)Image.FromFile(src);
|
surface1.Image = (Bitmap)Image.FromFile(src);
|
||||||
surface1.Image.SetResolution(96, 96); // people keep being noobs about DPI, and GDI+ cares.
|
surface1.Image.SetResolution(96, 96); // people keep being noobs about DPI, and GDI+ cares.
|
||||||
surface1.TerrainTypes = new int[surface1.Image.Width / size, surface1.Image.Height / size]; /* all passable by default */
|
surface1.TerrainTypes = new int[surface1.Image.Width / size, surface1.Image.Height / size]; /* all passable by default */
|
||||||
surface1.Templates = new List<Template>();
|
surface1.Templates = new List<Template>();
|
||||||
surface1.Size = surface1.Image.Size;
|
surface1.Size = surface1.Image.Size;
|
||||||
surface1.Enabled = true;
|
surface1.Enabled = true;
|
||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CreateNewTileset();
|
CreateNewTileset();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AutoExport)
|
if (AutoExport)
|
||||||
{
|
{
|
||||||
Export(OutputDir);
|
Export(OutputDir);
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public new void Load()
|
public new void Load()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var doc = new XmlDocument();
|
var doc = new XmlDocument();
|
||||||
doc.Load(Path.ChangeExtension(srcfile, "tsx"));
|
doc.Load(Path.ChangeExtension(srcfile, "tsx"));
|
||||||
|
|
||||||
foreach (var e in doc.SelectNodes("//name").OfType<XmlElement>())
|
foreach (var e in doc.SelectNodes("//name").OfType<XmlElement>())
|
||||||
txtTilesetName.Text = e.GetAttribute("value");
|
txtTilesetName.Text = e.GetAttribute("value");
|
||||||
|
|
||||||
foreach (var e in doc.SelectNodes("//terrain").OfType<XmlElement>())
|
foreach (var e in doc.SelectNodes("//terrain").OfType<XmlElement>())
|
||||||
surface1.TerrainTypes[int.Parse(e.GetAttribute("x")),
|
surface1.TerrainTypes[int.Parse(e.GetAttribute("x")),
|
||||||
int.Parse(e.GetAttribute("y"))] = int.Parse(e.GetAttribute("t"));
|
int.Parse(e.GetAttribute("y"))] = int.Parse(e.GetAttribute("t"));
|
||||||
|
|
||||||
foreach (var e in doc.SelectNodes("//template").OfType<XmlElement>())
|
foreach (var e in doc.SelectNodes("//template").OfType<XmlElement>())
|
||||||
surface1.Templates.Add(new Template
|
surface1.Templates.Add(new Template
|
||||||
{
|
{
|
||||||
Cells = e.SelectNodes("./cell").OfType<XmlElement>()
|
Cells = e.SelectNodes("./cell").OfType<XmlElement>()
|
||||||
.Select(f => new int2(int.Parse(f.GetAttribute("x")), int.Parse(f.GetAttribute("y"))))
|
.Select(f => new int2(int.Parse(f.GetAttribute("x")), int.Parse(f.GetAttribute("y"))))
|
||||||
.ToDictionary(a => a, a => true)
|
.ToDictionary(a => a, a => true)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
using (var w = XmlWriter.Create(Path.ChangeExtension(srcfile,"tsx"),
|
using (var w = XmlWriter.Create(Path.ChangeExtension(srcfile,"tsx"),
|
||||||
new XmlWriterSettings { Indent = true, IndentChars = " " }))
|
new XmlWriterSettings { Indent = true, IndentChars = " " }))
|
||||||
{
|
{
|
||||||
var tilesetName = txtTilesetName.Text;
|
var tilesetName = txtTilesetName.Text;
|
||||||
|
|
||||||
if (tilesetName.Length < 1) { tilesetName = "Temperat"; }
|
if (tilesetName.Length < 1) { tilesetName = "Temperat"; }
|
||||||
|
|
||||||
w.WriteStartDocument();
|
w.WriteStartDocument();
|
||||||
|
|
||||||
w.WriteStartElement("tileset");
|
w.WriteStartElement("tileset");
|
||||||
w.WriteStartElement("name");
|
w.WriteStartElement("name");
|
||||||
w.WriteAttributeString("value", tilesetName);
|
w.WriteAttributeString("value", tilesetName);
|
||||||
w.WriteEndElement();
|
w.WriteEndElement();
|
||||||
|
|
||||||
for( var i = 0; i <= surface1.TerrainTypes.GetUpperBound(0); i++ )
|
for( var i = 0; i <= surface1.TerrainTypes.GetUpperBound(0); i++ )
|
||||||
for( var j = 0; j <= surface1.TerrainTypes.GetUpperBound(1); j++ )
|
for( var j = 0; j <= surface1.TerrainTypes.GetUpperBound(1); j++ )
|
||||||
if (surface1.TerrainTypes[i, j] != 0)
|
if (surface1.TerrainTypes[i, j] != 0)
|
||||||
{
|
{
|
||||||
w.WriteStartElement("terrain");
|
w.WriteStartElement("terrain");
|
||||||
w.WriteAttributeString("x", i.ToString());
|
w.WriteAttributeString("x", i.ToString());
|
||||||
w.WriteAttributeString("y", j.ToString());
|
w.WriteAttributeString("y", j.ToString());
|
||||||
w.WriteAttributeString("t", surface1.TerrainTypes[i, j].ToString());
|
w.WriteAttributeString("t", surface1.TerrainTypes[i, j].ToString());
|
||||||
w.WriteEndElement();
|
w.WriteEndElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var t in surface1.Templates)
|
foreach (var t in surface1.Templates)
|
||||||
{
|
{
|
||||||
w.WriteStartElement("template");
|
w.WriteStartElement("template");
|
||||||
|
|
||||||
foreach (var c in t.Cells.Keys)
|
foreach (var c in t.Cells.Keys)
|
||||||
{
|
{
|
||||||
w.WriteStartElement("cell");
|
w.WriteStartElement("cell");
|
||||||
w.WriteAttributeString("x", c.X.ToString());
|
w.WriteAttributeString("x", c.X.ToString());
|
||||||
w.WriteAttributeString("y", c.Y.ToString());
|
w.WriteAttributeString("y", c.Y.ToString());
|
||||||
w.WriteEndElement();
|
w.WriteEndElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
w.WriteEndElement();
|
w.WriteEndElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
w.WriteEndElement();
|
w.WriteEndElement();
|
||||||
w.WriteEndDocument();
|
w.WriteEndDocument();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TerrainTypeSelectorClicked(object sender, EventArgs e)
|
void TerrainTypeSelectorClicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
surface1.InputMode = (sender as ToolStripButton).Tag as string;
|
surface1.InputMode = (sender as ToolStripButton).Tag as string;
|
||||||
foreach (var tsb in (sender as ToolStripButton).Owner.Items.OfType<ToolStripButton>())
|
foreach (var tsb in (sender as ToolStripButton).Owner.Items.OfType<ToolStripButton>())
|
||||||
tsb.Checked = false;
|
tsb.Checked = false;
|
||||||
(sender as ToolStripButton).Checked = true;
|
(sender as ToolStripButton).Checked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveClicked(object sender, EventArgs e) { Save(); }
|
void SaveClicked(object sender, EventArgs e) { Save(); }
|
||||||
void ShowOverlaysClicked(object sender, EventArgs e)
|
void ShowOverlaysClicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (surface1.ShowTerrainTypes == false)
|
if (surface1.ShowTerrainTypes == false)
|
||||||
{
|
{
|
||||||
surface1.ShowTerrainTypes = true;
|
surface1.ShowTerrainTypes = true;
|
||||||
this.Refresh();
|
this.Refresh();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
surface1.ShowTerrainTypes = false;
|
surface1.ShowTerrainTypes = false;
|
||||||
this.Refresh();
|
this.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportClicked(object sender, EventArgs e)
|
void ExportClicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Export("Tilesets");
|
Export("Tilesets");
|
||||||
}
|
}
|
||||||
|
|
||||||
string ExportPalette(List<Color> p, string file)
|
string ExportPalette(List<Color> p, string file)
|
||||||
{
|
{
|
||||||
while (p.Count < 256) p.Add(Color.Black); // pad the palette out with extra blacks
|
while (p.Count < 256) p.Add(Color.Black); // pad the palette out with extra blacks
|
||||||
var paletteData = p.Take(256).SelectMany(
|
var paletteData = p.Take(256).SelectMany(
|
||||||
c => new byte[] { (byte)(c.R >> 2), (byte)(c.G >> 2), (byte)(c.B >> 2) }).ToArray();
|
c => new byte[] { (byte)(c.R >> 2), (byte)(c.G >> 2), (byte)(c.B >> 2) }).ToArray();
|
||||||
File.WriteAllBytes(file, paletteData);
|
File.WriteAllBytes(file, paletteData);
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
string ExportTemplate(Template t, int n, string suffix, string dir)
|
string ExportTemplate(Template t, int n, string suffix, string dir)
|
||||||
{
|
{
|
||||||
var TileSize = size;
|
var TileSize = size;
|
||||||
var filename = Path.Combine(dir, "t{0:00}{1}".F(n, suffix));
|
var filename = Path.Combine(dir, "t{0:00}{1}".F(n, suffix));
|
||||||
var totalTiles = t.Width * t.Height;
|
var totalTiles = t.Width * t.Height;
|
||||||
|
|
||||||
var ms = new MemoryStream();
|
var ms = new MemoryStream();
|
||||||
using (var bw = new BinaryWriter(ms))
|
using (var bw = new BinaryWriter(ms))
|
||||||
{
|
{
|
||||||
bw.Write((ushort)TileSize);
|
bw.Write((ushort)TileSize);
|
||||||
bw.Write((ushort)TileSize);
|
bw.Write((ushort)TileSize);
|
||||||
bw.Write((uint)totalTiles);
|
bw.Write((uint)totalTiles);
|
||||||
bw.Write((ushort)t.Width);
|
bw.Write((ushort)t.Width);
|
||||||
bw.Write((ushort)t.Height);
|
bw.Write((ushort)t.Height);
|
||||||
bw.Write((uint)0); // filesize placeholder
|
bw.Write((uint)0); // filesize placeholder
|
||||||
bw.Flush();
|
bw.Flush();
|
||||||
bw.Write((uint)ms.Position + 24); // image start
|
bw.Write((uint)ms.Position + 24); // image start
|
||||||
bw.Write((uint)0); // 0 (32bits)
|
bw.Write((uint)0); // 0 (32bits)
|
||||||
bw.Write((uint)0x2c730f8c); // magic?
|
bw.Write((uint)0x2c730f8c); // magic?
|
||||||
bw.Write((uint)0); // flags start
|
bw.Write((uint)0); // flags start
|
||||||
bw.Write((uint)0); // walk start
|
bw.Write((uint)0); // walk start
|
||||||
bw.Write((uint)0); // index start
|
bw.Write((uint)0); // index start
|
||||||
|
|
||||||
Bitmap src = surface1.Image.Clone(new Rectangle(0, 0, surface1.Image.Width, surface1.Image.Height),
|
Bitmap src = surface1.Image.Clone(new Rectangle(0, 0, surface1.Image.Width, surface1.Image.Height),
|
||||||
surface1.Image.PixelFormat);
|
surface1.Image.PixelFormat);
|
||||||
|
|
||||||
var data = src.LockBits(new Rectangle(0, 0, src.Width, src.Height),
|
var data = src.LockBits(new Rectangle(0, 0, src.Width, src.Height),
|
||||||
ImageLockMode.ReadOnly, src.PixelFormat);
|
ImageLockMode.ReadOnly, src.PixelFormat);
|
||||||
|
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
byte* p = (byte*)data.Scan0;
|
byte* p = (byte*)data.Scan0;
|
||||||
|
|
||||||
for (var v = 0; v < t.Height; v++)
|
for (var v = 0; v < t.Height; v++)
|
||||||
for (var u = 0; u < t.Width; u++)
|
for (var u = 0; u < t.Width; u++)
|
||||||
{
|
{
|
||||||
if (t.Cells.ContainsKey(new int2(u + t.Left, v + t.Top)))
|
if (t.Cells.ContainsKey(new int2(u + t.Left, v + t.Top)))
|
||||||
{
|
{
|
||||||
byte* q = p + data.Stride * TileSize * (v + t.Top) + TileSize * (u + t.Left);
|
byte* q = p + data.Stride * TileSize * (v + t.Top) + TileSize * (u + t.Left);
|
||||||
for (var j = 0; j < TileSize; j++)
|
for (var j = 0; j < TileSize; j++)
|
||||||
for (var i = 0; i < TileSize; i++)
|
for (var i = 0; i < TileSize; i++)
|
||||||
{
|
{
|
||||||
bw.Write(q[i + j * data.Stride]);
|
bw.Write(q[i + j * data.Stride]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (var x = 0; x < TileSize * TileSize; x++)
|
for (var x = 0; x < TileSize * TileSize; x++)
|
||||||
bw.Write((byte)0); /* todo: don't fill with air */
|
bw.Write((byte)0); /* todo: don't fill with air */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
src.UnlockBits(data);
|
src.UnlockBits(data);
|
||||||
|
|
||||||
bw.Flush();
|
bw.Flush();
|
||||||
var indexStart = ms.Position;
|
var indexStart = ms.Position;
|
||||||
for (var v = 0; v < t.Height; v++)
|
for (var v = 0; v < t.Height; v++)
|
||||||
for (var u = 0; u < t.Width; u++)
|
for (var u = 0; u < t.Width; u++)
|
||||||
bw.Write(t.Cells.ContainsKey(new int2(u + t.Left, v + t.Top))
|
bw.Write(t.Cells.ContainsKey(new int2(u + t.Left, v + t.Top))
|
||||||
? (byte)(u + t.Width * v)
|
? (byte)(u + t.Width * v)
|
||||||
: (byte)0xff);
|
: (byte)0xff);
|
||||||
|
|
||||||
bw.Flush();
|
bw.Flush();
|
||||||
|
|
||||||
var flagsStart = ms.Position;
|
var flagsStart = ms.Position;
|
||||||
for (var x = 0; x < totalTiles; x++ )
|
for (var x = 0; x < totalTiles; x++ )
|
||||||
bw.Write((byte)0);
|
bw.Write((byte)0);
|
||||||
|
|
||||||
bw.Flush();
|
bw.Flush();
|
||||||
|
|
||||||
var walkStart = ms.Position;
|
var walkStart = ms.Position;
|
||||||
for (var x = 0; x < totalTiles; x++)
|
for (var x = 0; x < totalTiles; x++)
|
||||||
bw.Write((byte)0x8);
|
bw.Write((byte)0x8);
|
||||||
|
|
||||||
var bytes = ms.ToArray();
|
var bytes = ms.ToArray();
|
||||||
Array.Copy(BitConverter.GetBytes((uint)bytes.Length), 0, bytes, 12, 4);
|
Array.Copy(BitConverter.GetBytes((uint)bytes.Length), 0, bytes, 12, 4);
|
||||||
Array.Copy(BitConverter.GetBytes(flagsStart), 0, bytes, 28, 4);
|
Array.Copy(BitConverter.GetBytes(flagsStart), 0, bytes, 28, 4);
|
||||||
Array.Copy(BitConverter.GetBytes(walkStart), 0, bytes, 32, 4);
|
Array.Copy(BitConverter.GetBytes(walkStart), 0, bytes, 32, 4);
|
||||||
Array.Copy(BitConverter.GetBytes(indexStart), 0, bytes, 36, 4);
|
Array.Copy(BitConverter.GetBytes(indexStart), 0, bytes, 36, 4);
|
||||||
|
|
||||||
File.WriteAllBytes(filename, bytes);
|
File.WriteAllBytes(filename, bytes);
|
||||||
}
|
}
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Export (string OutputDir)
|
public void Export (string OutputDir)
|
||||||
{
|
{
|
||||||
var dir = Path.Combine(Path.GetDirectoryName(srcfile), Platform.SupportDir+OutputDir);
|
var dir = Path.Combine(Path.GetDirectoryName(srcfile), Platform.SupportDir+OutputDir);
|
||||||
Directory.CreateDirectory(dir);
|
Directory.CreateDirectory(dir);
|
||||||
var tilesetName = txtTilesetName.Text;
|
var tilesetName = txtTilesetName.Text;
|
||||||
var tilesetID = txtID.Text;
|
var tilesetID = txtID.Text;
|
||||||
var tilesetPalette = txtPal.Text;
|
var tilesetPalette = txtPal.Text;
|
||||||
var tilesetExt = txtExt.Text;
|
var tilesetExt = txtExt.Text;
|
||||||
|
|
||||||
if (tilesetName.Length < 1) { tilesetName = "Temperat"; }
|
if (tilesetName.Length < 1) { tilesetName = "Temperat"; }
|
||||||
if (tilesetID.Length < 1) { tilesetID = "TEMPERAT"; }
|
if (tilesetID.Length < 1) { tilesetID = "TEMPERAT"; }
|
||||||
if (tilesetPalette.Length < 1) { tilesetPalette = "temperat"; }
|
if (tilesetPalette.Length < 1) { tilesetPalette = "temperat"; }
|
||||||
if (tilesetExt.Length < 1) { tilesetExt = ".tem,.shp"; }
|
if (tilesetExt.Length < 1) { tilesetExt = ".tem,.shp"; }
|
||||||
// Create a Tileset definition
|
// Create a Tileset definition
|
||||||
// Todo: Pull this info from the GUI
|
// Todo: Pull this info from the GUI
|
||||||
var tilesetFile = "";
|
var tilesetFile = "";
|
||||||
//var mixFile = "";
|
//var mixFile = "";
|
||||||
tilesetFile = tilesetName.ToLower();
|
tilesetFile = tilesetName.ToLower();
|
||||||
if (tilesetFile.Length < 8)
|
if (tilesetFile.Length < 8)
|
||||||
{
|
{
|
||||||
tilesetFile = tilesetName.ToLower() + ".yaml";
|
tilesetFile = tilesetName.ToLower() + ".yaml";
|
||||||
//mixFile = tilesetName.ToLower() + ".mix";
|
//mixFile = tilesetName.ToLower() + ".mix";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tilesetFile = tilesetName.ToLower().Substring(0, 8) + ".yaml";
|
tilesetFile = tilesetName.ToLower().Substring(0, 8) + ".yaml";
|
||||||
//mixFile = tilesetName.ToLower().Substring(0, 8) + ".mix";
|
//mixFile = tilesetName.ToLower().Substring(0, 8) + ".mix";
|
||||||
}
|
}
|
||||||
|
|
||||||
string[] Ext = tilesetExt.Split(',');
|
string[] Ext = tilesetExt.Split(',');
|
||||||
var tileset = new TileSet()
|
var tileset = new TileSet()
|
||||||
{
|
{
|
||||||
Name = tilesetName,
|
Name = tilesetName,
|
||||||
Id = tilesetID.ToUpper(),
|
Id = tilesetID.ToUpper(),
|
||||||
TileSize = size,
|
TileSize = size,
|
||||||
Palette = tilesetPalette.ToLower(),
|
Palette = tilesetPalette.ToLower(),
|
||||||
Extensions = new string[] { Ext[0], Ext[1] }
|
Extensions = new string[] { Ext[0], Ext[1] }
|
||||||
};
|
};
|
||||||
|
|
||||||
// List of files to add to the mix file
|
// List of files to add to the mix file
|
||||||
List<string> fileList = new List<string>();
|
List<string> fileList = new List<string>();
|
||||||
|
|
||||||
// Export palette (use the embedded palette)
|
// Export palette (use the embedded palette)
|
||||||
var p = surface1.Image.Palette.Entries.ToList();
|
var p = surface1.Image.Palette.Entries.ToList();
|
||||||
fileList.Add(ExportPalette(p, Path.Combine(dir, tileset.Palette)));
|
fileList.Add(ExportPalette(p, Path.Combine(dir, tileset.Palette)));
|
||||||
|
|
||||||
// Export tile artwork
|
// Export tile artwork
|
||||||
foreach (var t in surface1.Templates)
|
foreach (var t in surface1.Templates)
|
||||||
fileList.Add(ExportTemplate(t, surface1.Templates.IndexOf(t), tileset.Extensions.First(), dir));
|
fileList.Add(ExportTemplate(t, surface1.Templates.IndexOf(t), tileset.Extensions.First(), dir));
|
||||||
|
|
||||||
// Add the terraintypes
|
// Add the terraintypes
|
||||||
foreach (var tt in TerrainType)
|
foreach (var tt in TerrainType)
|
||||||
{
|
{
|
||||||
tileset.Terrain.Add(tt.Type, tt);
|
tileset.Terrain.Add(tt.Type, tt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the templates
|
// Add the templates
|
||||||
ushort cur = 0;
|
ushort cur = 0;
|
||||||
foreach (var tp in surface1.Templates)
|
foreach (var tp in surface1.Templates)
|
||||||
{
|
{
|
||||||
var template = new TileTemplate()
|
var template = new TileTemplate()
|
||||||
{
|
{
|
||||||
Id = cur,
|
Id = cur,
|
||||||
Image = "t{0:00}".F(cur),
|
Image = "t{0:00}".F(cur),
|
||||||
Size = new int2(tp.Width,tp.Height),
|
Size = new int2(tp.Width,tp.Height),
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var t in tp.Cells)
|
foreach (var t in tp.Cells)
|
||||||
{
|
{
|
||||||
string ttype = "Clear";
|
string ttype = "Clear";
|
||||||
ttype = TerrainType[surface1.TerrainTypes[t.Key.X, t.Key.Y]].Type;
|
ttype = TerrainType[surface1.TerrainTypes[t.Key.X, t.Key.Y]].Type;
|
||||||
template.Tiles.Add((byte)((t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top)), ttype);
|
template.Tiles.Add((byte)((t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top)), ttype);
|
||||||
}
|
}
|
||||||
|
|
||||||
tileset.Templates.Add(cur, template);
|
tileset.Templates.Add(cur, template);
|
||||||
cur++;
|
cur++;
|
||||||
}
|
}
|
||||||
|
|
||||||
tileset.Save(Path.Combine(dir, tilesetFile));
|
tileset.Save(Path.Combine(dir, tilesetFile));
|
||||||
//throw new NotImplementedException("NotI");
|
//throw new NotImplementedException("NotI");
|
||||||
//PackageWriter.CreateMix(Path.Combine(dir, mixFile),fileList);
|
//PackageWriter.CreateMix(Path.Combine(dir, mixFile),fileList);
|
||||||
|
|
||||||
// Cleanup
|
// Cleanup
|
||||||
//foreach (var file in fileList)
|
//foreach (var file in fileList)
|
||||||
//File.Delete(file);
|
//File.Delete(file);
|
||||||
|
|
||||||
Console.WriteLine("Finished export");
|
Console.WriteLine("Finished export");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toolStripContainer1_TopToolStripPanel_Click(object sender, EventArgs e)
|
private void toolStripContainer1_TopToolStripPanel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void surface1_Click(object sender, EventArgs e)
|
private void surface1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void txtTilesetName_TextChanged(object sender, EventArgs e)
|
private void txtTilesetName_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var tilesetFile = txtTilesetName.Text;
|
var tilesetFile = txtTilesetName.Text;
|
||||||
if (tilesetFile.Length > 8)
|
if (tilesetFile.Length > 8)
|
||||||
{
|
{
|
||||||
tilesetFile = tilesetFile.ToLower().Substring(0, 8);
|
tilesetFile = tilesetFile.ToLower().Substring(0, 8);
|
||||||
}
|
}
|
||||||
txtID.Text = tilesetFile.ToUpper();
|
txtID.Text = tilesetFile.ToUpper();
|
||||||
txtPal.Text = tilesetFile.ToLower() + ".pal";
|
txtPal.Text = tilesetFile.ToLower() + ".pal";
|
||||||
if (tilesetFile.Length < 3)
|
if (tilesetFile.Length < 3)
|
||||||
{
|
{
|
||||||
txtExt.Text = ".tem,.shp";
|
txtExt.Text = ".tem,.shp";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
txtExt.Text = "." + tilesetFile.ToLower().Substring(0, 3) + ",.shp";
|
txtExt.Text = "." + tilesetFile.ToLower().Substring(0, 3) + ",.shp";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toolStripButton15_Click(object sender, EventArgs e)
|
private void toolStripButton15_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CreateNewTileset();
|
CreateNewTileset();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,88 +1,88 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace OpenRA.TilesetBuilder
|
namespace OpenRA.TilesetBuilder
|
||||||
{
|
{
|
||||||
public partial class frmNew : Form
|
public partial class frmNew : Form
|
||||||
{
|
{
|
||||||
public bool PaletteFromImage = true;
|
public bool PaletteFromImage = true;
|
||||||
public string PaletteFile = "";
|
public string PaletteFile = "";
|
||||||
public string ImageFile = "";
|
public string ImageFile = "";
|
||||||
public int TileSize = 24;
|
public int TileSize = 24;
|
||||||
|
|
||||||
public frmNew()
|
public frmNew()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnCancel_Click(object sender, EventArgs e)
|
private void btnCancel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnOk_Click(object sender, EventArgs e)
|
private void btnOk_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!PaletteFromImage)
|
if (!PaletteFromImage)
|
||||||
{
|
{
|
||||||
if (PaletteFile.Length < 5)
|
if (PaletteFile.Length < 5)
|
||||||
{
|
{
|
||||||
MessageBox.Show("No palette specified", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
MessageBox.Show("No palette specified", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ImageFile.Length < 5)
|
if (ImageFile.Length < 5)
|
||||||
{
|
{
|
||||||
MessageBox.Show("No image selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show("No image selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void chkUsePalFromImage_CheckedChanged(object sender, EventArgs e)
|
private void chkUsePalFromImage_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (chkUsePalFromImage.Checked)
|
if (chkUsePalFromImage.Checked)
|
||||||
{
|
{
|
||||||
btnPalBrowse.Enabled = false;
|
btnPalBrowse.Enabled = false;
|
||||||
PaletteFromImage = true;
|
PaletteFromImage = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
btnPalBrowse.Enabled = true;
|
btnPalBrowse.Enabled = true;
|
||||||
PaletteFromImage = false;
|
PaletteFromImage = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnPalBrowse_Click(object sender, EventArgs e)
|
private void btnPalBrowse_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
using (var ofd = new OpenFileDialog { Filter = "C&C Palette (*.pal)|*.pal" })
|
using (var ofd = new OpenFileDialog { Filter = "C&C Palette (*.pal)|*.pal" })
|
||||||
if (DialogResult.OK == ofd.ShowDialog())
|
if (DialogResult.OK == ofd.ShowDialog())
|
||||||
{
|
{
|
||||||
PaletteFile = ofd.FileName;
|
PaletteFile = ofd.FileName;
|
||||||
txtPal.Text = PaletteFile;
|
txtPal.Text = PaletteFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnImgBrowse_Click(object sender, EventArgs e)
|
private void btnImgBrowse_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
using (var ofd = new OpenFileDialog { Filter = "8bit Image (*.png,*.pcx,*.bmp)|*.png;*.pcx;*.bmp" })
|
using (var ofd = new OpenFileDialog { Filter = "8bit Image (*.png,*.pcx,*.bmp)|*.png;*.pcx;*.bmp" })
|
||||||
if (DialogResult.OK == ofd.ShowDialog())
|
if (DialogResult.OK == ofd.ShowDialog())
|
||||||
{
|
{
|
||||||
ImageFile = ofd.FileName;
|
ImageFile = ofd.FileName;
|
||||||
imgImage.Image = Image.FromFile(ImageFile);
|
imgImage.Image = Image.FromFile(ImageFile);
|
||||||
txtImage.Text = ImageFile;
|
txtImage.Text = ImageFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void numSize_ValueChanged(object sender, EventArgs e)
|
private void numSize_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TileSize = (int)numSize.Value;
|
TileSize = (int)numSize.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using OpenRA.GameRules;
|
|||||||
|
|
||||||
namespace OpenRA.Utility
|
namespace OpenRA.Utility
|
||||||
{
|
{
|
||||||
static class Command
|
public static class Command
|
||||||
{
|
{
|
||||||
public static void Settings(string[] args)
|
public static void Settings(string[] args)
|
||||||
{
|
{
|
||||||
|
|||||||
44
OpenRA.sln
44
OpenRA.sln
@@ -19,7 +19,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Cg", "OpenR
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Editor", "OpenRA.Editor\OpenRA.Editor.csproj", "{00038B75-405B-44F5-8691-BD2546DBE224}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Editor", "OpenRA.Editor\OpenRA.Editor.csproj", "{00038B75-405B-44F5-8691-BD2546DBE224}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.TilesetBuilder", "OpenRA.TilesetBuilder\OpenRA.TilesetBuilder.csproj", "{56B1073B-AE14-499A-BB98-43A8DE9A39CA}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.TilesetBuilder", "OpenRA.TilesetBuilder\OpenRA.TilesetBuilder.csproj", "{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RALint", "RALint\RALint.csproj", "{F9FA4D9F-2302-470A-8A07-6E37F488C124}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RALint", "RALint\RALint.csproj", "{F9FA4D9F-2302-470A-8A07-6E37F488C124}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -31,6 +31,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Gl", "OpenR
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.SdlCommon", "OpenRA.Renderer.SdlCommon\OpenRA.Renderer.SdlCommon.csproj", "{52FD9F0B-B209-4ED7-8A32-AC8033363263}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.SdlCommon", "OpenRA.Renderer.SdlCommon\OpenRA.Renderer.SdlCommon.csproj", "{52FD9F0B-B209-4ED7-8A32-AC8033363263}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.Mods.D2k\OpenRA.Mods.D2k.csproj", "{C0B0465C-6BE2-409C-8770-3A9BF64C4344}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -62,14 +64,14 @@ Global
|
|||||||
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.ActiveCfg = Release|x86
|
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.Build.0 = Release|x86
|
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||||
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Mixed Platforms.Build.0 = Release|x86
|
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
@@ -94,14 +96,6 @@ Global
|
|||||||
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Any CPU.Build.0 = Release|Any CPU
|
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
{56B1073B-AE14-499A-BB98-43A8DE9A39CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{56B1073B-AE14-499A-BB98-43A8DE9A39CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{56B1073B-AE14-499A-BB98-43A8DE9A39CA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
|
||||||
{56B1073B-AE14-499A-BB98-43A8DE9A39CA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
|
||||||
{56B1073B-AE14-499A-BB98-43A8DE9A39CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{56B1073B-AE14-499A-BB98-43A8DE9A39CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{56B1073B-AE14-499A-BB98-43A8DE9A39CA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
|
||||||
{56B1073B-AE14-499A-BB98-43A8DE9A39CA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
|
||||||
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
@@ -118,6 +112,14 @@ Global
|
|||||||
{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Any CPU.Build.0 = Release|Any CPU
|
{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
|
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
@@ -142,6 +144,14 @@ Global
|
|||||||
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Any CPU.Build.0 = Release|Any CPU
|
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
|
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
|
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
|
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
|
{230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(MonoDevelopProperties) = preSolution
|
GlobalSection(MonoDevelopProperties) = preSolution
|
||||||
StartupItem = OpenRA.Game\OpenRA.Game.csproj
|
StartupItem = OpenRA.Game\OpenRA.Game.csproj
|
||||||
|
|||||||
@@ -36,4 +36,6 @@
|
|||||||
# reinforcements have arrived is played twice when ordering via starport
|
# reinforcements have arrived is played twice when ordering via starport
|
||||||
# add shroud (Dune's 32x32 tiles differ completely from RA/CnC)
|
# add shroud (Dune's 32x32 tiles differ completely from RA/CnC)
|
||||||
# black spots on buildings should be transparent
|
# black spots on buildings should be transparent
|
||||||
# gamefile extraction (setup/setup.z) from CD fails
|
# gamefile extraction (setup/setup.z) from CD fails
|
||||||
|
# support patch 1.06 gamefiles: DATA.R8 has more frames and currently fails to extract, also featuring new terrain with white houses and new unit: grenade thrower
|
||||||
|
# mouse cursor has no transparency and is a little pixelish
|
||||||
@@ -25,49 +25,49 @@ Background@INSTALL_PANEL:
|
|||||||
Y:70
|
Y:70
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
Height:25
|
||||||
Text:It requires the original Dune 2000 (and still some Red Alert game) content.
|
Text:It requires the original Dune 2000 (and still some Red Alert) game content.
|
||||||
Align:Center
|
Align:Center
|
||||||
Label@DESC4:
|
Label@DESC4:
|
||||||
X:0
|
X:0
|
||||||
Y:110
|
Y:110
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
Height:25
|
||||||
Text:You need to copy "Dune 2000/Data/GAMESFX", "Dune 2000/DATA/DATA.R8"
|
Text:You need to copy "Dune 2000/Data/GAMESFX" folder and "Dune 2000/DATA/*.R8" files
|
||||||
Align:Center
|
Align:Center
|
||||||
Label@DESC5:
|
Label@DESC5:
|
||||||
X:0
|
X:0
|
||||||
Y:130
|
Y:130
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
Height:25
|
||||||
Text:and "Dune 2000/DATA/MOUSE.R8" from your local Dune 2000 installation
|
Text: from your local Dune 2000 installation to ~/.openra/Content/d2k/ (Linux)
|
||||||
Align:Center
|
Align:Center
|
||||||
Label@DESC6:
|
Label@DESC6:
|
||||||
X:0
|
X:0
|
||||||
Y:150
|
Y:150
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
Height:25
|
||||||
Text:to ~/.openra/Content/d2k/ and run the bash script ripD2kGameFiles.sh
|
Text: or "My Documents/OpenRA/Content/d2k/" (Windows) and click "Extract Data".
|
||||||
Align:Center
|
Align:Center
|
||||||
Label@DESC7:
|
Label@DESC7:
|
||||||
X:0
|
|
||||||
Y:170
|
|
||||||
Width:PARENT_RIGHT
|
|
||||||
Height:25
|
|
||||||
Text:to convert the content. In the future this GUI should do this
|
|
||||||
Align:Center
|
|
||||||
Label@DESC8:
|
|
||||||
X:0
|
X:0
|
||||||
Y:190
|
Y:190
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
Height:25
|
||||||
Text:automatically using your Dune 2000 CD (won't work yet).
|
Text: Put in your Dune 2000 CD and click "Copy Music" to (optionally) download the tracks.
|
||||||
Align:Center
|
Align:Center
|
||||||
Button@INSTALL_BUTTON:
|
Button@EXTRACT_BUTTON:
|
||||||
|
X:PARENT_RIGHT - 280
|
||||||
|
Y:PARENT_BOTTOM - 45
|
||||||
|
Width:100
|
||||||
|
Height:25
|
||||||
|
Text:Extract Data
|
||||||
|
Font:Bold
|
||||||
|
Button@COPY_BUTTON:
|
||||||
X:PARENT_RIGHT - 420
|
X:PARENT_RIGHT - 420
|
||||||
Y:PARENT_BOTTOM - 45
|
Y:PARENT_BOTTOM - 45
|
||||||
Width:150
|
Width:90
|
||||||
Height:25
|
Height:25
|
||||||
Text:Use CD (broken)
|
Text:Copy Music
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Button@QUIT_BUTTON:
|
Button@QUIT_BUTTON:
|
||||||
X:PARENT_RIGHT - 140
|
X:PARENT_RIGHT - 140
|
||||||
@@ -89,7 +89,7 @@ Background@INSTALL_FROMCD_PANEL:
|
|||||||
Y:20
|
Y:20
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
Height:25
|
||||||
Text:Installing from CD
|
Text:Installing (Music) from CD
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Container@INSTALLING:
|
Container@INSTALLING:
|
||||||
@@ -138,6 +138,71 @@ Background@INSTALL_FROMCD_PANEL:
|
|||||||
Y:PARENT_BOTTOM - 45
|
Y:PARENT_BOTTOM - 45
|
||||||
Width:120
|
Width:120
|
||||||
Height:25
|
Height:25
|
||||||
Text:Cancel
|
Text:Back
|
||||||
|
Font:Bold
|
||||||
|
Key:escape
|
||||||
|
|
||||||
|
Background@EXTRACT_GAMEFILES_PANEL:
|
||||||
|
Logic:D2kExtractGameFilesLogic
|
||||||
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
|
Width:500
|
||||||
|
Height:160
|
||||||
|
Children:
|
||||||
|
Label@TITLE:
|
||||||
|
X:0
|
||||||
|
Y:20
|
||||||
|
Width:PARENT_RIGHT
|
||||||
|
Height:25
|
||||||
|
Text:Extracting and Converting Dune 2000 Gamefiles
|
||||||
|
Align:Center
|
||||||
|
Font:Bold
|
||||||
|
Container@EXTRACTING:
|
||||||
|
Width:PARENT_RIGHT
|
||||||
|
Height:PARENT_BOTTOM
|
||||||
|
Visible: false
|
||||||
|
Children:
|
||||||
|
ProgressBar@PROGRESS_BAR:
|
||||||
|
X:50
|
||||||
|
Y:55
|
||||||
|
Width:PARENT_RIGHT - 100
|
||||||
|
Height:25
|
||||||
|
Label@STATUS_LABEL:
|
||||||
|
X:50
|
||||||
|
Y:80
|
||||||
|
Width:PARENT_RIGHT - 100
|
||||||
|
Height:25
|
||||||
|
Align:Left
|
||||||
|
Container@COPY_FILES:
|
||||||
|
Width:PARENT_RIGHT
|
||||||
|
Height:PARENT_BOTTOM
|
||||||
|
Visible: false
|
||||||
|
Children:
|
||||||
|
Label@INFO:
|
||||||
|
Y:50
|
||||||
|
Width:PARENT_RIGHT
|
||||||
|
Height:25
|
||||||
|
Text:Gamefiles not not found.
|
||||||
|
Align:Center
|
||||||
|
Label@INFO2:
|
||||||
|
Y:70
|
||||||
|
Width:PARENT_RIGHT
|
||||||
|
Height:25
|
||||||
|
Text:Please copy the Data/*.R8 files from your Dune 2000 installation to OpenRAs Content/d2k directory then click Retry.
|
||||||
|
Align:Center
|
||||||
|
Button@RETRY_BUTTON:
|
||||||
|
X:PARENT_RIGHT - 280
|
||||||
|
Y:PARENT_BOTTOM - 45
|
||||||
|
Width:120
|
||||||
|
Height:25
|
||||||
|
Text:Retry
|
||||||
|
Font:Bold
|
||||||
|
Key:return
|
||||||
|
Button@BACK_BUTTON:
|
||||||
|
X:PARENT_RIGHT - 140
|
||||||
|
Y:PARENT_BOTTOM - 45
|
||||||
|
Width:120
|
||||||
|
Height:25
|
||||||
|
Text:Back
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Key:escape
|
Key:escape
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ Movies:
|
|||||||
|
|
||||||
LoadScreen: D2kLoadScreen
|
LoadScreen: D2kLoadScreen
|
||||||
InstallerMenuWidget: INSTALL_PANEL
|
InstallerMenuWidget: INSTALL_PANEL
|
||||||
TestFile: DATA.R8
|
TestFile: carryall.shp
|
||||||
|
|
||||||
ServerTraits:
|
ServerTraits:
|
||||||
LobbyCommands
|
LobbyCommands
|
||||||
|
|||||||
@@ -1,411 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
R8="$HOME/.openra/Content/d2k/DATA.R8"
|
|
||||||
PAL="mods/d2k/bits/d2k.pal"
|
|
||||||
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 0 2 "overlay"
|
|
||||||
mono OpenRA.Utility.exe --shp overlay.png 32
|
|
||||||
|
|
||||||
#mono OpenRA.Utility.exe --r8 $R8 $PAL 40 101 "shadow"
|
|
||||||
#mono OpenRA.Utility.exe --shp shadow.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 102 105 "crates"
|
|
||||||
mono OpenRA.Utility.exe --shp crates.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 107 109 "spicebloom"
|
|
||||||
mono OpenRA.Utility.exe --shp spicebloom.png 32
|
|
||||||
# stars, arrow-up
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 114 129 "rockcrater1"
|
|
||||||
mono OpenRA.Utility.exe --shp rockcrater1.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 130 145 "rockcrater2"
|
|
||||||
mono OpenRA.Utility.exe --shp rockcrater2.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 146 161 "sandcrater1"
|
|
||||||
mono OpenRA.Utility.exe --shp sandcrater1.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 162 177 "sandcrater2"
|
|
||||||
mono OpenRA.Utility.exe --shp sandcrater2.png 32
|
|
||||||
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 206 381 "rifle" --infantry
|
|
||||||
mono OpenRA.Utility.exe --shp rifle.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 382 457 "rifledeath" --infantrydeath
|
|
||||||
mono OpenRA.Utility.exe --shp rifledeath.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 458 693 "rocket" --infantry
|
|
||||||
mono OpenRA.Utility.exe --shp rocket.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 694 929 "fremen" --infantry
|
|
||||||
mono OpenRA.Utility.exe --shp fremen.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 930 1165 "sardaukar" --infantry
|
|
||||||
mono OpenRA.Utility.exe --shp sardaukar.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1166 1221 "engineer" --infantry # death animation 1342..1401
|
|
||||||
mono OpenRA.Utility.exe --shp engineer.png 48
|
|
||||||
#rifleinfantry repetitions?
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1402 1502 "thumper" --infantry #death animations 1543..1602
|
|
||||||
mono OpenRA.Utility.exe --shp thumper.png 48
|
|
||||||
#rifleinfantry repetitions?
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1603 1634 "missile" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp missile.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1635 1666 "trike" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp trike.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1667 1698 "quad" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp quad.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1699 1730 "harvester" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp harvester.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1731 1762 "combata" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp combata.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1763 1794 "siege" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp siege.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1795 1826 "dmcv" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp dmcv.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1827 1858 "sonic" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp sonic.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1859 1890 "combataturret" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp combataturret.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1891 1922 "siegeturret" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp siegeturret.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1923 1954 "carryall" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp carryall.png 64
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 1955 2050 "orni" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp orni.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2051 2082 "combath" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp combath.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2083 2114 "devast" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp devast.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2115 2146 "combathturret" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp combathturret.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2147 2148 "deathhandmissile"
|
|
||||||
mono OpenRA.Utility.exe --shp deathhandmissile.png 24
|
|
||||||
#rifleinfantry repetitions?
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2245 2284 "saboteur" --infantry #death animations 2325..2388
|
|
||||||
mono OpenRA.Utility.exe --shp saboteur.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2389 2420 "deviator" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp deviator.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2421 2452 "raider" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp raider.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2453 2484 "combato" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp combato.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2485 2516 "combatoturret" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp combatoturret.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2517 2517 "frigate" --vehicle
|
|
||||||
mono OpenRA.Utility.exe --shp frigate.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2518 2520 "heavya" --building #2518 is only the gate
|
|
||||||
mono OpenRA.Utility.exe --shp heavya.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2521 2522 "radara" --building
|
|
||||||
mono OpenRA.Utility.exe --shp radara.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2523 2524 "pwra" --building
|
|
||||||
mono OpenRA.Utility.exe --shp pwra.png 64
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2525 2526 "barra" --building
|
|
||||||
mono OpenRA.Utility.exe --shp barra.png 80
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2527 2558 "wall" --wall
|
|
||||||
mono OpenRA.Utility.exe --shp wall.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2559 2560 "conyarda" --building
|
|
||||||
mono OpenRA.Utility.exe --shp conyarda.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2561 2563 "refa" --building # 2561 is fassade, 2562 is silo top, 2563 is silo top broken
|
|
||||||
mono OpenRA.Utility.exe --shp refa.png 120
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2564 2565 "hightecha" --building
|
|
||||||
mono OpenRA.Utility.exe --shp hightecha.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2566 2570 "siloa" --building
|
|
||||||
mono OpenRA.Utility.exe --shp siloa.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2571 2572 "repaira" --building
|
|
||||||
mono OpenRA.Utility.exe --shp repaira.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2573 2588 "guntower" --building
|
|
||||||
mono OpenRA.Utility.exe --shp guntower.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2589 2620 "gunturret" --building
|
|
||||||
mono OpenRA.Utility.exe --shp gunturret.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2621 2636 "rockettower" --building
|
|
||||||
mono OpenRA.Utility.exe --shp rockettower.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2637 2668 "rocketturreta" --building
|
|
||||||
mono OpenRA.Utility.exe --shp rocketturreta.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2669 2670 "researcha" --building
|
|
||||||
mono OpenRA.Utility.exe --shp researcha.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2671 2672 "starporta" --building
|
|
||||||
mono OpenRA.Utility.exe --shp starporta.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2673 2675 "lighta" --building
|
|
||||||
mono OpenRA.Utility.exe --shp lighta.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2676 2677 "palacea" --building
|
|
||||||
mono OpenRA.Utility.exe --shp palacea.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2678 2680 "heavyh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp heavyh.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2681 2682 "radarh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp radarh.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2683 2684 "pwrh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp pwrh.png 64
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2685 2686 "barrh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp barrh.png 64
|
|
||||||
# identical wall
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2719 2720 "conyardh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp conyardh.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2721 2723 "refh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp refh.png 120
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2724 2725 "hightechh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp hightechh.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2726 2730 "siloh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp siloh.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2731 2732 "repairh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp repairh.png 96
|
|
||||||
#identical guntower
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2749 2780 "gunturreth" --building
|
|
||||||
mono OpenRA.Utility.exe --shp gunturreth.png 48
|
|
||||||
#identical rockettower
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2797 2828 "rocketturreth" --building
|
|
||||||
mono OpenRA.Utility.exe --shp rocketturreth.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2829 2830 "researchh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp researchh.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2831 2832 "starporth" --building
|
|
||||||
mono OpenRA.Utility.exe --shp starporth.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2833 2835 "lighth" --building
|
|
||||||
mono OpenRA.Utility.exe --shp lighth.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2836 2837 "palaceh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp palaceh.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2838 2840 "heavyo" --building
|
|
||||||
mono OpenRA.Utility.exe --shp heavyo.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2841 2842 "radaro" --building
|
|
||||||
mono OpenRA.Utility.exe --shp radaro.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2843 2844 "pwro" --building
|
|
||||||
mono OpenRA.Utility.exe --shp pwro.png 64
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2845 2846 "barro" --building
|
|
||||||
mono OpenRA.Utility.exe --shp barro.png 64
|
|
||||||
# identical wall
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2879 2880 "conyardo" --building
|
|
||||||
mono OpenRA.Utility.exe --shp conyardo.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2881 2883 "refo" --building
|
|
||||||
mono OpenRA.Utility.exe --shp refo.png 120
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2884 2885 "hightecho" --building
|
|
||||||
mono OpenRA.Utility.exe --shp hightecho.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2886 2890 "siloo" --building
|
|
||||||
mono OpenRA.Utility.exe --shp siloo.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2891 2892 "repairo" --building
|
|
||||||
mono OpenRA.Utility.exe --shp repairo.png 96
|
|
||||||
#identical guntower
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2909 2940 "gunturreto" --building
|
|
||||||
mono OpenRA.Utility.exe --shp gunturreto.png 48
|
|
||||||
#identical rockettower
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2957 2988 "rocketturreto" --building
|
|
||||||
mono OpenRA.Utility.exe --shp rocketturreto.png 48
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2989 2990 "researcho" --building
|
|
||||||
mono OpenRA.Utility.exe --shp researcho.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2991 2992 "starporto" --building
|
|
||||||
mono OpenRA.Utility.exe --shp starporto.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2993 2995 "lighto" --building
|
|
||||||
mono OpenRA.Utility.exe --shp lighto.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 2996 2997 "palaceo" --building
|
|
||||||
mono OpenRA.Utility.exe --shp palaceo.png 96
|
|
||||||
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 3549 3564 "sandwormmouth"
|
|
||||||
mono OpenRA.Utility.exe --shp sandwormmouth.png 68
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 3565 3585 "sandwormdust"
|
|
||||||
mono OpenRA.Utility.exe --shp sandwormdust.png 68
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 3586 3600 "wormsigns1"
|
|
||||||
mono OpenRA.Utility.exe --shp wormsigns1.png 16
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 3601 3610 "wormsigns2"
|
|
||||||
mono OpenRA.Utility.exe --shp wormsigns2.png 16
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 3611 3615 "wormsigns3"
|
|
||||||
mono OpenRA.Utility.exe --shp wormsigns3.png 16
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 3616 3620 "wormsigns4"
|
|
||||||
mono OpenRA.Utility.exe --shp wormsigns4.png 16
|
|
||||||
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 3679 3686 "sell"
|
|
||||||
mono OpenRA.Utility.exe --shp sell.png 48
|
|
||||||
#explosions and muzzle flash
|
|
||||||
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4011 4011 "rifleicon"
|
|
||||||
mono OpenRA.Utility.exe --shp rifleicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4012 4012 "bazookaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp bazookaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4013 4013 "engineericon"
|
|
||||||
mono OpenRA.Utility.exe --shp engineericon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4014 4014 "thumpericon"
|
|
||||||
mono OpenRA.Utility.exe --shp thumpericon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4015 4015 "sadaukaricon"
|
|
||||||
mono OpenRA.Utility.exe --shp sadaukaricon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4016 4016 "trikeicon"
|
|
||||||
mono OpenRA.Utility.exe --shp trikeicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4017 4017 "raidericon"
|
|
||||||
mono OpenRA.Utility.exe --shp raidericon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4018 4018 "quadicon"
|
|
||||||
mono OpenRA.Utility.exe --shp quadicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4019 4019 "harvestericon" # = 4044
|
|
||||||
mono OpenRA.Utility.exe --shp harvestericon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4020 4020 "combataicon"
|
|
||||||
mono OpenRA.Utility.exe --shp combataicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4021 4021 "combathicon"
|
|
||||||
mono OpenRA.Utility.exe --shp combathicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4022 4022 "combatoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp combatoicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4023 4023 "mcvicon"
|
|
||||||
mono OpenRA.Utility.exe --shp mcvicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4024 4024 "missileicon"
|
|
||||||
mono OpenRA.Utility.exe --shp missileicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4025 4025 "deviatoricon"
|
|
||||||
mono OpenRA.Utility.exe --shp deviatoricon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4026 4026 "siegeicon"
|
|
||||||
mono OpenRA.Utility.exe --shp siegeicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4027 4027 "sonicicon"
|
|
||||||
mono OpenRA.Utility.exe --shp sonicicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4028 4028 "devasticon"
|
|
||||||
mono OpenRA.Utility.exe --shp devasticon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4029 4029 "carryallicon" # = 4030
|
|
||||||
mono OpenRA.Utility.exe --shp carryallicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4031 4031 "orniicon" # = 4062
|
|
||||||
mono OpenRA.Utility.exe --shp orniicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4032 4032 "fremenicon" # = 4033
|
|
||||||
mono OpenRA.Utility.exe --shp fremenicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4034 4034 "saboteuricon"
|
|
||||||
mono OpenRA.Utility.exe --shp saboteuricon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4035 4035 "deathhandicon"
|
|
||||||
mono OpenRA.Utility.exe --shp deathhandicon.png 60
|
|
||||||
# 4036..4045 = repetitions
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4046 4046 "conyardaicon" # = 4049
|
|
||||||
mono OpenRA.Utility.exe --shp conyardaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4047 4047 "conyardhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp conyardhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4048 4048 "conyardoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp conyardoicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4050 4050 "4plateicon" # = 4051..4052
|
|
||||||
mono OpenRA.Utility.exe --shp 4plateicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4053 4053 "6plateicon" # = 4054..4055
|
|
||||||
mono OpenRA.Utility.exe --shp 6plateicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4056 4056 "pwraicon"
|
|
||||||
mono OpenRA.Utility.exe --shp pwraicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4057 4057 "pwrhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp pwrhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4058 4058 "pwroicon"
|
|
||||||
mono OpenRA.Utility.exe --shp pwroicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4059 4059 "barraicon"
|
|
||||||
mono OpenRA.Utility.exe --shp barraicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4060 4060 "barrhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp barrhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4061 4061 "barroicon"
|
|
||||||
mono OpenRA.Utility.exe --shp barroicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4063 4063 "wallicon" # = 4061..4062
|
|
||||||
mono OpenRA.Utility.exe --shp wallicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4066 4066 "refaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp refaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4067 4067 "refhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp refhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4068 4068 "refoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp refoicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4069 4069 "turreticon" # = 4070..4071
|
|
||||||
mono OpenRA.Utility.exe --shp turreticon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4072 4072 "radaraicon"
|
|
||||||
mono OpenRA.Utility.exe --shp radaraicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4073 4073 "radarhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp radarhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4074 4074 "radaroicon"
|
|
||||||
mono OpenRA.Utility.exe --shp radaroicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4075 4075 "rturreticon" # = 4076..4077
|
|
||||||
mono OpenRA.Utility.exe --shp rturreticon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4078 4078 "hightechaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp hightechaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4079 4079 "hightechhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp hightechhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4080 4080 "hightechoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp hightechoicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4081 4081 "lightaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp lightaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4082 4082 "lighthicon"
|
|
||||||
mono OpenRA.Utility.exe --shp lighthicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4083 4083 "lightoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp lightoicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4084 4084 "siloaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp siloaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4085 4085 "silohicon"
|
|
||||||
mono OpenRA.Utility.exe --shp silohicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4086 4086 "silooicon"
|
|
||||||
mono OpenRA.Utility.exe --shp silooicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4087 4087 "heavyaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp heavyaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4088 4088 "heavyhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp heavyhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4089 4089 "heavyoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp heavyoicon.png 60
|
|
||||||
# 4090 = orniicon
|
|
||||||
# 4091 = heavyhicon
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4092 4092 "starportaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp starportaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4093 4093 "starporthicon"
|
|
||||||
mono OpenRA.Utility.exe --shp starporthicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4094 4094 "starportoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp starportoicon.png 60
|
|
||||||
# 4095 = orniicon
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4096 4096 "repairaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp repairaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4097 4097 "repairhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp repairhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4098 4098 "repairoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp repairoicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4099 4099 "researchaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp researchaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4100 4100 "researchhicon"
|
|
||||||
mono OpenRA.Utility.exe --shp researchhicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4101 4101 "researchoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp researchoicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4102 4102 "palaceaicon"
|
|
||||||
mono OpenRA.Utility.exe --shp palaceaicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4103 4103 "palacehicon"
|
|
||||||
mono OpenRA.Utility.exe --shp palacehicon.png 60
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4104 4104 "palaceoicon"
|
|
||||||
mono OpenRA.Utility.exe --shp palaceoicon.png 60
|
|
||||||
# 4105 = orniicon
|
|
||||||
# 4106..4107 = radaraicon
|
|
||||||
# 4108 = conyardaicon
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4109 4150 "conmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp conmake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4151 4174 "wtrpmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp wtrpmake.png 64
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4175 4194 "barramake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp barramake.png 80
|
|
||||||
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4231 4253 "refmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp refmake.png 120
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4254 4273 "radarmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp radarmake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4274 4294 "highmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp highmake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4295 4312 "lightmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp lightmake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4313 4327 "silomake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp silomake.png 32
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4328 4346 "heavymake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp heavymake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4347 4369 "starportmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp starportmake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4370 4390 "repairmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp repairmake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4391 4412 "researchmake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp researchmake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4413 4435 "palacemake" --building
|
|
||||||
mono OpenRA.Utility.exe --shp palacemake.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4436 4449 "cranea" --building
|
|
||||||
mono OpenRA.Utility.exe --shp cranea.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4450 4463 "craneh" --building
|
|
||||||
mono OpenRA.Utility.exe --shp craneh.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4463 4477 "craneo" --building
|
|
||||||
mono OpenRA.Utility.exe --shp craneo.png 96
|
|
||||||
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4760 4819 "windtrap_anim" --building #?
|
|
||||||
mono OpenRA.Utility.exe --shp windtrap_anim.png 96
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 4820 4840 "missile_launch"
|
|
||||||
mono OpenRA.Utility.exe --shp missile_launch.png 96
|
|
||||||
|
|
||||||
R8="$HOME/.openra/Content/d2k/MOUSE.R8"
|
|
||||||
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 0 264 "mouse" --transparent
|
|
||||||
mono OpenRA.Utility.exe --shp mouse.png 48
|
|
||||||
|
|
||||||
R8="$HOME/.openra/Content/d2k/BLOXBASE.R8"
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 0 799 "BASE" --tileset
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 748 749 "spice0"
|
|
||||||
mono OpenRA.Utility.exe --shp spice0.png 32
|
|
||||||
mono OpenRA.TilesetBuilder.exe "BASE.png" 32 --export "Content/d2k/Tilesets"
|
|
||||||
R8="$HOME/.openra/Content/d2k/BLOXBAT.R8"
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 0 799 "BAT" --tileset
|
|
||||||
mono OpenRA.TilesetBuilder.exe "BAT.png" 32 --export "Content/d2k/Tilesets"
|
|
||||||
R8="$HOME/.openra/Content/d2k/BLOXBGBS.R8"
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 0 799 "BGBS" --tileset
|
|
||||||
mono OpenRA.TilesetBuilder.exe "BGBS.png" 32 --export "Content/d2k/Tilesets"
|
|
||||||
R8="$HOME/.openra/Content/d2k/BLOXICE.R8"
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 0 799 "ICE" --tileset
|
|
||||||
mono OpenRA.TilesetBuilder.exe "ICE.png" 32 --export "Content/d2k/Tilesets"
|
|
||||||
R8="$HOME/.openra/Content/d2k/BLOXTREE.R8"
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 0 799 "TREE" --tileset
|
|
||||||
mono OpenRA.TilesetBuilder.exe "TREE.png" 32 --export "Content/d2k/Tilesets"
|
|
||||||
R8="$HOME/.openra/Content/d2k/BLOXWAST.R8"
|
|
||||||
mono OpenRA.Utility.exe --r8 $R8 $PAL 0 799 "XWAST" --tileset
|
|
||||||
mono OpenRA.TilesetBuilder.exe "XWAST.png" 32 --export "Content/d2k/Tilesets"
|
|
||||||
|
|
||||||
mv *.shp $HOME/.openra/Content/d2k/SHPs
|
|
||||||
Reference in New Issue
Block a user