move vehicles to load sprites from DATA.R8 directly
This commit is contained in:
@@ -69,25 +69,6 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "130", "145", Path.Combine(pathToSHPs, "rockcrater2") },
|
new string[] { "--r8", pathToDataR8, pathToPalette, "130", "145", Path.Combine(pathToSHPs, "rockcrater2") },
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "146", "161", Path.Combine(pathToSHPs, "sandcrater1") },
|
new string[] { "--r8", pathToDataR8, pathToPalette, "146", "161", Path.Combine(pathToSHPs, "sandcrater1") },
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "162", "177", Path.Combine(pathToSHPs, "sandcrater2") },
|
new string[] { "--r8", pathToDataR8, pathToPalette, "162", "177", Path.Combine(pathToSHPs, "sandcrater2") },
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1603", "1634", Path.Combine(pathToSHPs, "missiletank"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1635", "1666", Path.Combine(pathToSHPs, "trike"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1667", "1698", Path.Combine(pathToSHPs, "quad"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1699", "1730", Path.Combine(pathToSHPs, "harvester"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1731", "1762", Path.Combine(pathToSHPs, "combata"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1763", "1794", Path.Combine(pathToSHPs, "siegetank"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1795", "1826", Path.Combine(pathToSHPs, "dmcv"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1827", "1858", Path.Combine(pathToSHPs, "sonictank"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1859", "1890", Path.Combine(pathToSHPs, "combataturret"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1891", "1922", Path.Combine(pathToSHPs, "siegeturret"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "1923", "1954", Path.Combine(pathToSHPs, "carryall"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "2051", "2082", Path.Combine(pathToSHPs, "combath"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "2083", "2114", Path.Combine(pathToSHPs, "devast"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "2115", "2146", Path.Combine(pathToSHPs, "combathturret"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "2147", "2148", Path.Combine(pathToSHPs, "deathhandmissile") },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "2389", "2420", Path.Combine(pathToSHPs, "deviatortank"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "2421", "2452", Path.Combine(pathToSHPs, "raider"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "2453", "2484", Path.Combine(pathToSHPs, "combato"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "2485", "2516", Path.Combine(pathToSHPs, "combatoturret"), "--vehicle" },
|
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "4011", "4011", Path.Combine(pathToSHPs, "rifleicon") },
|
new string[] { "--r8", pathToDataR8, pathToPalette, "4011", "4011", Path.Combine(pathToSHPs, "rifleicon") },
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "4012", "4012", Path.Combine(pathToSHPs, "bazookaicon") },
|
new string[] { "--r8", pathToDataR8, pathToPalette, "4012", "4012", Path.Combine(pathToSHPs, "bazookaicon") },
|
||||||
new string[] { "--r8", pathToDataR8, pathToPalette, "4013", "4013", Path.Combine(pathToSHPs, "engineericon") },
|
new string[] { "--r8", pathToDataR8, pathToPalette, "4013", "4013", Path.Combine(pathToSHPs, "engineericon") },
|
||||||
@@ -202,24 +183,6 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "rockcrater2.png"), "32" },
|
new string[] { "--shp", Path.Combine(pathToSHPs, "rockcrater2.png"), "32" },
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "sandcrater1.png"), "32" },
|
new string[] { "--shp", Path.Combine(pathToSHPs, "sandcrater1.png"), "32" },
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "sandcrater2.png"), "32" },
|
new string[] { "--shp", Path.Combine(pathToSHPs, "sandcrater2.png"), "32" },
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "missiletank.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "trike.png"), "32" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "quad.png"), "32" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "harvester.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "combata.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "siegetank.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "dmcv.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "sonictank.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "combataturret.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "siegeturret.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "carryall.png"), "64" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "combath.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "devast.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "combathturret.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "deviatortank.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "raider.png"), "32" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "combato.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "combatoturret.png"), "48" },
|
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "rifleicon.png"), "60" },
|
new string[] { "--shp", Path.Combine(pathToSHPs, "rifleicon.png"), "60" },
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "bazookaicon.png"), "60" },
|
new string[] { "--shp", Path.Combine(pathToSHPs, "bazookaicon.png"), "60" },
|
||||||
new string[] { "--shp", Path.Combine(pathToSHPs, "engineericon.png"), "60" },
|
new string[] { "--shp", Path.Combine(pathToSHPs, "engineericon.png"), "60" },
|
||||||
|
|||||||
@@ -137,63 +137,9 @@ namespace OpenRA.Utility
|
|||||||
var bitmap = new Bitmap(frame.FrameSize.Width * frameCount, frame.FrameSize.Height, PixelFormat.Format8bppIndexed);
|
var bitmap = new Bitmap(frame.FrameSize.Width * frameCount, frame.FrameSize.Height, PixelFormat.Format8bppIndexed);
|
||||||
bitmap.Palette = palette.AsSystemPalette();
|
bitmap.Palette = palette.AsSystemPalette();
|
||||||
|
|
||||||
int x = 0;
|
|
||||||
|
|
||||||
frame = srcImage[startFrame];
|
frame = srcImage[startFrame];
|
||||||
|
|
||||||
if (args.Contains("--vehicle"))
|
if (args.Contains("--tileset"))
|
||||||
{
|
|
||||||
frame = srcImage[startFrame];
|
|
||||||
|
|
||||||
for (int f = endFrame - 1; f > startFrame - 1; f--)
|
|
||||||
{
|
|
||||||
var offsetX = frame.FrameSize.Width / 2 - frame.Offset.X;
|
|
||||||
var offsetY = frame.FrameSize.Height / 2 - frame.Offset.Y;
|
|
||||||
|
|
||||||
Console.WriteLine("calculated OffsetX: {0}", offsetX);
|
|
||||||
Console.WriteLine("calculated OffsetY: {0}", offsetY);
|
|
||||||
|
|
||||||
var data = bitmap.LockBits(new Rectangle(x + offsetX, 0 + offsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly,
|
|
||||||
PixelFormat.Format8bppIndexed);
|
|
||||||
|
|
||||||
for (var i = 0; i < frame.Size.Height; i++)
|
|
||||||
Marshal.Copy(frame.Image, i * frame.Size.Width,
|
|
||||||
new IntPtr(data.Scan0.ToInt64() + i * data.Stride), frame.Size.Width);
|
|
||||||
|
|
||||||
bitmap.UnlockBits(data);
|
|
||||||
|
|
||||||
x += frame.FrameSize.Width;
|
|
||||||
|
|
||||||
frame = srcImage[f];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (args.Contains("--turret"))
|
|
||||||
{
|
|
||||||
frame = srcImage[startFrame];
|
|
||||||
|
|
||||||
for (int f = endFrame - 1; f > startFrame - 1; f--)
|
|
||||||
{
|
|
||||||
var offsetX = Math.Abs(frame.Offset.X);
|
|
||||||
var offsetY = frame.FrameSize.Height - Math.Abs(frame.Offset.Y);
|
|
||||||
|
|
||||||
Console.WriteLine("calculated OffsetX: {0}", offsetX);
|
|
||||||
Console.WriteLine("calculated OffsetY: {0}", offsetY);
|
|
||||||
|
|
||||||
var data = bitmap.LockBits(new Rectangle(x + offsetX, 0 + offsetY, frame.Size.Width, frame.Size.Height), ImageLockMode.WriteOnly,
|
|
||||||
PixelFormat.Format8bppIndexed);
|
|
||||||
|
|
||||||
for (var i = 0; i < frame.Size.Height; i++)
|
|
||||||
Marshal.Copy(frame.Image, i * frame.Size.Width,
|
|
||||||
new IntPtr(data.Scan0.ToInt64() + i * data.Stride), frame.Size.Width);
|
|
||||||
|
|
||||||
bitmap.UnlockBits(data);
|
|
||||||
|
|
||||||
x += frame.FrameSize.Width;
|
|
||||||
|
|
||||||
frame = srcImage[f];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (args.Contains("--tileset"))
|
|
||||||
{
|
{
|
||||||
int f = 0;
|
int f = 0;
|
||||||
var tileset = new Bitmap(frame.FrameSize.Width * 20, frame.FrameSize.Height * 40, PixelFormat.Format8bppIndexed);
|
var tileset = new Bitmap(frame.FrameSize.Width * 20, frame.FrameSize.Height * 40, PixelFormat.Format8bppIndexed);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace OpenRA.Utility
|
|||||||
Console.WriteLine(" --extract MOD[,MOD]* FILES [--userdir] Extract files from mod packages to the current (or user) directory");
|
Console.WriteLine(" --extract MOD[,MOD]* FILES [--userdir] Extract files from mod packages to the current (or user) directory");
|
||||||
Console.WriteLine(" --tmp-png MOD[,MOD]* THEATER FILES Extract terrain tiles to PNG");
|
Console.WriteLine(" --tmp-png MOD[,MOD]* THEATER FILES Extract terrain tiles to PNG");
|
||||||
Console.WriteLine(" --remap SRCMOD:PAL DESTMOD:PAL SRCSHP DESTSHP Remap SHPs to another palette");
|
Console.WriteLine(" --remap SRCMOD:PAL DESTMOD:PAL SRCSHP DESTSHP Remap SHPs to another palette");
|
||||||
Console.WriteLine(" --r8 R8FILE PALETTE START END FILENAME [--noshadow] [--vehicle] [--tileset] Convert Dune 2000 DATA.R8 to PNGs choosing start- and endframe as well as type for correct offset to append multiple frames to one PNG named by filename optionally removing the shadow.");
|
Console.WriteLine(" --r8 R8FILE PALETTE START END FILENAME [--noshadow] [--tileset] Convert Dune 2000 DATA.R8 to PNGs choosing start- and endframe as well as type to append multiple frames to one PNG named by filename optionally removing the shadow.");
|
||||||
Console.WriteLine(" --transpose SRCSHP DESTSHP START N M [START N M ...] Transpose the N*M block of frames starting at START.");
|
Console.WriteLine(" --transpose SRCSHP DESTSHP START N M [START N M ...] Transpose the N*M block of frames starting at START.");
|
||||||
Console.WriteLine(" --docs MOD Generate trait documentation in MarkDown format.");
|
Console.WriteLine(" --docs MOD Generate trait documentation in MarkDown format.");
|
||||||
Console.WriteLine(" --map-hash MAPFILE Generate hash of specified oramap file.");
|
Console.WriteLine(" --map-hash MAPFILE Generate hash of specified oramap file.");
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
^MCV:
|
^MCV:
|
||||||
Inherits: ^Vehicle
|
Inherits: ^Vehicle
|
||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: repair
|
Prerequisites: Repair
|
||||||
Queue: Armor
|
Queue: Armor
|
||||||
BuildPaletteOrder: 110
|
BuildPaletteOrder: 110
|
||||||
Hotkey: m
|
Hotkey: m
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ explosion:
|
|||||||
small_napalm: DATA.R8
|
small_napalm: DATA.R8
|
||||||
Start: 3421
|
Start: 3421
|
||||||
Length: 8
|
Length: 8
|
||||||
|
shockwave: DATA.R8
|
||||||
|
Start: 3687
|
||||||
|
Length: 6
|
||||||
|
|
||||||
90mm:
|
90mm:
|
||||||
idle:
|
idle:
|
||||||
|
|||||||
@@ -1,113 +1,110 @@
|
|||||||
dmcv:
|
dmcv:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 1795
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|
||||||
harvester:
|
harvester:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 1699
|
||||||
Facings: 32
|
Facings: -32
|
||||||
harvest: harvest2
|
harvest: DATA.R8
|
||||||
Start: 0
|
Start: 3631
|
||||||
Length: 6
|
Length: 6
|
||||||
Facings: 8
|
Facings: -8
|
||||||
Tick: 80
|
Tick: 80
|
||||||
ZOffset: 1
|
ZOffset: 1
|
||||||
dock: unload2
|
dock: DATA.R8
|
||||||
Start: 0
|
Start: 3370
|
||||||
Length: 10
|
Length: 10
|
||||||
dock-loop: unload2
|
dock-loop: DATA.R8
|
||||||
Start: 10
|
Start: 3380
|
||||||
Length: 1
|
Length: 1
|
||||||
|
|
||||||
trike:
|
trike:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 1635
|
||||||
Facings: 32
|
Facings: -32
|
||||||
unload:
|
unload: DATA.R8
|
||||||
Start: 0
|
Start: 1635
|
||||||
Facings: 32
|
Facings: -32
|
||||||
muzzle: minimuzzle
|
muzzle: DATA.R8
|
||||||
Start: 0
|
Start: 3839
|
||||||
Length: 1
|
Facings: -32
|
||||||
Facings: 32
|
|
||||||
|
|
||||||
quad:
|
quad:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 1667
|
||||||
Facings: 32
|
Facings: -32
|
||||||
unload:
|
unload: DATA.R8
|
||||||
Start: 0
|
Start: 1667
|
||||||
Facings: 32
|
Facings: -32
|
||||||
muzzle: minimuzzle
|
muzzle: DATA.R8
|
||||||
Start: 0
|
Start: 3839
|
||||||
Length: 1
|
Facings: -32
|
||||||
Facings: 32
|
|
||||||
|
|
||||||
siegetank:
|
siegetank:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 1763
|
||||||
Facings: 32
|
Facings: -32
|
||||||
turret: siegeturret
|
turret: DATA.R8
|
||||||
Start: 0
|
Start: 1891
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|
||||||
missiletank:
|
missiletank:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 1603
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|
||||||
sonictank:
|
sonictank:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 1827
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|
||||||
combata:
|
combata:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 1731
|
||||||
Facings: 32
|
Facings: -32
|
||||||
turret: combataturret
|
turret: DATA.R8
|
||||||
Start: 0
|
Start: 1859
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|
||||||
combath:
|
combath:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 2051
|
||||||
Facings: 32
|
Facings: -32
|
||||||
turret: combathturret
|
turret: DATA.R8
|
||||||
Start: 0
|
Start: 2115
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|
||||||
devast:
|
devast:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 2083
|
||||||
Facings: 32
|
Facings: -32
|
||||||
muzzle: doubleblastmuzzle
|
muzzle: DATA.R8
|
||||||
Start: 0
|
Start: 3807
|
||||||
Length: 1
|
Length: 1
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|
||||||
combato:
|
combato:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 2453
|
||||||
Facings: 32
|
Facings: -32
|
||||||
turret: combatoturret
|
turret: DATA.R8
|
||||||
Start: 0
|
Start: 2485
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|
||||||
raider:
|
raider:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 2421
|
||||||
Facings: 32
|
Facings: -32
|
||||||
unload:
|
unload: DATA.R8
|
||||||
Start: 0
|
Start: 2421
|
||||||
Facings: 32
|
Facings: -32
|
||||||
muzzle: minimuzzle
|
muzzle: DATA.R8
|
||||||
Start: 0
|
Start: 3839
|
||||||
Length: 1
|
Facings: -32
|
||||||
Facings: 32
|
|
||||||
|
|
||||||
deviatortank:
|
deviatortank:
|
||||||
idle:
|
idle: DATA.R8
|
||||||
Start: 0
|
Start: 2389
|
||||||
Facings: 32
|
Facings: -32
|
||||||
|
|||||||
Reference in New Issue
Block a user