diff --git a/CHANGELOG b/CHANGELOG
index 5a2e7220e4..b61dd1c1d2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -131,6 +131,7 @@ NEW:
Fixed Chinook being unable to land on tiberium.
Commando will no longer shoot at vehicles or buildings.
Engine:
+ The contents of OpenRA.FileFormats.dll have been merged into OpenRA.Game.exe, and namespaces reorganized.
Converted Aircraft CruiseAltitude to world coordinates.
Converted Health Radius to world coordinates.
Converted production exits to world coordinates.
diff --git a/Makefile b/Makefile
index c7c6942134..150c1d483d 100644
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,7 @@ INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644
# program targets
-CORE = fileformats rcg rgl rsdl rsdl2 rnull game utility geoip irc
+CORE = rcg rgl rsdl rsdl2 rnull game utility geoip irc
TOOLS = editor tsbuild ralint
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
@@ -75,12 +75,6 @@ VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev
######################## PROGRAM TARGET RULES ##########################
#
# Core binaries
-fileformats_SRCS := $(shell find OpenRA.FileFormats/ -iname '*.cs')
-fileformats_TARGET = OpenRA.FileFormats.dll
-fileformats_KIND = library
-fileformats_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Sdl.dll System.Windows.Forms.dll
-PROGRAMS = fileformats
-fileformats: $(fileformats_TARGET)
geoip_SRCS := $(shell find GeoIP/ -iname '*.cs')
geoip_TARGET = GeoIP.dll
@@ -92,7 +86,6 @@ geoip: $(geoip_TARGET)
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
game_TARGET = OpenRA.Game.exe
game_KIND = winexe
-game_DEPS = $(fileformats_TARGET)
game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) thirdparty/Tao/Tao.OpenAl.dll thirdparty/SharpFont.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
@@ -101,7 +94,7 @@ game: $(game_TARGET)
irc_SRCS := $(shell find OpenRA.Irc/ -iname '*.cs')
irc_TARGET = OpenRA.Irc.dll
irc_KIND = library
-irc_DEPS = $(fileformats_TARGET) $(game_TARGET)
+irc_DEPS = $(game_TARGET)
irc_LIBS = $(COMMON_LIBS) $(irc_DEPS)
PROGRAMS += irc
irc: $(irc_TARGET)
@@ -110,31 +103,31 @@ irc: $(irc_TARGET)
rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs')
rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll
rsdl_KIND = library
-rsdl_DEPS = $(fileformats_TARGET) $(game_TARGET)
+rsdl_DEPS = $(game_TARGET)
rsdl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll $(rsdl_DEPS)
rcg_SRCS := $(shell find OpenRA.Renderer.Cg/ -iname '*.cs')
rcg_TARGET = OpenRA.Renderer.Cg.dll
rcg_KIND = library
-rcg_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
+rcg_DEPS = $(game_TARGET) $(rsdl_TARGET)
rcg_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll $(rcg_DEPS)
rgl_SRCS := $(shell find OpenRA.Renderer.Gl/ -iname '*.cs')
rgl_TARGET = OpenRA.Renderer.Gl.dll
rgl_KIND = library
-rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
+rgl_DEPS = $(game_TARGET) $(rsdl_TARGET)
rgl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll $(rgl_DEPS)
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
rsdl2_KIND = library
-rsdl2_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET) $(rgl_TARGET)
+rsdl2_DEPS = $(game_TARGET) $(rsdl_TARGET) $(rgl_TARGET)
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/SDL2-CS.dll $(rsdl2_DEPS)
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library
-rnull_DEPS = $(fileformats_TARGET) $(game_TARGET)
+rnull_DEPS = $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
PROGRAMS += rcg rgl rsdl2 rnull rsdl
renderers: $(rcg_TARGET) $(rgl_TARGET) $(rsdl2_TARGET) $(rnull_TARGET) $(rsdl_TARGET)
@@ -142,7 +135,7 @@ renderers: $(rcg_TARGET) $(rgl_TARGET) $(rsdl2_TARGET) $(rnull_TARGET) $(rsdl_TA
##### Official Mods #####
-STD_MOD_LIBS = $(fileformats_TARGET) $(game_TARGET) thirdparty/KopiLua.dll thirdparty/NLua.dll
+STD_MOD_LIBS = $(game_TARGET) thirdparty/KopiLua.dll thirdparty/NLua.dll
STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET)
# Red Alert
@@ -187,8 +180,8 @@ mod_ts: $(mod_ts_TARGET)
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
editor_KIND = winexe
-editor_DEPS = $(fileformats_TARGET) $(game_TARGET)
-editor_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll System.Data.dll $(editor_DEPS)
+editor_DEPS = $(game_TARGET)
+editor_LIBS = System.Windows.Forms.dll System.Data.dll System.Drawing.dll $(editor_DEPS)
editor_EXTRA = -resource:OpenRA.Editor.Form1.resources -resource:OpenRA.Editor.MapSelect.resources
editor_FLAGS = -win32icon:OpenRA.Editor/OpenRA.Editor.Icon.ico
@@ -203,7 +196,7 @@ editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor
ralint_SRCS := $(shell find OpenRA.Lint/ -iname '*.cs')
ralint_TARGET = OpenRA.Lint.exe
ralint_KIND = exe
-ralint_DEPS = $(fileformats_TARGET) $(game_TARGET)
+ralint_DEPS = $(game_TARGET)
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
PROGRAMS += ralint
ralint: $(ralint_TARGET)
@@ -222,7 +215,7 @@ test:
tsbuild_SRCS := $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
tsbuild_TARGET = OpenRA.TilesetBuilder.exe
tsbuild_KIND = winexe
-tsbuild_DEPS = $(fileformats_TARGET) $(game_TARGET)
+tsbuild_DEPS = $(game_TARGET)
tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.FormBuilder.resources -resource:OpenRA.TilesetBuilder.FormNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources
PROGRAMS += tsbuild
@@ -241,7 +234,7 @@ tsbuild: OpenRA.TilesetBuilder.FormBuilder.resources OpenRA.TilesetBuilder.FormN
utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs')
utility_TARGET = OpenRA.Utility.exe
utility_KIND = exe
-utility_DEPS = $(fileformats_TARGET) $(game_TARGET)
+utility_DEPS = $(game_TARGET)
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/ICSharpCode.SharpZipLib.dll System.Windows.Forms.dll
PROGRAMS += utility
utility: $(utility_TARGET)
diff --git a/OpenRA.Editor/Form1.cs b/OpenRA.Editor/Form1.cs
index 47027f7cf8..4f0cc9dc7a 100644
--- a/OpenRA.Editor/Form1.cs
+++ b/OpenRA.Editor/Form1.cs
@@ -14,7 +14,7 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
@@ -25,7 +25,7 @@ namespace OpenRA.Editor
public Form1(string[] args)
{
InitializeComponent();
- AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
+ AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
currentMod = args.FirstOrDefault() ?? "ra";
@@ -47,7 +47,7 @@ namespace OpenRA.Editor
currentMod = toolStripComboBox1.SelectedItem as string;
Game.modData = new ModData(currentMod);
- FileSystem.LoadFromManifest(Game.modData.Manifest);
+ GlobalFileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map());
var mod = Game.modData.Manifest.Mod;
@@ -147,11 +147,11 @@ namespace OpenRA.Editor
tileset = Rules.TileSets[map.Tileset];
tilesetRenderer = new TileSetRenderer(tileset, manifest.TileSize);
var shadowIndex = new int[] { 3, 4 };
- var palette = new Palette(FileSystem.Open(tileset.Palette), shadowIndex);
+ var palette = new Palette(GlobalFileSystem.Open(tileset.Palette), shadowIndex);
// required for desert terrain in RA
var playerPalette = tileset.PlayerPalette ?? tileset.Palette;
- var shadowedPalette = new Palette(FileSystem.Open(playerPalette), shadowIndex);
+ var shadowedPalette = new Palette(GlobalFileSystem.Open(playerPalette), shadowIndex);
surface1.Bind(map, tileset, tilesetRenderer, palette, shadowedPalette);
diff --git a/OpenRA.Editor/OpenRA.Editor.csproj b/OpenRA.Editor/OpenRA.Editor.csproj
index bfc8defc90..0b0834efec 100644
--- a/OpenRA.Editor/OpenRA.Editor.csproj
+++ b/OpenRA.Editor/OpenRA.Editor.csproj
@@ -166,10 +166,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Editor/RenderUtils.cs b/OpenRA.Editor/RenderUtils.cs
index 1fd5835221..56c223f003 100644
--- a/OpenRA.Editor/RenderUtils.cs
+++ b/OpenRA.Editor/RenderUtils.cs
@@ -13,6 +13,9 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using OpenRA.FileFormats;
+using OpenRA.FileSystem;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Editor
@@ -48,14 +51,14 @@ namespace OpenRA.Editor
{
var image = RenderSprites.GetImage(info);
- using (var s = FileSystem.OpenWithExts(image, tileset.Extensions))
+ using (var s = GlobalFileSystem.OpenWithExts(image, tileset.Extensions))
{
var shp = new ShpReader(s);
var bitmap = RenderShp(shp, p);
try
{
- using (var s2 = FileSystem.OpenWithExts(image + "2", tileset.Extensions))
+ using (var s2 = GlobalFileSystem.OpenWithExts(image + "2", tileset.Extensions))
{
var shp2 = new ShpReader(s2);
var roofBitmap = RenderShp(shp2, p);
@@ -78,7 +81,7 @@ namespace OpenRA.Editor
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, string[] exts, Palette p)
{
var image = info.EditorSprite;
- using (var s = FileSystem.OpenWithExts(image, exts))
+ using (var s = GlobalFileSystem.OpenWithExts(image, exts))
{
// TODO: Do this properly
var shp = new ShpReader(s) as ISpriteSource;
diff --git a/OpenRA.Editor/Surface.cs b/OpenRA.Editor/Surface.cs
index eb3feaa134..d3ccb2d169 100644
--- a/OpenRA.Editor/Surface.cs
+++ b/OpenRA.Editor/Surface.cs
@@ -14,7 +14,9 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
using SGraphics = System.Drawing.Graphics;
diff --git a/OpenRA.Editor/TileSetRenderer.cs b/OpenRA.Editor/TileSetRenderer.cs
index 1ed6ea603f..16575782bf 100644
--- a/OpenRA.Editor/TileSetRenderer.cs
+++ b/OpenRA.Editor/TileSetRenderer.cs
@@ -14,7 +14,8 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
+using OpenRA.Graphics;
namespace OpenRA.Editor
{
@@ -49,7 +50,7 @@ namespace OpenRA.Editor
ISpriteSource source;
if (!sourceCache.ContainsKey(filename))
{
- using (var s = FileSystem.OpenWithExts(filename, exts))
+ using (var s = GlobalFileSystem.OpenWithExts(filename, exts))
source = SpriteSource.LoadSpriteSource(s, filename);
if (source.CacheWhenLoadingTileset)
diff --git a/OpenRA.FileFormats/OpenRA.FileFormats.csproj b/OpenRA.FileFormats/OpenRA.FileFormats.csproj
deleted file mode 100644
index a7c51d8e76..0000000000
--- a/OpenRA.FileFormats/OpenRA.FileFormats.csproj
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- Library
- Properties
- OpenRA.FileFormats
- OpenRA.FileFormats
-
-
- 3.5
-
-
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
-
-
- true
- ..\
- DEBUG;TRACE
- true
- full
- AnyCPU
- prompt
- 4
- false
- AllRules.ruleset
-
-
- bin\Release\
- TRACE
- true
- true
- pdbonly
- AnyCPU
- prompt
- 4
- AllRules.ruleset
-
-
-
-
- 4.0
-
-
-
-
-
-
- False
- ..\thirdparty\Tao\Tao.Sdl.dll
-
-
- 3.0
-
-
- False
- ..\thirdparty\ICSharpCode.SharpZipLib.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- .NET Framework 3.5 SP1 Client Profile
- false
-
-
- False
- .NET Framework 3.5 SP1
- true
-
-
- False
- Windows Installer 3.1
- true
-
-
-
-
-
\ No newline at end of file
diff --git a/OpenRA.FileFormats/Settings.StyleCop b/OpenRA.FileFormats/Settings.StyleCop
deleted file mode 100644
index 7031ca7dff..0000000000
--- a/OpenRA.FileFormats/Settings.StyleCop
+++ /dev/null
@@ -1,349 +0,0 @@
-
-
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
-
-
-
-
-
- False
-
-
-
-
-
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
-
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
-
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
-
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
- False
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs
index 0af70a2b15..0aece8c9b4 100755
--- a/OpenRA.Game/Actor.cs
+++ b/OpenRA.Game/Actor.cs
@@ -12,8 +12,8 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA
diff --git a/OpenRA.FileFormats/CPos.cs b/OpenRA.Game/CPos.cs
similarity index 100%
rename from OpenRA.FileFormats/CPos.cs
rename to OpenRA.Game/CPos.cs
diff --git a/OpenRA.FileFormats/CVec.cs b/OpenRA.Game/CVec.cs
similarity index 100%
rename from OpenRA.FileFormats/CVec.cs
rename to OpenRA.Game/CVec.cs
diff --git a/OpenRA.FileFormats/Exts.cs b/OpenRA.Game/Exts.cs
similarity index 97%
rename from OpenRA.FileFormats/Exts.cs
rename to OpenRA.Game/Exts.cs
index d7d6b499d9..8ee1b34341 100755
--- a/OpenRA.FileFormats/Exts.cs
+++ b/OpenRA.Game/Exts.cs
@@ -99,13 +99,13 @@ namespace OpenRA
return ret;
}
- public static T Random(this IEnumerable ts, Thirdparty.Random r)
+ public static T Random(this IEnumerable ts, Support.Random r)
{
var xs = ts.ToArray();
return xs[r.Next(xs.Length)];
}
- public static T RandomOrDefault(this IEnumerable ts, Thirdparty.Random r)
+ public static T RandomOrDefault(this IEnumerable ts, Support.Random r)
{
if (!ts.Any())
return default(T);
diff --git a/OpenRA.FileFormats/FieldLoader.cs b/OpenRA.Game/FieldLoader.cs
similarity index 99%
rename from OpenRA.FileFormats/FieldLoader.cs
rename to OpenRA.Game/FieldLoader.cs
index d81a73fc60..cca1c1345d 100755
--- a/OpenRA.FileFormats/FieldLoader.cs
+++ b/OpenRA.Game/FieldLoader.cs
@@ -15,8 +15,10 @@ using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
-namespace OpenRA.FileFormats
+namespace OpenRA
{
public static class FieldLoader
{
diff --git a/OpenRA.FileFormats/FieldSaver.cs b/OpenRA.Game/FieldSaver.cs
similarity index 98%
rename from OpenRA.FileFormats/FieldSaver.cs
rename to OpenRA.Game/FieldSaver.cs
index 2cbe8415bf..e2c7048a41 100644
--- a/OpenRA.FileFormats/FieldSaver.cs
+++ b/OpenRA.Game/FieldSaver.cs
@@ -15,7 +15,7 @@ using System.Globalization;
using System.Linq;
using System.Reflection;
-namespace OpenRA.FileFormats
+namespace OpenRA
{
public static class FieldSaver
{
diff --git a/OpenRA.FileFormats/FileFormats/AudLoader.cs b/OpenRA.Game/FileFormats/AudLoader.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/AudLoader.cs
rename to OpenRA.Game/FileFormats/AudLoader.cs
diff --git a/OpenRA.FileFormats/FileFormats/Blast.cs b/OpenRA.Game/FileFormats/Blast.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/Blast.cs
rename to OpenRA.Game/FileFormats/Blast.cs
diff --git a/OpenRA.FileFormats/FileFormats/Blowfish.cs b/OpenRA.Game/FileFormats/Blowfish.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/Blowfish.cs
rename to OpenRA.Game/FileFormats/Blowfish.cs
diff --git a/OpenRA.FileFormats/FileFormats/BlowfishKeyProvider.cs b/OpenRA.Game/FileFormats/BlowfishKeyProvider.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/BlowfishKeyProvider.cs
rename to OpenRA.Game/FileFormats/BlowfishKeyProvider.cs
diff --git a/OpenRA.FileFormats/FileFormats/CRC32.cs b/OpenRA.Game/FileFormats/CRC32.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/CRC32.cs
rename to OpenRA.Game/FileFormats/CRC32.cs
diff --git a/OpenRA.FileFormats/FileFormats/Format2.cs b/OpenRA.Game/FileFormats/Format2.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/Format2.cs
rename to OpenRA.Game/FileFormats/Format2.cs
diff --git a/OpenRA.FileFormats/FileFormats/Format40.cs b/OpenRA.Game/FileFormats/Format40.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/Format40.cs
rename to OpenRA.Game/FileFormats/Format40.cs
diff --git a/OpenRA.FileFormats/FileFormats/Format80.cs b/OpenRA.Game/FileFormats/Format80.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/Format80.cs
rename to OpenRA.Game/FileFormats/Format80.cs
diff --git a/OpenRA.FileFormats/Graphics/HvaReader.cs b/OpenRA.Game/FileFormats/HvaReader.cs
similarity index 100%
rename from OpenRA.FileFormats/Graphics/HvaReader.cs
rename to OpenRA.Game/FileFormats/HvaReader.cs
diff --git a/OpenRA.FileFormats/FileFormats/IniFile.cs b/OpenRA.Game/FileFormats/IniFile.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/IniFile.cs
rename to OpenRA.Game/FileFormats/IniFile.cs
diff --git a/OpenRA.FileFormats/Graphics/PngLoader.cs b/OpenRA.Game/FileFormats/PngLoader.cs
similarity index 99%
rename from OpenRA.FileFormats/Graphics/PngLoader.cs
rename to OpenRA.Game/FileFormats/PngLoader.cs
index 6b7b0e75cb..7f1b438438 100644
--- a/OpenRA.FileFormats/Graphics/PngLoader.cs
+++ b/OpenRA.Game/FileFormats/PngLoader.cs
@@ -18,7 +18,7 @@ using System.Net;
using System.Runtime.InteropServices;
using System.Text;
-namespace OpenRA.FileFormats.Graphics
+namespace OpenRA.FileFormats
{
public static class PngLoader
{
diff --git a/OpenRA.FileFormats/Graphics/R8Reader.cs b/OpenRA.Game/FileFormats/R8Reader.cs
similarity index 98%
rename from OpenRA.FileFormats/Graphics/R8Reader.cs
rename to OpenRA.Game/FileFormats/R8Reader.cs
index edc95b2cf2..bb1da936e9 100644
--- a/OpenRA.FileFormats/Graphics/R8Reader.cs
+++ b/OpenRA.Game/FileFormats/R8Reader.cs
@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
+using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
diff --git a/OpenRA.FileFormats/Graphics/ShpD2Reader.cs b/OpenRA.Game/FileFormats/ShpD2Reader.cs
similarity index 99%
rename from OpenRA.FileFormats/Graphics/ShpD2Reader.cs
rename to OpenRA.Game/FileFormats/ShpD2Reader.cs
index eebf97f4eb..095fb90f12 100644
--- a/OpenRA.FileFormats/Graphics/ShpD2Reader.cs
+++ b/OpenRA.Game/FileFormats/ShpD2Reader.cs
@@ -14,6 +14,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
+using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
diff --git a/OpenRA.FileFormats/Graphics/ShpReader.cs b/OpenRA.Game/FileFormats/ShpReader.cs
similarity index 99%
rename from OpenRA.FileFormats/Graphics/ShpReader.cs
rename to OpenRA.Game/FileFormats/ShpReader.cs
index a6e05e3546..e239c5616a 100644
--- a/OpenRA.FileFormats/Graphics/ShpReader.cs
+++ b/OpenRA.Game/FileFormats/ShpReader.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
+using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
diff --git a/OpenRA.FileFormats/Graphics/ShpTSReader.cs b/OpenRA.Game/FileFormats/ShpTSReader.cs
similarity index 99%
rename from OpenRA.FileFormats/Graphics/ShpTSReader.cs
rename to OpenRA.Game/FileFormats/ShpTSReader.cs
index 5c2f3c15db..8fdaf78348 100644
--- a/OpenRA.FileFormats/Graphics/ShpTSReader.cs
+++ b/OpenRA.Game/FileFormats/ShpTSReader.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
+using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
diff --git a/OpenRA.FileFormats/Graphics/TmpRAReader.cs b/OpenRA.Game/FileFormats/TmpRAReader.cs
similarity index 98%
rename from OpenRA.FileFormats/Graphics/TmpRAReader.cs
rename to OpenRA.Game/FileFormats/TmpRAReader.cs
index ce627eacac..f9ab49628b 100644
--- a/OpenRA.FileFormats/Graphics/TmpRAReader.cs
+++ b/OpenRA.Game/FileFormats/TmpRAReader.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
+using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
diff --git a/OpenRA.FileFormats/Graphics/TmpTDReader.cs b/OpenRA.Game/FileFormats/TmpTDReader.cs
similarity index 98%
rename from OpenRA.FileFormats/Graphics/TmpTDReader.cs
rename to OpenRA.Game/FileFormats/TmpTDReader.cs
index fe73203966..7a6002a92e 100644
--- a/OpenRA.FileFormats/Graphics/TmpTDReader.cs
+++ b/OpenRA.Game/FileFormats/TmpTDReader.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.IO;
+using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
diff --git a/OpenRA.FileFormats/Graphics/TmpTSReader.cs b/OpenRA.Game/FileFormats/TmpTSReader.cs
similarity index 98%
rename from OpenRA.FileFormats/Graphics/TmpTSReader.cs
rename to OpenRA.Game/FileFormats/TmpTSReader.cs
index 581cdeaafd..402d38500b 100644
--- a/OpenRA.FileFormats/Graphics/TmpTSReader.cs
+++ b/OpenRA.Game/FileFormats/TmpTSReader.cs
@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
+using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
diff --git a/OpenRA.FileFormats/Graphics/VqaReader.cs b/OpenRA.Game/FileFormats/VqaReader.cs
similarity index 100%
rename from OpenRA.FileFormats/Graphics/VqaReader.cs
rename to OpenRA.Game/FileFormats/VqaReader.cs
diff --git a/OpenRA.FileFormats/Graphics/VxlReader.cs b/OpenRA.Game/FileFormats/VxlReader.cs
similarity index 100%
rename from OpenRA.FileFormats/Graphics/VxlReader.cs
rename to OpenRA.Game/FileFormats/VxlReader.cs
diff --git a/OpenRA.FileFormats/FileFormats/WavLoader.cs b/OpenRA.Game/FileFormats/WavLoader.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/WavLoader.cs
rename to OpenRA.Game/FileFormats/WavLoader.cs
diff --git a/OpenRA.FileFormats/FileFormats/XccGlobalDatabase.cs b/OpenRA.Game/FileFormats/XccGlobalDatabase.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/XccGlobalDatabase.cs
rename to OpenRA.Game/FileFormats/XccGlobalDatabase.cs
diff --git a/OpenRA.FileFormats/FileFormats/XccLocalDatabase.cs b/OpenRA.Game/FileFormats/XccLocalDatabase.cs
similarity index 100%
rename from OpenRA.FileFormats/FileFormats/XccLocalDatabase.cs
rename to OpenRA.Game/FileFormats/XccLocalDatabase.cs
diff --git a/OpenRA.FileFormats/FileSystem/D2kSoundResources.cs b/OpenRA.Game/FileSystem/D2kSoundResources.cs
similarity index 97%
rename from OpenRA.FileFormats/FileSystem/D2kSoundResources.cs
rename to OpenRA.Game/FileSystem/D2kSoundResources.cs
index f1af247d0e..e5912f12b2 100644
--- a/OpenRA.FileFormats/FileSystem/D2kSoundResources.cs
+++ b/OpenRA.Game/FileSystem/D2kSoundResources.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using System.IO;
-namespace OpenRA.FileFormats
+namespace OpenRA.FileSystem
{
public class D2kSoundResources : IFolder
{
@@ -29,7 +29,7 @@ namespace OpenRA.FileFormats
this.filename = filename;
this.priority = priority;
- s = FileSystem.Open(filename);
+ s = GlobalFileSystem.Open(filename);
s.Seek(0, SeekOrigin.Begin);
filenames = new List();
diff --git a/OpenRA.FileFormats/FileSystem/Folder.cs b/OpenRA.Game/FileSystem/Folder.cs
similarity index 98%
rename from OpenRA.FileFormats/FileSystem/Folder.cs
rename to OpenRA.Game/FileSystem/Folder.cs
index 3d30fac467..b2718dae4c 100644
--- a/OpenRA.FileFormats/FileSystem/Folder.cs
+++ b/OpenRA.Game/FileSystem/Folder.cs
@@ -11,7 +11,7 @@
using System.Collections.Generic;
using System.IO;
-namespace OpenRA.FileFormats
+namespace OpenRA.FileSystem
{
public class Folder : IFolder
{
diff --git a/OpenRA.FileFormats/FileSystem/FileSystem.cs b/OpenRA.Game/FileSystem/GlobalFileSystem.cs
similarity index 94%
rename from OpenRA.FileFormats/FileSystem/FileSystem.cs
rename to OpenRA.Game/FileSystem/GlobalFileSystem.cs
index c4dd0f8b13..f7eeb62db9 100644
--- a/OpenRA.FileFormats/FileSystem/FileSystem.cs
+++ b/OpenRA.Game/FileSystem/GlobalFileSystem.cs
@@ -13,10 +13,23 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
+using OpenRA.Primitives;
-namespace OpenRA.FileFormats
+namespace OpenRA.FileSystem
{
- public static class FileSystem
+ public interface IFolder
+ {
+ Stream GetContent(string filename);
+ bool Exists(string filename);
+ IEnumerable ClassicHashes();
+ IEnumerable CrcHashes();
+ IEnumerable AllFileNames();
+ void Write(Dictionary contents);
+ int Priority { get; }
+ string Name { get; }
+ }
+
+ public static class GlobalFileSystem
{
public static List MountedFolders = new List();
static Cache> classicHashIndex = new Cache>(_ => new List());
diff --git a/OpenRA.FileFormats/FileSystem/InstallShieldPackage.cs b/OpenRA.Game/FileSystem/InstallShieldPackage.cs
similarity index 97%
rename from OpenRA.FileFormats/FileSystem/InstallShieldPackage.cs
rename to OpenRA.Game/FileSystem/InstallShieldPackage.cs
index 24caca2e4e..598fc914e5 100644
--- a/OpenRA.FileFormats/FileSystem/InstallShieldPackage.cs
+++ b/OpenRA.Game/FileSystem/InstallShieldPackage.cs
@@ -11,8 +11,9 @@
using System;
using System.Collections.Generic;
using System.IO;
+using OpenRA.FileFormats;
-namespace OpenRA.FileFormats
+namespace OpenRA.FileSystem
{
public class InstallShieldPackage : IFolder
{
@@ -28,7 +29,7 @@ namespace OpenRA.FileFormats
this.filename = filename;
this.priority = priority;
filenames = new List();
- s = FileSystem.Open(filename);
+ s = GlobalFileSystem.Open(filename);
// Parse package header
BinaryReader reader = new BinaryReader(s);
diff --git a/OpenRA.FileFormats/FileSystem/MixFile.cs b/OpenRA.Game/FileSystem/MixFile.cs
similarity index 92%
rename from OpenRA.FileFormats/FileSystem/MixFile.cs
rename to OpenRA.Game/FileSystem/MixFile.cs
index df041d8fc9..5a9d2b442b 100644
--- a/OpenRA.FileFormats/FileSystem/MixFile.cs
+++ b/OpenRA.Game/FileSystem/MixFile.cs
@@ -13,21 +13,10 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
+using OpenRA.FileFormats;
-namespace OpenRA.FileFormats
+namespace OpenRA.FileSystem
{
- public interface IFolder
- {
- Stream GetContent(string filename);
- bool Exists(string filename);
- IEnumerable ClassicHashes();
- IEnumerable CrcHashes();
- IEnumerable AllFileNames();
- void Write(Dictionary contents);
- int Priority { get; }
- string Name { get; }
- }
-
public class MixFile : IFolder
{
readonly Dictionary index;
@@ -58,7 +47,7 @@ namespace OpenRA.FileFormats
this.filename = filename;
this.priority = priority;
this.type = type;
- s = FileSystem.Open(filename);
+ s = GlobalFileSystem.Open(filename);
// Detect format type
s.Seek(0, SeekOrigin.Begin);
@@ -210,9 +199,9 @@ namespace OpenRA.FileFormats
}
}
- if (FileSystem.Exists("global mix database.dat"))
+ if (GlobalFileSystem.Exists("global mix database.dat"))
{
- var db = new XccGlobalDatabase(FileSystem.Open("global mix database.dat"));
+ var db = new XccGlobalDatabase(GlobalFileSystem.Open("global mix database.dat"));
foreach (var e in db.Entries)
{
var hash = PackageEntry.HashFilename(e, type);
@@ -236,7 +225,7 @@ namespace OpenRA.FileFormats
{
// Cannot modify existing mixfile - rename existing file and
// create a new one with original content plus modifications
- FileSystem.Unmount(this);
+ GlobalFileSystem.Unmount(this);
// TODO: Add existing data to the contents list
if (index.Count > 0)
diff --git a/OpenRA.FileFormats/PackageEntry.cs b/OpenRA.Game/FileSystem/PackageEntry.cs
similarity index 97%
rename from OpenRA.FileFormats/PackageEntry.cs
rename to OpenRA.Game/FileSystem/PackageEntry.cs
index 0460f36cef..ca0ed77941 100644
--- a/OpenRA.FileFormats/PackageEntry.cs
+++ b/OpenRA.Game/FileSystem/PackageEntry.cs
@@ -12,8 +12,9 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
+using OpenRA.FileFormats;
-namespace OpenRA.FileFormats
+namespace OpenRA.FileSystem
{
public enum PackageHashType { Classic, CRC32 }
diff --git a/OpenRA.FileFormats/FileSystem/Pak.cs b/OpenRA.Game/FileSystem/Pak.cs
similarity index 96%
rename from OpenRA.FileFormats/FileSystem/Pak.cs
rename to OpenRA.Game/FileSystem/Pak.cs
index 4247c37c35..a105ee99dc 100644
--- a/OpenRA.FileFormats/FileSystem/Pak.cs
+++ b/OpenRA.Game/FileSystem/Pak.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using System.IO;
-namespace OpenRA.FileFormats
+namespace OpenRA.FileSystem
{
struct Entry
{
@@ -33,7 +33,7 @@ namespace OpenRA.FileFormats
this.filename = filename;
this.priority = priority;
index = new Dictionary();
- stream = FileSystem.Open(filename);
+ stream = GlobalFileSystem.Open(filename);
index = new Dictionary();
var offset = stream.ReadUInt32();
diff --git a/OpenRA.FileFormats/FileSystem/ZipFile.cs b/OpenRA.Game/FileSystem/ZipFile.cs
similarity index 98%
rename from OpenRA.FileFormats/FileSystem/ZipFile.cs
rename to OpenRA.Game/FileSystem/ZipFile.cs
index b23036f336..3df4552e3a 100644
--- a/OpenRA.FileFormats/FileSystem/ZipFile.cs
+++ b/OpenRA.Game/FileSystem/ZipFile.cs
@@ -13,7 +13,7 @@ using System.IO;
using ICSharpCode.SharpZipLib.Zip;
using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
-namespace OpenRA.FileFormats
+namespace OpenRA.FileSystem
{
public class ZipFile : IFolder
{
diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs
index 07110b24e2..868d8b2d14 100644
--- a/OpenRA.Game/Game.cs
+++ b/OpenRA.Game/Game.cs
@@ -14,14 +14,15 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Network;
+using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Widgets;
-using XRandom = OpenRA.Thirdparty.Random;
+using XRandom = OpenRA.Support.Random;
namespace OpenRA
{
@@ -279,7 +280,7 @@ namespace OpenRA
{
Console.WriteLine("Platform is {0}", Platform.CurrentPlatform);
- AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
+ AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
Settings = new Settings(Platform.SupportDir + "settings.yaml", args);
@@ -299,7 +300,7 @@ namespace OpenRA
Settings.Server.AllowPortForward = false;
}
- FileSystem.Mount("."); // Needed to access shaders
+ GlobalFileSystem.Mount("."); // Needed to access shaders
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", "Gl", "Cg", null };
foreach (var r in renderers)
{
diff --git a/OpenRA.Game/GameRules/ActorInfo.cs b/OpenRA.Game/GameRules/ActorInfo.cs
index 2906e58886..1151b7c18c 100644
--- a/OpenRA.Game/GameRules/ActorInfo.cs
+++ b/OpenRA.Game/GameRules/ActorInfo.cs
@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA
diff --git a/OpenRA.Game/GameRules/MusicInfo.cs b/OpenRA.Game/GameRules/MusicInfo.cs
index c7d241add7..59fca18bb1 100644
--- a/OpenRA.Game/GameRules/MusicInfo.cs
+++ b/OpenRA.Game/GameRules/MusicInfo.cs
@@ -9,6 +9,7 @@
#endregion
using OpenRA.FileFormats;
+using OpenRA.FileSystem;
namespace OpenRA.GameRules
{
@@ -26,20 +27,20 @@ namespace OpenRA.GameRules
var nd = value.NodesDict;
var ext = nd.ContainsKey("Extension") ? nd["Extension"].Value : "aud";
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key)+"."+ext;
- if (!FileSystem.Exists(Filename))
+ if (!GlobalFileSystem.Exists(Filename))
return;
Exists = true;
- Length = (int)AudLoader.SoundLength(FileSystem.Open(Filename));
+ Length = (int)AudLoader.SoundLength(GlobalFileSystem.Open(Filename));
}
public void Reload()
{
- if (!FileSystem.Exists(Filename))
+ if (!GlobalFileSystem.Exists(Filename))
return;
Exists = true;
- Length = (int)AudLoader.SoundLength(FileSystem.Open(Filename));
+ Length = (int)AudLoader.SoundLength(GlobalFileSystem.Open(Filename));
}
}
}
diff --git a/OpenRA.Game/Graphics/CursorProvider.cs b/OpenRA.Game/Graphics/CursorProvider.cs
index def36ece8b..0d03eff36a 100644
--- a/OpenRA.Game/Graphics/CursorProvider.cs
+++ b/OpenRA.Game/Graphics/CursorProvider.cs
@@ -11,7 +11,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
+using OpenRA.Primitives;
namespace OpenRA.Graphics
{
@@ -45,7 +46,7 @@ namespace OpenRA.Graphics
palette = new HardwarePalette();
foreach (var p in sequences.NodesDict["Palettes"].Nodes)
- palette.AddPalette(p.Key, new Palette(FileSystem.Open(p.Value.Value), shadowIndex), false);
+ palette.AddPalette(p.Key, new Palette(GlobalFileSystem.Open(p.Value.Value), shadowIndex), false);
foreach (var s in sequences.NodesDict["Cursors"].Nodes)
LoadSequencesForCursor(s.Key, s.Value);
diff --git a/OpenRA.FileFormats/HSLColor.cs b/OpenRA.Game/Graphics/HSLColor.cs
similarity index 98%
rename from OpenRA.FileFormats/HSLColor.cs
rename to OpenRA.Game/Graphics/HSLColor.cs
index f9701593ee..9c6d7559f3 100644
--- a/OpenRA.FileFormats/HSLColor.cs
+++ b/OpenRA.Game/Graphics/HSLColor.cs
@@ -10,7 +10,7 @@
using System.Drawing;
-namespace OpenRA.FileFormats
+namespace OpenRA.Graphics
{
public struct HSLColor
{
diff --git a/OpenRA.Game/Graphics/HardwarePalette.cs b/OpenRA.Game/Graphics/HardwarePalette.cs
index 429735c149..e004f3cd87 100644
--- a/OpenRA.Game/Graphics/HardwarePalette.cs
+++ b/OpenRA.Game/Graphics/HardwarePalette.cs
@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
using OpenRA.Traits;
namespace OpenRA.Graphics
diff --git a/OpenRA.Game/Graphics/LineRenderer.cs b/OpenRA.Game/Graphics/LineRenderer.cs
index 0916b73bc9..6ddc923fae 100644
--- a/OpenRA.Game/Graphics/LineRenderer.cs
+++ b/OpenRA.Game/Graphics/LineRenderer.cs
@@ -9,7 +9,6 @@
#endregion
using System.Drawing;
-using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.Game/Graphics/MappedImage.cs b/OpenRA.Game/Graphics/MappedImage.cs
index 1ddf99f24d..31ccd9ddb8 100644
--- a/OpenRA.Game/Graphics/MappedImage.cs
+++ b/OpenRA.Game/Graphics/MappedImage.cs
@@ -9,7 +9,6 @@
#endregion
using System.Drawing;
-using OpenRA.FileFormats;
using System.Collections.Generic;
namespace OpenRA.Graphics
diff --git a/OpenRA.FileFormats/Palette.cs b/OpenRA.Game/Graphics/Palette.cs
similarity index 99%
rename from OpenRA.FileFormats/Palette.cs
rename to OpenRA.Game/Graphics/Palette.cs
index 784b6efc7b..f2b8d4d56c 100644
--- a/OpenRA.FileFormats/Palette.cs
+++ b/OpenRA.Game/Graphics/Palette.cs
@@ -13,7 +13,7 @@ using System.Drawing.Imaging;
using System.IO;
using System.Reflection;
-namespace OpenRA.FileFormats
+namespace OpenRA.Graphics
{
public class Palette
{
diff --git a/OpenRA.FileFormats/PlayerColorRemap.cs b/OpenRA.Game/Graphics/PlayerColorRemap.cs
similarity index 96%
rename from OpenRA.FileFormats/PlayerColorRemap.cs
rename to OpenRA.Game/Graphics/PlayerColorRemap.cs
index c33b43f155..2aa9ddda69 100755
--- a/OpenRA.FileFormats/PlayerColorRemap.cs
+++ b/OpenRA.Game/Graphics/PlayerColorRemap.cs
@@ -12,8 +12,9 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
+using OpenRA.Primitives;
-namespace OpenRA.FileFormats
+namespace OpenRA.Graphics
{
public class PlayerColorRemap : IPaletteRemap
{
diff --git a/OpenRA.Game/Graphics/QuadRenderer.cs b/OpenRA.Game/Graphics/QuadRenderer.cs
index 970c66a1ce..62585765c0 100644
--- a/OpenRA.Game/Graphics/QuadRenderer.cs
+++ b/OpenRA.Game/Graphics/QuadRenderer.cs
@@ -9,7 +9,6 @@
#endregion
using System.Drawing;
-using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.Game/Graphics/Renderer.cs b/OpenRA.Game/Graphics/Renderer.cs
index 417d616481..ff9a1129f2 100644
--- a/OpenRA.Game/Graphics/Renderer.cs
+++ b/OpenRA.Game/Graphics/Renderer.cs
@@ -15,8 +15,6 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
-using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
using OpenRA.Support;
namespace OpenRA.Graphics
diff --git a/OpenRA.Game/Graphics/Sequence.cs b/OpenRA.Game/Graphics/Sequence.cs
index 0b8d3a9302..d39eec2da3 100644
--- a/OpenRA.Game/Graphics/Sequence.cs
+++ b/OpenRA.Game/Graphics/Sequence.cs
@@ -10,8 +10,6 @@
using System;
using System.Linq;
-using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.Game/Graphics/Sheet.cs b/OpenRA.Game/Graphics/Sheet.cs
index 4df475e86a..4e8cef072c 100644
--- a/OpenRA.Game/Graphics/Sheet.cs
+++ b/OpenRA.Game/Graphics/Sheet.cs
@@ -12,7 +12,7 @@ using System;
using System.Drawing;
using System.Drawing.Imaging;
using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.FileSystem;
namespace OpenRA.Graphics
{
@@ -39,7 +39,7 @@ namespace OpenRA.Graphics
public Sheet(string filename)
{
- var bitmap = (Bitmap)Image.FromStream(FileSystem.Open(filename));
+ var bitmap = (Bitmap)Image.FromStream(GlobalFileSystem.Open(filename));
Size = bitmap.Size;
data = new byte[4*Size.Width*Size.Height];
diff --git a/OpenRA.Game/Graphics/SheetBuilder.cs b/OpenRA.Game/Graphics/SheetBuilder.cs
index 88d4da616e..e27ac5c2d7 100644
--- a/OpenRA.Game/Graphics/SheetBuilder.cs
+++ b/OpenRA.Game/Graphics/SheetBuilder.cs
@@ -11,7 +11,6 @@
using System;
using System.Drawing;
using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.Game/Graphics/Sprite.cs b/OpenRA.Game/Graphics/Sprite.cs
index 948643ffc4..5325e436ee 100644
--- a/OpenRA.Game/Graphics/Sprite.cs
+++ b/OpenRA.Game/Graphics/Sprite.cs
@@ -9,7 +9,6 @@
#endregion
using System.Drawing;
-using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.Game/Graphics/SpriteFont.cs b/OpenRA.Game/Graphics/SpriteFont.cs
index 32ddb7ff3b..893a42ae5a 100644
--- a/OpenRA.Game/Graphics/SpriteFont.cs
+++ b/OpenRA.Game/Graphics/SpriteFont.cs
@@ -11,8 +11,9 @@
using System;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using SharpFont;
+using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.Game/Graphics/SpriteLoader.cs b/OpenRA.Game/Graphics/SpriteLoader.cs
index ad34831633..86b22b2990 100644
--- a/OpenRA.Game/Graphics/SpriteLoader.cs
+++ b/OpenRA.Game/Graphics/SpriteLoader.cs
@@ -11,6 +11,8 @@
using System.IO;
using System.Linq;
using OpenRA.FileFormats;
+using OpenRA.FileSystem;
+using OpenRA.Primitives;
namespace OpenRA.Graphics
{
@@ -31,7 +33,7 @@ namespace OpenRA.Graphics
Sprite[] CacheSpriteFrames(string filename)
{
- var stream = FileSystem.OpenWithExts(filename, exts);
+ var stream = GlobalFileSystem.OpenWithExts(filename, exts);
return SpriteSource.LoadSpriteSource(stream, filename).Frames
.Select(a => SheetBuilder.Add(a))
.ToArray();
diff --git a/OpenRA.Game/Graphics/SpriteRenderer.cs b/OpenRA.Game/Graphics/SpriteRenderer.cs
index 62d8c6a82a..90fbd4ba9a 100644
--- a/OpenRA.Game/Graphics/SpriteRenderer.cs
+++ b/OpenRA.Game/Graphics/SpriteRenderer.cs
@@ -9,7 +9,6 @@
#endregion
using System.Drawing;
-using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.FileFormats/Graphics/SpriteSource.cs b/OpenRA.Game/Graphics/SpriteSource.cs
similarity index 97%
rename from OpenRA.FileFormats/Graphics/SpriteSource.cs
rename to OpenRA.Game/Graphics/SpriteSource.cs
index 5442c8167f..2418da2423 100644
--- a/OpenRA.FileFormats/Graphics/SpriteSource.cs
+++ b/OpenRA.Game/Graphics/SpriteSource.cs
@@ -12,8 +12,9 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
+using OpenRA.FileFormats;
-namespace OpenRA.FileFormats
+namespace OpenRA.Graphics
{
public interface ISpriteFrame
{
@@ -29,6 +30,7 @@ namespace OpenRA.FileFormats
bool CacheWhenLoadingTileset { get; }
}
+ // TODO: Most of this should be moved into the format parsers themselves.
public enum SpriteType { Unknown, ShpTD, ShpTS, ShpD2, TmpTD, TmpRA, TmpTS, R8 }
public static class SpriteSource
{
diff --git a/OpenRA.Game/Graphics/TerrainRenderer.cs b/OpenRA.Game/Graphics/TerrainRenderer.cs
index b50785e02a..72ae13c0c8 100644
--- a/OpenRA.Game/Graphics/TerrainRenderer.cs
+++ b/OpenRA.Game/Graphics/TerrainRenderer.cs
@@ -8,7 +8,6 @@
*/
#endregion
-using OpenRA.FileFormats.Graphics;
using OpenRA.Traits;
namespace OpenRA.Graphics
diff --git a/OpenRA.Game/Graphics/Theater.cs b/OpenRA.Game/Graphics/Theater.cs
index fdbb5908b8..3bfe1bfa95 100644
--- a/OpenRA.Game/Graphics/Theater.cs
+++ b/OpenRA.Game/Graphics/Theater.cs
@@ -13,7 +13,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
namespace OpenRA.Graphics
{
@@ -28,7 +28,7 @@ namespace OpenRA.Graphics
ISpriteSource source;
if (!sourceCache.ContainsKey(filename))
{
- using (var s = FileSystem.OpenWithExts(filename, exts))
+ using (var s = GlobalFileSystem.OpenWithExts(filename, exts))
source = SpriteSource.LoadSpriteSource(s, filename);
if (source.CacheWhenLoadingTileset)
diff --git a/OpenRA.Game/Graphics/Util.cs b/OpenRA.Game/Graphics/Util.cs
index 4f179834c8..1f4d502ec4 100644
--- a/OpenRA.Game/Graphics/Util.cs
+++ b/OpenRA.Game/Graphics/Util.cs
@@ -11,7 +11,6 @@
using System;
using System.Drawing;
using System.Drawing.Imaging;
-using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.FileFormats/Graphics/Vertex.cs b/OpenRA.Game/Graphics/Vertex.cs
similarity index 95%
rename from OpenRA.FileFormats/Graphics/Vertex.cs
rename to OpenRA.Game/Graphics/Vertex.cs
index d0f0815554..cde97b190c 100644
--- a/OpenRA.FileFormats/Graphics/Vertex.cs
+++ b/OpenRA.Game/Graphics/Vertex.cs
@@ -10,7 +10,7 @@
using System.Runtime.InteropServices;
-namespace OpenRA.FileFormats.Graphics
+namespace OpenRA.Graphics
{
[StructLayout(LayoutKind.Sequential)]
public struct Vertex
diff --git a/OpenRA.Game/Graphics/VoxelLoader.cs b/OpenRA.Game/Graphics/VoxelLoader.cs
index 8467ec4746..3bf8f08f2b 100644
--- a/OpenRA.Game/Graphics/VoxelLoader.cs
+++ b/OpenRA.Game/Graphics/VoxelLoader.cs
@@ -13,7 +13,8 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.FileSystem;
+using OpenRA.Primitives;
namespace OpenRA.Graphics
{
@@ -209,8 +210,8 @@ namespace OpenRA.Graphics
Voxel LoadFile(Pair files)
{
- var vxl = new VxlReader(FileSystem.OpenWithExts(files.First, ".vxl"));
- var hva = new HvaReader(FileSystem.OpenWithExts(files.Second, ".hva"));
+ var vxl = new VxlReader(GlobalFileSystem.OpenWithExts(files.First, ".vxl"));
+ var hva = new HvaReader(GlobalFileSystem.OpenWithExts(files.Second, ".hva"));
return new Voxel(this, vxl, hva);
}
diff --git a/OpenRA.Game/Graphics/VoxelProvider.cs b/OpenRA.Game/Graphics/VoxelProvider.cs
index e9f764fb31..683f3b5fd8 100644
--- a/OpenRA.Game/Graphics/VoxelProvider.cs
+++ b/OpenRA.Game/Graphics/VoxelProvider.cs
@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using OpenRA.FileFormats;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.Game/Graphics/VoxelRenderer.cs b/OpenRA.Game/Graphics/VoxelRenderer.cs
index a587aab82d..0a406c8909 100644
--- a/OpenRA.Game/Graphics/VoxelRenderer.cs
+++ b/OpenRA.Game/Graphics/VoxelRenderer.cs
@@ -12,8 +12,7 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.Primitives;
namespace OpenRA.Graphics
{
diff --git a/OpenRA.Game/Graphics/WorldRenderer.cs b/OpenRA.Game/Graphics/WorldRenderer.cs
index d84b9a3841..7e8fece2e4 100644
--- a/OpenRA.Game/Graphics/WorldRenderer.cs
+++ b/OpenRA.Game/Graphics/WorldRenderer.cs
@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Graphics
diff --git a/OpenRA.FileFormats/Hotkey.cs b/OpenRA.Game/Hotkey.cs
similarity index 100%
rename from OpenRA.FileFormats/Hotkey.cs
rename to OpenRA.Game/Hotkey.cs
diff --git a/OpenRA.FileFormats/Graphics/IGraphicsDevice.cs b/OpenRA.Game/IGraphicsDevice.cs
similarity index 98%
rename from OpenRA.FileFormats/Graphics/IGraphicsDevice.cs
rename to OpenRA.Game/IGraphicsDevice.cs
index ae2a280816..56a8ab1ed3 100755
--- a/OpenRA.FileFormats/Graphics/IGraphicsDevice.cs
+++ b/OpenRA.Game/IGraphicsDevice.cs
@@ -10,8 +10,9 @@
using System;
using System.Drawing;
+using OpenRA.Graphics;
-namespace OpenRA.FileFormats.Graphics
+namespace OpenRA
{
[AttributeUsage( AttributeTargets.Assembly )]
public class RendererAttribute : Attribute
diff --git a/OpenRA.FileFormats/Graphics/IInputHandler.cs b/OpenRA.Game/IInputHandler.cs
similarity index 100%
rename from OpenRA.FileFormats/Graphics/IInputHandler.cs
rename to OpenRA.Game/IInputHandler.cs
diff --git a/OpenRA.FileFormats/InstallUtils.cs b/OpenRA.Game/InstallUtils.cs
similarity index 90%
rename from OpenRA.FileFormats/InstallUtils.cs
rename to OpenRA.Game/InstallUtils.cs
index fd6b12ce41..b6e14afffa 100644
--- a/OpenRA.FileFormats/InstallUtils.cs
+++ b/OpenRA.Game/InstallUtils.cs
@@ -14,8 +14,9 @@ using System.IO;
using System.Linq;
using ICSharpCode.SharpZipLib;
using ICSharpCode.SharpZipLib.Zip;
+using OpenRA.FileSystem;
-namespace OpenRA.FileFormats
+namespace OpenRA
{
public static class InstallUtils
{
@@ -43,15 +44,15 @@ namespace OpenRA.FileFormats
if (!Directory.Exists(destPath))
Directory.CreateDirectory(destPath);
- if (!Directory.Exists(srcPath)) { onError("Cannot find " + package); return false; }
- FileSystem.Mount(srcPath);
- if (!FileSystem.Exists(package)) { onError("Cannot find " + package); return false; }
- FileSystem.Mount(package);
+ if (!GlobalFileSystem.Exists(srcPath)) { onError("Cannot find " + package); return false; }
+ GlobalFileSystem.Mount(srcPath);
+ if (!GlobalFileSystem.Exists(package)) { onError("Cannot find " + package); return false; }
+ GlobalFileSystem.Mount(package);
foreach (string s in files)
{
var destFile = Path.Combine(destPath, s);
- using (var sourceStream = FileSystem.Open(s))
+ using (var sourceStream = GlobalFileSystem.Open(s))
using (var destStream = File.Create(destFile))
{
onProgress("Extracting " + s);
diff --git a/OpenRA.FileFormats/Keycode.cs b/OpenRA.Game/Keycode.cs
similarity index 100%
rename from OpenRA.FileFormats/Keycode.cs
rename to OpenRA.Game/Keycode.cs
diff --git a/OpenRA.FileFormats/Manifest.cs b/OpenRA.Game/Manifest.cs
similarity index 98%
rename from OpenRA.FileFormats/Manifest.cs
rename to OpenRA.Game/Manifest.cs
index 6ac3067248..b45bb00f9f 100644
--- a/OpenRA.FileFormats/Manifest.cs
+++ b/OpenRA.Game/Manifest.cs
@@ -12,8 +12,9 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
+using OpenRA.Primitives;
-namespace OpenRA.FileFormats
+namespace OpenRA
{
// Describes what is to be loaded in order to run a mod
public class Manifest
diff --git a/OpenRA.Game/ActorInitializer.cs b/OpenRA.Game/Map/ActorInitializer.cs
similarity index 99%
rename from OpenRA.Game/ActorInitializer.cs
rename to OpenRA.Game/Map/ActorInitializer.cs
index 72a0d200aa..1481ae983e 100755
--- a/OpenRA.Game/ActorInitializer.cs
+++ b/OpenRA.Game/Map/ActorInitializer.cs
@@ -9,7 +9,7 @@
#endregion
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA
diff --git a/OpenRA.Game/ActorReference.cs b/OpenRA.Game/Map/ActorReference.cs
similarity index 97%
rename from OpenRA.Game/ActorReference.cs
rename to OpenRA.Game/Map/ActorReference.cs
index b042d3bf5a..dc608123da 100755
--- a/OpenRA.Game/ActorReference.cs
+++ b/OpenRA.Game/Map/ActorReference.cs
@@ -10,8 +10,9 @@
using System.Collections;
using System.Collections.Generic;
+using OpenRA.Primitives;
-namespace OpenRA.FileFormats
+namespace OpenRA
{
public class ActorReference : IEnumerable
{
diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map/Map.cs
similarity index 98%
rename from OpenRA.Game/Map.cs
rename to OpenRA.Game/Map/Map.cs
index 5ea4d855a5..2c878bbeca 100644
--- a/OpenRA.Game/Map.cs
+++ b/OpenRA.Game/Map/Map.cs
@@ -15,7 +15,7 @@ using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Network;
using OpenRA.Traits;
@@ -151,7 +151,7 @@ namespace OpenRA
public Map(string path, string upgradeForMod)
{
Path = path;
- Container = FileSystem.OpenPackage(path, null, int.MaxValue);
+ Container = GlobalFileSystem.OpenPackage(path, null, int.MaxValue);
AssertExists("map.yaml");
AssertExists("map.bin");
@@ -310,7 +310,7 @@ namespace OpenRA
Path = toPath;
// Create a new map package
- Container = FileSystem.CreatePackage(Path, int.MaxValue, entries);
+ Container = GlobalFileSystem.CreatePackage(Path, int.MaxValue, entries);
}
// Update existing package
diff --git a/OpenRA.Game/MapCache.cs b/OpenRA.Game/Map/MapCache.cs
similarity index 99%
rename from OpenRA.Game/MapCache.cs
rename to OpenRA.Game/Map/MapCache.cs
index cf030d4103..d745bf39e3 100755
--- a/OpenRA.Game/MapCache.cs
+++ b/OpenRA.Game/Map/MapCache.cs
@@ -17,8 +17,9 @@ using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
+using OpenRA.Primitives;
namespace OpenRA
{
diff --git a/OpenRA.Game/MapPreview.cs b/OpenRA.Game/Map/MapPreview.cs
similarity index 99%
rename from OpenRA.Game/MapPreview.cs
rename to OpenRA.Game/Map/MapPreview.cs
index 7b07dc293b..cef9ac9b17 100755
--- a/OpenRA.Game/MapPreview.cs
+++ b/OpenRA.Game/Map/MapPreview.cs
@@ -17,7 +17,6 @@ using System.IO;
using System.Linq;
using System.Net;
using System.Threading;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Widgets;
diff --git a/OpenRA.FileFormats/Map/PlayerReference.cs b/OpenRA.Game/Map/PlayerReference.cs
similarity index 96%
rename from OpenRA.FileFormats/Map/PlayerReference.cs
rename to OpenRA.Game/Map/PlayerReference.cs
index a64d827a84..4b4f07cd42 100644
--- a/OpenRA.FileFormats/Map/PlayerReference.cs
+++ b/OpenRA.Game/Map/PlayerReference.cs
@@ -8,7 +8,9 @@
*/
#endregion
-namespace OpenRA.FileFormats
+using OpenRA.Graphics;
+
+namespace OpenRA
{
public class PlayerReference
{
diff --git a/OpenRA.FileFormats/Map/SmudgeReference.cs b/OpenRA.Game/Map/SmudgeReference.cs
similarity index 96%
rename from OpenRA.FileFormats/Map/SmudgeReference.cs
rename to OpenRA.Game/Map/SmudgeReference.cs
index d7cea78ebd..89c999c167 100644
--- a/OpenRA.FileFormats/Map/SmudgeReference.cs
+++ b/OpenRA.Game/Map/SmudgeReference.cs
@@ -8,7 +8,7 @@
*/
#endregion
-namespace OpenRA.FileFormats
+namespace OpenRA
{
public struct SmudgeReference
{
diff --git a/OpenRA.FileFormats/Map/TileReference.cs b/OpenRA.Game/Map/TileReference.cs
similarity index 95%
rename from OpenRA.FileFormats/Map/TileReference.cs
rename to OpenRA.Game/Map/TileReference.cs
index f1a6337d38..5dc7d719b8 100644
--- a/OpenRA.FileFormats/Map/TileReference.cs
+++ b/OpenRA.Game/Map/TileReference.cs
@@ -8,7 +8,7 @@
*/
#endregion
-namespace OpenRA.FileFormats
+namespace OpenRA
{
public struct TileReference
{
diff --git a/OpenRA.FileFormats/Map/TileSet.cs b/OpenRA.Game/Map/TileSet.cs
similarity index 99%
rename from OpenRA.FileFormats/Map/TileSet.cs
rename to OpenRA.Game/Map/TileSet.cs
index fa690759d6..8782af92b3 100644
--- a/OpenRA.FileFormats/Map/TileSet.cs
+++ b/OpenRA.Game/Map/TileSet.cs
@@ -13,7 +13,7 @@ using System.Drawing;
using System.Linq;
using System.Reflection;
-namespace OpenRA.FileFormats
+namespace OpenRA
{
public class TerrainTypeInfo
{
diff --git a/OpenRA.FileFormats/MiniYaml.cs b/OpenRA.Game/MiniYaml.cs
similarity index 98%
rename from OpenRA.FileFormats/MiniYaml.cs
rename to OpenRA.Game/MiniYaml.cs
index 4aed94cfdd..410a7226e6 100755
--- a/OpenRA.FileFormats/MiniYaml.cs
+++ b/OpenRA.Game/MiniYaml.cs
@@ -12,8 +12,9 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using OpenRA.FileSystem;
-namespace OpenRA.FileFormats
+namespace OpenRA
{
using MiniYamlNodes = List;
@@ -171,7 +172,7 @@ namespace OpenRA.FileFormats
public static List FromFileInPackage(string path)
{
- StreamReader reader = new StreamReader(FileSystem.Open(path));
+ StreamReader reader = new StreamReader(GlobalFileSystem.Open(path));
List lines = new List();
while (!reader.EndOfStream)
diff --git a/OpenRA.FileFormats/Mod.cs b/OpenRA.Game/Mod.cs
similarity index 97%
rename from OpenRA.FileFormats/Mod.cs
rename to OpenRA.Game/Mod.cs
index 2ec8b73eed..58dff2cb1d 100644
--- a/OpenRA.FileFormats/Mod.cs
+++ b/OpenRA.Game/Mod.cs
@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
-namespace OpenRA.FileFormats
+namespace OpenRA
{
public class Mod
{
diff --git a/OpenRA.Game/ModData.cs b/OpenRA.Game/ModData.cs
index efd4a13488..b65d8ed0d3 100755
--- a/OpenRA.Game/ModData.cs
+++ b/OpenRA.Game/ModData.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Widgets;
@@ -41,9 +41,9 @@ namespace OpenRA
MapCache = new MapCache(Manifest);
// HACK: Mount only local folders so we have a half-working environment for the asset installer
- FileSystem.UnmountAll();
+ GlobalFileSystem.UnmountAll();
foreach (var dir in Manifest.Folders)
- FileSystem.Mount(dir);
+ GlobalFileSystem.Mount(dir);
}
public void InitializeLoaders()
@@ -113,10 +113,10 @@ namespace OpenRA
// Reinit all our assets
InitializeLoaders();
- FileSystem.LoadFromManifest(Manifest);
+ GlobalFileSystem.LoadFromManifest(Manifest);
// Mount map package so custom assets can be used. TODO: check priority.
- FileSystem.Mount(FileSystem.OpenPackage(map.Path, null, int.MaxValue));
+ GlobalFileSystem.Mount(GlobalFileSystem.OpenPackage(map.Path, null, int.MaxValue));
Rules.LoadRules(Manifest, map);
SpriteLoader = new SpriteLoader(Rules.TileSets[map.Tileset].Extensions, SheetBuilder);
diff --git a/OpenRA.Game/Network/OrderManager.cs b/OpenRA.Game/Network/OrderManager.cs
index 497b1031f1..fb6783fe77 100755
--- a/OpenRA.Game/Network/OrderManager.cs
+++ b/OpenRA.Game/Network/OrderManager.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Network
{
diff --git a/OpenRA.Game/Network/ReplayConnection.cs b/OpenRA.Game/Network/ReplayConnection.cs
index 29abbaf308..b78db96c47 100755
--- a/OpenRA.Game/Network/ReplayConnection.cs
+++ b/OpenRA.Game/Network/ReplayConnection.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.IO;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Network
{
diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs
index f2340b24d8..184a1ea775 100644
--- a/OpenRA.Game/Network/Session.cs
+++ b/OpenRA.Game/Network/Session.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Graphics;
namespace OpenRA.Network
{
diff --git a/OpenRA.Game/Network/SyncReport.cs b/OpenRA.Game/Network/SyncReport.cs
index 3a17f5680f..8f29189870 100755
--- a/OpenRA.Game/Network/SyncReport.cs
+++ b/OpenRA.Game/Network/SyncReport.cs
@@ -13,7 +13,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Network
{
diff --git a/OpenRA.Game/ObjectCreator.cs b/OpenRA.Game/ObjectCreator.cs
index cdf01b0a21..aeee74a871 100755
--- a/OpenRA.Game/ObjectCreator.cs
+++ b/OpenRA.Game/ObjectCreator.cs
@@ -13,7 +13,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA
{
@@ -26,8 +26,6 @@ namespace OpenRA
// All the core namespaces
var asms = typeof(Game).Assembly.GetNamespaces() // Game
.Select(c => Pair.New(typeof(Game).Assembly, c))
- .Concat(typeof(Mod).Assembly.GetNamespaces() // FileFormats
- .Select(c => Pair.New(typeof(Mod).Assembly, c)))
.ToList();
// Namespaces from each mod assembly
diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj
index f0f1f03a64..b7ad81f823 100644
--- a/OpenRA.Game/OpenRA.Game.csproj
+++ b/OpenRA.Game/OpenRA.Game.csproj
@@ -78,11 +78,12 @@
False
..\thirdparty\Tao\Tao.OpenAl.dll
+
+ ..\thirdparty\ICSharpCode.SharpZipLib.dll
+
-
-
@@ -92,7 +93,6 @@
-
@@ -119,7 +119,6 @@
-
@@ -228,17 +227,96 @@
-
-
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenRA.FileFormats/Platform.cs b/OpenRA.Game/Platform.cs
similarity index 100%
rename from OpenRA.FileFormats/Platform.cs
rename to OpenRA.Game/Platform.cs
diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs
index 2b9e36d4ab..c12cdd487f 100644
--- a/OpenRA.Game/Player.cs
+++ b/OpenRA.Game/Player.cs
@@ -12,6 +12,8 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Network;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA
diff --git a/OpenRA.FileFormats/Primitives/ActionQueue.cs b/OpenRA.Game/Primitives/ActionQueue.cs
similarity index 97%
rename from OpenRA.FileFormats/Primitives/ActionQueue.cs
rename to OpenRA.Game/Primitives/ActionQueue.cs
index 483537d942..1288d0bbde 100644
--- a/OpenRA.FileFormats/Primitives/ActionQueue.cs
+++ b/OpenRA.Game/Primitives/ActionQueue.cs
@@ -10,7 +10,7 @@
using System;
-namespace OpenRA.FileFormats
+namespace OpenRA.Primitives
{
///
/// A thread-safe action queue, suitable for passing units of work between threads.
diff --git a/OpenRA.FileFormats/Primitives/Bits.cs b/OpenRA.Game/Primitives/Bits.cs
similarity index 98%
rename from OpenRA.FileFormats/Primitives/Bits.cs
rename to OpenRA.Game/Primitives/Bits.cs
index 2f733b1618..1e1aa6794e 100644
--- a/OpenRA.FileFormats/Primitives/Bits.cs
+++ b/OpenRA.Game/Primitives/Bits.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
-namespace OpenRA.FileFormats
+namespace OpenRA.Primitives
{
static class BitAllocator where T : struct
{
diff --git a/OpenRA.FileFormats/Primitives/Cache.cs b/OpenRA.Game/Primitives/Cache.cs
similarity index 97%
rename from OpenRA.FileFormats/Primitives/Cache.cs
rename to OpenRA.Game/Primitives/Cache.cs
index bfcb88cd37..fdc9fd440a 100644
--- a/OpenRA.FileFormats/Primitives/Cache.cs
+++ b/OpenRA.Game/Primitives/Cache.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
-namespace OpenRA.FileFormats
+namespace OpenRA.Primitives
{
public class Cache : IEnumerable>
{
diff --git a/OpenRA.FileFormats/Primitives/Cached.cs b/OpenRA.Game/Primitives/Cached.cs
similarity index 96%
rename from OpenRA.FileFormats/Primitives/Cached.cs
rename to OpenRA.Game/Primitives/Cached.cs
index 83964c04e9..269a074aeb 100644
--- a/OpenRA.FileFormats/Primitives/Cached.cs
+++ b/OpenRA.Game/Primitives/Cached.cs
@@ -10,7 +10,7 @@
using System;
-namespace OpenRA.FileFormats
+namespace OpenRA.Primitives
{
public class Cached
{
diff --git a/OpenRA.FileFormats/Primitives/DisposableAction.cs b/OpenRA.Game/Primitives/DisposableAction.cs
similarity index 96%
rename from OpenRA.FileFormats/Primitives/DisposableAction.cs
rename to OpenRA.Game/Primitives/DisposableAction.cs
index 7ce0471634..4734935f59 100644
--- a/OpenRA.FileFormats/Primitives/DisposableAction.cs
+++ b/OpenRA.Game/Primitives/DisposableAction.cs
@@ -10,7 +10,7 @@
using System;
-namespace OpenRA
+namespace OpenRA.Primitives
{
public class DisposableAction : IDisposable
{
diff --git a/OpenRA.FileFormats/Primitives/IObservableCollection.cs b/OpenRA.Game/Primitives/IObservableCollection.cs
similarity index 94%
rename from OpenRA.FileFormats/Primitives/IObservableCollection.cs
rename to OpenRA.Game/Primitives/IObservableCollection.cs
index f7da4fe6c3..c673101446 100644
--- a/OpenRA.FileFormats/Primitives/IObservableCollection.cs
+++ b/OpenRA.Game/Primitives/IObservableCollection.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections;
-namespace OpenRA.FileFormats.Primitives
+namespace OpenRA.Primitives
{
public interface IObservableCollection
{
diff --git a/OpenRA.FileFormats/Primitives/ObservableCollection.cs b/OpenRA.Game/Primitives/ObservableCollection.cs
similarity index 97%
rename from OpenRA.FileFormats/Primitives/ObservableCollection.cs
rename to OpenRA.Game/Primitives/ObservableCollection.cs
index d03945fb28..b1352796f2 100644
--- a/OpenRA.FileFormats/Primitives/ObservableCollection.cs
+++ b/OpenRA.Game/Primitives/ObservableCollection.cs
@@ -13,7 +13,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-namespace OpenRA.FileFormats.Primitives
+namespace OpenRA.Primitives
{
public class ObservableCollection : Collection, IObservableCollection
{
diff --git a/OpenRA.FileFormats/Primitives/ObservableDictionary.cs b/OpenRA.Game/Primitives/ObservableDictionary.cs
similarity index 98%
rename from OpenRA.FileFormats/Primitives/ObservableDictionary.cs
rename to OpenRA.Game/Primitives/ObservableDictionary.cs
index 2f078cb451..95d79df471 100644
--- a/OpenRA.FileFormats/Primitives/ObservableDictionary.cs
+++ b/OpenRA.Game/Primitives/ObservableDictionary.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
-namespace OpenRA.FileFormats.Primitives
+namespace OpenRA.Primitives
{
public class ObservableSortedDictionary : ObservableDictionary
{
diff --git a/OpenRA.FileFormats/Primitives/Pair.cs b/OpenRA.Game/Primitives/Pair.cs
similarity index 98%
rename from OpenRA.FileFormats/Primitives/Pair.cs
rename to OpenRA.Game/Primitives/Pair.cs
index 25a3f69317..d57cc31225 100644
--- a/OpenRA.FileFormats/Primitives/Pair.cs
+++ b/OpenRA.Game/Primitives/Pair.cs
@@ -11,7 +11,7 @@
using System.Collections.Generic;
using System.Drawing;
-namespace OpenRA.FileFormats
+namespace OpenRA.Primitives
{
public struct Pair
{
diff --git a/OpenRA.FileFormats/Primitives/PriorityQueue.cs b/OpenRA.Game/Primitives/PriorityQueue.cs
similarity index 98%
rename from OpenRA.FileFormats/Primitives/PriorityQueue.cs
rename to OpenRA.Game/Primitives/PriorityQueue.cs
index b310af1246..ebcb7b60da 100644
--- a/OpenRA.FileFormats/Primitives/PriorityQueue.cs
+++ b/OpenRA.Game/Primitives/PriorityQueue.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
-namespace OpenRA.FileFormats
+namespace OpenRA.Primitives
{
public class PriorityQueue
where T : IComparable
diff --git a/OpenRA.FileFormats/Primitives/Set.cs b/OpenRA.Game/Primitives/Set.cs
similarity index 97%
rename from OpenRA.FileFormats/Primitives/Set.cs
rename to OpenRA.Game/Primitives/Set.cs
index d9017f6652..43c76648eb 100755
--- a/OpenRA.FileFormats/Primitives/Set.cs
+++ b/OpenRA.Game/Primitives/Set.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
-namespace OpenRA.FileFormats
+namespace OpenRA.Primitives
{
public class Set : IEnumerable
{
diff --git a/OpenRA.FileFormats/TypeDictionary.cs b/OpenRA.Game/Primitives/TypeDictionary.cs
similarity index 98%
rename from OpenRA.FileFormats/TypeDictionary.cs
rename to OpenRA.Game/Primitives/TypeDictionary.cs
index 596600fc11..d841fe5d29 100644
--- a/OpenRA.FileFormats/TypeDictionary.cs
+++ b/OpenRA.Game/Primitives/TypeDictionary.cs
@@ -13,7 +13,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
-namespace OpenRA.FileFormats
+namespace OpenRA.Primitives
{
public class TypeDictionary : IEnumerable
{
diff --git a/OpenRA.FileFormats/Primitives/float2.cs b/OpenRA.Game/Primitives/float2.cs
similarity index 100%
rename from OpenRA.FileFormats/Primitives/float2.cs
rename to OpenRA.Game/Primitives/float2.cs
diff --git a/OpenRA.FileFormats/Primitives/int2.cs b/OpenRA.Game/Primitives/int2.cs
similarity index 100%
rename from OpenRA.FileFormats/Primitives/int2.cs
rename to OpenRA.Game/Primitives/int2.cs
diff --git a/OpenRA.Game/Selection.cs b/OpenRA.Game/Selection.cs
index e4bd22d589..c2f42c846b 100644
--- a/OpenRA.Game/Selection.cs
+++ b/OpenRA.Game/Selection.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA
diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs
index cea2d9425b..797aec1bf6 100644
--- a/OpenRA.Game/Server/Server.cs
+++ b/OpenRA.Game/Server/Server.cs
@@ -17,10 +17,10 @@ using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Threading;
-
-using OpenRA.FileFormats;
using OpenRA.GameRules;
+using OpenRA.Graphics;
using OpenRA.Network;
+using OpenRA.Primitives;
using XTimer = System.Timers.Timer;
@@ -39,7 +39,7 @@ namespace OpenRA.Server
public readonly int Port;
int randomSeed;
- public readonly Thirdparty.Random Random = new Thirdparty.Random();
+ public readonly Support.Random Random = new Support.Random();
// Valid player connections
public List Conns = new List();
diff --git a/OpenRA.Game/GameRules/Settings.cs b/OpenRA.Game/Settings.cs
similarity index 99%
rename from OpenRA.Game/GameRules/Settings.cs
rename to OpenRA.Game/Settings.cs
index 70a8a6b942..fd45367c62 100644
--- a/OpenRA.Game/GameRules/Settings.cs
+++ b/OpenRA.Game/Settings.cs
@@ -11,10 +11,10 @@
using System;
using System.Collections.Generic;
using System.IO;
-using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
-namespace OpenRA.GameRules
+namespace OpenRA
{
public enum MouseScrollType { Disabled, Standard, Inverted }
diff --git a/OpenRA.Game/Sound.cs b/OpenRA.Game/Sound.cs
index 131c915d7c..f059789b33 100644
--- a/OpenRA.Game/Sound.cs
+++ b/OpenRA.Game/Sound.cs
@@ -12,7 +12,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.GameRules;
+using OpenRA.Primitives;
using OpenRA.Traits;
using Tao.OpenAl;
@@ -29,16 +31,16 @@ namespace OpenRA
static ISoundSource LoadSound(string filename)
{
- if (!FileSystem.Exists(filename))
+ if (!GlobalFileSystem.Exists(filename))
{
Log.Write("sound", "LoadSound, file does not exist: {0}", filename);
return null;
}
if (filename.ToLowerInvariant().EndsWith("wav"))
- return LoadWave(new WavLoader(FileSystem.Open(filename)));
+ return LoadWave(new WavLoader(GlobalFileSystem.Open(filename)));
- return LoadSoundRaw(AudLoader.LoadSound(FileSystem.Open(filename)));
+ return LoadSoundRaw(AudLoader.LoadSound(GlobalFileSystem.Open(filename)));
}
static ISoundSource LoadWave(WavLoader wave)
diff --git a/OpenRA.FileFormats/StreamExts.cs b/OpenRA.Game/StreamExts.cs
similarity index 100%
rename from OpenRA.FileFormats/StreamExts.cs
rename to OpenRA.Game/StreamExts.cs
diff --git a/OpenRA.FileFormats/Evaluator.cs b/OpenRA.Game/Support/Evaluator.cs
similarity index 98%
rename from OpenRA.FileFormats/Evaluator.cs
rename to OpenRA.Game/Support/Evaluator.cs
index 19ec58f51b..c10c3c47ee 100644
--- a/OpenRA.FileFormats/Evaluator.cs
+++ b/OpenRA.Game/Support/Evaluator.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
-namespace OpenRA.FileFormats
+namespace OpenRA.Support
{
public static class Evaluator
{
diff --git a/OpenRA.FileFormats/Support/Log.cs b/OpenRA.Game/Support/Log.cs
similarity index 100%
rename from OpenRA.FileFormats/Support/Log.cs
rename to OpenRA.Game/Support/Log.cs
diff --git a/OpenRA.Game/Support/PerfHistory.cs b/OpenRA.Game/Support/PerfHistory.cs
index 7b73647d37..51d54dbfcc 100644
--- a/OpenRA.Game/Support/PerfHistory.cs
+++ b/OpenRA.Game/Support/PerfHistory.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Support
{
diff --git a/OpenRA.FileFormats/Random.cs b/OpenRA.Game/Support/Random.cs
similarity index 98%
rename from OpenRA.FileFormats/Random.cs
rename to OpenRA.Game/Support/Random.cs
index 5bc9d5797a..ac328eec20 100644
--- a/OpenRA.FileFormats/Random.cs
+++ b/OpenRA.Game/Support/Random.cs
@@ -10,7 +10,7 @@
using System;
-namespace OpenRA.Thirdparty
+namespace OpenRA.Support
{
// quick & dirty Mersenne Twister [MT19937] implementation
diff --git a/OpenRA.FileFormats/Support/Stopwatch.cs b/OpenRA.Game/Support/Stopwatch.cs
similarity index 100%
rename from OpenRA.FileFormats/Support/Stopwatch.cs
rename to OpenRA.Game/Support/Stopwatch.cs
diff --git a/OpenRA.FileFormats/Support/Timer.cs b/OpenRA.Game/Support/Timer.cs
similarity index 100%
rename from OpenRA.FileFormats/Support/Timer.cs
rename to OpenRA.Game/Support/Timer.cs
diff --git a/OpenRA.Game/Sync.cs b/OpenRA.Game/Sync.cs
index 59c1a6af97..1595da36fc 100755
--- a/OpenRA.Game/Sync.cs
+++ b/OpenRA.Game/Sync.cs
@@ -13,8 +13,8 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
-using OpenRA.FileFormats;
using OpenRA.Traits;
+using OpenRA.Primitives;
namespace OpenRA
{
diff --git a/OpenRA.Game/TraitDictionary.cs b/OpenRA.Game/TraitDictionary.cs
index 1c4a52d45a..a9389e2202 100755
--- a/OpenRA.Game/TraitDictionary.cs
+++ b/OpenRA.Game/TraitDictionary.cs
@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA
{
diff --git a/OpenRA.Game/Traits/Render/RenderSprites.cs b/OpenRA.Game/Traits/Render/RenderSprites.cs
index 10e8ea2246..cb0f86c5d7 100755
--- a/OpenRA.Game/Traits/Render/RenderSprites.cs
+++ b/OpenRA.Game/Traits/Render/RenderSprites.cs
@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using OpenRA.Graphics;
using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Traits
{
diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs
index 28ca5479ca..46885f17b3 100755
--- a/OpenRA.Game/Traits/TraitsInterfaces.cs
+++ b/OpenRA.Game/Traits/TraitsInterfaces.cs
@@ -16,6 +16,7 @@ using OpenRA.FileFormats;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Network;
+using OpenRA.Primitives;
namespace OpenRA.Traits
{
diff --git a/OpenRA.Game/Traits/Util.cs b/OpenRA.Game/Traits/Util.cs
index 154737f026..6573964eca 100755
--- a/OpenRA.Game/Traits/Util.cs
+++ b/OpenRA.Game/Traits/Util.cs
@@ -95,7 +95,7 @@ namespace OpenRA.Traits
}
/* pretty crap */
- public static IEnumerable Shuffle(this IEnumerable ts, Thirdparty.Random random)
+ public static IEnumerable Shuffle(this IEnumerable ts, Support.Random random)
{
var items = ts.ToList();
while (items.Count > 0)
diff --git a/OpenRA.Game/Traits/World/ScreenMap.cs b/OpenRA.Game/Traits/World/ScreenMap.cs
index f0d8007bf3..bd1571a992 100755
--- a/OpenRA.Game/Traits/World/ScreenMap.cs
+++ b/OpenRA.Game/Traits/World/ScreenMap.cs
@@ -12,8 +12,8 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
namespace OpenRA.Traits
{
diff --git a/OpenRA.FileFormats/WAngle.cs b/OpenRA.Game/WAngle.cs
similarity index 100%
rename from OpenRA.FileFormats/WAngle.cs
rename to OpenRA.Game/WAngle.cs
diff --git a/OpenRA.FileFormats/WPos.cs b/OpenRA.Game/WPos.cs
similarity index 100%
rename from OpenRA.FileFormats/WPos.cs
rename to OpenRA.Game/WPos.cs
diff --git a/OpenRA.FileFormats/WRange.cs b/OpenRA.Game/WRange.cs
similarity index 97%
rename from OpenRA.FileFormats/WRange.cs
rename to OpenRA.Game/WRange.cs
index 2b4952775f..30cf0a2136 100644
--- a/OpenRA.FileFormats/WRange.cs
+++ b/OpenRA.Game/WRange.cs
@@ -39,7 +39,7 @@ namespace OpenRA
// 2 samples produces a triangular probability
// ...
// N samples approximates a true gaussian
- public static WRange FromPDF(Thirdparty.Random r, int samples)
+ public static WRange FromPDF(Support.Random r, int samples)
{
return new WRange(Exts.MakeArray(samples, _ => r.Next(-1024, 1024))
.Sum() / samples);
diff --git a/OpenRA.FileFormats/WRot.cs b/OpenRA.Game/WRot.cs
similarity index 100%
rename from OpenRA.FileFormats/WRot.cs
rename to OpenRA.Game/WRot.cs
diff --git a/OpenRA.FileFormats/WVec.cs b/OpenRA.Game/WVec.cs
similarity index 98%
rename from OpenRA.FileFormats/WVec.cs
rename to OpenRA.Game/WVec.cs
index b76a17fd3e..4efee912a8 100644
--- a/OpenRA.FileFormats/WVec.cs
+++ b/OpenRA.Game/WVec.cs
@@ -73,7 +73,7 @@ namespace OpenRA
// 2 samples produces a triangular probability
// ...
// N samples approximates a true gaussian
- public static WVec FromPDF(Thirdparty.Random r, int samples)
+ public static WVec FromPDF(Support.Random r, int samples)
{
return new WVec(WRange.FromPDF(r, samples), WRange.FromPDF(r, samples), WRange.Zero);
}
diff --git a/OpenRA.Game/Widgets/ScrollPanelWidget.cs b/OpenRA.Game/Widgets/ScrollPanelWidget.cs
index dcc2d3c8d5..b5c8be5fa2 100644
--- a/OpenRA.Game/Widgets/ScrollPanelWidget.cs
+++ b/OpenRA.Game/Widgets/ScrollPanelWidget.cs
@@ -11,7 +11,7 @@
using System;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats.Primitives;
+using OpenRA.Primitives;
using OpenRA.Graphics;
namespace OpenRA.Widgets
diff --git a/OpenRA.Game/Widgets/VqaPlayerWidget.cs b/OpenRA.Game/Widgets/VqaPlayerWidget.cs
index 418ff1eb4f..978182c6f1 100644
--- a/OpenRA.Game/Widgets/VqaPlayerWidget.cs
+++ b/OpenRA.Game/Widgets/VqaPlayerWidget.cs
@@ -11,6 +11,7 @@
using System;
using System.Drawing;
using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
namespace OpenRA.Widgets
@@ -50,7 +51,7 @@ namespace OpenRA.Widgets
OnComplete = () => {};
cachedVideo = filename;
- video = new VqaReader(FileSystem.Open(filename));
+ video = new VqaReader(GlobalFileSystem.Open(filename));
invLength = video.Framerate*1f/video.Frames;
diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs
index ab365f8af8..58fbe38dd0 100644
--- a/OpenRA.Game/Widgets/Widget.cs
+++ b/OpenRA.Game/Widgets/Widget.cs
@@ -12,8 +12,8 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Support;
namespace OpenRA.Widgets
{
diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs
index fc7d673431..481b085398 100644
--- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs
+++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs
@@ -13,9 +13,9 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Effects;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Orders;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Widgets
diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs
index 79f8da42c0..30e9ae7de2 100644
--- a/OpenRA.Game/World.cs
+++ b/OpenRA.Game/World.cs
@@ -17,9 +17,10 @@ using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Network;
using OpenRA.Orders;
+using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Traits;
-using XRandom = OpenRA.Thirdparty.Random;
+using XRandom = OpenRA.Support.Random;
namespace OpenRA
{
diff --git a/OpenRA.Game/WorldUtils.cs b/OpenRA.Game/WorldUtils.cs
index 423e97da10..7949f2f64f 100755
--- a/OpenRA.Game/WorldUtils.cs
+++ b/OpenRA.Game/WorldUtils.cs
@@ -117,7 +117,7 @@ namespace OpenRA
: (edge ? w.Map.Bounds.Top : w.Map.Bounds.Bottom));
}
- public static CPos ChooseRandomCell(this World w, Thirdparty.Random r)
+ public static CPos ChooseRandomCell(this World w, Support.Random r)
{
return new CPos(
r.Next(w.Map.Bounds.Left, w.Map.Bounds.Right),
diff --git a/OpenRA.Irc/Channel.cs b/OpenRA.Irc/Channel.cs
index aec534758a..13cdb79dc1 100644
--- a/OpenRA.Irc/Channel.cs
+++ b/OpenRA.Irc/Channel.cs
@@ -9,7 +9,7 @@
#endregion
using System;
-using OpenRA.FileFormats.Primitives;
+using OpenRA.Primitives;
namespace OpenRA.Irc
{
diff --git a/OpenRA.Irc/IrcClient.cs b/OpenRA.Irc/IrcClient.cs
index ff2eb91334..640ceb6983 100644
--- a/OpenRA.Irc/IrcClient.cs
+++ b/OpenRA.Irc/IrcClient.cs
@@ -13,7 +13,7 @@ using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Threading;
-using OpenRA.FileFormats.Primitives;
+using OpenRA.Primitives;
namespace OpenRA.Irc
{
diff --git a/OpenRA.Irc/IrcClientUser.cs b/OpenRA.Irc/IrcClientUser.cs
index b6f054164b..c29c510bf3 100644
--- a/OpenRA.Irc/IrcClientUser.cs
+++ b/OpenRA.Irc/IrcClientUser.cs
@@ -10,7 +10,7 @@
using System;
using System.Linq;
-using OpenRA.FileFormats.Primitives;
+using OpenRA.Primitives;
namespace OpenRA.Irc
{
diff --git a/OpenRA.Irc/OpenRA.Irc.csproj b/OpenRA.Irc/OpenRA.Irc.csproj
index 1db8cd5f44..6abb188ffc 100644
--- a/OpenRA.Irc/OpenRA.Irc.csproj
+++ b/OpenRA.Irc/OpenRA.Irc.csproj
@@ -12,8 +12,6 @@
512
- 12.0.0
- 2.0
true
@@ -47,10 +45,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Lint/OpenRA.Lint.csproj b/OpenRA.Lint/OpenRA.Lint.csproj
index b02f098c63..d64f40eae6 100644
--- a/OpenRA.Lint/OpenRA.Lint.csproj
+++ b/OpenRA.Lint/OpenRA.Lint.csproj
@@ -3,8 +3,6 @@
Debug
AnyCPU
- 9.0.30729
- 2.0
{F9FA4D9F-2302-470A-8A07-6E37F488C124}
Exe
Properties
@@ -55,16 +53,10 @@
-
- 4.0
-
+
-
- 4.0
-
-
- 4.0
-
+
+
@@ -72,10 +64,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Lint/YamlChecker.cs b/OpenRA.Lint/YamlChecker.cs
index e35fd3fa3d..61ded227c4 100644
--- a/OpenRA.Lint/YamlChecker.cs
+++ b/OpenRA.Lint/YamlChecker.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Traits;
namespace OpenRA.Lint
@@ -50,7 +50,7 @@ namespace OpenRA.Lint
ObjectCreator.MissingTypeAction = s => EmitError("Missing Type: {0}".F(s));
FieldLoader.UnknownFieldAction = (s, f) => EmitError("FieldLoader: Missing field `{0}` on `{1}`".F(s, f.Name));
- AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
+ AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
Game.modData = new ModData(mod);
IEnumerable
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
- False
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Mods.Cnc/ProductionAirdrop.cs b/OpenRA.Mods.Cnc/ProductionAirdrop.cs
index 23014489e8..61312b7585 100644
--- a/OpenRA.Mods.Cnc/ProductionAirdrop.cs
+++ b/OpenRA.Mods.Cnc/ProductionAirdrop.cs
@@ -9,11 +9,11 @@
#endregion
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Air;
using OpenRA.Mods.RA.Render;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.Cnc
diff --git a/OpenRA.Mods.Cnc/SpawnViceroid.cs b/OpenRA.Mods.Cnc/SpawnViceroid.cs
index d385da15d3..7197de98af 100644
--- a/OpenRA.Mods.Cnc/SpawnViceroid.cs
+++ b/OpenRA.Mods.Cnc/SpawnViceroid.cs
@@ -9,7 +9,7 @@
#endregion
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.Cnc
diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallMusicLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallMusicLogic.cs
index f06d5d119b..d858007b53 100644
--- a/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallMusicLogic.cs
+++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallMusicLogic.cs
@@ -11,7 +11,7 @@
using System;
using System.IO;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Mods.RA.Widgets.Logic;
using OpenRA.Widgets;
@@ -30,8 +30,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
try
{
var path = new string[] { Platform.SupportDir, "Content", Game.modData.Manifest.Mod.Id }.Aggregate(Path.Combine);
- FileSystem.Mount(Path.Combine(path, "scores.mix"));
- FileSystem.Mount(Path.Combine(path, "transit.mix"));
+ GlobalFileSystem.Mount(Path.Combine(path, "scores.mix"));
+ GlobalFileSystem.Mount(Path.Combine(path, "transit.mix"));
Rules.Music.Do(m => m.Value.Reload());
diff --git a/OpenRA.Mods.D2k/FogPaletteFromR8.cs b/OpenRA.Mods.D2k/FogPaletteFromR8.cs
index ce3b6792c4..35aa81c048 100644
--- a/OpenRA.Mods.D2k/FogPaletteFromR8.cs
+++ b/OpenRA.Mods.D2k/FogPaletteFromR8.cs
@@ -9,7 +9,7 @@
#endregion
using System.IO;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA
public void InitPalette(WorldRenderer wr)
{
var colors = new uint[256];
- using (var s = FileSystem.Open(info.Filename))
+ using (var s = GlobalFileSystem.Open(info.Filename))
{
s.Seek(info.Offset, SeekOrigin.Begin);
diff --git a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
index c590c9343b..f843ab85c6 100644
--- a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
+++ b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
@@ -94,10 +94,6 @@ cd "$(SolutionDir)"
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}
OpenRA.Mods.RA
diff --git a/OpenRA.Mods.D2k/PaletteFromR8.cs b/OpenRA.Mods.D2k/PaletteFromR8.cs
index b60a26330b..c878623e30 100644
--- a/OpenRA.Mods.D2k/PaletteFromR8.cs
+++ b/OpenRA.Mods.D2k/PaletteFromR8.cs
@@ -9,7 +9,7 @@
#endregion
using System.IO;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA
public void InitPalette(WorldRenderer wr)
{
var colors = new uint[256];
- using (var s = FileSystem.Open(info.Filename))
+ using (var s = GlobalFileSystem.Open(info.Filename))
{
s.Seek(info.Offset, SeekOrigin.Begin);
diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs
index 10fec60b09..a68dd87f3b 100644
--- a/OpenRA.Mods.RA/AI/HackyAI.cs
+++ b/OpenRA.Mods.RA/AI/HackyAI.cs
@@ -17,7 +17,8 @@ using OpenRA.Mods.RA.Air;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Move;
using OpenRA.Traits;
-using XRandom = OpenRA.Thirdparty.Random;
+using OpenRA.Primitives;
+using XRandom = OpenRA.Support.Random;
namespace OpenRA.Mods.RA.AI
{
diff --git a/OpenRA.Mods.RA/AI/Squad.cs b/OpenRA.Mods.RA/AI/Squad.cs
index a882da1dbe..8b14aa5047 100644
--- a/OpenRA.Mods.RA/AI/Squad.cs
+++ b/OpenRA.Mods.RA/AI/Squad.cs
@@ -11,7 +11,7 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
-using XRandom = OpenRA.Thirdparty.Random;
+using XRandom = OpenRA.Support.Random;
namespace OpenRA.Mods.RA.AI
{
diff --git a/OpenRA.Mods.RA/Activities/LayMines.cs b/OpenRA.Mods.RA/Activities/LayMines.cs
index f036253da2..5789e1daa6 100644
--- a/OpenRA.Mods.RA/Activities/LayMines.cs
+++ b/OpenRA.Mods.RA/Activities/LayMines.cs
@@ -9,9 +9,9 @@
#endregion
using System.Linq;
-using OpenRA.FileFormats;
-using OpenRA.Traits;
using OpenRA.Mods.RA.Move;
+using OpenRA.Traits;
+using OpenRA.Primitives;
namespace OpenRA.Mods.RA.Activities
{
diff --git a/OpenRA.Mods.RA/Activities/Transform.cs b/OpenRA.Mods.RA/Activities/Transform.cs
index bfbeed797e..86db282784 100644
--- a/OpenRA.Mods.RA/Activities/Transform.cs
+++ b/OpenRA.Mods.RA/Activities/Transform.cs
@@ -9,8 +9,8 @@
#endregion
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Traits;
+using OpenRA.Primitives;
namespace OpenRA.Mods.RA.Activities
{
diff --git a/OpenRA.Mods.RA/Air/Aircraft.cs b/OpenRA.Mods.RA/Air/Aircraft.cs
index 29f8c7a480..1672a3548b 100755
--- a/OpenRA.Mods.RA/Air/Aircraft.cs
+++ b/OpenRA.Mods.RA/Air/Aircraft.cs
@@ -11,10 +11,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Orders;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Air
diff --git a/OpenRA.Mods.RA/Armament.cs b/OpenRA.Mods.RA/Armament.cs
index c60f1ce4d1..7060b11a9a 100644
--- a/OpenRA.Mods.RA/Armament.cs
+++ b/OpenRA.Mods.RA/Armament.cs
@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.GameRules;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Bridge.cs b/OpenRA.Mods.RA/Bridge.cs
index 0c32fbb3b2..7d78e8e802 100644
--- a/OpenRA.Mods.RA/Bridge.cs
+++ b/OpenRA.Mods.RA/Bridge.cs
@@ -11,8 +11,8 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Effects;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/BridgeLayer.cs b/OpenRA.Mods.RA/BridgeLayer.cs
index 8711c9de9b..db9c6b50fb 100644
--- a/OpenRA.Mods.RA/BridgeLayer.cs
+++ b/OpenRA.Mods.RA/BridgeLayer.cs
@@ -10,8 +10,8 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Buildings/Building.cs b/OpenRA.Mods.RA/Buildings/Building.cs
index 973426ad4c..505b7e288d 100755
--- a/OpenRA.Mods.RA/Buildings/Building.cs
+++ b/OpenRA.Mods.RA/Buildings/Building.cs
@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Traits;
+using OpenRA.Primitives;
namespace OpenRA.Mods.RA.Buildings
{
diff --git a/OpenRA.Mods.RA/Cargo.cs b/OpenRA.Mods.RA/Cargo.cs
index 5f7f6a2663..a2d581dc5e 100644
--- a/OpenRA.Mods.RA/Cargo.cs
+++ b/OpenRA.Mods.RA/Cargo.cs
@@ -10,9 +10,9 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Orders;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs b/OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs
index 419875c151..ff7d6e609b 100644
--- a/OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs
+++ b/OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs
@@ -10,7 +10,8 @@
using System.Collections.Generic;
using System.Drawing;
-using OpenRA.FileFormats;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/CloakPaletteEffect.cs b/OpenRA.Mods.RA/CloakPaletteEffect.cs
index 728b782418..c44bcfe118 100644
--- a/OpenRA.Mods.RA/CloakPaletteEffect.cs
+++ b/OpenRA.Mods.RA/CloakPaletteEffect.cs
@@ -10,7 +10,8 @@
using System.Collections.Generic;
using System.Drawing;
-using OpenRA.FileFormats;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/ContainsCrate.cs b/OpenRA.Mods.RA/ContainsCrate.cs
index 694f94ccdb..20c5326663 100644
--- a/OpenRA.Mods.RA/ContainsCrate.cs
+++ b/OpenRA.Mods.RA/ContainsCrate.cs
@@ -8,8 +8,8 @@
*/
#endregion
-using OpenRA.FileFormats;
using OpenRA.Traits;
+using OpenRA.Primitives;
namespace OpenRA.Mods.RA
{
diff --git a/OpenRA.Mods.RA/Crate.cs b/OpenRA.Mods.RA/Crate.cs
index ef1e3d2cbd..cbe0b8f7a4 100644
--- a/OpenRA.Mods.RA/Crate.cs
+++ b/OpenRA.Mods.RA/Crate.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Mods.RA.Buildings;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/CrateSpawner.cs b/OpenRA.Mods.RA/CrateSpawner.cs
index aafa8371dc..d41353eb75 100644
--- a/OpenRA.Mods.RA/CrateSpawner.cs
+++ b/OpenRA.Mods.RA/CrateSpawner.cs
@@ -11,9 +11,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Air;
using OpenRA.Mods.RA.Buildings;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Crates/GiveUnitCrateAction.cs b/OpenRA.Mods.RA/Crates/GiveUnitCrateAction.cs
index d00e62e8ac..e7a26fd4d7 100644
--- a/OpenRA.Mods.RA/Crates/GiveUnitCrateAction.cs
+++ b/OpenRA.Mods.RA/Crates/GiveUnitCrateAction.cs
@@ -10,9 +10,9 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
-using OpenRA.Traits;
using OpenRA.Mods.RA.Move;
+using OpenRA.Traits;
+using OpenRA.Primitives;
namespace OpenRA.Mods.RA.Crates
{
diff --git a/OpenRA.Mods.RA/Crates/SupportPowerCrateAction.cs b/OpenRA.Mods.RA/Crates/SupportPowerCrateAction.cs
index 2b1c91ebfe..3162a041d6 100644
--- a/OpenRA.Mods.RA/Crates/SupportPowerCrateAction.cs
+++ b/OpenRA.Mods.RA/Crates/SupportPowerCrateAction.cs
@@ -9,7 +9,7 @@
#endregion
using OpenRA.Traits;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Mods.RA.Crates
{
diff --git a/OpenRA.Mods.RA/DefaultLoadScreen.cs b/OpenRA.Mods.RA/DefaultLoadScreen.cs
index 1af3e4ad82..5d664e2988 100644
--- a/OpenRA.Mods.RA/DefaultLoadScreen.cs
+++ b/OpenRA.Mods.RA/DefaultLoadScreen.cs
@@ -12,8 +12,9 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Widgets;
@@ -79,7 +80,7 @@ namespace OpenRA.Mods.RA
void TestAndContinue()
{
Ui.ResetAll();
- if (!info["TestFiles"].Split(',').All(f => FileSystem.Exists(f.Trim())))
+ if (!info["TestFiles"].Split(',').All(f => GlobalFileSystem.Exists(f.Trim())))
{
var args = new WidgetArgs()
{
diff --git a/OpenRA.Mods.RA/Effects/GpsDot.cs b/OpenRA.Mods.RA/Effects/GpsDot.cs
index 0a81ba268a..9b5691d6f8 100644
--- a/OpenRA.Mods.RA/Effects/GpsDot.cs
+++ b/OpenRA.Mods.RA/Effects/GpsDot.cs
@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using OpenRA.Effects;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Effects
diff --git a/OpenRA.Mods.RA/EjectOnDeath.cs b/OpenRA.Mods.RA/EjectOnDeath.cs
index 6adc77b61a..3f061229d8 100644
--- a/OpenRA.Mods.RA/EjectOnDeath.cs
+++ b/OpenRA.Mods.RA/EjectOnDeath.cs
@@ -8,9 +8,9 @@
*/
#endregion
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Effects;
using OpenRA.Mods.RA.Move;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/EmitInfantryOnSell.cs b/OpenRA.Mods.RA/EmitInfantryOnSell.cs
index 7404dd58a5..0b9c8f1d20 100644
--- a/OpenRA.Mods.RA/EmitInfantryOnSell.cs
+++ b/OpenRA.Mods.RA/EmitInfantryOnSell.cs
@@ -9,8 +9,8 @@
#endregion
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Buildings;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/FreeActor.cs b/OpenRA.Mods.RA/FreeActor.cs
index fb5199e333..f73d282a3b 100644
--- a/OpenRA.Mods.RA/FreeActor.cs
+++ b/OpenRA.Mods.RA/FreeActor.cs
@@ -8,7 +8,7 @@
*/
#endregion
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Husk.cs b/OpenRA.Mods.RA/Husk.cs
index bacd08e8fe..ef7065128b 100644
--- a/OpenRA.Mods.RA/Husk.cs
+++ b/OpenRA.Mods.RA/Husk.cs
@@ -10,9 +10,9 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Mods.RA.Move;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Immobile.cs b/OpenRA.Mods.RA/Immobile.cs
index 8fa3d6a8c1..2f5b16dd7f 100644
--- a/OpenRA.Mods.RA/Immobile.cs
+++ b/OpenRA.Mods.RA/Immobile.cs
@@ -9,7 +9,7 @@
#endregion
using System.Collections.Generic;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/InfiltrateForSupportPower.cs b/OpenRA.Mods.RA/InfiltrateForSupportPower.cs
index 9c8793c885..fa7ba8ae1c 100644
--- a/OpenRA.Mods.RA/InfiltrateForSupportPower.cs
+++ b/OpenRA.Mods.RA/InfiltrateForSupportPower.cs
@@ -8,8 +8,8 @@
*/
#endregion
+using OpenRA.Primitives;
using OpenRA.Traits;
-using OpenRA.FileFormats;
namespace OpenRA.Mods.RA
{
diff --git a/OpenRA.Mods.RA/LeavesHusk.cs b/OpenRA.Mods.RA/LeavesHusk.cs
index 43b81fd718..39206ee694 100644
--- a/OpenRA.Mods.RA/LeavesHusk.cs
+++ b/OpenRA.Mods.RA/LeavesHusk.cs
@@ -9,9 +9,9 @@
#endregion
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Air;
using OpenRA.Mods.RA.Move;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/LightPaletteRotator.cs b/OpenRA.Mods.RA/LightPaletteRotator.cs
index f92f05c75e..ba9be9e341 100644
--- a/OpenRA.Mods.RA/LightPaletteRotator.cs
+++ b/OpenRA.Mods.RA/LightPaletteRotator.cs
@@ -10,7 +10,8 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/MPStartLocations.cs b/OpenRA.Mods.RA/MPStartLocations.cs
index 2be4f1b75e..37ff45d9c9 100755
--- a/OpenRA.Mods.RA/MPStartLocations.cs
+++ b/OpenRA.Mods.RA/MPStartLocations.cs
@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/MadTank.cs b/OpenRA.Mods.RA/MadTank.cs
index 8dedafd03b..3e81d48305 100644
--- a/OpenRA.Mods.RA/MadTank.cs
+++ b/OpenRA.Mods.RA/MadTank.cs
@@ -10,11 +10,11 @@
using System.Collections.Generic;
using System.Drawing;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Move;
using OpenRA.Mods.RA.Orders;
using OpenRA.Mods.RA.Render;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Move/Mobile.cs b/OpenRA.Mods.RA/Move/Mobile.cs
index 01696b4b17..073ae16f42 100755
--- a/OpenRA.Mods.RA/Move/Mobile.cs
+++ b/OpenRA.Mods.RA/Move/Mobile.cs
@@ -12,8 +12,8 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Move
diff --git a/OpenRA.Mods.RA/Move/Move.cs b/OpenRA.Mods.RA/Move/Move.cs
index 40e0149f82..130839a954 100755
--- a/OpenRA.Mods.RA/Move/Move.cs
+++ b/OpenRA.Mods.RA/Move/Move.cs
@@ -12,8 +12,8 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Move
diff --git a/OpenRA.Mods.RA/Move/PathFinder.cs b/OpenRA.Mods.RA/Move/PathFinder.cs
index 24d37eef9d..52a961831d 100755
--- a/OpenRA.Mods.RA/Move/PathFinder.cs
+++ b/OpenRA.Mods.RA/Move/PathFinder.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Move/PathSearch.cs b/OpenRA.Mods.RA/Move/PathSearch.cs
index 9ad2354113..0c198eb9a9 100755
--- a/OpenRA.Mods.RA/Move/PathSearch.cs
+++ b/OpenRA.Mods.RA/Move/PathSearch.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Mods.RA.Move
{
diff --git a/OpenRA.Mods.RA/NukePaletteEffect.cs b/OpenRA.Mods.RA/NukePaletteEffect.cs
index 21215ee546..fede11b76a 100644
--- a/OpenRA.Mods.RA/NukePaletteEffect.cs
+++ b/OpenRA.Mods.RA/NukePaletteEffect.cs
@@ -10,7 +10,7 @@
using System.Collections.Generic;
using System.Drawing;
-using OpenRA.FileFormats;
+using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
index 663be2fdd8..319eba615d 100644
--- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
+++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
@@ -493,11 +493,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
- False
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Mods.RA/PaletteFromCurrentTileset.cs b/OpenRA.Mods.RA/PaletteFromCurrentTileset.cs
index d720da6554..641a01cc72 100644
--- a/OpenRA.Mods.RA/PaletteFromCurrentTileset.cs
+++ b/OpenRA.Mods.RA/PaletteFromCurrentTileset.cs
@@ -8,7 +8,7 @@
*/
#endregion
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.RA
public void InitPalette(WorldRenderer wr)
{
- wr.AddPalette(info.Name, new Palette(FileSystem.Open(world.TileSet.Palette), info.ShadowIndex), info.AllowModifiers);
+ wr.AddPalette(info.Name, new Palette(GlobalFileSystem.Open(world.TileSet.Palette), info.ShadowIndex), info.AllowModifiers);
}
}
}
diff --git a/OpenRA.Mods.RA/PaletteFromFile.cs b/OpenRA.Mods.RA/PaletteFromFile.cs
index 49694df320..9808fc9645 100644
--- a/OpenRA.Mods.RA/PaletteFromFile.cs
+++ b/OpenRA.Mods.RA/PaletteFromFile.cs
@@ -8,7 +8,7 @@
*/
#endregion
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Traits;
using OpenRA.Graphics;
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA
public void InitPalette(WorldRenderer wr)
{
if (info.Tileset == null || info.Tileset.ToLowerInvariant() == world.Map.Tileset.ToLowerInvariant())
- wr.AddPalette(info.Name, new Palette(FileSystem.Open(info.Filename), info.ShadowIndex), info.AllowModifiers);
+ wr.AddPalette(info.Name, new Palette(GlobalFileSystem.Open(info.Filename), info.ShadowIndex), info.AllowModifiers);
}
public string Filename
diff --git a/OpenRA.Mods.RA/Player/PlaceBuilding.cs b/OpenRA.Mods.RA/Player/PlaceBuilding.cs
index 88c5b9ce6a..5a0cb331ab 100755
--- a/OpenRA.Mods.RA/Player/PlaceBuilding.cs
+++ b/OpenRA.Mods.RA/Player/PlaceBuilding.cs
@@ -10,8 +10,8 @@
using System.Linq;
using OpenRA.Effects;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Buildings;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Player/TechTree.cs b/OpenRA.Mods.RA/Player/TechTree.cs
index cb627cca48..4e85d0e8bc 100755
--- a/OpenRA.Mods.RA/Player/TechTree.cs
+++ b/OpenRA.Mods.RA/Player/TechTree.cs
@@ -10,7 +10,7 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/PlayerPaletteFromCurrentTileset.cs b/OpenRA.Mods.RA/PlayerPaletteFromCurrentTileset.cs
index cb75d1d6e4..6e42aa0722 100644
--- a/OpenRA.Mods.RA/PlayerPaletteFromCurrentTileset.cs
+++ b/OpenRA.Mods.RA/PlayerPaletteFromCurrentTileset.cs
@@ -8,7 +8,7 @@
*/
#endregion
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.RA
public void InitPalette(WorldRenderer wr)
{
var filename = world.TileSet.PlayerPalette ?? world.TileSet.Palette;
- wr.AddPalette(info.Name, new Palette(FileSystem.Open(filename), info.ShadowIndex), info.AllowModifiers);
+ wr.AddPalette(info.Name, new Palette(GlobalFileSystem.Open(filename), info.ShadowIndex), info.AllowModifiers);
}
}
}
diff --git a/OpenRA.Mods.RA/Production.cs b/OpenRA.Mods.RA/Production.cs
index 291bd89683..064b243d24 100755
--- a/OpenRA.Mods.RA/Production.cs
+++ b/OpenRA.Mods.RA/Production.cs
@@ -10,8 +10,8 @@
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Move;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Reservable.cs b/OpenRA.Mods.RA/Reservable.cs
index 6527c3078a..7adc2ff6f7 100755
--- a/OpenRA.Mods.RA/Reservable.cs
+++ b/OpenRA.Mods.RA/Reservable.cs
@@ -10,6 +10,7 @@
using System;
using OpenRA.Mods.RA.Air;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Scripting/LuaScriptContext.cs b/OpenRA.Mods.RA/Scripting/LuaScriptContext.cs
index 247ebe973e..714aaab803 100644
--- a/OpenRA.Mods.RA/Scripting/LuaScriptContext.cs
+++ b/OpenRA.Mods.RA/Scripting/LuaScriptContext.cs
@@ -14,7 +14,7 @@ using System.Linq;
using System.Reflection;
using NLua;
using NLua.Event;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
namespace OpenRA.Mods.RA.Scripting
{
diff --git a/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs b/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs
index 8530e855c0..f5e63f7929 100644
--- a/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs
+++ b/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs
@@ -14,7 +14,7 @@ using System.Collections.Generic;
using System.Linq;
using NLua;
using OpenRA.Effects;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Air;
using OpenRA.Network;
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.RA.Scripting
var sharedScripts = Game.modData.Manifest.LuaScripts ?? new string[0];
if (sharedScripts.Any())
- context.LoadLuaScripts(f => FileSystem.Open(f).ReadAllText(), sharedScripts);
+ context.LoadLuaScripts(f => GlobalFileSystem.Open(f).ReadAllText(), sharedScripts);
AddMapActorGlobals();
diff --git a/OpenRA.Mods.RA/SeedsResource.cs b/OpenRA.Mods.RA/SeedsResource.cs
index a61e34c959..cea9eb2cdc 100644
--- a/OpenRA.Mods.RA/SeedsResource.cs
+++ b/OpenRA.Mods.RA/SeedsResource.cs
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.RA
}
- static IEnumerable RandomWalk(CPos p, Thirdparty.Random r)
+ static IEnumerable RandomWalk(CPos p, Support.Random r)
{
for (; ; )
{
diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs
index 95a0683eb7..0595e3ca68 100644
--- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs
+++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs
@@ -11,8 +11,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using OpenRA.Graphics;
using OpenRA.Network;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Server;
using S = OpenRA.Server.Server;
diff --git a/OpenRA.Mods.RA/ShroudRenderer.cs b/OpenRA.Mods.RA/ShroudRenderer.cs
index bbfaabb782..665e5ce3c9 100644
--- a/OpenRA.Mods.RA/ShroudRenderer.cs
+++ b/OpenRA.Mods.RA/ShroudRenderer.cs
@@ -12,8 +12,6 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
using OpenRA.Graphics;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/SpawnMPUnits.cs b/OpenRA.Mods.RA/SpawnMPUnits.cs
index a28cdd0770..35f203112f 100644
--- a/OpenRA.Mods.RA/SpawnMPUnits.cs
+++ b/OpenRA.Mods.RA/SpawnMPUnits.cs
@@ -10,10 +10,9 @@
using System;
using System.Linq;
-
-using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Mods.RA.Move;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs
index 2bf7756d76..f22bdbb918 100755
--- a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs
@@ -11,9 +11,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Air;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs b/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs
index 8bf95cd3c1..b14c80ded0 100755
--- a/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs
@@ -8,9 +8,9 @@
*/
#endregion
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Air;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/SupportPowers/SpyPlanePower.cs b/OpenRA.Mods.RA/SupportPowers/SpyPlanePower.cs
index fde15507aa..a695da8fec 100755
--- a/OpenRA.Mods.RA/SupportPowers/SpyPlanePower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/SpyPlanePower.cs
@@ -8,9 +8,9 @@
*/
#endregion
-using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Air;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/WaterPaletteRotation.cs b/OpenRA.Mods.RA/WaterPaletteRotation.cs
index 74bab088fe..11ded18ce4 100644
--- a/OpenRA.Mods.RA/WaterPaletteRotation.cs
+++ b/OpenRA.Mods.RA/WaterPaletteRotation.cs
@@ -10,7 +10,7 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs
index 021afa3a1d..9a5e1d3ee2 100755
--- a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs
@@ -12,10 +12,10 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Orders;
+using OpenRA.Primitives;
using OpenRA.Traits;
using OpenRA.Widgets;
diff --git a/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs
index 5d7af738b3..0a4660c687 100644
--- a/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs
+++ b/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs
@@ -13,7 +13,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
using OpenRA.Widgets;
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
public AssetBrowserLogic(Widget widget, Action onExit, World world)
{
panel = widget;
- assetSource = FileSystem.MountedFolders.First();
+ assetSource = GlobalFileSystem.MountedFolders.First();
var ticker = panel.GetOrNull("ANIMATION_TICKER");
if (ticker != null)
@@ -188,7 +188,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
if (string.IsNullOrEmpty(filename))
return false;
- if (!FileSystem.Exists(filename))
+ if (!GlobalFileSystem.Exists(filename))
return false;
currentFilename = filename;
@@ -212,9 +212,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
};
// TODO: Re-enable "All Packages" once list generation is done in a background thread
- // var sources = new[] { (IFolder)null }.Concat(FileSystem.MountedFolders);
+ // var sources = new[] { (IFolder)null }.Concat(GlobalFileSystem.MountedFolders);
- var sources = FileSystem.MountedFolders;
+ var sources = GlobalFileSystem.MountedFolders;
dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", 280, sources, setupItem);
return true;
}
@@ -226,7 +226,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
// TODO: This is too slow to run in the main thread
// var files = AssetSource != null ? AssetSource.AllFileNames() :
- // FileSystem.MountedFolders.SelectMany(f => f.AllFileNames());
+ // GlobalFileSystem.MountedFolders.SelectMany(f => f.AllFileNames());
if (assetSource == null)
return;
diff --git a/OpenRA.Mods.RA/Widgets/Logic/CheatsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/CheatsLogic.cs
index 37b2ce9c34..3191566cbc 100644
--- a/OpenRA.Mods.RA/Widgets/Logic/CheatsLogic.cs
+++ b/OpenRA.Mods.RA/Widgets/Logic/CheatsLogic.cs
@@ -11,7 +11,7 @@
using System;
using OpenRA.Traits;
using OpenRA.Widgets;
-using XRandom = OpenRA.Thirdparty.Random;
+using XRandom = OpenRA.Support.Random;
namespace OpenRA.Mods.RA.Widgets.Logic
{
diff --git a/OpenRA.Mods.RA/Widgets/Logic/CreditsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/CreditsLogic.cs
index a87cbeb8da..e2d712551f 100644
--- a/OpenRA.Mods.RA/Widgets/Logic/CreditsLogic.cs
+++ b/OpenRA.Mods.RA/Widgets/Logic/CreditsLogic.cs
@@ -10,7 +10,7 @@
#endregion
using System;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var template = scrollPanel.Get("CREDITS_TEMPLATE");
scrollPanel.RemoveChildren();
- var lines = FileSystem.Open("AUTHORS").ReadAllLines();
+ var lines = GlobalFileSystem.Open("AUTHORS").ReadAllLines();
foreach (var l in lines)
{
// Improve the formatting
diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs
index 92764e834c..10d2b084e1 100644
--- a/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs
+++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs
@@ -12,8 +12,9 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Graphics;
using OpenRA.Network;
+using OpenRA.Primitives;
using OpenRA.Traits;
using OpenRA.Widgets;
diff --git a/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs
index 099d62ed69..ebf0b594a7 100644
--- a/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs
+++ b/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs
@@ -11,7 +11,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
diff --git a/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs
index 739bb47782..4d0ad0d796 100644
--- a/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs
+++ b/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs
@@ -12,8 +12,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Widgets;
diff --git a/OpenRA.Mods.RA/Widgets/SupportPowerBinWidget.cs b/OpenRA.Mods.RA/Widgets/SupportPowerBinWidget.cs
index 888892082f..93b844e953 100755
--- a/OpenRA.Mods.RA/Widgets/SupportPowerBinWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/SupportPowerBinWidget.cs
@@ -12,8 +12,8 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
diff --git a/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs b/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs
index f8465d6529..8ee5149707 100644
--- a/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs
@@ -11,8 +11,8 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Traits;
+using OpenRA.Primitives;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
diff --git a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs
index 84cec991bc..9ef94a0a16 100644
--- a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs
@@ -11,9 +11,9 @@
using System;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Orders;
+using OpenRA.Primitives;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
diff --git a/OpenRA.Mods.RA/World/PathfinderDebugOverlay.cs b/OpenRA.Mods.RA/World/PathfinderDebugOverlay.cs
index ea7efa424b..ba6df9ce47 100644
--- a/OpenRA.Mods.RA/World/PathfinderDebugOverlay.cs
+++ b/OpenRA.Mods.RA/World/PathfinderDebugOverlay.cs
@@ -11,8 +11,8 @@
using System;
using System.Collections.Generic;
using System.Drawing;
-using OpenRA.FileFormats;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj b/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj
index 0b96fc4947..c58811f794 100644
--- a/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj
+++ b/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj
@@ -47,10 +47,6 @@
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
diff --git a/OpenRA.Renderer.Cg/GraphicsDevice.cs b/OpenRA.Renderer.Cg/GraphicsDevice.cs
index 15c8d69e46..070c05647b 100755
--- a/OpenRA.Renderer.Cg/GraphicsDevice.cs
+++ b/OpenRA.Renderer.Cg/GraphicsDevice.cs
@@ -10,7 +10,8 @@
using System;
using System.Drawing;
-using OpenRA.FileFormats.Graphics;
+using OpenRA;
+using OpenRA.Graphics;
using OpenRA.Renderer.SdlCommon;
using Tao.Cg;
diff --git a/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj b/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj
index 83873fd597..ad414a2617 100644
--- a/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj
+++ b/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj
@@ -73,10 +73,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Renderer.Cg/Shader.cs b/OpenRA.Renderer.Cg/Shader.cs
index a833d0f5ab..16ef162d33 100644
--- a/OpenRA.Renderer.Cg/Shader.cs
+++ b/OpenRA.Renderer.Cg/Shader.cs
@@ -10,8 +10,8 @@
using System;
using System.IO;
-using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.FileSystem;
+using OpenRA.Graphics;
using OpenRA.Renderer.SdlCommon;
namespace OpenRA.Renderer.Cg
@@ -26,7 +26,7 @@ namespace OpenRA.Renderer.Cg
{
this.dev = dev;
string code;
- using (var file = new StreamReader(FileSystem.Open("cg{0}{1}.fx".F(Path.DirectorySeparatorChar, name))))
+ using (var file = new StreamReader(GlobalFileSystem.Open("cg{0}{1}.fx".F(Path.DirectorySeparatorChar, name))))
code = file.ReadToEnd();
effect = Tao.Cg.Cg.cgCreateEffect(dev.Context, code, null);
diff --git a/OpenRA.Renderer.Gl/GraphicsDevice.cs b/OpenRA.Renderer.Gl/GraphicsDevice.cs
index e82e9ab3ac..5a961c83bb 100755
--- a/OpenRA.Renderer.Gl/GraphicsDevice.cs
+++ b/OpenRA.Renderer.Gl/GraphicsDevice.cs
@@ -10,7 +10,8 @@
using System;
using System.Drawing;
-using OpenRA.FileFormats.Graphics;
+using OpenRA;
+using OpenRA.Graphics;
using OpenRA.Renderer.SdlCommon;
[assembly: Renderer(typeof(OpenRA.Renderer.Glsl.DeviceFactory))]
diff --git a/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj b/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj
index 7c70a811ee..bc2d40664d 100644
--- a/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj
+++ b/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj
@@ -73,10 +73,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Renderer.Gl/Shader.cs b/OpenRA.Renderer.Gl/Shader.cs
index e4b62793f1..c3d4bc8b5b 100644
--- a/OpenRA.Renderer.Gl/Shader.cs
+++ b/OpenRA.Renderer.Gl/Shader.cs
@@ -12,8 +12,8 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
-using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.FileSystem;
+using OpenRA.Graphics;
using OpenRA.Renderer.SdlCommon;
using Tao.OpenGl;
@@ -29,7 +29,7 @@ namespace OpenRA.Renderer.Glsl
{
// Vertex shader
string vertexCode;
- using (var file = new StreamReader(FileSystem.Open("glsl{0}{1}.vert".F(Path.DirectorySeparatorChar, name))))
+ using (var file = new StreamReader(GlobalFileSystem.Open("glsl{0}{1}.vert".F(Path.DirectorySeparatorChar, name))))
vertexCode = file.ReadToEnd();
var v = Gl.glCreateShaderObjectARB(Gl.GL_VERTEX_SHADER_ARB);
@@ -47,7 +47,7 @@ namespace OpenRA.Renderer.Glsl
// Fragment shader
string fragmentCode;
- using (var file = new StreamReader(FileSystem.Open("glsl{0}{1}.frag".F(Path.DirectorySeparatorChar, name))))
+ using (var file = new StreamReader(GlobalFileSystem.Open("glsl{0}{1}.frag".F(Path.DirectorySeparatorChar, name))))
fragmentCode = file.ReadToEnd();
var f = Gl.glCreateShaderObjectARB(Gl.GL_FRAGMENT_SHADER_ARB);
diff --git a/OpenRA.Renderer.Null/NullGraphicsDevice.cs b/OpenRA.Renderer.Null/NullGraphicsDevice.cs
index 45d18fba2d..bf5adc38f3 100644
--- a/OpenRA.Renderer.Null/NullGraphicsDevice.cs
+++ b/OpenRA.Renderer.Null/NullGraphicsDevice.cs
@@ -10,7 +10,8 @@
using System;
using System.Drawing;
-using OpenRA.FileFormats.Graphics;
+using OpenRA;
+using OpenRA.Graphics;
[assembly: Renderer(typeof(OpenRA.Renderer.Null.DeviceFactory))]
diff --git a/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj b/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj
index 484ae28e5b..f0c790d266 100644
--- a/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj
+++ b/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj
@@ -58,10 +58,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj b/OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj
index 711ae05120..4062ed3542 100644
--- a/OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj
+++ b/OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj
@@ -47,10 +47,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs b/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs
index 01ac6c6868..88328ff912 100755
--- a/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs
+++ b/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs
@@ -11,7 +11,8 @@
using System;
using System.Drawing;
using System.Linq;
-using OpenRA.FileFormats.Graphics;
+using OpenRA;
+using OpenRA.Graphics;
using OpenRA.Renderer.Glsl;
using OpenRA.Renderer.SdlCommon;
using SDL2;
diff --git a/OpenRA.Renderer.SdlCommon/FrameBuffer.cs b/OpenRA.Renderer.SdlCommon/FrameBuffer.cs
index 936b5a164b..5a8b62bc85 100644
--- a/OpenRA.Renderer.SdlCommon/FrameBuffer.cs
+++ b/OpenRA.Renderer.SdlCommon/FrameBuffer.cs
@@ -12,7 +12,7 @@ using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.Graphics;
using Tao.OpenGl;
namespace OpenRA.Renderer.SdlCommon
diff --git a/OpenRA.Renderer.SdlCommon/MultiTapDetection.cs b/OpenRA.Renderer.SdlCommon/MultiTapDetection.cs
index 45d9312bdf..ae61568b63 100644
--- a/OpenRA.Renderer.SdlCommon/MultiTapDetection.cs
+++ b/OpenRA.Renderer.SdlCommon/MultiTapDetection.cs
@@ -10,7 +10,7 @@
using System;
using OpenRA;
-using OpenRA.FileFormats;
+using OpenRA.Primitives;
public static class MultiTapDetection
{
diff --git a/OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj b/OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj
index 2f6e4fa41b..b7ba9c059e 100644
--- a/OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj
+++ b/OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj
@@ -73,10 +73,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Renderer.SdlCommon/SdlGraphics.cs b/OpenRA.Renderer.SdlCommon/SdlGraphics.cs
index ec87e0f8d9..5b6d1657e6 100644
--- a/OpenRA.Renderer.SdlCommon/SdlGraphics.cs
+++ b/OpenRA.Renderer.SdlCommon/SdlGraphics.cs
@@ -12,7 +12,7 @@ using System;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.Graphics;
using Tao.OpenGl;
using Tao.Sdl;
diff --git a/OpenRA.Renderer.SdlCommon/Texture.cs b/OpenRA.Renderer.SdlCommon/Texture.cs
index 687fc78967..3ba537145f 100644
--- a/OpenRA.Renderer.SdlCommon/Texture.cs
+++ b/OpenRA.Renderer.SdlCommon/Texture.cs
@@ -12,7 +12,7 @@ using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.Graphics;
using Tao.OpenGl;
namespace OpenRA.Renderer.SdlCommon
diff --git a/OpenRA.Renderer.SdlCommon/VertexBuffer.cs b/OpenRA.Renderer.SdlCommon/VertexBuffer.cs
index 30d84787b8..0439acd2f3 100644
--- a/OpenRA.Renderer.SdlCommon/VertexBuffer.cs
+++ b/OpenRA.Renderer.SdlCommon/VertexBuffer.cs
@@ -10,7 +10,7 @@
using System;
using System.Runtime.InteropServices;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.Graphics;
using Tao.OpenGl;
namespace OpenRA.Renderer.SdlCommon
diff --git a/OpenRA.TilesetBuilder/FormBuilder.cs b/OpenRA.TilesetBuilder/FormBuilder.cs
index 7a56e0499f..bd52b5c31f 100644
--- a/OpenRA.TilesetBuilder/FormBuilder.cs
+++ b/OpenRA.TilesetBuilder/FormBuilder.cs
@@ -16,7 +16,7 @@ using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml;
-using OpenRA.FileFormats;
+using OpenRA.Graphics;
namespace OpenRA.TilesetBuilder
{
diff --git a/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj b/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj
index 49a647393e..c67380d8d7 100644
--- a/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj
+++ b/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj
@@ -120,10 +120,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Utility/Command.cs b/OpenRA.Utility/Command.cs
index 2e373bbeaf..1605106831 100644
--- a/OpenRA.Utility/Command.cs
+++ b/OpenRA.Utility/Command.cs
@@ -17,7 +17,7 @@ using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
+using OpenRA.FileSystem;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Traits;
@@ -147,11 +147,11 @@ namespace OpenRA.Utility
var files = args.Skip(2);
var manifest = new Manifest(mod);
- FileSystem.LoadFromManifest(manifest);
+ GlobalFileSystem.LoadFromManifest(manifest);
foreach (var f in files)
{
- var src = FileSystem.Open(f);
+ var src = GlobalFileSystem.Open(f);
if (src == null)
throw new InvalidOperationException("File not found: {0}".F(f));
var data = src.ReadAllBytes();
@@ -181,14 +181,14 @@ namespace OpenRA.Utility
var srcMod = args[1].Split(':')[0];
Game.modData = new ModData(srcMod);
- FileSystem.LoadFromManifest(Game.modData.Manifest);
+ GlobalFileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map());
var srcPaletteInfo = Rules.Info["player"].Traits.Get();
int[] srcRemapIndex = srcPaletteInfo.RemapIndex;
var destMod = args[2].Split(':')[0];
Game.modData = new ModData(destMod);
- FileSystem.LoadFromManifest(Game.modData.Manifest);
+ GlobalFileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map());
var destPaletteInfo = Rules.Info["player"].Traits.Get();
var destRemapIndex = destPaletteInfo.RemapIndex;
@@ -310,9 +310,9 @@ namespace OpenRA.Utility
var map = new Map(args[1]);
Game.modData = new ModData(map.RequiresMod);
- FileSystem.UnmountAll();
+ GlobalFileSystem.UnmountAll();
foreach (var dir in Game.modData.Manifest.Folders)
- FileSystem.Mount(dir);
+ GlobalFileSystem.Mount(dir);
Rules.LoadRules(Game.modData.Manifest, map);
diff --git a/OpenRA.Utility/LegacyMapImporter.cs b/OpenRA.Utility/LegacyMapImporter.cs
index dbf4962d06..cafd49dc5c 100644
--- a/OpenRA.Utility/LegacyMapImporter.cs
+++ b/OpenRA.Utility/LegacyMapImporter.cs
@@ -16,6 +16,9 @@ using System.IO;
using System.Linq;
using System.Text;
using OpenRA.FileFormats;
+using OpenRA.FileSystem;
+using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Utility
@@ -123,7 +126,7 @@ namespace OpenRA.Utility
public void ConvertIniMap(string iniFile)
{
- var file = new IniFile(FileSystem.Open(iniFile));
+ var file = new IniFile(GlobalFileSystem.Open(iniFile));
var basic = file.GetSection("Basic");
var mapSection = file.GetSection("Map");
var legacyMapFormat = (IniMapFormat)int.Parse(basic.GetValue("NewINIFormat", "0"));
@@ -157,7 +160,7 @@ namespace OpenRA.Utility
else
{
// CnC
- UnpackCncTileData(FileSystem.Open(iniFile.Substring(0, iniFile.Length - 4) + ".bin"));
+ UnpackCncTileData(GlobalFileSystem.Open(iniFile.Substring(0, iniFile.Length - 4) + ".bin"));
ReadCncOverlay(file);
ReadCncTrees(file);
}
diff --git a/OpenRA.Utility/OpenRA.Utility.csproj b/OpenRA.Utility/OpenRA.Utility.csproj
index 2b88792ff5..574554d0ca 100644
--- a/OpenRA.Utility/OpenRA.Utility.csproj
+++ b/OpenRA.Utility/OpenRA.Utility.csproj
@@ -79,10 +79,6 @@
-
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
- OpenRA.FileFormats
-
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Utility/Program.cs b/OpenRA.Utility/Program.cs
index 87d4fd0929..bdc1845261 100644
--- a/OpenRA.Utility/Program.cs
+++ b/OpenRA.Utility/Program.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
-using OpenRA.FileFormats;
+using OpenRA.FileSystem;
namespace OpenRA.Utility
{
@@ -39,7 +39,7 @@ namespace OpenRA.Utility
{
if (args.Length == 0) { PrintUsage(); return; }
- AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
+ AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
Log.LogPath = Platform.SupportDir + "Logs" + Path.DirectorySeparatorChar;
diff --git a/OpenRA.Utility/UpgradeRules.cs b/OpenRA.Utility/UpgradeRules.cs
index 73ac70061e..24447f26fc 100644
--- a/OpenRA.Utility/UpgradeRules.cs
+++ b/OpenRA.Utility/UpgradeRules.cs
@@ -17,9 +17,9 @@ using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using OpenRA.FileFormats;
-using OpenRA.FileFormats.Graphics;
using OpenRA.GameRules;
using OpenRA.Graphics;
+using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Utility
diff --git a/OpenRA.sln b/OpenRA.sln
index 132059f701..f4f6901d49 100644
--- a/OpenRA.sln
+++ b/OpenRA.sln
@@ -1,8 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.FileFormats", "OpenRA.FileFormats\OpenRA.FileFormats.csproj", "{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Game", "OpenRA.Game\OpenRA.Game.csproj", "{0DFB103F-2962-400F-8C6D-E2C28CCBA633}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.RA", "OpenRA.Mods.RA\OpenRA.Mods.RA.csproj", "{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}"
@@ -74,14 +72,6 @@ Global
Release|Mixed Platforms = Release|Mixed Platforms
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Any CPU.Build.0 = Release|Any CPU
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.ActiveCfg = Debug|x86
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.Build.0 = Debug|x86
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
diff --git a/packaging/package-all.sh b/packaging/package-all.sh
index a6c7d500fa..cc229cc58a 100755
--- a/packaging/package-all.sh
+++ b/packaging/package-all.sh
@@ -27,7 +27,7 @@ markdown DOCUMENTATION.md > DOCUMENTATION.html
# List of files that are packaged on all platforms
FILES=('OpenRA.Game.exe' 'OpenRA.Editor.exe' 'OpenRA.Utility.exe' \
-'OpenRA.FileFormats.dll' 'OpenRA.Renderer.SdlCommon.dll' 'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Cg.dll' 'OpenRA.Renderer.Gl.dll' 'OpenRA.Renderer.Null.dll' 'OpenRA.Irc.dll' \
+'OpenRA.Renderer.SdlCommon.dll' 'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Cg.dll' 'OpenRA.Renderer.Gl.dll' 'OpenRA.Renderer.Null.dll' 'OpenRA.Irc.dll' \
'FreeSans.ttf' 'FreeSansBold.ttf' \
'cg' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \
'AUTHORS' 'CHANGELOG' 'COPYING' \
diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi
index d944541afb..da955a8f49 100644
--- a/packaging/windows/OpenRA.nsi
+++ b/packaging/windows/OpenRA.nsi
@@ -66,7 +66,6 @@ Section "Game" GAME
SetOutPath "$INSTDIR"
File "${SRCDIR}\OpenRA.Game.exe"
File "${SRCDIR}\OpenRA.Utility.exe"
- File "${SRCDIR}\OpenRA.FileFormats.dll"
File "${SRCDIR}\OpenRA.Renderer.SdlCommon.dll"
File "${SRCDIR}\OpenRA.Renderer.Gl.dll"
File "${SRCDIR}\OpenRA.Renderer.Cg.dll"
@@ -184,7 +183,6 @@ Function ${UN}Clean
Delete $INSTDIR\OpenRA.Game.exe
Delete $INSTDIR\OpenRA.Utility.exe
Delete $INSTDIR\OpenRA.Editor.exe
- Delete $INSTDIR\OpenRA.FileFormats.dll
Delete $INSTDIR\OpenRA.Renderer.Gl.dll
Delete $INSTDIR\OpenRA.Renderer.Cg.dll
Delete $INSTDIR\OpenRA.Renderer.Null.dll