From 76a8d77e2a787fe0df357cb7beae69913bb866dd Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 17 Aug 2013 18:06:24 -0400 Subject: [PATCH] rename classes named using "looper" to "application" --- .../Blarg.GameFramework.SDL2.csproj | 2 +- .../{SDLLooper.cs => SDLApplication.cs} | 8 +++---- .../{BaseLooper.cs => BaseApplication.cs} | 4 ++-- .../Blarg.GameFramework.csproj | 4 ++-- .../{ILooper.cs => IApplication.cs} | 2 +- Blarg.GameFramework/Platform.cs | 24 +++++++++---------- Game.Core/GameApp.cs | 2 +- Game.SDL2/Program.cs | 6 ++--- 8 files changed, 26 insertions(+), 26 deletions(-) rename Blarg.GameFramework.SDL2/{SDLLooper.cs => SDLApplication.cs} (99%) rename Blarg.GameFramework/{BaseLooper.cs => BaseApplication.cs} (96%) rename Blarg.GameFramework/{ILooper.cs => IApplication.cs} (93%) diff --git a/Blarg.GameFramework.SDL2/Blarg.GameFramework.SDL2.csproj b/Blarg.GameFramework.SDL2/Blarg.GameFramework.SDL2.csproj index 3d25f28..8c7a8ee 100644 --- a/Blarg.GameFramework.SDL2/Blarg.GameFramework.SDL2.csproj +++ b/Blarg.GameFramework.SDL2/Blarg.GameFramework.SDL2.csproj @@ -48,11 +48,11 @@ - + diff --git a/Blarg.GameFramework.SDL2/SDLLooper.cs b/Blarg.GameFramework.SDL2/SDLApplication.cs similarity index 99% rename from Blarg.GameFramework.SDL2/SDLLooper.cs rename to Blarg.GameFramework.SDL2/SDLApplication.cs index bc9cb67..d47d023 100644 --- a/Blarg.GameFramework.SDL2/SDLLooper.cs +++ b/Blarg.GameFramework.SDL2/SDLApplication.cs @@ -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(); } diff --git a/Blarg.GameFramework/BaseLooper.cs b/Blarg.GameFramework/BaseApplication.cs similarity index 96% rename from Blarg.GameFramework/BaseLooper.cs rename to Blarg.GameFramework/BaseApplication.cs index 785f18b..bec3012 100644 --- a/Blarg.GameFramework/BaseLooper.cs +++ b/Blarg.GameFramework/BaseApplication.cs @@ -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; } diff --git a/Blarg.GameFramework/Blarg.GameFramework.csproj b/Blarg.GameFramework/Blarg.GameFramework.csproj index 19e3822..618587a 100644 --- a/Blarg.GameFramework/Blarg.GameFramework.csproj +++ b/Blarg.GameFramework/Blarg.GameFramework.csproj @@ -43,7 +43,6 @@ - @@ -81,9 +80,10 @@ - + + diff --git a/Blarg.GameFramework/ILooper.cs b/Blarg.GameFramework/IApplication.cs similarity index 93% rename from Blarg.GameFramework/ILooper.cs rename to Blarg.GameFramework/IApplication.cs index 7fd53ab..81390fa 100644 --- a/Blarg.GameFramework/ILooper.cs +++ b/Blarg.GameFramework/IApplication.cs @@ -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; } diff --git a/Blarg.GameFramework/Platform.cs b/Blarg.GameFramework/Platform.cs index 57cac9c..e6b87b3 100644 --- a/Blarg.GameFramework/Platform.cs +++ b/Blarg.GameFramework/Platform.cs @@ -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; } } } diff --git a/Game.Core/GameApp.cs b/Game.Core/GameApp.cs index 691965e..6179239 100644 --- a/Game.Core/GameApp.cs +++ b/Game.Core/GameApp.cs @@ -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() diff --git a/Game.SDL2/Program.cs b/Game.SDL2/Program.cs index 5cbc3ef..894216a 100644 --- a/Game.SDL2/Program.cs +++ b/Game.SDL2/Program.cs @@ -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(); } } }