rename classes named using "looper" to "application"

This commit is contained in:
Gered 2013-08-17 18:06:24 -04:00
parent fe789ffab1
commit 76a8d77e2a
8 changed files with 26 additions and 26 deletions

View file

@ -48,11 +48,11 @@
<Compile Include="Input\SDLMouse.cs" />
<Compile Include="IO\SDLFileSystem.cs" />
<Compile Include="SDLLogger.cs" />
<Compile Include="SDLLooper.cs" />
<Compile Include="SDLWindow.cs" />
<Compile Include="SDLConfiguration.cs" />
<Compile Include="CurrentOS.cs" />
<Compile Include="Input\SDLKeyMapper.cs" />
<Compile Include="SDLApplication.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>

View file

@ -9,9 +9,9 @@ using Blarg.GameFramework.IO;
namespace Blarg.GameFramework
{
public class SDLLooper : BaseLooper
public class SDLApplication : BaseApplication
{
const string LOG_TAG = "SDLLOOPER";
const string LOG_TAG = "SDLApplication";
#region Fields
@ -87,7 +87,7 @@ namespace Blarg.GameFramework
#endregion
public SDLLooper()
public SDLApplication()
{
_logger = new SDLLogger();
_windowInfo = new SDLWindow();
@ -628,7 +628,7 @@ namespace Blarg.GameFramework
Logger.Info(LOG_TAG, "SDL shutdown.");
}
~SDLLooper()
~SDLApplication()
{
ReleaseSDL();
}

View file

@ -6,9 +6,9 @@ using Blarg.GameFramework.IO;
namespace Blarg.GameFramework
{
public abstract class BaseLooper : ILooper
public abstract class BaseApplication : IApplication
{
public const string LOG_TAG = "BASELOOPER";
public const string LOG_TAG = "BASEAPP";
protected IGameApp GameApp { get; set; }

View file

@ -43,7 +43,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ILooper.cs" />
<Compile Include="Input\IKeyboard.cs" />
<Compile Include="Input\IKeyboardListener.cs" />
<Compile Include="Input\Key.cs" />
@ -81,9 +80,10 @@
<Compile Include="Graphics\Image.cs" />
<Compile Include="Graphics\ScreenOrientation.cs" />
<Compile Include="IGameApp.cs" />
<Compile Include="BaseLooper.cs" />
<Compile Include="IPlatformWindow.cs" />
<Compile Include="IPlatformConfiguration.cs" />
<Compile Include="IApplication.cs" />
<Compile Include="BaseApplication.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<ItemGroup>

View file

@ -5,7 +5,7 @@ using Blarg.GameFramework.IO;
namespace Blarg.GameFramework
{
public interface ILooper : IDisposable
public interface IApplication : IDisposable
{
PlatformOS OperatingSystem { get; }
PlatformType Type { get; }

View file

@ -26,7 +26,7 @@ namespace Blarg.GameFramework
public static PlatformOS OperatingSystem { get; private set; }
public static PlatformType Type { get; private set; }
public static ILooper Looper { get; private set; }
public static IApplication Application { get; private set; }
public static ILogger Logger { get; private set; }
public static IFileSystem FileSystem { get; private set; }
public static IKeyboard Keyboard { get; private set; }
@ -34,20 +34,20 @@ namespace Blarg.GameFramework
public static ITouchScreen TouchScreen { get; private set; }
public static GL20 GL { get; private set; }
public static void Set(ILooper looper)
public static void Set(IApplication application)
{
if (Looper != null)
if (Application != null)
throw new InvalidOperationException();
Looper = looper;
OperatingSystem = Looper.OperatingSystem;
Type = Looper.Type;
Logger = Looper.Logger;
FileSystem = Looper.FileSystem;
Keyboard = Looper.Keyboard;
Mouse = Looper.Mouse;
TouchScreen = Looper.TouchScreen;
GL = Looper.GL;
Application = application;
OperatingSystem = Application.OperatingSystem;
Type = Application.Type;
Logger = Application.Logger;
FileSystem = Application.FileSystem;
Keyboard = Application.Keyboard;
Mouse = Application.Mouse;
TouchScreen = Application.TouchScreen;
GL = Application.GL;
}
}
}

View file

@ -56,7 +56,7 @@ namespace Game
public void OnUpdate(float delta)
{
if (Platform.Keyboard.IsPressed(Blarg.GameFramework.Input.Key.Escape))
Platform.Looper.Quit();
Platform.Application.Quit();
}
public void Dispose()

View file

@ -7,12 +7,12 @@ namespace Game.SDL2
{
public static void Main(string[] args)
{
var game = new GameApp();
var config = new SDLConfiguration();
config.Title = "Test Game";
var looper = new SDLLooper();
looper.Run(game, config);
var app = new SDLApplication();
app.Run(new GameApp(), config);
app.Dispose();
}
}
}