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, "146", "161", Path.Combine(pathToSHPs, "sandcrater1") },
|
||||
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, "4012", "4012", Path.Combine(pathToSHPs, "bazookaicon") },
|
||||
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, "sandcrater1.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, "bazookaicon.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);
|
||||
bitmap.Palette = palette.AsSystemPalette();
|
||||
|
||||
int x = 0;
|
||||
|
||||
frame = srcImage[startFrame];
|
||||
|
||||
if (args.Contains("--vehicle"))
|
||||
{
|
||||
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"))
|
||||
if (args.Contains("--tileset"))
|
||||
{
|
||||
int f = 0;
|
||||
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(" --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(" --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(" --docs MOD Generate trait documentation in MarkDown format.");
|
||||
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:
|
||||
Inherits: ^Vehicle
|
||||
Buildable:
|
||||
Prerequisites: repair
|
||||
Prerequisites: Repair
|
||||
Queue: Armor
|
||||
BuildPaletteOrder: 110
|
||||
Hotkey: m
|
||||
|
||||
@@ -40,6 +40,9 @@ explosion:
|
||||
small_napalm: DATA.R8
|
||||
Start: 3421
|
||||
Length: 8
|
||||
shockwave: DATA.R8
|
||||
Start: 3687
|
||||
Length: 6
|
||||
|
||||
90mm:
|
||||
idle:
|
||||
|
||||
@@ -1,113 +1,110 @@
|
||||
dmcv:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 1795
|
||||
Facings: -32
|
||||
|
||||
harvester:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
harvest: harvest2
|
||||
Start: 0
|
||||
idle: DATA.R8
|
||||
Start: 1699
|
||||
Facings: -32
|
||||
harvest: DATA.R8
|
||||
Start: 3631
|
||||
Length: 6
|
||||
Facings: 8
|
||||
Facings: -8
|
||||
Tick: 80
|
||||
ZOffset: 1
|
||||
dock: unload2
|
||||
Start: 0
|
||||
dock: DATA.R8
|
||||
Start: 3370
|
||||
Length: 10
|
||||
dock-loop: unload2
|
||||
Start: 10
|
||||
dock-loop: DATA.R8
|
||||
Start: 3380
|
||||
Length: 1
|
||||
|
||||
trike:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
unload:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
muzzle: minimuzzle
|
||||
Start: 0
|
||||
Length: 1
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 1635
|
||||
Facings: -32
|
||||
unload: DATA.R8
|
||||
Start: 1635
|
||||
Facings: -32
|
||||
muzzle: DATA.R8
|
||||
Start: 3839
|
||||
Facings: -32
|
||||
|
||||
quad:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
unload:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
muzzle: minimuzzle
|
||||
Start: 0
|
||||
Length: 1
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 1667
|
||||
Facings: -32
|
||||
unload: DATA.R8
|
||||
Start: 1667
|
||||
Facings: -32
|
||||
muzzle: DATA.R8
|
||||
Start: 3839
|
||||
Facings: -32
|
||||
|
||||
siegetank:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
turret: siegeturret
|
||||
Start: 0
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 1763
|
||||
Facings: -32
|
||||
turret: DATA.R8
|
||||
Start: 1891
|
||||
Facings: -32
|
||||
|
||||
missiletank:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 1603
|
||||
Facings: -32
|
||||
|
||||
sonictank:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 1827
|
||||
Facings: -32
|
||||
|
||||
combata:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
turret: combataturret
|
||||
Start: 0
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 1731
|
||||
Facings: -32
|
||||
turret: DATA.R8
|
||||
Start: 1859
|
||||
Facings: -32
|
||||
|
||||
combath:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
turret: combathturret
|
||||
Start: 0
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 2051
|
||||
Facings: -32
|
||||
turret: DATA.R8
|
||||
Start: 2115
|
||||
Facings: -32
|
||||
|
||||
devast:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
muzzle: doubleblastmuzzle
|
||||
Start: 0
|
||||
idle: DATA.R8
|
||||
Start: 2083
|
||||
Facings: -32
|
||||
muzzle: DATA.R8
|
||||
Start: 3807
|
||||
Length: 1
|
||||
Facings: 32
|
||||
Facings: -32
|
||||
|
||||
combato:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
turret: combatoturret
|
||||
Start: 0
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 2453
|
||||
Facings: -32
|
||||
turret: DATA.R8
|
||||
Start: 2485
|
||||
Facings: -32
|
||||
|
||||
raider:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
unload:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
muzzle: minimuzzle
|
||||
Start: 0
|
||||
Length: 1
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 2421
|
||||
Facings: -32
|
||||
unload: DATA.R8
|
||||
Start: 2421
|
||||
Facings: -32
|
||||
muzzle: DATA.R8
|
||||
Start: 3839
|
||||
Facings: -32
|
||||
|
||||
deviatortank:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
idle: DATA.R8
|
||||
Start: 2389
|
||||
Facings: -32
|
||||
|
||||
Reference in New Issue
Block a user