fixed vehicles driving backwards

also fixed the bazooka for quad
This commit is contained in:
Matthias Mailänder
2012-05-22 22:17:48 +02:00
parent 66f82c6c2a
commit 4c667be946
5 changed files with 14 additions and 35 deletions

View File

@@ -123,14 +123,14 @@ namespace OpenRA.Utility
int x = 0;
if (args.Contains("--vehicle")) //complex resorting to RA/CnC compatible frame order
if (args.Contains("--vehicle")) //resorting to RA/CnC compatible counter-clockwise frame order
{
endFrame = endFrame - (FrameCount / 2);
frame = srcImage[startFrame];
endFrame--;
startFrame--;
for (int f = endFrame; f > startFrame; f--)
{
frame = srcImage[f];
OffsetX = frame.FrameWidth/2 - frame.OffsetX;
OffsetY = frame.FrameHeight/2 - frame.OffsetY;
@@ -147,29 +147,8 @@ namespace OpenRA.Utility
bitmap.UnlockBits(data);
x += frame.FrameWidth;
}
endFrame = endFrame + (FrameCount / 2) - 1;
startFrame = startFrame + (FrameCount / 2) + 1;
for (int f = endFrame; f > startFrame; f--)
{
frame = srcImage[f];
OffsetX = frame.FrameWidth/2 - frame.OffsetX;
OffsetY = frame.FrameHeight/2 - frame.OffsetY;
Console.WriteLine("calculated OffsetX: {0}", OffsetX);
Console.WriteLine("calculated OffsetY: {0}", OffsetY);
var data = bitmap.LockBits(new Rectangle(x+OffsetX, 0+OffsetY, frame.Width, frame.Height), ImageLockMode.WriteOnly,
PixelFormat.Format8bppIndexed);
for (var i = 0; i < frame.Height; i++)
Marshal.Copy(frame.Image, i * frame.Width,
new IntPtr(data.Scan0.ToInt64() + i * data.Stride), frame.Width);
bitmap.UnlockBits(data);
x += frame.FrameWidth;
}
}
else

Binary file not shown.

View File

@@ -45,8 +45,8 @@ PWRA:
Prerequisite: anypower
Building:
Power: 100
Footprint: xx xx
Dimensions: 2,2
Footprint: xx xx xx
Dimensions: 2,3
Health:
HP: 400
Armor:
@@ -145,7 +145,7 @@ REFA:
Description: Harvesters unload spice here.
Building:
Power: -30
Footprint: _x_ xxx x==
Footprint: xxx xxx x==
Dimensions: 3,3
Health:
HP: 900
@@ -211,8 +211,8 @@ LIGHTA:
Description: light vehicles.
Building:
Power: -30
Footprint: xxx xxx
Dimensions: 3,2
Footprint: xxx xxx xxx
Dimensions: 3,3
Health:
HP: 1500
Armor:
@@ -224,8 +224,8 @@ LIGHTA:
PlayerPalette: d2kplayer
RallyPoint:
Exit@1:
SpawnOffset: 5,0
ExitCell: 1,1
SpawnOffset: 10,0
ExitCell: 1,3
Production:
Produces: Vehicle
PrimaryBuilding:

View File

@@ -93,7 +93,7 @@ QUAD:
RenderUnit:
PlayerPalette: d2kplayer
AttackFrontal:
PrimaryWeapon: RedEye
PrimaryWeapon: Dragon
PrimaryOffset: 0,0,0,-2
PrimaryLocalOffset: -4,0,0,0,25, 4,0,0,0,-25
AutoTarget:

View File

@@ -38,7 +38,7 @@ 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 # requires some reordering (again)
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