agate-svn-commit Mailing List for AgateLib (Page 2)
Status: Alpha
Brought to you by:
kanato
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
(86) |
May
(77) |
Jun
|
Jul
(1) |
Aug
(31) |
Sep
(12) |
Oct
(31) |
Nov
(53) |
Dec
(39) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(53) |
Feb
(14) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(13) |
| 2011 |
Jan
(17) |
Feb
(5) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(21) |
Dec
|
| 2012 |
Jan
(6) |
Feb
(14) |
Mar
(5) |
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(1) |
Feb
(8) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
(5) |
Nov
(9) |
Dec
(5) |
| 2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
|
Jun
(5) |
Jul
(33) |
Aug
(69) |
Sep
(35) |
Oct
(4) |
Nov
(1) |
Dec
|
|
From: <ka...@us...> - 2014-09-04 05:21:31
|
Revision: 1512
http://sourceforge.net/p/agate/code/1512
Author: kanato
Date: 2014-09-04 05:21:16 +0000 (Thu, 04 Sep 2014)
Log Message:
-----------
Update old XAudio2 code into new model.
Modified Paths:
--------------
trunk/AgateLib/AudioLib/SoundBufferSession.cs
trunk/AgateLib/Drivers/IAudioFactory.cs
trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs
trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs
trunk/AgateLib.AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/AgateLib.AgateSDL/SdlFactory.cs
trunk/AgateLib.Platform.WindowsMetro/Factories/WindowsFactory.cs
trunk/AgateLib.Platform.WindowsMetro/packages.config
trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs
trunk/AgateLib.Platform.WindowsPhone/packages.config
trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_FrameBuffer.cs
trunk/AgateLib.Platform.WindowsStoreCommon/Interop.cs
trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs
trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs
trunk/AgateLib.Platform.WindowsStoreCommon/packages.config
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/SoundbufferStopTester.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs
trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
trunk/AgateLib.Tests/Tests.WinForms/frmLauncher.Designer.cs
trunk/AgateLib.Tests/UnitTests/ApplicationModels/CoordinateSystemTest.cs
trunk/AgateLib.Tests/UnitTests/Display/DisplayWindowTest.cs
Added Paths:
-----------
trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/
trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Audio.cs
trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Music.cs
trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_SoundBuffer.cs
trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_SoundBufferSession.cs
trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_StreamingSoundBuffer.cs
trunk/AgateLib.Platform.WindowsStoreCommon/Factories/AudioFactoryDX.cs
trunk/AgateLib.Platform.WindowsStoreCommon/RenderTargetAdapterBase.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/snda.wav
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/sndb.wav
Removed Paths:
-------------
trunk/AgateLib.Tests/Tests.WinForms/Assets/snda.wav
trunk/AgateLib.Tests/Tests.WinForms/Assets/sndb.wav
Modified: trunk/AgateLib/AudioLib/SoundBufferSession.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBufferSession.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib/AudioLib/SoundBufferSession.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -44,10 +44,9 @@
{ }
internal SoundBufferSession(SoundBuffer source)
{
- impl = Core.Factory.AudioFactory.CreateSoundBufferSession(source.Impl);
+ impl = Core.Factory.AudioFactory.CreateSoundBufferSession(this, source.Impl);
mSource = source;
- //mSource.StopEvent += new Audio.AudioCoreEventDelegate(Stop);
Initialize();
Modified: trunk/AgateLib/Drivers/IAudioFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IAudioFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib/Drivers/IAudioFactory.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -59,7 +59,7 @@
/// </summary>
/// <param name="buffer"></param>
/// <returns></returns>
- SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer);
+ SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferSession owner, SoundBufferImpl buffer);
/// <summary>
/// Creates a SoundBufferImpl object.
/// </summary>
Modified: trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -1,4 +1,5 @@
-using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
@@ -45,7 +46,7 @@
{
return new NullMusicImpl();
}
- public SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
+ public SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferSession owner, SoundBufferImpl buffer)
{
return new NullSoundBufferSessionImpl();
}
Modified: trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs
===================================================================
--- trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -32,14 +32,15 @@
/// </summary>
public class FixedAspectRatioCoordinates : ICoordinateSystem
{
+ Point mOrigin;
+ Size mRenderTargetSize;
+
public FixedAspectRatioCoordinates()
{
PreserveDisplayAspectRatio = true;
AspectRatio = 16 / (double)9;
}
- Size mRenderTargetSize;
-
public Size RenderTargetSize
{
get { return mRenderTargetSize; }
@@ -49,6 +50,20 @@
DetermineCoordinateSystem();
}
}
+ /// <summary>
+ /// The value of the coordinate system in the upper left corner of
+ /// the display area.
+ /// </summary>
+ public Point Origin
+ {
+ get { return mOrigin; }
+ set
+ {
+ mOrigin = value;
+ DetermineCoordinateSystem();
+ }
+ }
+
public Rectangle Coordinates { get; private set; }
public void DetermineCoordinateSystem()
@@ -133,11 +148,5 @@
public double AspectRatio { get; set; }
- /// <summary>
- /// The value of the coordinate system in the upper left corner of
- /// the display area.
- /// </summary>
- public Point Origin { get; set; }
-
}
}
Modified: trunk/AgateLib.AgateSDL/Audio/SDL_SoundBufferSession.cs
===================================================================
--- trunk/AgateLib.AgateSDL/Audio/SDL_SoundBufferSession.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.AgateSDL/Audio/SDL_SoundBufferSession.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -25,6 +25,7 @@
using AgateLib.AudioLib.ImplementationBase;
using SDL2;
using AgateLib.AgateSDL.Sdl2;
+using AgateLib.AudioLib;
namespace AgateLib.AgateSDL.Audio
{
@@ -42,10 +43,11 @@
public bool mIsPlaying;
- public SDL_SoundBufferSession(SDL_SoundBuffer buffer)
+ public SDL_SoundBufferSession(SoundBufferSession owner, SDL_SoundBuffer buffer)
{
sdl = SdlFactory.CreateSDL();
-
+ Owner = owner;
+
this.buffer = buffer;
loop = buffer.Loop;
@@ -62,6 +64,7 @@
{
Stop();
}
+ public SoundBufferSession Owner { get; private set; }
protected override void Initialize()
{
Modified: trunk/AgateLib.AgateSDL/SdlFactory.cs
===================================================================
--- trunk/AgateLib.AgateSDL/SdlFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.AgateSDL/SdlFactory.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -45,9 +45,9 @@
{
return new SDL_SoundBuffer(inStream);
}
- public SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
+ public SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferSession owner, SoundBufferImpl buffer)
{
- return new SDL_SoundBufferSession((SDL_SoundBuffer)buffer);
+ return new SDL_SoundBufferSession(owner, (SDL_SoundBuffer)buffer);
}
public StreamingSoundBufferImpl CreateStreamingSoundBuffer(Stream input, SoundFormat format)
{
Modified: trunk/AgateLib.Platform.WindowsMetro/Factories/WindowsFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsMetro/Factories/WindowsFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsMetro/Factories/WindowsFactory.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -21,7 +21,7 @@
mDisplayFactory = new DisplayFactory();
PlatformFactory = new WinPlatformFactory(assets);
- AudioFactory = new NullSoundFactory();
+ AudioFactory = new AudioFactoryDX();
InputFactory = new NullInputFactory();
}
Modified: trunk/AgateLib.Platform.WindowsMetro/packages.config
===================================================================
--- trunk/AgateLib.Platform.WindowsMetro/packages.config 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsMetro/packages.config 2014-09-04 05:21:16 UTC (rev 1512)
@@ -5,4 +5,5 @@
<package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="win81" />
<package id="SharpDX.DXGI" version="2.6.2" targetFramework="win81" />
<package id="SharpDX.SimpleInitializer" version="1.0.0" targetFramework="win81" />
+ <package id="SharpDX.XAudio2" version="2.6.2" targetFramework="win81" />
</packages>
\ No newline at end of file
Modified: trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -21,7 +21,7 @@
mDisplayFactory = new DisplayFactory();
PlatformFactory = new WPPlatformFactory(assets);
- AudioFactory = new NullSoundFactory();
+ AudioFactory = new AudioFactoryDX();
InputFactory = new NullInputFactory();
}
Modified: trunk/AgateLib.Platform.WindowsPhone/packages.config
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-09-04 05:21:16 UTC (rev 1512)
@@ -5,4 +5,5 @@
<package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="wpa81" />
<package id="SharpDX.DXGI" version="2.6.2" targetFramework="wpa81" />
<package id="SharpDX.SimpleInitializer" version="1.0.0" targetFramework="wpa81" />
+ <package id="SharpDX.XAudio2" version="2.6.2" targetFramework="wpa81" />
</packages>
\ No newline at end of file
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-09-04 05:21:16 UTC (rev 1512)
@@ -74,6 +74,11 @@
<ItemGroup>
<Compile Include="ApplicationModels\WindowsStoreSerialModel.cs" />
<Compile Include="ApplicationModels\WindowsStoreSerialModelParameters.cs" />
+ <Compile Include="AudioImplementation\XAudio2_Audio.cs" />
+ <Compile Include="AudioImplementation\XAudio2_Music.cs" />
+ <Compile Include="AudioImplementation\XAudio2_SoundBuffer.cs" />
+ <Compile Include="AudioImplementation\XAudio2_SoundBufferSession.cs" />
+ <Compile Include="AudioImplementation\XAudio2_StreamingSoundBuffer.cs" />
<Compile Include="DisplayImplementation\D3DDevice.cs" />
<Compile Include="DisplayImplementation\DrawBuffer.cs" />
<Compile Include="DisplayImplementation\FrameBufferSurface.cs" />
@@ -89,6 +94,7 @@
<Compile Include="DisplayImplementation\Shaders\SDX_Lighting3DShader.cs" />
<Compile Include="DisplayImplementation\Shaders\ShaderFactory.cs" />
<Compile Include="DisplayImplementation\Shaders\ShaderSourceProvider.cs" />
+ <Compile Include="Factories\AudioFactoryDX.cs" />
<Compile Include="Factories\DisplayFactory.cs" />
<Compile Include="Factories\FakeFile.cs" />
<Compile Include="Factories\FakePath.cs" />
@@ -99,6 +105,7 @@
<Compile Include="PlatformImplementation\WindowsStorePlatformFactory.cs" />
<Compile Include="PlatformImplementation\WindowsStorePlatformInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="RenderTargetAdapterBase.cs" />
<Compile Include="SwapChainPanelAdapter.cs" />
<Compile Include="SwapChainBackgroundPanelAdapter.cs" />
<Compile Include="ApplicationModels\WindowsStoreSceneModelParameters.cs" />
@@ -116,6 +123,9 @@
<Reference Include="SharpDX.SimpleInitializer">
<HintPath>..\packages\SharpDX.SimpleInitializer.1.0.0\lib\portable-netcore451+wpa81\SharpDX.SimpleInitializer.dll</HintPath>
</Reference>
+ <Reference Include="SharpDX.XAudio2">
+ <HintPath>..\packages\SharpDX.2.6.2\Bin\DirectX11_2-Signed-winrt\SharpDX.XAudio2.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\ShaderSource\Basic2Dpixel.hlsl" />
Added: trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Audio.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Audio.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Audio.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -0,0 +1,185 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using SharpDX.XAudio2;
+using SharpDX.Multimedia;
+using Windows.UI.Core;
+using System.Threading.Tasks;
+
+namespace AgateLib.Platform.WindowsStore.AudioImplementation
+{
+ public class XAudio2_Audio : AudioImpl
+ {
+ XAudio2 mDevice;
+ MasteringVoice mMasteringVoice;
+ bool stopThread;
+
+ List<InvokeData> methodsToInvoke = new List<InvokeData>();
+
+ struct InvokeData
+ {
+ public Delegate method;
+ public object[] args;
+ }
+
+ public XAudio2 Device
+ {
+ get { return mDevice; }
+ }
+
+ public XAudio2_Audio()
+ {
+
+ }
+
+ public CoreDispatcher Dispatcher { get; private set; }
+ public MasteringVoice MasteringVoice { get { return mMasteringVoice; } }
+
+ public override void Initialize()
+ {
+ Dispatcher = DisplayImplementation.SDX_Display.MainThreadCoreWindow.Dispatcher;
+
+ mDevice = new XAudio2();
+ mMasteringVoice = new MasteringVoice(mDevice);
+
+ Report("SharpDX XAudio2 driver instantiated for audio.");
+
+ }
+
+ #region --- Threading ---
+
+ public bool InvokeRequired
+ {
+ get
+ {
+ return false;
+ /*
+ if (Thread.CurrentThread == xaudThread)
+ return false;
+ else
+ return true;
+ * */
+ }
+ }
+
+
+ public void BeginInvoke(Delegate method, params object[] args)
+ {
+ InvokeData k = new InvokeData { method = method, args = args };
+
+ lock (methodsToInvoke)
+ {
+ methodsToInvoke.Add(k);
+ }
+ }
+
+ public void Invoke(Delegate method, object[] args)
+ {
+ BeginInvoke(method, args);
+
+ throw new NotImplementedException();
+ /*
+ while (methodsToInvoke.Count > 0)
+ Thread.Sleep(1);
+ * */
+ }
+
+ void Run(object unused)
+ {
+ mDevice = new XAudio2();
+ mMasteringVoice = new MasteringVoice(mDevice);
+
+ for (; ; )
+ {
+ int count = methodsToInvoke.Count;
+
+ for (int i = 0; i < count; i++)
+ {
+ if (stopThread)
+ break;
+
+ InvokeData k = methodsToInvoke[i];
+
+ k.method.DynamicInvoke(k.args);
+ }
+
+ lock (methodsToInvoke)
+ {
+ methodsToInvoke.RemoveRange(0, count);
+ }
+
+ if (stopThread)
+ break;
+
+ //Thread.Sleep(1);
+ }
+
+ Dispose();
+ }
+
+ #endregion
+
+ public override void Dispose()
+ {
+ if (InvokeRequired)
+ {
+ stopThread = true;
+
+ int count = 0;
+ /*
+ while (xaudThread.ThreadState == ThreadState.Running)
+ {
+ Thread.Sleep(10);
+ count++;
+
+ if (count > 20)
+ {
+ xaudThread.Abort();
+ }
+ }
+ */
+ return;
+ }
+
+ mMasteringVoice.Dispose();
+ mDevice.Dispose();
+ }
+
+ protected override bool CapsBool(AgateLib.AudioLib.AudioBoolCaps audioBoolCaps)
+ {
+ switch (audioBoolCaps)
+ {
+ case AudioBoolCaps.StreamingSoundBuffer:
+ return true;
+ default:
+ return false;
+ }
+ }
+ }
+
+ public delegate void DisposeDelegate();
+}
Added: trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Music.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Music.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Music.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -0,0 +1,238 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using SharpDX.XAudio2;
+using SharpDX.Multimedia;
+
+namespace AgateLib.Platform.WindowsStore.AudioImplementation
+{
+
+ public class XAudio2_Music : MusicImpl
+ {
+ XAudio2_Audio mAudio;
+
+ public XAudio2_Music(XAudio2_Audio audio, string filename)
+ {
+ mAudio = audio;
+
+ if (System.IO.Path.GetExtension(filename) == ".mp3")
+ throw new Exception("MP3 files cannot be played due to license restrictions.");
+
+ //LoadMusic(filename);
+ }
+
+ public XAudio2_Music(XAudio2_Audio audio, Stream infile)
+ {
+ mAudio = audio;
+
+ //string tempfile = Path.GetTempFileName();
+ //using (FileStream writer = File.OpenWrite(tempfile))
+ //{
+ // ReadWriteStream(infile, writer);
+ //}
+
+ //try
+ //{
+ // LoadMusic(tempfile);
+ //}
+ //catch (Microsoft.DirectX.DirectXException e)
+ //{
+ // throw new AgateLib.AgateException(
+ // "Could not load the music file. The file format may be unsupported by DirectX.", e);
+ //}
+ //finally
+ //{
+ // File.Delete(tempfile);
+ //}
+ }
+ /*
+ private void LoadMusic(string filename)
+ {
+ mAVAudio = new Microsoft.DirectX.AudioVideoPlayback.Audio(filename);
+ mAVAudio.Ending += new EventHandler(mAVAudio_Ending);
+ }
+
+ private void ReadWriteStream(Stream readStream, Stream writeStream)
+ {
+ int Length = 256;
+ Byte[] buffer = new Byte[Length];
+ int bytesRead = readStream.Read(buffer, 0, Length);
+ // write the required bytes
+ while (bytesRead > 0)
+ {
+ writeStream.Write(buffer, 0, bytesRead);
+ bytesRead = readStream.Read(buffer, 0, Length);
+ }
+ readStream.Close();
+ writeStream.Close();
+ }
+
+ public override void Dispose()
+ {
+ mAVAudio.Dispose();
+ }
+
+
+ protected override void OnSetLoop(bool value)
+ {
+ if (value == true)
+ mAVAudio.Ending += mAVAudio_Ending;
+ else
+ mAVAudio.Ending -= mAVAudio_Ending;
+ }
+
+ public override void Play()
+ {
+ mAVAudio.Play();
+ }
+
+ public override void Stop()
+ {
+ mAVAudio.Stop();
+ }
+
+ /// <summary>
+ /// </summary>
+ public override double Volume
+ {
+ get
+ {
+ try
+ {
+ /// The DirectX AudioVideoPlayback object takes volume in the range of
+ /// -10000 to 0, indicating the number of hundredths of decibels the volume
+ /// is attenuated by, so we convert to zero to 1.
+
+ double vol = (double)(mAVAudio.Volume + 10000) / 10000;
+ // logarithmic volume control
+ return Audio.TransformByExp(vol);
+ }
+ catch (Microsoft.DirectX.DirectXException e)
+ {
+ System.Diagnostics.Debug.WriteLine("Failed to read volume.");
+ System.Diagnostics.Debug.WriteLine(e.Message);
+ return 1.0;
+ }
+ }
+ set
+ {
+ // do a logarithmic volume control
+ try
+ {
+ mAVAudio.Volume = (int)(Audio.TransformByLog(value) * 10000.0 - 10000.0);
+ }
+ catch (Microsoft.DirectX.DirectXException e)
+ {
+ System.Diagnostics.Debug.WriteLine("Failed to set volume.");
+ System.Diagnostics.Debug.WriteLine(e.Message);
+ }
+ }
+ }
+
+
+ void mAVAudio_Ending(object sender, EventArgs e)
+ {
+ if (IsLooping)
+ {
+ mAVAudio.CurrentPosition = 0;
+ }
+ }
+
+ public override bool IsPlaying
+ {
+ get { return mAVAudio.Playing; }
+ }
+
+ public override double Pan
+ {
+ get
+ {
+ return mAVAudio.Balance / (double)10000.0;
+ }
+ set
+ {
+ try
+ {
+ mAVAudio.Balance = (int)(value * 10000.0);
+ }
+ catch (Microsoft.DirectX.DirectXException e)
+ {
+ if (e.ErrorCode != -2147220909)
+ throw e;
+ }
+ }
+ }
+ * */
+ public override void Dispose()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override bool IsPlaying
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ protected override void OnSetLoop(bool value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override double Pan
+ {
+ get
+ {
+ throw new NotImplementedException();
+ }
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ public override void Play()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override void Stop()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override double Volume
+ {
+ get
+ {
+ throw new NotImplementedException();
+ }
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+ }
+}
Added: trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_SoundBuffer.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_SoundBuffer.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_SoundBuffer.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -0,0 +1,85 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using SharpDX.XAudio2;
+using SharpDX.Multimedia;
+using SharpDX;
+
+namespace AgateLib.Platform.WindowsStore.AudioImplementation
+{
+ public class XAudio2_SoundBuffer : SoundBufferImpl
+ {
+ XAudio2_Audio mAudio;
+ AudioBuffer mBuffer;
+ double mVolume;
+ WaveFormat mFormat;
+
+ static Stream OpenFile(string filename)
+ {
+ return AgateLib.IO.FileProvider.SoundAssets.OpenReadAsync(filename).Result;
+ }
+ public XAudio2_SoundBuffer(XAudio2_Audio audio, Stream inStream)
+ {
+ mAudio = audio;
+
+ var stream = new SoundStream(inStream);
+
+ mBuffer = new AudioBuffer();
+ mBuffer.Stream = stream;
+ mBuffer.AudioBytes = (int)stream.Length;
+
+ mFormat = stream.Format;
+ }
+
+ public XAudio2_SoundBuffer(XAudio2_Audio audio, string filename)
+ : this(audio, OpenFile(filename))
+ {
+
+ }
+
+ public override bool Loop { get; set; }
+
+ public override void Dispose()
+ {
+ mBuffer.Stream.Dispose();
+ }
+
+ public AudioBuffer Buffer
+ {
+ get { return mBuffer; }
+ }
+ public WaveFormat Format
+ {
+ get { return mFormat; }
+ }
+
+ public override double Volume
+ {
+ get { return mVolume; }
+ set { mVolume = value; }
+ }
+ }
+}
Added: trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_SoundBufferSession.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_SoundBufferSession.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_SoundBufferSession.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -0,0 +1,261 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using SharpDX.XAudio2;
+using SharpDX.Multimedia;
+using System.Threading.Tasks;
+
+namespace AgateLib.Platform.WindowsStore.AudioImplementation
+{
+ public class XAudio2_SoundBufferSession : SoundBufferSessionImpl
+ {
+ XAudio2_SoundBuffer mSource;
+ XAudio2_Audio mAudio;
+ AudioBuffer mBuffer;
+ SourceVoice mVoice;
+ double mVolume;
+ double mPan;
+ bool mIsPlaying;
+ bool mIsPaused;
+ bool mLoop = false;
+ bool mDisposing = false;
+
+ float[] channelVolumes = new float[2];
+ float[] outputMatrix = new float[8];
+
+ public XAudio2_SoundBufferSession(XAudio2_Audio audio, XAudio2_SoundBuffer source)
+ {
+ mAudio = audio;
+ mSource = source;
+ mBuffer = source.Buffer;
+ mVolume = source.Volume;
+ mLoop = source.Loop;
+
+ mVoice = new SourceVoice(mAudio.Device, mSource.Format);
+ mVoice.BufferEnd += mVoice_BufferEnd;
+ }
+
+ void mVoice_BufferEnd(IntPtr obj)
+ {
+ if (mDisposing)
+ {
+ mVoice.Dispose();
+ return;
+ }
+
+ if (mLoop)
+ {
+ mVoice.SubmitSourceBuffer(mBuffer, null);
+ }
+ else
+ {
+ mIsPlaying = false;
+ }
+ }
+ public override void Dispose()
+ {
+ mLoop = false;
+ mVoice.Stop();
+
+ mDisposing = true;
+ }
+
+ protected override void Initialize()
+ {
+ mVoice.Stop();
+ mVoice.SubmitSourceBuffer(mBuffer, null);
+ }
+
+ public override int CurrentLocation
+ {
+ get
+ {
+ return (int)mVoice.State.SamplesPlayed;
+ }
+ }
+ public override void Play()
+ {
+ mVoice.Stop();
+ mVoice.Start();
+ mIsPlaying = true;
+ }
+
+ public override void Stop()
+ {
+ mVoice.Stop();
+ }
+
+ public override bool IsPaused
+ {
+ get
+ {
+ return mIsPaused;
+ }
+ set
+ {
+ mIsPaused = value;
+
+ if (mIsPaused)
+ mVoice.Stop();
+ else
+ mVoice.Start();
+ }
+ }
+
+ public override double Volume
+ {
+ get { return mVolume; }
+ set
+ {
+ mVoice.SetVolume((float)value);
+ mVolume = value;
+ }
+ }
+
+ public override bool IsPlaying
+ {
+ get
+ {
+ return mIsPlaying;
+ }
+ }
+
+ public override double Pan
+ {
+ get { return mPan; }
+ set
+ {
+ SetPan(value);
+ }
+ }
+
+ private void SetPan(double value)
+ {
+ mPan = value;
+
+ // The description of this approach is found here:
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/hh405043%28v=vs.85%29.aspx
+
+ var outputChannels = (SpeakerConfigurations)mAudio.MasteringVoice.ChannelMask;
+ GetChannelVolumes((float)mPan);
+
+ float left = channelVolumes[0];
+ float right = channelVolumes[1];
+
+ switch (outputChannels)
+ {
+ case SpeakerConfigurations.SPEAKER_MONO:
+ outputMatrix[0] = 1.0f;
+ break;
+ case SpeakerConfigurations.SPEAKER_STEREO:
+ case SpeakerConfigurations.SPEAKER_2POINT1:
+ case SpeakerConfigurations.SPEAKER_SURROUND:
+ outputMatrix[0] = left;
+ outputMatrix[1] = right;
+ break;
+ case SpeakerConfigurations.SPEAKER_QUAD:
+ outputMatrix[0] = outputMatrix[2] = left;
+ outputMatrix[1] = outputMatrix[3] = right;
+ break;
+ case SpeakerConfigurations.SPEAKER_4POINT1:
+ outputMatrix[0] = outputMatrix[3] = left;
+ outputMatrix[1] = outputMatrix[4] = right;
+ break;
+ case SpeakerConfigurations.SPEAKER_5POINT1:
+ case SpeakerConfigurations.SPEAKER_7POINT1:
+ case SpeakerConfigurations.SPEAKER_5POINT1_SURROUND:
+ outputMatrix[0] = outputMatrix[4] = left;
+ outputMatrix[1] = outputMatrix[5] = right;
+ break;
+ case SpeakerConfigurations.SPEAKER_7POINT1_SURROUND:
+ outputMatrix[0] = outputMatrix[4] = outputMatrix[6] = left;
+ outputMatrix[1] = outputMatrix[5] = outputMatrix[7] = right;
+ break;
+ }
+
+ mVoice.SetOutputMatrix(mVoice.VoiceDetails.InputChannelCount,
+ mAudio.MasteringVoice.VoiceDetails.InputChannelCount,
+ outputMatrix);
+
+ //await mAudio.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
+ // {
+ // mVoice.SetChannelVolumes(2, GetChannelVolumes((float)value));
+ // });
+ }
+
+ private float[] GetChannelVolumes(float pan)
+ {
+ if (pan < 0)
+ {
+ channelVolumes[0] = 1;
+ channelVolumes[1] = 1 + pan;
+ }
+ else
+ {
+ channelVolumes[0] = 1 - pan;
+ channelVolumes[1] = 1;
+ }
+
+ return channelVolumes;
+ }
+ }
+
+ enum SpeakerConfigurations : uint
+ {
+ SPEAKER_FRONT_LEFT = 0x00000001,
+ SPEAKER_FRONT_RIGHT = 0x00000002,
+ SPEAKER_FRONT_CENTER = 0x00000004,
+ SPEAKER_LOW_FREQUENCY = 0x00000008,
+ SPEAKER_BACK_LEFT = 0x00000010,
+ SPEAKER_BACK_RIGHT = 0x00000020,
+ SPEAKER_FRONT_LEFT_OF_CENTER = 0x00000040,
+ SPEAKER_FRONT_RIGHT_OF_CENTER = 0x00000080,
+ SPEAKER_BACK_CENTER = 0x00000100,
+ SPEAKER_SIDE_LEFT = 0x00000200,
+ SPEAKER_SIDE_RIGHT = 0x00000400,
+ SPEAKER_TOP_CENTER = 0x00000800,
+ SPEAKER_TOP_FRONT_LEFT = 0x00001000,
+ SPEAKER_TOP_FRONT_CENTER = 0x00002000,
+ SPEAKER_TOP_FRONT_RIGHT = 0x00004000,
+ SPEAKER_TOP_BACK_LEFT = 0x00008000,
+ SPEAKER_TOP_BACK_CENTER = 0x00010000,
+ SPEAKER_TOP_BACK_RIGHT = 0x00020000,
+ SPEAKER_RESERVED = 0x7FFC0000,// bit mask locations reserved for future use
+ SPEAKER_ALL = 0x80000000,// used to specify that any possible permutation of speaker configurations
+ SPEAKER_MONO = SPEAKER_FRONT_CENTER,
+ SPEAKER_STEREO = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT),
+ SPEAKER_2POINT1 = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY),
+ SPEAKER_SURROUND = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER),
+ SPEAKER_QUAD = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT),
+ SPEAKER_4POINT1 = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT),
+ SPEAKER_5POINT1 = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT),
+ SPEAKER_7POINT1 = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER),
+ SPEAKER_5POINT1_SURROUND = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT),
+ SPEAKER_7POINT1_SURROUND = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT),
+ SPEAKER_XBOX = SPEAKER_5POINT1,
+ }
+
+}
Added: trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_StreamingSoundBuffer.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_StreamingSoundBuffer.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_StreamingSoundBuffer.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -0,0 +1,341 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Threading;
+using System.Text;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using SharpDX.XAudio2;
+using SharpDX.Multimedia;
+
+namespace AgateLib.Platform.WindowsStore.AudioImplementation
+
+{
+ class XAudio2_StreamingSoundBuffer : StreamingSoundBufferImpl
+ {
+ XAudio2_Audio mAudio;
+ Stream mInput;
+ SoundFormat mFormat;
+ SourceVoice mVoice;
+ WaveFormat xaudFormat;
+ BufferData[] buffer;
+ bool mPlaying;
+ int mNextData;
+ double mPan;
+ //BinaryWriter w;
+ bool mIsDisposed;
+ bool mReadingData;
+ int thisBufferIndex;
+
+ int mChunkSize;
+
+ const int bufferCount = 3;
+
+ class BufferData
+ {
+ public AudioBuffer buffer;
+ public MemoryStream ms;
+ public byte[] backing;
+ }
+
+ static int count = 0;
+
+ public XAudio2_StreamingSoundBuffer(XAudio2_Audio audio, Stream input, SoundFormat format)
+ {
+ mAudio = audio;
+ mInput = input;
+ mFormat = format;
+
+ Initialize();
+ }
+
+ #region --- Thread safety ---
+
+ public bool InvokeRequired
+ {
+ get { return mAudio.InvokeRequired; }
+ }
+ public void BeginInvoke(Delegate method, params object[] args)
+ {
+ mAudio.BeginInvoke(method, args);
+ }
+ void Invoke(Delegate method, params object[] args)
+ {
+ mAudio.Invoke(method, args);
+ }
+
+ #endregion
+
+ private void Initialize()
+ {
+ if (InvokeRequired)
+ {
+ Invoke(new DisposeDelegate(Initialize));
+ return;
+ }
+
+ throw new NotImplementedException();
+ /*
+ xaudFormat = new WaveFormat();
+ xaudFormat.BitsPerSample = (short)mFormat.BitsPerSample;
+ xaudFormat.Channels = (short)mFormat.Channels;
+ xaudFormat.BlockAlignment = (short)(mFormat.Channels * mFormat.BitsPerSample / 8);
+ xaudFormat.FormatTag = WaveFormatTag.Pcm;
+ xaudFormat.SamplesPerSecond = mFormat.SamplingFrequency;
+ xaudFormat.AverageBytesPerSecond = xaudFormat.BlockAlignment * xaudFormat.SamplesPerSecond;
+
+ mVoice = new SourceVoice(mAudio.Device, xaudFormat);
+ mVoice.BufferEnd += mVoice_BufferEnd;
+
+ buffer = new BufferData[bufferCount];
+ for (int i = 0; i < bufferCount; i++)
+ {
+ buffer[i] = new BufferData();
+ buffer[i].ms = new MemoryStream();
+ buffer[i].buffer = new AudioBuffer();
+ buffer[i].buffer.Flags = BufferFlags.EndOfStream;
+ }
+
+ thisBufferIndex = count;
+
+ string tempFileName = string.Format("xaudio2_buffer{0}.pcm", count);
+ count++;
+
+ //w = new BinaryWriter(File.Open(tempFileName, FileMode.Create));
+ */
+ Pan = 0;
+ }
+
+ public override void Dispose()
+ {/*
+ if (InvokeRequired)
+ {
+ Invoke(new DisposeDelegate(Dispose));
+ return;
+ }
+
+ while (mReadingData)
+ Thread.Sleep(1);
+
+ mIsDisposed = true;
+
+ mVoice.FlushSourceBuffers();
+ Thread.Sleep(1);
+ mVoice.Stop();
+
+ //w.BaseStream.Dispose();
+
+ try
+ {
+ mVoice.Dispose();
+ }
+ catch (Exception e)
+ {
+ System.Diagnostics.Debug.Print("Caught exception {0}.\n{1}", e.GetType(), e.Message);
+ }
+
+ foreach (var b in buffer)
+ {
+ b.buffer.Dispose();
+ }
+
+
+ System.Diagnostics.Debug.Print("Disposed streaming buffer {0}.", thisBufferIndex);
+ * */
+ }
+
+
+ void mVoice_BufferEnd(IntPtr obj)
+ {
+ if (IsPlaying == false)
+ return;
+
+ ReadAndSubmitNextData();
+ }
+
+ public override void Play()
+ {
+ if (InvokeRequired)
+ {
+ BeginInvoke(new DisposeDelegate(Play));
+ return;
+ }
+
+ mNextData = 0;
+ ReadAndSubmitNextData();
+ ReadAndSubmitNextData();
+
+ mVoice.Start();
+ mPlaying = true;
+ }
+ public override void Stop()
+ {
+ if (InvokeRequired)
+ {
+ BeginInvoke(new DisposeDelegate(Stop));
+ return;
+ }
+
+ mPlaying = false;
+
+ mVoice.Stop();
+ }
+
+ #region --- Reading Data ---
+
+ int bytesRead = 0;
+
+ private void ReadAndSubmitNextData()
+ {
+ if (mIsDisposed)
+ return;
+
+ if (InvokeRequired)
+ {
+ Invoke(new DisposeDelegate(ReadAndSubmitNextData));
+ return;
+ }
+
+ try
+ {
+ mReadingData = true;
+
+ ReadData(buffer[mNextData]);
+ SubmitData(buffer[mNextData]);
+
+ mNextData++;
+
+ if (mNextData >= bufferCount)
+ mNextData = 0;
+ }
+ finally
+ {
+ mReadingData = false;
+ }
+ }
+ private void ReadData(BufferData bufferData)
+ {
+ /*
+ if (bufferData.backing == null)
+ {
+ ResizeBacking();
+ }
+
+ int count = mInput.Read(bufferData.backing, 0, bufferData.backing.Length);
+ bytesRead += count;
+
+ bufferData.ms.Position = 0;
+ bufferData.buffer.AudioData = bufferData.ms;
+ bufferData.buffer.AudioBytes = count;
+
+ //w.Write(bufferData.backing, 0, count);
+ * */
+ }
+
+ private void SubmitData(BufferData bufferData)
+ {/*
+ mVoice.SubmitSourceBuffer(bufferData.buffer);*/
+ }
+
+ #endregion
+
+ public override int ChunkSize
+ {
+ get
+ {
+ return mChunkSize;
+ }
+ set
+ {
+ mChunkSize = value;
+
+ ResizeBacking();
+ }
+ }
+
+ int ChunkByteSize
+ {
+ get
+ {
+ return ChunkSize * xaudFormat.BlockAlign;
+ }
+ }
+ private void ResizeBacking()
+ {
+ if (InvokeRequired)
+ {
+ Invoke(new DisposeDelegate(ResizeBacking));
+ return;
+ }
+
+ for (int i = 0; i < buffer.Length; i++)
+ {
+ buffer[i].backing = new byte[ChunkByteSize];
+ buffer[i].ms = new MemoryStream(buffer[i].backing);
+ }
+ }
+
+ public override bool IsPlaying
+ {
+ get { return mPlaying; }
+ }
+
+ float[] channelVolumes = new float[2];
+ public override double Pan
+ {
+ get { return mPan; }
+ set
+ {
+ mPan = value;
+ ResetChannelVolumes();
+ }
+ }
+
+ private void ResetChannelVolumes()
+ {
+ if (InvokeRequired)
+ {
+ BeginInvoke(new DisposeDelegate(ResetChannelVolumes));
+ return;
+ }
+
+ mVoice.SetChannelVolumes(2, GetChannelVolumes((float)mPan));
+ }
+
+ private float[] GetChannelVolumes(float pan)
+ {
+ if (pan < 0)
+ {
+ channelVolumes[0] = 1;
+ channelVolumes[1] = 1 + pan;
+ }
+ else
+ {
+ channelVolumes[0] = 1 - pan;
+ channelVolumes[1] = 1;
+ }
+
+ return channelVolumes;
+ }
+ }
+}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -42,7 +42,7 @@
DisplayWindow attachedWindow,
SharpDXContext context,
IRenderTargetAdapter renderTarget,
- ICoordinateSystemCreator coords) : base(coords)
+ ICoordinateSystem coords) : base(coords)
{
if (context == null) throw new ArgumentNullException();
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_FrameBuffer.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_FrameBuffer.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_FrameBuffer.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -32,7 +32,7 @@
bool mHasDepth;
bool mHasStencil;
- public SDX_FrameBuffer(ICoordinateSystemCreator coords) : base(coords)
+ public SDX_FrameBuffer(ICoordinateSystem coords) : base(coords)
{
}
Added: trunk/AgateLib.Platform.WindowsStoreCommon/Factories/AudioFactoryDX.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Factories/AudioFactoryDX.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Factories/AudioFactoryDX.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -0,0 +1,60 @@
+using AgateLib.Drivers;
+using AgateLib.AudioLib.ImplementationBase;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using AgateLib.Platform.WindowsStore.AudioImplementation;
+using System.IO;
+using AgateLib.AudioLib;
+
+namespace AgateLib.Platform.WindowsStore.Factories
+{
+ public class AudioFactoryDX : IAudioFactory
+ {
+ XAudio2_Audio mImpl;
+
+ public AudioImpl CreateAudioImpl()
+ {
+ return AudioImpl;
+ }
+
+ public AudioImpl AudioImpl
+ {
+ get
+ {
+ if (mImpl == null)
+ mImpl = new XAudio2_Audio();
+
+ return mImpl;
+ }
+ }
+
+ public SoundBufferImpl CreateSoundBuffer(Stream inStream)
+ {
+ return new XAudio2_SoundBuffer(mImpl, inStream);
+ }
+
+ public MusicImpl CreateMusic(System.IO.Stream musicStream)
+ {
+ return new XAudio2_Music(mImpl, musicStream);
+ }
+ public MusicImpl CreateMusic(string filename)
+ {
+ return new XAudio2_Music(mImpl, filename);
+ }
+ public SoundBufferImpl CreateSoundBuffer(string filename)
+ {
+ return new XAudio2_SoundBuffer(mImpl, filename);
+ }
+ public SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferSession owner, SoundBufferImpl buffer)
+ {
+ return new XAudio2_SoundBufferSession(mImpl, buffer as XAudio2_SoundBuffer);
+ }
+ public StreamingSoundBufferImpl CreateStreamingSoundBuffer(Stream input, SoundFormat format)
+ {
+ return new XAudio2_StreamingSoundBuffer(mImpl, input, format);
+ }
+ }
+}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/Interop.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Interop.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Interop.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -20,5 +20,9 @@
{
return new Geometry.Size((int)size.Width, (int)size.Height);
}
+ public static Geometry.Point ToAgatePoint(this Windows.Foundation.Point pt)
+ {
+ return new Geometry.Point((int)pt.X, (int)pt.Y);
+ }
}
}
Added: trunk/AgateLib.Platform.WindowsStoreCommon/RenderTargetAdapterBase.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/RenderTargetAdapterBase.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/RenderTargetAdapterBase.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -0,0 +1,217 @@
+using AgateLib.Geometry;
+using AgateLib.InputLib;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Windows.System;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+
+namespace AgateLib.Platform.WindowsStore
+{
+ public abstract class RenderTargetAdapterBase : IRenderTargetAdapter
+ {
+ static Dictionary<VirtualKey, KeyCode> mKeyMap = new Dictionary<VirtualKey, KeyCode>();
+
+ static RenderTargetAdapterBase()
+ {
+ mKeyMap.Add(VirtualKey.A, KeyCode.A);
+ mKeyMap.Add(VirtualKey.B, KeyCode.B);
+ }
+
+ Size mSize;
+
+ protected abstract Grid RenderTargetControl { get; }
+
+ public DisplayLib.DisplayWindow Owner { get; set; }
+
+ public Geometry.Size Size
+ {
+ get { return mSize; }
+ private set { mSize = value; }
+ }
+
+ public event EventHandler Disposed;
+ public abstract void BindContextToRenderTarget(SharpDX.SimpleInitializer.SharpDXContext context);
+
+ public void DetachEvents()
+ {
+ }
+ public void AttachEvents()
+ {
+ Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown;
+ RenderTargetControl.SizeChanged += mRenderTarget_SizeChanged;
+
+ RenderTargetControl.PointerWheelChanged += mRenderTarget_PointerWheelChanged;
+ RenderTargetControl.PointerMoved += mRenderTarget_PointerMoved;
+ RenderTargetControl.PointerPressed += mRenderTarget_PointerPressed;
+ RenderTargetControl.PointerReleased += mRenderTarget_PointerReleased;
+
+ RenderTargetControl.KeyDown += mRenderTarget_KeyDown;
+ RenderTargetControl.KeyUp += mRenderTarget_KeyUp;
+
+ RenderTargetControl.Unloaded += renderTarget_Unloaded;
+ }
+
+ void CoreWindow_KeyDown(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.KeyEventArgs args)
+ {
+ Input.QueueInputEvent(AgateInputEventArgs.KeyDown(
+ TransformKey(args.VirtualKey),
+ GetKeyModifiers()));
+ }
+
+ void renderTarget_Unloaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ OnDisposed();
+ }
+
+ private void OnDisposed()
+ {
+ if (Disposed != null)
+ Disposed(this, EventArgs.Empty);
+ }
+
+ void mRenderTarget_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
+ {
+ Input.QueueInputEvent(AgateInputEventArgs.KeyUp(
+ TransformKey(e.Key),
+ GetKeyModifiers()));
+ }
+
+ private KeyModifiers GetKeyModifiers()
+ {
+ return new KeyModifiers(false, false, false);
+ }
+
+ private KeyCode TransformKey(Windows.System.VirtualKey virtualKey)
+ {
+ if (mKeyMap.ContainsKey(virtualKey))
+ return mKeyMap[virtualKey];
+ else
+ {
+ System.Diagnostics.Debug.WriteLine("Could not find key map for {0}", virtualKey);
+ return KeyCode.None;
+ }
+ }
+
+ void mRenderTarget_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
+ {
+ Input.QueueInputEvent(AgateInputEventArgs.KeyDown(
+ TransformKey(e.Key),
+ GetKeyModifiers()));
+ }
+
+ void mRenderTarget_PointerReleased(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
+ {
+ }
+
+ void mRenderTarget_PointerPressed(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
+ {
+ Input.QueueInputEvent(AgateInputEventArgs.MouseDown(Owner,
+ e.GetCurrentPoint(RenderTargetControl).Position.ToAgatePoint(), MouseButton.Primary));
+
+ }
+
+ void mRenderTarget_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
+ {
+ }
+
+ void mRenderTarget_PointerWheelChanged(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
+ {
+ }
+ void mRenderTarget_SizeChanged(object sender, Windows.UI.Xaml.SizeChangedEventArgs e)
+ {
+ mSize = e.NewSize.ToAgateSize();
+ }
+
+
+ // private void DetachEvents()
+ // {
+ // if (mRenderTarget == null)
+ // return;
+
+ // throw new NotImplementedException();
+ // }
+
+ // private void AttachEvents()
+ // {
+ // mRenderTarget.SizeChanged += mRenderTarget_SizeChanged;
+
+ // mRenderTarget.MouseWheel += mRenderTarget_MouseWheel;
+ // mRenderTarget.MouseMove += mRenderTarget_MouseMove;
+ // mRenderTarget.MouseLeftButtonDown += mRenderTarget_MouseLeftButtonDown;
+ // mRenderTarget.MouseLeftButtonUp += mRenderTarget_MouseLeftButtonUp;
+ // mRenderTarget.DoubleTap += mRenderTarget_DoubleTap;
+
+ // mRenderTarget.KeyDown += mRenderTarget_KeyDown;
+ // mRenderTarget.KeyUp += mRenderTarget_KeyUp;
+ // }
+
+ // void mRenderTarget_KeyUp(object sender, KeyEventArgs e)
+ // {
+ // //Input.QueueInputEvent(AgateInputEventArgs.KeyUp(
+ // // TransformKey(e.Key), e))
+ // //Keyboard.Keys[FormUtil.TransformWinFormsKey(e.KeyCode)] = false;
+ // }
+
+ // void mRenderTarget_KeyDown(object sender, KeyEventArgs e)
+ // {
+ // //Keyboard.Keys[FormUtil.TransformWinFormsKey(e.KeyCode)] = true;
+ // }
+
+ // void mRenderTarget_DoubleTap(object sender, GestureEventArgs e)
+ // {
+ // Mouse.OnMouseDoubleClick(MouseButton.Primary);
+ // }
+
+ // void mRenderTarget_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ // {
+ // Debug.WriteLine("Mouse down at: {0}", e.GetPosition(mRenderTarget));
+ // Input.QueueInputEvent(AgateInputEventArgs.MouseDown(
+ // this, e.GetPosition(mRenderTarget).ToAgatePoint(), MouseButton.Primary));
+ // }
+ // void mRenderTarget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+ // {
+ // Input.QueueInputEvent(AgateInputEventArgs.MouseUp(
+ // this, e.GetPosition(mRenderTarget).ToAgatePoint(), MouseButton.Primary));
+ // }
+ // void mRenderTarget_MouseMove(object sender, MouseEventArgs e)
+ // {
+ // Input.QueueInputEvent(AgateInputEventArgs.MouseMove(
+ // this, e.GetPosition(mRenderTarget).ToAgatePoint()));
+ // }
+
+
+ // void mRenderTarget_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e)
+ // {
+ // mFrameBuffer.SetSize(Size);
+ // }
+
+ // void mRenderTarget_MouseWheel(object sender, MouseWheelEventArgs e)
+ // {
+ // Mouse.OnMouseWheel(-(e.Delta * 100) / 120);
+ // }
+
+
+ // public DisplayLib.DisplayWindow Owner
+ // {
+ // get { throw new NotImplementedException(); }
+ // }
+
+
+ // public void AttachEvents()
+ // {
+ // throw new NotImplementedException();
+ // }
+
+ // public void DetachEvents()
+ // {
+ // throw new NotImplementedException();
+ // }
+
+ // public event EventHandler Disposed;
+
+ }
+}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -8,174 +8,25 @@
namespace AgateLib.Platform.WindowsStore
{
- public class SwapChainBackgroundPanelAdapter : IRenderTargetAdapter
+ public class SwapChainBackgroundPanelAdapter : RenderTargetAdapterBase
{
SwapChainBackgroundPanel mRenderTarget;
public SwapChainBackgroundPanelAdapter(SwapChainBackgroundPanel renderTarget)
{
mRenderTarget = renderTarget;
- renderTarget.Unloaded += renderTarget_Unloaded;
+ AttachEvents();
}
- void renderTarget_Unloaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
- {
- OnDisposed();
- }
-
- private void OnDisposed()
- {
- if (Disposed != null)
- Disposed(this, EventArgs.Empty);
- }
-
public SwapChainBackgroundPanel RenderTarget { get { return mRenderTarget; } }
- public DisplayLib.DisplayWindow Owner { get; set; }
-
- public event EventHandler Disposed;
-
- public Geometry.Size Size
+ protected override Grid RenderTargetControl
{
- get { return mRenderTarget.RenderSize.ToAgateSize(); }
+ get { return RenderTarget; }
}
- public void DetachEvents()
+ public override void BindContextToRenderTarget(SharpDXContext context)
{
- throw new NotImplementedException();
- }
-
-
-
- public void AttachEvents()
- {
- mRenderTarget.SizeChanged += mRenderTarget_SizeChanged;
-
- mRenderTarget.PointerWheelChanged += mRenderTarget_PointerWheelChanged;
- mRenderTarget.PointerMoved += mRenderTarget_PointerMoved;
- mRenderTarget.PointerPressed += mRenderTarget_PointerPressed;
- mRenderTarget.PointerReleased += mRenderTarget_PointerReleased;
-
- mRenderTarget.KeyDown += mRenderTarget_KeyDown;
- mRenderTarget.KeyUp += mRenderTarget_KeyUp;
- }
-
- void mRenderTarget_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
- {
- }
- void mRenderTarget_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
- {
- }
-
- void mRenderTarget_PointerReleased(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
- {
- }
-
- void mRenderTarget_PointerPressed(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
- {
- }
-
- void mRenderTarget_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
- {
- }
-
- void mRenderTarget_PointerWheelChanged(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
- {
- }
- void mRenderTarget_SizeChanged(object sender, Windows.UI.Xaml.SizeChangedEventArgs e)
- {
- }
-
- // private void DetachEvents()
- // {
- // if (mRenderTarget == null)
- // return;
-
- // throw new NotImplementedException();
- // }
-
- // private void AttachEvents()
- // {
- // mRenderTarget.SizeChanged += mRenderTarget_SizeChanged;
-
- // mRenderTarget.MouseWheel += mRenderTarget_MouseWheel;
- // mRenderTarget.MouseMove += mRenderTarget_MouseMove;
- // mRenderTarget.MouseLeftButtonDown += mRenderTarget_MouseLeftButtonDown;
- // mRenderTarget.MouseLeftButtonUp += mRenderTarget_MouseLeftButtonUp;
- // mRenderTarget.DoubleTap += mRenderTarget_DoubleTap;
-
- // mRenderTarget.KeyDown += mRenderTarget_KeyDown;
- // mRenderTarget.KeyUp += mRenderTarget_KeyUp;
- // }
-
- // void mRenderTarget_KeyUp(object sender, KeyEventArgs e)
- // {
- // //Input.QueueInputEvent(AgateInputEventArgs.KeyUp(
- // // TransformKey(e.Key), e))
- // //Keyboard.Keys[FormUtil.TransformWinFormsKey(e.KeyCode)] = false;
- // }
-
- // void mRenderTarget_KeyDown(object sender, KeyEventArgs e)
- // {
- // //Keyboard.Keys[FormUtil.TransformWinFormsKey(e.KeyCode)] = true;
- // }
-
- // void mRenderTarget_DoubleTap(object sender, GestureEventArgs e)
- // {
- // Mouse.OnMouseDoubleClick(MouseButton.Primary);
- // }
-
- // void mRenderTarget_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- // {
- // Debug.WriteLine("Mouse down at: {0}", e.GetPosition(mRenderTarget));
- // Input.QueueInputEvent(AgateInputEventArgs.MouseDown(
- // this, e.GetPosition(mRenderTarget).ToAgatePoint(), MouseButton.Primary));
- // }
- // void mRenderTarget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
- // {
- // Input.QueueInputEvent(AgateInputEventArgs.MouseUp(
- // this, e.GetPosition(mRenderTarget).ToAgatePoint(), MouseButton.Primary));
- // }
- // void mRenderTarget_MouseMove(object sender, MouseEventArgs e)
- // {
- // Input.QueueInputEvent(AgateInputEventArgs.MouseMove(
- // this, e.GetPosition(mRenderTarget).ToAgatePoint()));
- // }
-
-
- // void mRenderTarget_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e)
- // {
- // mFrameBuffer.SetSize(Size);
- // }
-
- // void mRenderTarget_MouseWheel(object sender, MouseWheelEventArgs e)
- // {
- // Mouse.OnMouseWheel(-(e.Delta * 100) / 120);
- // }
-
-
- // public DisplayLib.DisplayWindow Owner
- // {
- // get { throw new NotImplementedException(); }
- // }
-
-
- // public void AttachEvents()
- // {
- // throw new NotImplementedException();
- // }
-
- // public void DetachEvents()
- // {
- // throw new NotImplementedException();
- // }
-
- // public event EventHandler Disposed;
-
-
-
- public void BindContextToRenderTarget(SharpDXContext context)
- {
context.BindToControl(mRenderTarget);
}
}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs 2014-09-04 05:08:38 UTC (rev 1511)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs 2014-09-04 05:21:16 UTC (rev 1512)
@@ -1,4 +1,5 @@
using AgateLib.Geometry;
+using AgateLib.InputLib;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -8,10 +9,9 @@
namespace AgateLib.Platform.WindowsStore
{
- public class SwapChainPanelAdapter : IRenderTargetAdapter
+ public class SwapChainPanelAdapter : RenderTargetAdapterBase
{
SwapChainPanel mRenderTarget;
- Size mSize;
static int count = 0;
int id = 0;
@@ -27,166 +27,16 @@
public SwapChainPanel RenderTarget { get { return mRenderTarget; } }
- public DisplayLib.DisplayWindow Owner { get; set; }
-
- public event EventHandler Disposed;
-
- public Geometry.Size Size
+ protected override Grid RenderTargetControl
{
- get { return mSize; }
- private set { mSize = value; }
+ get { return RenderTarget; }
}
- public void DetachEvents()
- {
- throw new NotImplementedException();
- }
- public void AttachEvents()
+ public override void BindContextToRenderTarget(SharpDX.SimpleInitializer.SharpDXContext context)
{
- mRenderTarget.SizeChanged += mRenderTarget_SizeChanged;
-
- mRenderTarget.PointerWheelChanged += mRenderTarget_PointerWheelChanged;
- mRenderTarget.PointerMoved += mRenderTarget_PointerMoved;
- mRenderTarget.PointerPressed += mRenderTarget_PointerPressed;
- mRenderTarget.PointerReleased += mRenderTarget_PointerReleased;
-
- mRenderTarget.KeyDown += mRenderTarget_KeyDown;
- mRenderTarget.KeyUp += mRenderTarget_KeyUp;
-
- mRenderTarget.Unloaded += renderTarget_Unloaded;
- }
-
- void renderTarget_Unloaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
- {
- OnDisposed();
- }
-
- private void OnDisposed()
- {
- if (Disposed != null)
- Disposed(this, EventArgs.Empty);
- }
-
- void mRenderTarget_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
- {
- }
- void mRenderTarget_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
- {
- }
-
- void mRenderTarget_PointerReleased(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
- {
- }
-
- void mRenderTarget_PointerPressed(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
- {
- }
-
- void mRenderTarget_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
- {
- }
-
- void mRenderTarget_PointerWheelChanged(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
- {
- }
- void mRenderTarget_SizeChanged(object sender, Windows.UI.Xaml.SizeChangedEventArgs e)
- {
- mSize = e.NewSize.ToAgateSize();
- }
-
- // private void DetachEvents()
- // {
- // if (mRenderTarget == null)
- // return;
-
...
[truncated message content] |
|
From: <ka...@us...> - 2014-09-04 05:08:43
|
Revision: 1511
http://sourceforge.net/p/agate/code/1511
Author: kanato
Date: 2014-09-04 05:08:38 +0000 (Thu, 04 Sep 2014)
Log Message:
-----------
Implement streaming sound buffer for SDL.
Modified Paths:
--------------
trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/AudioLib/Music.cs
trunk/AgateLib/AudioLib/SoundBuffer.cs
trunk/AgateLib/AudioLib/SoundBufferSession.cs
trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/Drivers/IAudioFactory.cs
trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs
trunk/AgateLib/Drivers/NullDrivers/NullSoundImpl.cs
trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj
trunk/AgateLib.AgateSDL/Audio/SDL_Audio.cs
trunk/AgateLib.AgateSDL/Sdl2/ISDLMixer.cs
trunk/AgateLib.AgateSDL/Sdl2/SDL32.cs
trunk/AgateLib.AgateSDL/Sdl2/SDL64.cs
trunk/AgateLib.AgateSDL/Sdl2/SDLConstants.cs
trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
Added Paths:
-----------
trunk/AgateLib.AgateSDL/Audio/SDL_StreamingSoundBuffer.cs
trunk/AgateLib.AgateSDL/SdlFactory.cs
Removed Paths:
-------------
trunk/AgateLib.Platform.WinForms/Factories/SdlFactory.cs
Modified: trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -30,51 +30,8 @@
/// </summary>
public abstract class AudioImpl : DriverImplBase
{
- /// <summary>
- /// Creates a SoundBufferImpl object.
- /// </summary>
- /// <param name="filename"></param>
- /// <returns></returns>
- public abstract SoundBufferImpl CreateSoundBuffer(string filename);
/// <summary>
- /// Creates a MusicImpl object.
- /// </summary>
- /// <param name="filename"></param>
- /// <returns></returns>
- public abstract MusicImpl CreateMusic(string filename);
-
- /// <summary>
- /// Creates a MusicImpl object.
- /// </summary>
- /// <param name="musicStream"></param>
- /// <returns></returns>
- public abstract MusicImpl CreateMusic(Stream musicStream);
- /// <summary>
- /// Creates a SoundBufferSessionImpl object.
- /// </summary>
- /// <param name="buffer"></param>
- /// <returns></returns>
- public abstract SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer);
- /// <summary>
- /// Creates a SoundBufferImpl object.
- /// </summary>
- /// <param name="inStream"></param>
- /// <returns></returns>
- public abstract SoundBufferImpl CreateSoundBuffer(Stream inStream);
-
- /// <summary>
- /// Creates a streaming sound buffer.
- /// </summary>
- /// <param name="input"></param>
- /// <param name="format"></param>
- /// <returns></returns>
- public virtual StreamingSoundBufferImpl CreateStreamingSoundBuffer(Stream input, SoundFormat format)
- {
- throw new NotSupportedException();
- }
-
- /// <summary>
/// This function is called once a frame to allow the Audio driver to update
/// information. There is no need to call base.Update() if overriding this
/// function.
Modified: trunk/AgateLib/AudioLib/Music.cs
===================================================================
--- trunk/AgateLib/AudioLib/Music.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/AudioLib/Music.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -45,7 +45,7 @@
/// <param name="filename">The name of the file to load.</param>
public Music(string filename)
{
- impl = Audio.Impl.CreateMusic(filename);
+ impl = Core.Factory.AudioFactory.CreateMusic(filename);
mFilename = filename;
}
@@ -56,7 +56,7 @@
public Music(Stream source)
: this()
{
- impl = Audio.Impl.CreateMusic(source);
+ impl = Core.Factory.AudioFactory.CreateMusic(source);
}
/// <summary>
Modified: trunk/AgateLib/AudioLib/SoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBuffer.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/AudioLib/SoundBuffer.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -65,7 +65,7 @@
/// <param name="filename"></param>
public SoundBuffer(string filename)
{
- mImpl = Audio.Impl.CreateSoundBuffer(filename);
+ mImpl = Core.Factory.AudioFactory.CreateSoundBuffer(filename);
mFilename = filename;
}
@@ -76,7 +76,7 @@
/// <param name="source"></param>
public SoundBuffer(Stream source)
{
- mImpl = Audio.Impl.CreateSoundBuffer(source);
+ mImpl = Core.Factory.AudioFactory.CreateSoundBuffer(source);
}
/// <summary>
Modified: trunk/AgateLib/AudioLib/SoundBufferSession.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBufferSession.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/AudioLib/SoundBufferSession.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -44,7 +44,7 @@
{ }
internal SoundBufferSession(SoundBuffer source)
{
- impl = Audio.Impl.CreateSoundBufferSession(source.Impl);
+ impl = Core.Factory.AudioFactory.CreateSoundBufferSession(source.Impl);
mSource = source;
//mSource.StopEvent += new Audio.AudioCoreEventDelegate(Stop);
Modified: trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -42,7 +42,7 @@
/// new data is required.</param>
public StreamingSoundBuffer(Stream input, SoundFormat format, int chunkSize)
{
- impl = Audio.Impl.CreateStreamingSoundBuffer(input, format);
+ impl = Core.Factory.AudioFactory.CreateStreamingSoundBuffer(input, format);
stream = input;
ChunkSize = chunkSize;
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/Core.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -333,7 +333,7 @@
FileSystem.Path = factory.PlatformFactory.CreatePath();
Display.Initialize(factory.DisplayFactory.DisplayImpl);
- Audio.Initialize(factory.AudioFactory.CreateAudioImpl());
+ Audio.Initialize(factory.AudioFactory.AudioImpl);
JoystickInput.Initialize(factory.InputFactory.CreateJoystickInputImpl());
InitializeDefaultResources();
Modified: trunk/AgateLib/Drivers/IAudioFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IAudioFactory.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/Drivers/IAudioFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -1,4 +1,6 @@
-// The contents of this file are subject to the Mozilla Public License
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
@@ -18,6 +20,7 @@
//
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -26,6 +29,50 @@
{
public interface IAudioFactory
{
- AudioLib.ImplementationBase.AudioImpl CreateAudioImpl();
+ /// <summary>
+ /// Gets the audio system implementation object.
+ /// </summary>
+ AudioImpl AudioImpl { get; }
+
+ /// <summary>
+ /// Creates a SoundBufferImpl object.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ SoundBufferImpl CreateSoundBuffer(string filename);
+
+ /// <summary>
+ /// Creates a MusicImpl object.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ MusicImpl CreateMusic(string filename);
+
+ /// <summary>
+ /// Creates a MusicImpl object.
+ /// </summary>
+ /// <param name="musicStream"></param>
+ /// <returns></returns>
+ MusicImpl CreateMusic(Stream musicStream);
+ /// <summary>
+ /// Creates a SoundBufferSessionImpl object.
+ /// </summary>
+ /// <param name="buffer"></param>
+ /// <returns></returns>
+ SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer);
+ /// <summary>
+ /// Creates a SoundBufferImpl object.
+ /// </summary>
+ /// <param name="inStream"></param>
+ /// <returns></returns>
+ SoundBufferImpl CreateSoundBuffer(Stream inStream);
+
+ /// <summary>
+ /// Creates a streaming sound buffer.
+ /// </summary>
+ /// <param name="input"></param>
+ /// <param name="format"></param>
+ /// <returns></returns>
+ StreamingSoundBufferImpl CreateStreamingSoundBuffer(Stream input, SoundFormat format);
}
}
Modified: trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -1,4 +1,5 @@
-// The contents of this file are subject to the Mozilla Public License
+using AgateLib.AudioLib.ImplementationBase;
+// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
@@ -25,9 +26,37 @@
{
public class NullSoundFactory : IAudioFactory
{
- public AudioLib.ImplementationBase.AudioImpl CreateAudioImpl()
+ public NullSoundFactory()
{
- return new NullSoundImpl();
+ AudioImpl = new NullSoundImpl();
}
+
+ public AudioImpl AudioImpl { get;private set;}
+
+ public SoundBufferImpl CreateSoundBuffer(string filename)
+ {
+ return new NullSoundBufferImpl();
+ }
+ public SoundBufferImpl CreateSoundBuffer(System.IO.Stream inStream)
+ {
+ return new NullSoundBufferImpl();
+ }
+ public MusicImpl CreateMusic(string filename)
+ {
+ return new NullMusicImpl();
+ }
+ public SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
+ {
+ return new NullSoundBufferSessionImpl();
+ }
+ public MusicImpl CreateMusic(System.IO.Stream musicStream)
+ {
+ return new NullMusicImpl();
+ }
+
+ public StreamingSoundBufferImpl CreateStreamingSoundBuffer(System.IO.Stream input, AudioLib.SoundFormat format)
+ {
+ throw new NotImplementedException();
+ }
}
}
Modified: trunk/AgateLib/Drivers/NullDrivers/NullSoundImpl.cs
===================================================================
--- trunk/AgateLib/Drivers/NullDrivers/NullSoundImpl.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib/Drivers/NullDrivers/NullSoundImpl.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -27,152 +27,155 @@
{
public class NullSoundImpl : AudioImpl
{
- class NullSoundBufferImpl : SoundBufferImpl
+ public override void Initialize()
{
- public override void Dispose()
- {
+ Report("No audio driver found. Audio will not be heard.");
+ }
- }
- public override double Volume
- {
- get
- {
- return 0;
- }
- set
- {
+ public override void Dispose()
+ {
+ }
- }
- }
+ protected internal override bool CapsBool(AgateLib.AudioLib.AudioBoolCaps audioBoolCaps)
+ {
+ return false;
+ }
+ }
+ class NullSoundBufferImpl : SoundBufferImpl
+ {
+ public override void Dispose()
+ {
}
- public class NullSoundBufferSessionImpl : SoundBufferSessionImpl
+ public override double Volume
{
- public override void Dispose()
+ get
{
+ return 0;
}
- public override void Play()
+ set
{
+
}
- public override void Stop()
+ }
+
+ }
+ public class NullSoundBufferSessionImpl : SoundBufferSessionImpl
+ {
+ public override void Dispose()
+ {
+ }
+ public override void Play()
+ {
+ }
+ public override void Stop()
+ {
+ }
+ public override double Volume
+ {
+ get
{
+ return 0;
}
- public override double Volume
+ set
{
- get
- {
- return 0;
- }
- set
- {
- }
}
- public override double Pan
+ }
+ public override double Pan
+ {
+ get
{
- get
- {
- return 0;
- }
- set
- {
-
- }
+ return 0;
}
- public override bool IsPlaying
+ set
{
- get { return false; }
- }
- public override int CurrentLocation
- {
- get { return 0; }
}
+ }
+ public override bool IsPlaying
+ {
+ get { return false; }
+ }
- protected internal override void Initialize()
- {
- }
+ public override int CurrentLocation
+ {
+ get { return 0; }
+ }
- public override bool IsPaused { get; set; }
+ protected internal override void Initialize()
+ {
}
- public class NullMusicImpl : MusicImpl
+
+ public override bool IsPaused { get; set; }
+ }
+
+ public class NullMusicImpl : MusicImpl
+ {
+ protected override void OnSetLoop(bool value)
{
- protected override void OnSetLoop(bool value)
- {
- }
- public override void Dispose()
- {
+ }
+ public override void Dispose()
+ {
- }
- public override void Play()
+ }
+ public override void Play()
+ {
+
+ }
+ public override void Stop()
+ {
+
+ }
+ public override double Volume
+ {
+ get
{
-
+ return 0;
}
- public override void Stop()
+ set
{
}
- public override double Volume
+ }
+ public override double Pan
+ {
+ get
{
- get
- {
- return 0;
- }
- set
- {
-
- }
+ return 0;
}
- public override double Pan
+ set
{
- get
- {
- return 0;
- }
- set
- {
- }
}
- public override bool IsPlaying
- {
- get { return false; }
- }
}
- public override void Initialize()
+ public override bool IsPlaying
{
- Report("No audio driver found. Audio will not be heard.");
+ get { return false; }
}
+ }
- public override void Dispose()
+ public class NullStreamingSoundBuffer : StreamingSoundBufferImpl
+ {
+ public override void Play()
{
}
- public override SoundBufferImpl CreateSoundBuffer(string filename)
+ public override void Stop()
{
- return new NullSoundBufferImpl();
}
- public override SoundBufferImpl CreateSoundBuffer(System.IO.Stream inStream)
+
+ public override int ChunkSize { get;set;}
+ public override bool IsPlaying
{
- return new NullSoundBufferImpl();
+ get { return false; }
}
- public override MusicImpl CreateMusic(string filename)
+
+ public override void Dispose()
{
- return new NullMusicImpl();
}
- public override SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
- {
- return new NullSoundBufferSessionImpl();
- }
- public override MusicImpl CreateMusic(System.IO.Stream musicStream)
- {
- return new NullMusicImpl();
- }
- protected internal override bool CapsBool(AgateLib.AudioLib.AudioBoolCaps audioBoolCaps)
- {
- return false;
- }
+ public override double Pan { get;set;}
}
}
Modified: trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj
===================================================================
--- trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj 2014-09-04 05:08:38 UTC (rev 1511)
@@ -89,6 +89,7 @@
<Compile Include="Audio\SDL_Music.cs" />
<Compile Include="Audio\SDL_SoundBuffer.cs" />
<Compile Include="Audio\SDL_SoundBufferSession.cs" />
+ <Compile Include="Audio\SDL_StreamingSoundBuffer.cs" />
<Compile Include="Input\Joysitck_SDL.cs" />
<Compile Include="Input\SDL_Input.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -108,6 +109,7 @@
<Compile Include="Sdl2\ThirtyTwo\SDL2_image.cs" />
<Compile Include="Sdl2\ThirtyTwo\SDL2_mixer.cs" />
<Compile Include="Sdl2\ThirtyTwo\SDL2_ttf.cs" />
+ <Compile Include="SdlFactory.cs" />
</ItemGroup>
<ItemGroup>
<None Include="AgateLib.AgateSDL.dll.config" />
Modified: trunk/AgateLib.AgateSDL/Audio/SDL_Audio.cs
===================================================================
--- trunk/AgateLib.AgateSDL/Audio/SDL_Audio.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.AgateSDL/Audio/SDL_Audio.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -36,8 +36,6 @@
public SDL_Audio()
{
- sdl = SdlFactory.CreateSDL();
-
FileProvider = AgateLib.IO.FileProvider.SoundAssets;
}
public SDL_Audio(IReadFileProvider fileProvider)
@@ -86,38 +84,16 @@
}
}
- public override MusicImpl CreateMusic(string filename)
+ public override void Initialize()
{
- return new SDL_Music(this, filename);
- }
- public override MusicImpl CreateMusic(System.IO.Stream musicStream)
- {
- return new SDL_Music(this, musicStream);
- }
+ sdl = SdlFactory.CreateSDL();
- public override SoundBufferImpl CreateSoundBuffer(string filename)
- {
- return new SDL_SoundBuffer(filename);
- }
- public override SoundBufferImpl CreateSoundBuffer(System.IO.Stream inStream)
- {
- return new SDL_SoundBuffer(inStream);
- }
- public override SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
- {
- return new SDL_SoundBufferSession((SDL_SoundBuffer)buffer);
- }
-
-
- public override void Initialize()
- {
if (sdl.SDL_InitSubSystem(SDLConstants.SDL_INIT_AUDIO) != 0)
{
throw new AgateLib.AgateException("Failed to initialize SDL for audio playback.");
}
- if (sdl.Mixer.Mix_OpenAudio(
- SDLConstants.MIX_DEFAULT_FREQUENCY, SDLConstants.AUDIO_S16, 2, 512) != 0)
+ if (sdl.Mixer.Mix_OpenAudio(44100, SDLConstants.AUDIO_S16, 2, 512) != 0)
{
throw new AgateLib.AgateException("Failed to initialize SDL_mixer.");
}
@@ -146,5 +122,15 @@
{
mChannels[channel] = session;
}
+
+ public override void Update()
+ {
+ base.Update();
+
+ if (UpdateCalled != null)
+ UpdateCalled(this, EventArgs.Empty);
+ }
+
+ public event EventHandler UpdateCalled;
}
}
Added: trunk/AgateLib.AgateSDL/Audio/SDL_StreamingSoundBuffer.cs
===================================================================
--- trunk/AgateLib.AgateSDL/Audio/SDL_StreamingSoundBuffer.cs (rev 0)
+++ trunk/AgateLib.AgateSDL/Audio/SDL_StreamingSoundBuffer.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -0,0 +1,75 @@
+using AgateLib.AgateSDL.Sdl2;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.AgateSDL.Audio
+{
+ class SDL_StreamingSoundBuffer : StreamingSoundBufferImpl
+ {
+ SDL_Audio mAudio;
+ ISDL mSdl;
+
+ Stream mInput;
+ SoundFormat mFormat;
+ bool mIsPlaying;
+
+ public SDL_StreamingSoundBuffer(SDL_Audio audio, Stream input, SoundFormat format)
+ {
+ mAudio = audio;
+ mInput = input;
+ mFormat = format;
+ mSdl = SdlFactory.CreateSDL();
+
+ mSdl.Mixer.Mix_HookMusic(MixFunction, IntPtr.Zero);
+ Play();
+ ChunkSize = 2048;
+ }
+ public override void Dispose()
+ {
+ mSdl.Mixer.Mix_HookMusic(null, IntPtr.Zero);
+ }
+
+ public override void Play()
+ {
+ mIsPlaying = true;
+ }
+
+ public override void Stop()
+ {
+ mIsPlaying = false;
+ }
+
+
+ byte[] buffer = new byte[100];
+
+ void MixFunction(IntPtr udata, IntPtr stream, int len)
+ {
+ if (buffer.Length < len)
+ buffer = new byte[len];
+
+ if (IsPlaying)
+ mInput.Read(buffer, 0, len);
+ else
+ Array.Clear(buffer, 0, len);
+
+ Marshal.Copy(buffer, 0, stream, len);
+ }
+
+ public override int ChunkSize { get; set; }
+
+ public override bool IsPlaying
+ {
+ get { return mIsPlaying; }
+ }
+
+ public override double Pan { get; set; }
+
+ }
+}
Modified: trunk/AgateLib.AgateSDL/Sdl2/ISDLMixer.cs
===================================================================
--- trunk/AgateLib.AgateSDL/Sdl2/ISDLMixer.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.AgateSDL/Sdl2/ISDLMixer.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -51,5 +51,7 @@
void Mix_Pause(int channel);
string GetError();
+
+ void Mix_HookMusic(SDL_mixer_MixFuncDelegate mix_func, IntPtr arg);
}
}
Modified: trunk/AgateLib.AgateSDL/Sdl2/SDL32.cs
===================================================================
--- trunk/AgateLib.AgateSDL/Sdl2/SDL32.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.AgateSDL/Sdl2/SDL32.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -245,5 +245,20 @@
{
return SDL.SDL_GetError();
}
+
+
+ SDL_mixer.MixFuncDelegate mixFuncStorage;
+ public void Mix_HookMusic(SDL_mixer_MixFuncDelegate mix_func, IntPtr arg)
+ {
+ if (mix_func != null)
+ {
+ mixFuncStorage = new SDL_mixer.MixFuncDelegate(mix_func);
+ SDL_mixer.Mix_HookMusic(mixFuncStorage, arg);
+ }
+ else
+ {
+ SDL_mixer.Mix_HookMusic(null, arg);
+ }
+ }
}
}
Modified: trunk/AgateLib.AgateSDL/Sdl2/SDL64.cs
===================================================================
--- trunk/AgateLib.AgateSDL/Sdl2/SDL64.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.AgateSDL/Sdl2/SDL64.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -234,5 +234,19 @@
{
return SDL.SDL_GetError();
}
+
+ SDL_mixer.MixFuncDelegate mixFuncStorage;
+ public void Mix_HookMusic(SDL_mixer_MixFuncDelegate mix_func, IntPtr arg)
+ {
+ if (mix_func != null)
+ {
+ mixFuncStorage = new SDL_mixer.MixFuncDelegate(mix_func);
+ SDL_mixer.Mix_HookMusic(mixFuncStorage, arg);
+ }
+ else
+ {
+ SDL_mixer.Mix_HookMusic(null, arg);
+ }
+ }
}
}
Modified: trunk/AgateLib.AgateSDL/Sdl2/SDLConstants.cs
===================================================================
--- trunk/AgateLib.AgateSDL/Sdl2/SDLConstants.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.AgateSDL/Sdl2/SDLConstants.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -1,12 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace AgateLib.AgateSDL.Sdl2
{
- class SDLConstants
+ static class SDLConstants
{
public const uint SDL_INIT_TIMER = 0x00000001;
public const uint SDL_INIT_AUDIO = 0x00000010;
@@ -73,4 +74,11 @@
public const byte SDL_HAT_LEFTUP = SDL_HAT_LEFT | SDL_HAT_UP;
public const byte SDL_HAT_LEFTDOWN = SDL_HAT_LEFT | SDL_HAT_DOWN;
}
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate void SDL_mixer_MixFuncDelegate(
+ IntPtr udata, // void*
+ IntPtr stream, // Uint8*
+ int len
+ );
}
Copied: trunk/AgateLib.AgateSDL/SdlFactory.cs (from rev 1510, trunk/AgateLib.Platform.WinForms/Factories/SdlFactory.cs)
===================================================================
--- trunk/AgateLib.AgateSDL/SdlFactory.cs (rev 0)
+++ trunk/AgateLib.AgateSDL/SdlFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -0,0 +1,67 @@
+using AgateLib.AgateSDL.Audio;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using AgateLib.Drivers.NullDrivers;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.AgateSDL
+{
+ class AgateSdlFactory : IAudioFactory, IInputFactory
+ {
+ #region --- Audio Factory ---
+
+ SDL_Audio mAudioImpl;
+
+
+ public AudioImpl AudioImpl
+ {
+ get
+ {
+ if (mAudioImpl == null)
+ mAudioImpl = new SDL_Audio();
+ return mAudioImpl;
+ }
+ }
+
+ public MusicImpl CreateMusic(string filename)
+ {
+ return new SDL_Music(mAudioImpl, filename);
+ }
+ public MusicImpl CreateMusic(System.IO.Stream musicStream)
+ {
+ return new SDL_Music(mAudioImpl, musicStream);
+ }
+
+ public SoundBufferImpl CreateSoundBuffer(string filename)
+ {
+ return new SDL_SoundBuffer(filename);
+ }
+ public SoundBufferImpl CreateSoundBuffer(System.IO.Stream inStream)
+ {
+ return new SDL_SoundBuffer(inStream);
+ }
+ public SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
+ {
+ return new SDL_SoundBufferSession((SDL_SoundBuffer)buffer);
+ }
+ public StreamingSoundBufferImpl CreateStreamingSoundBuffer(Stream input, SoundFormat format)
+ {
+ return new SDL_StreamingSoundBuffer(mAudioImpl, input, format);
+ }
+
+ #endregion
+ #region --- Input Factory ---
+
+ public InputLib.ImplementationBase.InputImpl CreateJoystickInputImpl()
+ {
+ return new AgateLib.AgateSDL.Input.SDL_Input();
+ }
+
+ #endregion
+ }
+}
Modified: trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-09-04 05:08:38 UTC (rev 1511)
@@ -121,7 +121,6 @@
<Compile Include="Factories\DisplayFactory.cs" />
<Compile Include="Factories\FormsFactory.cs" />
<Compile Include="Factories\PlatformFactory.cs" />
- <Compile Include="Factories\SdlFactory.cs" />
<Compile Include="Factories\SysIoFile.cs" />
<Compile Include="Factories\SysIoPath.cs" />
<Compile Include="PixelBufferExtensions.cs" />
Modified: trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -1,4 +1,5 @@
-using AgateLib.ApplicationModels;
+using AgateLib.AgateSDL;
+using AgateLib.ApplicationModels;
using AgateLib.DisplayLib;
using AgateLib.Drivers;
using AgateLib.Platform.WinForms.Resources;
@@ -20,7 +21,7 @@
DisplayFactory = new DisplayFactory();
mPlatformFactory = new PlatformFactory();
- var sdl = new SdlFactory();
+ var sdl = new AgateSdlFactory();
AudioFactory = sdl;
InputFactory = sdl;
Deleted: trunk/AgateLib.Platform.WinForms/Factories/SdlFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Factories/SdlFactory.cs 2014-09-03 06:36:22 UTC (rev 1510)
+++ trunk/AgateLib.Platform.WinForms/Factories/SdlFactory.cs 2014-09-04 05:08:38 UTC (rev 1511)
@@ -1,22 +0,0 @@
-using AgateLib.Drivers;
-using AgateLib.Drivers.NullDrivers;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace AgateLib.Platform.WinForms.Factories
-{
- class SdlFactory : IAudioFactory, IInputFactory
- {
- public InputLib.ImplementationBase.InputImpl CreateJoystickInputImpl()
- {
- return new AgateLib.AgateSDL.Input.SDL_Input();
- }
-
- public AudioLib.ImplementationBase.AudioImpl CreateAudioImpl()
- {
- return new AgateLib.AgateSDL.Audio.SDL_Audio();
- }
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-03 06:36:29
|
Revision: 1510
http://sourceforge.net/p/agate/code/1510
Author: kanato
Date: 2014-09-03 06:36:22 +0000 (Wed, 03 Sep 2014)
Log Message:
-----------
Fixes to coordinate systems.
Fix shoot the traps.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/Geometry/CoordinateSystems/SingleFixedDimension.cs
trunk/Examples/ShootTheTraps/App.cs
trunk/Examples/ShootTheTraps/ShootTheTraps.csproj
trunk/Examples.sln
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2014-09-03 06:16:47 UTC (rev 1509)
+++ trunk/AgateLib/DisplayLib/Display.cs 2014-09-03 06:36:22 UTC (rev 1510)
@@ -185,7 +185,8 @@
sImpl.RenderTarget = value;
if (value.AttachedWindow != null)
- sCurrentWindow = value.AttachedWindow;
+ CurrentWindow = value.AttachedWindow;
+
}
}
@@ -203,7 +204,11 @@
public static DisplayWindow CurrentWindow
{
get { return sCurrentWindow; }
- internal set { sCurrentWindow = value; }
+ internal set
+ {
+ sCurrentWindow = value;
+ sImpl.RenderTarget.CoordinateSystem.RenderTargetSize = sImpl.RenderTarget.Size;
+ }
}
/// <summary>
Modified: trunk/AgateLib/Geometry/CoordinateSystems/SingleFixedDimension.cs
===================================================================
--- trunk/AgateLib/Geometry/CoordinateSystems/SingleFixedDimension.cs 2014-09-03 06:16:47 UTC (rev 1509)
+++ trunk/AgateLib/Geometry/CoordinateSystems/SingleFixedDimension.cs 2014-09-03 06:36:22 UTC (rev 1510)
@@ -12,6 +12,7 @@
public SingleFixedDimension()
{
+ FixedDimension = Dimension.Vertical;
FixedDimensionValue = 600;
}
@@ -31,8 +32,44 @@
{
if (FixedDimensionValue < 1)
throw new InvalidOperationException();
+
+ switch (FixedDimension)
+ {
+ case Dimension.Vertical:
+ case Dimension.Horizontal:
+ SetRect(FixedDimension);
+ break;
+
+ case Dimension.Smaller:
+ if (RenderTargetSize.AspectRatio >= 1)
+ SetRect(Dimension.Vertical);
+ else
+ SetRect(Dimension.Horizontal);
+ break;
+
+ case Dimension.Larger:
+ if (RenderTargetSize.AspectRatio >= 1)
+ SetRect(Dimension.Horizontal);
+ else
+ SetRect(Dimension.Vertical);
+ break;
+ }
}
+ private void SetRect(Dimension dimension)
+ {
+ switch (dimension)
+ {
+ case Dimension.Vertical:
+ Coordinates = new Rectangle(0, 0, (int)(FixedDimensionValue * RenderTargetSize.AspectRatio), FixedDimensionValue);
+ break;
+
+ case Dimension.Horizontal:
+ Coordinates = new Rectangle(0, 0, FixedDimensionValue, (int)(FixedDimensionValue / RenderTargetSize.AspectRatio));
+ break;
+ }
+ }
+
/// <summary>
/// The value of the fixed dimension.
/// </summary>
@@ -44,9 +81,14 @@
public Dimension FixedDimension { get; set; }
}
+ /// <summary>
+ /// Indicates a dimension which will be fixed.
+ /// </summary>
public enum Dimension
{
Vertical,
Horizontal,
+ Smaller,
+ Larger,
}
}
Modified: trunk/Examples/ShootTheTraps/App.cs
===================================================================
--- trunk/Examples/ShootTheTraps/App.cs 2014-09-03 06:16:47 UTC (rev 1509)
+++ trunk/Examples/ShootTheTraps/App.cs 2014-09-03 06:36:22 UTC (rev 1510)
@@ -22,10 +22,11 @@
static void Main(string[] args)
{
SceneModelParameters p = new SceneModelParameters(args);
+
p.ApplicationName = "Shoot the Traps";
p.CoordinateSystem = new AgateLib.Geometry.CoordinateSystems.SingleFixedDimension();
+
SceneModel model = new SceneModel(p);
-
model.Run(new App());
}
@@ -105,10 +106,10 @@
// center introduction text
Point textPt = new Point((Display.Coordinates.Width - largestWidth) / 2, 20);
Rectangle boxArea = new Rectangle(
- textPt.X - 10,
+ textPt.X - 10,
textPt.Y - 10,
largestWidth + 20,
- (mIntroLines.Length +1) * font.FontHeight + 20);
+ (mIntroLines.Length + 1) * font.FontHeight + 20);
Display.FillRect(boxArea, Color.FromArgb(196, Color.Black));
@@ -123,8 +124,6 @@
textPt.Y += font.FontHeight;
}
-
- Display.FillRect(0, 0, 320, 240, Color.FromArgb(128, 128, 0, 0));
}
#endregion
Modified: trunk/Examples/ShootTheTraps/ShootTheTraps.csproj
===================================================================
--- trunk/Examples/ShootTheTraps/ShootTheTraps.csproj 2014-09-03 06:16:47 UTC (rev 1509)
+++ trunk/Examples/ShootTheTraps/ShootTheTraps.csproj 2014-09-03 06:36:22 UTC (rev 1510)
@@ -113,7 +113,7 @@
<Name>AgateLib.Platform.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
- <Project>{198C4842-0000-0000-0000-000000000000}</Project>
+ <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
<Name>AgateLib</Name>
</ProjectReference>
</ItemGroup>
Modified: trunk/Examples.sln
===================================================================
--- trunk/Examples.sln 2014-09-03 06:16:47 UTC (rev 1509)
+++ trunk/Examples.sln 2014-09-03 06:36:22 UTC (rev 1510)
@@ -22,131 +22,101 @@
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Mixed Platforms.Build.0 = Debug|x86
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x64.ActiveCfg = Debug|x64
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x64.Build.0 = Debug|x64
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x86.ActiveCfg = Debug|x86
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x86.Build.0 = Debug|x86
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|Any CPU.Build.0 = Release|Any CPU
- {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|Mixed Platforms.Build.0 = Release|x86
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x64.ActiveCfg = Release|x64
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x64.Build.0 = Release|x64
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x86.ActiveCfg = Release|x86
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x86.Build.0 = Release|x86
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|Mixed Platforms.Build.0 = Debug|x86
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x64.ActiveCfg = Debug|x64
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x64.Build.0 = Debug|x64
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x86.ActiveCfg = Debug|x86
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x86.Build.0 = Debug|x86
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|Any CPU.Build.0 = Release|Any CPU
- {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|Mixed Platforms.Build.0 = Release|x86
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x64.ActiveCfg = Release|x64
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x64.Build.0 = Release|x64
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x86.ActiveCfg = Release|x86
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x86.Build.0 = Release|x86
{436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|Mixed Platforms.Build.0 = Debug|x86
{436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x64.ActiveCfg = Debug|x64
{436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x64.Build.0 = Debug|x64
{436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x86.ActiveCfg = Debug|x86
{436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x86.Build.0 = Debug|x86
{436641C4-846C-42D0-8E8F-95F70E211D22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{436641C4-846C-42D0-8E8F-95F70E211D22}.Release|Any CPU.Build.0 = Release|Any CPU
- {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|Mixed Platforms.Build.0 = Release|x86
{436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x64.ActiveCfg = Release|x64
{436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x64.Build.0 = Release|x64
{436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x86.ActiveCfg = Release|x86
{436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x86.Build.0 = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.Build.0 = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU
- {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|x64.Build.0 = Debug|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|x86.Build.0 = Debug|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Any CPU.Build.0 = Release|Any CPU
- {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x64.ActiveCfg = Release|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x86.ActiveCfg = Release|Any CPU
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Mixed Platforms.Build.0 = Debug|x86
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.ActiveCfg = Debug|x64
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.Build.0 = Debug|x64
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.ActiveCfg = Debug|x86
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.Build.0 = Debug|x86
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.Build.0 = Release|Any CPU
- {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Mixed Platforms.Build.0 = Release|x86
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.ActiveCfg = Release|x64
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.Build.0 = Release|x64
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.ActiveCfg = Release|x86
{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.Build.0 = Release|x86
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Mixed Platforms.Build.0 = Debug|x86
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x64.ActiveCfg = Debug|x64
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x64.Build.0 = Debug|x64
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.ActiveCfg = Debug|x86
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.Build.0 = Debug|x86
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.Build.0 = Release|Any CPU
- {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Mixed Platforms.Build.0 = Release|x86
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.ActiveCfg = Release|x64
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.Build.0 = Release|x64
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.ActiveCfg = Release|x86
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.Build.0 = Release|x86
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Mixed Platforms.Build.0 = Debug|x86
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x64.ActiveCfg = Debug|x64
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x64.Build.0 = Debug|x64
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.ActiveCfg = Debug|x86
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.Build.0 = Debug|x86
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.Build.0 = Release|Any CPU
- {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Mixed Platforms.Build.0 = Release|x86
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.ActiveCfg = Release|x64
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.Build.0 = Release|x64
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.ActiveCfg = Release|x86
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-03 06:16:56
|
Revision: 1509
http://sourceforge.net/p/agate/code/1509
Author: kanato
Date: 2014-09-03 06:16:47 +0000 (Wed, 03 Sep 2014)
Log Message:
-----------
Fix issue where coordinate system was not passed to created window.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/DisplayWindow.cs
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-09-03 06:08:28 UTC (rev 1508)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-09-03 06:16:47 UTC (rev 1509)
@@ -157,7 +157,7 @@
/// <returns></returns>
public static DisplayWindow CreateWindowed(string title, int width, int height, bool allowResize = false, string iconFile = null, ICoordinateSystem coordinates = null)
{
- return new DisplayWindow(CreateWindowParams.Windowed(title, width, height, allowResize, iconFile, null));
+ return new DisplayWindow(CreateWindowParams.Windowed(title, width, height, allowResize, iconFile, coordinates));
}
/// <summary>
/// Creates a DisplayWindow object which is a desktop window with no frame or
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-03 06:08:51
|
Revision: 1508
http://sourceforge.net/p/agate/code/1508
Author: kanato
Date: 2014-09-03 06:08:28 +0000 (Wed, 03 Sep 2014)
Log Message:
-----------
Refactor coordinate systems a little.
Fix examples so they compile now.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/ApplicationModels/ModelParameters.cs
trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs
trunk/AgateLib/ApplicationModels/SceneModelParameters.cs
trunk/AgateLib/Diagnostics/AgateConsole.cs
trunk/AgateLib/DisplayLib/CreateWindowParams.cs
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/Font.cs
trunk/AgateLib/DisplayLib/FrameBuffer.cs
trunk/AgateLib/DisplayLib/IFrameBuffer.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs
trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs
trunk/AgateLib/Geometry/CoordinateSystems/FixedCoordinateSystem.cs
trunk/AgateLib/Geometry/CoordinateSystems/NativeCoordinates.cs
trunk/AgateLib/Geometry/ICoordinateSystemCreator.cs
trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs
trunk/AgateLib.OpenGL/ContextFB.cs
trunk/AgateLib.OpenGL/GL_FrameBuffer.cs
trunk/AgateLib.OpenGL/Legacy/LegacyDrawBuffer.cs
trunk/AgateLib.Platform.WinForms/ApplicationModels/SceneModel.cs
trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs
trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_GameWindow.cs
trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
trunk/Examples/BallBuster.Net/CImage.cs
trunk/Examples/BallBuster.Net/Program.cs
trunk/Examples/BallBuster.Net/main.cs
trunk/Examples/ExampleUnitTests/ExampleUnitTests.csproj
trunk/Examples/Pong/Pong.cs
trunk/Examples/Pong/Pong.csproj
trunk/Examples/ShootTheTraps/App.cs
trunk/Examples/ShootTheTraps/ShootTheTraps.csproj
trunk/Examples.sln
Added Paths:
-----------
trunk/AgateLib/Geometry/CoordinateSystems/SingleFixedDimension.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/AgateLib.csproj 2014-09-03 06:08:28 UTC (rev 1508)
@@ -63,6 +63,7 @@
<Compile Include="DisplayLib\FontStyles.cs" />
<Compile Include="Drivers\NullDrivers\NullInputFactory.cs" />
<Compile Include="Drivers\NullDrivers\NullSoundFactory.cs" />
+ <Compile Include="Geometry\CoordinateSystems\SingleFixedDimension.cs" />
<Compile Include="Mathematics\MathHelper.cs" />
<Compile Include="Algorithms\PathFinding\IAStarMap.cs" />
<Compile Include="Algorithms\Pair.cs" />
Modified: trunk/AgateLib/ApplicationModels/ModelParameters.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -100,7 +100,7 @@
/// system for the automatically created display window. If
/// AutoCreateDisplayWindow is false, this property is not used.
/// </summary>
- public ICoordinateSystemCreator CoordinateSystem { get; set; }
+ public ICoordinateSystem CoordinateSystem { get; set; }
/// <summary>
/// Indicates the device type to emulate. This primarily affects the built-in user interface
Modified: trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -26,12 +26,8 @@
BeginModel();
}
- finally
- {
- //DisposeAutoCreatedWindow();
-
- //Dispose();
- }
+ catch (ExitGameException)
+ { }
}
protected abstract void BeginModel();
Modified: trunk/AgateLib/ApplicationModels/SceneModelParameters.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/SceneModelParameters.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/ApplicationModels/SceneModelParameters.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -7,5 +7,18 @@
{
public class SceneModelParameters : ModelParameters
{
+ /// <summary>
+ /// Constructs a SceneModelParameters object with default parameters.
+ /// </summary>
+ public SceneModelParameters()
+ { }
+ /// <summary>
+ /// Constructs a SceneModelParameters object with default parameters.
+ /// Also stores the command line arguments.
+ /// </summary>
+ /// <param name="args"></param>
+ public SceneModelParameters(string[] args)
+ : base(args)
+ { }
}
}
Modified: trunk/AgateLib/Diagnostics/AgateConsole.cs
===================================================================
--- trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -261,7 +261,7 @@
IsVisible = !IsVisible;
args.Handled = true;
- sInstance.mHeight = Display.CoordinateSystem.Height * 5 / 12;
+ sInstance.mHeight = Display.Coordinates.Height * 5 / 12;
}
else if (IsVisible)
{
Modified: trunk/AgateLib/DisplayLib/CreateWindowParams.cs
===================================================================
--- trunk/AgateLib/DisplayLib/CreateWindowParams.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/DisplayLib/CreateWindowParams.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -219,7 +219,7 @@
/// The object which will be used to set the coordinate system for the window
/// at the beginning of each frame.
/// </summary>
- public ICoordinateSystemCreator Coordinates { get; set; }
+ public ICoordinateSystem Coordinates { get; set; }
#endregion
@@ -231,7 +231,7 @@
/// <param name="control"></param>
/// <param name="coordinates">Coordinate system creator object. May be null</param>
/// <returns></returns>
- public static CreateWindowParams FromControl(object control, ICoordinateSystemCreator coordinates)
+ public static CreateWindowParams FromControl(object control, ICoordinateSystem coordinates)
{
CreateWindowParams retval = new CreateWindowParams();
@@ -251,7 +251,7 @@
/// <param name="bpp"></param>
/// <param name="coordinates">Coordinate system creator object. May be null</param>
/// <returns></returns>
- public static CreateWindowParams FullScreen(string title, int width, int height, int bpp, ICoordinateSystemCreator coordinates)
+ public static CreateWindowParams FullScreen(string title, int width, int height, int bpp, ICoordinateSystem coordinates)
{
CreateWindowParams retval = new CreateWindowParams();
@@ -274,7 +274,7 @@
/// <param name="allowResize"></param>
/// <param name="coordinates">Coordinate system creator object. May be null</param>
/// <returns></returns>
- public static CreateWindowParams Windowed(string title, int width, int height, bool allowResize, string iconFile, ICoordinateSystemCreator coordinates)
+ public static CreateWindowParams Windowed(string title, int width, int height, bool allowResize, string iconFile, ICoordinateSystem coordinates)
{
CreateWindowParams retval = new CreateWindowParams();
@@ -298,7 +298,7 @@
/// <param name="height"></param>
/// <param name="coordinates">Coordinate system creator object. May be null</param>
/// <returns></returns>
- public static CreateWindowParams NoFrame(string title, int width, int height, ICoordinateSystemCreator coordinates)
+ public static CreateWindowParams NoFrame(string title, int width, int height, ICoordinateSystem coordinates)
{
CreateWindowParams retval = new CreateWindowParams();
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/DisplayLib/Display.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -192,9 +192,9 @@
/// <summary>
/// Gets the coordinate system for the current render target.
/// </summary>
- public static Rectangle CoordinateSystem
+ public static Rectangle Coordinates
{
- get { return RenderTarget.CoordinateSystem.DetermineCoordinateSystem(RenderTarget.Size); }
+ get { return RenderTarget.CoordinateSystem.Coordinates; }
}
/// <summary>
@@ -288,8 +288,8 @@
sImpl.BeginFrame();
- AgateBuiltInShaders.Basic2DShader.CoordinateSystem =
- RenderTarget.CoordinateSystem.DetermineCoordinateSystem(RenderTarget.Size);
+ RenderTarget.CoordinateSystem.RenderTargetSize = RenderTarget.Size;
+ AgateBuiltInShaders.Basic2DShader.CoordinateSystem = RenderTarget.CoordinateSystem.Coordinates;
AgateBuiltInShaders.Basic2DShader.Activate();
sCurrentClipRect = new Rectangle(Point.Empty, RenderTarget.Size);
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -39,7 +39,7 @@
{
DisplayWindowImpl mImpl;
FrameBuffer mFrameBuffer;
- ICoordinateSystemCreator mCoordinates;
+ ICoordinateSystem mCoordinates;
/// <summary>
/// Constructs a DisplayWindow from a resource.
@@ -54,7 +54,6 @@
if (disp == null)
throw new Resources.AgateResourceException("Resource " + name + " was found, but was of type " + name.GetType().ToString() + ", not DisplayWindowResource.");
-
if (disp.FullScreen)
{
CreateWindowParams par = CreateWindowParams.FullScreen(
@@ -92,6 +91,9 @@
// TODO: Fix this hack
Display.CurrentWindow = this;
+
+ mCoordinates = windowParams.Coordinates;
+ mCoordinates.RenderTargetSize = Size;
}
#region --- Static Creation Methods ---
@@ -105,7 +107,7 @@
/// new DisplayWindow(CreateWindowParams.FromControl(control)).</remarks>
/// <param name="control">Windows.Forms control which should be used as the
/// render target.</param>
- public static DisplayWindow CreateFromControl(object control, ICoordinateSystemCreator coordinates = null)
+ public static DisplayWindow CreateFromControl(object control, ICoordinateSystem coordinates = null)
{
return new DisplayWindow(CreateWindowParams.FromControl(control, coordinates));
}
@@ -117,7 +119,7 @@
/// <param name="width"></param>
/// <param name="height"></param>
/// <returns></returns>
- public static DisplayWindow CreateFullScreen(string title, Size size, ICoordinateSystemCreator coordinates = null)
+ public static DisplayWindow CreateFullScreen(string title, Size size, ICoordinateSystem coordinates = null)
{
return new DisplayWindow(CreateWindowParams.FullScreen(title, size.Width, size.Height, 32, coordinates));
}
@@ -129,7 +131,7 @@
/// <param name="width"></param>
/// <param name="height"></param>
/// <returns></returns>
- public static DisplayWindow CreateFullScreen(string title, int width, int height, ICoordinateSystemCreator coordinates = null)
+ public static DisplayWindow CreateFullScreen(string title, int width, int height, ICoordinateSystem coordinates = null)
{
return new DisplayWindow(CreateWindowParams.FullScreen(title, width, height, 32, null));
}
@@ -140,7 +142,7 @@
/// <param name="title"></param>
/// <param name="size"></param>
/// <returns></returns>
- public static DisplayWindow CreateWindowed(string title, Size size, ICoordinateSystemCreator coordinates = null)
+ public static DisplayWindow CreateWindowed(string title, Size size, ICoordinateSystem coordinates = null)
{
return DisplayWindow.CreateWindowed(title, size.Width, size.Height, false, null, coordinates);
}
@@ -153,7 +155,7 @@
/// <param name="iconFile"></param>
/// <param name="allowResize"></param>
/// <returns></returns>
- public static DisplayWindow CreateWindowed(string title, int width, int height, bool allowResize = false, string iconFile = null, ICoordinateSystemCreator coordinates = null)
+ public static DisplayWindow CreateWindowed(string title, int width, int height, bool allowResize = false, string iconFile = null, ICoordinateSystem coordinates = null)
{
return new DisplayWindow(CreateWindowParams.Windowed(title, width, height, allowResize, iconFile, null));
}
@@ -165,7 +167,7 @@
/// <param name="width"></param>
/// <param name="height"></param>
/// <returns></returns>
- public static DisplayWindow CreateNoFrame(string title, int width, int height, ICoordinateSystemCreator coordinates = null)
+ public static DisplayWindow CreateNoFrame(string title, int width, int height, ICoordinateSystem coordinates = null)
{
return new DisplayWindow(CreateWindowParams.NoFrame(title, width, height, null));
}
Modified: trunk/AgateLib/DisplayLib/Font.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Font.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/DisplayLib/Font.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -153,6 +153,12 @@
}
+
+ public double Alpha
+ {
+ get { return mState.Alpha; }
+ set { mState.Alpha = value; }
+ }
public Color Color
{
get { return mState.Color; }
Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -159,7 +159,7 @@
/// framebuffer as a render target, this coordinate system is automatically
/// loaded.
/// </summary>
- public ICoordinateSystemCreator CoordinateSystem
+ public ICoordinateSystem CoordinateSystem
{
get { return Impl.CoordinateSystem; }
set { Impl.CoordinateSystem = value; }
Modified: trunk/AgateLib/DisplayLib/IFrameBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/IFrameBuffer.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/DisplayLib/IFrameBuffer.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -26,6 +26,6 @@
/// <summary>
/// Gets or sets the coordinate system for the render target.
/// </summary>
- ICoordinateSystemCreator CoordinateSystem { get; set; }
+ ICoordinateSystem CoordinateSystem { get; set; }
}
}
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -149,7 +149,7 @@
/// <returns></returns>
public Point PixelToLogicalCoords(Point point)
{
- var coords = FrameBuffer.CoordinateSystem.DetermineCoordinateSystem(FrameBuffer.Size);
+ var coords = FrameBuffer.CoordinateSystem.Coordinates;
double x = point.X / (double)Width;
double y = point.Y / (double)Height;
@@ -170,7 +170,7 @@
/// <returns></returns>
public Point LogicalToPixelCoords(Point point)
{
- var coords = FrameBuffer.CoordinateSystem.DetermineCoordinateSystem(FrameBuffer.Size);
+ var coords = FrameBuffer.CoordinateSystem.Coordinates;
point.X -= coords.X;
point.Y -= coords.Y;
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -30,7 +30,7 @@
/// </summary>
public abstract class FrameBufferImpl : IDisposable
{
- public FrameBufferImpl(ICoordinateSystemCreator coords)
+ public FrameBufferImpl(ICoordinateSystem coords)
{
this.CoordinateSystem = coords;
}
@@ -97,6 +97,6 @@
/// <summary>
/// Gets or sets the coordinate system that is used to map 2d coordinates to pixels in the render target.
/// </summary>
- public virtual ICoordinateSystemCreator CoordinateSystem { get; set; }
+ public virtual ICoordinateSystem CoordinateSystem { get; set; }
}
}
Modified: trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs
===================================================================
--- trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -30,7 +30,7 @@
/// ratio of the display, providing extra space outside the requested render area
/// which the application must fill in somehow.
/// </summary>
- public class FixedAspectRatioCoordinates : ICoordinateSystemCreator
+ public class FixedAspectRatioCoordinates : ICoordinateSystem
{
public FixedAspectRatioCoordinates()
{
@@ -38,14 +38,27 @@
AspectRatio = 16 / (double)9;
}
- public Rectangle DetermineCoordinateSystem(Size displayWindowSize)
+ Size mRenderTargetSize;
+
+ public Size RenderTargetSize
{
- var retval = GetUnshiftedRectangle(displayWindowSize);
+ get { return mRenderTargetSize; }
+ set
+ {
+ mRenderTargetSize = value;
+ DetermineCoordinateSystem();
+ }
+ }
+ public Rectangle Coordinates { get; private set; }
+ public void DetermineCoordinateSystem()
+ {
+ var retval = GetUnshiftedRectangle(RenderTargetSize);
+
retval.X += Origin.X;
retval.Y += Origin.Y;
- return retval;
+ Coordinates = retval;
}
private Rectangle GetUnshiftedRectangle(Size displayWindowSize)
@@ -125,5 +138,6 @@
/// the display area.
/// </summary>
public Point Origin { get; set; }
+
}
}
Modified: trunk/AgateLib/Geometry/CoordinateSystems/FixedCoordinateSystem.cs
===================================================================
--- trunk/AgateLib/Geometry/CoordinateSystems/FixedCoordinateSystem.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/Geometry/CoordinateSystems/FixedCoordinateSystem.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -5,18 +5,23 @@
namespace AgateLib.Geometry.CoordinateSystems
{
- public class FixedCoordinateSystem : ICoordinateSystemCreator
+ public class FixedCoordinateSystem : ICoordinateSystem
{
public FixedCoordinateSystem(Rectangle coords)
{
Coordinates = coords;
}
- public Rectangle Coordinates { get; set; }
+ Size mRenderTargetSize;
- public Rectangle DetermineCoordinateSystem(Size displayWindowSize)
+ public Size RenderTargetSize
{
- return Coordinates;
+ get { return mRenderTargetSize; }
+ set
+ {
+ mRenderTargetSize = value;
+ }
}
+ public Rectangle Coordinates { get; set; }
}
}
Modified: trunk/AgateLib/Geometry/CoordinateSystems/NativeCoordinates.cs
===================================================================
--- trunk/AgateLib/Geometry/CoordinateSystems/NativeCoordinates.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/Geometry/CoordinateSystems/NativeCoordinates.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -28,11 +28,13 @@
/// Constructs a coordinate system which matches the pixels coordinates of the display window,
/// up to an optional maximum height and width.
/// </summary>
- public class NativeCoordinates : ICoordinateSystemCreator
+ public class NativeCoordinates : ICoordinateSystem
{
- public Rectangle DetermineCoordinateSystem(Size displayWindowSize)
+ Size mRenderTargetSize;
+
+ void DetermineCoordinateSystem()
{
- Rectangle retval = new Rectangle(Point.Empty, displayWindowSize);
+ Rectangle retval = new Rectangle(Point.Empty, mRenderTargetSize);
if (MaxSize != null)
{
@@ -40,9 +42,24 @@
retval.Height = Math.Min(retval.Height, MaxSize.Value.Height);
}
- return retval;
+ Coordinates = retval;
}
public Size? MaxSize { get; set; }
+
+ public Size RenderTargetSize
+ {
+ get
+ {
+ return mRenderTargetSize;
+ }
+ set
+ {
+ mRenderTargetSize = value;
+ DetermineCoordinateSystem();
+ }
+ }
+
+ public Rectangle Coordinates { get; private set;}
}
}
Added: trunk/AgateLib/Geometry/CoordinateSystems/SingleFixedDimension.cs
===================================================================
--- trunk/AgateLib/Geometry/CoordinateSystems/SingleFixedDimension.cs (rev 0)
+++ trunk/AgateLib/Geometry/CoordinateSystems/SingleFixedDimension.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Geometry.CoordinateSystems
+{
+ public class SingleFixedDimension : ICoordinateSystem
+ {
+ Size mRenderTargetSize;
+
+ public SingleFixedDimension()
+ {
+ FixedDimensionValue = 600;
+ }
+
+ public Rectangle Coordinates { get; private set; }
+
+ public Size RenderTargetSize
+ {
+ get { return mRenderTargetSize; }
+ set
+ {
+ mRenderTargetSize = value;
+ DetermineCoordinateSystem();
+ }
+ }
+
+ private void DetermineCoordinateSystem()
+ {
+ if (FixedDimensionValue < 1)
+ throw new InvalidOperationException();
+ }
+
+ /// <summary>
+ /// The value of the fixed dimension.
+ /// </summary>
+ public int FixedDimensionValue { get; set; }
+
+ /// <summary>
+ /// Whether to keep the vertical or horizontal dimension fixed. Defaults to vertical
+ /// </summary>
+ public Dimension FixedDimension { get; set; }
+ }
+
+ public enum Dimension
+ {
+ Vertical,
+ Horizontal,
+ }
+}
Modified: trunk/AgateLib/Geometry/ICoordinateSystemCreator.cs
===================================================================
--- trunk/AgateLib/Geometry/ICoordinateSystemCreator.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/Geometry/ICoordinateSystemCreator.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -27,13 +27,18 @@
/// <summary>
/// Interface for classes which create a coordinate system for a given DisplayWindow size.
/// </summary>
- public interface ICoordinateSystemCreator
+ public interface ICoordinateSystem
{
/// <summary>
- /// Returns the coordinate system given the size of the display window.
+ /// Gets or sets size in pixels of the render target.
/// </summary>
+ Size RenderTargetSize { get; set; }
+ /// <summary>
+ /// Gets the coordinate system given the size of the display window. This is calculated when
+ /// RenderTargetSize is set.
+ /// </summary>
/// <param name="displayWindowSize"></param>
/// <returns></returns>
- Rectangle DetermineCoordinateSystem(Size displayWindowSize);
+ Rectangle Coordinates { get; }
}
}
Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -38,7 +38,7 @@
}
public void UpdateLayout(Gui gui)
{
- UpdateLayout(gui, Display.CoordinateSystem.Size);
+ UpdateLayout(gui, Display.Coordinates.Size);
}
public void UpdateLayout(Gui gui, Size renderTargetSize)
{
Modified: trunk/AgateLib.OpenGL/ContextFB.cs
===================================================================
--- trunk/AgateLib.OpenGL/ContextFB.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib.OpenGL/ContextFB.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -41,7 +41,7 @@
public ContextFB(AgateLib.DisplayLib.DisplayWindow attachedWindow,
GraphicsMode graphicsMode, IWindowInfo window, Size size,
bool depthBuffer, bool stencilBuffer,
- ICoordinateSystemCreator coords)
+ ICoordinateSystem coords)
: base(coords)
{
mGraphicsMode = graphicsMode;
Modified: trunk/AgateLib.OpenGL/GL_FrameBuffer.cs
===================================================================
--- trunk/AgateLib.OpenGL/GL_FrameBuffer.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib.OpenGL/GL_FrameBuffer.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -32,7 +32,7 @@
protected bool mHasDepth;
protected bool mHasStencil;
- protected GL_FrameBuffer(ICoordinateSystemCreator coords) : base(coords)
+ protected GL_FrameBuffer(ICoordinateSystem coords) : base(coords)
{
}
Modified: trunk/AgateLib.OpenGL/Legacy/LegacyDrawBuffer.cs
===================================================================
--- trunk/AgateLib.OpenGL/Legacy/LegacyDrawBuffer.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib.OpenGL/Legacy/LegacyDrawBuffer.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -230,10 +230,8 @@
mVerts[mIndex + 3].Color = ToAbgr(color.BottomLeft);
mIndex += 4;
-
}
-
private int ToAbgr(Color c)
{
int val = c.A;
Modified: trunk/AgateLib.Platform.WinForms/ApplicationModels/SceneModel.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/ApplicationModels/SceneModel.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib.Platform.WinForms/ApplicationModels/SceneModel.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -10,7 +10,8 @@
{
public class SceneModel : SceneAppModelBase
{
- public SceneModel(SceneModelParameters parameters) : base(parameters)
+ public SceneModel(SceneModelParameters parameters)
+ : base(parameters)
{ }
public SceneModelParameters Parameters { get { return (SceneModelParameters)base.Parameters; } }
@@ -25,13 +26,22 @@
if (sceneToStartWith != null)
SceneStack.Add(sceneToStartWith);
- while(SceneStack.Count > 0 && QuitModel == false)
+ try
{
- RunSingleFrame();
+ while (SceneStack.Count > 0 && QuitModel == false)
+ {
+ RunSingleFrame();
- if (Display.CurrentWindow.IsClosed)
- throw new ExitGameException();
+ if (Display.CurrentWindow.IsClosed)
+ throw new ExitGameException();
+ }
}
+ finally
+ {
+ DisposeAutoCreatedWindow();
+
+ Dispose();
+ }
}
public override void KeepAlive()
Modified: trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -68,7 +68,7 @@
bool mHasFrame = true;
ContextFB mFrameBuffer;
- ICoordinateSystemCreator mCoords;
+ ICoordinateSystem mCoords;
public override FrameBufferImpl FrameBuffer
{
@@ -232,7 +232,7 @@
return newMode;
}
- private void CreateFrameBuffer(ICoordinateSystemCreator coords)
+ private void CreateFrameBuffer(ICoordinateSystem coords)
{
var old = mFrameBuffer;
Modified: trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_GameWindow.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_GameWindow.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_GameWindow.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -212,7 +212,7 @@
mDrawBuffer = mDisplay.CreateDrawBuffer();
}
- private void CreateFrameBuffer(ICoordinateSystemCreator coords)
+ private void CreateFrameBuffer(ICoordinateSystem coords)
{
mFrameBuffer = new ContextFB(mOwner,
mWindow.Context.GraphicsMode, mWindow.WindowInfo,
Modified: trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
===================================================================
--- trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2014-09-03 06:08:28 UTC (rev 1508)
@@ -82,6 +82,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<Prefer32Bit>false</Prefer32Bit>
+ <UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>out\</OutputPath>
@@ -157,9 +158,17 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj">
+ <ProjectReference Include="..\..\AgateLib.AgateSDL\AgateLib.AgateSDL.csproj">
+ <Project>{935d67a0-931e-46de-9f6a-2d6dbc99aff3}</Project>
+ <Name>AgateLib.AgateSDL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.OpenGL\AgateLib.OpenGL.csproj">
+ <Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project>
+ <Name>AgateLib.OpenGL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj">
<Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
- <Name>AgateLib.Platform.WindowsForms</Name>
+ <Name>AgateLib.Platform.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
Modified: trunk/Examples/BallBuster.Net/CImage.cs
===================================================================
--- trunk/Examples/BallBuster.Net/CImage.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/BallBuster.Net/CImage.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -22,7 +22,6 @@
using AgateLib.Resources.Legacy;
using AgateLib.Sprites;
using AgateLib.DisplayLib;
-using AgateLib.Platform.WindowsForms.Resources;
namespace BallBuster.Net
{
@@ -51,16 +50,13 @@
public Sprite arrow, bblogo, palogo, xlogo;
- public FontSurface font;
- public FontSurface largeFont;
+ public Font font;
//public TextStyler fontStyler;
public void preload()
{
- this.font = BuiltinResources.AgateSans10;
- this.largeFont = BuiltinResources.AgateSans24;
- this.largeFont.SetScale(0.8, 0.8);
+ this.font = AgateLib.Assets.Fonts.AgateSans;
this.palogo = new Sprite(spritesSrc, "palogo");
}
Modified: trunk/Examples/BallBuster.Net/Program.cs
===================================================================
--- trunk/Examples/BallBuster.Net/Program.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/BallBuster.Net/Program.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -17,9 +17,10 @@
//along with Ball: Buster; if not, write to the Free Software
//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+using AgateLib.ApplicationModels;
+using AgateLib.Platform.WinForms.ApplicationModels;
using System;
using System.Collections.Generic;
-using AgateLib.Platform.WindowsForms.ApplicationModels;
namespace BallBuster.Net
{
@@ -31,10 +32,10 @@
[STAThread]
static void Main(string[] args)
{
- var parameters = new PassiveModelParameters(args);
+ var parameters = new SerialModelParameters(args);
parameters.AssetLocations.Surfaces = "imgs";
- var model = new PassiveModel(parameters);
+ var model = new SerialModel(parameters);
model.Run(() =>
{
Modified: trunk/Examples/BallBuster.Net/main.cs
===================================================================
--- trunk/Examples/BallBuster.Net/main.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/BallBuster.Net/main.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -31,7 +31,6 @@
using AgateLib.InputLib;
using AgateLib.AudioLib;
using AgateLib.Platform;
-using AgateLib.Platform.WindowsForms;
using AgateLib.InputLib.Legacy;
namespace BallBuster.Net
@@ -486,7 +485,6 @@
}
if (mousex > 100 - 20 && mousex < 500 && mousey > 190 && mousey < 220)
{
- Display.CurrentWindow.SetFullScreen();
return;
}
if (mousex > 100 - 20 && mousex < 500 && mousey > 220 && mousey < 250)
@@ -823,7 +821,7 @@
string message = "Score: " + getScore().ToString();
- img.font.SetScale(1.0, 1.0);
+ img.font.Size = 14;
img.font.Color = Color.Black;
img.font.DrawText(11, 585, message);
img.font.Color = Color.White;
@@ -875,16 +873,16 @@
if (mPauseTimer.TotalMilliseconds % 1000 < 500)
{
- img.largeFont.Color = Color.White;
- img.largeFont.SetScale(1.5f, 1.5f);
- img.largeFont.DisplayAlignment = OriginAlignment.Center;
+ img.font.Size = 30;
+ img.font.Color = Color.White;
+ img.font.DisplayAlignment = OriginAlignment.Center;
- img.largeFont.DrawText(400, 200, "PAUSED");
- img.largeFont.DrawText(400, 300, "Press 'P' to unpause.");
+ img.font.DrawText(400, 200, "PAUSED");
+ img.font.DrawText(400, 300, "Press 'P' to unpause.");
- img.largeFont.DisplayAlignment = OriginAlignment.TopLeft;
+ img.font.DisplayAlignment = OriginAlignment.TopLeft;
- img.largeFont.SetScale(1.0f, 1.0f);
+ img.font.Size = 14;
}
@@ -1046,21 +1044,22 @@
if (seconds < 0)
blaster = false;
+ img.font.Size = 24;
// Draw flashing CLICK! above paddle
if ((int)Timing.TotalMilliseconds % 200 < 100)
- img.largeFont.Color = Color.Red;
+ img.font.Color = Color.Red;
else
- img.largeFont.Color = Color.White;
+ img.font.Color = Color.White;
- img.largeFont.DisplayAlignment = OriginAlignment.TopCenter;
+ img.font.DisplayAlignment = OriginAlignment.TopCenter;
- img.largeFont.DrawText(400 + (int)Timing.TotalMilliseconds % 3 - 2,
+ img.font.DrawText(400 + (int)Timing.TotalMilliseconds % 3 - 2,
(int)(paddley) - 100 + (int)Timing.TotalMilliseconds % 3 - 2, "Click!");
- img.largeFont.DisplayAlignment = OriginAlignment.TopLeft;
+ img.font.DisplayAlignment = OriginAlignment.TopLeft;
- img.largeFont.Color = Color.White;
+ img.font.Color = Color.White;
}
@@ -1092,10 +1091,7 @@
gainPoints(250, powerupLeft + 20, powerupTop + 20);
snd.powerup.Play();
-
}
-
-
}
if (pow)
@@ -1542,24 +1538,24 @@
Display.BeginFrame();
Display.Clear(Color.White);
+ img.font.Size = 24;
+ img.font.Color = Color.Black;
+ img.font.DrawText(200, 50, "New High Score!");
- img.largeFont.Color = Color.Black;
- img.largeFont.DrawText(200, 50, "New High Score!");
-
for (int j = 0; j < highscores.Count; j++)
{
int Drawy = 100 + 30 * j;
- img.largeFont.Color = Color.Black;
+ img.font.Color = Color.Black;
if (addposition == j)
{
- img.largeFont.Color = Color.FromHsv((time % 3600) / 10.0f, 0.7f, 0.7f);
+ img.font.Color = Color.FromHsv((time % 3600) / 10.0f, 0.7f, 0.7f);
}
- img.largeFont.DrawText(200, Drawy, (j + 1) + ".");
- img.largeFont.DrawText(230, Drawy, highscores[j].name);
- img.largeFont.DrawText(550, Drawy, highscores[j].score.ToString());
+ img.font.DrawText(200, Drawy, (j + 1) + ".");
+ img.font.DrawText(230, Drawy, highscores[j].name);
+ img.font.DrawText(550, Drawy, highscores[j].score.ToString());
}
KeyCode key = getkeypress();
@@ -1658,7 +1654,7 @@
{
Display.BeginFrame();
- img.largeFont.SetScale(0.8, 0.8);
+ img.font.Size = 19;
median = (int)Timing.TotalMilliseconds - start;
Display.Clear(Color.White);
@@ -1669,31 +1665,31 @@
const int xpt = 175;
- img.largeFont.Color = Color.Black;
- img.largeFont.DrawText(xpt, 50, string.Format("Completed level {0}-{1}", world + 1, level + 1));
+ img.font.Color = Color.Black;
+ img.font.DrawText(xpt, 50, string.Format("Completed level {0}-{1}", world + 1, level + 1));
if (median > 1000)
{
- img.largeFont.DrawText(xpt, 100, "Score:");
- img.largeFont.DrawText(tab, 100, getScore().ToString());
+ img.font.DrawText(xpt, 100, "Score:");
+ img.font.DrawText(tab, 100, getScore().ToString());
}
if (median > 1500)
{
- img.largeFont.DrawText(xpt, 150, "Level Bonus:");
- img.largeFont.DrawText(tab, 150, ((int)Math.Min(bonus, (median - 1500) / countRate)).ToString());
+ img.font.DrawText(xpt, 150, "Level Bonus:");
+ img.font.DrawText(tab, 150, ((int)Math.Min(bonus, (median - 1500) / countRate)).ToString());
}
if (median > 2000)
{
- img.largeFont.DrawText(xpt, 200, "Time: ");
- img.largeFont.DrawText(tab, 200, timeString);
+ img.font.DrawText(xpt, 200, "Time: ");
+ img.font.DrawText(tab, 200, timeString);
}
if (median > 2500)
{
- img.largeFont.DrawText(xpt, 230, "Time Bonus: ");
- img.largeFont.DrawText(tab, 230, ((int)Math.Min(timeBonus, (median - 2500) / countRate)).ToString());
+ img.font.DrawText(xpt, 230, "Time Bonus: ");
+ img.font.DrawText(tab, 230, ((int)Math.Min(timeBonus, (median - 2500) / countRate)).ToString());
}
if (median > 3000)
@@ -1706,8 +1702,8 @@
if (ballslost == 0 && lineCount < lineLimit)
{
- img.largeFont.DrawText(xpt, 280 + lineCount * 50, "No balls lost");
- img.largeFont.DrawText(tab, 280 + lineCount * 50, "500");
+ img.font.DrawText(xpt, 280 + lineCount * 50, "No balls lost");
+ img.font.DrawText(tab, 280 + lineCount * 50, "500");
lineCount++;
}
@@ -1715,30 +1711,19 @@
/// show other bonuses.
if (powerupcount == 0 && lineCount < lineLimit)
{
- img.largeFont.DrawText(xpt, 280 + lineCount * 50, "No powerups");
- img.largeFont.DrawText(tab, 280 + lineCount * 50, "1500");
+ img.font.DrawText(xpt, 280 + lineCount * 50, "No powerups");
+ img.font.DrawText(tab, 280 + lineCount * 50, "1500");
lineCount++;
}
- /*
- if (perfectgame && lineCount < lineLimit)
- {
- // perfect game means no extra balls used, did not get blaster powerup
- // and no lives lost
- img.font.DrawText(200, 280 + lineCount * 50, "Perfect Game");
- img.font.DrawText(tab, 280 + lineCount * 50, "1500");
- lineCount++;
- }
- */
-
/// display the final score
if (lineCount < lineLimit)
{
int medianstart = 3000 + (lineCount) * 500;
- img.largeFont.DrawText(xpt, 280 + lineCount * 50, "Final Score:");
- img.largeFont.DrawText(tab, 280 + lineCount * 50,
+ img.font.DrawText(xpt, 280 + lineCount * 50, "Final Score:");
+ img.font.DrawText(tab, 280 + lineCount * 50,
((int)Math.Min(newscore, getScore() + (median - medianstart) / countRate)).ToString());
lineCount++;
@@ -3506,7 +3491,7 @@
if (amount >= 1000)
scale *= 1.2;
- img.font.SetScale(scale, scale);
+ img.font.Size = (int)(14 * scale);
Size size = img.font.MeasureString(str);
int width = size.Width;
@@ -3561,24 +3546,24 @@
int y = mybyte.gety;
string amount = mybyte.getAmount();
- img.largeFont.Color = Color.Black;
- img.largeFont.Alpha = (mybyte.getAlpha());
- img.largeFont.SetScale(mybyte.Scale / 2.0, mybyte.Scale / 2.0);
+ img.font.Size = 24;
+ img.font.Color = Color.Black;
+ img.font.Alpha = (mybyte.getAlpha());
+ img.font.Size = (int)(24 * mybyte.Scale / 2.0);
- img.largeFont.DrawText(x + 1, y, amount);
- img.largeFont.DrawText(x - 1, y, amount);
- img.largeFont.DrawText(x, y + 1, amount);
- img.largeFont.DrawText(x, y - 1, amount);
+ img.font.DrawText(x + 1, y, amount);
+ img.font.DrawText(x - 1, y, amount);
+ img.font.DrawText(x, y + 1, amount);
+ img.font.DrawText(x, y - 1, amount);
+ img.font.Color = mybyte.getColor();
+ img.font.Alpha = (mybyte.getAlpha());
- img.largeFont.Color = mybyte.getColor();
- img.largeFont.Alpha = (mybyte.getAlpha());
+ img.font.DrawText(x, y, amount);
- img.largeFont.DrawText(x, y, amount);
-
}
- img.largeFont.SetScale(1.0, 1.0);
+ img.font.Size = 14;
}
void dropPowerUp(int myx, int myy, CPowerUp.PowerupTypes type)
@@ -3896,56 +3881,58 @@
Color.FromArgb(0, 0, 0, 100)
);
- img.largeFont.Color = Color.White;
+ img.font.Size = 24;
+
+ img.font.Color = Color.White;
if (mousex > 100 - 20 && mousex < 500 && mousey > 100 && mousey < 130)
{
- img.largeFont.Color = Color.Yellow;
+ img.font.Color = Color.Yellow;
}
- img.largeFont.DrawText(100, 100, "[START THE GAME]");
- img.largeFont.Color = Color.White;
+ img.font.DrawText(100, 100, "[START THE GAME]");
+ img.font.Color = Color.White;
if (mousex > 100 - 20 && mousex < 500 && mousey > 130 && mousey < 160)
{
- img.largeFont.Color = Color.Yellow;
+ img.font.Color = Color.Yellow;
}
- img.largeFont.DrawText(100, 130, "[LEVEL EDITOR]");
- img.largeFont.Color = Color.White;
+ img.font.DrawText(100, 130, "[LEVEL EDITOR]");
+ img.font.Color = Color.White;
if (mousex > 100 - 20 && mousex < 500 && mousey > 160 && mousey < 190)
{
- img.largeFont.Color = Color.Yellow;
+ img.font.Color = Color.Yellow;
}
- img.largeFont.DrawText(100, 160, "[QUIT]");
- img.largeFont.Color = Color.White;
+ img.font.DrawText(100, 160, "[QUIT]");
+ img.font.Color = Color.White;
if (mousex > 100 - 20 && mousex < 500 && mousey > 190 && mousey < 220)
{
- img.largeFont.Color = Color.Yellow;
+ img.font.Color = Color.Yellow;
}
- img.largeFont.DrawText(100, 190, "[Full Screen / Windowed]");
- img.largeFont.Color = Color.White;
+ img.font.DrawText(100, 190, "[Full Screen / Windowed]");
+ img.font.Color = Color.White;
if (mousex > 100 - 20 && mousex < 500 && mousey > 220 && mousey < 250)
{
- img.largeFont.Color = Color.Yellow;
+ img.font.Color = Color.Yellow;
}
- if (bgscroll) img.largeFont.DrawText(100, 220, "[Background Scroll On]");
- if (!bgscroll) img.largeFont.DrawText(100, 220, "[Background Scroll Off]");
- img.largeFont.Color = Color.White;
+ if (bgscroll) img.font.DrawText(100, 220, "[Background Scroll On]");
+ if (!bgscroll) img.font.DrawText(100, 220, "[Background Scroll Off]");
+ img.font.Color = Color.White;
if (mousex > 100 - 20 && mousex < 500 && mousey > 250 && mousey < 280)
{
- img.largeFont.Color = Color.Yellow;
+ img.font.Color = Color.Yellow;
}
- if (vsync) img.largeFont.DrawText(100, 250, "[VSync On]");
- if (!vsync) img.largeFont.DrawText(100, 250, "[VSync Off]");
- img.largeFont.Color = Color.White;
+ if (vsync) img.font.DrawText(100, 250, "[VSync On]");
+ if (!vsync) img.font.DrawText(100, 250, "[VSync Off]");
+ img.font.Color = Color.White;
if (mousex > 100 - 20 && mousex < 500 && mousey > 280 && mousey < 310)
{
- img.largeFont.Color = Color.Yellow;
+ img.font.Color = Color.Yellow;
}
- if (playmusic) img.largeFont.DrawText(100, 280, "[Play Music]");
- if (!playmusic) img.largeFont.DrawText(100, 280, "[Do not play Music]");
- img.largeFont.Color = Color.White;
+ if (playmusic) img.font.DrawText(100, 280, "[Play Music]");
+ if (!playmusic) img.font.DrawText(100, 280, "[Do not play Music]");
+ img.font.Color = Color.White;
// Draw high scores
- img.largeFont.DrawText(500, 100, "High scores");
+ img.font.DrawText(500, 100, "High scores");
for (int i = 0; i < highscores.Count; i++)
@@ -3963,7 +3950,7 @@
img.xlogo.Update();
img.xlogo.Draw(640, 350);
-
+ img.font.Size = 14;
img.font.Color = Color.White;
img.font.DrawText(100, 540, "Ball: Buster, by Patrick Avella (C) 2004");
@@ -3973,17 +3960,18 @@
}
else
{
-
+ img.font.Size = 24;
if ((int)Timing.TotalMilliseconds % 100 < 50)
- img.largeFont.Color = Color.FromArgb(255, 120, 120);
+ img.font.Color = Color.FromArgb(255, 120, 120);
else
- img.largeFont.Color = Color.White;
+ img.font.Color = Color.White;
- img.largeFont.DrawText(200, 30, "Move mouse for title screen.");
+ img.font.DrawText(200, 30, "Move mouse for title screen.");
- img.largeFont.Color = Color.White;
+ img.font.Color = Color.White;
}
+ img.font.Size = 14;
img.font.DrawText(100, 500, "Starting on level " + (beginningWorld + 1) + " - " + (beginningLevel + 1));
@@ -4033,6 +4021,7 @@
// Draw whatever text
string message = "EDITING LEVEL: " + (world + 1).ToString() + "-" + (level + 1);
+ img.font.Size = 14;
img.font.Color = Color.White;
img.font.DrawText(13, 583, message);
@@ -4332,7 +4321,7 @@
}
- img.font.SetScale(1.0f, 1.0f);
+ img.font.Size = 14;
img.font.Color = Color.White;
}
Modified: trunk/Examples/ExampleUnitTests/ExampleUnitTests.csproj
===================================================================
--- trunk/Examples/ExampleUnitTests/ExampleUnitTests.csproj 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/ExampleUnitTests/ExampleUnitTests.csproj 2014-09-03 06:08:28 UTC (rev 1508)
@@ -26,6 +26,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Modified: trunk/Examples/Pong/Pong.cs
===================================================================
--- trunk/Examples/Pong/Pong.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/Pong/Pong.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -4,10 +4,9 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.InputLib;
-using AgateLib.Platform.WindowsForms.ApplicationModels;
-using AgateLib.Platform.WindowsForms.Resources;
using AgateLib.ApplicationModels;
using AgateLib.InputLib.Legacy;
+using AgateLib.Platform.WinForms.ApplicationModels;
namespace Pong
{
@@ -30,7 +29,7 @@
});
}
- FontSurface font;
+ Font font;
int[] score = new int[2];
string[] names = new string[] { "Player", "CPU" };
@@ -51,7 +50,8 @@
void Run(string[] args)
{
- font = BuiltinResources.AgateSans14;
+ font = AgateLib.Assets.Fonts.AgateSans;
+ font.Size = 14;
paddle[0] = new Vector2(50, displayHeight / 2);
paddle[1] = new Vector2(playAreaWidth - 50 - paddleWidth, displayHeight / 2);
Modified: trunk/Examples/Pong/Pong.csproj
===================================================================
--- trunk/Examples/Pong/Pong.csproj 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/Pong/Pong.csproj 2014-09-03 06:08:28 UTC (rev 1508)
@@ -70,6 +70,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
+ <UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
@@ -112,9 +113,17 @@
</Compile>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj">
+ <ProjectReference Include="..\..\AgateLib.AgateSDL\AgateLib.AgateSDL.csproj">
+ <Project>{935d67a0-931e-46de-9f6a-2d6dbc99aff3}</Project>
+ <Name>AgateLib.AgateSDL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.OpenGL\AgateLib.OpenGL.csproj">
+ <Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project>
+ <Name>AgateLib.OpenGL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj">
<Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
- <Name>AgateLib.Platform.WindowsForms</Name>
+ <Name>AgateLib.Platform.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{D62BD453-79AC-4A8D-8E75-F85FFF533E4D}</Project>
Modified: trunk/Examples/ShootTheTraps/App.cs
===================================================================
--- trunk/Examples/ShootTheTraps/App.cs 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/ShootTheTraps/App.cs 2014-09-03 06:08:28 UTC (rev 1508)
@@ -6,14 +6,14 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.InputLib;
-using AgateLib.Platform.WindowsForms.Resources;
using AgateLib.Platform;
-using AgateLib.Platform.WindowsForms.ApplicationModels;
using AgateLib.InputLib.Legacy;
+using AgateLib.ApplicationModels;
+using AgateLib.Platform.WinForms.ApplicationModels;
namespace ShootTheTraps
{
- class App : AgateGame
+ class App : Scene
{
/// <summary>
/// The main entry point for the application.
@@ -21,7 +21,12 @@
[STAThread]
static void Main(string[] args)
{
- new PassiveModel(args).Run(() => new App().Run(args));
+ SceneModelParameters p = new SceneModelParameters(args);
+ p.ApplicationName = "Shoot the Traps";
+ p.CoordinateSystem = new AgateLib.Geometry.CoordinateSystems.SingleFixedDimension();
+ SceneModel model = new SceneModel(p);
+
+ model.Run(new App());
}
// Game declarations
@@ -35,14 +40,14 @@
ShootTraps mGame;
// graphics declaration
- FontSurface mFont;
- FontSurface mLargeFont;
+ Font mFont;
Surface mBackground;
- protected override void Initialize()
+ protected override void OnSceneStart()
{
- mFont = BuiltinResources.AgateSans14;
- mLargeFont = BuiltinResources.AgateSans24;
+ mFont = AgateLib.Assets.Fonts.AgateSans;
+ mFont.Size = 14;
+
mBackground = new Surface("Resources/background.png");
Mouse.MouseDown += new InputEventHandler(Mouse_MouseDown);
@@ -59,7 +64,7 @@
readonly string mIntroduction = @"{1}Shoot the Traps{2}
-You mission: Destroy as many filthy traps as you can.
+Your mission: Destroy as many filthy traps as you can.
These are traps: {0}
They are ugly.
@@ -88,7 +93,7 @@
mIntroLines = mIntroduction.Split('\n');
}
- FontSurface font = mFont;
+ Font font = mFont;
int largestWidth = 0;
@@ -98,7 +103,7 @@
}
// center introduction text
- Point textPt = new Point((Display.RenderTarget.Width - largestWidth) / 2, 20);
+ Point textPt = new Point((Display.Coordinates.Width - largestWidth) / 2, 20);
Rectangle boxArea = new Rectangle(
textPt.X - 10,
textPt.Y - 10,
@@ -118,6 +123,8 @@
textPt.Y += font.FontHeight;
}
+
+ Display.FillRect(0, 0, 320, 240, Color.FromArgb(128, 128, 0, 0));
}
#endregion
@@ -130,30 +137,18 @@
}
}
- protected override string ApplicationTitle
+ public override void Update(double time_ms)
{
- get { return "Shoot the Traps"; }
- }
- protected override void AdjustAppInitParameters(ref AppInitParameters initParams)
- {
- initParams.ShowSplashScreen = false;
- }
- protected override Size WindowSize
- {
- get { return new Size(1280, 720); }
- }
- protected override void Update(double time_ms)
- {
if (mShowIntro)
return;
mGame.Update(Display.DeltaTime);
UpdateDisplay();
}
- protected override void Render()
+ public override void Draw()
{
Display.Clear(Color.LightBlue);
- mBackground.Draw(new Rectangle(Point.Empty, WindowSize));
+ mBackground.Draw(Display.Coordinates);
if (mShowIntro)
{
@@ -208,7 +203,7 @@
private void NewGame()
{
- mGame = new ShootTraps(Display.RenderTarget.Width, Display.RenderTarget.Height - 50);
+ mGame = new ShootTraps(Display.Coordinates.Width, Display.Coordinates.Height - 50);
mDisplayedScore = 0;
mGameOverTime = 0;
mDisplayedMultiplier = 1;
@@ -321,46 +316,46 @@
}
private void DrawLevelBeginText()
{
- mLargeFont.SetScale(2, 2);
+ mFont.Size = 48;
- int textHeight = mLargeFont.FontHeight * 3;
+ int textHeight = mFont.FontHeight * 3;
int textY = 160;
Display.FillRect(
- new Rectangle(0, textY, Display.RenderTarget.Width, textHeight),
+ new Rectangle(0, textY, Display.Coordinates.Width, textHeight),
Color.FromArgb(128, Color.Black));
// back the border color for the text oscillate between red and black
int r = (int)(255 * Math.Abs(Math.Sin(12 * (Timing.TotalMilliseconds - mLevelTime) / mLevelTextTotalTime)));
var borderColor = Color.FromArgb(r, 0, 0);
- CenterText(mLargeFont, textY, "Level " + mGame.Level, Color.White, borderColor);
+ CenterText(mFont, textY, "Level " + mGame.Level, Color.White, borderColor);
- mLargeFont.SetScale(1, 1);
- CenterText(mLargeFont, textY + mLargeFont.FontHeight * 2, mGame.LevelMessage, Color.White, borderColor);
+ mFont.Size = 24;
+ CenterText(mFont, textY + mFont.FontHeight * 2, mGame.LevelMessage, Color.White, borderColor);
if (Timing.TotalMilliseconds - mLevelTime > mLevelTextTotalTime)
mLevelTime = 0;
}
private void DrawLevelEndText()
{
- mLargeFont.SetScale(2, 2);
+ mFont.Size = 48;
- int textHeight = mLargeFont.FontHeight * 3;
+ int textHeight = mFont.FontHeight * 3;
int textY = 160;
Display.FillRect(
- new Rectangle(0, textY, Display.RenderTarget.Width, textHeight),
+ new Rectangle(0, textY, Display.Coordinates.Width, textHeight),
Color.FromArgb(128, Color.Black));
// back the border color for the text oscillate between red and black
int b = (int)(255 * Math.Abs(Math.Sin(12 * (Timing.TotalMilliseconds - mLevelTime) / mLevelTextTotalTime)));
var borderColor = Color.FromArgb(0, 0, b);
- CenterText(mLargeFont, textY, "End of Level " + mGame.Level, Color.White, borderColor);
+ CenterText(mFont, textY, "End of Level " + mGame.Level, Color.White, borderColor);
- mLargeFont.SetScale(1, 1);
- CenterText(mLargeFont, textY + mLargeFont.FontHeight * 2,
+ mFont.Size = 24;
+ CenterText(mFont, textY + mFont.FontHeight * 2,
"BONUS for remaining pulls: " + mGame.BonusPoints.ToString(),
Color.White, borderColor);
@@ -378,20 +373,20 @@
double extraScaleFactor = -3 * (1.1 - Math.Pow(deltaTime, 2));
double scale = 3 + extraScaleFactor;
- mFont.SetScale(scale, scale);
+ mFont.Size = (int)(14 * scale);
CenterText(mFont, (int)(200 + fontHeight - scale * fontHeight / 2.0),
"GAME OVER", Color.White, Color.Black);
- mFont.SetScale(1.5, 1.5);
+ mFont.Size = 21;
if (ContinueYet)
- CenterText(mFont, 240 + (int)(fontHeight * mFont.ScaleHeight), "Click to restart", Color.White, Color.Black);
+ CenterText(mFont, 240 + (int)(mFont.FontHeight), "Click to restart", Color.White, Color.Black);
}
private void DrawBonusText()
{
int textY = 160;
- mFont.SetScale(2, 2);
+ mFont.Size = 28;
Color bonusColor = Color.White;
@@ -399,11 +394,11 @@
bonusColor = Color.Yellow;
Display.FillRect(
- new Rectangle(0, textY, Display.RenderTarget.Width, mFont.FontHeight * 4),
+ new Rectangle(0, textY, Display.Coordinates.Width, mFont.FontHeight * 4),
Color.FromArgb(128, Color.Black));
CenterText(mFont, textY, "HIT " + mGame.TrapsHit + " TRAPS", Color.White, Color.Black);
- textY += (int)(mFont.FontHeight * mFont.ScaleHeight);
+ textY += mFont.FontHeight;
CenterText(mFont, textY, "BONUS: " + mGame.BonusPoints, bonusColor, Color.Black);
@@ -416,57 +411,59 @@
private int DrawBottomStatus()
{
mFont.Color = Color.White;
- mFont.SetScale(1, 1);
+ mFont.Size = 14;
int fontHeight = mFont.FontHeight;
int textBoxHeight = mFont.FontHeight * 2;
- Point textStart = new Point(10, Display.RenderTarget.Height - textBoxHeight);
+ Point textStart = new Point(10, Display.Coordinates.Height - textBoxHeight);
if (mShowHelpText && mLevelTime == 0)
{
mFont.DrawText(textStart.X, textStart.Y - fontHeight, "Left-click to shoot... Right-click to release traps.");
}
- Display.FillRect(new Rectangle(0, textStart.Y, Display.RenderTarget.Width, textBoxHeight), Color.Black);
+ Display.FillRect(new Rectangle(0, textStart.Y, Display.Coordinates.Width, textBoxHeight), Color.Black);
- textStart.X = Display.RenderTarget.Width / 4;
+ textStart.X = Display.Coordinates.Width / 4;
mFont.DrawText(textStart.X, textStart.Y, "Score: " + mDisplayedScore);
mFont.DrawText(textStart.X, textStart.Y + fontHeight, "Need: " +
Math.Max(0, mGame.LevelRequirement - mGame.PointsThisLevel + (mGame.Score - mDisplayedScore)));
if (mGame.ScoreMultiplier != 1)
- CenterText(mLargeFont, textStart.Y, "x " + mGame.ScoreMultiplier.ToString(), Color.White);
+ {
+ mFont.Size = 24;
+ CenterText(mFont, textStart.Y, "x " + mGame.ScoreMultiplier.ToString(), Color.White);
+ }
- textStart.X = Display.RenderTarget.Width * 3 / 4;
+ mFont.Size = 14;
+ textStart.X = Display.Coordinates.Width * 3 / 4;
mFont.DrawText(textStart.X, textStart.Y, "Level: " + mGame.Level);
mFont.DrawText(textStart.X, textStart.Y + fontHeight, "Pulls Left: " + mGame.PullsLeft);
return fontHeight;
}
- private void CenterText(FontSurface font, int y, string text, Color color)
+ private void CenterText(Font font, int y, string text, Color color)
{
Size size = font.MeasureString(text);
- int x = (Display.RenderTarget.Width - size.Width) / 2;
+ int x = (Display.Coordinates.Width - size.Width) / 2;
font.Color = color;
font.DrawText(x, y, text);
}
- private void CenterText(FontSurface font, int y, string text, Color color, Color borderColor)
+ private void CenterText(Font font, int y, string text, Color color, Color borderColor)
{
Size size = font.MeasureString(text);
- int x = (Display.RenderTarget.Width - size.Width) / 2;
+ int x = (Display.Coordinates.Width - size.Width) / 2;
DrawBorderedText(font, x, y, text, color, borderColor);
-
-
}
- private static void DrawBorderedText(FontSurface font, int x, int y, string text, Color color, Color borderColor)
+ private static void DrawBorderedText(Font font, int x, int y, string text, Color color, Color borderColor)
{
font.Color = borderColor;
font.DrawText(x + 1, y, text);
Modified: trunk/Examples/ShootTheTraps/ShootTheTraps.csproj
===================================================================
--- trunk/Examples/ShootTheTraps/ShootTheTraps.csproj 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples/ShootTheTraps/ShootTheTraps.csproj 2014-09-03 06:08:28 UTC (rev 1508)
@@ -17,6 +17,7 @@
</UpgradeBackupLocation>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkProfile />
+ <_ResolveReferenceDependencies>true</_ResolveReferenceDependencies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -99,9 +100,17 @@
</Compile>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj">
+ <ProjectReference Include="..\..\AgateLib.AgateSDL\AgateLib.AgateSDL.csproj">
+ <Project>{935d67a0-931e-46de-9f6a-2d6dbc99aff3}</Project>
+ <Name>AgateLib.AgateSDL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.OpenGL\AgateLib.OpenGL.csproj">
+ <Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project>
+ <Name>AgateLib.OpenGL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj">
<Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
- <Name>AgateLib.Platform.WindowsForms</Name>
+ <Name>AgateLib.Platform.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{198C4842-0000-0000-0000-000000000000}</Project>
Modified: trunk/Examples.sln
===================================================================
--- trunk/Examples.sln 2014-09-03 02:44:28 UTC (rev 1507)
+++ trunk/Examples.sln 2014-09-03 06:08:28 UTC (rev 1508)
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
-VisualStudioVersion = 12.0.30501.0
+VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BallBuster.Net", "Examples\BallBuster.Net\BallBuster.Net.csproj", "{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}"
EndProject
@@ -13,10 +13,12 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleUnitTests", "Examples\ExampleUnitTests\ExampleUnitTests.csproj", "{829927...
[truncated message content] |
|
From: <ka...@us...> - 2014-09-03 02:44:36
|
Revision: 1507
http://sourceforge.net/p/agate/code/1507
Author: kanato
Date: 2014-09-03 02:44:28 +0000 (Wed, 03 Sep 2014)
Log Message:
-----------
Minor fixes.
Modified Paths:
--------------
trunk/AgateLib/IO/SubDirectoryProvider.cs
trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj
trunk/AgateLib.OpenGL/GL3/Shaders/ShaderSources.Designer.cs
trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs
Modified: trunk/AgateLib/IO/SubDirectoryProvider.cs
===================================================================
--- trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-09-03 01:28:46 UTC (rev 1506)
+++ trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-09-03 02:44:28 UTC (rev 1507)
@@ -41,11 +41,16 @@
public override string ToString()
{
- return parent.ToString() + subdir;
+ return System.IO.Path.Combine(parent.ToString(), subdir);
}
public async Task<System.IO.Stream> OpenReadAsync(string filename)
{
- return await parent.OpenReadAsync(subdir + filename);
+ if (System.IO.Path.IsPathRooted(filename) == false)
+ {
+ return await parent.OpenReadAsync(subdir + filename);
+ }
+ else
+ return await parent.OpenReadAsync(filename);
}
public bool FileExists(string filename)
Modified: trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj
===================================================================
--- trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj 2014-09-03 01:28:46 UTC (rev 1506)
+++ trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj 2014-09-03 02:44:28 UTC (rev 1507)
@@ -7,8 +7,8 @@
<ProjectGuid>{94734E5A-0344-43E8-BB30-E32E3F57F611}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>AgateLib.GL</RootNamespace>
- <AssemblyName>AgateLib.GL</AssemblyName>
+ <RootNamespace>AgateLib.OpenGL</RootNamespace>
+ <AssemblyName>AgateLib.OpenGL</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
Modified: trunk/AgateLib.OpenGL/GL3/Shaders/ShaderSources.Designer.cs
===================================================================
--- trunk/AgateLib.OpenGL/GL3/Shaders/ShaderSources.Designer.cs 2014-09-03 01:28:46 UTC (rev 1506)
+++ trunk/AgateLib.OpenGL/GL3/Shaders/ShaderSources.Designer.cs 2014-09-03 02:44:28 UTC (rev 1507)
@@ -39,7 +39,7 @@
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AgateLib.GL.GL3.Shaders.ShaderSources", typeof(ShaderSources).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AgateLib.OpenGL.GL3.Shaders.ShaderSources", typeof(ShaderSources).Assembly);
resourceMan = temp;
}
return resourceMan;
Modified: trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs 2014-09-03 01:28:46 UTC (rev 1506)
+++ trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs 2014-09-03 02:44:28 UTC (rev 1507)
@@ -39,7 +39,7 @@
/// There is no SQL query engine, however LINQ should be adequate
/// for any query needs.
/// </remarks>
- public class AgateDatabase : IDisposable , IXleSerializable
+ public class AgateDatabase : IDisposable, IXleSerializable
{
private AgateTableDictionary mTables;
@@ -57,7 +57,7 @@
/// <returns></returns>
public static AgateDatabase FromFile(string filename)
{
- AgateDatabase db = ReadDatabase(new AgateLib.Platform.WinForms.IO.ZipFileProvider(filename)).Result;
+ AgateDatabase db = ReadDatabase(new AgateLib.Platform.WinForms.IO.ZipFileProvider(AgateLib.IO.FileProvider.Assets.ResolveFile(filename))).Result;
db.mTables.OwnFileProvider = true;
return db;
@@ -186,7 +186,7 @@
foreach (var table in mTables)
{
-
+
try
{
table.Validate();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-03 01:28:49
|
Revision: 1506
http://sourceforge.net/p/agate/code/1506
Author: kanato
Date: 2014-09-03 01:28:46 +0000 (Wed, 03 Sep 2014)
Log Message:
-----------
Fix version in Build.proj.
Modified Paths:
--------------
trunk/Build.proj
Modified: trunk/Build.proj
===================================================================
--- trunk/Build.proj 2014-09-03 01:26:12 UTC (rev 1505)
+++ trunk/Build.proj 2014-09-03 01:28:46 UTC (rev 1506)
@@ -8,16 +8,16 @@
<!-- Version Number -->
<PropertyGroup Condition=" '$(SVN_REVISION)' == '' ">
- <Version>1.0.0.0</Version>
- <FileVersion>1.0.0.0</FileVersion>
- <InformationalVersion>1.0.0.0</InformationalVersion>
+ <Version>2.0.0.0</Version>
+ <FileVersion>2.0.0.0</FileVersion>
+ <InformationalVersion>2.0.0.0</InformationalVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(SVN_REVISION)' != '' ">
<!-- Build Server Number -->
- <Version>1.0.$(BUILD_NUMBER).$(SVN_REVISION)</Version>
- <FileVersion>1.0.$(BUILD_NUMBER).$(SVN_REVISION)</FileVersion>
- <InformationalVersion>1.0.$(BUILD_NUMBER).$(SVN_REVISION)</InformationalVersion>
+ <Version>2.0.$(BUILD_NUMBER).$(SVN_REVISION)</Version>
+ <FileVersion>2.0.$(BUILD_NUMBER).$(SVN_REVISION)</FileVersion>
+ <InformationalVersion>2.0.$(BUILD_NUMBER).$(SVN_REVISION)</InformationalVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(BuildConfiguration)' == '' ">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-03 01:26:21
|
Revision: 1505
http://sourceforge.net/p/agate/code/1505
Author: kanato
Date: 2014-09-03 01:26:12 +0000 (Wed, 03 Sep 2014)
Log Message:
-----------
Fix Build.proj to not delete package binaries after they are downloaded.
Modified Paths:
--------------
trunk/Build.proj
Modified: trunk/Build.proj
===================================================================
--- trunk/Build.proj 2014-09-03 00:59:05 UTC (rev 1504)
+++ trunk/Build.proj 2014-09-03 01:26:12 UTC (rev 1505)
@@ -25,7 +25,7 @@
</PropertyGroup>
<Target Name="Clean">
- <DeleteTree Directories="**\obj\**;**\bin\**" />
+ <DeleteTree Directories="**\obj\**;AgateLib**\bin\**;" />
</Target>
<Target Name="UpdateVersion">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-03 00:59:13
|
Revision: 1504
http://sourceforge.net/p/agate/code/1504
Author: kanato
Date: 2014-09-03 00:59:05 +0000 (Wed, 03 Sep 2014)
Log Message:
-----------
Fix construction of objects during XLE serialization.
Fixed exception in NamedColorStaticProperty method.
Modified Paths:
--------------
trunk/AgateLib/Algorithms/PathFinding/AStar.cs
trunk/AgateLib/DisplayLib/Font.cs
trunk/AgateLib/Geometry/Color.cs
trunk/AgateLib/Platform/PlatformSerialization.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs
trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj
trunk/AgateLib.Tests/UnitTests/UserInterface/Css/LayoutTest.cs
Added Paths:
-----------
trunk/AgateLib.Tests/UnitTests/Geometry/
trunk/AgateLib.Tests/UnitTests/Geometry/ColorTests.cs
Modified: trunk/AgateLib/Algorithms/PathFinding/AStar.cs
===================================================================
--- trunk/AgateLib/Algorithms/PathFinding/AStar.cs 2014-09-02 15:36:05 UTC (rev 1503)
+++ trunk/AgateLib/Algorithms/PathFinding/AStar.cs 2014-09-03 00:59:05 UTC (rev 1504)
@@ -77,17 +77,19 @@
/// task.CompletedCallBack is ignored.
/// </summary>
/// <param name="task"></param>
- public void FindPathSync(AStarState<T> task)
+ public void FindPathSync(AStarState<T> state)
{
try
{
- task.SearchingPath = true;
+ state.SearchingPath = true;
- FindPath(task).RunSynchronously();
+ var task = FindPath(state);
+
+ task.Wait();
}
finally
{
- task.SearchingPath = false;
+ state.SearchingPath = false;
}
}
Modified: trunk/AgateLib/DisplayLib/Font.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Font.cs 2014-09-02 15:36:05 UTC (rev 1503)
+++ trunk/AgateLib/DisplayLib/Font.cs 2014-09-03 00:59:05 UTC (rev 1504)
@@ -189,10 +189,14 @@
{
FontSurface.DrawText(x, y, text, Parameters);
}
- public void DrawTest(double x, double y, string text)
+ public void DrawText(double x, double y, string text)
{
FontSurface.DrawText(x, y, text);
}
+ public void DrawText(PointF dest, string text)
+ {
+ FontSurface.DrawText(dest, text);
+ }
public Size MeasureString(string text)
{
Modified: trunk/AgateLib/Geometry/Color.cs
===================================================================
--- trunk/AgateLib/Geometry/Color.cs 2014-09-02 15:36:05 UTC (rev 1503)
+++ trunk/AgateLib/Geometry/Color.cs 2014-09-03 00:59:05 UTC (rev 1504)
@@ -602,7 +602,9 @@
static System.Reflection.PropertyInfo NamedColorStaticProperty(string name)
{
- var retval = typeof(Color).GetTypeInfo().DeclaredProperties.First(
+ var colorType = typeof(Color).GetTypeInfo();
+
+ var retval = colorType.DeclaredProperties.FirstOrDefault(
x => x.PropertyType == typeof(Color) &&
x.GetMethod.IsStatic && x.GetMethod.IsPublic &&
x.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
Modified: trunk/AgateLib/Platform/PlatformSerialization.cs
===================================================================
--- trunk/AgateLib/Platform/PlatformSerialization.cs 2014-09-02 15:36:05 UTC (rev 1503)
+++ trunk/AgateLib/Platform/PlatformSerialization.cs 2014-09-03 00:59:05 UTC (rev 1504)
@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
namespace AgateLib.Platform.Common.PlatformImplementation
@@ -10,7 +11,19 @@
{
public object CreateInstance(Type t)
{
- return Activator.CreateInstance(t, true);
+ var typeinfo = t.GetTypeInfo();
+
+ foreach(var constructor in typeinfo.DeclaredConstructors)
+ {
+ if (constructor.IsStatic) continue;
+ if (constructor.IsAbstract) continue;
+ if (constructor.GetParameters().Length == 0)
+ {
+ return constructor.Invoke(null);
+ }
+ }
+
+ throw new InvalidOperationException("Could not find constructor for " + typeinfo.Name);
}
}
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs 2014-09-02 15:36:05 UTC (rev 1503)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs 2014-09-03 00:59:05 UTC (rev 1504)
@@ -1,5 +1,6 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
+using AgateLib.Geometry.CoordinateSystems;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -12,14 +13,13 @@
{
public FakeRenderTarget()
{
- CoordinateSystem = new Rectangle(0, 0, 640, 400);
+ CoordinateSystem = new NativeCoordinates();
}
public int Height { get { return 400; } }
public int Width { get { return 640; } }
public Size Size { get { return new Size(Width, Height); } }
- public Rectangle CoordinateSystem { get; set; }
- ICoordinateSystemCreator IFrameBuffer.CoordinateSystem { get; set; }
+ public ICoordinateSystemCreator CoordinateSystem { get;set;}
}
}
Modified: trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj
===================================================================
--- trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj 2014-09-02 15:36:05 UTC (rev 1503)
+++ trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj 2014-09-03 00:59:05 UTC (rev 1504)
@@ -100,6 +100,7 @@
<Compile Include="Display\DisplayWindowTest.cs" />
<Compile Include="Display\FontTests.cs" />
<Compile Include="Extensions\ListExtensions.cs" />
+ <Compile Include="Geometry\ColorTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Platform\PlatformTests.cs" />
<Compile Include="Resources\SerializationTest.cs" />
Added: trunk/AgateLib.Tests/UnitTests/Geometry/ColorTests.cs
===================================================================
--- trunk/AgateLib.Tests/UnitTests/Geometry/ColorTests.cs (rev 0)
+++ trunk/AgateLib.Tests/UnitTests/Geometry/ColorTests.cs 2014-09-03 00:59:05 UTC (rev 1504)
@@ -0,0 +1,38 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Geometry
+{
+ [TestClass]
+ public class ColorTests
+ {
+ [TestMethod]
+ public void NamedColors()
+ {
+ Assert.IsTrue(Color.IsNamedColor("Red"));
+ Assert.IsTrue(Color.IsNamedColor("Green"));
+ Assert.IsTrue(Color.IsNamedColor("Blue"));
+ Assert.IsFalse(Color.IsNamedColor("Atari"));
+
+ Assert.AreEqual(Color.FromArgb(255, 255, 0, 0), Color.Red);
+ }
+
+ [TestMethod]
+ public void ColorValues()
+ {
+ Color test = Color.FromArgb(0x22, 0x33, 0x44, 0x55);
+
+ Assert.AreEqual(0x22, test.A);
+ Assert.AreEqual(0x33, test.R);
+ Assert.AreEqual(0x44, test.G);
+ Assert.AreEqual(0x55, test.B);
+
+ Assert.AreEqual(0x22334455, test.ToArgb());
+ Assert.AreEqual(0x22554433, test.ToAbgr());
+ }
+ }
+}
Modified: trunk/AgateLib.Tests/UnitTests/UserInterface/Css/LayoutTest.cs
===================================================================
--- trunk/AgateLib.Tests/UnitTests/UserInterface/Css/LayoutTest.cs 2014-09-02 15:36:05 UTC (rev 1503)
+++ trunk/AgateLib.Tests/UnitTests/UserInterface/Css/LayoutTest.cs 2014-09-03 00:59:05 UTC (rev 1504)
@@ -38,10 +38,10 @@
FontSurface.FromImpl(new FakeFontSurface { Height = 8 }));
ff.AddFont(new FontSettings(10, FontStyles.None),
- FontSurface.FromImpl(new FakeFontSurface { Height = 8 }));
+ FontSurface.FromImpl(new FakeFontSurface { Height = 10 }));
ff.AddFont(new FontSettings(10, FontStyles.Bold),
- FontSurface.FromImpl(new FakeFontSurface { Height = 8 }));
+ FontSurface.FromImpl(new FakeFontSurface { Height = 10 }));
CssDocument doc = CssDocument.FromText(
"window { layout: column; margin: 6px; padding: 8px;} label { margin-left: 4px; } " +
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-02 15:36:12
|
Revision: 1503
http://sourceforge.net/p/agate/code/1503
Author: kanato
Date: 2014-09-02 15:36:05 +0000 (Tue, 02 Sep 2014)
Log Message:
-----------
Fix compilation errors.
Modified Paths:
--------------
trunk/Tools/FontCreator/FontCreator.cs
Modified: trunk/Tools/FontCreator/FontCreator.cs
===================================================================
--- trunk/Tools/FontCreator/FontCreator.cs 2014-09-02 06:43:15 UTC (rev 1502)
+++ trunk/Tools/FontCreator/FontCreator.cs 2014-09-02 15:36:05 UTC (rev 1503)
@@ -169,7 +169,7 @@
if (font != null)
font.Dispose();
- font = new FontSurface(mOptions);
+ font = new FontSurface(AgateLib.Platform.WinForms.Fonts.BitmapFontUtil.ConstructFromOSFont(mOptions));
Draw();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-02 06:43:21
|
Revision: 1502
http://sourceforge.net/p/agate/code/1502
Author: kanato
Date: 2014-09-02 06:43:15 +0000 (Tue, 02 Sep 2014)
Log Message:
-----------
Integration of default fonts into windows store applications.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/Font.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/Drivers/IDisplayFactory.cs
trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs
trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Display.cs
trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/Interpolation.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ParticleTests.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/TextLayout.cs
trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/LargeImage.cs
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/Prerendered.cs
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/RenderTargetContinuous.cs
trunk/AgateLib.Tests/Tests.WinForms/FontTests/BitmapFonts.cs
trunk/AgateLib.Tests/Tests.WinForms/FontTests/FontLineTester.cs
trunk/AgateLib.Tests/Tests.WinForms/FontTests/Fonts.cs
trunk/AgateLib.Tests/Tests.WinForms/Shaders/Hlsl.cs
Added Paths:
-----------
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateMono-10.png
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-10.png
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-14.png
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-24.png
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-10.png
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-14.png
trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Resources.xml
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/9ball.png
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/smoke.png
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/smoke2.png
Removed Paths:
-------------
trunk/AgateLib.Tests/Tests.WinForms/Assets/smoke.png
trunk/AgateLib.Tests/Tests.WinForms/Assets/smoke2.png
Modified: trunk/AgateLib/DisplayLib/Font.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Font.cs 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib/DisplayLib/Font.cs 2014-09-02 06:43:15 UTC (rev 1502)
@@ -163,6 +163,15 @@
get { return mState.DisplayAlignment; }
set { mState.DisplayAlignment = value; }
}
+ public TextImageLayout TextImageLayout
+ {
+ get { return mFontSurfaces.Values.First().TextImageLayout; }
+ set
+ {
+ foreach (var fs in mFontSurfaces.Values)
+ fs.TextImageLayout = value;
+ }
+ }
public void DrawText(string text)
{
@@ -180,6 +189,10 @@
{
FontSurface.DrawText(x, y, text, Parameters);
}
+ public void DrawTest(double x, double y, string text)
+ {
+ FontSurface.DrawText(x, y, text);
+ }
public Size MeasureString(string text)
{
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2014-09-02 06:43:15 UTC (rev 1502)
@@ -52,6 +52,7 @@
/// support, either create a bitmap font, or use one of the built-in
/// ones, like FontSurface.AgateSans14.
/// </remarks>
+ [Obsolete("Do not use this.", true)]
public FontSurface(string fontFamily, float sizeInPoints)
: this(fontFamily, sizeInPoints, FontStyles.None)
{ }
@@ -68,19 +69,23 @@
/// support, either create a bitmap font, or use one of the built-in
/// ones, like FontSurface.AgateSans14.
/// </remarks>
+ [Obsolete("Do not use this.", true)]
public FontSurface(string fontFamily, float sizeInPoints, FontStyles style)
{
- if (sizeInPoints < 1)
- throw new ArgumentOutOfRangeException("Font size must be positive and non-zero, but was " +
- sizeInPoints.ToString() + ".");
-
- mImpl = Core.Factory.DisplayFactory.CreateFont(fontFamily, sizeInPoints, style);
-
- Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose);
-
- System.Diagnostics.Debug.Assert(mImpl != null);
+ throw new InvalidOperationException("Obsolete method.");
}
/// <summary>
+ /// Creates a bitmap font using the options passed in. The Display driver
+ /// must be capable of this, which is indicated in Display.Caps.CanCreateBitmapFont.
+ /// </summary>
+ /// <param name="bitmapOptions"></param>
+ [Obsolete("Do not use this.", true)]
+ public FontSurface(BitmapFontOptions bitmapOptions)
+ {
+ throw new InvalidOperationException("Obsolete method.");
+ }
+
+ /// <summary>
/// Constructs a FontSurface object from a resource.
/// </summary>
/// <param name="resources"></param>
@@ -104,36 +109,24 @@
System.Diagnostics.Debug.Assert(mImpl != null);
}
/// <summary>
- /// Creates a bitmap font using the options passed in. The Display driver
- /// must be capable of this, which is indicated in Display.Caps.CanCreateBitmapFont.
- /// </summary>
- /// <param name="bitmapOptions"></param>
- public FontSurface(BitmapFontOptions bitmapOptions)
- {
- mImpl = Core.Factory.DisplayFactory.CreateFont(bitmapOptions);
-
- Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose);
-
- System.Diagnostics.Debug.Assert(mImpl != null);
- }
-
- /// <summary>
/// Gets the name of the font.
/// </summary>
public string FontName
{
get { return mImpl.FontName; }
}
+
/// <summary>
- /// Private initializer to tell it what impl to use.
+ /// Initializer passing in a FontSurfaceImpl object.
/// </summary>
/// <param name="implToUse"></param>
- private FontSurface(FontSurfaceImpl implToUse)
+ public FontSurface(FontSurfaceImpl implToUse)
{
if (implToUse == null)
throw new ArgumentNullException("implToUse");
mImpl = implToUse;
+ Display.DisposeDisplay += Dispose;
}
/// <summary>
Modified: trunk/AgateLib/Drivers/IDisplayFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-09-02 06:43:15 UTC (rev 1502)
@@ -69,32 +69,18 @@
/// <param name="pixels"></param>
/// <returns></returns>
SurfaceImpl CreateSurface(PixelBuffer pixels);
-
+
/// <summary>
- /// Creates a FontSurfaceImpl derived object based on an operating system font.
+ /// Creates a FrameBufferImpl object of the specified size.
/// </summary>
- /// <param name="fontFamily"></param>
- /// <param name="sizeInPoints"></param>
- /// <param name="style"></param>
- /// <returns></returns>
- FontSurfaceImpl CreateFont(string fontFamily, float sizeInPoints, FontStyles style);
+ /// <param name="size"></param>
+ FrameBufferImpl CreateFrameBuffer(Size size);
/// <summary>
- /// Creates a BitmapFontImpl object from the specified options.
+ /// Initializes the default resources.
/// </summary>
- /// <param name="bitmapOptions"></param>
+ /// <param name="res"></param>
/// <returns></returns>
- FontSurfaceImpl CreateFont(BitmapFontOptions bitmapOptions);
-
-
- /// <summary>
- /// Creates a FrameBufferImpl object of the specified size.
- /// </summary>
- /// <param name="size"></param>
- FrameBufferImpl CreateFrameBuffer(Size size);
-
-
-
Task InitializeDefaultResourcesAsync(Assets.DefaultResources res);
}
}
Modified: trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs
===================================================================
--- trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-09-02 06:43:15 UTC (rev 1502)
@@ -124,9 +124,10 @@
/// Constructs a new AgateResourceCollection object.
/// </summary>
/// <param name="filename"></param>
- public AgateResourceCollection(string filename)
+ public AgateResourceCollection(string filename, IReadFileProvider fileProvider = null)
{
mSurfaceAccessor = new SurfaceResourceList(this);
+ FileProvider = fileProvider;
RootDirectory = System.IO.Path.GetDirectoryName(filename);
@@ -135,7 +136,7 @@
private async Task Load(string filename)
{
- using (Stream s = await FileProvider.OpenReadAsync(filename))
+ using (Stream s = await FileProvider.OpenReadAsync(filename).ConfigureAwait(false))
{
AgateResourceLoader.LoadResources(this, s);
}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-09-02 06:43:15 UTC (rev 1502)
@@ -41,6 +41,27 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<None Include="packages.config" />
+ <Content Include="Assets\Fonts\AgateMono-10.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\Fonts\AgateSans-10.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\Fonts\AgateSans-14.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\Fonts\AgateSans-24.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\Fonts\AgateSerif-10.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\Fonts\AgateSerif-14.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\Resources.xml">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="Resources\Basic2Dpixel.fxo">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Added: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateMono-10.png
===================================================================
(Binary files differ)
Index: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateMono-10.png
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateMono-10.png 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateMono-10.png 2014-09-02 06:43:15 UTC (rev 1502)
Property changes on: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateMono-10.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-10.png
===================================================================
(Binary files differ)
Index: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-10.png
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-10.png 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-10.png 2014-09-02 06:43:15 UTC (rev 1502)
Property changes on: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-10.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-14.png
===================================================================
(Binary files differ)
Index: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-14.png
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-14.png 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-14.png 2014-09-02 06:43:15 UTC (rev 1502)
Property changes on: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-14.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-24.png
===================================================================
(Binary files differ)
Index: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-24.png
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-24.png 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-24.png 2014-09-02 06:43:15 UTC (rev 1502)
Property changes on: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSans-24.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-10.png
===================================================================
(Binary files differ)
Index: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-10.png
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-10.png 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-10.png 2014-09-02 06:43:15 UTC (rev 1502)
Property changes on: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-10.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-14.png
===================================================================
(Binary files differ)
Index: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-14.png
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-14.png 2014-09-01 19:13:43 UTC (rev 1501)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-14.png 2014-09-02 06:43:15 UTC (rev 1502)
Property changes on: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Fonts/AgateSerif-14.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Resources.xml
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Resources.xml (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Assets/Resources.xml 2014-09-02 06:43:15 UTC (rev 1502)
@@ -0,0 +1,1952 @@
+<AgateResources Version="0.3.2">
+ <StringTable />
+ <BitmapFont name="AgateSans-14" image="Fonts/AgateSans-14.png">
+ <Metrics>
+ <Glyph char="32" source="{X=0,Y=2,Width=7,Height=25}" rightOverhang="1" />
+ <Glyph char="33" source="{X=9,Y=2,Width=9,Height=25}" leftOverhang="-3" rightOverhang="4" />
+ <Glyph char="34" source="{X=20,Y=2,Width=9,Height=25}" rightOverhang="1" />
+ <Glyph char="35" source="{X=31,Y=2,Width=17,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="36" source="{X=50,Y=2,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="37" source="{X=65,Y=2,Width=19,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="38" source="{X=86,Y=2,Width=17,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="39" source="{X=105,Y=2,Width=5,Height=25}" rightOverhang="1" />
+ <Glyph char="40" source="{X=112,Y=2,Width=8,Height=25}" rightOverhang="1" />
+ <Glyph char="41" source="{X=122,Y=2,Width=8,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="42" source="{X=132,Y=2,Width=11,Height=25}" rightOverhang="1" />
+ <Glyph char="43" source="{X=145,Y=2,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="44" source="{X=164,Y=2,Width=7,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="45" source="{X=173,Y=2,Width=8,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="46" source="{X=183,Y=2,Width=7,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="47" source="{X=192,Y=2,Width=9,Height=25}" rightOverhang="3" />
+ <Glyph char="48" source="{X=203,Y=2,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="49" source="{X=218,Y=2,Width=13,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="50" source="{X=233,Y=2,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="51" source="{X=0,Y=30,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="52" source="{X=15,Y=30,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="53" source="{X=30,Y=30,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="54" source="{X=45,Y=30,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="55" source="{X=60,Y=30,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="56" source="{X=75,Y=30,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="57" source="{X=90,Y=30,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="58" source="{X=105,Y=30,Width=7,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="59" source="{X=114,Y=30,Width=7,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="60" source="{X=123,Y=30,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="61" source="{X=142,Y=30,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="62" source="{X=161,Y=30,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="63" source="{X=180,Y=30,Width=11,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="64" source="{X=193,Y=30,Width=20,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="65" source="{X=215,Y=30,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="66" source="{X=231,Y=30,Width=14,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="67" source="{X=0,Y=58,Width=14,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="68" source="{X=16,Y=58,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="69" source="{X=34,Y=58,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="70" source="{X=49,Y=58,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="71" source="{X=63,Y=58,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="72" source="{X=81,Y=58,Width=15,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="73" source="{X=98,Y=58,Width=7,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="74" source="{X=107,Y=58,Width=9,Height=25}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="75" source="{X=118,Y=58,Width=15,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="76" source="{X=135,Y=58,Width=12,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="77" source="{X=149,Y=58,Width=17,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="78" source="{X=168,Y=58,Width=15,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="79" source="{X=185,Y=58,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="80" source="{X=203,Y=58,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="81" source="{X=218,Y=58,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="82" source="{X=236,Y=58,Width=14,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="83" source="{X=0,Y=86,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="84" source="{X=15,Y=86,Width=13,Height=25}" rightOverhang="1" />
+ <Glyph char="85" source="{X=30,Y=86,Width=15,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="86" source="{X=47,Y=86,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="87" source="{X=63,Y=86,Width=21,Height=25}" rightOverhang="1" />
+ <Glyph char="88" source="{X=86,Y=86,Width=15,Height=25}" rightOverhang="1" />
+ <Glyph char="89" source="{X=103,Y=86,Width=13,Height=25}" rightOverhang="1" />
+ <Glyph char="90" source="{X=118,Y=86,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="91" source="{X=134,Y=86,Width=8,Height=25}" rightOverhang="1" />
+ <Glyph char="92" source="{X=144,Y=86,Width=9,Height=25}" rightOverhang="3" />
+ <Glyph char="93" source="{X=155,Y=86,Width=8,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="94" source="{X=165,Y=86,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="95" source="{X=184,Y=86,Width=13,Height=25}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="96" source="{X=199,Y=86,Width=11,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="97" source="{X=212,Y=86,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="98" source="{X=226,Y=86,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="99" source="{X=240,Y=86,Width=12,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="100" source="{X=0,Y=114,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="101" source="{X=14,Y=114,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="102" source="{X=30,Y=114,Width=12,Height=25}" leftOverhang="1" rightOverhang="6" />
+ <Glyph char="103" source="{X=44,Y=114,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="104" source="{X=58,Y=114,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="105" source="{X=73,Y=114,Width=6,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="106" source="{X=81,Y=114,Width=8,Height=25}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="107" source="{X=91,Y=114,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="108" source="{X=105,Y=114,Width=6,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="109" source="{X=113,Y=114,Width=18,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="110" source="{X=133,Y=114,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="111" source="{X=148,Y=114,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="112" source="{X=164,Y=114,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="113" source="{X=178,Y=114,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="114" source="{X=192,Y=114,Width=9,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="115" source="{X=203,Y=114,Width=10,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="116" source="{X=215,Y=114,Width=9,Height=25}" rightOverhang="1" />
+ <Glyph char="117" source="{X=226,Y=114,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="118" source="{X=241,Y=114,Width=12,Height=25}" rightOverhang="1" />
+ <Glyph char="119" source="{X=0,Y=142,Width=18,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="120" source="{X=20,Y=142,Width=12,Height=25}" rightOverhang="1" />
+ <Glyph char="121" source="{X=34,Y=142,Width=12,Height=25}" rightOverhang="1" />
+ <Glyph char="122" source="{X=48,Y=142,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="123" source="{X=62,Y=142,Width=13,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="124" source="{X=77,Y=142,Width=7,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="125" source="{X=86,Y=142,Width=13,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="126" source="{X=101,Y=142,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="161" source="{X=120,Y=142,Width=9,Height=25}" leftOverhang="-4" rightOverhang="5" />
+ <Glyph char="162" source="{X=131,Y=142,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="163" source="{X=146,Y=142,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="164" source="{X=161,Y=142,Width=13,Height=25}" rightOverhang="1" />
+ <Glyph char="165" source="{X=176,Y=142,Width=13,Height=25}" rightOverhang="1" />
+ <Glyph char="166" source="{X=191,Y=142,Width=7,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="167" source="{X=200,Y=142,Width=11,Height=25}" rightOverhang="1" />
+ <Glyph char="168" source="{X=213,Y=142,Width=11,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="169" source="{X=226,Y=142,Width=20,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="170" source="{X=0,Y=170,Width=10,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="171" source="{X=12,Y=170,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="172" source="{X=27,Y=170,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="173" source="{X=46,Y=170,Width=8,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="174" source="{X=56,Y=170,Width=20,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="175" source="{X=78,Y=170,Width=11,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="176" source="{X=91,Y=170,Width=11,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="177" source="{X=104,Y=170,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="178" source="{X=123,Y=170,Width=9,Height=25}" rightOverhang="1" />
+ <Glyph char="179" source="{X=134,Y=170,Width=9,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="180" source="{X=145,Y=170,Width=11,Height=25}" leftOverhang="-3" rightOverhang="4" />
+ <Glyph char="181" source="{X=158,Y=170,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="182" source="{X=173,Y=170,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="183" source="{X=188,Y=170,Width=7,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="184" source="{X=197,Y=170,Width=11,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="185" source="{X=210,Y=170,Width=9,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="186" source="{X=221,Y=170,Width=10,Height=25}" rightOverhang="1" />
+ <Glyph char="187" source="{X=233,Y=170,Width=13,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="188" source="{X=0,Y=198,Width=19,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="189" source="{X=21,Y=198,Width=19,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="190" source="{X=42,Y=198,Width=19,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="191" source="{X=63,Y=198,Width=11,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="192" source="{X=76,Y=198,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="193" source="{X=92,Y=198,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="194" source="{X=108,Y=198,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="195" source="{X=124,Y=198,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="196" source="{X=140,Y=198,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="197" source="{X=156,Y=198,Width=14,Height=25}" rightOverhang="1" />
+ <Glyph char="198" source="{X=172,Y=198,Width=19,Height=25}" rightOverhang="1" />
+ <Glyph char="199" source="{X=193,Y=198,Width=14,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="200" source="{X=209,Y=198,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="201" source="{X=224,Y=198,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="202" source="{X=239,Y=198,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="203" source="{X=0,Y=226,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="204" source="{X=15,Y=226,Width=7,Height=25}" rightOverhang="1" />
+ <Glyph char="205" source="{X=24,Y=226,Width=7,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="206" source="{X=33,Y=226,Width=7,Height=25}" rightOverhang="1" />
+ <Glyph char="207" source="{X=42,Y=226,Width=9,Height=25}" rightOverhang="3" />
+ <Glyph char="208" source="{X=53,Y=226,Width=16,Height=25}" rightOverhang="1" />
+ <Glyph char="209" source="{X=71,Y=226,Width=15,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="210" source="{X=88,Y=226,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="211" source="{X=106,Y=226,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="212" source="{X=124,Y=226,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="213" source="{X=142,Y=226,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="214" source="{X=160,Y=226,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="215" source="{X=178,Y=226,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="216" source="{X=197,Y=226,Width=16,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="217" source="{X=215,Y=226,Width=15,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="218" source="{X=232,Y=226,Width=15,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="219" source="{X=0,Y=254,Width=15,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="220" source="{X=17,Y=254,Width=15,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="221" source="{X=34,Y=254,Width=13,Height=25}" rightOverhang="1" />
+ <Glyph char="222" source="{X=49,Y=254,Width=13,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="223" source="{X=64,Y=254,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="224" source="{X=79,Y=254,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="225" source="{X=93,Y=254,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="226" source="{X=107,Y=254,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="227" source="{X=121,Y=254,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="228" source="{X=135,Y=254,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="229" source="{X=149,Y=254,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="230" source="{X=163,Y=254,Width=19,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="231" source="{X=184,Y=254,Width=12,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="232" source="{X=198,Y=254,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="233" source="{X=214,Y=254,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="234" source="{X=230,Y=254,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="235" source="{X=0,Y=282,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="236" source="{X=16,Y=282,Width=8,Height=25}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="237" source="{X=26,Y=282,Width=8,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="238" source="{X=36,Y=282,Width=10,Height=25}" leftOverhang="1" rightOverhang="4" />
+ <Glyph char="239" source="{X=48,Y=282,Width=10,Height=25}" leftOverhang="1" rightOverhang="4" />
+ <Glyph char="240" source="{X=60,Y=282,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="241" source="{X=76,Y=282,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="242" source="{X=91,Y=282,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="243" source="{X=107,Y=282,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="244" source="{X=123,Y=282,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="245" source="{X=139,Y=282,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="246" source="{X=155,Y=282,Width=14,Height=25}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="247" source="{X=171,Y=282,Width=17,Height=25}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="248" source="{X=190,Y=282,Width=14,Height=25}" rightOverhang="3" />
+ <Glyph char="249" source="{X=206,Y=282,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="250" source="{X=221,Y=282,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="251" source="{X=236,Y=282,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="252" source="{X=0,Y=310,Width=13,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="253" source="{X=15,Y=310,Width=12,Height=25}" rightOverhang="1" />
+ <Glyph char="254" source="{X=29,Y=310,Width=12,Height=25}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="255" source="{X=43,Y=310,Width=12,Height=25}" rightOverhang="1" />
+ <Kerning first="45" second="84" value="-1" />
+ <Kerning first="45" second="89" value="-1" />
+ <Kerning first="45" second="221" value="-1" />
+ <Kerning first="70" second="46" value="-1" />
+ <Kerning first="70" second="65" value="-1" />
+ <Kerning first="70" second="97" value="-1" />
+ <Kerning first="70" second="121" value="-1" />
+ <Kerning first="70" second="196" value="-1" />
+ <Kerning first="70" second="225" value="-1" />
+ <Kerning first="70" second="224" value="-1" />
+ <Kerning first="70" second="226" value="-1" />
+ <Kerning first="70" second="228" value="-1" />
+ <Kerning first="70" second="227" value="-1" />
+ <Kerning first="70" second="229" value="-1" />
+ <Kerning first="70" second="192" value="-1" />
+ <Kerning first="70" second="195" value="-1" />
+ <Kerning first="70" second="255" value="-1" />
+ <Kerning first="70" second="194" value="-1" />
+ <Kerning first="70" second="193" value="-1" />
+ <Kerning first="70" second="253" value="-1" />
+ <Kerning first="75" second="45" value="-1" />
+ <Kerning first="76" second="84" value="-1" />
+ <Kerning first="76" second="86" value="-1" />
+ <Kerning first="76" second="87" value="-1" />
+ <Kerning first="76" second="89" value="-1" />
+ <Kerning first="76" second="121" value="-1" />
+ <Kerning first="76" second="255" value="-1" />
+ <Kerning first="76" second="221" value="-1" />
+ <Kerning first="76" second="253" value="-1" />
+ <Kerning first="80" second="46" value="-1" />
+ <Kerning first="84" second="45" value="-1" />
+ <Kerning first="84" second="46" value="-1" />
+ <Kerning first="84" second="58" value="-1" />
+ <Kerning first="84" second="97" value="-1" />
+ <Kerning first="84" second="99" value="-1" />
+ <Kerning first="84" second="101" value="-1" />
+ <Kerning first="84" second="111" value="-1" />
+ <Kerning first="84" second="114" value="-1" />
+ <Kerning first="84" second="115" value="-1" />
+ <Kerning first="84" second="117" value="-1" />
+ <Kerning first="84" second="119" value="-1" />
+ <Kerning first="84" second="121" value="-1" />
+ <Kerning first="84" second="225" value="-1" />
+ <Kerning first="84" second="224" value="-1" />
+ <Kerning first="84" second="226" value="-1" />
+ <Kerning first="84" second="228" value="-1" />
+ <Kerning first="84" second="227" value="-1" />
+ <Kerning first="84" second="229" value="-1" />
+ <Kerning first="84" second="231" value="-1" />
+ <Kerning first="84" second="233" value="-1" />
+ <Kerning first="84" second="232" value="-1" />
+ <Kerning first="84" second="234" value="-1" />
+ <Kerning first="84" second="235" value="-1" />
+ <Kerning first="84" second="243" value="-1" />
+ <Kerning first="84" second="242" value="-1" />
+ <Kerning first="84" second="244" value="-1" />
+ <Kerning first="84" second="246" value="-1" />
+ <Kerning first="84" second="245" value="-1" />
+ <Kerning first="84" second="250" value="-1" />
+ <Kerning first="84" second="249" value="-1" />
+ <Kerning first="84" second="251" value="-1" />
+ <Kerning first="84" second="252" value="-1" />
+ <Kerning first="84" second="171" value="-1" />
+ <Kerning first="84" second="255" value="-1" />
+ <Kerning first="84" second="253" value="-1" />
+ <Kerning first="86" second="46" value="-1" />
+ <Kerning first="86" second="58" value="-1" />
+ <Kerning first="86" second="171" value="-1" />
+ <Kerning first="87" second="46" value="-1" />
+ <Kerning first="89" second="45" value="-1" />
+ <Kerning first="89" second="46" value="-2" />
+ <Kerning first="89" second="58" value="-1" />
+ <Kerning first="89" second="97" value="-1" />
+ <Kerning first="89" second="101" value="-1" />
+ <Kerning first="89" second="111" value="-1" />
+ <Kerning first="89" second="117" value="-1" />
+ <Kerning first="89" second="225" value="-1" />
+ <Kerning first="89" second="224" value="-1" />
+ <Kerning first="89" second="226" value="-1" />
+ <Kerning first="89" second="228" value="-1" />
+ <Kerning first="89" second="227" value="-1" />
+ <Kerning first="89" second="229" value="-1" />
+ <Kerning first="89" second="233" value="-1" />
+ <Kerning first="89" second="232" value="-1" />
+ <Kerning first="89" second="234" value="-1" />
+ <Kerning first="89" second="235" value="-1" />
+ <Kerning first="89" second="243" value="-1" />
+ <Kerning first="89" second="242" value="-1" />
+ <Kerning first="89" second="244" value="-1" />
+ <Kerning first="89" second="246" value="-1" />
+ <Kerning first="89" second="245" value="-1" />
+ <Kerning first="89" second="250" value="-1" />
+ <Kerning first="89" second="249" value="-1" />
+ <Kerning first="89" second="251" value="-1" />
+ <Kerning first="89" second="252" value="-1" />
+ <Kerning first="89" second="171" value="-1" />
+ <Kerning first="114" second="46" value="-1" />
+ <Kerning first="119" second="46" value="-1" />
+ <Kerning first="121" second="46" value="-1" />
+ <Kerning first="187" second="84" value="-1" />
+ <Kerning first="187" second="86" value="-1" />
+ <Kerning first="187" second="89" value="-1" />
+ <Kerning first="187" second="221" value="-1" />
+ <Kerning first="221" second="45" value="-1" />
+ <Kerning first="221" second="46" value="-2" />
+ <Kerning first="221" second="58" value="-1" />
+ <Kerning first="221" second="97" value="-1" />
+ <Kerning first="221" second="101" value="-1" />
+ <Kerning first="221" second="111" value="-1" />
+ <Kerning first="221" second="117" value="-1" />
+ <Kerning first="221" second="225" value="-1" />
+ <Kerning first="221" second="224" value="-1" />
+ <Kerning first="221" second="226" value="-1" />
+ <Kerning first="221" second="228" value="-1" />
+ <Kerning first="221" second="227" value="-1" />
+ <Kerning first="221" second="229" value="-1" />
+ <Kerning first="221" second="233" value="-1" />
+ <Kerning first="221" second="232" value="-1" />
+ <Kerning first="221" second="234" value="-1" />
+ <Kerning first="221" second="235" value="-1" />
+ <Kerning first="221" second="243" value="-1" />
+ <Kerning first="221" second="242" value="-1" />
+ <Kerning first="221" second="244" value="-1" />
+ <Kerning first="221" second="246" value="-1" />
+ <Kerning first="221" second="245" value="-1" />
+ <Kerning first="221" second="250" value="-1" />
+ <Kerning first="221" second="249" value="-1" />
+ <Kerning first="221" second="251" value="-1" />
+ <Kerning first="221" second="252" value="-1" />
+ <Kerning first="221" second="171" value="-1" />
+ <Kerning first="253" second="46" value="-1" />
+ <Kerning first="255" second="46" value="-1" />
+ </Metrics>
+ </BitmapFont>
+ <BitmapFont name="AgateSans-10" image="Fonts/AgateSans-10.png">
+ <Metrics>
+ <Glyph char="32" source="{X=0,Y=2,Width=5,Height=17}" rightOverhang="1" />
+ <Glyph char="33" source="{X=7,Y=2,Width=6,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="34" source="{X=15,Y=2,Width=6,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="35" source="{X=23,Y=2,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="36" source="{X=37,Y=2,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="37" source="{X=48,Y=2,Width=15,Height=17}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="38" source="{X=65,Y=2,Width=12,Height=17}" rightOverhang="1" />
+ <Glyph char="39" source="{X=79,Y=2,Width=4,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="40" source="{X=85,Y=2,Width=6,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="41" source="{X=93,Y=2,Width=6,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="42" source="{X=101,Y=2,Width=8,Height=17}" rightOverhang="1" />
+ <Glyph char="43" source="{X=111,Y=2,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="44" source="{X=125,Y=2,Width=5,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="45" source="{X=132,Y=2,Width=6,Height=17}" rightOverhang="1" />
+ <Glyph char="46" source="{X=140,Y=2,Width=5,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="47" source="{X=147,Y=2,Width=7,Height=17}" rightOverhang="3" />
+ <Glyph char="48" source="{X=156,Y=2,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="49" source="{X=167,Y=2,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="50" source="{X=178,Y=2,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="51" source="{X=189,Y=2,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="52" source="{X=200,Y=2,Width=11,Height=17}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="53" source="{X=213,Y=2,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="54" source="{X=224,Y=2,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="55" source="{X=235,Y=2,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="56" source="{X=246,Y=2,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="57" source="{X=0,Y=22,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="58" source="{X=11,Y=22,Width=5,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="59" source="{X=18,Y=22,Width=5,Height=17}" rightOverhang="1" />
+ <Glyph char="60" source="{X=25,Y=22,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="61" source="{X=39,Y=22,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="62" source="{X=53,Y=22,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="63" source="{X=67,Y=22,Width=8,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="64" source="{X=77,Y=22,Width=14,Height=17}" rightOverhang="1" />
+ <Glyph char="65" source="{X=93,Y=22,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="66" source="{X=105,Y=22,Width=10,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="67" source="{X=117,Y=22,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="68" source="{X=129,Y=22,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="69" source="{X=142,Y=22,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="70" source="{X=153,Y=22,Width=8,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="71" source="{X=163,Y=22,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="72" source="{X=176,Y=22,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="73" source="{X=189,Y=22,Width=4,Height=17}" rightOverhang="1" />
+ <Glyph char="74" source="{X=195,Y=22,Width=8,Height=17}" leftOverhang="2" rightOverhang="3" />
+ <Glyph char="75" source="{X=205,Y=22,Width=11,Height=17}" leftOverhang="-1" rightOverhang="3" />
+ <Glyph char="76" source="{X=218,Y=22,Width=8,Height=17}" leftOverhang="-1" rightOverhang="1" />
+ <Glyph char="77" source="{X=228,Y=22,Width=12,Height=17}" leftOverhang="-1" rightOverhang="1" />
+ <Glyph char="78" source="{X=242,Y=22,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="79" source="{X=0,Y=42,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="80" source="{X=13,Y=42,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="81" source="{X=24,Y=42,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="82" source="{X=37,Y=42,Width=11,Height=17}" leftOverhang="-1" rightOverhang="3" />
+ <Glyph char="83" source="{X=50,Y=42,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="84" source="{X=62,Y=42,Width=10,Height=17}" rightOverhang="2" />
+ <Glyph char="85" source="{X=74,Y=42,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="86" source="{X=87,Y=42,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="87" source="{X=99,Y=42,Width=16,Height=17}" rightOverhang="4" />
+ <Glyph char="88" source="{X=117,Y=42,Width=11,Height=17}" leftOverhang="-1" rightOverhang="1" />
+ <Glyph char="89" source="{X=130,Y=42,Width=10,Height=17}" rightOverhang="2" />
+ <Glyph char="90" source="{X=142,Y=42,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="91" source="{X=155,Y=42,Width=6,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="92" source="{X=163,Y=42,Width=7,Height=17}" rightOverhang="3" />
+ <Glyph char="93" source="{X=172,Y=42,Width=6,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="94" source="{X=180,Y=42,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="95" source="{X=194,Y=42,Width=10,Height=17}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="96" source="{X=206,Y=42,Width=8,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="97" source="{X=216,Y=42,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="98" source="{X=227,Y=42,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="99" source="{X=238,Y=42,Width=8,Height=17}" rightOverhang="1" />
+ <Glyph char="100" source="{X=0,Y=62,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="101" source="{X=11,Y=62,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="102" source="{X=22,Y=62,Width=8,Height=17}" leftOverhang="1" rightOverhang="4" />
+ <Glyph char="103" source="{X=32,Y=62,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="104" source="{X=43,Y=62,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="105" source="{X=54,Y=62,Width=4,Height=17}" rightOverhang="1" />
+ <Glyph char="106" source="{X=60,Y=62,Width=6,Height=17}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="107" source="{X=68,Y=62,Width=10,Height=17}" leftOverhang="-1" rightOverhang="3" />
+ <Glyph char="108" source="{X=80,Y=62,Width=4,Height=17}" rightOverhang="1" />
+ <Glyph char="109" source="{X=86,Y=62,Width=14,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="110" source="{X=102,Y=62,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="111" source="{X=113,Y=62,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="112" source="{X=124,Y=62,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="113" source="{X=135,Y=62,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="114" source="{X=146,Y=62,Width=8,Height=17}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="115" source="{X=156,Y=62,Width=8,Height=17}" rightOverhang="1" />
+ <Glyph char="116" source="{X=166,Y=62,Width=6,Height=17}" rightOverhang="1" />
+ <Glyph char="117" source="{X=174,Y=62,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="118" source="{X=185,Y=62,Width=10,Height=17}" rightOverhang="2" />
+ <Glyph char="119" source="{X=197,Y=62,Width=14,Height=17}" leftOverhang="1" rightOverhang="3" />
+ <Glyph char="120" source="{X=213,Y=62,Width=10,Height=17}" rightOverhang="2" />
+ <Glyph char="121" source="{X=225,Y=62,Width=10,Height=17}" rightOverhang="2" />
+ <Glyph char="122" source="{X=237,Y=62,Width=8,Height=17}" rightOverhang="1" />
+ <Glyph char="123" source="{X=247,Y=62,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="124" source="{X=0,Y=82,Width=5,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="125" source="{X=7,Y=82,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="126" source="{X=18,Y=82,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="161" source="{X=32,Y=82,Width=6,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="162" source="{X=40,Y=82,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="163" source="{X=51,Y=82,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="164" source="{X=62,Y=82,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="165" source="{X=73,Y=82,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="166" source="{X=84,Y=82,Width=5,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="167" source="{X=91,Y=82,Width=8,Height=17}" rightOverhang="1" />
+ <Glyph char="168" source="{X=101,Y=82,Width=8,Height=17}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="169" source="{X=111,Y=82,Width=14,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="170" source="{X=127,Y=82,Width=7,Height=17}" rightOverhang="1" />
+ <Glyph char="171" source="{X=136,Y=82,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="172" source="{X=147,Y=82,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="173" source="{X=161,Y=82,Width=6,Height=17}" rightOverhang="1" />
+ <Glyph char="174" source="{X=169,Y=82,Width=14,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="175" source="{X=185,Y=82,Width=8,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="176" source="{X=195,Y=82,Width=8,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="177" source="{X=205,Y=82,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="178" source="{X=219,Y=82,Width=6,Height=17}" rightOverhang="1" />
+ <Glyph char="179" source="{X=227,Y=82,Width=6,Height=17}" rightOverhang="1" />
+ <Glyph char="180" source="{X=235,Y=82,Width=8,Height=17}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="181" source="{X=245,Y=82,Width=11,Height=17}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="182" source="{X=0,Y=102,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="183" source="{X=11,Y=102,Width=5,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="184" source="{X=18,Y=102,Width=8,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="185" source="{X=28,Y=102,Width=6,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="186" source="{X=36,Y=102,Width=7,Height=17}" rightOverhang="1" />
+ <Glyph char="187" source="{X=45,Y=102,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="188" source="{X=56,Y=102,Width=14,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="189" source="{X=72,Y=102,Width=14,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="190" source="{X=88,Y=102,Width=14,Height=17}" rightOverhang="1" />
+ <Glyph char="191" source="{X=104,Y=102,Width=8,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="192" source="{X=114,Y=102,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="193" source="{X=126,Y=102,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="194" source="{X=138,Y=102,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="195" source="{X=150,Y=102,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="196" source="{X=162,Y=102,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="197" source="{X=174,Y=102,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="198" source="{X=186,Y=102,Width=14,Height=17}" rightOverhang="1" />
+ <Glyph char="199" source="{X=202,Y=102,Width=10,Height=17}" rightOverhang="1" />
+ <Glyph char="200" source="{X=214,Y=102,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="201" source="{X=225,Y=102,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="202" source="{X=236,Y=102,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="203" source="{X=247,Y=102,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="204" source="{X=0,Y=122,Width=4,Height=17}" rightOverhang="1" />
+ <Glyph char="205" source="{X=6,Y=122,Width=6,Height=17}" rightOverhang="3" />
+ <Glyph char="206" source="{X=14,Y=122,Width=6,Height=17}" rightOverhang="3" />
+ <Glyph char="207" source="{X=22,Y=122,Width=6,Height=17}" rightOverhang="3" />
+ <Glyph char="208" source="{X=30,Y=122,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="209" source="{X=43,Y=122,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="210" source="{X=56,Y=122,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="211" source="{X=69,Y=122,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="212" source="{X=82,Y=122,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="213" source="{X=95,Y=122,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="214" source="{X=108,Y=122,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="215" source="{X=121,Y=122,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="216" source="{X=135,Y=122,Width=11,Height=17}" rightOverhang="1" />
+ <Glyph char="217" source="{X=148,Y=122,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="218" source="{X=161,Y=122,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="219" source="{X=174,Y=122,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="220" source="{X=187,Y=122,Width=11,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="221" source="{X=200,Y=122,Width=10,Height=17}" rightOverhang="3" />
+ <Glyph char="222" source="{X=212,Y=122,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="223" source="{X=223,Y=122,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="224" source="{X=234,Y=122,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="225" source="{X=245,Y=122,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="226" source="{X=0,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="227" source="{X=11,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="228" source="{X=22,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="229" source="{X=33,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="230" source="{X=44,Y=142,Width=14,Height=17}" rightOverhang="1" />
+ <Glyph char="231" source="{X=60,Y=142,Width=8,Height=17}" rightOverhang="1" />
+ <Glyph char="232" source="{X=70,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="233" source="{X=81,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="234" source="{X=92,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="235" source="{X=103,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="236" source="{X=114,Y=142,Width=6,Height=17}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="237" source="{X=122,Y=142,Width=6,Height=17}" rightOverhang="3" />
+ <Glyph char="238" source="{X=130,Y=142,Width=8,Height=17}" leftOverhang="1" rightOverhang="4" />
+ <Glyph char="239" source="{X=140,Y=142,Width=6,Height=17}" rightOverhang="3" />
+ <Glyph char="240" source="{X=148,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="241" source="{X=159,Y=142,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="242" source="{X=170,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="243" source="{X=181,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="244" source="{X=192,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="245" source="{X=203,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="246" source="{X=214,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="247" source="{X=225,Y=142,Width=12,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="248" source="{X=239,Y=142,Width=9,Height=17}" rightOverhang="1" />
+ <Glyph char="249" source="{X=0,Y=162,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="250" source="{X=11,Y=162,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="251" source="{X=22,Y=162,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="252" source="{X=33,Y=162,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="253" source="{X=44,Y=162,Width=10,Height=17}" rightOverhang="3" />
+ <Glyph char="254" source="{X=56,Y=162,Width=9,Height=17}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="255" source="{X=67,Y=162,Width=10,Height=17}" rightOverhang="3" />
+ <Kerning first="45" second="89" value="-1" />
+ <Kerning first="45" second="221" value="-1" />
+ <Kerning first="70" second="46" value="-...
[truncated message content] |
|
From: <ka...@us...> - 2014-09-01 19:13:54
|
Revision: 1501
http://sourceforge.net/p/agate/code/1501
Author: kanato
Date: 2014-09-01 19:13:43 +0000 (Mon, 01 Sep 2014)
Log Message:
-----------
Create default fonts in AgateLib.Assets.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/Assets/Fonts.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/Diagnostics/AgateConsole.cs
trunk/AgateLib/DisplayLib/Font.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/Drivers/IAgateFactory.cs
trunk/AgateLib/Drivers/IDisplayFactory.cs
trunk/AgateLib/IO/IReadFileProvider.cs
trunk/AgateLib/IO/SubDirectoryProvider.cs
trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs
trunk/AgateLib/Resources/Legacy/ImageResource.cs
trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
trunk/AgateLib.Platform.WinForms/Factories/DisplayFactory.cs
trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs
trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs
trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs
trunk/AgateLib.Platform.WinForms/Resources/BuiltinResources.cs
trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/TestResourceFile.xml
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeDisplayDriver.cs
trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/DisplayWindowEvents.cs
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/FullScreen.cs
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/PixelBufferTest/PixelBufferTest.cs
trunk/AgateLib.Tests/Tests.WinForms/FontTests/Kerning.cs
trunk/AgateLib.Tests/Tests.WinForms/Shaders/Lighting3DTest.cs
trunk/AgateLib.Tests/Tests.WinForms/frmLauncher.cs
Added Paths:
-----------
trunk/AgateLib/Assets/DefaultResources.cs
trunk/AgateLib.Platform.WinForms/Resources/Builtin.Designer.cs
trunk/AgateLib.Platform.WinForms/Resources/Builtin.resx
trunk/AgateLib.Platform.WinForms/Resources/Fonts.zip
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/attacke.png
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/jellybean.png
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/SoundbufferStopTester.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/StreamAudio.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/
trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/Resources.cs
Removed Paths:
-------------
trunk/AgateLib.Tests/Tests.WinForms/Assets/attacke.png
trunk/AgateLib.Tests/Tests.WinForms/Assets/jellybean.png
trunk/AgateLib.Tests/Tests.WinForms/AudioTests/SoundbufferStopTester.cs
trunk/AgateLib.Tests/Tests.WinForms/AudioTests/StreamAudio.cs
trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Resources.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/AgateLib.csproj 2014-09-01 19:13:43 UTC (rev 1501)
@@ -51,6 +51,7 @@
<Compile Include="ApplicationModels\PassiveModelParameters.cs" />
<Compile Include="ApplicationModels\SceneModelParameters.cs" />
<Compile Include="ApplicationModels\SerialModelParameters.cs" />
+ <Compile Include="Assets\DefaultResources.cs" />
<Compile Include="Assets\Fonts.cs" />
<Compile Include="Geometry\CoordinateSystems\FixedCoordinateSystem.cs" />
<Compile Include="Geometry\CoordinateSystems\NativeCoordinates.cs" />
Added: trunk/AgateLib/Assets/DefaultResources.cs
===================================================================
--- trunk/AgateLib/Assets/DefaultResources.cs (rev 0)
+++ trunk/AgateLib/Assets/DefaultResources.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -0,0 +1,30 @@
+using AgateLib.DisplayLib;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Assets
+{
+ public class DefaultResources : IDisposable
+ {
+ internal DefaultResources()
+ { }
+
+ public Font AgateSans { get; set; }
+ public Font AgateSerif { get; set; }
+ public Font AgateMono { get; set; }
+
+ public void Dispose()
+ {
+ if (AgateSans != null) AgateSans.Dispose();
+ if (AgateSerif != null) AgateSerif.Dispose();
+ if (AgateMono != null) AgateMono.Dispose();
+
+ AgateSans = null;
+ AgateSerif = null;
+ AgateMono = null;
+ }
+ }
+}
Modified: trunk/AgateLib/Assets/Fonts.cs
===================================================================
--- trunk/AgateLib/Assets/Fonts.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/Assets/Fonts.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -11,39 +11,34 @@
/// </summary>
public static class Fonts
{
- public static void Initialize()
+ static DefaultResources mResources;
+
+ internal static void Initialize(DefaultResources res)
{
- AgateSans = Font.Create("AgateSans", 8, 64, FontStyles.Bold);
- AgateSerif = Font.Create("AgateSerif", 8, 64, FontStyles.Bold);
- AgateMono = Font.Create("AgateMono", 8, 64, FontStyles.Bold);
+ mResources = res;
Display.DisposeDisplay += Display_DisposeDisplay;
}
static void Display_DisposeDisplay()
{
- AgateSans.Dispose();
- AgateSerif.Dispose();
- AgateMono.Dispose();
+ mResources.Dispose();
+ mResources = null;
- AgateSans = null;
- AgateSerif = null;
- AgateMono = null;
-
Display.DisposeDisplay -= Display_DisposeDisplay;
}
/// <summary>
/// Default sans serif font.
/// </summary>
- public static Font AgateSans { get; private set; }
+ public static Font AgateSans { get { return mResources.AgateSans; } }
/// <summary>
/// Default serif font.
/// </summary>
- public static Font AgateSerif { get; private set; }
+ public static Font AgateSerif { get { return mResources.AgateSerif; } }
/// <summary>
/// Default monospace font.
/// </summary>
- public static Font AgateMono { get; private set; }
+ public static Font AgateMono { get { return mResources.AgateMono; } }
}
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/Core.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -31,6 +31,8 @@
using AgateLib.IO;
using AgateLib.InputLib;
using AgateLib.ApplicationModels;
+using AgateLib.Assets;
+using System.Threading.Tasks;
namespace AgateLib
{
@@ -329,14 +331,26 @@
FileSystem.File = factory.PlatformFactory.CreateFile();
FileSystem.Path = factory.PlatformFactory.CreatePath();
-
+
Display.Initialize(factory.DisplayFactory.DisplayImpl);
Audio.Initialize(factory.AudioFactory.CreateAudioImpl());
JoystickInput.Initialize(factory.InputFactory.CreateJoystickInputImpl());
+ InitializeDefaultResources();
+
sInititalized = true;
}
+ public static void InitializeDefaultResources()
+ {
+ DefaultResources res = new DefaultResources();
+
+ var task = mFactory.DisplayFactory.InitializeDefaultResourcesAsync(res);
+ Assets.Fonts.Initialize(res);
+
+ Task.WaitAll(task);
+ }
+
public static void InitAssetLocations(AssetLocations assets)
{
FileProvider.Initialize(mFactory.PlatformFactory.AssetFileProvider, assets);
Modified: trunk/AgateLib/Diagnostics/AgateConsole.cs
===================================================================
--- trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -39,7 +39,7 @@
public static bool IsInitialized { get { return sInstance != null; } }
- public static FontSurface Font { get; set; }
+ public static Font Font { get; set; }
public static KeyCode VisibleToggleKey { get; set; }
public static bool IsVisible
{
@@ -96,7 +96,7 @@
if (sInstance == null) return;
if (Font == null)
- Font = Core.Factory.DefaultFont;
+ Font = Assets.Fonts.AgateMono;
sInstance.DrawImpl();
}
Modified: trunk/AgateLib/DisplayLib/Font.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Font.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/DisplayLib/Font.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -25,6 +25,10 @@
fs.Dispose();
}
+ public string Name { get; set; }
+ public int Size { get { return mSettings.Size; } set { mSettings.Size = value; } }
+ public FontStyles Style { get { return mSettings.Style; } set { mSettings.Style = value; } }
+
public void AddFont(FontSurface fontSurface, int size, FontStyles style)
{
AddFont(new FontSettings(size, style), fontSurface);
@@ -37,10 +41,16 @@
mFontSurfaces[settings] = fontSurface;
}
- public string Name { get; set; }
- public int Size { get { return mSettings.Size; } set { mSettings.Size = value; } }
- public FontStyles Style { get { return mSettings.Style; } set { mSettings.Style = value; } }
+ public FontSurface GetFontSurface(int size, FontStyles fontStyles)
+ {
+ return GetFontSurface(new FontSettings(size, fontStyles));
+ }
+ public FontSurface GetFontSurface(FontSettings settings)
+ {
+ return mFontSurfaces[settings];
+ }
+
public int FontHeight { get { return FontSurface.FontHeight; } }
int MaxSize(FontStyles style)
@@ -154,6 +164,10 @@
set { mState.DisplayAlignment = value; }
}
+ public void DrawText(string text)
+ {
+ FontSurface.DrawText(text);
+ }
public void DrawText(Point dest, string text)
{
FontSurface.DrawText(dest, text);
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -92,7 +92,7 @@
if (res is BitmapFontResource)
{
- Surface surf = new Surface(resources.FullFileName(bmpFont.Image), AgateLib.IO.FileProvider.ResourceAssets);
+ Surface surf = new Surface(resources.FullFileName(bmpFont.Image), resources.FileProvider);
mImpl = new BitmapFontImpl(surf, bmpFont.FontMetrics, resourceName);
}
Modified: trunk/AgateLib/Drivers/IAgateFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IAgateFactory.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/Drivers/IAgateFactory.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -31,7 +31,5 @@
IAudioFactory AudioFactory { get; }
IInputFactory InputFactory { get; }
IPlatformFactory PlatformFactory { get; }
-
- FontSurface DefaultFont { get; set; }
}
}
Modified: trunk/AgateLib/Drivers/IDisplayFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -94,5 +94,7 @@
FrameBufferImpl CreateFrameBuffer(Size size);
+
+ Task InitializeDefaultResourcesAsync(Assets.DefaultResources res);
}
}
Modified: trunk/AgateLib/IO/IReadFileProvider.cs
===================================================================
--- trunk/AgateLib/IO/IReadFileProvider.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/IO/IReadFileProvider.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -79,5 +79,10 @@
/// <param name="filename"></param>
/// <returns></returns>
string ResolveFile(string filename);
+
+ /// <summary>
+ /// Returns true if the file system is not a physical file system.
+ /// </summary>
+ bool IsLogicalFilesystem { get; }
}
}
Modified: trunk/AgateLib/IO/SubDirectoryProvider.cs
===================================================================
--- trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -93,5 +93,11 @@
return false;
}
+
+
+ public bool IsLogicalFilesystem
+ {
+ get { return parent.IsLogicalFilesystem; }
+ }
}
}
Modified: trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs
===================================================================
--- trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -63,15 +63,14 @@
{
get
{
- foreach (var img in mResources.mImages)
+ try
{
- var retval = img.Surfaces.FirstOrDefault(x => x.Name == key);
-
- if (retval != null)
- return retval;
+ return (SurfaceResource) mResources.mStore.First(x => x.Key == key).Value;
}
-
- throw new AgateResourceException("Could not find the surface resource {0}.", key);
+ catch (Exception e)
+ {
+ throw new AgateResourceException(e, "Could not find the surface resource {0}.", key);
+ }
}
}
@@ -117,6 +116,7 @@
public AgateResourceCollection()
{
mSurfaceAccessor = new SurfaceResourceList(this);
+ FileProvider = AgateLib.IO.FileProvider.ResourceAssets;
this.mStore.Add(mStringTableKey, new StringTable());
}
Modified: trunk/AgateLib/Resources/Legacy/ImageResource.cs
===================================================================
--- trunk/AgateLib/Resources/Legacy/ImageResource.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib/Resources/Legacy/ImageResource.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -42,6 +42,7 @@
switch (version)
{
+ case "1.0.0":
case "0.3.2":
Filename = node.Attribute("filename").Value;
ReadSubNodes032(node);
Modified: trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-09-01 19:13:43 UTC (rev 1501)
@@ -131,6 +131,11 @@
<Compile Include="IO\TgzFileProvider.cs" />
<Compile Include="IO\ZipFileProvider.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Resources\Builtin.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Builtin.resx</DependentUpon>
+ </Compile>
<Compile Include="WinFormsInitializer.cs" />
<Compile Include="Resources\BuiltinResources.cs" />
<Compile Include="SurfaceExtensions.cs" />
@@ -185,9 +190,14 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Icons.Designer.cs</LastGenOutput>
</EmbeddedResource>
+ <EmbeddedResource Include="Resources\Builtin.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Builtin.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
+ <None Include="Resources\Fonts.zip" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\AgateLib-mono.ico" />
Modified: trunk/AgateLib.Platform.WinForms/Factories/DisplayFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Factories/DisplayFactory.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/Factories/DisplayFactory.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -6,6 +6,7 @@
using AgateLib.Geometry;
using AgateLib.OpenGL;
using AgateLib.Platform.WinForms.DisplayImplementation;
+using AgateLib.Platform.WinForms.Resources;
using System;
using System.Collections.Generic;
using System.IO;
@@ -35,7 +36,10 @@
public SurfaceImpl CreateSurface(IReadFileProvider provider, string filename)
{
- return new GL_Surface(provider.ResolveFile(filename));
+ if (provider.IsLogicalFilesystem)
+ return new GL_Surface(provider.OpenReadAsync(filename).Result);
+ else
+ return new GL_Surface(provider.ResolveFile(filename));
}
public SurfaceImpl CreateSurface(Stream fileStream)
@@ -112,5 +116,24 @@
get { return FullDisplayImpl.SupportsFramebufferExt; }
set { FullDisplayImpl.SupportsFramebufferExt = value; }
}
+
+
+ public async Task InitializeDefaultResourcesAsync(Assets.DefaultResources res)
+ {
+ res.Dispose();
+
+ res.AgateSans = new Font("AgateSans");
+ res.AgateSerif = new Font("AgateSerif");
+ res.AgateMono = new Font("AgateMono");
+
+ res.AgateSans.AddFont(await BuiltinResources.GetFontAsync("AgateSans-10"), 10, FontStyles.None);
+ res.AgateSans.AddFont(await BuiltinResources.GetFontAsync("AgateSans-14"), 14, FontStyles.None);
+ res.AgateSans.AddFont(await BuiltinResources.GetFontAsync("AgateSans-24"), 24, FontStyles.None);
+
+ res.AgateSerif.AddFont(await BuiltinResources.GetFontAsync("AgateSerif-10"), 10, FontStyles.None);
+ res.AgateSerif.AddFont(await BuiltinResources.GetFontAsync("AgateSerif-14"), 14, FontStyles.None);
+
+ res.AgateMono.AddFont(await BuiltinResources.GetFontAsync("AgateMono-10"), 10, FontStyles.None);
+ }
}
}
Modified: trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -36,20 +36,5 @@
public IInputFactory InputFactory { get; private set; }
public IPlatformFactory PlatformFactory { get { return mPlatformFactory; } }
-
- public DisplayLib.FontSurface DefaultFont
- {
- get
- {
- if (mDefaultFont == null)
- mDefaultFont = BuiltinResources.AgateSans10;
-
- return mDefaultFont;
- }
- set
- {
- throw new NotImplementedException();
- }
- }
}
}
Modified: trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -310,5 +310,9 @@
return new StreamReader(s).ReadToEnd();
}
+ public bool IsLogicalFilesystem
+ {
+ get { return true; }
+ }
}
}
Modified: trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -54,7 +54,7 @@
throw new FileNotFoundException(string.Format("The file {0} was not found in the path {1}.",
filename, mPath));
- return await Task.Run(() => File.OpenRead(FindFileName(filename)));
+ return File.OpenRead(FindFileName(filename));
}
/// <summary>
/// Returns true if the specified file exists.
@@ -258,5 +258,11 @@
return new StreamReader(s).ReadToEnd();
}
+
+
+ public bool IsLogicalFilesystem
+ {
+ get { return true; }
+ }
}
}
Modified: trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -292,5 +292,9 @@
{
throw new InvalidOperationException("This file provider does not provide access to a physical file system.");
}
+ public bool IsLogicalFilesystem
+ {
+ get { return true; }
+ }
}
}
\ No newline at end of file
Modified: trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -359,6 +359,10 @@
{
throw new InvalidOperationException("This file provider does not provide access to a physical file system.");
}
+ public bool IsLogicalFilesystem
+ {
+ get { return true; }
+ }
}
enum ZipStorageType
Added: trunk/AgateLib.Platform.WinForms/Resources/Builtin.Designer.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Resources/Builtin.Designer.cs (rev 0)
+++ trunk/AgateLib.Platform.WinForms/Resources/Builtin.Designer.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -0,0 +1,73 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.34014
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace AgateLib.Platform.WinForms.Resources {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Builtin {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Builtin() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AgateLib.Platform.WinForms.Resources.Builtin", typeof(Builtin).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Byte[].
+ /// </summary>
+ internal static byte[] Fonts {
+ get {
+ object obj = ResourceManager.GetObject("Fonts", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+ }
+}
Added: trunk/AgateLib.Platform.WinForms/Resources/Builtin.resx
===================================================================
--- trunk/AgateLib.Platform.WinForms/Resources/Builtin.resx (rev 0)
+++ trunk/AgateLib.Platform.WinForms/Resources/Builtin.resx 2014-09-01 19:13:43 UTC (rev 1501)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="Fonts" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>Fonts.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+</root>
\ No newline at end of file
Modified: trunk/AgateLib.Platform.WinForms/Resources/BuiltinResources.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Resources/BuiltinResources.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/Resources/BuiltinResources.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -1,6 +1,9 @@
using AgateLib.DisplayLib;
+using AgateLib.Platform.WinForms.IO;
+using AgateLib.Resources.Legacy;
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -9,29 +12,24 @@
{
public static class BuiltinResources
{
- static FontSurface mSans10;
- static FontSurface mSans14;
- static FontSurface mSans24;
- static FontSurface mSerif10;
- static FontSurface mSerif14;
- static FontSurface mSerif24;
- static FontSurface mMono10;
+ static ZipFileProvider mProvider;
+ static AgateResourceCollection mResources;
- private static FontSurface LazyCreateFont(ref FontSurface store, string name, int size)
+ static BuiltinResources()
{
- if (store == null)
- store = new FontSurface(name, size);
-
- return store;
}
- public static FontSurface AgateSans10 { get { return LazyCreateFont(ref mSans10, "Arial", 10); } }
- public static FontSurface AgateSans14 { get { return LazyCreateFont(ref mSans14, "Arial", 14); } }
- public static FontSurface AgateSans24 { get { return LazyCreateFont(ref mSans24, "Arial", 24); } }
- public static FontSurface AgateSerif10 { get { return LazyCreateFont(ref mSerif10, "Times New Roman", 10); } }
- public static FontSurface AgateSerif14 { get { return LazyCreateFont(ref mSerif14, "Times New Roman", 14); } }
- public static FontSurface AgateSerif24 { get { return LazyCreateFont(ref mSerif24, "Times New Roman", 24); } }
+ public static async Task<FontSurface> GetFontAsync(string name)
+ {
+ if (mProvider == null)
+ {
+ mProvider = new ZipFileProvider("Fonts.zip", new MemoryStream(Builtin.Fonts));
+ mResources = new AgateResourceCollection();
+ mResources.FileProvider = mProvider;
+ AgateResourceLoader.LoadResources(mResources, await mProvider.OpenReadAsync("Resources.xml"));
+ }
- public static FontSurface AgateMono10 { get { return LazyCreateFont(ref mMono10, "Consolas", 10); } }
+ return new FontSurface(mResources, name);
+ }
}
}
Added: trunk/AgateLib.Platform.WinForms/Resources/Fonts.zip
===================================================================
(Binary files differ)
Index: trunk/AgateLib.Platform.WinForms/Resources/Fonts.zip
===================================================================
--- trunk/AgateLib.Platform.WinForms/Resources/Fonts.zip 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WinForms/Resources/Fonts.zip 2014-09-01 19:13:43 UTC (rev 1501)
Property changes on: trunk/AgateLib.Platform.WinForms/Resources/Fonts.zip
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -70,5 +70,10 @@
return new FrameBufferSurface(size);
}
+
+
+ public async Task InitializeDefaultResourcesAsync(Assets.DefaultResources res)
+ {
+ }
}
}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -62,5 +62,11 @@
{
return path + filename;
}
+
+
+ public bool IsLogicalFilesystem
+ {
+ get { return true; }
+ }
}
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-09-01 19:13:43 UTC (rev 1501)
@@ -44,6 +44,8 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="Audio\SoundbufferStopTester.cs" />
+ <Compile Include="Audio\StreamAudio.cs" />
<Compile Include="DisplayTests\BasicSprite.cs" />
<Compile Include="DisplayTests\ClipRect.cs" />
<Compile Include="DisplayTests\ColorTest.cs" />
@@ -63,6 +65,7 @@
<Compile Include="FontTests\Builtin.cs" />
<Compile Include="FontTests\FontAlignment.cs" />
<Compile Include="FontTests\TextLayout.cs" />
+ <Compile Include="FoundationTests\Resources.cs" />
<Compile Include="IAgateTest.cs" />
<Compile Include="IDiscreteAgateTest.cs" />
<Compile Include="ISceneModelTest.cs" />
@@ -75,6 +78,9 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
+ <None Include="Assets\attacke.png">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
<Content Include="Assets\boxsprite.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -96,6 +102,9 @@
<Content Include="Assets\fonts\sample_font.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <None Include="Assets\jellybean.png">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
<Content Include="Assets\spike.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -113,6 +122,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
+ <ItemGroup />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/TestResourceFile.xml
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/TestResourceFile.xml 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/TestResourceFile.xml 2014-09-01 19:13:43 UTC (rev 1501)
@@ -4,7 +4,6 @@
<string name="How are you">How are you?</string>
<string name="I want some beer">I want some beer.</string>
</StringTable>
- <DisplayWindow name="main_window" preferred_size="{Width=400,Height=200}" minimum_size="{Width=0,Height=0}" maximum_size="{Width=0,Height=0}" allow_resize="True" full_screen="False" bpp="32">Main Window</DisplayWindow>
<Surface name="sample_surf" filename="jellybean.png" />
<Sprite name="sample_sprite" image="attacke.png" timePerFrame="60" size="{Width=96,Height=96}">
<Frame rect="{X=0,Y=0,Width=96,Height=96}" offset="{X=0,Y=0}" />
Copied: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/attacke.png (from rev 1498, trunk/AgateLib.Tests/Tests.WinForms/Assets/attacke.png)
===================================================================
(Binary files differ)
Copied: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/jellybean.png (from rev 1498, trunk/AgateLib.Tests/Tests.WinForms/Assets/jellybean.png)
===================================================================
(Binary files differ)
Copied: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/SoundbufferStopTester.cs (from rev 1498, trunk/AgateLib.Tests/Tests.WinForms/AudioTests/SoundbufferStopTester.cs)
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/SoundbufferStopTester.cs (rev 0)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/SoundbufferStopTester.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib;
+using AgateLib.AudioLib;
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using AgateLib.InputLib;
+using AgateLib.InputLib.Legacy;
+
+namespace AgateLib.Testing.AudioTests
+{
+ class SoundbufferStopTester : ISerialModelTest
+ {
+ public string Name
+ {
+ get { return "SoundBuffer Stop"; }
+ }
+
+ public string Category
+ {
+ get { return "Audio"; }
+ }
+
+ SoundBuffer snda, sndb;
+
+ public void EntryPoint()
+ {
+ snda = new SoundBuffer("snda.wav");
+ sndb = new SoundBuffer("sndb.wav");
+
+ Font font = Assets.Fonts.AgateSans;
+
+ Keyboard.KeyDown += new InputEventHandler(Keyboard_KeyDown);
+
+ while (Display.CurrentWindow.IsClosed == false)
+ {
+ Display.BeginFrame();
+ Display.Clear();
+
+ font.Color = Color.White;
+ font.DrawText("Press a for first sound, b for second sound.");
+
+ if (snda.IsPlaying)
+ font.DrawText(0, 30, "first sound is playing");
+ if (sndb.IsPlaying)
+ font.DrawText(0, 60, "second sound is playing");
+
+ Display.EndFrame();
+ Core.KeepAlive();
+ }
+ }
+
+ void Keyboard_KeyDown(InputEventArgs e)
+ {
+ if (e.KeyCode == KeyCode.A)
+ snda.Play();
+
+ if (e.KeyCode == KeyCode.B)
+ sndb.Play();
+ }
+
+
+ public void ModifyModelParameters(ApplicationModels.SerialModelParameters parameters)
+ {
+ }
+ }
+}
Copied: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/StreamAudio.cs (from rev 1498, trunk/AgateLib.Tests/Tests.WinForms/AudioTests/StreamAudio.cs)
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/StreamAudio.cs (rev 0)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Audio/StreamAudio.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -0,0 +1,145 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using AgateLib;
+using AgateLib.AudioLib;
+using AgateLib.DisplayLib;
+
+namespace AgateLib.Testing.AudioTests
+{
+ class StreamAudio : ISerialModelTest
+ {
+ public string Name
+ {
+ get { return "Streaming Audio"; }
+ }
+
+ public string Category
+ {
+ get { return "Audio"; }
+ }
+
+ class LoopingStream : Stream
+ {
+ public double Frequency { get; set; }
+
+ public LoopingStream()
+ {
+ }
+
+ public override bool CanRead
+ {
+ get { return true; }
+ }
+
+ public override bool CanSeek
+ {
+ get { return true; }
+ }
+
+ public override bool CanWrite
+ {
+ get { return false; }
+ }
+
+ public override void Flush()
+ {
+ throw new NotSupportedException();
+ }
+
+ public override long Length
+ {
+ get { return SamplingFrequency; }
+ }
+
+ public override long Position
+ {
+ get
+ {
+ return 0;
+ }
+ set
+ {
+ }
+ }
+
+ double lastValue;
+ const int SamplingFrequency = 44100;
+
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ double lv = lastValue;
+
+ for (int i = 0; i < count / 2; i++)
+ {
+ double time = i / (double)SamplingFrequency;
+ time *= 2 * Math.PI * Frequency;
+ time += lv;
+ lastValue = time;
+
+ short val = (short)(Math.Sin(time) * short.MaxValue / 2);
+
+ buffer[offset + i * 2] = (byte)(val & 0xff);
+ buffer[offset + i * 2 + 1] = (byte)(val >> 8);
+ }
+
+ return count;
+ }
+
+ public override long Seek(long offset, SeekOrigin origin)
+ {
+ throw new NotImplementedException();
+ }
+ public override void SetLength(long value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ public void EntryPoint()
+ {
+ LoopingStream sa = new LoopingStream();
+ sa.Frequency = 100;
+
+ StreamingSoundBuffer buf = new StreamingSoundBuffer(sa, SoundFormat.Pcm16(44100), 100);
+
+ buf.Play();
+
+ Stopwatch w = new Stopwatch();
+ w.Start();
+
+ var font = Assets.Fonts.AgateSans;
+
+ while (Display.CurrentWindow.IsClosed == false)
+ {
+ Display.BeginFrame();
+ Display.Clear();
+
+ font.Color = AgateLib.Geometry.Color.White;
+ font.DrawText(0, 0, string.Format("Frequency: {0}", sa.Frequency));
+
+ Display.EndFrame();
+ Core.KeepAlive();
+
+ if (w.ElapsedMilliseconds > 500)
+ {
+ sa.Frequency += 50;
+ w.Reset();
+ w.Start();
+ }
+ }
+ }
+
+ public void ModifyModelParameters(ApplicationModels.SerialModelParameters parameters)
+ {
+ }
+ }
+}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeDisplayDriver.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeDisplayDriver.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeDisplayDriver.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -195,6 +195,11 @@
{
throw new NotImplementedException();
}
+
+
+ public async Task InitializeDefaultResourcesAsync(Assets.DefaultResources res)
+ {
+ }
}
}
Copied: trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/Resources.cs (from rev 1498, trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Resources.cs)
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/Resources.cs (rev 0)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/Resources.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using AgateLib;
+using AgateLib.Geometry;
+using AgateLib.DisplayLib;
+using AgateLib.Resources.Legacy;
+using AgateLib.Sprites;
+using AgateLib.ApplicationModels;
+
+namespace AgateLib.Testing.FoundationTests
+{
+ class ResourceTester : Scene, ISceneModelTest
+ {
+ public string Name { get { return "Resources"; } }
+ public string Category { get { return "Foundation"; } }
+
+ Surface surf;
+ ISprite sprite;
+ FontSurface font;
+
+ protected override void OnSceneStart()
+ {
+ AgateResourceCollection resources = new AgateResourceCollection("TestResourceFile.xml");
+
+ surf = new Surface(resources, "sample_surf");
+ sprite = new Sprite(resources, "sample_sprite");
+ font = new FontSurface(resources, "sample_font");
+
+ sprite.StartAnimation();
+ }
+
+ public override void Update(double delta_t)
+ {
+ sprite.Update();
+ }
+
+ public override void Draw()
+ {
+ Display.Clear(Color.Red);
+
+ font.DrawText(0, 0, "FPS: " + Display.FramesPerSecond.ToString());
+
+ surf.Draw(20, 20);
+
+ sprite.Draw(100, 150);
+ }
+
+ public void ModifyModelParameters(SceneModelParameters parameters)
+ {
+ }
+
+ public Scene StartScene
+ {
+ get { return this; }
+ }
+ }
+}
Modified: trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-09-01 19:13:43 UTC (rev 1501)
@@ -130,8 +130,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="AudioTests\SoundbufferStopTester.cs" />
- <Compile Include="AudioTests\StreamAudio.cs" />
<Compile Include="CoreTests\PersistantSettingsTest.cs" />
<Compile Include="CoreTests\PlatformDetection\PlatformDetection.cs">
<SubType>Form</SubType>
@@ -174,9 +172,6 @@
<DependentUpon>frmAudioPlayer.cs</DependentUpon>
<SubType>Code</SubType>
</Compile>
- <Compile Include="CoreTests\Resources.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="CoreTests\ErrorReport\ErrorReport.cs">
<SubType>Code</SubType>
</Compile>
@@ -415,9 +410,6 @@
<None Include="Assets\9ball.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
- <None Include="Assets\attacke.png">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
<None Include="Assets\ball.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -436,9 +428,6 @@
<None Include="Assets\dogs.zip">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
- <None Include="Assets\jellybean.png">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
<None Include="Assets\lotafont.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Deleted: trunk/AgateLib.Tests/Tests.WinForms/Assets/attacke.png
===================================================================
(Binary files differ)
Deleted: trunk/AgateLib.Tests/Tests.WinForms/Assets/jellybean.png
===================================================================
(Binary files differ)
Deleted: trunk/AgateLib.Tests/Tests.WinForms/AudioTests/SoundbufferStopTester.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/AudioTests/SoundbufferStopTester.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/AudioTests/SoundbufferStopTester.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -1,75 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using AgateLib;
-using AgateLib.AudioLib;
-using AgateLib.DisplayLib;
-using AgateLib.Geometry;
-using AgateLib.InputLib;
-using AgateLib.Platform.WinForms.Resources;
-using AgateLib.Platform.WinForms.ApplicationModels;
-using AgateLib.InputLib.Legacy;
-
-namespace AgateLib.Testing.AudioTests
-{
- class SoundbufferStopTester : IAgateTest
- {
-
-
- public string Name
- {
- get { return "SoundBuffer Stop"; }
- }
-
- public string Category
- {
- get { return "Audio"; }
- }
-
- SoundBuffer snda, sndb;
-
- public void Main(string[] args)
- {
- new PassiveModel(args).Run( () =>
- {
- DisplayWindow wind = DisplayWindow.CreateWindowed(
- "Sound Buffer Tester", 640, 480, false, null);
-
- snda = new SoundBuffer("snda.wav");
- sndb = new SoundBuffer("sndb.wav");
-
- FontSurface font = BuiltinResources.AgateSans14;
-
- Keyboard.KeyDown += new InputEventHandler(Keyboard_KeyDown);
-
- while (wind.IsClosed == false)
- {
- Display.BeginFrame();
- Display.Clear();
-
- font.Color = Color.White;
- font.DrawText("Press a for first sound, b for second sound.");
-
- if (snda.IsPlaying)
- font.DrawText(0, 30, "first sound is playing");
- if (sndb.IsPlaying)
- font.DrawText(0, 60, "second sound is playing");
-
- Display.EndFrame();
- Core.KeepAlive();
- }
- });
- }
-
- void Keyboard_KeyDown(InputEventArgs e)
- {
- if (e.KeyCode == KeyCode.A)
- snda.Play();
-
- if (e.KeyCode == KeyCode.B)
- sndb.Play();
- }
-
- }
-}
Deleted: trunk/AgateLib.Tests/Tests.WinForms/AudioTests/StreamAudio.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/AudioTests/StreamAudio.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/AudioTests/StreamAudio.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -1,145 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Text;
-using AgateLib;
-using AgateLib.AudioLib;
-using AgateLib.DisplayLib;
-using AgateLib.Platform.WinForms.Resources;
-using AgateLib.Platform.WinForms.ApplicationModels;
-
-namespace AgateLib.Testing.AudioTests
-{
- class StreamAudio : IAgateTest
- {
- public string Name
- {
- get { return "Streaming Audio"; }
- }
-
- public string Category
- {
- get { return "Audio"; }
- }
-
- class LoopingStream : Stream
- {
- public double Frequency { get; set; }
-
- public LoopingStream()
- {
- }
-
- public override bool CanRead
- {
- get { return true; }
- }
-
- public override bool CanSeek
- {
- get { return true; }
- }
-
- public override bool CanWrite
- {
- get { return false; }
- }
-
- public override void Flush()
- {
- throw new NotSupportedException();
- }
-
- public override long Length
- {
- get { return SamplingFrequency; }
- }
-
- public override long Position
- {
- get
- {
- return 0;
- }
- set
- {
- }
- }
-
- double lastValue;
- const int SamplingFrequency = 44100;
-
- public override int Read(byte[] buffer, int offset, int count)
- {
- double lv = lastValue;
-
- for (int i = 0; i < count / 2; i++)
- {
- double time = i / (double)SamplingFrequency;
- time *= 2 * Math.PI * Frequency;
- time += lv;
- lastValue = time;
-
- short val = (short)(Math.Sin(time) * short.MaxValue/2);
-
- buffer[offset + i * 2] = (byte)(val & 0xff);
- buffer[offset + i * 2 + 1] = (byte)(val >> 8);
- }
-
- return count;
- }
-
- public override long Seek(long offset, SeekOrigin origin)
- {
- throw new NotImplementedException();
- }
- public override void SetLength(long value)
- {
- throw new NotImplementedException();
- }
-
- public override void Write(byte[] buffer, int offset, int count)
- {
- throw new NotImplementedException();
- }
- }
- public void Main(string[] args)
- {
- new PassiveModel(args).Run( () =>
- {
- DisplayWindow wind = DisplayWindow.CreateWindowed("Generate Audio", 640, 480);
-
- LoopingStream sa = new LoopingStream();
- sa.Frequency = 100;
-
- StreamingSoundBuffer buf = new StreamingSoundBuffer(sa, SoundFormat.Pcm16(44100), 100);
-
- buf.Play();
-
- Stopwatch w = new Stopwatch();
- w.Start();
-
- while (wind.IsClosed == false)
- {
- Display.BeginFrame();
- Display.Clear();
-
- BuiltinResources.AgateSans14.Color = AgateLib.Geometry.Color.White;
- BuiltinResources.AgateSans14.DrawText(0, 0, string.Format("Frequency: {0}", sa.Frequency));
-
- Display.EndFrame();
- Core.KeepAlive();
-
- if (w.ElapsedMilliseconds > 500)
- {
- sa.Frequency += 50;
- w.Reset();
- w.Start();
- }
- }
- });
- }
- }
-}
Deleted: trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Resources.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Resources.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Resources.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -1,51 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using AgateLib;
-using AgateLib.Geometry;
-using AgateLib.DisplayLib;
-using AgateLib.Resources.Legacy;
-using AgateLib.Sprites;
-using AgateLib.Platform.WinForms.ApplicationModels;
-using AgateLib.Platform.WinForms;
-using AgateLib.ApplicationModels;
-
-namespace AgateLib.Testing.CoreTests
-{
- class ResourceTester : IDiscreteAgateTest
- {
- public void Main(string[] args)
- {
- new PassiveModel(new PassiveModelParameters(args)).Run( () =>
- {
- AgateResourceCollection resources = new AgateResourceCollection("TestResourceFile.xml");
-
- DisplayWindow wind = new DisplayWindow(resources, "main_window");
- Surface surf = new Surface(resources, "sample_surf");
- ISprite sprite = new Sprite(resources, "sample_sprite");
- FontSurface font = new FontSurface(resources, "sample_font");
-
- sprite.StartAnimation();
-
- while (wind.IsClosed == false)
- {
- Display.BeginFrame();
- Display.Clear(Color.Red);
-
- font.DrawText(0, 0, "FPS: " + Display.FramesPerSecond.ToString());
-
- surf.Draw(20, 20);
-
- sprite.Update();
- sprite.Draw(100, 100);
-
- Display.EndFrame();
- Core.KeepAlive();
- }
- });
- }
-
- public string Name { get { return "Resources"; } }
- public string Category { get { return "Core"; } }
- }
-}
Modified: trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/DisplayWindowEvents.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/DisplayWindowEvents.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/DisplayWindowEvents.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -9,7 +9,7 @@
namespace AgateLib.Testing.DisplayTests
{
- class DisplayWindowEvents : IAgateTest
+ class DisplayWindowEvents : IDiscreteAgateTest
{
public string Name
{
@@ -40,8 +40,8 @@
Display.BeginFrame();
Display.Clear();
- BuiltinResources.AgateSans24.DrawText(text);
-
+ Assets.Fonts.AgateSans.DrawText(text);
+
Display.EndFrame();
Core.KeepAlive();
}
Modified: trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/FullScreen.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/FullScreen.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/FullScreen.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -32,7 +32,7 @@
Surface mySurface = new Surface("jellybean.png");
Keyboard.KeyDown += new InputEventHandler(Keyboard_KeyDown);
- FontSurface font = BuiltinResources.AgateSans14;
+ Font font = AgateLib.Assets.Fonts.AgateSans;
int frames = 1;
Modified: trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -29,7 +29,7 @@
List<Surface> tests = new List<Surface>();
bool done;
- FontSurface font;
+ Font font;
public void Main(string[] args)
{
@@ -38,7 +38,7 @@
DisplayWindow wind = DisplayWindow.CreateWindowed("Multiple Framebuffer Test",
640, 480);
- font = BuiltinResources.AgateSans14;
+ font = Assets.Fonts.AgateSans;
CreateTests();
Modified: trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -109,7 +109,7 @@
Color clr = Color.White;
- BuiltinResources.AgateSans14.DrawText(x, y, "Sample Text");
+ Assets.Fonts.AgateSans.DrawText(x, y, "Sample Text");
Display.EndFrame();
Modified: trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/PixelBufferTest/PixelBufferTest.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/PixelBufferTest/PixelBufferTest.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/PixelBufferTest/PixelBufferTest.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -7,6 +7,7 @@
using AgateLib.InputLib;
using AgateLib.Platform.WinForms.ApplicationModels;
using AgateLib.InputLib.Legacy;
+using AgateLib.ApplicationModels;
namespace AgateLib.Testing.DisplayTests.PixelBufferTest
{
@@ -22,7 +23,11 @@
public void Main(string[] args)
{
- using (var model = new PassiveModel(args))
+ var p = new PassiveModelParameters();
+ p.ApplicationName = "Pixel Buffer Test";
+ p.AssetLocations.Path = "Assets";
+
+ using (var model = new PassiveModel(p))
{
model.Run(() =>
{
Modified: trunk/AgateLib.Tests/Tests.WinForms/FontTests/Kerning.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/FontTests/Kerning.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/FontTests/Kerning.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -34,7 +34,7 @@
Keyboard.KeyDown += new InputEventHandler(Keyboard_KeyDown);
DisplayWindow wind = DisplayWindow.CreateWindowed("Kerning test", 800, 600);
- FontSurface font = BuiltinResources.AgateSans14;
+ FontSurface font = Assets.Fonts.AgateSans.GetFontSurface(14, FontStyles.None);
FontSurface unkerned = ConstructUnkernedFont(font);
string text = ConstructKerningText(wind, font);
Modified: trunk/AgateLib.Tests/Tests.WinForms/Shaders/Lighting3DTest.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/Shaders/Lighting3DTest.cs 2014-09-01 07:36:00 UTC (rev 1500)
+++ trunk/AgateLib.Tests/Tests.WinForms/Shaders/Lighting3DTest.cs 2014-09-01 19:13:43 UTC (rev 1501)
@@ -42,7 +42,7 @@
new PassiveModel(args).Run( () =>
{
DisplayWindow wind = DisplayWindow.CreateWindowed("Lighting 3D", 640, 480);
- FontSurface font = BuiltinResources.AgateSerif14;
+ Font font = Assets.Fonts.AgateSans;
Surface texture = new Surface("bg-bricks.png");
AgateLib.Geometry.Builders.Cub...
[truncated message content] |
|
From: <ka...@us...> - 2014-09-01 07:36:07
|
Revision: 1500
http://sourceforge.net/p/agate/code/1500
Author: kanato
Date: 2014-09-01 07:36:00 +0000 (Mon, 01 Sep 2014)
Log Message:
-----------
Fix size of SmallLogo.scale-240.png.
Modified Paths:
--------------
trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/SmallLogo.scale-240.png
Modified: trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/SmallLogo.scale-240.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-01 07:18:22
|
Revision: 1499
http://sourceforge.net/p/agate/code/1499
Author: kanato
Date: 2014-09-01 07:18:15 +0000 (Mon, 01 Sep 2014)
Log Message:
-----------
Remove unnecessary Platform.Common library.
Removed Paths:
-------------
trunk/AgateLib.Platform.Common/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-01 07:07:40
|
Revision: 1498
http://sourceforge.net/p/agate/code/1498
Author: kanato
Date: 2014-09-01 07:07:34 +0000 (Mon, 01 Sep 2014)
Log Message:
-----------
Remove unnecessary Platform.Common library.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib-Windows.sln
trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj
trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
trunk/AgateLib.Platform.WindowsMetro/AgateLib.Platform.WindowsMetro.csproj
trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj
trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj
trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj
trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj
Added Paths:
-----------
trunk/AgateLib/Platform/DiagnosticsStopwatch.cs
trunk/AgateLib/Platform/PlatformSerialization.cs
Removed Paths:
-------------
trunk/AgateLib.Platform.Common/PlatformImplementation/DiagnosticsStopwatch.cs
trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib/AgateLib.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -73,6 +73,8 @@
<Compile Include="Geometry\CoordinateSystems\FixedAspectRatioCoordinates.cs" />
<Compile Include="Geometry\ICoordinateSystemCreator.cs" />
<Compile Include="ApplicationModels\ModelParameters.cs" />
+ <Compile Include="Platform\DiagnosticsStopwatch.cs" />
+ <Compile Include="Platform\PlatformSerialization.cs" />
<Compile Include="Resources\DC\AgateResource.cs" />
<Compile Include="Resources\DC\FontResource.cs" />
<Compile Include="Resources\DC\FontSurfaceResource.cs" />
Copied: trunk/AgateLib/Platform/DiagnosticsStopwatch.cs (from rev 1493, trunk/AgateLib.Platform.Common/PlatformImplementation/DiagnosticsStopwatch.cs)
===================================================================
--- trunk/AgateLib/Platform/DiagnosticsStopwatch.cs (rev 0)
+++ trunk/AgateLib/Platform/DiagnosticsStopwatch.cs 2014-09-01 07:07:34 UTC (rev 1498)
@@ -0,0 +1,144 @@
+using AgateLib.Platform;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Watch = System.Diagnostics.Stopwatch;
+
+namespace AgateLib.Platform.Common.PlatformImplementation
+{
+ /// <summary>
+ /// Class which represents a StopWatch.
+ /// A StopWatch can be paused and reset independently of other
+ /// StopWatches.
+ /// </summary>
+ public class DiagnosticsStopwatch : IDisposable, AgateLib.Platform.IStopwatch
+ {
+ Watch watch = new Watch();
+ int mPause = 1;
+
+ /// <summary>
+ /// Constructs a timer object, and immediately begins
+ /// keeping track of time.
+ /// </summary>
+ public DiagnosticsStopwatch()
+ : this(true)
+ {
+ watch.Start();
+ }
+ /// <summary>
+ /// Constructs a timer object.
+ /// If the timer starts paused, a call to Resume() must be made
+ /// for it to begin keeping track of time.
+ /// </summary>
+ /// <param name="autostart">Pass true to immediately begin keeping track of time.
+ /// False to pause the timer initially.</param>
+ public DiagnosticsStopwatch(bool autostart)
+ {
+ Timing.PauseAllTimersEvent += Pause;
+ Timing.ResumeAllTimersEvent += Resume;
+ Timing.ForceResumeAllTimersEvent += ForceResume;
+
+ if (autostart)
+ {
+ watch.Start();
+ mPause = 0;
+ }
+ }
+
+ /// <summary>
+ /// Destroys this timer.
+ /// </summary>
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+ /// <summary>
+ /// Removes this timer from events.
+ /// </summary>
+ /// <param name="manual"></param>
+ protected virtual void Dispose(bool manual)
+ {
+ if (manual)
+ {
+ Timing.PauseAllTimersEvent -= Pause;
+ Timing.ResumeAllTimersEvent -= Resume;
+ Timing.ForceResumeAllTimersEvent -= ForceResume;
+ }
+ }
+
+ /// <summary>
+ /// Returns the number of seconds since the timer started.
+ /// </summary>
+ public double TotalSeconds
+ {
+ get { return (double)watch.ElapsedTicks / (double)Watch.Frequency; }
+ }
+
+ /// <summary>
+ /// Returns the number of ticks (milliseconds) since the timer started.
+ /// </summary>
+ public double TotalMilliseconds
+ {
+ get { return 1000.0 * TotalSeconds; }
+ }
+
+ /// <summary>
+ /// Resets the timer to zero.
+ /// </summary>
+ public void Reset()
+ {
+ watch = new System.Diagnostics.Stopwatch();
+ if (mPause <= 0)
+ watch.Start();
+ }
+
+ /// <summary>
+ /// Increments the pause counter.
+ /// If the counter is greater than zero, the timer won't advance.
+ /// </summary>
+ public void Pause()
+ {
+ watch.Stop();
+ mPause += 1;
+ }
+ /// <summary>
+ /// Decrements the pause counter.
+ /// If the pause counter is zero the timer will begin advancing.
+ /// </summary>
+ public void Resume()
+ {
+ mPause -= 1;
+
+ if (mPause < 0)
+ mPause = 0;
+
+ if (mPause == 0)
+ watch.Start();
+ }
+
+
+ /// <summary>
+ /// Sets the pause counter to zero, causing the timer to begin advancing
+ /// regardless of how many calls to Pause() are made.
+ /// </summary>
+ public void ForceResume()
+ {
+ if (mPause <= 0)
+ return;
+
+ mPause = 0;
+ Resume();
+ }
+
+ /// <summary>
+ /// Gets whether or not this StopWatch is paused.
+ /// </summary>
+ public bool IsPaused
+ {
+ get { return mPause > 0; }
+ }
+ }
+}
Copied: trunk/AgateLib/Platform/PlatformSerialization.cs (from rev 1493, trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs)
===================================================================
--- trunk/AgateLib/Platform/PlatformSerialization.cs (rev 0)
+++ trunk/AgateLib/Platform/PlatformSerialization.cs 2014-09-01 07:07:34 UTC (rev 1498)
@@ -0,0 +1,16 @@
+using AgateLib.Drivers;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.Platform.Common.PlatformImplementation
+{
+ public class PlatformSerialization : IPlatformSerialization
+ {
+ public object CreateInstance(Type t)
+ {
+ return Activator.CreateInstance(t, true);
+ }
+ }
+}
Modified: trunk/AgateLib-Windows.sln
===================================================================
--- trunk/AgateLib-Windows.sln 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib-Windows.sln 2014-09-01 07:07:34 UTC (rev 1498)
@@ -22,8 +22,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.OpenGL", "AgateLib.OpenGL\AgateLib.OpenGL.csproj", "{94734E5A-0344-43E8-BB30-E32E3F57F611}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.Common", "AgateLib.Platform.Common\AgateLib.Platform.Common.csproj", "{FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsMetro", "AgateLib.Platform.WindowsMetro\AgateLib.Platform.WindowsMetro.csproj", "{C9B8F763-187D-4F2E-BAEE-827B7247C278}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsPhone", "AgateLib.Platform.WindowsPhone\AgateLib.Platform.WindowsPhone.csproj", "{9BEF78DB-B535-47D3-9C14-453D373807EC}"
@@ -124,23 +122,6 @@
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.Build.0 = Release|x64
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.ActiveCfg = Release|x86
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.Build.0 = Release|x86
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|ARM.Build.0 = Debug|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|x64.ActiveCfg = Debug|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|x86.ActiveCfg = Debug|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|x86.Build.0 = Debug|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|Any CPU.ActiveCfg = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|Any CPU.Build.0 = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|ARM.ActiveCfg = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|x64.ActiveCfg = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|x86.ActiveCfg = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Any CPU.Build.0 = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|ARM.ActiveCfg = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|x64.ActiveCfg = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|x86.ActiveCfg = Release|Any CPU
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|ARM.ActiveCfg = Debug|ARM
Modified: trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj
===================================================================
--- trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -44,13 +44,14 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <Compile Include="PlatformImplementation\PlatformSerialization.cs" />
- <Compile Include="PlatformImplementation\DiagnosticsStopwatch.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="PlatformImplementation\" />
+ </ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Deleted: trunk/AgateLib.Platform.Common/PlatformImplementation/DiagnosticsStopwatch.cs
===================================================================
--- trunk/AgateLib.Platform.Common/PlatformImplementation/DiagnosticsStopwatch.cs 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Platform.Common/PlatformImplementation/DiagnosticsStopwatch.cs 2014-09-01 07:07:34 UTC (rev 1498)
@@ -1,144 +0,0 @@
-using AgateLib.Platform;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Watch = System.Diagnostics.Stopwatch;
-
-namespace AgateLib.Platform.Common.PlatformImplementation
-{
- /// <summary>
- /// Class which represents a StopWatch.
- /// A StopWatch can be paused and reset independently of other
- /// StopWatches.
- /// </summary>
- public class DiagnosticsStopwatch : IDisposable, AgateLib.Platform.IStopwatch
- {
- Watch watch = new Watch();
- int mPause = 1;
-
- /// <summary>
- /// Constructs a timer object, and immediately begins
- /// keeping track of time.
- /// </summary>
- public DiagnosticsStopwatch()
- : this(true)
- {
- watch.Start();
- }
- /// <summary>
- /// Constructs a timer object.
- /// If the timer starts paused, a call to Resume() must be made
- /// for it to begin keeping track of time.
- /// </summary>
- /// <param name="autostart">Pass true to immediately begin keeping track of time.
- /// False to pause the timer initially.</param>
- public DiagnosticsStopwatch(bool autostart)
- {
- Timing.PauseAllTimersEvent += Pause;
- Timing.ResumeAllTimersEvent += Resume;
- Timing.ForceResumeAllTimersEvent += ForceResume;
-
- if (autostart)
- {
- watch.Start();
- mPause = 0;
- }
- }
-
- /// <summary>
- /// Destroys this timer.
- /// </summary>
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(this);
- }
- /// <summary>
- /// Removes this timer from events.
- /// </summary>
- /// <param name="manual"></param>
- protected virtual void Dispose(bool manual)
- {
- if (manual)
- {
- Timing.PauseAllTimersEvent -= Pause;
- Timing.ResumeAllTimersEvent -= Resume;
- Timing.ForceResumeAllTimersEvent -= ForceResume;
- }
- }
-
- /// <summary>
- /// Returns the number of seconds since the timer started.
- /// </summary>
- public double TotalSeconds
- {
- get { return (double)watch.ElapsedTicks / (double)Watch.Frequency; }
- }
-
- /// <summary>
- /// Returns the number of ticks (milliseconds) since the timer started.
- /// </summary>
- public double TotalMilliseconds
- {
- get { return 1000.0 * TotalSeconds; }
- }
-
- /// <summary>
- /// Resets the timer to zero.
- /// </summary>
- public void Reset()
- {
- watch = new System.Diagnostics.Stopwatch();
- if (mPause <= 0)
- watch.Start();
- }
-
- /// <summary>
- /// Increments the pause counter.
- /// If the counter is greater than zero, the timer won't advance.
- /// </summary>
- public void Pause()
- {
- watch.Stop();
- mPause += 1;
- }
- /// <summary>
- /// Decrements the pause counter.
- /// If the pause counter is zero the timer will begin advancing.
- /// </summary>
- public void Resume()
- {
- mPause -= 1;
-
- if (mPause < 0)
- mPause = 0;
-
- if (mPause == 0)
- watch.Start();
- }
-
-
- /// <summary>
- /// Sets the pause counter to zero, causing the timer to begin advancing
- /// regardless of how many calls to Pause() are made.
- /// </summary>
- public void ForceResume()
- {
- if (mPause <= 0)
- return;
-
- mPause = 0;
- Resume();
- }
-
- /// <summary>
- /// Gets whether or not this StopWatch is paused.
- /// </summary>
- public bool IsPaused
- {
- get { return mPause > 0; }
- }
- }
-}
Deleted: trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs
===================================================================
--- trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs 2014-09-01 07:07:34 UTC (rev 1498)
@@ -1,16 +0,0 @@
-using AgateLib.Drivers;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace AgateLib.Platform.Common.PlatformImplementation
-{
- public class PlatformSerialization : IPlatformSerialization
- {
- public object CreateInstance(Type t)
- {
- return Activator.CreateInstance(t, true);
- }
- }
-}
Modified: trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -166,10 +166,6 @@
<Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project>
<Name>AgateLib.OpenGL</Name>
</ProjectReference>
- <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\AgateLib\AgateLib.csproj">
<Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
<Name>AgateLib</Name>
Modified: trunk/AgateLib.Platform.WindowsMetro/AgateLib.Platform.WindowsMetro.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsMetro/AgateLib.Platform.WindowsMetro.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Platform.WindowsMetro/AgateLib.Platform.WindowsMetro.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -105,10 +105,6 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
- <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj">
<Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project>
<Name>AgateLib.Platform.WindowsStoreCommon</Name>
Modified: trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -83,10 +83,6 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
- <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj">
<Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project>
<Name>AgateLib.Platform.WindowsStoreCommon</Name>
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -101,10 +101,6 @@
<Content Include="Resources\ShaderSource\Basic2Dvert.hlsl" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\AgateLib\AgateLib.csproj">
<Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
<Name>AgateLib</Name>
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -38,10 +38,6 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
- <ProjectReference Include="..\..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
<Name>AgateLib</Name>
Modified: trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -105,10 +105,6 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
- <ProjectReference Include="..\..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\..\AgateLib.Platform.WindowsMetro\AgateLib.Platform.WindowsMetro.csproj">
<Project>{c9b8f763-187d-4f2e-baee-827b7247c278}</Project>
<Name>AgateLib.Platform.WindowsMetro</Name>
Modified: trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -82,10 +82,6 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
- <ProjectReference Include="..\..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\..\AgateLib.Platform.WindowsPhone\AgateLib.Platform.WindowsPhone.csproj">
<Project>{9bef78db-b535-47d3-9c14-453d373807ec}</Project>
<Name>AgateLib.Platform.WindowsPhone</Name>
Modified: trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj
===================================================================
--- trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj 2014-08-31 18:55:13 UTC (rev 1497)
+++ trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj 2014-09-01 07:07:34 UTC (rev 1498)
@@ -117,10 +117,6 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\..\AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj">
<Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
<Name>AgateLib.Platform.WinForms</Name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 18:55:22
|
Revision: 1497
http://sourceforge.net/p/agate/code/1497
Author: kanato
Date: 2014-08-31 18:55:13 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Rename OpenRead to OpenReadAsync.
Fix asset locations in winforms initialization.
Modified Paths:
--------------
trunk/AgateLib/IO/IReadFileProvider.cs
trunk/AgateLib/IO/SubDirectoryProvider.cs
trunk/AgateLib/Resources/DC/AgateResourceCollection.cs
trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs
trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs
trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs
trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs
trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs
trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs
trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs
trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/CoordinateSystem.cs
Modified: trunk/AgateLib/IO/IReadFileProvider.cs
===================================================================
--- trunk/AgateLib/IO/IReadFileProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib/IO/IReadFileProvider.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -35,7 +35,7 @@
/// </summary>
/// <param name="filename">The path and filename of the file to read from.</param>
/// <returns></returns>
- Task<Stream> OpenRead(string filename);
+ Task<Stream> OpenReadAsync(string filename);
/// <summary>
/// Checks to if the specified file exists in the file provider.
/// </summary>
Modified: trunk/AgateLib/IO/SubDirectoryProvider.cs
===================================================================
--- trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -43,9 +43,9 @@
{
return parent.ToString() + subdir;
}
- public async Task<System.IO.Stream> OpenRead(string filename)
+ public async Task<System.IO.Stream> OpenReadAsync(string filename)
{
- return await parent.OpenRead(subdir + filename);
+ return await parent.OpenReadAsync(subdir + filename);
}
public bool FileExists(string filename)
Modified: trunk/AgateLib/Resources/DC/AgateResourceCollection.cs
===================================================================
--- trunk/AgateLib/Resources/DC/AgateResourceCollection.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib/Resources/DC/AgateResourceCollection.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -49,7 +49,7 @@
retval.FileProvider = FileProvider;
- using (var stream = await retval.FileProvider.OpenRead(filename))
+ using (var stream = await retval.FileProvider.OpenReadAsync(filename))
{
retval.LoadFrom(stream);
}
Modified: trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs
===================================================================
--- trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -117,7 +117,6 @@
public AgateResourceCollection()
{
mSurfaceAccessor = new SurfaceResourceList(this);
- //mGuiThemeAccessor = new GuiThemeResourceList(this);
this.mStore.Add(mStringTableKey, new StringTable());
}
@@ -128,7 +127,6 @@
public AgateResourceCollection(string filename)
{
mSurfaceAccessor = new SurfaceResourceList(this);
- //mGuiThemeAccessor = new GuiThemeResourceList(this);
RootDirectory = System.IO.Path.GetDirectoryName(filename);
@@ -137,7 +135,7 @@
private async Task Load(string filename)
{
- using (Stream s = await FileProvider.OpenRead(filename))
+ using (Stream s = await FileProvider.OpenReadAsync(filename))
{
AgateResourceLoader.LoadResources(this, s);
}
Modified: trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -84,7 +84,7 @@
{
XleSerializer ser = new XleSerializer(typeof(AgateDatabase));
- using (Stream x = await provider.OpenRead("catalog.txt"))
+ using (Stream x = await provider.OpenReadAsync("catalog.txt"))
{
AgateDatabase retval = (AgateDatabase)ser.Deserialize(x);
Modified: trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -109,7 +109,7 @@
{
string filename = string.Format("data/{0}.txt", name);
- using (Stream r = FileProvider.OpenRead(filename).Result)
+ using (Stream r = FileProvider.OpenReadAsync(filename).Result)
{
AgateTable tbl = AgateTable.FromStream(r);
Modified: trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -1,4 +1,5 @@
-using AgateLib.DisplayLib;
+using AgateLib.ApplicationModels;
+using AgateLib.DisplayLib;
using AgateLib.Drivers;
using AgateLib.Platform.WinForms.Resources;
using System;
@@ -12,11 +13,12 @@
class FormsFactory : IAgateFactory
{
FontSurface mDefaultFont;
+ PlatformFactory mPlatformFactory;
public FormsFactory()
{
DisplayFactory = new DisplayFactory();
- PlatformFactory = new PlatformFactory();
+ mPlatformFactory = new PlatformFactory();
var sdl = new SdlFactory();
@@ -24,10 +26,15 @@
InputFactory = sdl;
}
+ public void SetAssetLocations(AssetLocations assetLocations)
+ {
+ mPlatformFactory.SetAssetLocations(assetLocations);
+ }
+
public IDisplayFactory DisplayFactory { get; private set; }
public IAudioFactory AudioFactory { get; private set; }
public IInputFactory InputFactory { get; private set; }
- public IPlatformFactory PlatformFactory { get; private set; }
+ public IPlatformFactory PlatformFactory { get { return mPlatformFactory; } }
public DisplayLib.FontSurface DefaultFont
Modified: trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -26,6 +26,12 @@
public PlatformInfo Info { get; private set; }
public IReadFileProvider AssetFileProvider { get; private set; }
+
+ public void SetAssetLocations(AgateLib.ApplicationModels.AssetLocations assetLocations)
+ {
+ AssetFileProvider = new FileSystemProvider(System.IO.Path.GetFullPath(assetLocations.Path));
+ }
+
public IStopwatch CreateStopwatch()
{
return new DiagnosticsStopwatch();
Modified: trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -56,7 +56,7 @@
/// </summary>
/// <param name="filename">The filename to search for.</param>
/// <returns></returns>
- public async Task<Stream> OpenRead(string filename)
+ public async Task<Stream> OpenReadAsync(string filename)
{
if (string.IsNullOrEmpty(filename))
throw new ArgumentNullException("You must supply a file name.");
@@ -65,7 +65,7 @@
{
if (mProviders[i].FileExists(filename))
{
- return await mProviders[i].OpenRead(filename);
+ return await mProviders[i].OpenReadAsync(filename);
}
}
@@ -305,7 +305,7 @@
/// <returns></returns>
public string ReadAllText(string filename)
{
- Stream s = OpenRead(filename).Result;
+ Stream s = OpenReadAsync(filename).Result;
return new StreamReader(s).ReadToEnd();
}
Modified: trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -47,7 +47,7 @@
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
- public async Task<Stream> OpenRead(string filename)
+ public async Task<Stream> OpenReadAsync(string filename)
{
string resolvedName = FindFileName(filename);
if (resolvedName == null)
@@ -254,7 +254,7 @@
/// <returns></returns>
public string ReadAllText(string filename)
{
- Stream s = OpenRead(filename).Result;
+ Stream s = OpenReadAsync(filename).Result;
return new StreamReader(s).ReadToEnd();
}
Modified: trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -202,7 +202,7 @@
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
- public async Task<Stream> OpenRead(string filename)
+ public async Task<Stream> OpenReadAsync(string filename)
{
for (int i = 0; i < mFiles.Count; i++)
{
@@ -278,7 +278,7 @@
/// <returns></returns>
public string ReadAllText(string filename)
{
- Stream s = OpenRead(filename).Result;
+ Stream s = OpenReadAsync(filename).Result;
return new StreamReader(s).ReadToEnd();
}
Modified: trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -271,7 +271,7 @@
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
- public async Task<Stream> OpenRead(string filename)
+ public async Task<Stream> OpenReadAsync(string filename)
{
FileHeader header = GetFile(filename);
@@ -345,7 +345,7 @@
/// <returns></returns>
public string ReadAllText(string filename)
{
- Stream s = OpenRead(filename).Result;
+ Stream s = OpenReadAsync(filename).Result;
return new StreamReader(s).ReadToEnd();
}
Modified: trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -18,6 +18,7 @@
Core.Initialize(factory);
}
+ factory.SetAssetLocations(parameters.AssetLocations);
Core.InitAssetLocations(parameters.AssetLocations);
////var assetProvider = new FileSystemProvider(System.IO.Path.GetFullPath(parameters.AssetLocations.Path));
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -21,7 +21,7 @@
this.path = path;
}
- public async Task<System.IO.Stream> OpenRead(string filename)
+ public async Task<System.IO.Stream> OpenReadAsync(string filename)
{
Uri uri = new Uri(path + filename);
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/CoordinateSystem.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/CoordinateSystem.cs 2014-08-31 18:26:40 UTC (rev 1496)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/CoordinateSystem.cs 2014-08-31 18:55:13 UTC (rev 1497)
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
-
using AgateLib;
using AgateLib.DisplayLib;
using AgateLib.DisplayLib.Shaders;
@@ -14,7 +13,6 @@
class CoordinateSystem : ISerialModelTest
{
int ortho = 0;
- DisplayWindow wind;
public string Name { get { return "Coordinate System"; } }
public string Category { get { return "Shaders"; } }
@@ -26,7 +24,7 @@
Surface surf = new Surface("jellybean.png");
surf.Color = Color.Cyan;
- while (wind.IsClosed == false)
+ while (Display.CurrentWindow.IsClosed == false)
{
Display.BeginFrame();
Display.Clear();
@@ -70,7 +68,7 @@
Keyboard.ReleaseKey(KeyCode.Space);
}
else if (e.KeyCode == KeyCode.Escape)
- wind.Dispose();
+ Display.CurrentWindow.Dispose();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 18:26:47
|
Revision: 1496
http://sourceforge.net/p/agate/code/1496
Author: kanato
Date: 2014-08-31 18:26:40 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Remove Silverlight 5 as a target.
Fix loading of font resources using old resource system.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/Algorithms/PathFinding/AStar.cs
trunk/AgateLib/Algorithms/PathFinding/AStarState.cs
trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs
trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs
trunk/AgateLib/Geometry/Color.cs
trunk/AgateLib/IO/IPath.cs
trunk/AgateLib/IO/IReadFileProvider.cs
trunk/AgateLib/IO/SubDirectoryProvider.cs
trunk/AgateLib/Resources/DC/AgateResourceCollection.cs
trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/AgateLib/Serialization/Xle/XleSerializer.cs
trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs
trunk/AgateLib/UserInterface/Css/Binders/Binding.cs
trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs
trunk/AgateLib/UserInterface/Css/Binders/ReflectionPropertyBinder.cs
trunk/AgateLib/UserInterface/Css/Parser/Lexer/Tokenizer.cs
trunk/AgateLib/UserInterface/Css/ReflectionExtensions.cs
trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs
trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs
trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs
trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs
trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
trunk/AgateLib.Tests/Tests.WindowsMetro/MainPage.xaml
Added Paths:
-----------
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/TestResourceFile.xml
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/fonts/
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/CoordinateSystem.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/FontAlignment.cs
Removed Paths:
-------------
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/CoordinateSystem.cs
trunk/AgateLib.Tests/Tests.WinForms/FontTests/FontAlignment.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/AgateLib.csproj 2014-08-31 18:26:40 UTC (rev 1496)
@@ -2,7 +2,7 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
- <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
+ <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9490B719-829E-43A7-A5FE-8001F8A81759}</ProjectGuid>
@@ -13,8 +13,8 @@
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <TargetFrameworkProfile>Profile344</TargetFrameworkProfile>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
Modified: trunk/AgateLib/Algorithms/PathFinding/AStar.cs
===================================================================
--- trunk/AgateLib/Algorithms/PathFinding/AStar.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Algorithms/PathFinding/AStar.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -63,14 +63,14 @@
}
- public void QueueFindPath(AStarState<T> task)
+ public async void QueueFindPath(AStarState<T> task)
{
System.Diagnostics.Debug.Assert(task.Tag != null);
task.SearchingPath = true;
mActiveTasks++;
- ThreadPool.QueueUserWorkItem(FindPathThreadPoolCallback, task);
+ await FindPathThreadPoolCallback(task);
}
/// <summary>
/// Finds a path on the current thread and returns.
@@ -83,7 +83,7 @@
{
task.SearchingPath = true;
- FindPath(task);
+ FindPath(task).RunSynchronously();
}
finally
{
@@ -91,15 +91,11 @@
}
}
- void FindPathThreadPoolCallback(object _task)
+ async Task FindPathThreadPoolCallback(AStarState<T> task)
{
- AStarState<T> task = null;
-
try
{
- task = (AStarState<T>)_task;
-
- FindPath(task);
+ await FindPath(task);
task.Complete = true;
task.OnCompleted();
@@ -111,25 +107,25 @@
}
}
- public void FindPath(AStarState<T> task)
+ public async Task FindPath(AStarState<T> state)
{
- var openNodes = task.openNodes;
- var closedNodes = task.closedNodes;
+ var openNodes = state.openNodes;
+ var closedNodes = state.closedNodes;
openNodes.Clear();
closedNodes.Clear();
- task.Path.Clear();
- task.AbortOperation = false;
+ state.Path.Clear();
+ state.AbortOperation = false;
var node = new AStarNode<T>
{
- Location = task.Start,
+ Location = state.Start,
Parent = null,
- Heuristic = mMap.CalculateHeuristic(task.Start, task.EndPoints),
+ Heuristic = mMap.CalculateHeuristic(state.Start, state.EndPoints),
PaidCost = 0
};
- task.openNodes.Add(node);
+ state.openNodes.Add(node);
bool found = false;
int steps = 0;
@@ -144,7 +140,7 @@
openNodes.RemoveAt(0);
closedNodes.Add(node);
- if (task.EndPoints.Contains(node.Location))
+ if (state.EndPoints.Contains(node.Location))
{
found = true;
break;
@@ -154,11 +150,11 @@
if (steps > maxSteps)
break;
- foreach (T test in mMap.GetAvailableSteps(task, node.Location))
+ foreach (T test in mMap.GetAvailableSteps(state, node.Location))
{
if (mAbort)
return;
- if (task.AbortOperation)
+ if (state.AbortOperation)
return;
if (LocationIn(closedNodes, test))
@@ -187,7 +183,7 @@
Location = test,
Parent = node,
PaidCost = node.PaidCost + deltaCost,
- Heuristic = mMap.CalculateHeuristic(test, task.EndPoints)
+ Heuristic = mMap.CalculateHeuristic(test, state.EndPoints)
};
if (newtarget.Heuristic < 0)
@@ -212,11 +208,11 @@
if (!found)
{
- task.FoundPath = false;
+ state.FoundPath = false;
return;
}
- task.Path.Add(node.Location);
+ state.Path.Add(node.Location);
while (node.Parent != null && node.Parent != node)
{
@@ -224,10 +220,10 @@
return;
node = node.Parent;
- task.Path.Add(node.Location);
+ state.Path.Add(node.Location);
}
- task.FoundPath = true;
+ state.FoundPath = true;
}
int FindPointInOpenNodes(List<AStarNode<T>> openNodes, T location)
Modified: trunk/AgateLib/Algorithms/PathFinding/AStarState.cs
===================================================================
--- trunk/AgateLib/Algorithms/PathFinding/AStarState.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Algorithms/PathFinding/AStarState.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -21,6 +21,7 @@
using System.Linq;
using System.Text;
using AgateLib.Geometry;
+using System.Threading.Tasks;
namespace AgateLib.Algorithms.PathFinding
{
Modified: trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs
===================================================================
--- trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -20,6 +20,7 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -50,7 +51,8 @@
private void ExecuteDelegate(Delegate p, string[] tokens)
{
- var parameters = p.Method.GetParameters();
+ var method = p.GetMethodInfo();
+ var parameters = method.GetParameters();
object[] args = new object[parameters.Length];
bool notEnoughArgs = false;
bool badArgs = false;
@@ -96,9 +98,9 @@
if (badArgs || notEnoughArgs)
return;
- object retval = p.Method.Invoke(p.Target, args);
+ object retval = method.Invoke(p.Target, args);
- if (p.Method.ReturnType != typeof(void) && retval != null)
+ if (method.ReturnType != typeof(void) && retval != null)
{
WriteLine(retval.ToString());
}
@@ -126,11 +128,11 @@
else
{
Delegate d = mCommands[command];
-
+ var method = d.GetMethodInfo();
Write("Usage: ");
Write(command + " ");
- var parameters = d.Method.GetParameters();
+ var parameters = method.GetParameters();
for (int i = 0; i < parameters.Length; i++)
{
if (parameters[i].IsOptional)
@@ -152,7 +154,7 @@
}
if (string.IsNullOrEmpty(description))
{
- var descripAttrib = (DescriptionAttribute)d.Method.GetCustomAttributes(typeof(DescriptionAttribute), false).FirstOrDefault();
+ var descripAttrib = (DescriptionAttribute)method.GetCustomAttributes(typeof(DescriptionAttribute), false).FirstOrDefault();
if (descripAttrib != null)
description = descripAttrib.Description;
Modified: trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs
===================================================================
--- trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -20,6 +20,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
namespace AgateLib.Extensions.Collections.Generic
@@ -42,11 +43,11 @@
Comparison<T> comp = null;
- if (typeof(IComparable<T>).IsAssignableFrom(typeof(T)))
+ if (typeof(T).GetTypeInfo().ImplementedInterfaces.Contains(typeof(IComparable<T>)))
{
comp = (x, y) => ((IComparable<T>)x).CompareTo(y);
}
- else if (typeof(IComparable).IsAssignableFrom(typeof(T)))
+ else if (typeof(T).GetTypeInfo().ImplementedInterfaces.Contains(typeof(IComparable)))
{
comp = (x, y) => ((IComparable)x).CompareTo(y);
}
Modified: trunk/AgateLib/Geometry/Color.cs
===================================================================
--- trunk/AgateLib/Geometry/Color.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Geometry/Color.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -18,6 +18,8 @@
//
using System;
using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
using System.Runtime.InteropServices;
namespace AgateLib.Geometry
@@ -600,11 +602,11 @@
static System.Reflection.PropertyInfo NamedColorStaticProperty(string name)
{
- var retval = typeof(Color).GetProperty(name,
- System.Reflection.BindingFlags.Static |
- System.Reflection.BindingFlags.Public |
- System.Reflection.BindingFlags.IgnoreCase);
-
+ var retval = typeof(Color).GetTypeInfo().DeclaredProperties.First(
+ x => x.PropertyType == typeof(Color) &&
+ x.GetMethod.IsStatic && x.GetMethod.IsPublic &&
+ x.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
+
if (retval == null)
return null;
Modified: trunk/AgateLib/IO/IPath.cs
===================================================================
--- trunk/AgateLib/IO/IPath.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/IO/IPath.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -29,8 +29,6 @@
string GetFileNameWithoutExtension(string filename);
- string GetDirectoryName(string filename);
-
string GetFileName(string p);
string GetExtension(string filename);
Modified: trunk/AgateLib/IO/IReadFileProvider.cs
===================================================================
--- trunk/AgateLib/IO/IReadFileProvider.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/IO/IReadFileProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -20,6 +20,7 @@
using System.Collections.Generic;
using System.IO;
using System.Text;
+using System.Threading.Tasks;
namespace AgateLib
{
@@ -34,7 +35,7 @@
/// </summary>
/// <param name="filename">The path and filename of the file to read from.</param>
/// <returns></returns>
- Stream OpenRead(string filename);
+ Task<Stream> OpenRead(string filename);
/// <summary>
/// Checks to if the specified file exists in the file provider.
/// </summary>
Modified: trunk/AgateLib/IO/SubDirectoryProvider.cs
===================================================================
--- trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -20,6 +20,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Threading.Tasks;
namespace AgateLib.IO
{
@@ -42,9 +43,9 @@
{
return parent.ToString() + subdir;
}
- public System.IO.Stream OpenRead(string filename)
+ public async Task<System.IO.Stream> OpenRead(string filename)
{
- return parent.OpenRead(subdir + filename);
+ return await parent.OpenRead(subdir + filename);
}
public bool FileExists(string filename)
Modified: trunk/AgateLib/Resources/DC/AgateResourceCollection.cs
===================================================================
--- trunk/AgateLib/Resources/DC/AgateResourceCollection.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Resources/DC/AgateResourceCollection.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -26,6 +26,7 @@
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
+using System.Threading.Tasks;
namespace AgateLib.Resources.DC
{
@@ -39,16 +40,21 @@
FileProvider = AgateLib.IO.FileProvider.ResourceAssets;
}
- public AgateResourceCollection(string filename, IReadFileProvider fileProvider = null)
- : this()
+ public async Task<AgateResourceCollection> FromFile(string filename, IReadFileProvider fileProvider = null)
{
+ var retval = new AgateResourceCollection();
+
if (fileProvider == null)
fileProvider = AgateLib.IO.FileProvider.ResourceAssets;
- using (var stream = fileProvider.OpenRead(filename))
+ retval.FileProvider = FileProvider;
+
+ using (var stream = await retval.FileProvider.OpenRead(filename))
{
- LoadFrom(stream);
+ retval.LoadFrom(stream);
}
+
+ return retval;
}
public AgateResourceCollection(Stream stream)
{
Modified: trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs
===================================================================
--- trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -27,6 +27,7 @@
using AgateLib.DisplayLib.ImplementationBase;
using AgateLib.Utility;
using AgateLib.IO;
+using System.Threading.Tasks;
namespace AgateLib.Resources.Legacy
{
@@ -129,14 +130,14 @@
mSurfaceAccessor = new SurfaceResourceList(this);
//mGuiThemeAccessor = new GuiThemeResourceList(this);
- RootDirectory = FileSystem.Path.GetDirectoryName(filename);
+ RootDirectory = System.IO.Path.GetDirectoryName(filename);
- Load(filename);
+ Task.WaitAll(Load(filename));
}
- private void Load(string filename)
+ private async Task Load(string filename)
{
- using (Stream s = FileProvider.OpenRead(filename))
+ using (Stream s = await FileProvider.OpenRead(filename))
{
AgateResourceLoader.LoadResources(this, s);
}
Modified: trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -135,7 +135,7 @@
/// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param>
public void WriteEnum<T>(string name, T value, bool asAttribute = false) where T : struct
{
- if (typeof(T).IsEnum == false)
+ if (typeof(T).GetTypeInfo().IsEnum == false)
throw new XleSerializationException("Type passed is not an enum.");
WriteImpl(name, value.ToString(), asAttribute);
@@ -219,7 +219,7 @@
/// <param name="name"></param>
/// <param name="value"></param>
/// <param name="asAttribute"></param>
- public void Write<T>(string name, T? value, bool asAttribute = false) where T : struct, IConvertible
+ public void Write<T>(string name, T? value, bool asAttribute = false) where T : struct
{
if (asAttribute)
{
@@ -475,7 +475,6 @@
/// <param name="value">The dictionary to write.</param>
[CLSCompliant(false)]
public void Write<Tkey, Tvalue>(string name, Dictionary<Tkey, Tvalue> value)
- where Tkey : IConvertible
where Tvalue : IXleSerializable
{
Type keyType = typeof(Tkey);
@@ -527,7 +526,6 @@
/// <param name="value">The dictionary to write.</param>
[CLSCompliant(false)]
public void Write<Tkey>(string name, Dictionary<Tkey, int> value)
- where Tkey : IConvertible
{
Type keyType = typeof(Tkey);
@@ -562,9 +560,8 @@
/// <param name="value">The dictionary to write.</param>
[CLSCompliant(false)]
public void Write<Tkey>(string name, Dictionary<Tkey, string> value)
- where Tkey : IConvertible
{
- Type[] args = value.GetType().GetGenericArguments();
+ Type[] args = value.GetType().GetTypeInfo().GenericTypeArguments;
Type keyType = args[0];
XElement element = CreateElement(name);
@@ -994,7 +991,7 @@
/// <param name="name">The name of the XML element used.</param>
public T ReadEnum<T>(string name) where T : struct
{
- if (typeof(T).IsEnum == false)
+ if (typeof(T).GetTypeInfo().IsEnum == false)
throw new XleSerializationException("Type passed is not an enum.");
return (T)Enum.Parse(typeof(T), ReadStringImpl(name, false, string.Empty), true);
@@ -1007,7 +1004,7 @@
/// <param name="defaultValue">Value returned if the key is not present in the XML data.</param>
public T ReadEnum<T>(string name, T defaultValue) where T : struct
{
- if (typeof(T).IsEnum == false)
+ if (typeof(T).GetTypeInfo().IsEnum == false)
throw new XleSerializationException("Type passed is not an enum.");
return (T)Enum.Parse(typeof(T), ReadStringImpl(name, true, defaultValue.ToString()), true);
@@ -1207,7 +1204,7 @@
/// <returns></returns>
public T[] ReadArray<T>(string name)
{
- if (typeof(T).IsPrimitive)
+ if (typeof(T).GetTypeInfo().IsPrimitive)
{
switch (GetEncoding(name))
{
@@ -1330,7 +1327,6 @@
/// <returns></returns>
[CLSCompliant(false)]
public Dictionary<TKey, TValue> ReadDictionary<TKey, TValue>(string name)
- where TKey : IConvertible
where TValue : IXleSerializable
{
XElement element = CurrentNode.Element(name);
@@ -1380,7 +1376,6 @@
[CLSCompliant(false)]
[Obsolete("Use ReadDictionaryString instead.")]
public Dictionary<Tkey, string> ReadDictionary<Tkey>(string name)
- where Tkey : IConvertible
{
return ReadDictionaryString<Tkey>(name);
}
@@ -1394,7 +1389,6 @@
/// <returns></returns>
[CLSCompliant(false)]
public Dictionary<Tkey, string> ReadDictionaryString<Tkey>(string name)
- where Tkey : IConvertible
{
XElement element = CurrentNode.Element(name);
@@ -1606,7 +1600,7 @@
}
}
- if (typeof(IXleSerializable).IsAssignableFrom(type))
+ if (typeof(IXleSerializable).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo()))
{
IXleSerializable obj;
@@ -1638,7 +1632,7 @@
{
Type type = item.GetType();
- foreach (var prop in type.GetProperties())
+ foreach (var prop in type.GetTypeInfo().DeclaredProperties)
{
prop_WriteValue(prop.Name, prop.GetValue(item, null));
}
@@ -1648,7 +1642,7 @@
{
Type type = item.GetType();
- foreach (var prop in type.GetProperties())
+ foreach (var prop in type.GetTypeInfo().DeclaredProperties)
{
if (ContainsKey(prop.Name) == false && allowDefaults == true)
continue;
Modified: trunk/AgateLib/Serialization/Xle/XleSerializer.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -66,8 +66,8 @@
var typeBinder = new TypeBinder();
- typeBinder.AddAssembly(objectType.Assembly);
- typeBinder.AddAssembly(Assembly.GetExecutingAssembly());
+ typeBinder.AddAssembly(objectType.GetTypeInfo().Assembly);
+ typeBinder.AddAssembly(typeof(XleSerializer).GetTypeInfo().Assembly);
if (Core.Factory != null)
{
@@ -87,7 +87,7 @@
/// <param name="objectGraph">The object to serialize.</param>
public void Serialize(Stream outStream, IXleSerializable objectGraph)
{
- if (objectType.IsAssignableFrom(objectGraph.GetType()) == false)
+ if (objectType.GetTypeInfo().IsAssignableFrom(objectGraph.GetType().GetTypeInfo()) == false)
throw new ArgumentException("Object is not of type " + objectType.Name);
XleSerializationInfo info = new XleSerializationInfo(Binder, TypeSerializers);
@@ -104,7 +104,7 @@
/// <param name="objectGraph">The object to serialize.</param>
public void Serialize(Stream outStream, object objectGraph)
{
- if (objectType.IsAssignableFrom(objectGraph.GetType()) == false)
+ if (objectType.GetTypeInfo().IsAssignableFrom(objectGraph.GetType().GetTypeInfo()) == false)
throw new ArgumentException("Object is not of type " + objectType.Name);
XleSerializationInfo info = new XleSerializationInfo(Binder, TypeSerializers);
Modified: trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -20,6 +20,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -85,7 +86,7 @@
foreach (var supertype in mInherited.Keys)
{
- if (supertype.IsAssignableFrom(type))
+ if (supertype.GetTypeInfo().IsAssignableFrom(type.GetTypeInfo()))
return mInherited[supertype];
}
Modified: trunk/AgateLib/UserInterface/Css/Binders/Binding.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Binders/Binding.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/UserInterface/Css/Binders/Binding.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -43,7 +43,7 @@
var property = FinalProperty;
- if (typeof(ICssPropertyFromText).IsAssignableFrom(property.PropertyType))
+ if (property.PropertyType.GetTypeInfo().ImplementedInterfaces.Contains(typeof(ICssPropertyFromText)))
{
convertedValue = value;
}
@@ -66,7 +66,7 @@
var property = chain[chain.Count - 1];
- if (typeof(ICssPropertyFromText).IsAssignableFrom(property.PropertyType))
+ if (property.PropertyType.GetTypeInfo().ImplementedInterfaces.Contains(typeof(ICssPropertyFromText)))
{
var rfs = (ICssPropertyFromText)property.GetValue(obj, null);
rfs.SetValueFromText(value);
Modified: trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -21,6 +21,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -36,7 +37,7 @@
return ParseColor(value);
if (targetType == typeof(CssDistance))
return CssDistance.FromString(value);
- if (targetType.IsEnum)
+ if (targetType.GetTypeInfo().IsEnum)
return Enum.Parse(targetType, value.Replace("-", "_"), true);
throw new NotImplementedException();
Modified: trunk/AgateLib/UserInterface/Css/Binders/ReflectionPropertyBinder.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Binders/ReflectionPropertyBinder.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/UserInterface/Css/Binders/ReflectionPropertyBinder.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -30,14 +30,14 @@
public class ReflectionPropertyBinder
{
Type theType;
- PropertyInfo[] properties;
+ IEnumerable<PropertyInfo> properties;
private CssBindingMapper mMap;
public ReflectionPropertyBinder(Type type, CssBindingMapper map)
{
mMap = map;
theType = type;
- properties = theType.GetProperties();
+ properties = theType.GetTypeInfo().DeclaredProperties;
}
public PropertyChain GetCssPropertyChain(Type type, string name)
Modified: trunk/AgateLib/UserInterface/Css/Parser/Lexer/Tokenizer.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Parser/Lexer/Tokenizer.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/UserInterface/Css/Parser/Lexer/Tokenizer.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@@ -34,7 +35,7 @@
public Tokenizer()
{
- if (typeof(T).IsEnum)
+ if (typeof(T).GetTypeInfo().IsEnum)
tokenTypeConverter = new EnumParser<T>();
}
public Tokenizer(ITokenTypeConverter<T> converter)
Modified: trunk/AgateLib/UserInterface/Css/ReflectionExtensions.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/ReflectionExtensions.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib/UserInterface/Css/ReflectionExtensions.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -37,9 +37,9 @@
/// <param name="member"></param>
/// <param name="inherit"></param>
/// <returns></returns>
- public static T GetCustomAttribute<T>(this MemberInfo member, bool inherit)
+ public static T GetCustomAttribute<T>(this MemberInfo member, bool inherit) where T:class
{
- return (T)member.GetCustomAttributes(typeof(T), inherit).FirstOrDefault();
+ return member.GetCustomAttributes(typeof(T), inherit).FirstOrDefault() as T;
}
}
}
Modified: trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -22,6 +22,7 @@
using System.Linq;
using System.Text;
using AgateLib.Serialization.Xle;
+using System.Threading.Tasks;
namespace AgateLib.Data
{
@@ -56,7 +57,7 @@
/// <returns></returns>
public static AgateDatabase FromFile(string filename)
{
- AgateDatabase db = ReadDatabase(new AgateLib.Platform.WinForms.IO.ZipFileProvider(filename));
+ AgateDatabase db = ReadDatabase(new AgateLib.Platform.WinForms.IO.ZipFileProvider(filename)).Result;
db.mTables.OwnFileProvider = true;
return db;
@@ -68,7 +69,7 @@
/// <returns></returns>
public static AgateDatabase FromProvider(IReadFileProvider provider)
{
- return ReadDatabase(provider);
+ return ReadDatabase(provider).Result;
}
/// <summary>
@@ -79,11 +80,11 @@
((IDisposable)mTables).Dispose();
}
- private static AgateDatabase ReadDatabase(IReadFileProvider provider)
+ private static async Task<AgateDatabase> ReadDatabase(IReadFileProvider provider)
{
XleSerializer ser = new XleSerializer(typeof(AgateDatabase));
- using (Stream x = provider.OpenRead("catalog.txt"))
+ using (Stream x = await provider.OpenRead("catalog.txt"))
{
AgateDatabase retval = (AgateDatabase)ser.Deserialize(x);
Modified: trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -109,7 +109,7 @@
{
string filename = string.Format("data/{0}.txt", name);
- using (Stream r = FileProvider.OpenRead(filename))
+ using (Stream r = FileProvider.OpenRead(filename).Result)
{
AgateTable tbl = AgateTable.FromStream(r);
Modified: trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -20,6 +20,7 @@
using System.Collections.Generic;
using System.Text;
using System.IO;
+using System.Threading.Tasks;
namespace AgateLib.Platform.WinForms.IO
{
@@ -55,7 +56,7 @@
/// </summary>
/// <param name="filename">The filename to search for.</param>
/// <returns></returns>
- public Stream OpenRead(string filename)
+ public async Task<Stream> OpenRead(string filename)
{
if (string.IsNullOrEmpty(filename))
throw new ArgumentNullException("You must supply a file name.");
@@ -64,7 +65,7 @@
{
if (mProviders[i].FileExists(filename))
{
- return mProviders[i].OpenRead(filename);
+ return await mProviders[i].OpenRead(filename);
}
}
@@ -304,7 +305,7 @@
/// <returns></returns>
public string ReadAllText(string filename)
{
- Stream s = OpenRead(filename);
+ Stream s = OpenRead(filename).Result;
return new StreamReader(s).ReadToEnd();
}
Modified: trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -21,6 +21,7 @@
using System.IO;
using System.Text;
using AgateLib.IO;
+using System.Threading.Tasks;
namespace AgateLib.Platform.WinForms.IO
{
@@ -46,14 +47,14 @@
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
- public Stream OpenRead(string filename)
+ public async Task<Stream> OpenRead(string filename)
{
string resolvedName = FindFileName(filename);
if (resolvedName == null)
throw new FileNotFoundException(string.Format("The file {0} was not found in the path {1}.",
filename, mPath));
- return File.OpenRead(FindFileName(filename));
+ return await Task.Run(() => File.OpenRead(FindFileName(filename)));
}
/// <summary>
/// Returns true if the specified file exists.
@@ -82,7 +83,7 @@
var result = FindFileName(filename);
if (result == null)
- throw new FileNotFoundException(filename);
+ throw new FileNotFoundException(filename);
return result;
}
@@ -253,7 +254,7 @@
/// <returns></returns>
public string ReadAllText(string filename)
{
- Stream s = OpenRead(filename);
+ Stream s = OpenRead(filename).Result;
return new StreamReader(s).ReadToEnd();
}
Modified: trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -23,6 +23,7 @@
using System.IO.Compression;
using System.Text;
using System.Text.RegularExpressions;
+using System.Threading.Tasks;
namespace AgateLib.Platform.WinForms.IO
{
@@ -201,7 +202,7 @@
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
- public Stream OpenRead(string filename)
+ public async Task<Stream> OpenRead(string filename)
{
for (int i = 0; i < mFiles.Count; i++)
{
@@ -277,7 +278,7 @@
/// <returns></returns>
public string ReadAllText(string filename)
{
- Stream s = OpenRead(filename);
+ Stream s = OpenRead(filename).Result;
return new StreamReader(s).ReadToEnd();
}
Modified: trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -22,6 +22,7 @@
using System.IO.Compression;
using System.Linq;
using System.Text;
+using System.Threading.Tasks;
namespace AgateLib.Platform.WinForms.IO
{
@@ -270,7 +271,7 @@
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
- public Stream OpenRead(string filename)
+ public async Task<Stream> OpenRead(string filename)
{
FileHeader header = GetFile(filename);
@@ -344,7 +345,7 @@
/// <returns></returns>
public string ReadAllText(string filename)
{
- Stream s = OpenRead(filename);
+ Stream s = OpenRead(filename).Result;
return new StreamReader(s).ReadToEnd();
}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs 2014-08-31 18:26:40 UTC (rev 1496)
@@ -1,9 +1,12 @@
-using System;
+using AgateLib.Platform.WindowsStore.DisplayImplementation;
+using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel;
+using Windows.Storage;
namespace AgateLib.Platform.WindowsStore.PlatformImplementation
{
@@ -18,9 +21,16 @@
this.path = path;
}
- public System.IO.Stream OpenRead(string filename)
+ public async Task<System.IO.Stream> OpenRead(string filename)
{
- throw new NotImplementedException();
+ Uri uri = new Uri(path + filename);
+
+ StorageFile storageFile =
+ await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(uri);
+
+ var randomAccessStream = await storageFile.OpenReadAsync();
+
+ return randomAccessStream.AsStreamForRead();
}
public bool FileExists(string filename)
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 16:00:15 UTC (rev 1495)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 18:26:40 UTC (rev 1496)
@@ -51,6 +51,7 @@
<Compile Include="DisplayTests\BasicSprite.cs" />
<Compile Include="DisplayTests\ClipRect.cs" />
<Compile Include="DisplayTests\ColorTest.cs" />
+ <Compile Include="DisplayTests\CoordinateSystem.cs" />
<Compile Include="DisplayTests\Interpolation.cs" />
<Compile Include="DisplayTests\ParticleTests.cs" />
<Compile Include="DisplayTests\RotatingSpriteTester.cs" />
@@ -64,6 +65,7 @@
<Compile Include="Fakes\FakePlatformInfo.cs" />
<Compile Include="Fakes\FakeRenderTarget.cs" />
<Compile Include="FontTests\Builtin.cs" />
+ <Compile Include="FontTests\FontAlignment.cs" />
<Compile Include="FontTests\TextLayout.cs" />
<Compile Include="IAgateTest.cs" />
<Compile Include="IDiscreteAgateTest.cs" />
@@ -80,9 +82,31 @@
<Content Include="Assets\boxsprite.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="Assets\fonts\MedievalSharp14.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\fonts\MedievalSharp18.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\fonts\MedievalSharpBold14.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\fonts\MedievalSharpBold18.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\fonts\MedievalSharpBold22.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\fonts\sample_font.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="Assets\spike.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="Assets\TestResourceFile.xml">
+ <SubType>Designer</SubType>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="Assets\tile1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Copied: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/TestResourceFile.xml (from rev 1493, trunk/AgateLib.Tests/Tests.WinForms/Assets/TestResourceFile.xml)
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/TestResourceFile.xml (rev 0)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/TestResourceFile.xml 2014-08-31 18:26:40 UTC (rev 1496)
@@ -0,0 +1,1093 @@
+<AgateResources Version="0.3.1">
+ <StringTable>
+ <string name="Hello">Hello.</string>
+ <string name="How are you">How are you?</string>
+ <string name="I want some beer">I want some beer.</string>
+ </StringTable>
+ <DisplayWindow name="main_window" preferred_size="{Width=400,Height=200}" minimum_size="{Width=0,Height=0}" maximum_size="{Width=0,Height=0}" allow_resize="True" full_screen="False" bpp="32">Main Window</DisplayWindow>
+ <Surface name="sample_surf" filename="jellybean.png" />
+ <Sprite name="sample_sprite" image="attacke.png" timePerFrame="60" size="{Width=96,Height=96}">
+ <Frame rect="{X=0,Y=0,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=96,Y=0,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=192,Y=0,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=288,Y=0,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=384,Y=0,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=480,Y=0,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=0,Y=96,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=96,Y=96,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=192,Y=96,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=288,Y=96,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=384,Y=96,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=480,Y=96,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ <Frame rect="{X=0,Y=192,Width=96,Height=96}" offset="{X=0,Y=0}" />
+ </Sprite>
+ <BitmapFont name="sample_font" image="fonts/sample_font.png">
+ <Metrics>
+ <Glyph char="32" source="{X=1,Y=2,Width=6,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="33" source="{X=9,Y=2,Width=6,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="34" source="{X=17,Y=2,Width=9,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="35" source="{X=28,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="36" source="{X=40,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="37" source="{X=52,Y=2,Width=14,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="38" source="{X=68,Y=2,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="39" source="{X=83,Y=2,Width=6,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="40" source="{X=91,Y=2,Width=8,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="41" source="{X=101,Y=2,Width=8,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="42" source="{X=111,Y=2,Width=9,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="43" source="{X=122,Y=2,Width=9,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="44" source="{X=133,Y=2,Width=6,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="45" source="{X=141,Y=2,Width=8,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="46" source="{X=151,Y=2,Width=6,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="47" source="{X=159,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="48" source="{X=171,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="49" source="{X=183,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="50" source="{X=195,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="51" source="{X=207,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="52" source="{X=219,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="53" source="{X=231,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="54" source="{X=243,Y=2,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="55" source="{X=1,Y=29,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="56" source="{X=13,Y=29,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="57" source="{X=26,Y=29,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="58" source="{X=38,Y=29,Width=7,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="59" source="{X=47,Y=29,Width=6,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="60" source="{X=55,Y=29,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="61" source="{X=67,Y=29,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="62" source="{X=79,Y=29,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="63" source="{X=91,Y=29,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="64" source="{X=103,Y=29,Width=17,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="65" source="{X=122,Y=29,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="66" source="{X=137,Y=29,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="67" source="{X=150,Y=29,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="68" source="{X=163,Y=29,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="69" source="{X=178,Y=29,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="70" source="{X=191,Y=29,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="71" source="{X=203,Y=29,Width=12,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="72" source="{X=217,Y=29,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="73" source="{X=232,Y=29,Width=7,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="74" source="{X=241,Y=29,Width=7,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="75" source="{X=1,Y=56,Width=12,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="76" source="{X=15,Y=56,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="77" source="{X=28,Y=56,Width=16,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="78" source="{X=46,Y=56,Width=14,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="79" source="{X=62,Y=56,Width=12,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="80" source="{X=76,Y=56,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="81" source="{X=89,Y=56,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="82" source="{X=104,Y=56,Width=12,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="83" source="{X=118,Y=56,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="84" source="{X=130,Y=56,Width=12,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="85" source="{X=144,Y=56,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="86" source="{X=159,Y=56,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="87" source="{X=174,Y=56,Width=17,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="88" source="{X=193,Y=56,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="89" source="{X=208,Y=56,Width=13,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="90" source="{X=223,Y=56,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="91" source="{X=236,Y=56,Width=7,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="92" source="{X=245,Y=56,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="93" source="{X=1,Y=83,Width=7,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="94" source="{X=10,Y=83,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="95" source="{X=23,Y=83,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="96" source="{X=35,Y=83,Width=8,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="97" source="{X=45,Y=83,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="98" source="{X=58,Y=83,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="99" source="{X=71,Y=83,Width=9,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="100" source="{X=82,Y=83,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="101" source="{X=95,Y=83,Width=9,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="102" source="{X=106,Y=83,Width=7,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="103" source="{X=115,Y=83,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="104" source="{X=127,Y=83,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="105" source="{X=140,Y=83,Width=7,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="106" source="{X=149,Y=83,Width=7,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="107" source="{X=158,Y=83,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="108" source="{X=170,Y=83,Width=6,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="109" source="{X=178,Y=83,Width=15,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="110" source="{X=195,Y=83,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="111" source="{X=208,Y=83,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="112" source="{X=220,Y=83,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="113" source="{X=233,Y=83,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="114" source="{X=246,Y=83,Width=9,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="115" source="{X=1,Y=110,Width=9,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="116" source="{X=12,Y=110,Width=8,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="117" source="{X=22,Y=110,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="118" source="{X=35,Y=110,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="119" source="{X=47,Y=110,Width=14,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="120" source="{X=63,Y=110,Width=10,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="121" source="{X=75,Y=110,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="122" source="{X=88,Y=110,Width=9,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="123" source="{X=99,Y=110,Width=8,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="124" source="{X=109,Y=110,Width=6,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="125" source="{X=117,Y=110,Width=8,Height=24}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="126" source="{X=127,Y=110,Width=11,Height=24}" leftOverhang="1" rightOverhang="1" />
+ </Metrics>
+ </BitmapFont>
+ <BitmapFont name="MedievalSharp18" image="fonts/MedievalSharp18.png">
+ <Metrics>
+ <Glyph char="32" source="{X=0,Y=2,Width=8,Height=34}" rightOverhang="1" />
+ <Glyph char="33" source="{X=10,Y=2,Width=8,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="34" source="{X=20,Y=2,Width=11,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="35" source="{X=33,Y=2,Width=18,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="36" source="{X=53,Y=2,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="37" source="{X=70,Y=2,Width=19,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="38" source="{X=91,Y=2,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="39" source="{X=110,Y=2,Width=7,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="40" source="{X=119,Y=2,Width=11,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="41" source="{X=132,Y=2,Width=11,Height=34}" rightOverhang="1" />
+ <Glyph char="42" source="{X=145,Y=2,Width=16,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="43" source="{X=163,Y=2,Width=16,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="44" source="{X=181,Y=2,Width=8,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="45" source="{X=191,Y=2,Width=16,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="46" source="{X=209,Y=2,Width=7,Height=34}" rightOverhang="1" />
+ <Glyph char="47" source="{X=218,Y=2,Width=14,Height=34}" rightOverhang="1" />
+ <Glyph char="48" source="{X=234,Y=2,Width=17,Height=34}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="49" source="{X=0,Y=39,Width=10,Height=34}" leftOverhang="-2" rightOverhang="-2" />
+ <Glyph char="50" source="{X=12,Y=39,Width=15,Height=34}" rightOverhang="1" />
+ <Glyph char="51" source="{X=29,Y=39,Width=15,Height=34}" rightOverhang="1" />
+ <Glyph char="52" source="{X=46,Y=39,Width=16,Height=34}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="53" source="{X=64,Y=39,Width=15,Height=34}" rightOverhang="1" />
+ <Glyph char="54" source="{X=81,Y=39,Width=16,Height=34}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="55" source="{X=99,Y=39,Width=13,Height=34}" rightOverhang="-1" />
+ <Glyph char="56" source="{X=114,Y=39,Width=15,Height=34}" rightOverhang="1" />
+ <Glyph char="57" source="{X=131,Y=39,Width=16,Height=34}" leftOverhang="1" rightOverhang="1" />
+ <Glyph char="58" source="{X=149,Y=39,Width=7,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="59" source="{X=158,Y=39,Width=8,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="60" source="{X=168,Y=39,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="61" source="{X=187,Y=39,Width=16,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="62" source="{X=205,Y=39,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="63" source="{X=224,Y=39,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="64" source="{X=241,Y=39,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="65" source="{X=0,Y=76,Width=16,Height=34}" rightOverhang="1" />
+ <Glyph char="66" source="{X=18,Y=76,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="67" source="{X=37,Y=76,Width=16,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="68" source="{X=55,Y=76,Width=18,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="69" source="{X=75,Y=76,Width=14,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="70" source="{X=91,Y=76,Width=13,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="71" source="{X=106,Y=76,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="72" source="{X=125,Y=76,Width=17,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="73" source="{X=144,Y=76,Width=8,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="74" source="{X=154,Y=76,Width=15,Height=34}" rightOverhang="1" />
+ <Glyph char="75" source="{X=171,Y=76,Width=16,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="76" source="{X=189,Y=76,Width=15,Height=34}" leftOverhang="-2" rightOverhang="5" />
+ <Glyph char="77" source="{X=206,Y=76,Width=21,Height=34}" rightOverhang="1" />
+ <Glyph char="78" source="{X=229,Y=76,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="79" source="{X=0,Y=113,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="80" source="{X=19,Y=113,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="81" source="{X=38,Y=113,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="82" source="{X=57,Y=113,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="83" source="{X=76,Y=113,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="84" source="{X=93,Y=113,Width=14,Height=34}" rightOverhang="1" />
+ <Glyph char="85" source="{X=109,Y=113,Width=18,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="86" source="{X=129,Y=113,Width=16,Height=34}" rightOverhang="1" />
+ <Glyph char="87" source="{X=147,Y=113,Width=22,Height=34}" rightOverhang="1" />
+ <Glyph char="88" source="{X=171,Y=113,Width=15,Height=34}" rightOverhang="1" />
+ <Glyph char="89" source="{X=188,Y=113,Width=15,Height=34}" rightOverhang="1" />
+ <Glyph char="90" source="{X=205,Y=113,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="91" source="{X=222,Y=113,Width=11,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="92" source="{X=235,Y=113,Width=14,Height=34}" rightOverhang="1" />
+ <Glyph char="93" source="{X=0,Y=150,Width=11,Height=34}" rightOverhang="1" />
+ <Glyph char="94" source="{X=13,Y=150,Width=17,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="95" source="{X=32,Y=150,Width=16,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="96" source="{X=50,Y=150,Width=9,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="97" source="{X=61,Y=150,Width=14,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="98" source="{X=77,Y=150,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="99" source="{X=94,Y=150,Width=13,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="100" source="{X=109,Y=150,Width=14,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="101" source="{X=125,Y=150,Width=13,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="102" source="{X=140,Y=150,Width=13,Height=34}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="103" source="{X=155,Y=150,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="104" source="{X=172,Y=150,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="105" source="{X=189,Y=150,Width=7,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="106" source="{X=198,Y=150,Width=9,Height=34}" leftOverhang="1" rightOverhang="2" />
+ <Glyph char="107" source="{X=209,Y=150,Width=15,Height=34}" leftOverhang="-1" rightOverhang="4" />
+ <Glyph char="108" source="{X=226,Y=150,Width=7,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="109" source="{X=0,Y=187,Width=22,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="110" source="{X=24,Y=187,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="111" source="{X=41,Y=187,Width=14,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="112" source="{X=57,Y=187,Width=14,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="113" source="{X=73,Y=187,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="114" source="{X=90,Y=187,Width=13,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="115" source="{X=105,Y=187,Width=12,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="116" source="{X=119,Y=187,Width=10,Height=34}" rightOverhang="1" />
+ <Glyph char="117" source="{X=131,Y=187,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="118" source="{X=148,Y=187,Width=13,Height=34}" rightOverhang="1" />
+ <Glyph char="119" source="{X=163,Y=187,Width=22,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="120" source="{X=187,Y=187,Width=14,Height=34}" rightOverhang="3" />
+ <Glyph char="121" source="{X=203,Y=187,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="122" source="{X=220,Y=187,Width=12,Height=34}" rightOverhang="1" />
+ <Glyph char="123" source="{X=234,Y=187,Width=13,Height=34}" rightOverhang="1" />
+ <Glyph char="124" source="{X=0,Y=224,Width=8,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="125" source="{X=10,Y=224,Width=13,Height=34}" rightOverhang="1" />
+ <Glyph char="126" source="{X=25,Y=224,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="161" source="{X=42,Y=224,Width=8,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="162" source="{X=52,Y=224,Width=13,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="163" source="{X=67,Y=224,Width=15,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="164" source="{X=84,Y=224,Width=19,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="165" source="{X=105,Y=224,Width=16,Height=34}" rightOverhang="1" />
+ <Glyph char="166" source="{X=123,Y=224,Width=9,Height=34}" leftOverhang="-2" rightOverhang="3" />
+ <Glyph char="167" source="{X=134,Y=224,Width=14,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="168" source="{X=150,Y=224,Width=11,Height=34}" leftOverhang="-1" rightOverhang="2" />
+ <Glyph char="169" source="{X=163,Y=224,Width=17,Height=34}" leftOverhang="...
[truncated message content] |
|
From: <ka...@us...> - 2014-08-31 16:00:23
|
Revision: 1495
http://sourceforge.net/p/agate/code/1495
Author: kanato
Date: 2014-08-31 16:00:15 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Added build tasks to several projects.
Modified Paths:
--------------
trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj
trunk/AgateLib.Platform.WindowsMetro/packages.config
trunk/AgateLib.Platform.WindowsPhone/packages.config
trunk/AgateLib.Platform.WindowsStoreCommon/packages.config
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj
trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj
Added Paths:
-----------
trunk/AgateLib.Platform.Common/packages.config
trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config
trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config
trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config
Modified: trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj
===================================================================
--- trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-31 15:43:53 UTC (rev 1494)
+++ trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-31 16:00:15 UTC (rev 1495)
@@ -15,6 +15,8 @@
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -46,7 +48,17 @@
<Compile Include="PlatformImplementation\DiagnosticsStopwatch.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
+ </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Added: trunk/AgateLib.Platform.Common/packages.config
===================================================================
--- trunk/AgateLib.Platform.Common/packages.config (rev 0)
+++ trunk/AgateLib.Platform.Common/packages.config 2014-08-31 16:00:15 UTC (rev 1495)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="portable-net45+win+wpa81+wp80" />
+</packages>
\ No newline at end of file
Modified: trunk/AgateLib.Platform.WindowsMetro/packages.config
===================================================================
--- trunk/AgateLib.Platform.WindowsMetro/packages.config 2014-08-31 15:43:53 UTC (rev 1494)
+++ trunk/AgateLib.Platform.WindowsMetro/packages.config 2014-08-31 16:00:15 UTC (rev 1495)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="win81" />
<package id="SharpDX" version="2.6.2" targetFramework="win81" />
<package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="win81" />
<package id="SharpDX.DXGI" version="2.6.2" targetFramework="win81" />
Modified: trunk/AgateLib.Platform.WindowsPhone/packages.config
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-08-31 15:43:53 UTC (rev 1494)
+++ trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-08-31 16:00:15 UTC (rev 1495)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="wpa81" />
<package id="SharpDX" version="2.6.2" targetFramework="wpa81" />
<package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="wpa81" />
<package id="SharpDX.DXGI" version="2.6.2" targetFramework="wpa81" />
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/packages.config
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/packages.config 2014-08-31 15:43:53 UTC (rev 1494)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/packages.config 2014-08-31 16:00:15 UTC (rev 1495)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="portable-win81+wpa81" />
<package id="SharpDX" version="2.6.2" targetFramework="portable-win81+wpa81" />
<package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="portable-win81+wpa81" />
<package id="SharpDX.DXGI" version="2.6.2" targetFramework="portable-win81+wpa81" />
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 15:43:53 UTC (rev 1494)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 16:00:15 UTC (rev 1495)
@@ -15,6 +15,8 @@
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -71,8 +73,10 @@
<Compile Include="TestInfo.cs" />
<Compile Include="TestCollection.cs" />
</ItemGroup>
- <ItemGroup />
<ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
<Content Include="Assets\boxsprite.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -90,6 +94,13 @@
</Content>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
+ </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Added: trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config (rev 0)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config 2014-08-31 16:00:15 UTC (rev 1495)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="portable-net45+win+wpa81+wp80" />
+</packages>
\ No newline at end of file
Modified: trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj 2014-08-31 15:43:53 UTC (rev 1494)
+++ trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj 2014-08-31 16:00:15 UTC (rev 1495)
@@ -15,6 +15,8 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>Tests.WindowsMetro_TemporaryKey.pfx</PackageCertificateKeyFile>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -140,6 +142,7 @@
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
+ <None Include="packages.config" />
<None Include="Tests.WindowsMetro_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
@@ -166,6 +169,13 @@
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
+ </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Added: trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config (rev 0)
+++ trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config 2014-08-31 16:00:15 UTC (rev 1495)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="win81" />
+</packages>
\ No newline at end of file
Modified: trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj 2014-08-31 15:43:53 UTC (rev 1494)
+++ trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj 2014-08-31 16:00:15 UTC (rev 1495)
@@ -14,6 +14,8 @@
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -143,6 +145,9 @@
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' ">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
@@ -150,6 +155,13 @@
<TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
+ </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Added: trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config (rev 0)
+++ trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config 2014-08-31 16:00:15 UTC (rev 1495)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="wpa81" />
+</packages>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 15:43:58
|
Revision: 1494
http://sourceforge.net/p/agate/code/1494
Author: kanato
Date: 2014-08-31 15:43:53 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Fix operation of sprites when surface delay loading is supported by adding LoadComplete event on surfaces.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_Surface.cs
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
Added Paths:
-----------
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/spike.png
Removed Paths:
-------------
trunk/AgateLib.Tests/Tests.WinForms/Assets/spike.png
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs 2014-08-31 06:08:27 UTC (rev 1493)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs 2014-08-31 15:43:53 UTC (rev 1494)
@@ -237,6 +237,18 @@
#endregion
+ /// <summary>
+ /// Returns true if loading of the surface data is complete.
+ /// </summary>
public abstract bool IsLoaded { get; }
+ /// <summary>
+ /// Event which is raised when loading is completed. If loading is already complete,
+ /// the delegate gets executed immediately.
+ /// </summary>
+ /// <remarks>Delegates added to this event are executed exactly once, after which
+ /// they are removed. Event handlers may be executed on the thread that is loading
+ /// the surface, or they may be executed on the thread that adds them to the delegate.
+ /// </remarks>
+ public abstract event EventHandler LoadComplete;
};
}
Modified: trunk/AgateLib/DisplayLib/Surface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Surface.cs 2014-08-31 06:08:27 UTC (rev 1493)
+++ trunk/AgateLib/DisplayLib/Surface.cs 2014-08-31 15:43:53 UTC (rev 1494)
@@ -842,6 +842,20 @@
{
get { return Impl.IsLoaded; }
}
+
+ /// <summary>
+ /// Event which is raised when loading is completed. If loading is already complete,
+ /// the delegate gets executed immediately.
+ /// </summary>
+ /// <remarks>Delegates added to this event are executed exactly once, after which
+ /// they are removed. Event handlers may be executed on the thread that is loading
+ /// the surface, or they may be executed on the thread that adds them to the delegate.
+ /// </remarks>
+ public event EventHandler LoadComplete
+ {
+ add { mImpl.LoadComplete += value; }
+ remove { mImpl.LoadComplete -= value; }
+ }
}
/// <summary>
Modified: trunk/AgateLib/Sprites/Sprite.cs
===================================================================
--- trunk/AgateLib/Sprites/Sprite.cs 2014-08-31 06:08:27 UTC (rev 1493)
+++ trunk/AgateLib/Sprites/Sprite.cs 2014-08-31 15:43:53 UTC (rev 1494)
@@ -365,39 +365,36 @@
if (ownSurface)
mOwnedSurfaces.Add(surface);
- while (surface.IsLoaded == false)
+ surface.LoadComplete += (sender, e) =>
{
- throw new NotImplementedException();
- }
+ do
+ {
+ SpriteFrame currentFrame = new SpriteFrame(surface);
+ Rectangle currentRect = new Rectangle(location, size);
+ bool skip = false;
- do
- {
- SpriteFrame currentFrame = new SpriteFrame(surface);
- Rectangle currentRect = new Rectangle(location, size);
- bool skip = false;
+ currentFrame.SourceRect = currentRect;
+ currentFrame.SpriteSize = SpriteSize;
- currentFrame.SourceRect = currentRect;
- currentFrame.SpriteSize = SpriteSize;
+ if (currentFrame.SourceRect.Right > surface.SurfaceWidth) skip = true;
+ if (currentFrame.SourceRect.Bottom > surface.SurfaceHeight) skip = true;
- if (currentFrame.SourceRect.Right > surface.SurfaceWidth) skip = true;
- if (currentFrame.SourceRect.Bottom > surface.SurfaceHeight) skip = true;
+ if (skipBlank && pixels.IsRegionBlank(currentFrame.SourceRect))
+ skip = true;
- if (skipBlank && pixels.IsRegionBlank(currentFrame.SourceRect))
- skip = true;
+ if (skip == false)
+ mFrames.Add(currentFrame);
- if (skip == false)
- mFrames.Add(currentFrame);
+ location.X += size.Width + extraSpace.X;
- location.X += size.Width + extraSpace.X;
+ if (location.X + size.Width > surface.SurfaceWidth)
+ {
+ location.X = 0;
+ location.Y += size.Height + extraSpace.Y;
+ }
- if (location.X + size.Width > surface.SurfaceWidth)
- {
- location.X = 0;
- location.Y += size.Height + extraSpace.Y;
- }
-
- } while (location.Y + size.Height <= surface.SurfaceHeight);
-
+ } while (location.Y + size.Height <= surface.SurfaceHeight);
+ };
}
#endregion
Modified: trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_Surface.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_Surface.cs 2014-08-31 06:08:27 UTC (rev 1493)
+++ trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_Surface.cs 2014-08-31 15:43:53 UTC (rev 1494)
@@ -221,7 +221,7 @@
float displayWidth, float displayHeight, TextureCoordinates texCoord, Gradient color,
OriginAlignment DisplayAlignment, float mRotationCos, float mRotationSin)
{
-
+
// order is
// 1 -- 2
// | |
@@ -345,7 +345,7 @@
Marshal.Copy(memPtr, data, dataIndex, pixelStride * rect.Width);
}
}
-
+
Marshal.FreeHGlobal(memory);
if (format == PixelFormat.RGBA8888)
@@ -390,6 +390,17 @@
// So return true because if the surface is constructed, it's been loaded.
get { return true; }
}
+ public override event EventHandler LoadComplete
+ {
+ add
+ {
+ // since loading is synchronously performed in the constructor, just
+ // execute any delegate that comes in immediately.
+ value(this, EventArgs.Empty);
+ }
+ remove { }
+ }
+
public int GLTextureID { get { return mTextureID; } }
private void Load()
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs 2014-08-31 06:08:27 UTC (rev 1493)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs 2014-08-31 15:43:53 UTC (rev 1494)
@@ -41,7 +41,6 @@
{
public class SDX_Surface : SurfaceImpl
{
- #region --- Private Variables ---
SDX_Display mDisplay;
D3DDevice mDevice { get { return mDisplay.D3D_Device; } }
@@ -62,7 +61,8 @@
PositionTextureColor[] mExtraVerts = new PositionTextureColor[4];
short[] mExtraIndices = new short[] { 0, 1, 2, 2, 1, 3 };
- #endregion
+ EventHandler mLoadCompleteStorage;
+ object mLoadCompletLockObject = new object();
public Texture2D D3dTexture
{
@@ -100,7 +100,8 @@
mDisplay = Display.Impl as SDX_Display;
}
- public SDX_Surface(string fileName) : this()
+ public SDX_Surface(string fileName)
+ : this()
{
mFileName = fileName;
@@ -225,8 +226,8 @@
ExifOrientationMode.IgnoreExifOrientation,
ColorManagementMode.DoNotColorManage);
byte[] pixelData = dataProvider.DetachPixelData();
-
- PixelBuffer pb = new PixelBuffer(PixelFormat.BGRA8888,
+
+ PixelBuffer pb = new PixelBuffer(PixelFormat.BGRA8888,
new Size((int)bitmap.PixelWidth, (int)bitmap.PixelHeight));
pb.SetData(pixelData, PixelFormat.BGRA8888);
@@ -271,9 +272,51 @@
}
InitializeValues();
- mIsLoaded = true;
+
+ OnLoadComplete();
}
+ private void OnLoadComplete()
+ {
+ Delegate[] handlers = null;
+
+ lock (mLoadCompletLockObject)
+ {
+ mIsLoaded = true;
+ if (mLoadCompleteStorage != null)
+ {
+ handlers =mLoadCompleteStorage.GetInvocationList();
+
+ foreach (EventHandler handler in handlers)
+ mLoadCompleteStorage -= handler;
+ }
+ }
+
+ if (handlers != null)
+ {
+ foreach (EventHandler handler in handlers)
+ handler(this, EventArgs.Empty);
+ }
+ }
+
+ public override event EventHandler LoadComplete
+ {
+ add
+ {
+ lock (mLoadCompletLockObject)
+ {
+ if (mIsLoaded)
+ {
+ value(this, EventArgs.Empty);
+ return;
+ }
+
+ mLoadCompleteStorage += value;
+ }
+ }
+ remove { }
+ }
+
#endregion
#region --- Events and event handlers ---
@@ -295,7 +338,7 @@
}
private void Draw(SurfaceState state, SurfaceDrawInstance inst)
{
- if (mTexture == null)
+ if (mTexture == null)
return;
if (SurfaceSize.IsEmpty)
{
@@ -337,7 +380,7 @@
rotationCenter.X, rotationCenter.Y,
state.DisplayAlignment, mRotationCos, mRotationSin);
- mDevice.DrawBuffer.CacheDrawIndexedTriangles(mVerts, mIndices,
+ mDevice.DrawBuffer.CacheDrawIndexedTriangles(mVerts, mIndices,
mTexture.Value, mTextureView, alphaBlend);
}
@@ -346,7 +389,7 @@
if (mTexture == null)
return;
- mTextureSize = new Size( mTexture.Value.Description.Width, mTexture.Value.Description.Height);
+ mTextureSize = new Size(mTexture.Value.Description.Width, mTexture.Value.Description.Height);
mSrcRect = new Rectangle(Point.Empty, mTextureSize);
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 06:08:27 UTC (rev 1493)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 15:43:53 UTC (rev 1494)
@@ -74,8 +74,11 @@
<ItemGroup />
<ItemGroup>
<Content Include="Assets\boxsprite.png">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="Assets\spike.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="Assets\tile1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -83,7 +86,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\wallpaper.png">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
Copied: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/spike.png (from rev 1489, trunk/AgateLib.Tests/Tests.WinForms/Assets/spike.png)
===================================================================
(Binary files differ)
Modified: trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-08-31 06:08:27 UTC (rev 1493)
+++ trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-08-31 15:43:53 UTC (rev 1494)
@@ -452,9 +452,6 @@
<None Include="Assets\smoke2.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
- <None Include="Assets\spike.png">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
<None Include="Assets\TestResourceFile.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
Deleted: trunk/AgateLib.Tests/Tests.WinForms/Assets/spike.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 06:08:32
|
Revision: 1493
http://sourceforge.net/p/agate/code/1493
Author: kanato
Date: 2014-08-31 06:08:27 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Fixes to FontCreator for renamed WinForms namespaces.
Modified Paths:
--------------
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/EditGlyphs.cs
trunk/Tools/FontCreator/FontCreator.cs
trunk/Tools/FontCreator/FontCreator.csproj
trunk/Tools/FontCreator/FontCreatorProgram.cs
trunk/Tools/FontCreator/frmFontCreator.cs
trunk/Tools/FontCreator/frmWarningSplash.cs
Modified: trunk/Tools/FontCreator/CreateFont.Designer.cs
===================================================================
--- trunk/Tools/FontCreator/CreateFont.Designer.cs 2014-08-31 06:06:12 UTC (rev 1492)
+++ trunk/Tools/FontCreator/CreateFont.Designer.cs 2014-08-31 06:08:27 UTC (rev 1493)
@@ -62,8 +62,8 @@
this.label7 = new System.Windows.Forms.Label();
this.chkMonospaceNumbers = new System.Windows.Forms.CheckBox();
this.nudNumberWidthAdjust = new System.Windows.Forms.NumericUpDown();
- this.renderTarget = new AgateLib.Platform.WindowsForms.WinForms.AgateRenderTarget();
- this.zoomRenderTarget = new AgateLib.Platform.WindowsForms.WinForms.AgateRenderTarget();
+ this.renderTarget = new AgateLib.Platform.WinForms.Controls.AgateRenderTarget();
+ this.zoomRenderTarget = new AgateLib.Platform.WinForms.Controls.AgateRenderTarget();
((System.ComponentModel.ISupportInitialize)(this.nudSize)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
@@ -550,7 +550,7 @@
#endregion
- private AgateLib.Platform.WindowsForms.WinForms.AgateRenderTarget renderTarget;
+ private AgateLib.Platform.WinForms.Controls.AgateRenderTarget renderTarget;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cboFamily;
@@ -561,7 +561,7 @@
private System.Windows.Forms.CheckBox chkUnderline;
private System.Windows.Forms.CheckBox chkStrikeout;
private System.Windows.Forms.TextBox txtSampleText;
- private AgateLib.Platform.WindowsForms.WinForms.AgateRenderTarget zoomRenderTarget;
+ private AgateLib.Platform.WinForms.Controls.AgateRenderTarget zoomRenderTarget;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox chkTextRenderer;
Modified: trunk/Tools/FontCreator/EditGlyphs.cs
===================================================================
--- trunk/Tools/FontCreator/EditGlyphs.cs 2014-08-31 06:06:12 UTC (rev 1492)
+++ trunk/Tools/FontCreator/EditGlyphs.cs 2014-08-31 06:08:27 UTC (rev 1493)
@@ -7,7 +7,7 @@
using System.Windows.Forms;
using System.Xml;
using AgateLib.DisplayLib.BitmapFont;
-using AgateLib.Platform.WindowsForms.WinForms;
+using AgateLib.Platform.WinForms;
using AgateLib.Resources;
namespace FontCreator
@@ -70,7 +70,7 @@
if (lstItems.SelectedIndex != -1)
{
GlyphMetrics metric = SelectedMetric;
- Rectangle r = Interop.Convert(metric.SourceRect);
+ Rectangle r = metric.SourceRect.ToDrawing();
Rectangle glyph = r;
@@ -105,7 +105,7 @@
if (lstItems.SelectedItem == null)
return null;
- return Interop.Convert(font[(char)lstItems.SelectedItem].SourceRect);
+ return font[(char)lstItems.SelectedItem].SourceRect.ToDrawing();
}
}
@@ -139,7 +139,7 @@
int width = (int)(pctZoom.Width / scale);
int height = (int)(pctZoom.Height / scale);
- Rectangle r = Interop.Convert(font[(char)lstItems.SelectedItem].SourceRect);
+ Rectangle r = font[(char)lstItems.SelectedItem].SourceRect.ToDrawing();
zoomLeft = (int)(r.X + r.Width / 2 - width / 2);
zoomTop = (int)(r.Y + r.Height / 2 - height / 2);
Modified: trunk/Tools/FontCreator/FontCreator.cs
===================================================================
--- trunk/Tools/FontCreator/FontCreator.cs 2014-08-31 06:06:12 UTC (rev 1492)
+++ trunk/Tools/FontCreator/FontCreator.cs 2014-08-31 06:08:27 UTC (rev 1493)
@@ -9,7 +9,7 @@
using AgateLib.DisplayLib.BitmapFont;
using AgateLib.Geometry;
using AgateLib.Resources.Legacy;
-using AgateLib.Platform.WindowsForms;
+using AgateLib.Platform.WinForms;
namespace FontCreator
{
Modified: trunk/Tools/FontCreator/FontCreator.csproj
===================================================================
--- trunk/Tools/FontCreator/FontCreator.csproj 2014-08-31 06:06:12 UTC (rev 1492)
+++ trunk/Tools/FontCreator/FontCreator.csproj 2014-08-31 06:08:27 UTC (rev 1493)
@@ -126,9 +126,9 @@
</Reference>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj">
+ <ProjectReference Include="..\..\AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj">
<Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
- <Name>AgateLib.Platform.WindowsForms</Name>
+ <Name>AgateLib.Platform.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Name>AgateLib</Name>
Modified: trunk/Tools/FontCreator/FontCreatorProgram.cs
===================================================================
--- trunk/Tools/FontCreator/FontCreatorProgram.cs 2014-08-31 06:06:12 UTC (rev 1492)
+++ trunk/Tools/FontCreator/FontCreatorProgram.cs 2014-08-31 06:08:27 UTC (rev 1493)
@@ -1,5 +1,6 @@
-using AgateLib.Platform.WindowsForms;
-using AgateLib.Platform.WindowsForms.ApplicationModels;
+using AgateLib.ApplicationModels;
+using AgateLib.Platform.WinForms;
+using AgateLib.Platform.WinForms.ApplicationModels;
using System;
using System.Collections.Generic;
using System.IO;
Modified: trunk/Tools/FontCreator/frmFontCreator.cs
===================================================================
--- trunk/Tools/FontCreator/frmFontCreator.cs 2014-08-31 06:06:12 UTC (rev 1492)
+++ trunk/Tools/FontCreator/frmFontCreator.cs 2014-08-31 06:08:27 UTC (rev 1493)
@@ -7,7 +7,8 @@
using System.Text;
using System.Windows.Forms;
using AgateLib.DisplayLib.BitmapFont;
-using AgateLib.Platform.WindowsForms;
+using AgateLib.Platform.WinForms;
+using AgateLib.Platform.WinForms.Controls;
namespace FontCreator
{
@@ -19,7 +20,7 @@
{
InitializeComponent();
- Icon = AgateLib.Platform.WindowsForms.WinForms.FormUtil.AgateLibIcon;
+ Icon = FormUtil.AgateLibIcon;
CurrentPage = 1;
}
Modified: trunk/Tools/FontCreator/frmWarningSplash.cs
===================================================================
--- trunk/Tools/FontCreator/frmWarningSplash.cs 2014-08-31 06:06:12 UTC (rev 1492)
+++ trunk/Tools/FontCreator/frmWarningSplash.cs 2014-08-31 06:08:27 UTC (rev 1493)
@@ -1,4 +1,5 @@
-using System;
+using AgateLib.Platform.WinForms.Controls;
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -14,7 +15,7 @@
{
InitializeComponent();
- Icon = AgateLib.Platform.WindowsForms.WinForms.FormUtil.AgateLibIcon;
+ Icon = FormUtil.AgateLibIcon;
}
private void btnOK_Click(object sender, EventArgs e)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 06:06:22
|
Revision: 1492
http://sourceforge.net/p/agate/code/1492
Author: kanato
Date: 2014-08-31 06:06:12 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Delete compiled shader output files from repository.
Removed Paths:
-------------
trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo
trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo
Property Changed:
----------------
trunk/AgateLib.Platform.WindowsStoreCommon/Resources/
Index: trunk/AgateLib.Platform.WindowsStoreCommon/Resources
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/Resources 2014-08-31 01:31:34 UTC (rev 1491)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/Resources 2014-08-31 06:06:12 UTC (rev 1492)
Property changes on: trunk/AgateLib.Platform.WindowsStoreCommon/Resources
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,11 ##
+[Bb]in
+obj
+[Dd]ebug
+[Rr]elease
+*.user
+*.aps
+*.eto
+ClientBin
+GeneratedArtifacts
+_Pvt_Extensions
+*.fxo
Deleted: trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo
===================================================================
(Binary files differ)
Deleted: trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 01:31:38
|
Revision: 1491
http://sourceforge.net/p/agate/code/1491
Author: kanato
Date: 2014-08-31 01:31:34 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Minor cleanup. Added FakeRenderTarget to available fakes.
Modified Paths:
--------------
trunk/AgateLib-Windows.sln
trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj
trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj
trunk/AgateLib.Platform.WinForms/Controls/FormUtil.cs
trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo
trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeFrameBuffer.cs
trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj
Added Paths:
-----------
trunk/.nuget/
trunk/.nuget/NuGet.Config
trunk/.nuget/NuGet.exe
trunk/.nuget/NuGet.targets
trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs
Removed Paths:
-------------
trunk/AgateLib.Platform.Common/PlatformImplementation/ActivatorConstructor.cs
Added: trunk/.nuget/NuGet.Config
===================================================================
--- trunk/.nuget/NuGet.Config (rev 0)
+++ trunk/.nuget/NuGet.Config 2014-08-31 01:31:34 UTC (rev 1491)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <solution>
+ <add key="disableSourceControlIntegration" value="true" />
+ </solution>
+</configuration>
\ No newline at end of file
Added: trunk/.nuget/NuGet.exe
===================================================================
(Binary files differ)
Index: trunk/.nuget/NuGet.exe
===================================================================
--- trunk/.nuget/NuGet.exe 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/.nuget/NuGet.exe 2014-08-31 01:31:34 UTC (rev 1491)
Property changes on: trunk/.nuget/NuGet.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/.nuget/NuGet.targets
===================================================================
--- trunk/.nuget/NuGet.targets (rev 0)
+++ trunk/.nuget/NuGet.targets 2014-08-31 01:31:34 UTC (rev 1491)
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
+
+ <!-- Enable the restore command to run before builds -->
+ <RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
+
+ <!-- Property that enables building a package from a project -->
+ <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
+
+ <!-- Determines if package restore consent is required to restore packages -->
+ <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
+
+ <!-- Download NuGet.exe if it does not already exist -->
+ <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
+ </PropertyGroup>
+
+ <ItemGroup Condition=" '$(PackageSources)' == '' ">
+ <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
+ <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
+ <!--
+ <PackageSource Include="https://www.nuget.org/api/v2/" />
+ <PackageSource Include="https://my-nuget-source/nuget/" />
+ -->
+ </ItemGroup>
+
+ <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
+ <!-- Windows specific commands -->
+ <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
+ <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
+ <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
+ <PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
+ <PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- NuGet command -->
+ <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
+ <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
+
+ <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
+ <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExePath)"</NuGetCommand>
+
+ <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
+
+ <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
+ <NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
+
+ <PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
+ <PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
+
+ <!-- Commands -->
+ <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
+ <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
+
+ <!-- We need to ensure packages are restored prior to assembly resolve -->
+ <BuildDependsOn Condition="$(RestorePackages) == 'true'">
+ RestorePackages;
+ $(BuildDependsOn);
+ </BuildDependsOn>
+
+ <!-- Make the build depend on restore packages -->
+ <BuildDependsOn Condition="$(BuildPackage) == 'true'">
+ $(BuildDependsOn);
+ BuildPackage;
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="CheckPrerequisites">
+ <!-- Raise an error if we're unable to locate nuget.exe -->
+ <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
+ <!--
+ Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
+ This effectively acts as a lock that makes sure that the download operation will only happen once and all
+ parallel builds will have to wait for it to complete.
+ -->
+ <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
+ </Target>
+
+ <Target Name="_DownloadNuGet">
+ <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
+ </Target>
+
+ <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(RestoreCommand)"
+ Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
+
+ <Exec Command="$(RestoreCommand)"
+ LogStandardErrorAsError="true"
+ Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
+ </Target>
+
+ <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(BuildCommand)"
+ Condition=" '$(OS)' != 'Windows_NT' " />
+
+ <Exec Command="$(BuildCommand)"
+ LogStandardErrorAsError="true"
+ Condition=" '$(OS)' == 'Windows_NT' " />
+ </Target>
+
+ <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <OutputFilename ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Reference Include="System.Core" />
+ <Using Namespace="System" />
+ <Using Namespace="System.IO" />
+ <Using Namespace="System.Net" />
+ <Using Namespace="Microsoft.Build.Framework" />
+ <Using Namespace="Microsoft.Build.Utilities" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ OutputFilename = Path.GetFullPath(OutputFilename);
+
+ Log.LogMessage("Downloading latest version of NuGet.exe...");
+ WebClient webClient = new WebClient();
+ webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
+
+ return true;
+ }
+ catch (Exception ex) {
+ Log.LogErrorFromException(ex);
+ return false;
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+</Project>
Modified: trunk/AgateLib-Windows.sln
===================================================================
--- trunk/AgateLib-Windows.sln 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/AgateLib-Windows.sln 2014-08-31 01:31:34 UTC (rev 1491)
@@ -42,6 +42,13 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Tests.WindowsPhone", "AgateLib.Tests\Tests.WindowsPhone\AgateLib.Tests.WindowsPhone.csproj", "{1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{3C35058B-A7F6-42D7-8B2B-7C4B2E7A0F13}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\NuGet.Config = .nuget\NuGet.Config
+ .nuget\NuGet.exe = .nuget\NuGet.exe
+ .nuget\NuGet.targets = .nuget\NuGet.targets
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Modified: trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj
===================================================================
--- trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj 2014-08-31 01:31:34 UTC (rev 1491)
@@ -140,7 +140,9 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <None Include="packages.config" />
+ <None Include="packages.config">
+ <SubType>Designer</SubType>
+ </None>
<None Include="Resources\Basic2D_pixel.txt" />
</ItemGroup>
<ItemGroup>
Modified: trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj
===================================================================
--- trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-31 01:31:34 UTC (rev 1491)
@@ -42,7 +42,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <Compile Include="PlatformImplementation\ActivatorConstructor.cs" />
+ <Compile Include="PlatformImplementation\PlatformSerialization.cs" />
<Compile Include="PlatformImplementation\DiagnosticsStopwatch.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Deleted: trunk/AgateLib.Platform.Common/PlatformImplementation/ActivatorConstructor.cs
===================================================================
--- trunk/AgateLib.Platform.Common/PlatformImplementation/ActivatorConstructor.cs 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/AgateLib.Platform.Common/PlatformImplementation/ActivatorConstructor.cs 2014-08-31 01:31:34 UTC (rev 1491)
@@ -1,16 +0,0 @@
-using AgateLib.Drivers;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace AgateLib.Platform.Common.PlatformImplementation
-{
- public class PlatformSerialization : IPlatformSerialization
- {
- public object CreateInstance(Type t)
- {
- return Activator.CreateInstance(t, true);
- }
- }
-}
Copied: trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs (from rev 1490, trunk/AgateLib.Platform.Common/PlatformImplementation/ActivatorConstructor.cs)
===================================================================
--- trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs (rev 0)
+++ trunk/AgateLib.Platform.Common/PlatformImplementation/PlatformSerialization.cs 2014-08-31 01:31:34 UTC (rev 1491)
@@ -0,0 +1,16 @@
+using AgateLib.Drivers;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.Platform.Common.PlatformImplementation
+{
+ public class PlatformSerialization : IPlatformSerialization
+ {
+ public object CreateInstance(Type t)
+ {
+ return Activator.CreateInstance(t, true);
+ }
+ }
+}
Modified: trunk/AgateLib.Platform.WinForms/Controls/FormUtil.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Controls/FormUtil.cs 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/AgateLib.Platform.WinForms/Controls/FormUtil.cs 2014-08-31 01:31:34 UTC (rev 1491)
@@ -113,7 +113,7 @@
{
AgateLib.Core.ErrorReporting.Report(ErrorLevel.Warning,
"Caught a MissingManifestResourceException when looking for the AgateLib Icon. " +
- "This indicates a problem with the way resources were embedded into AgateLib.Platform.WindowsForms.WinForms.dll when it was built.",
+ "This indicates a problem with the way resources were embedded into AgateLib.Platform.WinForms.dll when it was built.",
e);
return null;
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo
===================================================================
(Binary files differ)
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo
===================================================================
(Binary files differ)
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-08-31 01:31:34 UTC (rev 1491)
@@ -60,6 +60,7 @@
<Compile Include="Fakes\FakeFrameBuffer.cs" />
<Compile Include="Fakes\FakePlatformFactory.cs" />
<Compile Include="Fakes\FakePlatformInfo.cs" />
+ <Compile Include="Fakes\FakeRenderTarget.cs" />
<Compile Include="FontTests\Builtin.cs" />
<Compile Include="FontTests\TextLayout.cs" />
<Compile Include="IAgateTest.cs" />
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeFrameBuffer.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeFrameBuffer.cs 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeFrameBuffer.cs 2014-08-31 01:31:34 UTC (rev 1491)
@@ -8,7 +8,7 @@
namespace AgateLib.Testing.Fakes
{
- class FakeFrameBuffer : FrameBufferImpl
+ public class FakeFrameBuffer : FrameBufferImpl
{
public FakeFrameBuffer(FakeDisplayWindow owner)
: base(new NativeCoordinates())
Added: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs (rev 0)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeRenderTarget.cs 2014-08-31 01:31:34 UTC (rev 1491)
@@ -0,0 +1,25 @@
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Testing.Fakes
+{
+ public class FakeRenderTarget : IFrameBuffer
+ {
+ public FakeRenderTarget()
+ {
+ CoordinateSystem = new Rectangle(0, 0, 640, 400);
+ }
+
+ public int Height { get { return 400; } }
+ public int Width { get { return 640; } }
+ public Size Size { get { return new Size(Width, Height); } }
+ public Rectangle CoordinateSystem { get; set; }
+
+ ICoordinateSystemCreator IFrameBuffer.CoordinateSystem { get; set; }
+ }
+}
Modified: trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj
===================================================================
--- trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj 2014-08-31 01:11:47 UTC (rev 1490)
+++ trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj 2014-08-31 01:31:34 UTC (rev 1491)
@@ -123,7 +123,7 @@
</ProjectReference>
<ProjectReference Include="..\..\AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj">
<Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
- <Name>AgateLib.Platform.WindowsForms</Name>
+ <Name>AgateLib.Platform.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 01:11:48
|
Revision: 1490
http://sourceforge.net/p/agate/code/1490
Author: kanato
Date: 2014-08-31 01:11:47 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Delete old tests folder.
Removed Paths:
-------------
trunk/Tests/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 01:11:13
|
Revision: 1489
http://sourceforge.net/p/agate/code/1489
Author: kanato
Date: 2014-08-31 01:11:02 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Fix organization of and name of test projects.
Modified Paths:
--------------
trunk/AgateLib-Windows.sln
Added Paths:
-----------
trunk/AgateLib.Tests/Tests.WindowsMetro/
trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj
trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj
Removed Paths:
-------------
trunk/AgateLib.Tests/Tests.WindowsMetro/Tests.WindowsMetro.csproj
trunk/AgateLib.Tests/Tests.WindowsPhone/Tests.WindowsPhone.csproj
trunk/Tests/Tests.WindowsMetro/
Modified: trunk/AgateLib-Windows.sln
===================================================================
--- trunk/AgateLib-Windows.sln 2014-08-31 00:56:59 UTC (rev 1488)
+++ trunk/AgateLib-Windows.sln 2014-08-31 01:11:02 UTC (rev 1489)
@@ -38,9 +38,9 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Tests.WinForms", "AgateLib.Tests\Tests.WinForms\AgateLib.Tests.WinForms.csproj", "{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.WindowsPhone", "AgateLib.Tests\Tests.WindowsPhone\Tests.WindowsPhone.csproj", "{1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Tests.WindowsMetro", "AgateLib.Tests\Tests.WindowsMetro\AgateLib.Tests.WindowsMetro.csproj", "{25D68687-A724-46B3-9603-74478320807F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.WindowsMetro", "Tests\Tests.WindowsMetro\Tests.WindowsMetro.csproj", "{25D68687-A724-46B3-9603-74478320807F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Tests.WindowsPhone", "AgateLib.Tests\Tests.WindowsPhone\AgateLib.Tests.WindowsPhone.csproj", "{1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -277,36 +277,6 @@
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.Build.0 = Release|x64
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.ActiveCfg = Release|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.Build.0 = Release|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|ARM.ActiveCfg = Debug|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|ARM.Build.0 = Debug|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|ARM.Deploy.0 = Debug|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|x64.ActiveCfg = Debug|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|x86.ActiveCfg = Debug|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|x86.Build.0 = Debug|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|x86.Deploy.0 = Debug|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|Any CPU.ActiveCfg = Release|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|Any CPU.Build.0 = Release|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|Any CPU.Deploy.0 = Release|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|ARM.ActiveCfg = Release|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|ARM.Build.0 = Release|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|ARM.Deploy.0 = Release|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|x64.ActiveCfg = Release|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|x86.ActiveCfg = Release|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|x86.Build.0 = Release|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|x86.Deploy.0 = Release|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|Any CPU.Build.0 = Release|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|ARM.ActiveCfg = Release|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|ARM.Build.0 = Release|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|ARM.Deploy.0 = Release|ARM
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|x64.ActiveCfg = Release|Any CPU
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|x86.ActiveCfg = Release|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|x86.Build.0 = Release|x86
- {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|x86.Deploy.0 = Release|x86
{25D68687-A724-46B3-9603-74478320807F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25D68687-A724-46B3-9603-74478320807F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25D68687-A724-46B3-9603-74478320807F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -343,6 +313,36 @@
{25D68687-A724-46B3-9603-74478320807F}.Release|x86.ActiveCfg = Release|x86
{25D68687-A724-46B3-9603-74478320807F}.Release|x86.Build.0 = Release|x86
{25D68687-A724-46B3-9603-74478320807F}.Release|x86.Deploy.0 = Release|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|ARM.ActiveCfg = Debug|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|ARM.Build.0 = Debug|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|ARM.Deploy.0 = Debug|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|x86.ActiveCfg = Debug|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|x86.Build.0 = Debug|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Debug|x86.Deploy.0 = Debug|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|Any CPU.ActiveCfg = Release|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|Any CPU.Build.0 = Release|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|Any CPU.Deploy.0 = Release|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|ARM.ActiveCfg = Release|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|ARM.Build.0 = Release|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|ARM.Deploy.0 = Release|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|x64.ActiveCfg = Release|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|x86.ActiveCfg = Release|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|x86.Build.0 = Release|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Public|x86.Deploy.0 = Release|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|ARM.ActiveCfg = Release|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|ARM.Build.0 = Release|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|ARM.Deploy.0 = Release|ARM
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|x64.ActiveCfg = Release|Any CPU
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|x86.ActiveCfg = Release|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|x86.Build.0 = Release|x86
+ {1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Copied: trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj (from rev 1488, trunk/Tests/Tests.WindowsMetro/Tests.WindowsMetro.csproj)
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj (rev 0)
+++ trunk/AgateLib.Tests/Tests.WindowsMetro/AgateLib.Tests.WindowsMetro.csproj 2014-08-31 01:11:02 UTC (rev 1489)
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{25D68687-A724-46B3-9603-74478320807F}</ProjectGuid>
+ <OutputType>AppContainerExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>AgateLib.Testing.WindowsMetro</RootNamespace>
+ <AssemblyName>AgateLib.Tests.WindowsMetro</AssemblyName>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <TargetPlatformVersion>8.1</TargetPlatformVersion>
+ <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PackageCertificateKeyFile>Tests.WindowsMetro_TemporaryKey.pfx</PackageCertificateKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\ARM\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+ <OutputPath>bin\ARM\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
+ <Optimize>true</Optimize>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
+ <Optimize>true</Optimize>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
+ <Optimize>true</Optimize>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <ItemGroup>
+ <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
+ <ProjectReference Include="..\..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
+ <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
+ <Name>AgateLib.Platform.Common</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.Platform.WindowsMetro\AgateLib.Platform.WindowsMetro.csproj">
+ <Project>{c9b8f763-187d-4f2e-baee-827b7247c278}</Project>
+ <Name>AgateLib.Platform.WindowsMetro</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj">
+ <Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project>
+ <Name>AgateLib.Platform.WindowsStoreCommon</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.Tests\AgateLib.Tests.Portable\AgateLib.Tests.Portable.csproj">
+ <Project>{3aaa6832-55d7-47a9-af95-9393792ecb2c}</Project>
+ <Name>AgateLib.Tests.Portable</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
+ <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
+ <Name>AgateLib</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="MainPage.xaml.cs">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="TestContainer.xaml.cs">
+ <DependentUpon>TestContainer.xaml</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest">
+ <SubType>Designer</SubType>
+ </AppxManifest>
+ <None Include="Tests.WindowsMetro_TemporaryKey.pfx" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Assets\Logo.scale-100.png" />
+ <Content Include="Assets\SmallLogo.scale-100.png" />
+ <Content Include="Assets\SplashScreen.scale-100.png" />
+ <Content Include="Assets\StoreLogo.scale-100.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Page Include="MainPage.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="TestContainer.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' ">
+ <VisualStudioVersion>12.0</VisualStudioVersion>
+ </PropertyGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Deleted: trunk/AgateLib.Tests/Tests.WindowsMetro/Tests.WindowsMetro.csproj
===================================================================
--- trunk/Tests/Tests.WindowsMetro/Tests.WindowsMetro.csproj 2014-08-31 00:56:59 UTC (rev 1488)
+++ trunk/AgateLib.Tests/Tests.WindowsMetro/Tests.WindowsMetro.csproj 2014-08-31 01:11:02 UTC (rev 1489)
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{25D68687-A724-46B3-9603-74478320807F}</ProjectGuid>
- <OutputType>AppContainerExe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>AgateLib.Testing.WindowsMetro</RootNamespace>
- <AssemblyName>AgateLib.Tests.WindowsMetro</AssemblyName>
- <DefaultLanguage>en-US</DefaultLanguage>
- <TargetPlatformVersion>8.1</TargetPlatformVersion>
- <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <PackageCertificateKeyFile>Tests.WindowsMetro_TemporaryKey.pfx</PackageCertificateKeyFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\ARM\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>ARM</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
- <OutputPath>bin\ARM\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>ARM</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
- <OutputPath>bin\x64\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
- <OutputPath>bin\x86\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <ItemGroup>
- <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
- <ProjectReference Include="..\..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\AgateLib.Platform.WindowsMetro\AgateLib.Platform.WindowsMetro.csproj">
- <Project>{c9b8f763-187d-4f2e-baee-827b7247c278}</Project>
- <Name>AgateLib.Platform.WindowsMetro</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj">
- <Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project>
- <Name>AgateLib.Platform.WindowsStoreCommon</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\AgateLib.Tests\AgateLib.Tests.Portable\AgateLib.Tests.Portable.csproj">
- <Project>{3aaa6832-55d7-47a9-af95-9393792ecb2c}</Project>
- <Name>AgateLib.Tests.Portable</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
- <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
- <Name>AgateLib</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <Compile Include="MainPage.xaml.cs">
- <DependentUpon>MainPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="TestContainer.xaml.cs">
- <DependentUpon>TestContainer.xaml</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <AppxManifest Include="Package.appxmanifest">
- <SubType>Designer</SubType>
- </AppxManifest>
- <None Include="Tests.WindowsMetro_TemporaryKey.pfx" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="Assets\Logo.scale-100.png" />
- <Content Include="Assets\SmallLogo.scale-100.png" />
- <Content Include="Assets\SplashScreen.scale-100.png" />
- <Content Include="Assets\StoreLogo.scale-100.png" />
- </ItemGroup>
- <ItemGroup>
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- <Page Include="MainPage.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="TestContainer.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- </ItemGroup>
- <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' ">
- <VisualStudioVersion>12.0</VisualStudioVersion>
- </PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
Copied: trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj (from rev 1488, trunk/AgateLib.Tests/Tests.WindowsPhone/Tests.WindowsPhone.csproj)
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj (rev 0)
+++ trunk/AgateLib.Tests/Tests.WindowsPhone/AgateLib.Tests.WindowsPhone.csproj 2014-08-31 01:11:02 UTC (rev 1489)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}</ProjectGuid>
+ <OutputType>AppContainerExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>AgateLib.Testing.WindowsPhone</RootNamespace>
+ <AssemblyName>AgateLib.Tests.WindowsPhone</AssemblyName>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <TargetPlatformVersion>8.1</TargetPlatformVersion>
+ <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\ARM\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+ <OutputPath>bin\ARM\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
+ <Optimize>true</Optimize>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
+ <Optimize>true</Optimize>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <ItemGroup>
+ <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
+ <ProjectReference Include="..\..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
+ <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
+ <Name>AgateLib.Platform.Common</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.Platform.WindowsPhone\AgateLib.Platform.WindowsPhone.csproj">
+ <Project>{9bef78db-b535-47d3-9c14-453d373807ec}</Project>
+ <Name>AgateLib.Platform.WindowsPhone</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj">
+ <Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project>
+ <Name>AgateLib.Platform.WindowsStoreCommon</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
+ <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
+ <Name>AgateLib</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\AgateLib.Tests.Portable\AgateLib.Tests.Portable.csproj">
+ <Project>{3aaa6832-55d7-47a9-af95-9393792ecb2c}</Project>
+ <Name>AgateLib.Tests.Portable</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="MainPage.xaml.cs">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="TestContainer.xaml.cs">
+ <DependentUpon>TestContainer.xaml</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest">
+ <SubType>Designer</SubType>
+ </AppxManifest>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Assets\boxsprite.png">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Assets\Logo.scale-240.png" />
+ <Content Include="Assets\SmallLogo.scale-240.png" />
+ <Content Include="Assets\SplashScreen.scale-240.png" />
+ <Content Include="Assets\Square71x71Logo.scale-240.png" />
+ <Content Include="Assets\StoreLogo.scale-240.png" />
+ <Content Include="Assets\WideLogo.scale-240.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Page Include="MainPage.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="TestContainer.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' ">
+ <VisualStudioVersion>12.0</VisualStudioVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == '' ">
+ <TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier>
+ </PropertyGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Deleted: trunk/AgateLib.Tests/Tests.WindowsPhone/Tests.WindowsPhone.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsPhone/Tests.WindowsPhone.csproj 2014-08-31 00:56:59 UTC (rev 1488)
+++ trunk/AgateLib.Tests/Tests.WindowsPhone/Tests.WindowsPhone.csproj 2014-08-31 01:11:02 UTC (rev 1489)
@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{1AAD3A4C-90CB-403E-93F9-7EC3919E80BB}</ProjectGuid>
- <OutputType>AppContainerExe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>AgateLib.Testing.WindowsPhone</RootNamespace>
- <AssemblyName>AgateLib.Tests.WindowsPhone</AssemblyName>
- <DefaultLanguage>en-US</DefaultLanguage>
- <TargetPlatformVersion>8.1</TargetPlatformVersion>
- <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\ARM\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>ARM</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
- <OutputPath>bin\ARM\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>ARM</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
- <OutputPath>bin\x86\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <ItemGroup>
- <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
- <ProjectReference Include="..\..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
- <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
- <Name>AgateLib.Platform.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\AgateLib.Platform.WindowsPhone\AgateLib.Platform.WindowsPhone.csproj">
- <Project>{9bef78db-b535-47d3-9c14-453d373807ec}</Project>
- <Name>AgateLib.Platform.WindowsPhone</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj">
- <Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project>
- <Name>AgateLib.Platform.WindowsStoreCommon</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
- <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
- <Name>AgateLib</Name>
- </ProjectReference>
- <ProjectReference Include="..\AgateLib.Tests.Portable\AgateLib.Tests.Portable.csproj">
- <Project>{3aaa6832-55d7-47a9-af95-9393792ecb2c}</Project>
- <Name>AgateLib.Tests.Portable</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <Compile Include="MainPage.xaml.cs">
- <DependentUpon>MainPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="TestContainer.xaml.cs">
- <DependentUpon>TestContainer.xaml</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <AppxManifest Include="Package.appxmanifest">
- <SubType>Designer</SubType>
- </AppxManifest>
- </ItemGroup>
- <ItemGroup>
- <Content Include="Assets\boxsprite.png">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="Assets\Logo.scale-240.png" />
- <Content Include="Assets\SmallLogo.scale-240.png" />
- <Content Include="Assets\SplashScreen.scale-240.png" />
- <Content Include="Assets\Square71x71Logo.scale-240.png" />
- <Content Include="Assets\StoreLogo.scale-240.png" />
- <Content Include="Assets\WideLogo.scale-240.png" />
- </ItemGroup>
- <ItemGroup>
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- <Page Include="MainPage.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="TestContainer.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- </ItemGroup>
- <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' ">
- <VisualStudioVersion>12.0</VisualStudioVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == '' ">
- <TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier>
- </PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-31 00:57:03
|
Revision: 1488
http://sourceforge.net/p/agate/code/1488
Author: kanato
Date: 2014-08-31 00:56:59 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
Fix reference in winforms assembly.
Modified Paths:
--------------
trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
Modified: trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-08-31 00:41:35 UTC (rev 1487)
+++ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-08-31 00:56:59 UTC (rev 1488)
@@ -164,7 +164,7 @@
</ProjectReference>
<ProjectReference Include="..\AgateLib.OpenGL\AgateLib.OpenGL.csproj">
<Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project>
- <Name>AgateLib.GL</Name>
+ <Name>AgateLib.OpenGL</Name>
</ProjectReference>
<ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj">
<Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|