diff --git a/OpenRA.Game/Traits/Render/RenderBuildingWall.cs b/OpenRA.Game/Traits/Render/RenderBuildingWall.cs new file mode 100644 index 0000000000..6dd2daa1e1 --- /dev/null +++ b/OpenRA.Game/Traits/Render/RenderBuildingWall.cs @@ -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 . + */ +#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().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().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; + } + + } +} diff --git a/OpenRa.FileFormats/FieldLoader.cs b/OpenRa.FileFormats/FieldLoader.cs index cbce5dcd0f..4c7288be0b 100644 --- a/OpenRa.FileFormats/FieldLoader.cs +++ b/OpenRa.FileFormats/FieldLoader.cs @@ -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 ) ) diff --git a/OpenRa.FileFormats/PlayerColorRemap.cs b/OpenRa.FileFormats/PlayerColorRemap.cs index c14ec5a37a..12c2f394e0 100644 --- a/OpenRa.FileFormats/PlayerColorRemap.cs +++ b/OpenRa.FileFormats/PlayerColorRemap.cs @@ -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 remapColors = new List(); + Dictionary 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; } } } diff --git a/OpenRa.Game/Actor.cs b/OpenRa.Game/Actor.cs index 6dcd9e5f6d..e287229e80 100755 --- a/OpenRa.Game/Actor.cs +++ b/OpenRa.Game/Actor.cs @@ -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) diff --git a/OpenRa.Game/Chrome.cs b/OpenRa.Game/Chrome.cs index 0de8adb4da..3cd9c7f175 100644 --- a/OpenRa.Game/Chrome.cs +++ b/OpenRa.Game/Chrome.cs @@ -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().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()); - } - 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()); - shpRenderer.DrawSprite(sellButton.Image, sellDrawPos, "chrome"); - shpRenderer.Flush(); - - if (Game.Settings.PowerDownBuildings) + foreach (var cb in world.WorldActor.traits.WithInterface()) { - // 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()); - 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, diff --git a/OpenRa.Game/Effects/Missile.cs b/OpenRa.Game/Effects/Missile.cs index 5bdfadb662..5ec6ee70cc 100755 --- a/OpenRa.Game/Effects/Missile.cs +++ b/OpenRa.Game/Effects/Missile.cs @@ -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 Render() diff --git a/OpenRa.Game/GameRules/ProjectileInfo.cs b/OpenRa.Game/GameRules/ProjectileInfo.cs index 216743648b..860dbc91b7 100644 --- a/OpenRa.Game/GameRules/ProjectileInfo.cs +++ b/OpenRa.Game/GameRules/ProjectileInfo.cs @@ -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; } } diff --git a/OpenRa.Game/Graphics/HardwarePalette.cs b/OpenRa.Game/Graphics/HardwarePalette.cs index eafc17b0c8..3317828581 100644 --- a/OpenRa.Game/Graphics/HardwarePalette.cs +++ b/OpenRa.Game/Graphics/HardwarePalette.cs @@ -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 palettes; static Dictionary indices; public HardwarePalette(Renderer renderer, Map map) - : base(renderer,new Size(256, maxEntries)) + : base(renderer,new Size(256, MaxPalettes)) { palettes = new Dictionary(); indices = new Dictionary(); diff --git a/OpenRa.Game/Graphics/Util.cs b/OpenRa.Game/Graphics/Util.cs index e8ee19c127..74c340e33a 100644 --- a/OpenRa.Game/Graphics/Util.cs +++ b/OpenRa.Game/Graphics/Util.cs @@ -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); diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 1e887ff951..8797e29151 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -1,4 +1,4 @@ - + Debug @@ -108,6 +108,7 @@ + @@ -263,6 +264,8 @@ + + diff --git a/OpenRa.Game/PathSearch.cs b/OpenRa.Game/PathSearch.cs index 3a0d8b95f9..7ddb1cfbae 100755 --- a/OpenRa.Game/PathSearch.cs +++ b/OpenRa.Game/PathSearch.cs @@ -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)) diff --git a/OpenRa.Game/Traits/Activities/Sell.cs b/OpenRa.Game/Traits/Activities/Sell.cs index f4286273ba..0c74d5cd07 100644 --- a/OpenRa.Game/Traits/Activities/Sell.cs +++ b/OpenRa.Game/Traits/Activities/Sell.cs @@ -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().anim.GetSequence( "make" ).Length; + framesRemaining = (self.Info.Traits.Get().HasMakeAnimation) ? self.traits.Get().anim.GetSequence( "make" ).Length : 0; foreach( var ns in self.traits.WithInterface() ) ns.Selling( self ); diff --git a/OpenRa.Game/Traits/Chrome/PowerDownButton.cs b/OpenRa.Game/Traits/Chrome/PowerDownButton.cs new file mode 100644 index 0000000000..c8fafdf6bd --- /dev/null +++ b/OpenRa.Game/Traits/Chrome/PowerDownButton.cs @@ -0,0 +1,47 @@ +using System; +using System.Linq; +using OpenRa.Orders; + +namespace OpenRa.Traits +{ + class PowerDownButtonInfo : StatelessTraitInfo { } + + 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(); } + } + + class SellButtonInfo : StatelessTraitInfo { } + + 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(); } + } + + class RepairButtonInfo : StatelessTraitInfo { } + + 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().Any(); + } + } + + public bool Pressed { get { return Game.controller.orderGenerator is RepairOrderGenerator; } } + public void OnClick() { Game.controller.ToggleInputMode(); } + } +} diff --git a/OpenRa.Game/Traits/Render/RenderBuilding.cs b/OpenRa.Game/Traits/Render/RenderBuilding.cs index 32610e9744..cf6adf91ca 100644 --- a/OpenRa.Game/Traits/Render/RenderBuilding.cs +++ b/OpenRa.Game/Traits/Render/RenderBuilding.cs @@ -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 baseFacing) : base(self, baseFacing) - { - if( Game.skipMakeAnims ) + { + if( Game.skipMakeAnims || !self.Info.Traits.Get().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().HasMakeAnimation ) + anim.PlayBackwardsThen( "make", null ); + Sound.PlayToPlayer(self.Owner, "cashturn.aud"); } diff --git a/OpenRa.Game/Traits/TraitsInterfaces.cs b/OpenRa.Game/Traits/TraitsInterfaces.cs index 97600f814b..7165a2ae87 100644 --- a/OpenRa.Game/Traits/TraitsInterfaces.cs +++ b/OpenRa.Game/Traits/TraitsInterfaces.cs @@ -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(); + } } diff --git a/OpenRa.Game/Traits/Wall.cs b/OpenRa.Game/Traits/Wall.cs new file mode 100644 index 0000000000..ec94fb0700 --- /dev/null +++ b/OpenRa.Game/Traits/Wall.cs @@ -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 . + */ +#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 {} + public class Wall {} +} diff --git a/mods/cnc/blue.rem b/mods/cnc/blue.rem new file mode 100644 index 0000000000..122f8c362e --- /dev/null +++ b/mods/cnc/blue.rem @@ -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 diff --git a/mods/cnc/orange.rem b/mods/cnc/orange.rem new file mode 100644 index 0000000000..1fb252b8f2 --- /dev/null +++ b/mods/cnc/orange.rem @@ -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 diff --git a/mods/cnc/red.rem b/mods/cnc/red.rem new file mode 100644 index 0000000000..42b9f3efea --- /dev/null +++ b/mods/cnc/red.rem @@ -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 diff --git a/mods/cnc/system.yaml b/mods/cnc/system.yaml index 53d5cc1747..65cbc9b3d5 100644 --- a/mods/cnc/system.yaml +++ b/mods/cnc/system.yaml @@ -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 \ No newline at end of file + Race: nod + SellButton: + RepairButton: \ No newline at end of file diff --git a/mods/cnc/teal.rem b/mods/cnc/teal.rem new file mode 100644 index 0000000000..2b51f07c01 --- /dev/null +++ b/mods/cnc/teal.rem @@ -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 diff --git a/mods/cnc/weapons.ini b/mods/cnc/weapons.ini index 199cab513d..b5787dd133 100644 --- a/mods/cnc/weapons.ini +++ b/mods/cnc/weapons.ini @@ -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 diff --git a/mods/ra/blue.rem b/mods/ra/blue.rem index 9589fb20cb..ac740c8490 100644 --- a/mods/ra/blue.rem +++ b/mods/ra/blue.rem @@ -1 +1,16 @@ -궾ޡʍ}iuYiDU8H}0@u(8m ,a,U D4 \ No newline at end of file +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 diff --git a/mods/ra/defaults.yaml b/mods/ra/defaults.yaml index eaba4444d7..41d8b23895 100644 --- a/mods/ra/defaults.yaml +++ b/mods/ra/defaults.yaml @@ -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 + diff --git a/mods/ra/gold.rem b/mods/ra/gold.rem index e35abd6942..ca5f7a2926 100644 --- a/mods/ra/gold.rem +++ b/mods/ra/gold.rem @@ -1 +1,16 @@ -yq־iƲaYULu@q8me8YU,UL$HD 844,(  \ No newline at end of file +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 diff --git a/mods/ra/gray.rem b/mods/ra/gray.rem index e397db43d6..41f751f5ef 100644 --- a/mods/ra/gray.rem +++ b/mods/ra/gray.rem @@ -1 +1,16 @@ -κ}qqeqYP]H@P<4P<4<,(<,(,, \ No newline at end of file +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 diff --git a/mods/ra/green.rem b/mods/ra/green.rem index b66e9436e3..c0a88595aa 100644 --- a/mods/ra/green.rem +++ b/mods/ra/green.rem @@ -1 +1,16 @@ -慲}umyei]YuLLe< + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mods/ra/teal.rem b/mods/ra/teal.rem index 8aef28df1a..a624123618 100644 Binary files a/mods/ra/teal.rem and b/mods/ra/teal.rem differ diff --git a/shaders/chrome-shp.fx b/shaders/chrome-shp.fx index d695ac4047..99d5cdb6b0 100644 --- a/shaders/chrome-shp.fx +++ b/shaders/chrome-shp.fx @@ -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 { diff --git a/shaders/world-shp.fx b/shaders/world-shp.fx index f59685bcfb..14d67decfb 100644 --- a/shaders/world-shp.fx +++ b/shaders/world-shp.fx @@ -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 {