untie the engine from SDL2 and MiniTK
This commit is contained in:
42
Makefile
42
Makefile
@@ -79,7 +79,7 @@ INSTALL_PROGRAM = $(INSTALL) -m755
|
|||||||
INSTALL_DATA = $(INSTALL) -m644
|
INSTALL_DATA = $(INSTALL) -m644
|
||||||
|
|
||||||
# program targets
|
# program targets
|
||||||
CORE = rsdl2 rnull game utility
|
CORE = pdefault pnull game utility
|
||||||
TOOLS = gamemonitor
|
TOOLS = gamemonitor
|
||||||
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
|
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
|
||||||
|
|
||||||
@@ -100,25 +100,25 @@ endif
|
|||||||
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
|
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
|
||||||
game_TARGET = OpenRA.Game.exe
|
game_TARGET = OpenRA.Game.exe
|
||||||
game_KIND = winexe
|
game_KIND = winexe
|
||||||
game_LIBS = $(COMMON_LIBS) $(game_DEPS) thirdparty/download/SDL2-CS.dll thirdparty/download/SharpFont.dll
|
game_LIBS = $(COMMON_LIBS) $(game_DEPS) thirdparty/download/SharpFont.dll
|
||||||
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
|
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
|
||||||
PROGRAMS += game
|
PROGRAMS += game
|
||||||
game: $(game_TARGET)
|
game: $(game_TARGET)
|
||||||
|
|
||||||
# Renderer dlls
|
# Platform dlls
|
||||||
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
|
pdefault_SRCS := $(shell find OpenRA.Platforms.Default/ -iname '*.cs')
|
||||||
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
|
pdefault_TARGET = OpenRA.Platforms.Default.dll
|
||||||
rsdl2_KIND = library
|
pdefault_KIND = library
|
||||||
rsdl2_DEPS = $(game_TARGET)
|
pdefault_DEPS = $(game_TARGET)
|
||||||
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/download/SDL2-CS.dll $(rsdl2_DEPS)
|
pdefault_LIBS = $(COMMON_LIBS) thirdparty/download/SDL2-CS.dll $(pdefault_DEPS)
|
||||||
|
|
||||||
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
|
pnull_SRCS := $(shell find OpenRA.Platforms.Null/ -iname '*.cs')
|
||||||
rnull_TARGET = OpenRA.Renderer.Null.dll
|
pnull_TARGET = OpenRA.Platforms.Null.dll
|
||||||
rnull_KIND = library
|
pnull_KIND = library
|
||||||
rnull_DEPS = $(game_TARGET)
|
pnull_DEPS = $(game_TARGET)
|
||||||
rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
|
pnull_LIBS = $(COMMON_LIBS) $(pnull_DEPS)
|
||||||
PROGRAMS += rsdl2 rnull
|
PROGRAMS += pdefault pnull
|
||||||
renderers: $(rsdl2_TARGET) $(rnull_TARGET)
|
platforms: $(pdefault_TARGET) $(pnull_TARGET)
|
||||||
|
|
||||||
# Mods Common
|
# Mods Common
|
||||||
mod_common_SRCS := $(shell find OpenRA.Mods.Common/ -iname '*.cs')
|
mod_common_SRCS := $(shell find OpenRA.Mods.Common/ -iname '*.cs')
|
||||||
@@ -181,8 +181,11 @@ check: utility mods
|
|||||||
@echo "Checking for code style violations in OpenRA.Game..."
|
@echo "Checking for code style violations in OpenRA.Game..."
|
||||||
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Game
|
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Game
|
||||||
@echo
|
@echo
|
||||||
@echo "Checking for code style violations in OpenRA.Renderer.Null..."
|
@echo "Checking for code style violations in OpenRA.Platforms.Default..."
|
||||||
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Renderer.Null
|
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Platforms.Default
|
||||||
|
@echo
|
||||||
|
@echo "Checking for code style violations in OpenRA.Platforms.Null..."
|
||||||
|
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Platforms.Null
|
||||||
@echo
|
@echo
|
||||||
@echo "Checking for code style violations in OpenRA.GameMonitor..."
|
@echo "Checking for code style violations in OpenRA.GameMonitor..."
|
||||||
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.GameMonitor
|
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.GameMonitor
|
||||||
@@ -202,9 +205,6 @@ check: utility mods
|
|||||||
@echo "Checking for code style violations in OpenRA.Mods.TS..."
|
@echo "Checking for code style violations in OpenRA.Mods.TS..."
|
||||||
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.TS
|
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.TS
|
||||||
@echo
|
@echo
|
||||||
@echo "Checking for code style violations in OpenRA.Renderer.Sdl2..."
|
|
||||||
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Renderer.Sdl2
|
|
||||||
@echo
|
|
||||||
@echo "Checking for code style violations in OpenRA.Utility..."
|
@echo "Checking for code style violations in OpenRA.Utility..."
|
||||||
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Utility
|
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Utility
|
||||||
@echo
|
@echo
|
||||||
@@ -275,7 +275,7 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
|
|||||||
#
|
#
|
||||||
default: core
|
default: core
|
||||||
|
|
||||||
core: game renderers mods utility
|
core: game platforms mods utility
|
||||||
|
|
||||||
tools: gamemonitor
|
tools: gamemonitor
|
||||||
|
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ namespace OpenRA
|
|||||||
GeoIP.Initialize();
|
GeoIP.Initialize();
|
||||||
|
|
||||||
GlobalFileSystem.Mount(Platform.GameDir); // Needed to access shaders
|
GlobalFileSystem.Mount(Platform.GameDir); // Needed to access shaders
|
||||||
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", null };
|
var renderers = new[] { Settings.Graphics.Renderer, "Default", null };
|
||||||
foreach (var r in renderers)
|
foreach (var r in renderers)
|
||||||
{
|
{
|
||||||
if (r == null)
|
if (r == null)
|
||||||
@@ -234,18 +234,6 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Sound.Create(Settings.Sound.Engine);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Log.Write("sound", "{0}", e);
|
|
||||||
Console.WriteLine("Creating the sound engine failed. Fallback in place. Check sound.log for details.");
|
|
||||||
Settings.Sound.Engine = "Null";
|
|
||||||
Sound.Create(Settings.Sound.Engine);
|
|
||||||
}
|
|
||||||
|
|
||||||
Console.WriteLine("Available mods:");
|
Console.WriteLine("Available mods:");
|
||||||
foreach (var mod in ModMetadata.AllMods)
|
foreach (var mod in ModMetadata.AllMods)
|
||||||
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
|
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
|
||||||
@@ -287,7 +275,7 @@ namespace OpenRA
|
|||||||
Settings.Game.Mod = mod;
|
Settings.Game.Mod = mod;
|
||||||
|
|
||||||
Sound.StopVideo();
|
Sound.StopVideo();
|
||||||
Sound.Initialize();
|
Sound.Initialize(Settings.Sound, Settings.Server);
|
||||||
|
|
||||||
ModData = new ModData(mod, !Settings.Server.Dedicated);
|
ModData = new ModData(mod, !Settings.Server.Dedicated);
|
||||||
ModData.InitializeLoaders();
|
ModData.InitializeLoaders();
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ using OpenRA.Graphics;
|
|||||||
namespace OpenRA
|
namespace OpenRA
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Assembly)]
|
[AttributeUsage(AttributeTargets.Assembly)]
|
||||||
public sealed class RendererAttribute : Attribute
|
public sealed class PlatformAttribute : Attribute
|
||||||
{
|
{
|
||||||
public readonly Type Type;
|
public readonly Type Type;
|
||||||
|
|
||||||
public RendererAttribute(Type graphicsDeviceType)
|
public PlatformAttribute(Type graphicsDeviceType)
|
||||||
{
|
{
|
||||||
if (!typeof(IDeviceFactory).IsAssignableFrom(graphicsDeviceType))
|
if (!typeof(IDeviceFactory).IsAssignableFrom(graphicsDeviceType))
|
||||||
throw new InvalidOperationException("Incorrect type in RendererAttribute");
|
throw new InvalidOperationException("Incorrect type in RendererAttribute");
|
||||||
@@ -29,7 +29,8 @@ namespace OpenRA
|
|||||||
|
|
||||||
public interface IDeviceFactory
|
public interface IDeviceFactory
|
||||||
{
|
{
|
||||||
IGraphicsDevice Create(Size size, WindowMode windowMode);
|
IGraphicsDevice CreateGraphics(Size size, WindowMode windowMode);
|
||||||
|
ISoundEngine CreateSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IHardwareCursor : IDisposable { }
|
public interface IHardwareCursor : IDisposable { }
|
||||||
|
|||||||
@@ -84,10 +84,6 @@
|
|||||||
<HintPath>..\thirdparty\download\MaxMind.Db.dll</HintPath>
|
<HintPath>..\thirdparty\download\MaxMind.Db.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SDL2-CS">
|
|
||||||
<HintPath>..\thirdparty\download\SDL2-CS.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Activities\Activity.cs" />
|
<Compile Include="Activities\Activity.cs" />
|
||||||
@@ -120,7 +116,6 @@
|
|||||||
<Compile Include="Graphics\LineRenderer.cs" />
|
<Compile Include="Graphics\LineRenderer.cs" />
|
||||||
<Compile Include="Graphics\MappedImage.cs" />
|
<Compile Include="Graphics\MappedImage.cs" />
|
||||||
<Compile Include="Graphics\Minimap.cs" />
|
<Compile Include="Graphics\Minimap.cs" />
|
||||||
<Compile Include="Graphics\Renderer.cs" />
|
|
||||||
<Compile Include="Graphics\SequenceProvider.cs" />
|
<Compile Include="Graphics\SequenceProvider.cs" />
|
||||||
<Compile Include="Graphics\Sheet.cs" />
|
<Compile Include="Graphics\Sheet.cs" />
|
||||||
<Compile Include="Graphics\SheetBuilder.cs" />
|
<Compile Include="Graphics\SheetBuilder.cs" />
|
||||||
@@ -228,8 +223,6 @@
|
|||||||
<Compile Include="Graphics\IGraphicsDevice.cs" />
|
<Compile Include="Graphics\IGraphicsDevice.cs" />
|
||||||
<Compile Include="Sound\Sound.cs" />
|
<Compile Include="Sound\Sound.cs" />
|
||||||
<Compile Include="Sound\SoundDevice.cs" />
|
<Compile Include="Sound\SoundDevice.cs" />
|
||||||
<Compile Include="Sound\OpenAlSound.cs" />
|
|
||||||
<Compile Include="Sound\NullSound.cs" />
|
|
||||||
<Compile Include="Effects\SpriteEffect.cs" />
|
<Compile Include="Effects\SpriteEffect.cs" />
|
||||||
<Compile Include="Graphics\SelectionBarsRenderable.cs" />
|
<Compile Include="Graphics\SelectionBarsRenderable.cs" />
|
||||||
<Compile Include="Graphics\TargetLineRenderable.cs" />
|
<Compile Include="Graphics\TargetLineRenderable.cs" />
|
||||||
@@ -249,6 +242,8 @@
|
|||||||
<Compile Include="Graphics\TerrainSpriteLayer.cs" />
|
<Compile Include="Graphics\TerrainSpriteLayer.cs" />
|
||||||
<Compile Include="Map\ProjectedCellRegion.cs" />
|
<Compile Include="Map\ProjectedCellRegion.cs" />
|
||||||
<Compile Include="Map\MapCoordsRegion.cs" />
|
<Compile Include="Map\MapCoordsRegion.cs" />
|
||||||
|
<Compile Include="Renderer.cs" />
|
||||||
|
<Compile Include="Platform.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="FileSystem\D2kSoundResources.cs" />
|
<Compile Include="FileSystem\D2kSoundResources.cs" />
|
||||||
@@ -298,7 +293,6 @@
|
|||||||
<Compile Include="Support\PerfTimer.cs" />
|
<Compile Include="Support\PerfTimer.cs" />
|
||||||
<Compile Include="Exts.cs" />
|
<Compile Include="Exts.cs" />
|
||||||
<Compile Include="MiniYaml.cs" />
|
<Compile Include="MiniYaml.cs" />
|
||||||
<Compile Include="Platform.cs" />
|
|
||||||
<Compile Include="StreamExts.cs" />
|
<Compile Include="StreamExts.cs" />
|
||||||
<Compile Include="Map\Map.cs" />
|
<Compile Include="Map\Map.cs" />
|
||||||
<Compile Include="Map\MapCache.cs" />
|
<Compile Include="Map\MapCache.cs" />
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ using System.Collections.Generic;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Support;
|
using OpenRA.Support;
|
||||||
|
|
||||||
namespace OpenRA.Graphics
|
namespace OpenRA
|
||||||
{
|
{
|
||||||
public sealed class Renderer : IDisposable
|
public sealed class Renderer : IDisposable
|
||||||
{
|
{
|
||||||
@@ -49,7 +50,7 @@ namespace OpenRA.Graphics
|
|||||||
var resolution = GetResolution(graphicSettings);
|
var resolution = GetResolution(graphicSettings);
|
||||||
|
|
||||||
var rendererName = serverSettings.Dedicated ? "Null" : graphicSettings.Renderer;
|
var rendererName = serverSettings.Dedicated ? "Null" : graphicSettings.Renderer;
|
||||||
var rendererPath = Platform.ResolvePath(".", "OpenRA.Renderer." + rendererName + ".dll");
|
var rendererPath = Platform.ResolvePath(".", "OpenRA.Platforms." + rendererName + ".dll");
|
||||||
|
|
||||||
Device = CreateDevice(Assembly.LoadFile(rendererPath), resolution.Width, resolution.Height, graphicSettings.Mode);
|
Device = CreateDevice(Assembly.LoadFile(rendererPath), resolution.Width, resolution.Height, graphicSettings.Mode);
|
||||||
|
|
||||||
@@ -79,12 +80,12 @@ namespace OpenRA.Graphics
|
|||||||
return new Size(size.X, size.Y);
|
return new Size(size.X, size.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IGraphicsDevice CreateDevice(Assembly rendererDll, int width, int height, WindowMode window)
|
static IGraphicsDevice CreateDevice(Assembly platformDll, int width, int height, WindowMode window)
|
||||||
{
|
{
|
||||||
foreach (RendererAttribute r in rendererDll.GetCustomAttributes(typeof(RendererAttribute), false))
|
foreach (PlatformAttribute r in platformDll.GetCustomAttributes(typeof(PlatformAttribute), false))
|
||||||
{
|
{
|
||||||
var factory = (IDeviceFactory)r.Type.GetConstructor(Type.EmptyTypes).Invoke(null);
|
var factory = (IDeviceFactory)r.Type.GetConstructor(Type.EmptyTypes).Invoke(null);
|
||||||
return factory.Create(new Size(width, height), window);
|
return factory.CreateGraphics(new Size(width, height), window);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new InvalidOperationException("Renderer DLL is missing RendererAttribute to tell us what type to use!");
|
throw new InvalidOperationException("Renderer DLL is missing RendererAttribute to tell us what type to use!");
|
||||||
@@ -111,7 +111,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
public class GraphicSettings
|
public class GraphicSettings
|
||||||
{
|
{
|
||||||
public string Renderer = "Sdl2";
|
public string Renderer = "Default";
|
||||||
public WindowMode Mode = WindowMode.PseudoFullscreen;
|
public WindowMode Mode = WindowMode.PseudoFullscreen;
|
||||||
public int2 FullscreenSize = new int2(0, 0);
|
public int2 FullscreenSize = new int2(0, 0);
|
||||||
public int2 WindowedSize = new int2(1024, 768);
|
public int2 WindowedSize = new int2(1024, 768);
|
||||||
@@ -139,7 +139,7 @@ namespace OpenRA
|
|||||||
public bool Shuffle = false;
|
public bool Shuffle = false;
|
||||||
public bool Repeat = false;
|
public bool Repeat = false;
|
||||||
|
|
||||||
public string Engine = "AL";
|
public string Engine = "Default";
|
||||||
public string Device = null;
|
public string Device = null;
|
||||||
|
|
||||||
public bool CashTicks = true;
|
public bool CashTicks = true;
|
||||||
|
|||||||
@@ -11,13 +11,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
using OpenRA.FileSystem;
|
using OpenRA.FileSystem;
|
||||||
using OpenRA.GameRules;
|
using OpenRA.GameRules;
|
||||||
using OpenRA.Primitives;
|
using OpenRA.Primitives;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
using OpenTK;
|
|
||||||
using OpenTK.Audio.OpenAL;
|
|
||||||
|
|
||||||
namespace OpenRA
|
namespace OpenRA
|
||||||
{
|
{
|
||||||
@@ -30,6 +29,17 @@ namespace OpenRA
|
|||||||
static ISound video;
|
static ISound video;
|
||||||
static MusicInfo currentMusic;
|
static MusicInfo currentMusic;
|
||||||
|
|
||||||
|
static ISoundEngine CreateDevice(Assembly platformDll)
|
||||||
|
{
|
||||||
|
foreach (PlatformAttribute r in platformDll.GetCustomAttributes(typeof(PlatformAttribute), false))
|
||||||
|
{
|
||||||
|
var factory = (IDeviceFactory)r.Type.GetConstructor(Type.EmptyTypes).Invoke(null);
|
||||||
|
return factory.CreateSound();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new InvalidOperationException("Platform DLL is missing PlatformAttribute to tell us what type to use!");
|
||||||
|
}
|
||||||
|
|
||||||
static ISoundSource LoadSound(string filename)
|
static ISoundSource LoadSound(string filename)
|
||||||
{
|
{
|
||||||
if (!GlobalFileSystem.Exists(filename))
|
if (!GlobalFileSystem.Exists(filename))
|
||||||
@@ -56,26 +66,12 @@ namespace OpenRA
|
|||||||
return soundEngine.AddSoundSourceFromMemory(rawData, channels, sampleBits, sampleRate);
|
return soundEngine.AddSoundSourceFromMemory(rawData, channels, sampleBits, sampleRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ISoundEngine CreateEngine(string engine)
|
public static void Initialize(SoundSettings soundSettings, ServerSettings serverSettings)
|
||||||
{
|
{
|
||||||
engine = Game.Settings.Server.Dedicated ? "Null" : engine;
|
var engineName = serverSettings.Dedicated ? "Null" : soundSettings.Engine;
|
||||||
switch (engine)
|
var enginePath = Platform.ResolvePath(".", "OpenRA.Platforms." + engineName + ".dll");
|
||||||
{
|
soundEngine = CreateDevice(Assembly.LoadFile(enginePath));
|
||||||
case "AL": return new OpenAlSoundEngine();
|
|
||||||
case "Null": return new NullSoundEngine();
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw new InvalidOperationException("Unsupported sound engine: {0}".F(engine));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Create(string engine)
|
|
||||||
{
|
|
||||||
soundEngine = CreateEngine(engine);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Initialize()
|
|
||||||
{
|
|
||||||
sounds = new Cache<string, ISoundSource>(LoadSound);
|
sounds = new Cache<string, ISoundSource>(LoadSound);
|
||||||
music = null;
|
music = null;
|
||||||
currentMusic = null;
|
currentMusic = null;
|
||||||
@@ -86,14 +82,11 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
var defaultDevices = new[]
|
var defaultDevices = new[]
|
||||||
{
|
{
|
||||||
new SoundDevice("AL", null, "Default Output"),
|
new SoundDevice("Default", null, "Default Output"),
|
||||||
new SoundDevice("Null", null, "Output Disabled")
|
new SoundDevice("Null", null, "Output Disabled")
|
||||||
};
|
};
|
||||||
|
|
||||||
var devices = OpenAlSoundEngine.AvailableDevices()
|
return defaultDevices.Concat(soundEngine.AvailableDevices()).ToArray();
|
||||||
.Select(d => new SoundDevice("AL", d, d));
|
|
||||||
|
|
||||||
return defaultDevices.Concat(devices).ToArray();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetListenerPosition(WPos position)
|
public static void SetListenerPosition(WPos position)
|
||||||
|
|||||||
@@ -8,10 +8,13 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace OpenRA
|
namespace OpenRA
|
||||||
{
|
{
|
||||||
interface ISoundEngine
|
public interface ISoundEngine
|
||||||
{
|
{
|
||||||
|
SoundDevice[] AvailableDevices();
|
||||||
ISoundSource AddSoundSourceFromMemory(byte[] data, int channels, int sampleBits, int sampleRate);
|
ISoundSource AddSoundSourceFromMemory(byte[] data, int channels, int sampleBits, int sampleRate);
|
||||||
ISound Play2D(ISoundSource sound, bool loop, bool relative, WPos pos, float volume, bool attenuateVolume);
|
ISound Play2D(ISoundSource sound, bool loop, bool relative, WPos pos, float volume, bool attenuateVolume);
|
||||||
float Volume { get; set; }
|
float Volume { get; set; }
|
||||||
@@ -41,7 +44,7 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ISoundSource { }
|
public interface ISoundSource { }
|
||||||
|
|
||||||
public interface ISound
|
public interface ISound
|
||||||
{
|
{
|
||||||
|
|||||||
32
OpenRA.Platforms.Default/DefaultPlatform.cs
Normal file
32
OpenRA.Platforms.Default/DefaultPlatform.cs
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Reflection;
|
||||||
|
using OpenRA;
|
||||||
|
|
||||||
|
[assembly: Platform(typeof(OpenRA.Platforms.Default.DeviceFactory))]
|
||||||
|
|
||||||
|
namespace OpenRA.Platforms.Default
|
||||||
|
{
|
||||||
|
public class DeviceFactory : IDeviceFactory
|
||||||
|
{
|
||||||
|
public IGraphicsDevice CreateGraphics(Size size, WindowMode windowMode)
|
||||||
|
{
|
||||||
|
return new Sdl2GraphicsDevice(size, windowMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ISoundEngine CreateSound()
|
||||||
|
{
|
||||||
|
return new OpenAlSoundEngine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
* see COPYING.
|
* see COPYING.
|
||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using OpenTK.Graphics.OpenGL;
|
using OpenTK.Graphics.OpenGL;
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Sdl2
|
namespace OpenRA.Platforms.Default
|
||||||
{
|
{
|
||||||
public static class ErrorHandler
|
public static class ErrorHandler
|
||||||
{
|
{
|
||||||
@@ -14,7 +14,7 @@ using System.Drawing;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using OpenTK.Graphics.OpenGL;
|
using OpenTK.Graphics.OpenGL;
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Sdl2
|
namespace OpenRA.Platforms.Default
|
||||||
{
|
{
|
||||||
public sealed class FrameBuffer : IFrameBuffer
|
public sealed class FrameBuffer : IFrameBuffer
|
||||||
{
|
{
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using OpenRA.Primitives;
|
using OpenRA.Primitives;
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Sdl2
|
namespace OpenRA.Platforms.Default
|
||||||
{
|
{
|
||||||
public static class MultiTapDetection
|
public static class MultiTapDetection
|
||||||
{
|
{
|
||||||
@@ -19,10 +19,22 @@ using OpenRA.Traits;
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Audio.OpenAL;
|
using OpenTK.Audio.OpenAL;
|
||||||
|
|
||||||
namespace OpenRA
|
namespace OpenRA.Platforms.Default
|
||||||
{
|
{
|
||||||
class OpenAlSoundEngine : ISoundEngine
|
class OpenAlSoundEngine : ISoundEngine
|
||||||
{
|
{
|
||||||
|
public SoundDevice[] AvailableDevices()
|
||||||
|
{
|
||||||
|
var defaultDevices = new[]
|
||||||
|
{
|
||||||
|
new SoundDevice("Default", null, "Default Output"),
|
||||||
|
new SoundDevice("Null", null, "Output Disabled")
|
||||||
|
};
|
||||||
|
|
||||||
|
var physicalDevices = PhysicalDevices().Select(d => new SoundDevice("Default", d, d));
|
||||||
|
return defaultDevices.Concat(physicalDevices).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
class PoolSlot
|
class PoolSlot
|
||||||
{
|
{
|
||||||
public bool IsActive;
|
public bool IsActive;
|
||||||
@@ -55,7 +67,7 @@ namespace OpenRA
|
|||||||
return devices;
|
return devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string[] AvailableDevices()
|
static string[] PhysicalDevices()
|
||||||
{
|
{
|
||||||
// Returns all devices under Windows Vista and newer
|
// Returns all devices under Windows Vista and newer
|
||||||
if (Alc.IsExtensionPresent(IntPtr.Zero, "ALC_ENUMERATE_ALL_EXT"))
|
if (Alc.IsExtensionPresent(IntPtr.Zero, "ALC_ENUMERATE_ALL_EXT"))
|
||||||
@@ -148,7 +160,7 @@ namespace OpenRA
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var currFrame = Game.OrderManager.LocalFrameNumber;
|
var currFrame = Game.LocalTick;
|
||||||
var atten = 1f;
|
var atten = 1f;
|
||||||
|
|
||||||
// Check if max # of instances-per-location reached:
|
// Check if max # of instances-per-location reached:
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{33D03738-C154-4028-8EA8-63A3C488A651}</ProjectGuid>
|
<ProjectGuid>{33D03738-C154-4028-8EA8-63A3C488A651}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RootNamespace>OpenRA.Renderer.Sdl2</RootNamespace>
|
<RootNamespace>OpenRA.Platforms.Default</RootNamespace>
|
||||||
<AssemblyName>OpenRA.Renderer.Sdl2</AssemblyName>
|
<AssemblyName>OpenRA.Platforms.Default</AssemblyName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@@ -34,20 +34,24 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="Eluant">
|
||||||
|
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="SDL2-CS">
|
<Reference Include="SDL2-CS">
|
||||||
<HintPath>..\thirdparty\download\SDL2-CS.dll</HintPath>
|
<HintPath>..\thirdparty\download\SDL2-CS.dll</HintPath>
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Sdl2Input.cs" />
|
<Compile Include="DefaultPlatform.cs" />
|
||||||
<Compile Include="Sdl2GraphicsDevice.cs" />
|
<Compile Include="Sdl2GraphicsDevice.cs" />
|
||||||
|
<Compile Include="Sdl2Input.cs" />
|
||||||
<Compile Include="Shader.cs" />
|
<Compile Include="Shader.cs" />
|
||||||
<Compile Include="ErrorHandler.cs" />
|
<Compile Include="ErrorHandler.cs" />
|
||||||
<Compile Include="FrameBuffer.cs" />
|
<Compile Include="FrameBuffer.cs" />
|
||||||
<Compile Include="MultiTapDetection.cs" />
|
<Compile Include="MultiTapDetection.cs" />
|
||||||
<Compile Include="Texture.cs" />
|
<Compile Include="Texture.cs" />
|
||||||
<Compile Include="VertexBuffer.cs" />
|
<Compile Include="VertexBuffer.cs" />
|
||||||
|
<Compile Include="OpenAlSoundEngine.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
* see COPYING.
|
* see COPYING.
|
||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@@ -14,22 +14,12 @@ using System.IO;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using OpenRA;
|
using OpenRA;
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
|
using OpenTK.Graphics;
|
||||||
using OpenTK.Graphics.OpenGL;
|
using OpenTK.Graphics.OpenGL;
|
||||||
using SDL2;
|
using SDL2;
|
||||||
|
|
||||||
[assembly: Renderer(typeof(OpenRA.Renderer.Sdl2.DeviceFactory))]
|
namespace OpenRA.Platforms.Default
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Sdl2
|
|
||||||
{
|
{
|
||||||
public class DeviceFactory : IDeviceFactory
|
|
||||||
{
|
|
||||||
public IGraphicsDevice Create(Size size, WindowMode windowMode)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Using SDL 2 with OpenGL renderer");
|
|
||||||
return new Sdl2GraphicsDevice(size, windowMode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class Sdl2GraphicsDevice : IGraphicsDevice
|
public sealed class Sdl2GraphicsDevice : IGraphicsDevice
|
||||||
{
|
{
|
||||||
Size size;
|
Size size;
|
||||||
@@ -41,6 +31,8 @@ namespace OpenRA.Renderer.Sdl2
|
|||||||
|
|
||||||
public Sdl2GraphicsDevice(Size windowSize, WindowMode windowMode)
|
public Sdl2GraphicsDevice(Size windowSize, WindowMode windowMode)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("Using SDL 2 with OpenGL renderer");
|
||||||
|
|
||||||
size = windowSize;
|
size = windowSize;
|
||||||
|
|
||||||
SDL.SDL_Init(SDL.SDL_INIT_NOPARACHUTE | SDL.SDL_INIT_VIDEO);
|
SDL.SDL_Init(SDL.SDL_INIT_NOPARACHUTE | SDL.SDL_INIT_VIDEO);
|
||||||
@@ -84,6 +76,7 @@ namespace OpenRA.Renderer.Sdl2
|
|||||||
|
|
||||||
context = SDL.SDL_GL_CreateContext(window);
|
context = SDL.SDL_GL_CreateContext(window);
|
||||||
SDL.SDL_GL_MakeCurrent(window, context);
|
SDL.SDL_GL_MakeCurrent(window, context);
|
||||||
|
|
||||||
GL.LoadAll();
|
GL.LoadAll();
|
||||||
ErrorHandler.CheckGlVersion();
|
ErrorHandler.CheckGlVersion();
|
||||||
ErrorHandler.CheckGlError();
|
ErrorHandler.CheckGlError();
|
||||||
@@ -13,7 +13,7 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using SDL2;
|
using SDL2;
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Sdl2
|
namespace OpenRA.Platforms.Default
|
||||||
{
|
{
|
||||||
public class Sdl2Input
|
public class Sdl2Input
|
||||||
{
|
{
|
||||||
@@ -15,7 +15,7 @@ using System.Text;
|
|||||||
using OpenRA.FileSystem;
|
using OpenRA.FileSystem;
|
||||||
using OpenTK.Graphics.OpenGL;
|
using OpenTK.Graphics.OpenGL;
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Sdl2
|
namespace OpenRA.Platforms.Default
|
||||||
{
|
{
|
||||||
public class Shader : IShader
|
public class Shader : IShader
|
||||||
{
|
{
|
||||||
@@ -14,7 +14,7 @@ using System.Drawing.Imaging;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using OpenTK.Graphics.OpenGL;
|
using OpenTK.Graphics.OpenGL;
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Sdl2
|
namespace OpenRA.Platforms.Default
|
||||||
{
|
{
|
||||||
public sealed class Texture : ITexture
|
public sealed class Texture : ITexture
|
||||||
{
|
{
|
||||||
@@ -12,7 +12,7 @@ using System;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using OpenTK.Graphics.OpenGL;
|
using OpenTK.Graphics.OpenGL;
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Sdl2
|
namespace OpenRA.Platforms.Default
|
||||||
{
|
{
|
||||||
public sealed class VertexBuffer<T> : IVertexBuffer<T>
|
public sealed class VertexBuffer<T> : IVertexBuffer<T>
|
||||||
where T : struct
|
where T : struct
|
||||||
@@ -10,21 +10,10 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using OpenRA;
|
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
|
|
||||||
[assembly: Renderer(typeof(OpenRA.Renderer.Null.DeviceFactory))]
|
namespace OpenRA.Platforms.Null
|
||||||
|
|
||||||
namespace OpenRA.Renderer.Null
|
|
||||||
{
|
{
|
||||||
public class DeviceFactory : IDeviceFactory
|
|
||||||
{
|
|
||||||
public IGraphicsDevice Create(Size size, WindowMode windowMode)
|
|
||||||
{
|
|
||||||
return new NullGraphicsDevice(size, windowMode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class NullGraphicsDevice : IGraphicsDevice
|
public sealed class NullGraphicsDevice : IGraphicsDevice
|
||||||
{
|
{
|
||||||
public Size WindowSize { get; internal set; }
|
public Size WindowSize { get; internal set; }
|
||||||
31
OpenRA.Platforms.Null/NullPlatform.cs
Normal file
31
OpenRA.Platforms.Null/NullPlatform.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using OpenRA;
|
||||||
|
|
||||||
|
[assembly: Platform(typeof(OpenRA.Platforms.Null.DeviceFactory))]
|
||||||
|
|
||||||
|
namespace OpenRA.Platforms.Null
|
||||||
|
{
|
||||||
|
public class DeviceFactory : IDeviceFactory
|
||||||
|
{
|
||||||
|
public IGraphicsDevice CreateGraphics(Size size, WindowMode windowMode)
|
||||||
|
{
|
||||||
|
return new NullGraphicsDevice(size, windowMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ISoundEngine CreateSound()
|
||||||
|
{
|
||||||
|
return new NullSoundEngine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,10 +10,15 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace OpenRA
|
namespace OpenRA.Platforms.Null
|
||||||
{
|
{
|
||||||
class NullSoundEngine : ISoundEngine
|
class NullSoundEngine : ISoundEngine
|
||||||
{
|
{
|
||||||
|
public SoundDevice[] AvailableDevices()
|
||||||
|
{
|
||||||
|
return new[] { new SoundDevice("Null", null, "Output Disabled") };
|
||||||
|
}
|
||||||
|
|
||||||
public NullSoundEngine()
|
public NullSoundEngine()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Using Null sound engine which disables SFX completely");
|
Console.WriteLine("Using Null sound engine which disables SFX completely");
|
||||||
@@ -8,11 +8,10 @@
|
|||||||
<ProjectGuid>{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}</ProjectGuid>
|
<ProjectGuid>{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>OpenRA.Renderer.Null</RootNamespace>
|
<RootNamespace>OpenRA.Platforms.Null</RootNamespace>
|
||||||
<AssemblyName>OpenRA.Renderer.Null</AssemblyName>
|
<AssemblyName>OpenRA.Platforms.Null</AssemblyName>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<FileUpgradeFlags>
|
<FileUpgradeFlags></FileUpgradeFlags>
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
<OldToolsVersion>3.5</OldToolsVersion>
|
||||||
<UpgradeBackupLocation />
|
<UpgradeBackupLocation />
|
||||||
<PublishUrl>publish\</PublishUrl>
|
<PublishUrl>publish\</PublishUrl>
|
||||||
@@ -55,9 +54,14 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="Eluant">
|
||||||
|
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="NullGraphicsDevice.cs" />
|
<Compile Include="NullGraphicsDevice.cs" />
|
||||||
|
<Compile Include="NullSound.cs" />
|
||||||
|
<Compile Include="NullPlatform.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||||
@@ -11,13 +11,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Cnc", "OpenRA.M
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Utility", "OpenRA.Utility\OpenRA.Utility.csproj", "{F33337BE-CB69-4B24-850F-07D23E408DDF}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Utility", "OpenRA.Utility\OpenRA.Utility.csproj", "{F33337BE-CB69-4B24-850F-07D23E408DDF}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Null", "OpenRA.Renderer.Null\OpenRA.Renderer.Null.csproj", "{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Platforms.Null", "OpenRA.Platforms.Null\OpenRA.Platforms.Null.csproj", "{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.Mods.D2k\OpenRA.Mods.D2k.csproj", "{C0B0465C-6BE2-409C-8770-3A9BF64C4344}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.Mods.D2k\OpenRA.Mods.D2k.csproj", "{C0B0465C-6BE2-409C-8770-3A9BF64C4344}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.TS", "OpenRA.Mods.TS\OpenRA.Mods.TS.csproj", "{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.TS", "OpenRA.Mods.TS\OpenRA.Mods.TS.csproj", "{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Sdl2", "OpenRA.Renderer.Sdl2\OpenRA.Renderer.Sdl2.csproj", "{33D03738-C154-4028-8EA8-63A3C488A651}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Platforms.Default", "OpenRA.Platforms.Default\OpenRA.Platforms.Default.csproj", "{33D03738-C154-4028-8EA8-63A3C488A651}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Common", "OpenRA.Mods.Common\OpenRA.Mods.Common.csproj", "{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Common", "OpenRA.Mods.Common\OpenRA.Mods.Common.csproj", "{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|||||||
8
make.ps1
8
make.ps1
@@ -150,8 +150,10 @@ elseif ($command -eq "check")
|
|||||||
{
|
{
|
||||||
if (Test-Path OpenRA.Utility.exe)
|
if (Test-Path OpenRA.Utility.exe)
|
||||||
{
|
{
|
||||||
echo "Checking for code style violations in OpenRA.Renderer.Null..."
|
echo "Checking for code style violations in OpenRA.Platforms.Default..."
|
||||||
./OpenRA.Utility.exe ra --check-code-style OpenRA.Renderer.Null
|
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Platforms.Default
|
||||||
|
echo "Checking for code style violations in OpenRA.Platforms.Null..."
|
||||||
|
./OpenRA.Utility.exe ra --check-code-style OpenRA.Platforms.Null
|
||||||
echo "Checking for code style violations in OpenRA.GameMonitor..."
|
echo "Checking for code style violations in OpenRA.GameMonitor..."
|
||||||
./OpenRA.Utility.exe ra --check-code-style OpenRA.GameMonitor
|
./OpenRA.Utility.exe ra --check-code-style OpenRA.GameMonitor
|
||||||
echo "Checking for code style violations in OpenRA.Game..."
|
echo "Checking for code style violations in OpenRA.Game..."
|
||||||
@@ -166,8 +168,6 @@ elseif ($command -eq "check")
|
|||||||
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Mods.D2k
|
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Mods.D2k
|
||||||
echo "Checking for code style violations in OpenRA.Mods.TS..."
|
echo "Checking for code style violations in OpenRA.Mods.TS..."
|
||||||
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Mods.TS
|
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Mods.TS
|
||||||
echo "Checking for code style violations in OpenRA.Renderer.Sdl2..."
|
|
||||||
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Renderer.Sdl2
|
|
||||||
echo "Checking for code style violations in OpenRA.Utility..."
|
echo "Checking for code style violations in OpenRA.Utility..."
|
||||||
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Utility
|
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Utility
|
||||||
echo "Checking for code style violations in OpenRA.Test..."
|
echo "Checking for code style violations in OpenRA.Test..."
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ markdown Lua-API.md > Lua-API.html
|
|||||||
|
|
||||||
# List of files that are packaged on all platforms
|
# List of files that are packaged on all platforms
|
||||||
FILES=('OpenRA.Game.exe' 'OpenRA.Game.exe.config' 'OpenRA.Utility.exe' \
|
FILES=('OpenRA.Game.exe' 'OpenRA.Game.exe.config' 'OpenRA.Utility.exe' \
|
||||||
'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Null.dll' \
|
'OpenRA.Platforms.Default.dll' 'OpenRA.Platforms.Null.dll' \
|
||||||
'lua' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \
|
'lua' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \
|
||||||
'AUTHORS' 'COPYING' 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \
|
'AUTHORS' 'COPYING' 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \
|
||||||
'global mix database.dat' 'GeoLite2-Country.mmdb.gz')
|
'global mix database.dat' 'GeoLite2-Country.mmdb.gz')
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ Section "Game" GAME
|
|||||||
File "${SRCDIR}\OpenRA.Game.exe"
|
File "${SRCDIR}\OpenRA.Game.exe"
|
||||||
File "${SRCDIR}\OpenRA.Game.exe.config"
|
File "${SRCDIR}\OpenRA.Game.exe.config"
|
||||||
File "${SRCDIR}\OpenRA.Utility.exe"
|
File "${SRCDIR}\OpenRA.Utility.exe"
|
||||||
File "${SRCDIR}\OpenRA.Renderer.Null.dll"
|
File "${SRCDIR}\OpenRA.Platforms.Null.dll"
|
||||||
File "${SRCDIR}\OpenRA.Renderer.Sdl2.dll"
|
File "${SRCDIR}\OpenRA.Platforms.Default.dll"
|
||||||
File "${SRCDIR}\ICSharpCode.SharpZipLib.dll"
|
File "${SRCDIR}\ICSharpCode.SharpZipLib.dll"
|
||||||
File "${SRCDIR}\FuzzyLogicLibrary.dll"
|
File "${SRCDIR}\FuzzyLogicLibrary.dll"
|
||||||
File "${SRCDIR}\Mono.Nat.dll"
|
File "${SRCDIR}\Mono.Nat.dll"
|
||||||
@@ -188,8 +188,8 @@ Function ${UN}Clean
|
|||||||
Delete $INSTDIR\OpenRA.Game.exe
|
Delete $INSTDIR\OpenRA.Game.exe
|
||||||
Delete $INSTDIR\OpenRA.Game.exe.config
|
Delete $INSTDIR\OpenRA.Game.exe.config
|
||||||
Delete $INSTDIR\OpenRA.Utility.exe
|
Delete $INSTDIR\OpenRA.Utility.exe
|
||||||
Delete $INSTDIR\OpenRA.Renderer.Null.dll
|
Delete $INSTDIR\OpenRA.Platforms.Null.dll
|
||||||
Delete $INSTDIR\OpenRA.Renderer.Sdl2.dll
|
Delete $INSTDIR\OpenRA.Platforms.Default.dll
|
||||||
Delete $INSTDIR\ICSharpCode.SharpZipLib.dll
|
Delete $INSTDIR\ICSharpCode.SharpZipLib.dll
|
||||||
Delete $INSTDIR\FuzzyLogicLibrary.dll
|
Delete $INSTDIR\FuzzyLogicLibrary.dll
|
||||||
Delete $INSTDIR\Mono.Nat.dll
|
Delete $INSTDIR\Mono.Nat.dll
|
||||||
|
|||||||
Reference in New Issue
Block a user