Merge remote-tracking branch 'matt/bleed'

This commit is contained in:
Chris Forbes
2012-06-24 21:34:37 +12:00
24 changed files with 69 additions and 1329 deletions

View File

@@ -14,40 +14,31 @@ using System.Linq;
namespace OpenRA.FileFormats
{
// TODO: ship this out of here.
public enum PaletteFormat { ra, cnc, d2k }
public class PlayerColorRemap : IPaletteRemap
{
Dictionary<int, Color> remapColors;
static readonly int[] CncRemapRamp = new[] { 0, 2, 4, 6, 8, 10, 13, 15, 1, 3, 5, 7, 9, 11, 12, 14 };
static readonly int[] NormalRemapRamp = new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
static int GetRemapBase(PaletteFormat fmt)
static int[] GetRemapRamp(int[] Ramp)
{
return (fmt == PaletteFormat.cnc) ? 0xb0 : (fmt == PaletteFormat.d2k) ? 240 : 80;
var RemapRamp = Ramp.Select(r => r - Ramp[0]).ToArray();
return RemapRamp;
}
static int[] GetRemapRamp(PaletteFormat fmt)
public static int GetRemapIndex(int[] Ramp, int i)
{
return (fmt == PaletteFormat.cnc) ? CncRemapRamp : NormalRemapRamp;
return Ramp[i];
}
public static int GetRemapIndex(PaletteFormat fmt, int i)
{
return GetRemapBase(fmt) + GetRemapRamp(fmt)[i];
}
public PlayerColorRemap(PaletteFormat fmt, ColorRamp c)
public PlayerColorRemap(int[] Ramp, ColorRamp c)
{
var c1 = c.GetColor(0);
var c2 = c.GetColor(1); /* temptemp: this can be expressed better */
var baseIndex = GetRemapBase(fmt);
var ramp = GetRemapRamp(fmt);
var baseIndex = Ramp[0];
var RemapRamp = GetRemapRamp(Ramp);
remapColors = ramp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / 16f, c1, c2)))
remapColors = RemapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / 16f, c1, c2)))
.ToDictionary(u => u.First, u => u.Second);
}

View File

@@ -392,6 +392,7 @@ namespace OpenRA
// Work around a miscompile in mono 2.6.7:
// booleans that default to true cannot be set false by an initializer
settings.AdvertiseOnline = false;
settings.AllowUPnP = false;
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0),
Game.Settings.Game.Mods, settings, modData);

View File

@@ -25,9 +25,13 @@ namespace OpenRA.Graphics
{
cursors = new Dictionary<string, CursorSequence>();
var sequences = new MiniYaml(null, sequenceFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal));
var transparent = false;
if (sequences.NodesDict.ContainsKey("Transparent"))
transparent = true;
foreach (var s in sequences.NodesDict["Palettes"].Nodes)
Game.modData.Palette.AddPalette(s.Key, new Palette(FileSystem.Open(s.Value.Value), true));
Game.modData.Palette.AddPalette(s.Key, new Palette(FileSystem.Open(s.Value.Value), transparent));
foreach (var s in sequences.NodesDict["Cursors"].Nodes)
LoadSequencesForCursor(s.Key, s.Value);

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Traits
{
public readonly string BasePalette = null;
public readonly string BaseName = "player";
public readonly PaletteFormat PaletteFormat = PaletteFormat.ra;
public readonly int[] RemapIndex = {};
public object Create( ActorInitializer init ) { return new PlayerColorPalette( init.self.Owner, this ); }
}
@@ -37,7 +37,7 @@ namespace OpenRA.Traits
{
var paletteName = "{0}{1}".F( info.BaseName, owner.InternalName );
var newpal = new Palette(wr.GetPalette(info.BasePalette),
new PlayerColorRemap(info.PaletteFormat, owner.ColorRamp));
new PlayerColorRemap(info.RemapIndex, owner.ColorRamp));
wr.AddPalette(paletteName, newpal);
}
}

View File

@@ -91,7 +91,4 @@ cd "$(SolutionDir)"</PostBuildEvent>
<Name>OpenRA.Mods.RA</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Render\" />
</ItemGroup>
</Project>

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA
public class ColorPickerPaletteModifier : IPalette, IPaletteModifier
{
ColorPickerPaletteModifierInfo Info;
PaletteFormat format;
int[] index;
public ColorRamp Ramp;
public ColorPickerPaletteModifier(ColorPickerPaletteModifierInfo info) { Info = info; }
@@ -34,14 +34,14 @@ namespace OpenRA.Mods.RA
{
var info = Rules.Info["player"].Traits.WithInterface<PlayerColorPaletteInfo>()
.First(p => p.BaseName == Info.PlayerPalette);
format = info.PaletteFormat;
index = info.RemapIndex;
wr.AddPalette("colorpicker", wr.GetPalette(info.BasePalette));
}
public void AdjustPalette(Dictionary<string, Palette> palettes)
{
palettes["colorpicker"] = new Palette(palettes["colorpicker"],
new PlayerColorRemap(format, Ramp));
new PlayerColorRemap(index, Ramp));
}
}
}

View File

@@ -368,24 +368,25 @@ namespace OpenRA.Utility
var remap = new Dictionary<int,int>();
/* the first 4 entries are fixed */
for( var i = 0; i < 4; i++ )
for (var i = 0; i < 4; i++)
remap[i] = i;
var srcPaletteType = Enum<PaletteFormat>.Parse(args[1].Split(':')[0]);
var destPaletteType = Enum<PaletteFormat>.Parse(args[2].Split(':')[0]);
// TODO: should read that from mods/*/system.yaml
var srcRemapIndex = Enum<int[]>.Parse(args[1].Split(':')[0]);
var destRemapIndex = Enum<int[]>.Parse(args[2].Split(':')[0]);
/* the remap range is always 16 entries, but their location and order changes */
for( var i = 0; i < 16; i++ )
remap[ PlayerColorRemap.GetRemapIndex(srcPaletteType, i) ]
= PlayerColorRemap.GetRemapIndex(destPaletteType, i);
// the remap range is always 16 entries, but their location and order changes
for (var i = 0; i < 16; i++)
remap[PlayerColorRemap.GetRemapIndex(srcRemapIndex, i)]
= PlayerColorRemap.GetRemapIndex(destRemapIndex, i);
/* map everything else to the best match based on channel-wise distance */
// map everything else to the best match based on channel-wise distance
var srcPalette = Palette.Load(args[1].Split(':')[1], false);
var destPalette = Palette.Load(args[2].Split(':')[1], false);
var fullIndexRange = Exts.MakeArray<int>(256, x => x);
for( var i = 0; i < 256; i++ )
for (var i = 0; i < 256; i++)
if (!remap.ContainsKey(i))
remap[i] = fullIndexRange
.Where(a => !remap.ContainsValue(a))
@@ -394,7 +395,7 @@ namespace OpenRA.Utility
var srcImage = ShpReader.Load(args[3]);
using( var destStream = File.Create(args[4]) )
using (var destStream = File.Create(args[4]))
ShpWriter.Write(destStream, srcImage.Width, srcImage.Height,
srcImage.Frames.Select( im => im.Image.Select(px => (byte)remap[px]).ToArray() ));
}

View File

@@ -60,7 +60,7 @@ namespace OpenRA.Utility
Console.WriteLine(" --png SHPFILE PALETTE [--transparent] Convert a SHP to a PNG containing all of its frames, optionally setting up transparency");
Console.WriteLine(" --extract MOD[,MOD]* FILES Extract files from mod packages");
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 SRCREMAPINDEX:PAL DESTREMAPINDEX:PAL SRCSHP DESTSHP Remap SHPs to another palette");
Console.WriteLine(" --r8 R8FILE PALETTE START END FILENAME [--transparent] [--infrantry] [--vehicle] [--projectile] [--building] [--wall] [--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 setting up transparency.");
Console.WriteLine(" --transpose SRCSHP DESTSHP START N M [START N M ...] Transpose the N*M block of frames starting at START.");
}

View File

@@ -70,13 +70,12 @@ Container@CREATESERVER_PANEL:
Width:150
Height:20
Text:Advertise Online
Label@PORT_FORWARDING:
X:140
Checkbox@UPNP_CHECKBOX:
X:110
Y:180
Width:220
WordWrap:true
Font:Tiny
Text:You must forward an external port from your router to your computer before other players will be able to join your server.
Width:300
Height:20
Text:Allow UPnP port forwarding
Label@EXTERNAL_PORT_LABEL:
X:15
Y:219

View File

@@ -53,7 +53,7 @@ Player:
orca: 5%
PlayerColorPalette:
BasePalette: terrain
PaletteFormat: cnc
RemapIndex: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190
BaseAttackNotifier:
World:

View File

@@ -1,76 +0,0 @@
Background@CHEATS_PANEL:
Logic:CheatsLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:350
Height:420
Visible:true
Children:
Label@LABEL_TITLE:
X:(PARENT_RIGHT - WIDTH)/2
Y:20
Width:250
Height:25
Text:Developer Mode
Align:Center
Checkbox@DISABLE_SHROUD:
X:30
Y:50
Height:20
Width:PARENT_RIGHT - 30
Text:Disable Shroud
Button@GIVE_EXPLORATION
X:30
Y:80
Width:200
Height:20
Text: Give Exploration
Checkbox@SHOW_UNIT_PATHS:
X:30
Y:110
Width:PARENT_RIGHT - 30
Height:20
Text:Show Unit Paths
Button@GIVE_CASH:
X:30
Y:140
Width:200
Height:20
Text: Give Cash
Checkbox@INSTANT_BUILD:
X:30
Y:170
Width:PARENT_RIGHT - 30
Height:20
Text:Instant Build Speed
Checkbox@INSTANT_CHARGE:
X:30
Y:200
Width:PARENT_RIGHT - 30
Height:20
Text:Support Powers Charge Instantly
Checkbox@ENABLE_TECH:
X:30
Y:230
Width:PARENT_RIGHT - 30
Height:20
Text:Build Everything
Checkbox@UNLIMITED_POWER:
X:30
Y:260
Width:PARENT_RIGHT - 30
Height:20
Text:Unlimited Power
Checkbox@BUILD_ANYWHERE:
X:30
Y:290
Width:PARENT_RIGHT - 30
Height:20
Text:Build Anywhere
Button@CLOSE:
X:30
Y:360
Width:PARENT_RIGHT - 60
Height:20
Text:Close
Key:escape

View File

@@ -1,78 +0,0 @@
Background@CREATESERVER_BG:
Logic:ServerCreationLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:400
Height:240
Children:
Label@LABEL_TITLE:
X:0
Y:20
Width:400
Height:25
Text:Create Server
Align:Center
Font:Bold
Label@SERVER_NAME_LABEL:
X:50
Y:59
Width:95
Height:25
Align: Right
Text:Game Title:
TextField@SERVER_NAME:
X:150
Y:60
Width:210
MaxLength:50
Height:25
Text:OpenRA Game
Label@EXTERNAL_PORT_LABEL:
X:50
Y:94
Width:95
Height:25
Align: Right
Text:External Port:
TextField@EXTERNAL_PORT:
X:150
Y:95
Width:50
MaxLength:5
Height:25
Text:OpenRA Game
Label@LISTEN_PORT_LABEL:
X:210
Y:94
Width:95
Height:25
Align: Right
Text:Listen Port:
TextField@LISTEN_PORT:
X:310
Y:95
Width:50
MaxLength:5
Height:25
Checkbox@ADVERTISE_CHECKBOX:
X:165
Y:130
Width:300
Height:20
Text:Advertise game Online
Button@CREATE_BUTTON:
X:130
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Create
Font:Bold
Key:return
Button@BACK_BUTTON:
X:260
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Cancel
Font:Bold
Key:escape

View File

@@ -1,50 +0,0 @@
ScrollPanel@LABEL_DROPDOWN_TEMPLATE:
Width:DROPDOWN_WIDTH
Children:
ScrollItem@TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Label@LABEL:
X:10
Width:PARENT_RIGHT-20
Height:25
ScrollPanel@RACE_DROPDOWN_TEMPLATE:
Width:DROPDOWN_WIDTH
Children:
ScrollItem@TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Image@FLAG:
X:5
Y:5
Width:30
Height:15
Label@LABEL:
X:40
Width:60
Height:25
ScrollPanel@TEAM_DROPDOWN_TEMPLATE:
Width:DROPDOWN_WIDTH
Children:
ScrollItem@TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Label@LABEL:
X:0
Width:PARENT_RIGHT
Height:25
Align:Center

View File

@@ -1,369 +0,0 @@
Container@INGAME_ROOT:
Logic:IngameChromeLogic
Children:
WorldInteractionController@INTERACTION_CONTROLLER:
X:0
Y:0
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
ViewportScrollController:
X:0
Y:0
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
WorldCommand:
X:0
Y:0
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
Timer@GAME_TIMER:
X: WINDOW_RIGHT/2
Y: 0-10
StrategicProgress@STRATEGIC_PROGRESS:
X: WINDOW_RIGHT/2
Y: 40
Background@POSTGAME_BG:
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:400
Height:100
Background:dialog4
Visible:false
Children:
Label@TEXT:
X:(PARENT_RIGHT - WIDTH)/2
Y:0
Width:200
Height:80
Align:Center
Button@POSTGAME_OBSERVE:
X:10
Y:(PARENT_BOTTOM - HEIGHT - 10)
Width:150
Height:25
Font:Bold
Text:Observe
Button@POSTGAME_QUIT:
X:(PARENT_RIGHT - WIDTH - 10)
Y:(PARENT_BOTTOM - HEIGHT - 10)
Width:150
Height:25
Font:Bold
Text:Leave
SupportPowerBin@INGAME_POWERS_BIN:
X:0
Y:25
BuildPalette@INGAME_BUILD_PALETTE:
X:WINDOW_RIGHT - 250
Y:280
Width:250
Height:500
Button@INGAME_OPTIONS_BUTTON:
X:0
Y:0
Width:160
Height:25
Text:Options
Font:Bold
Key: escape
Button@INGAME_DIPLOMACY_BUTTON:
X:162
Y:0
Width:160
Height:25
Text:Diplomacy
Font:Bold
Button@CHEATS_BUTTON:
X:324
Y:0
Width:160
Height:25
Text:Cheats
Visible:false
Font:Bold
RadarBin@INGAME_RADAR_BIN:
WorldInteractionController:INTERACTION_CONTROLLER
PowerBin@INGAME_POWER_BIN:
MoneyBin@INGAME_MONEY_BIN:
X:WINDOW_RIGHT - WIDTH
Y:0
Width:320
Height: 32
Children:
OrderButton@SELL:
Logic:OrderButtonsChromeLogic
X:3
Y:0
Width:30
Height:30
Image:sell
Description:Sell
LongDesc:Sell buildings, reclaiming a \nproportion of their build cost
OrderButton@POWER_DOWN:
Logic:OrderButtonsChromeLogic
X:39
Y:0
Width:30
Height:30
Image:power
Description:Powerdown
LongDesc:Disable unneeded structures so their \npower can be used elsewhere
OrderButton@REPAIR:
Logic:OrderButtonsChromeLogic
X:75
Y:0
Width:30
Height:30
Image:repair
Description:Repair
LongDesc:Repair damaged buildings
WorldTooltip:
Background@INGAME_OPTIONS_BG:
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:300
Height:295
Visible:false
Children:
Label@LABEL_TITLE:
X:(PARENT_RIGHT - WIDTH)/2
Y:20
Width:250
Height:25
Text:Options
Align:Center
Font:Bold
Button@RESUME:
X:(PARENT_RIGHT - WIDTH)/2
Y:60
Width:160
Height:25
Text:Resume
Font:Bold
Key:escape
Button@SETTINGS:
X:(PARENT_RIGHT - WIDTH)/2
Y:100
Width:160
Height:25
Text:Settings
Font:Bold
Button@MUSIC:
X:(PARENT_RIGHT - WIDTH)/2
Y:140
Width:160
Height:25
Text:Music
Font:Bold
Button@SURRENDER:
X:(PARENT_RIGHT - WIDTH)/2
Y:180
Width:160
Height:25
Text:Surrender
Font:Bold
Button@DISCONNECT:
X:(PARENT_RIGHT - WIDTH)/2
Y:220
Width:160
Height:25
Text:Abort Mission
Font:Bold
Background@DIPLOMACY_BG:
Logic:DiplomacyLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:450
Height:400
Visible:false
Children:
Label@LABEL_TITLE:
X:(PARENT_RIGHT - WIDTH)/2
Y:20
Width:250
Height:25
Text:Diplomacy
Align:Center
Font:Bold
ChatDisplay@CHAT_DISPLAY:
X:250
Y:WINDOW_BOTTOM - HEIGHT - 30
Width: 760
Height: 200
DrawBackground: False
RemoveTime:250
UseContrast: yes
ChatEntry@CHAT_ENTRY:
X:250
Y:WINDOW_BOTTOM - HEIGHT
Width: 760
Height: 30
UseContrast: yes
Background@PERF_BG:
ClickThrough:true
Background:dialog4
Logic:PerfDebugLogic
X:10
Y:WINDOW_BOTTOM - 250
Width: 210
Height: 250
Children:
PerfGraph@GRAPH:
X:5
Y:5
Width:200
Height:200
Label@TEXT:
X:20
Y:205
Width:170
Height:40
Container@OBSERVER_ROOT:
Visible:true
Logic:IngameObserverChromeLogic
Children:
WorldInteractionController@INTERACTION_CONTROLLER:
X:0
Y:0
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
ViewportScrollController:
X:0
Y:0
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
Timer@GAME_TIMER:
X: WINDOW_RIGHT/2
Y: 0-10
Background@POSTGAME_BG:
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:400
Height:100
Background:dialog4
Visible:false
Children:
Label@TEXT:
X:(PARENT_RIGHT - WIDTH)/2
Y:0
Width:200
Height:80
Align:Center
Button@POSTGAME_OBSERVE:
X:10
Y:(PARENT_BOTTOM - HEIGHT - 10)
Width:150
Height:25
Font:Bold
Text:Observe
Button@POSTGAME_QUIT:
X:(PARENT_RIGHT - WIDTH - 10)
Y:(PARENT_BOTTOM - HEIGHT - 10)
Width:150
Height:25
Font:Bold
Text:Leave
SupportPowerBin@INGAME_POWERS_BIN:
X:0
Y:25
Button@INGAME_OPTIONS_BUTTON:
X:0
Y:0
Width:160
Height:25
Text:Options
Font:Bold
Key:escape
WorldTooltip:
Background@INGAME_OPTIONS_BG:
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:300
Height:295
Visible:false
Children:
Label@LABEL_TITLE:
X:(PARENT_RIGHT - WIDTH)/2
Y:20
Width:250
Height:25
Text:Options
Align:Center
Font:Bold
Button@RESUME:
X:(PARENT_RIGHT - WIDTH)/2
Y:60
Width:160
Height:25
Text:Resume
Font:Bold
Key:escape
Button@SETTINGS:
X:(PARENT_RIGHT - WIDTH)/2
Y:100
Width:160
Height:25
Text:Settings
Font:Bold
Button@MUSIC:
X:(PARENT_RIGHT - WIDTH)/2
Y:140
Width:160
Height:25
Text:Music
Font:Bold
Button@SURRENDER:
X:(PARENT_RIGHT - WIDTH)/2
Y:180
Width:160
Height:25
Text:Surrender
Font:Bold
Button@DISCONNECT:
X:(PARENT_RIGHT - WIDTH)/2
Y:220
Width:160
Height:25
Text:Abort Mission
Font:Bold
ChatDisplay@CHAT_DISPLAY:
X:250
Y:WINDOW_BOTTOM - HEIGHT - 30
Width: 760
Height: 200
DrawBackground: False
RemoveTime:250
ChatEntry@CHAT_ENTRY:
X:250
Y:WINDOW_BOTTOM - HEIGHT
Width: 760
Height: 30
Background@PERF_BG:
ClickThrough:true
Background:dialog4
Logic:PerfDebugLogic
X:10
Y:WINDOW_BOTTOM - 250
Width: 210
Height: 250
Children:
PerfGraph@GRAPH:
X:5
Y:5
Width:200
Height:200
Label@TEXT:
X:20
Y:205
Width:170
Height:40
Background@FMVPLAYER:
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
Background:dialog4
Children:
VqaPlayer:
X:0
Y:0
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM

View File

@@ -1,74 +0,0 @@
Background@MAPCHOOSER_PANEL:
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Logic:MapChooserLogic
Width:800
Height:600
Children:
Label@MAPCHOOSER_TITLE:
X:0
Y:17
Align:Center
Width:800
Height:20
Text:Choose Map
Font:Bold
ScrollPanel@MAP_LIST:
X:20
Y:47
Width:PARENT_RIGHT - 40
Height:474
Children:
ScrollItem@MAP_TEMPLATE:
Width:180
Height:208
X:2
Y:0
Visible:false
Children:
Label@TITLE:
X:2
Y:PARENT_BOTTOM-47
Width:PARENT_RIGHT-4
Height:25
Align:Center
Label@DETAILS:
Width:PARENT_RIGHT-4
X:2
Y:PARENT_BOTTOM-35
Align:Center
Height:25
Font:Tiny
Label@AUTHOR:
Width:PARENT_RIGHT-4
X:2
Y:PARENT_BOTTOM-26
Align:Center
Height:25
Font:Tiny
MapPreview@PREVIEW:
X:(PARENT_RIGHT - WIDTH)/2
Y:4
Width:160
Height:160
DropDownButton@GAMEMODE_FILTER:
X:PARENT_RIGHT - 220
Y:17
Width:200
Height:25
Button@BUTTON_OK:
X:PARENT_RIGHT - 295
Y:PARENT_BOTTOM - 49
Width:120
Height:25
Text:Ok
Font:Bold
Key:return
Button@BUTTON_CANCEL:
X:PARENT_RIGHT-154
Y:PARENT_BOTTOM-49
Width:120
Height:25
Text:Cancel
Font:Bold
Key:escape

View File

@@ -1,84 +0,0 @@
Background@MODS_PANEL:
Logic:ModBrowserLogic
Width:740
Height:500
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Children:
Label@TITLE:
Text:Select Mod
Width:PARENT_RIGHT
Y:20
Font:Bold
Align:Center
ScrollPanel@MOD_LIST:
X:15
Y:70
Width:710
Height:PARENT_BOTTOM - 125
Children:
ScrollItem@MOD_TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Label@TITLE:
X:10
Width:200
Height:25
Label@AUTHOR:
X:PARENT_RIGHT-300
Align:Center
Width:50
Height:25
Label@VERSION:
Width:140
X:PARENT_RIGHT-150
Align:Center
Height:25
Container@MOD_LABELS:
Width:710-25
Height:25
X:15
Y:45
Children:
Label@TITLE:
Width:125
Height:25
X:0
Y:0
Text:Title
Align:Center
Font:Bold
Label@AUTHOR:
X:PARENT_RIGHT-300
Align:Center
Width:50
Height:25
Text:Author
Font:Bold
Label@VERSION:
Width:140
X:PARENT_RIGHT-150
Align:Center
Height:25
Text:Version
Font:Bold
Button@BACK_BUTTON:
Key:escape
X:PARENT_RIGHT-180
Y:PARENT_BOTTOM-45
Width:160
Height:25
Font:Bold
Text:Cancel
Button@LOAD_BUTTON:
Key:return
X:PARENT_RIGHT-360
Y:PARENT_BOTTOM-45
Width:160
Height:25
Font:Bold
Text:Load Mod

View File

@@ -1,102 +0,0 @@
Background@REPLAYBROWSER_BG:
Logic:ReplayBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:700
Height:410
Children:
Label@REPLAYBROWSER_LABEL_TITLE:
X:0
Y:20
Width:PARENT_RIGHT
Height:25
Text:Choose Replay
Align:Center
Font:Bold
ScrollPanel@REPLAY_LIST:
X:20
Y:50
Width:390
Height:300
Children:
ScrollItem@REPLAY_TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Label@TITLE:
X:10
Width:PARENT_RIGHT-20
Height:25
Container@REPLAY_INFO:
X:0
Y:0
Width:PARENT_RIGHT
Height:PARENT_BOTTOM
Visible:false
Children:
MapPreview@MAP_PREVIEW:
X:PARENT_RIGHT-241
Y:30
Width:192
Height:192
Label@MAP_TITLE_LABEL:
X:PARENT_RIGHT - 200 - WIDTH
Y:250
Align:Right
Width:70
Height:20
Text:Map:
Font:Bold
Label@MAP_TITLE:
X:PARENT_RIGHT - 195
Y:250
Align:Left
Width:70
Height:20
Label@DURATION_LABEL:
X:PARENT_RIGHT - 200 - WIDTH
Y:270
Align:Right
Width:70
Height:20
Text:Duration:
Font:Bold
Label@DURATION:
X:PARENT_RIGHT - 195
Y:270
Align:Left
Width:70
Height:20
Label@PLAYERS_LABEL:
X:PARENT_RIGHT - 200 - WIDTH
Y:290
Align:Right
Width:70
Height:20
Text:Players:
Font:Bold
Label@PLAYERS:
X:PARENT_RIGHT - 195
Y:290
Align:Left
Width:70
Height:20
Button@WATCH_BUTTON:
X:PARENT_RIGHT - 140 - 130
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Watch
Font:Bold
Key:return
Button@CANCEL_BUTTON:
X:PARENT_RIGHT - 140
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Cancel
Font:Bold
Key:escape

View File

@@ -1,215 +0,0 @@
Background@JOINSERVER_BG:
Logic:ServerBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:540
Height:535
Children:
Label@JOINSERVER_LABEL_TITLE:
X:0
Y:20
Width:PARENT_RIGHT
Height:25
Text:Join Server
Align:Center
Font:Bold
ScrollPanel@SERVER_LIST:
X:20
Y:50
Width:500
Height:425
Children:
ScrollItem@SERVER_TEMPLATE:
Width:PARENT_RIGHT-27
Height:68
X:2
Y:0
Children:
MapPreview@MAP_PREVIEW:
X:2
Y:2
Width:64
Height:64
ShowSpawnPoints:no
Label@TITLE:
X:70
Width:200
Height:25
Font:Bold
Label@MAP:
X:70
Y:20
Width:250
Height:25
Label@PLAYERS:
X:70
Y:40
Width:50
Height:25
Label@STATE:
Width:140
X:PARENT_RIGHT-150
Align:Right
Height:25
Font:Bold
Label@IP:
Width:140
X:PARENT_RIGHT-150
Y:20
Align:Right
Height:25
Label@VERSION:
Width:140
X:PARENT_RIGHT-150
Y:40
Align:Right
Height:25
Label@PROGRESS_LABEL:
X:(PARENT_RIGHT - WIDTH) / 2
Y:PARENT_BOTTOM / 2 - HEIGHT
Width:150
Height:30
Text:Fetching games...
Align:Center
Button@REFRESH_BUTTON:
X:20
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Refresh
Font:Bold
Button@JOIN_BUTTON:
X:PARENT_RIGHT - 140 - 130
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Join
Font:Bold
Key:return
Button@BACK_BUTTON:
X:PARENT_RIGHT - 140
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Cancel
Font:Bold
Key:escape
Background@DIRECTCONNECT_BG:
Logic:DirectConnectLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:400
Height:155
Children:
Label@DIRECTCONNECT_LABEL_TITLE:
X:0
Y:20
Width:400
Height:25
Text:Direct Connect
Align:Center
Font:Bold
Label@ADDRESS_LABEL:
X:50
Y:59
Width:95
Height:25
Align:Right
Text:Server Address:
TextField@IP:
X:150
Y:60
Width:160
MaxLength:50
Height:25
TextField@PORT:
X:315
Y:60
Width:55
MaxLength:5
Height:25
Button@JOIN_BUTTON:
X:130
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Join
Font:Bold
Key:return
Button@BACK_BUTTON:
X:260
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Cancel
Font:Bold
Key:escape
Background@CONNECTIONFAILED_PANEL:
Logic:ConnectionFailedLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:450
Height:150
Children:
Label@CONNECTION_FAILED_TITLE:
X:0
Y:20
Width:450
Height:25
Text:Connection Failed
Align:Center
Font:Bold
Label@CONNECTING_DESC:
X:0
Y:60
Width:PARENT_RIGHT
Height:25
Text:Could not connect to AAA.BBB.CCC.DDD:EEEE
Align:Center
Button@RETRY_BUTTON:
X:PARENT_RIGHT - 360
Y:PARENT_BOTTOM - 45
Width:160
Height:25
Text:Retry
Font:Bold
Key:return
Button@ABORT_BUTTON:
X:PARENT_RIGHT - 180
Y:PARENT_BOTTOM - 45
Width:160
Height:25
Text:Cancel
Font:Bold
Key:escape
Background@CONNECTING_PANEL:
Logic:ConnectionLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:450
Height:150
Children:
Label@CONNECTING_TITLE:
X:0
Y:20
Width:450
Height:25
Text:Connecting
Align:Center
Font:Bold
Label@CONNECTING_DESC:
X:0
Y:60
Width:PARENT_RIGHT
Height:25
Text:Connecting to AAA.BBB.CCC.DDD:EEEE...
Align:Center
Button@ABORT_BUTTON:
X:PARENT_RIGHT - 180
Y:PARENT_BOTTOM - 45
Width:160
Height:25
Text:Abort
Font:Bold
Key:escape

View File

@@ -1,219 +0,0 @@
Background@SETTINGS_MENU:
Logic:SettingsMenuLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM- HEIGHT)/2
Width: 450
Height: 350
Children:
Label@SETTINGS_LABEL_TITLE:
X:0
Y:20
Width:450
Height:25
Text:Settings
Align:Center
Font:Bold
Button@BUTTON_CLOSE:
X:PARENT_RIGHT - 180
Y:PARENT_BOTTOM - 45
Width:160
Height:25
Text:Close
Font:Bold
Key:escape
Container@TAB_CONTAINER:
X:0
Y:50
Width:PARENT_RIGHT
Height:25
Children:
Button@GENERAL:
X:45
Y:0
Width:90
Height:25
Text:General
Font:Bold
Button@AUDIO:
X:135
Y:0
Width:90
Height:25
Text:Audio
Font:Bold
Button@DISPLAY:
X:225
Y:0
Width:90
Height:25
Text:Display
Font:Bold
Button@DEBUG:
X:315
Y:0
Width:90
Height:25
Text:Debug
Font:Bold
Container@GENERAL_PANE:
X:37
Y:100
Width:PARENT_RIGHT - 37
Height:PARENT_BOTTOM - 100
Visible: true
Children:
Label@SETTINGS_PLAYER_NAME:
X:0
Y:10
Text: Player Name:
TextField@NAME:
Text:Name
Width:139
Height:25
X:90
Y:0
MaxLength:16
Checkbox@EDGE_SCROLL:
X:0
Y:30
Width:200
Height:20
Text: Enable Edge Scrolling
Label@EDGE_SCROLL_AMOUNT_LABEL:
X:0
Y:70
Text: Scroll Speed
Slider@EDGE_SCROLL_AMOUNT:
X:130
Y:60
Width:250
Height:20
Ticks:5
MinimumValue: 10
MaximumValue: 50
Checkbox@INVERSE_SCROLL:
X:0
Y:90
Width:200
Height:20
Text: Invert Mouse Drag Scrolling
Checkbox@TEAMCHAT_TOGGLE:
X:0
Y:120
Width:200
Height:20
Text: Shift-Enter Toggles Team Chat
Checkbox@SHOW_SHELLMAP:
X:0
Y:150
Width:200
Height:20
Text: Show Shellmap
Container@AUDIO_PANE:
X:37
Y:100
Width:PARENT_RIGHT - 37
Height:PARENT_BOTTOM - 100
Visible: false
Children:
Label@SOUND_VOLUME_LABEL:
X:0
Y:10
Text: Sound Volume
Slider@SOUND_VOLUME:
X:100
Y:0
Width:250
Height:20
Ticks:5
Label@MUSIC_VOLUME_LABEL:
X:0
Y:40
Text: Music Volume
Slider@MUSIC_VOLUME:
X:100
Y:30
Width:250
Height:20
Ticks:5
Container@DISPLAY_PANE:
X:37
Y:100
Width:PARENT_RIGHT - 37
Height:PARENT_BOTTOM - 100
Visible: false
Children:
Label@MODE_LABEL:
X:0
Y:0
Width:45
Height:25
Text:Mode:
DropDownButton@MODE_DROPDOWN:
X:50
Y:1
Width:170
Height:25
Font:Regular
Text:Windowed
Container@WINDOW_RESOLUTION:
X:220
Y:0
Children:
Label@At:
Text:@
Font:Bold
Y:0-1
Height:25
Width:25
Align:Center
TextField@WINDOW_WIDTH:
X:25
Width:45
Height:25
MaxLength:5
Label@X:
Text:x
Font:Bold
X:70
Y:0-1
Height:25
Width:15
Align:Center
TextField@WINDOW_HEIGHT:
X:85
Width:45
Height:25
MaxLength:5
Label@VIDEO_DESC:
Y:25
Width:PARENT_RIGHT
Height:25
Font:Tiny
Align:Center
Text:Mode/Resolution changes will be applied after the game is restarted
Checkbox@PIXELDOUBLE_CHECKBOX:
Y:50
Width:200
Height:20
Font:Regular
Text:Enable Pixel Doubling
Container@DEBUG_PANE:
X:37
Y:100
Width:PARENT_RIGHT - 37
Height:PARENT_BOTTOM - 100
Visible: false
Children:
Checkbox@PERFDEBUG_CHECKBOX:
X:0
Y:0
Width:300
Height:20
Text:Show Performance Information
Checkbox@CHECKUNSYNCED_CHECKBOX:
X:0
Y:30
Width:300
Height:20
Text:Check Sync around Unsynced Code

View File

@@ -1,4 +1,6 @@
Palettes:
Transparent:
Palettes:
cursor: cursor.pal
mouse: d2k.pal

View File

@@ -62,17 +62,17 @@ Assemblies:
ChromeLayout:
mods/d2k/chrome/gameinit.yaml
mods/d2k/chrome/ingame.yaml
mods/ra/chrome/ingame.yaml
mods/d2k/chrome/mainmenu.yaml
mods/d2k/chrome/settings.yaml
mods/ra/chrome/settings.yaml
mods/d2k/chrome/lobby.yaml
mods/d2k/chrome/map-chooser.yaml
mods/d2k/chrome/create-server.yaml
mods/d2k/chrome/serverbrowser.yaml
mods/d2k/chrome/replaybrowser.yaml
mods/d2k/chrome/dropdowns.yaml
mods/d2k/chrome/modchooser.yaml
mods/d2k/chrome/cheats.yaml
mods/ra/chrome/map-chooser.yaml
mods/ra/chrome/create-server.yaml
mods/ra/chrome/serverbrowser.yaml
mods/ra/chrome/replaybrowser.yaml
mods/ra/chrome/dropdowns.yaml
mods/ra/chrome/modchooser.yaml
mods/ra/chrome/cheats.yaml
Weapons:
mods/d2k/weapons.yaml

View File

@@ -23,8 +23,9 @@
GainsExperience:
GivesExperience:
DrawLineToTarget:
#TODO: not race specific
ActorLostNotification:
Notification:
Notification: AI_ULOST.AUD
ProximityCaptor:
Types:Vehicle
GivesBounty:
@@ -58,7 +59,7 @@
GivesExperience:
DrawLineToTarget:
ActorLostNotification:
Notification:
Notification: AI_ULOST.AUD
ProximityCaptor:
Types:Tank
GivesBounty:
@@ -101,7 +102,7 @@
GivesExperience:
DrawLineToTarget:
ActorLostNotification:
Notification:
Notification: AI_ULOST.AUD
ProximityCaptor:
Types:Infantry
GivesBounty:
@@ -122,7 +123,7 @@
GivesExperience:
DrawLineToTarget:
ActorLostNotification:
Notification:
Notification: AI_ULOST.AUD
DebugAircraftFacing:
DebugAircraftSubPxX:
DebugAircraftSubPxY:
@@ -162,8 +163,18 @@
MustBeDestroyed:
GivesExperience:
# FrozenUnderFog:
CaptureNotification:
Notification:
CaptureNotification@Atreides:
Race: atreides
Notification: AI_CAPT.AUD
CaptureNotification@Harkonnen:
Race: harkonnen
Notification: HI_CAPT.AUD
CaptureNotification@Ordos:
Race: ordos
Notification: OI_CAPT.AUD
#TODO: not Race-specific
ActorLostNotification:
Notification: AI_BLOST.AUD
EditorAppearance:
RelativeToTopLeft: yes
ShakeOnDeath:

View File

@@ -101,7 +101,7 @@ Player:
SquadSize: 10
PlayerColorPalette:
BasePalette: d2k
PaletteFormat: d2k
RemapIndex: 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
BaseAttackNotifier:
Audio: AI_ATACK.AUD

View File

@@ -185,6 +185,7 @@ Player:
SquadSize: 7
PlayerColorPalette:
BasePalette: terrain
RemapIndex: 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
DebugResourceCash:
DebugResourceOre:
DebugResourceOreCapacity: