Merge remote branches 'alzeih/master', 'pchote/walls' and 'origin/dev'
This commit is contained in:
103
OpenRA.Game/Traits/Render/RenderBuildingWall.cs
Normal file
103
OpenRA.Game/Traits/Render/RenderBuildingWall.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
*
|
||||
* OpenRA is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* OpenRA is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with OpenRA. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
class RenderBuildingWallInfo : RenderBuildingInfo
|
||||
{
|
||||
public readonly int DamageStates = 2;
|
||||
public override object Create(Actor self) { return new RenderBuildingWall(self); }
|
||||
}
|
||||
|
||||
class RenderBuildingWall : RenderBuilding
|
||||
{
|
||||
string seqName;
|
||||
int damageStates;
|
||||
Actor self;
|
||||
|
||||
public RenderBuildingWall(Actor self)
|
||||
: base(self)
|
||||
{
|
||||
seqName = "idle";
|
||||
this.self = self;
|
||||
this.damageStates = self.Info.Traits.Get<RenderBuildingWallInfo>().DamageStates;
|
||||
}
|
||||
|
||||
public override void Damaged(Actor self, AttackInfo e)
|
||||
{
|
||||
if (!e.DamageStateChanged) return;
|
||||
|
||||
switch (e.DamageState)
|
||||
{
|
||||
case DamageState.Normal:
|
||||
seqName = "idle";
|
||||
break;
|
||||
case DamageState.ThreeQuarter:
|
||||
if (damageStates >= 4)
|
||||
seqName = "minor-damaged-idle";
|
||||
break;
|
||||
case DamageState.Half:
|
||||
seqName = "damaged-idle";
|
||||
Sound.Play("kaboom1.aud");
|
||||
break;
|
||||
case DamageState.Quarter:
|
||||
if (damageStates >= 3)
|
||||
{
|
||||
seqName = "critical-idle";
|
||||
Sound.Play("kaboom1.aud");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Tick(Actor self)
|
||||
{
|
||||
base.Tick(self);
|
||||
|
||||
// TODO: This only needs updating when a wall is built or destroyed
|
||||
int index = NearbyWalls( self.Location );
|
||||
|
||||
anim.PlayFetchIndex(seqName, () => index);
|
||||
|
||||
}
|
||||
bool IsWall( int x, int y)
|
||||
{
|
||||
return self.World.Queries.WithTrait<Wall>().Any(a => (a.Actor.Info.Name == self.Info.Name && a.Actor.Location.X == x && a.Actor.Location.Y == y));
|
||||
}
|
||||
|
||||
int NearbyWalls( int2 xy )
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if( IsWall( xy.X, xy.Y - 1 ) )
|
||||
ret |= 1;
|
||||
if( IsWall( xy.X + 1, xy.Y ) )
|
||||
ret |= 2;
|
||||
if( IsWall( xy.X, xy.Y + 1 ) )
|
||||
ret |= 4;
|
||||
if( IsWall( xy.X - 1, xy.Y ) )
|
||||
ret |= 8;
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ namespace OpenRa.FileFormats
|
||||
}
|
||||
}
|
||||
|
||||
static object GetValue( Type fieldType, string x )
|
||||
public static object GetValue( Type fieldType, string x )
|
||||
{
|
||||
if (x != null) x = x.Trim();
|
||||
if( fieldType == typeof( int ) )
|
||||
|
||||
@@ -21,37 +21,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenRa.FileFormats
|
||||
{
|
||||
public class PlayerColorRemap : IPaletteRemap
|
||||
{
|
||||
int offset;
|
||||
List<Color> remapColors = new List<Color>();
|
||||
Dictionary<int, Color> remapColors;
|
||||
|
||||
public PlayerColorRemap(Stream s)
|
||||
{
|
||||
using (BinaryReader reader = new BinaryReader(s))
|
||||
{
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
byte r = reader.ReadByte();
|
||||
byte g = reader.ReadByte();
|
||||
byte b = reader.ReadByte();
|
||||
|
||||
remapColors.Add(Color.FromArgb(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
offset = 80;
|
||||
var yaml = MiniYaml.FromStream(s);
|
||||
remapColors = yaml.ToDictionary(
|
||||
y => int.Parse(y.Key),
|
||||
y => ArrayToColor((int[])FieldLoader.GetValue(
|
||||
typeof(int[]), y.Value.Value.Trim())));
|
||||
}
|
||||
|
||||
static Color ArrayToColor(int[] x) { return Color.FromArgb(x[0], x[1], x[2], x[3]); }
|
||||
|
||||
public Color GetRemappedColor(Color original, int index)
|
||||
{
|
||||
if (index < offset || index >= offset + remapColors.Count)
|
||||
return original;
|
||||
|
||||
return remapColors[index - offset];
|
||||
Color c;
|
||||
return remapColors.TryGetValue(index, out c)
|
||||
? c : original;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
@@ -144,9 +144,19 @@ namespace OpenRa
|
||||
|
||||
public DamageState GetDamageState()
|
||||
{
|
||||
if (Health <= 0) return DamageState.Dead;
|
||||
var halfStrength = this.GetMaxHP() * Rules.General.ConditionYellow;
|
||||
return Health < halfStrength ? DamageState.Half : DamageState.Normal;
|
||||
if (Health <= 0)
|
||||
return DamageState.Dead;
|
||||
|
||||
if (Health < this.GetMaxHP() * Rules.General.ConditionRed)
|
||||
return DamageState.Quarter;
|
||||
|
||||
if (Health < this.GetMaxHP() * Rules.General.ConditionYellow)
|
||||
return DamageState.Half;
|
||||
|
||||
if (Health < this.GetMaxHP() * 0.75)
|
||||
return DamageState.ThreeQuarter;
|
||||
|
||||
return DamageState.Normal;
|
||||
}
|
||||
|
||||
public void InflictDamage(Actor attacker, int damage, WarheadInfo warhead)
|
||||
|
||||
@@ -685,50 +685,22 @@ namespace OpenRa
|
||||
rgbaRenderer.Flush();
|
||||
}
|
||||
|
||||
const int chromeButtonGap = 2;
|
||||
|
||||
void DrawButtons( World world )
|
||||
{
|
||||
int2 buttonOrigin = new int2(Game.viewport.Width - 320, 2);
|
||||
// Repair
|
||||
Rectangle repairRect = new Rectangle(buttonOrigin.X, buttonOrigin.Y, repairButton.Image.bounds.Width, repairButton.Image.bounds.Height);
|
||||
var repairDrawPos = new float2(repairRect.Location);
|
||||
|
||||
var hasFact = world.Queries.OwnedBy[world.LocalPlayer].WithTrait<ConstructionYard>().Any();
|
||||
|
||||
if (Game.Settings.RepairRequiresConyard && !hasFact)
|
||||
repairButton.ReplaceAnim("disabled");
|
||||
else
|
||||
{
|
||||
repairButton.ReplaceAnim(Game.controller.orderGenerator is RepairOrderGenerator ? "pressed" : "normal");
|
||||
AddButton(repairRect, isLmb => Game.controller.ToggleInputMode<RepairOrderGenerator>());
|
||||
}
|
||||
shpRenderer.DrawSprite(repairButton.Image, repairDrawPos, "chrome");
|
||||
var origin = new int2(Game.viewport.Width - 200, 2);
|
||||
|
||||
// Sell
|
||||
Rectangle sellRect = new Rectangle(buttonOrigin.X+40, buttonOrigin.Y,
|
||||
sellButton.Image.bounds.Width, sellButton.Image.bounds.Height);
|
||||
|
||||
var sellDrawPos = new float2(sellRect.Location);
|
||||
|
||||
sellButton.ReplaceAnim(Game.controller.orderGenerator is SellOrderGenerator ? "pressed" : "normal");
|
||||
|
||||
AddButton(sellRect, isLmb => Game.controller.ToggleInputMode<SellOrderGenerator>());
|
||||
shpRenderer.DrawSprite(sellButton.Image, sellDrawPos, "chrome");
|
||||
shpRenderer.Flush();
|
||||
|
||||
if (Game.Settings.PowerDownBuildings)
|
||||
foreach (var cb in world.WorldActor.traits.WithInterface<IChromeButton>())
|
||||
{
|
||||
// Power Down
|
||||
Rectangle pwrdownRect = new Rectangle(buttonOrigin.X+80, buttonOrigin.Y,
|
||||
pwrdownButton.Image.bounds.Width, pwrdownButton.Image.bounds.Height);
|
||||
|
||||
var pwrdownDrawPos = new float2(pwrdownRect.Location);
|
||||
|
||||
pwrdownButton.ReplaceAnim(Game.controller.orderGenerator is PowerDownOrderGenerator ? "pressed" : "normal");
|
||||
|
||||
AddButton(pwrdownRect, isLmb => Game.controller.ToggleInputMode<PowerDownOrderGenerator>());
|
||||
shpRenderer.DrawSprite(pwrdownButton.Image, pwrdownDrawPos, "chrome");
|
||||
var button = cb;
|
||||
var anim = new Animation(cb.Image);
|
||||
anim.Play(cb.Enabled ? cb.Pressed ? "pressed" : "normal" : "disabled");
|
||||
origin.X -= (int)anim.Image.size.X + chromeButtonGap;
|
||||
shpRenderer.DrawSprite(anim.Image, origin, "chrome");
|
||||
AddButton(new RectangleF(origin.X, origin.Y, anim.Image.size.X, anim.Image.size.Y),
|
||||
_ => { if (button.Enabled) button.OnClick(); });
|
||||
}
|
||||
shpRenderer.Flush();
|
||||
|
||||
//Options
|
||||
Rectangle optionsRect = new Rectangle(0,0, optionsButton.Image.bounds.Width,
|
||||
|
||||
@@ -81,13 +81,7 @@ namespace OpenRa.Effects
|
||||
|
||||
var dist = Target.CenterLocation - Pos;
|
||||
if (dist.LengthSquared < MissileCloseEnough * MissileCloseEnough || Target.IsDead)
|
||||
{
|
||||
world.AddFrameEndTask(w => w.Remove(this));
|
||||
|
||||
if (t > Projectile.Arm * 40) /* don't blow up in our launcher's face! */
|
||||
Combat.DoImpact(Pos.ToInt2(), Pos.ToInt2(), Weapon, Projectile, Warhead, FiredBy);
|
||||
return;
|
||||
}
|
||||
Explode(world);
|
||||
|
||||
var speed = Scale * Weapon.Speed * ((targetAltitude > 0 && Weapon.TurboBoost) ? 1.5f : 1f);
|
||||
|
||||
@@ -99,7 +93,17 @@ namespace OpenRa.Effects
|
||||
world.AddFrameEndTask(w => w.Add(
|
||||
new Smoke(w, (Pos - 1.5f * move - new int2( 0, Altitude )).ToInt2(), Projectile.Trail)));
|
||||
|
||||
// todo: running out of fuel
|
||||
if (Projectile.RangeLimit != 0 && t > Projectile.RangeLimit * 40)
|
||||
Explode(world);
|
||||
}
|
||||
|
||||
void Explode(World world)
|
||||
{
|
||||
world.AddFrameEndTask(w => w.Remove(this));
|
||||
|
||||
if (t > Projectile.Arm * 40) /* don't blow up in our launcher's face! */
|
||||
Combat.DoImpact(Pos.ToInt2(), Pos.ToInt2(), Weapon, Projectile, Warhead, FiredBy);
|
||||
return;
|
||||
}
|
||||
|
||||
public IEnumerable<Renderable> Render()
|
||||
|
||||
@@ -25,25 +25,21 @@ namespace OpenRa.GameRules
|
||||
public readonly bool AA = false;
|
||||
public readonly bool AG = true;
|
||||
public readonly bool ASW = false;
|
||||
public readonly string Trail = null;
|
||||
public readonly bool Arcing = false;
|
||||
public readonly int Arm = 0;
|
||||
public readonly bool Degenerates = false;
|
||||
public readonly bool Dropping = false;
|
||||
public readonly int Frames = 1;
|
||||
public readonly bool Gigundo = false;
|
||||
public readonly bool High = false;
|
||||
public readonly string Image = null;
|
||||
public readonly bool Inaccurate = false;
|
||||
public readonly bool Inviso = false;
|
||||
public readonly bool Parachuted = false;
|
||||
public readonly bool Proximity = false;
|
||||
public readonly int ROT = 0;
|
||||
public readonly bool Ranged = false;
|
||||
public readonly bool Rotates = false;
|
||||
public readonly bool Shadow = true;
|
||||
public readonly bool Translucent = false;
|
||||
public readonly bool UnderWater = false;
|
||||
public readonly int RangeLimit = 0;
|
||||
|
||||
// OpenRA-specific:
|
||||
public readonly string Trail = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace OpenRa.Graphics
|
||||
{
|
||||
class HardwarePalette : Sheet
|
||||
{
|
||||
const int maxEntries = 16;
|
||||
public const int MaxPalettes = 64;
|
||||
int allocated = 0;
|
||||
|
||||
// We need to store the Palettes themselves for the remap palettes to work
|
||||
@@ -36,7 +36,7 @@ namespace OpenRa.Graphics
|
||||
static Dictionary<string, Palette> palettes;
|
||||
static Dictionary<string, int> indices;
|
||||
public HardwarePalette(Renderer renderer, Map map)
|
||||
: base(renderer,new Size(256, maxEntries))
|
||||
: base(renderer,new Size(256, MaxPalettes))
|
||||
{
|
||||
palettes = new Dictionary<string, Palette>();
|
||||
indices = new Dictionary<string, int>();
|
||||
|
||||
@@ -52,23 +52,11 @@ namespace OpenRa.Graphics
|
||||
return result;
|
||||
}
|
||||
|
||||
public static readonly int2[] directions =
|
||||
new int2[] {
|
||||
new int2( -1, -1 ),
|
||||
new int2( -1, 0 ),
|
||||
new int2( -1, 1 ),
|
||||
new int2( 0, -1 ),
|
||||
new int2( 0, 1 ),
|
||||
new int2( 1, -1 ),
|
||||
new int2( 1, 0 ),
|
||||
new int2( 1, 1 ),
|
||||
};
|
||||
|
||||
static float[] channelSelect = { 0.75f, 0.25f, -0.25f, -0.75f };
|
||||
|
||||
public static void FastCreateQuad(Vertex[] vertices, ushort[] indices, float2 o, Sprite r, int palette, int nv, int ni, float2 size)
|
||||
{
|
||||
float2 attrib = new float2(palette / 16.0f, channelSelect[(int)r.channel]);
|
||||
var attrib = new float2(palette / (float)HardwarePalette.MaxPalettes, channelSelect[(int)r.channel]);
|
||||
|
||||
vertices[nv] = new Vertex(o,
|
||||
r.FastMapTextureCoords(0), attrib);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -108,6 +108,7 @@
|
||||
<Compile Include="Support\PerfHistory.cs" />
|
||||
<Compile Include="Sync.cs" />
|
||||
<Compile Include="Traits\Attack\AttackOmni.cs" />
|
||||
<Compile Include="Traits\Chrome\PowerDownButton.cs" />
|
||||
<Compile Include="Traits\CustomSellValue.cs" />
|
||||
<Compile Include="Traits\Player\SpawnDefaultUnits.cs" />
|
||||
<Compile Include="Traits\World\BridgeLoadHook.cs" />
|
||||
@@ -263,6 +264,8 @@
|
||||
<Compile Include="Orders\UnitOrderGenerator.cs" />
|
||||
<Compile Include="World.cs" />
|
||||
<Compile Include="WorldUtils.cs" />
|
||||
<Compile Include="Traits\Wall.cs" />
|
||||
<Compile Include="Traits\Render\RenderBuildingWall.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRa.FileFormats\OpenRa.FileFormats.csproj">
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace OpenRa
|
||||
if (thisCost == float.PositiveInfinity)
|
||||
return p.Location;
|
||||
|
||||
foreach( int2 d in Graphics.Util.directions )
|
||||
foreach( int2 d in directions )
|
||||
{
|
||||
int2 newHere = p.Location + d;
|
||||
|
||||
@@ -113,6 +113,18 @@ namespace OpenRa
|
||||
return p.Location;
|
||||
}
|
||||
|
||||
static readonly int2[] directions =
|
||||
{
|
||||
new int2( -1, -1 ),
|
||||
new int2( -1, 0 ),
|
||||
new int2( -1, 1 ),
|
||||
new int2( 0, -1 ),
|
||||
new int2( 0, 1 ),
|
||||
new int2( 1, -1 ),
|
||||
new int2( 1, 0 ),
|
||||
new int2( 1, 1 ),
|
||||
};
|
||||
|
||||
public void AddInitialCell( World world, int2 location )
|
||||
{
|
||||
if (!world.Map.IsInMap(location.X, location.Y))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
@@ -48,7 +48,7 @@ namespace OpenRa.Traits.Activities
|
||||
{
|
||||
if( !started )
|
||||
{
|
||||
framesRemaining = self.traits.Get<RenderSimple>().anim.GetSequence( "make" ).Length;
|
||||
framesRemaining = (self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation) ? self.traits.Get<RenderSimple>().anim.GetSequence( "make" ).Length : 0;
|
||||
foreach( var ns in self.traits.WithInterface<INotifySold>() )
|
||||
ns.Selling( self );
|
||||
|
||||
|
||||
47
OpenRa.Game/Traits/Chrome/PowerDownButton.cs
Normal file
47
OpenRa.Game/Traits/Chrome/PowerDownButton.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using OpenRa.Orders;
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
class PowerDownButtonInfo : StatelessTraitInfo<PowerDownButton> { }
|
||||
|
||||
class PowerDownButton : IChromeButton
|
||||
{
|
||||
public string Image { get { return "repair"; } } // todo: art
|
||||
public bool Enabled { get { return true; } }
|
||||
public bool Pressed { get { return Game.controller.orderGenerator is PowerDownOrderGenerator; } }
|
||||
public void OnClick() { Game.controller.ToggleInputMode<PowerDownOrderGenerator>(); }
|
||||
}
|
||||
|
||||
class SellButtonInfo : StatelessTraitInfo<SellButton> { }
|
||||
|
||||
class SellButton : IChromeButton
|
||||
{
|
||||
public string Image { get { return "sell"; } }
|
||||
public bool Enabled { get { return true; } }
|
||||
public bool Pressed { get { return Game.controller.orderGenerator is SellOrderGenerator; } }
|
||||
public void OnClick() { Game.controller.ToggleInputMode<SellOrderGenerator>(); }
|
||||
}
|
||||
|
||||
class RepairButtonInfo : StatelessTraitInfo<RepairButton> { }
|
||||
|
||||
class RepairButton : IChromeButton
|
||||
{
|
||||
public string Image { get { return "repair"; } } // todo: art
|
||||
public bool Enabled
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!Game.Settings.RepairRequiresConyard)
|
||||
return true;
|
||||
|
||||
return Game.world.Queries.OwnedBy[Game.world.LocalPlayer]
|
||||
.WithTrait<ConstructionYard>().Any();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Pressed { get { return Game.controller.orderGenerator is RepairOrderGenerator; } }
|
||||
public void OnClick() { Game.controller.ToggleInputMode<RepairOrderGenerator>(); }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
@@ -25,6 +25,7 @@ namespace OpenRa.Traits
|
||||
{
|
||||
public class RenderBuildingInfo : RenderSimpleInfo
|
||||
{
|
||||
public readonly bool HasMakeAnimation = true;
|
||||
public override object Create(Actor self) { return new RenderBuilding(self);}
|
||||
}
|
||||
|
||||
@@ -39,8 +40,8 @@ namespace OpenRa.Traits
|
||||
|
||||
public RenderBuilding(Actor self, Func<int> baseFacing)
|
||||
: base(self, baseFacing)
|
||||
{
|
||||
if( Game.skipMakeAnims )
|
||||
{
|
||||
if( Game.skipMakeAnims || !self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation )
|
||||
Complete( self );
|
||||
else
|
||||
anim.PlayThen( "make", () => self.World.AddFrameEndTask( _ => Complete( self ) ) );
|
||||
@@ -124,7 +125,9 @@ namespace OpenRa.Traits
|
||||
|
||||
public void Selling( Actor self )
|
||||
{
|
||||
anim.PlayBackwardsThen( "make", null );
|
||||
if( !Game.skipMakeAnims && self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation )
|
||||
anim.PlayBackwardsThen( "make", null );
|
||||
|
||||
Sound.PlayToPlayer(self.Owner, "cashturn.aud");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
@@ -27,7 +27,7 @@ using OpenRa.Traits.Activities;
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
public enum DamageState { Normal, Half, Dead };
|
||||
public enum DamageState { Normal, ThreeQuarter, Half, Quarter, Dead };
|
||||
|
||||
// depends on the order of pips in WorldRenderer.cs!
|
||||
public enum PipType { Transparent, Green, Yellow, Red, Gray };
|
||||
@@ -132,4 +132,12 @@ namespace OpenRa.Traits
|
||||
IActivity Tick(Actor self);
|
||||
void Cancel(Actor self);
|
||||
}
|
||||
|
||||
public interface IChromeButton
|
||||
{
|
||||
string Image { get; }
|
||||
bool Enabled { get; }
|
||||
bool Pressed { get; }
|
||||
void OnClick();
|
||||
}
|
||||
}
|
||||
|
||||
32
OpenRa.Game/Traits/Wall.cs
Normal file
32
OpenRa.Game/Traits/Wall.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
*
|
||||
* OpenRA is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* OpenRA is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with OpenRA. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRa.Effects;
|
||||
using OpenRa.GameRules;
|
||||
using OpenRa.Traits.Activities;
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
public class WallInfo : StatelessTraitInfo<Wall> {}
|
||||
public class Wall {}
|
||||
}
|
||||
16
mods/cnc/blue.rem
Normal file
16
mods/cnc/blue.rem
Normal file
@@ -0,0 +1,16 @@
|
||||
176: 255,216,252,252
|
||||
177: 255,220,220,228
|
||||
178: 255,192,192,208
|
||||
179: 255,164,164,188
|
||||
180: 255,100,100,124
|
||||
181: 255,72,72,92
|
||||
182: 255,44,44,60
|
||||
183: 255,0,0,0
|
||||
184: 255,192,192,208
|
||||
185: 255,164,164,188
|
||||
186: 255,132,132,156
|
||||
187: 255,100,100,124
|
||||
188: 255,72,72,92
|
||||
189: 255,56,72,76
|
||||
190: 255,52,52,52
|
||||
191: 255,36,44,52
|
||||
16
mods/cnc/orange.rem
Normal file
16
mods/cnc/orange.rem
Normal file
@@ -0,0 +1,16 @@
|
||||
176: 255,236,172,72
|
||||
177: 255,228,148,48
|
||||
178: 255,212,120,16
|
||||
179: 255,196,96,0
|
||||
180: 255,164,56,0
|
||||
181: 255,136,24,0
|
||||
182: 255,96,8,0
|
||||
183: 255,16,0,0
|
||||
184: 255,212,120,16
|
||||
185: 255,196,96,0
|
||||
186: 255,180,72,0
|
||||
187: 255,164,56,0
|
||||
188: 255,152,40,0
|
||||
189: 255,136,24,0
|
||||
190: 255,112,8,0
|
||||
191: 255,16,0,0
|
||||
16
mods/cnc/red.rem
Normal file
16
mods/cnc/red.rem
Normal file
@@ -0,0 +1,16 @@
|
||||
176: 255,244,0,0
|
||||
177: 255,220,20,8
|
||||
178: 255,196,40,20
|
||||
179: 255,172,52,28
|
||||
180: 255,120,48,36
|
||||
181: 255,96,8,0
|
||||
182: 255,56,32,20
|
||||
183: 255,16,0,0
|
||||
184: 255,196,40,20
|
||||
185: 255,172,52,28
|
||||
186: 255,152,48,36
|
||||
187: 255,120,48,36
|
||||
188: 255,112,24,0
|
||||
189: 255,88,44,28
|
||||
190: 255,56,32,20
|
||||
191: 255,56,32,20
|
||||
@@ -41,44 +41,26 @@ World:
|
||||
Name: player1
|
||||
DisplayName: Blue
|
||||
BasePalette: player
|
||||
# Remap: blue.rem
|
||||
Remap: blue.rem
|
||||
DisplayColor: 56, 72, 125
|
||||
PlayerColorPalette@player2:
|
||||
Name: player2
|
||||
DisplayName: Red
|
||||
BasePalette: player
|
||||
# Remap: red.rem
|
||||
Remap: red.rem
|
||||
DisplayColor: 238, 0, 0
|
||||
PlayerColorPalette@player3:
|
||||
Name: player3
|
||||
DisplayName: Orange
|
||||
BasePalette: player
|
||||
# Remap: orange.rem
|
||||
Remap: orange.rem
|
||||
DisplayColor: 198,97,0
|
||||
PlayerColorPalette@player4:
|
||||
Name: player4
|
||||
DisplayName: Teal
|
||||
BasePalette: player
|
||||
# Remap: teal.rem
|
||||
Remap: teal.rem
|
||||
DisplayColor: 28,109,97
|
||||
PlayerColorPalette@player5:
|
||||
Name: player5
|
||||
DisplayName: Salmon
|
||||
BasePalette: player
|
||||
# Remap: salmon.rem
|
||||
DisplayColor: 153,76,53
|
||||
PlayerColorPalette@player6:
|
||||
Name: player6
|
||||
DisplayName: Green
|
||||
BasePalette: player
|
||||
# Remap: green.rem
|
||||
DisplayColor: 76,101,60
|
||||
# PlayerColorPalette@player7:
|
||||
# Name: player7
|
||||
# DisplayName: Gray
|
||||
# BasePalette: player
|
||||
# Remap: gray.rem
|
||||
# DisplayColor: 133,113,101
|
||||
PaletteFromFile@chrome:
|
||||
Name: chrome
|
||||
Filename: temperat.pal
|
||||
@@ -117,4 +99,6 @@ World:
|
||||
Race: gdi
|
||||
Country@nod:
|
||||
Name: Nod
|
||||
Race: nod
|
||||
Race: nod
|
||||
SellButton:
|
||||
RepairButton:
|
||||
16
mods/cnc/teal.rem
Normal file
16
mods/cnc/teal.rem
Normal file
@@ -0,0 +1,16 @@
|
||||
176: 255,0,168,168
|
||||
177: 255,116,148,156
|
||||
178: 255,100,128,136
|
||||
179: 255,0,112,112
|
||||
180: 255,4,92,100
|
||||
181: 255,20,52,72
|
||||
182: 255,4,4,8
|
||||
183: 255,0,0,0
|
||||
184: 255,100,128,136
|
||||
185: 255,0,112,112
|
||||
186: 255,4,92,100
|
||||
187: 255,8,76,92
|
||||
188: 255,16,60,80
|
||||
189: 255,20,52,72
|
||||
190: 255,36,44,52
|
||||
191: 255,4,4,8
|
||||
@@ -74,8 +74,6 @@ HeatSeeker
|
||||
Cannon
|
||||
|
||||
[Invisible]
|
||||
Inviso=yes
|
||||
Image=none
|
||||
|
||||
[HeatSeeker]
|
||||
Arm=2
|
||||
@@ -83,13 +81,12 @@ High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
Inaccurate=yes
|
||||
AA=yes
|
||||
Image=DRAGON
|
||||
ROT=5
|
||||
Rotates=yes
|
||||
Translucent=yes
|
||||
RangeLimit=6
|
||||
|
||||
[Cannon]
|
||||
Image=120MM
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>궾ޡ<EFBFBD>ʍ<EFBFBD><EFBFBD>}<7D><>iu<69>Yi<59>DU<44>8H}0@u(8m ,a,U D4
|
||||
80: 255,226,230,246
|
||||
81: 255,206,210,234
|
||||
82: 255,182,190,222
|
||||
83: 255,161,170,202
|
||||
84: 255,141,149,186
|
||||
85: 255,125,133,174
|
||||
86: 255,105,117,161
|
||||
87: 255,89,105,149
|
||||
88: 255,68,85,137
|
||||
89: 255,56,72,125
|
||||
90: 255,48,64,117
|
||||
91: 255,40,56,109
|
||||
92: 255,32,44,97
|
||||
93: 255,24,44,85
|
||||
94: 255,12,32,68
|
||||
95: 255,8,20,52
|
||||
|
||||
@@ -45,3 +45,19 @@
|
||||
Footprint: x
|
||||
RenderBuilding:
|
||||
|
||||
^Wall:
|
||||
Category: Building
|
||||
Building:
|
||||
Dimensions: 1,1
|
||||
Footprint: x
|
||||
Capturable: false
|
||||
Bib: no
|
||||
Crewed: no
|
||||
Sight: 0
|
||||
Wall:
|
||||
Selectable:
|
||||
RenderBuildingWall:
|
||||
HasMakeAnimation: false
|
||||
Palette: terrain
|
||||
DamageStates: 2
|
||||
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
<EFBFBD><EFBFBD>y<EFBFBD><EFBFBD>q־iƲa<EFBFBD><EFBFBD>Y<EFBFBD><EFBFBD>U<EFBFBD><EFBFBD>L<EFBFBD>u@<40>q8me8YU,UL$HD 844,(
|
||||
80: 255,246,214,121
|
||||
81: 255,230,202,113
|
||||
82: 255,214,190,105
|
||||
83: 255,198,178,97
|
||||
84: 255,182,165,89
|
||||
85: 255,170,153,85
|
||||
86: 255,145,137,76
|
||||
87: 255,145,117,64
|
||||
88: 255,133,113,56
|
||||
89: 255,109,101,56
|
||||
90: 255,89,85,44
|
||||
91: 255,85,76,36
|
||||
92: 255,72,68,32
|
||||
93: 255,56,52,28
|
||||
94: 255,52,44,20
|
||||
95: 255,40,32,8
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}q<>qeqYP]H@P<4P<4<,(<,(,,
|
||||
80: 255,238,238,238
|
||||
81: 255,238,226,218
|
||||
82: 255,222,206,198
|
||||
83: 255,206,186,178
|
||||
84: 255,186,165,153
|
||||
85: 255,165,145,133
|
||||
86: 255,149,125,113
|
||||
87: 255,133,113,101
|
||||
88: 255,113,89,80
|
||||
89: 255,93,72,64
|
||||
90: 255,80,60,52
|
||||
91: 255,80,60,52
|
||||
92: 255,60,44,40
|
||||
93: 255,60,44,40
|
||||
94: 255,44,28,24
|
||||
95: 255,44,28,24
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>慲<EFBFBD>}<7D><>u<EFBFBD><75>my<6D>ei<65>]YuLLe<<U00D$$4$4$
|
||||
80: 255,255,230,149
|
||||
81: 255,255,230,149
|
||||
82: 255,198,230,133
|
||||
83: 255,178,210,125
|
||||
84: 255,157,190,117
|
||||
85: 255,137,174,109
|
||||
86: 255,121,153,101
|
||||
87: 255,105,137,93
|
||||
88: 255,89,117,76
|
||||
89: 255,76,101,60
|
||||
90: 255,60,85,48
|
||||
91: 255,48,68,36
|
||||
92: 255,36,52,24
|
||||
93: 255,36,52,24
|
||||
94: 255,24,36,16
|
||||
95: 255,20,20,20
|
||||
|
||||
Binary file not shown.
BIN
mods/ra/red.rem
BIN
mods/ra/red.rem
Binary file not shown.
@@ -456,35 +456,27 @@ Report=MISSILE1
|
||||
; AA = Can this weapon fire upon flying aircraft (def=no)?
|
||||
; AG = Can this weapon fire upon ground objects (def=yes)?
|
||||
; ASW = Is this an Anti-Submarine-Warfare projectile (def=no)?
|
||||
; Animates = Does it animate [this means smoke puffs] (def=no)?
|
||||
; Arcing = Does it have a ballistic trajectory (def=no)?
|
||||
; Arm = arming delay (def=0)
|
||||
; Degenerates = Does the bullet strength weaken as it travels (def=no)?
|
||||
; Dropping = Does it fall from a starting height (def=no)?
|
||||
; Frames = number of image frames for animation purposes (def=1)
|
||||
; Gigundo = Is the projectile larger than normal (def=no)?
|
||||
; High = Can it fly over walls (def=no)?
|
||||
; Image = image to use during flight
|
||||
; Inaccurate = Is it inherently inaccurate (def=no)?
|
||||
; Inviso = Is the projectile invisible as it travels (def=no)?
|
||||
; Parachuted = Equipped with a parachute for dropping from plane (def=no)?
|
||||
; Proximity = Does it blow up when near its target (def=no)?
|
||||
; ROT = Rate Of Turn [non zero implies homing] (def=0)
|
||||
; Ranged = Can it run out of fuel (def=no)?
|
||||
; Rotates = Does the projectile have rotation specific imagery (def=no)?
|
||||
; Shadow = If High, does this bullet need to have a shadow drawn? (def = yes)
|
||||
; Translucent = Are translucent colors used in artwork (def=no)?
|
||||
; UnderWater = Does the projectile travel under water?
|
||||
; Trail = image to use for smoke puffs etc (def=null)
|
||||
; RangeLimit = maximum flight time (def=0=unlimited)
|
||||
|
||||
; invisible flight to target
|
||||
[Invisible]
|
||||
Inviso=yes
|
||||
Image=none
|
||||
|
||||
; special case for dog
|
||||
[LeapDog]
|
||||
Image=DOGBULLT
|
||||
Translucent=yes
|
||||
Rotates=yes
|
||||
Proximity=yes
|
||||
ROT=20
|
||||
@@ -495,8 +487,6 @@ Image=120MM
|
||||
|
||||
; anti aircraft artillery projectile
|
||||
[Ack]
|
||||
Image=none
|
||||
Inviso=yes
|
||||
AA=true
|
||||
AG=false
|
||||
|
||||
@@ -514,7 +504,6 @@ High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
Inaccurate=yes
|
||||
Image=V2
|
||||
Rotates=yes
|
||||
@@ -526,13 +515,12 @@ High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
Inaccurate=yes
|
||||
AA=yes
|
||||
Image=DRAGON
|
||||
ROT=5
|
||||
Rotates=yes
|
||||
Translucent=yes
|
||||
RangeLimit=5
|
||||
|
||||
; small missile with deadly accuracy
|
||||
[LaserGuided]
|
||||
@@ -541,12 +529,11 @@ High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
AA=yes
|
||||
Image=DRAGON
|
||||
ROT=20
|
||||
Rotates=yes
|
||||
Translucent=yes
|
||||
RangeLimit=5
|
||||
|
||||
; anti aircraft missile
|
||||
[AAMissile]
|
||||
@@ -555,13 +542,12 @@ High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
AA=yes
|
||||
AG=no
|
||||
Image=MISSILE
|
||||
ROT=20
|
||||
Rotates=yes
|
||||
Translucent=yes
|
||||
RangeLimit=5
|
||||
|
||||
; lobbed tumbling grenade
|
||||
[Lobbed]
|
||||
@@ -569,8 +555,6 @@ High=yes
|
||||
Arcing=yes
|
||||
Inaccurate=yes
|
||||
Image=BOMB
|
||||
Frames=8
|
||||
Translucent=yes
|
||||
|
||||
; Depth charge catapult
|
||||
[Catapult]
|
||||
@@ -578,20 +562,15 @@ High=yes
|
||||
Arcing=yes
|
||||
Inaccurate=yes
|
||||
Image=BOMB
|
||||
Frames=8
|
||||
ASW=yes
|
||||
AG=no
|
||||
Translucent=yes
|
||||
|
||||
; dropped from plane tumbling object
|
||||
[Bomblet]
|
||||
Arm=24
|
||||
RangeLimit=24
|
||||
High=yes
|
||||
Dropping=yes
|
||||
Image=BOMBLET
|
||||
Frames=6
|
||||
Translucent=yes
|
||||
|
||||
; arcing ballistic projectile
|
||||
[Ballistic]
|
||||
@@ -605,37 +584,27 @@ Image=120MM
|
||||
Arm=24
|
||||
RangeLimit=24
|
||||
High=yes
|
||||
Dropping=yes
|
||||
Parachuted=yes
|
||||
;Image=PARABOMB
|
||||
|
||||
; Allied free radar (GPS satellite)
|
||||
[GPSSatellite]
|
||||
Gigundo=yes
|
||||
High=yes
|
||||
Image=SPUTNIK
|
||||
Frames=4
|
||||
|
||||
; Nuclear missile, flying up
|
||||
[NukeUp]
|
||||
Gigundo=yes
|
||||
High=yes
|
||||
Image=ATOMICUP
|
||||
Frames=4
|
||||
|
||||
; Nuclear missile, flying down
|
||||
[NukeDown]
|
||||
Gigundo=yes
|
||||
High=yes
|
||||
Image=ATOMICDN
|
||||
Frames=4
|
||||
|
||||
; wizard's fireball
|
||||
[Fireball]
|
||||
Trail=fb2
|
||||
Image=FB1
|
||||
Frames=8
|
||||
|
||||
|
||||
; ******* Warhead Characteristics *******
|
||||
; This is what gives the "rock, paper, scissors" character to the game.
|
||||
|
||||
@@ -113,18 +113,18 @@ World:
|
||||
BasePalette: terrain
|
||||
Remap: salmon.rem
|
||||
DisplayColor: 153,76,53
|
||||
# PlayerColorPalette@player6:
|
||||
# Name: player6
|
||||
# DisplayName: Green
|
||||
# BasePalette: terrain
|
||||
# Remap: green.rem
|
||||
# DisplayColor: 76,101,60
|
||||
# PlayerColorPalette@player7:
|
||||
# Name: player7
|
||||
# DisplayName: Gray
|
||||
# BasePalette: terrain
|
||||
# Remap: gray.rem
|
||||
# DisplayColor: 133,113,101
|
||||
PlayerColorPalette@player6:
|
||||
Name: player6
|
||||
DisplayName: Green
|
||||
BasePalette: terrain
|
||||
Remap: green.rem
|
||||
DisplayColor: 76,101,60
|
||||
PlayerColorPalette@player7:
|
||||
Name: player7
|
||||
DisplayName: Gray
|
||||
BasePalette: terrain
|
||||
Remap: gray.rem
|
||||
DisplayColor: 133,113,101
|
||||
PaletteFromFile@chrome:
|
||||
Name: chrome
|
||||
Filename: temperat.pal
|
||||
@@ -188,7 +188,9 @@ World:
|
||||
Country@7:
|
||||
Name: Spain
|
||||
Race: allies
|
||||
|
||||
SellButton:
|
||||
RepairButton:
|
||||
PowerDownButton:
|
||||
|
||||
MGG:
|
||||
GeneratesGap:
|
||||
@@ -2494,3 +2496,62 @@ MEDI:
|
||||
TakeCover:
|
||||
-AutoTarget:
|
||||
|
||||
SBAG:
|
||||
Inherits: ^Wall
|
||||
Buildable:
|
||||
TechLevel: 2
|
||||
Prerequisites: fact
|
||||
Owner: allies
|
||||
Cost: 25
|
||||
Description: Sandbag Wall
|
||||
LongDesc: Stops infantry and blocks enemy fire.\n Can be crushed by tanks.
|
||||
Building:
|
||||
HP: 100
|
||||
Armor: none
|
||||
|
||||
FENC:
|
||||
Inherits: ^Wall
|
||||
Buildable:
|
||||
TechLevel: 2
|
||||
Prerequisites: fact
|
||||
Owner: soviet
|
||||
Cost: 25
|
||||
Description: Wire Fence
|
||||
LongDesc: Stops infantry and blocks enemy fire.\n Can be crushed by tanks.
|
||||
Building:
|
||||
HP: 100
|
||||
Armor: none
|
||||
|
||||
BRIK:
|
||||
Inherits: ^Wall
|
||||
Buildable:
|
||||
TechLevel: 8
|
||||
Prerequisites: fact
|
||||
Owner: allies,soviet
|
||||
Cost: 100
|
||||
Description: Concrete Wall
|
||||
LongDesc: Stop units from passing and block enemy fire.
|
||||
Building:
|
||||
HP: 100
|
||||
Armor: none
|
||||
RenderBuildingWall:
|
||||
DamageStates: 4
|
||||
|
||||
CYCL:
|
||||
Inherits: ^Wall
|
||||
Building:
|
||||
HP: 100
|
||||
Armor: none
|
||||
RenderBuildingWall:
|
||||
DamageStates: 3
|
||||
BARB:
|
||||
Inherits: ^Wall
|
||||
Building:
|
||||
HP: 100
|
||||
Armor: none
|
||||
|
||||
WOOD:
|
||||
Inherits: ^Wall
|
||||
Building:
|
||||
HP: 100
|
||||
Armor: none
|
||||
|
||||
Binary file not shown.
@@ -859,4 +859,31 @@
|
||||
<unit name="badr">
|
||||
<sequence name="idle" start="0" facings="16" />
|
||||
</unit>
|
||||
<unit name="brik">
|
||||
<sequence name="idle" start="0" length="16" />
|
||||
<sequence name="minor-damaged-idle" start="16" length="16" />
|
||||
<sequence name="damaged-idle" start="32" length="16" />
|
||||
<sequence name="critical-idle" start="48" length="16" />
|
||||
</unit>
|
||||
<unit name="sbag">
|
||||
<sequence name="idle" start="0" length="16" />
|
||||
<sequence name="damaged-idle" start="16" length="16" />
|
||||
</unit>
|
||||
<unit name="fenc">
|
||||
<sequence name="idle" start="0" length="16" />
|
||||
<sequence name="damaged-idle" start="16" length="16" />
|
||||
</unit>
|
||||
<unit name="cycl">
|
||||
<sequence name="idle" start="0" length="16" />
|
||||
<sequence name="damaged-idle" start="16" length="16" />
|
||||
<sequence name="critical-idle" start="32" length="16" />
|
||||
</unit>
|
||||
<unit name="barb">
|
||||
<sequence name="idle" start="0" length="16" />
|
||||
<sequence name="damaged-idle" start="16" length="16" />
|
||||
</unit>
|
||||
<unit name="wood">
|
||||
<sequence name="idle" start="0" length="16" />
|
||||
<sequence name="damaged-idle" start="16" length="16" />
|
||||
</unit>
|
||||
</sequences>
|
||||
BIN
mods/ra/teal.rem
BIN
mods/ra/teal.rem
Binary file not shown.
@@ -47,12 +47,10 @@ VertexOut Simple_vp(VertexIn v) {
|
||||
return o;
|
||||
}
|
||||
|
||||
const float2 texelOffset = float2( 0, 1.0f/32.0f );
|
||||
|
||||
float4 Palette_fp(VertexOut f) : COLOR0 {
|
||||
float4 x = tex2D(DiffuseTexture, f.Tex0.xy);
|
||||
float2 p = float2( dot(x, f.ChannelMask), f.Tex0.z );
|
||||
return tex2D(Palette, p + texelOffset);
|
||||
return tex2D(Palette, p);
|
||||
}
|
||||
|
||||
technique low_quality {
|
||||
|
||||
@@ -47,12 +47,10 @@ VertexOut Simple_vp(VertexIn v) {
|
||||
return o;
|
||||
}
|
||||
|
||||
const float2 texelOffset = float2( 0, 1.0f/32.0f );
|
||||
|
||||
float4 Palette_fp(VertexOut f) : COLOR0 {
|
||||
float4 x = tex2D(DiffuseTexture, f.Tex0.xy);
|
||||
float2 p = float2( dot(x, f.ChannelMask), f.Tex0.z );
|
||||
return tex2D(Palette, p + texelOffset);
|
||||
return tex2D(Palette, p);
|
||||
}
|
||||
|
||||
technique low_quality {
|
||||
|
||||
Reference in New Issue
Block a user