Thread: [Agate-svn-commit] SF.net SVN: agate:[1525] trunk (Page 8)
Status: Alpha
Brought to you by:
kanato
|
From: <ka...@us...> - 2014-09-14 03:19:37
|
Revision: 1525
http://sourceforge.net/p/agate/code/1525
Author: kanato
Date: 2014-09-14 03:19:31 +0000 (Sun, 14 Sep 2014)
Log Message:
-----------
Implement FrameBuffers for WP8 projects.
Modified Paths:
--------------
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferSurface.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
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs
Added Paths:
-----------
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/MultipleFramebufferTest.cs
Removed Paths:
-------------
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferSurface.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferSurface.cs 2014-09-14 00:09:08 UTC (rev 1524)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferSurface.cs 2014-09-14 03:19:31 UTC (rev 1525)
@@ -28,48 +28,39 @@
namespace AgateLib.Platform.WindowsStore.DisplayImplementation
{
- class FrameBufferSurface : SDX_FrameBuffer
+ class FrameBufferSurface : SDX_FrameBuffer
{
Size mSize;
SDX_Display mDisplay;
D3DDevice mDevice;
SDX_Surface mAgateSurface;
Texture2D mTexture;
- SharpDX.DXGI.Surface mRenderTarget;
+ RenderTargetView mRenderTargetView;
bool mHasDepth;
bool mHasStencil;
- public FrameBufferSurface(Size size) : base(new NativeCoordinates())
+ public FrameBufferSurface(Size size)
+ : base(new NativeCoordinates())
{
- throw new NotImplementedException();
- //mDisplay = Display.Impl as SDX_Display;
- //mDevice = mDisplay.D3D_Device;
- //mSize = size;
+ mDisplay = Display.Impl as SDX_Display;
+ mDevice = mDisplay.D3D_Device;
+ mSize = size;
- //try
- //{
- // mTexture = new Texture2D(mDevice.Device, mSize.Width, mSize.Height,
- // 0, Usage.RenderTarget, Format.A8R8G8B8, Pool.Default);
- //}
- //catch
- //{
- // Size newSize = SDX_Surface.NextPowerOfTwo(mSize);
+ mAgateSurface = new SDX_Surface(mSize);
+ mTexture = mAgateSurface.D3dTexture;
- // mTexture = new Texture(mDevice.Device, newSize.Width, newSize.Height,
- // 0, Usage.RenderTarget, Format.A8R8G8B8, Pool.Default);
- //}
+ var rtvdesc = new RenderTargetViewDescription
+ {
+ Format = mTexture.Description.Format,
+ Dimension = RenderTargetViewDimension.Texture2D,
+ };
- //mRenderTarget = mTexture.GetSurfaceLevel(0);
-
- //mAgateSurface = new SDX_Surface(new AgateLib.Utility.Ref<Texture>(mTexture),
- // new Rectangle(Point.Empty, Size));
-
- //SetHasDepthStencil(
+ mRenderTargetView = new RenderTargetView(mDevice.Device, mTexture, rtvdesc);
}
public override void Dispose()
{
- mRenderTarget.Dispose();
+ mRenderTargetView.Dispose();
}
public override AgateLib.Geometry.Size Size
@@ -79,13 +70,11 @@
public override void BeginRender()
{
- //mDevice.Device.SetRenderTarget(0, mRenderTarget);
- //mDevice.Device.BeginScene();
+ mDevice.DeviceContext.OutputMerger.SetRenderTargets(mRenderTargetView);
}
public override void EndRender()
{
- //mDevice.Device.EndScene();
}
public override bool CanAccessRenderTarget
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs 2014-09-14 00:09:08 UTC (rev 1524)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs 2014-09-14 03:19:31 UTC (rev 1525)
@@ -41,7 +41,6 @@
{
public class SDX_Surface : SurfaceImpl
{
-
SDX_Display mDisplay;
D3DDevice mDevice { get { return mDisplay.D3D_Device; } }
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-09-14 00:09:08 UTC (rev 1524)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-09-14 03:19:31 UTC (rev 1525)
@@ -51,6 +51,7 @@
<Compile Include="DisplayTests\ColorTest.cs" />
<Compile Include="DisplayTests\CoordinateSystem.cs" />
<Compile Include="DisplayTests\Interpolation.cs" />
+ <Compile Include="DisplayTests\MultipleFramebufferTest.cs" />
<Compile Include="DisplayTests\ParticleTests.cs" />
<Compile Include="DisplayTests\RotatingSpriteTester.cs" />
<Compile Include="DisplayTests\Tiling.cs" />
Copied: trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/MultipleFramebufferTest.cs (from rev 1523, trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs)
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/MultipleFramebufferTest.cs (rev 0)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/MultipleFramebufferTest.cs 2014-09-14 03:19:31 UTC (rev 1525)
@@ -0,0 +1,117 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib;
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using AgateLib.InputLib;
+using AgateLib.InputLib.Legacy;
+
+namespace AgateLib.Testing.DisplayTests
+{
+ class MultipleFramebufferTest : ISerialModelTest
+ {
+ List<Surface> mRegionColors = new List<Surface>();
+
+ public string Name
+ {
+ get { return "Multiple Framebuffer Test"; }
+ }
+
+ public string Category
+ {
+ get { return "Display"; }
+ }
+
+ List<Surface> tests = new List<Surface>();
+ bool done;
+ Font font;
+ Surface mySurface;
+
+ public void EntryPoint()
+ {
+ font = Assets.Fonts.AgateSans;
+ font.Size = 14;
+
+ Mouse.MouseDown += Mouse_MouseDown;
+
+ mySurface = new Surface("9ball.png");
+
+ while (Display.CurrentWindow.IsClosed == false && done == false)
+ {
+ Display.RenderTarget = Display.CurrentWindow.FrameBuffer;
+ Display.BeginFrame();
+ Display.Clear(Color.Gray);
+
+ font.Color = Color.White;
+ font.DisplayAlignment = OriginAlignment.TopLeft;
+ font.DrawText("Click or tap to create another frame buffer.");
+
+ int y = font.FontHeight;
+ int x = 10;
+ foreach (var surf in tests)
+ {
+ surf.Draw(x, y);
+ y += surf.DisplayHeight + 10;
+
+ if (y + 42 >= Display.CurrentWindow.Height)
+ {
+ y = font.FontHeight;
+ x += 42;
+ }
+ }
+
+ Display.EndFrame();
+ Core.KeepAlive();
+ }
+ }
+
+ void Mouse_MouseDown(InputEventArgs e)
+ {
+ if (e.MouseButtons == MouseButton.Primary)
+ CreateTests();
+ else
+ done = true;
+ }
+
+ int hueAngle = 0;
+
+ private void CreateTests()
+ {
+ const int angleIncrement = 373 / 8;
+ font.Color = Color.Black;
+ font.DisplayAlignment = OriginAlignment.CenterRight;
+
+ FrameBuffer frame = new FrameBuffer(32, 32);
+ var clr = Color.FromHsv(hueAngle, 1, 1);
+
+ Display.RenderTarget = frame;
+ Display.BeginFrame();
+ Display.Clear();
+ mySurface.Draw(new Rectangle(Point.Empty, frame.Size));
+ Display.FillRect(new Rectangle(0, 0, 8, 32), clr);
+
+ var pt = new Point(31, 16);
+ string text = tests.Count.ToString();
+
+ font.Color = Color.Black;
+ font.DrawText(pt.X - 1, pt.Y, text);
+ font.DrawText(pt.X + 1, pt.Y, text);
+ font.DrawText(pt.X, pt.Y - 1, text);
+ font.DrawText(pt.X, pt.Y + 1, text);
+
+ font.Color = Color.White;
+ font.DrawText(pt.X, pt.Y, text);
+
+ Display.EndFrame();
+ tests.Add(frame.RenderTarget);
+
+ hueAngle += angleIncrement;
+ }
+
+ public void ModifyModelParameters(ApplicationModels.SerialModelParameters parameters)
+ {
+ }
+ }
+}
Modified: trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-09-14 00:09:08 UTC (rev 1524)
+++ trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-09-14 03:19:31 UTC (rev 1525)
@@ -147,7 +147,6 @@
</Compile>
<Compile Include="DisplayTests\LargeImage.cs" />
<Compile Include="DisplayTests\DisplayWindowEvents.cs" />
- <Compile Include="DisplayTests\MultipleFramebufferTest.cs" />
<Compile Include="DisplayTests\PixelBufferMask.cs" />
<Compile Include="DisplayTests\Prerendered.cs" />
<Compile Include="DisplayTests\RenderTargetContinuous.cs" />
Deleted: trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs 2014-09-14 00:09:08 UTC (rev 1524)
+++ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs 2014-09-14 03:19:31 UTC (rev 1525)
@@ -1,122 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using AgateLib;
-using AgateLib.DisplayLib;
-using AgateLib.Geometry;
-using AgateLib.InputLib;
-using AgateLib.Platform.WinForms;
-using AgateLib.Platform.WinForms.Resources;
-using AgateLib.Platform.WinForms.ApplicationModels;
-using AgateLib.InputLib.Legacy;
-
-namespace AgateLib.Testing.DisplayTests
-{
- class MultipleFramebufferTest : IAgateTest
- {
- List<Surface> mRegionColors = new List<Surface>();
-
- public string Name
- {
- get { return "Multiple Framebuffer Test"; }
- }
-
- public string Category
- {
- get { return "Display"; }
- }
-
- List<Surface> tests = new List<Surface>();
- bool done;
- Font font;
-
- public void Main(string[] args)
- {
- new PassiveModel(args).Run( () =>
- {
- DisplayWindow wind = DisplayWindow.CreateWindowed("Multiple Framebuffer Test",
- 640, 480);
-
- font = Assets.Fonts.AgateSans;
-
- CreateTests();
-
- Keyboard.KeyDown += new InputEventHandler(Keyboard_KeyDown);
-
- while (wind.IsClosed == false && done == false)
- {
- Display.RenderTarget = wind.FrameBuffer;
- Display.BeginFrame();
- Display.Clear(Color.Gray);
-
- font.Color = Color.White;
- font.DisplayAlignment = OriginAlignment.TopLeft;
- font.DrawText("Press space to create another frame buffer.");
-
- int y = font.FontHeight;
- int x = 10;
- foreach (var surf in tests)
- {
- surf.Draw(x, y);
- y += surf.DisplayHeight + 10;
-
- if (y + 42 >= wind.Height)
- {
- y = font.FontHeight;
- x += 42;
- }
- }
-
- Display.EndFrame();
- Core.KeepAlive();
- }
- });
- }
-
- void Keyboard_KeyDown(InputEventArgs e)
- {
- if (e.KeyCode == KeyCode.Escape)
- done = true;
-
- if (e.KeyCode == KeyCode.Space)
- CreateTests();
- }
-
- int hueAngle = 0;
- private void CreateTests()
- {
- const int angleIncrement = 373 / 8;
- font.Color = Color.Black;
- font.DisplayAlignment = OriginAlignment.CenterRight;
- Surface mySurface = new Surface("jellybean.png");
-
- FrameBuffer frame = new FrameBuffer(32, 32);
- var clr = Color.FromHsv(hueAngle, 1, 1);
-
- Display.RenderTarget = frame;
- Display.BeginFrame();
- Display.Clear();
- mySurface.Draw();
- Display.FillRect(new Rectangle(0, 0, 8, 32), clr);
-
- var pt = new Point(31, 16);
- string text = tests.Count.ToString();
-
- font.Color = Color.Black;
- font.DrawText(pt.X - 1, pt.Y, text);
- font.DrawText(pt.X + 1, pt.Y, text);
- font.DrawText(pt.X, pt.Y - 1, text);
- font.DrawText(pt.X, pt.Y + 1, text);
-
- font.Color = Color.White;
- font.DrawText(pt.X, pt.Y, text);
-
- Display.EndFrame();
- tests.Add(frame.RenderTarget);
- frame.RenderTarget.SaveTo("test.png", ImageFileFormat.Png);
-
- hueAngle += angleIncrement;
- }
- }
-}
Modified: trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs 2014-09-14 00:09:08 UTC (rev 1524)
+++ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs 2014-09-14 03:19:31 UTC (rev 1525)
@@ -10,6 +10,7 @@
using AgateLib.Platform.WinForms;
using AgateLib.Platform.WinForms.Resources;
using AgateLib.Platform.WinForms.ApplicationModels;
+using AgateLib.ApplicationModels;
namespace AgateLib.Testing.DisplayTests.MultipleWindows
{
@@ -31,72 +32,81 @@
public void Main(string[] args)
{
- new PassiveModel(args).Run( () =>
+ var parameters = new PassiveModelParameters(args);
+ parameters.AssetLocations.Path = "Assets";
+
+ new PassiveModel(parameters).Run( () =>
{
- MultipleRenderTargetExample myForm = new MultipleRenderTargetExample();
- myForm.Show();
+ EntryPoint();
+ });
+ }
- // create three display windows
- DisplayWindow wnd_1 = DisplayWindow.CreateFromControl(myForm.pictureBox1);
- DisplayWindow wnd_2 = DisplayWindow.CreateFromControl(myForm.pictureBox2);
- DisplayWindow wnd_3 = DisplayWindow.CreateFromControl(myForm.pictureBox3);
+ private void EntryPoint()
+ {
+ MultipleRenderTargetExample myForm = new MultipleRenderTargetExample();
+ myForm.Show();
- myForm.pictureBox3.Resize += new EventHandler(wnd_3_Resize);
+ // create three display windows
+ DisplayWindow wnd_1 = DisplayWindow.CreateFromControl(myForm.pictureBox1);
+ DisplayWindow wnd_2 = DisplayWindow.CreateFromControl(myForm.pictureBox2);
+ DisplayWindow wnd_3 = DisplayWindow.CreateFromControl(myForm.pictureBox3);
- // this is the code that will be called when the button is pressed
- myForm.btnDraw.Click += new EventHandler(btnDraw_Click);
- myForm.btnClearSurface.Click += new EventHandler(btnClear_Click);
- myForm.btnDrawText.Click += new EventHandler(btnDrawText_Click);
- Surface image1 = new Surface("jellybean.png");
- Surface image2 = new Surface("9ball.png");
- image1.DisplayWidth = 40;
- image1.DisplayHeight = (int)(image1.DisplayWidth * image1.SurfaceHeight / (double)image1.SurfaceWidth);
- image2.DisplayWidth = 40;
- image2.DisplayHeight = (int)(image2.DisplayWidth * image2.SurfaceHeight / (double)image2.SurfaceWidth);
+ myForm.pictureBox3.Resize += new EventHandler(wnd_3_Resize);
- double time = 0;
+ // this is the code that will be called when the button is pressed
+ myForm.btnDraw.Click += new EventHandler(btnDraw_Click);
+ myForm.btnClearSurface.Click += new EventHandler(btnClear_Click);
+ myForm.btnDrawText.Click += new EventHandler(btnDrawText_Click);
+ Surface image1 = new Surface("jellybean.png");
+ Surface image2 = new Surface("9ball.png");
+ image1.DisplayWidth = 40;
+ image1.DisplayHeight = (int)(image1.DisplayWidth * image1.SurfaceHeight / (double)image1.SurfaceWidth);
+ image2.DisplayWidth = 40;
+ image2.DisplayHeight = (int)(image2.DisplayWidth * image2.SurfaceHeight / (double)image2.SurfaceWidth);
- frameBuffer = new FrameBuffer(wnd_3.Width, wnd_3.Height);
+ double time = 0;
- while (myForm.Visible)
- {
- // Render targets must be set before the call to BeginFrame,
- // and may not be changed between BeginFrame and EndFrame.
- // Use the FrameBuffer property of each DisplayWindow object
- // to set the Display.RenderTarget value.
- Display.RenderTarget = wnd_1.FrameBuffer;
+ frameBuffer = new FrameBuffer(wnd_3.Width, wnd_3.Height);
+ ClearFrameBuffer();
- Display.BeginFrame();
- Display.Clear(Color.Red);
- Display.FillRect(new Rectangle(20, 20, 40, 30), Color.Blue);
- image1.Draw(120 + (int)(30 * Math.Sin(time)), 20);
+ while (myForm.Visible)
+ {
+ // Render targets must be set before the call to BeginFrame,
+ // and may not be changed between BeginFrame and EndFrame.
+ // Use the FrameBuffer property of each DisplayWindow object
+ // to set the Display.RenderTarget value.
+ Display.RenderTarget = wnd_1.FrameBuffer;
- Display.EndFrame();
+ Display.BeginFrame();
+ Display.Clear(Color.Red);
+ Display.FillRect(new Rectangle(20, 20, 40, 30), Color.Blue);
+ image1.Draw(120 + (int)(30 * Math.Sin(time)), 20);
- // now do the second window.
- Display.RenderTarget = wnd_2.FrameBuffer;
+ Display.EndFrame();
- Display.BeginFrame();
- Display.Clear(Color.Green);
- Display.FillRect(new Rectangle(20, 20, 40, 30), Color.Yellow);
- image2.Draw(120 + (int)(30 * Math.Cos(time)), 20);
+ // now do the second window.
+ Display.RenderTarget = wnd_2.FrameBuffer;
- Display.EndFrame();
+ Display.BeginFrame();
+ Display.Clear(Color.Green);
+ Display.FillRect(new Rectangle(20, 20, 40, 30), Color.Yellow);
+ image2.Draw(120 + (int)(30 * Math.Cos(time)), 20);
- // draw the third window from the surface
- Display.RenderTarget = wnd_3.FrameBuffer;
+ Display.EndFrame();
- surf = frameBuffer.RenderTarget;
+ // draw the third window from the surface
+ Display.RenderTarget = wnd_3.FrameBuffer;
- Display.BeginFrame();
- Display.Clear(Color.Gray);
- surf.Draw(0, 0);
- Display.EndFrame();
+ surf = frameBuffer.RenderTarget;
- Core.KeepAlive();
- time = Timing.TotalSeconds;
- }
- });
+ Display.BeginFrame();
+ Display.Clear(Color.Gray);
+ surf.Draw(0, 0);
+ Display.EndFrame();
+
+ Core.KeepAlive();
+ time = Timing.TotalSeconds;
+ }
}
void btnDrawText_Click(object sender, EventArgs e)
@@ -142,6 +152,11 @@
void btnClear_Click(object sender, EventArgs e)
{
+ ClearFrameBuffer();
+ }
+
+ private void ClearFrameBuffer()
+ {
Display.RenderTarget = frameBuffer;
Display.BeginFrame();
Display.Clear(0, 0, 0, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-17 13:48:21
|
Revision: 1527
http://sourceforge.net/p/agate/code/1527
Author: kanato
Date: 2014-09-17 13:48:09 +0000 (Wed, 17 Sep 2014)
Log Message:
-----------
Refactor CSS gui renderer.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/InputLib/InputHandlerList.cs
trunk/AgateLib/UserInterface/Css/CssAdapter.cs
trunk/AgateLib/UserInterface/Css/CssStyle.cs
trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs
trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs
trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs
trunk/AgateLib/UserInterface/Css/Rendering/Transitions/IWidgetTransition.cs
trunk/AgateLib/UserInterface/Css/Rendering/Transitions/NullTransition.cs
trunk/AgateLib/UserInterface/Css/Rendering/Transitions/SlideTransition.cs
trunk/AgateLib/UserInterface/Css/Selectors/CssSelectorIndividual.cs
trunk/AgateLib/UserInterface/Widgets/Gui.cs
trunk/AgateLib/UserInterface/Widgets/IGuiRenderer.cs
trunk/AgateLib/UserInterface/Widgets/ImageBox.cs
trunk/AgateLib/UserInterface/Widgets/Label.cs
trunk/AgateLib/UserInterface/Widgets/Menu.cs
trunk/AgateLib/UserInterface/Widgets/ProgressBar.cs
trunk/AgateLib/UserInterface/Widgets/Widget.cs
trunk/AgateLib/UserInterface/Widgets/WidgetList.cs
trunk/AgateLib.Platform.WinForms/ApplicationModels/SceneModel.cs
trunk/AgateLib.Platform.WinForms/ApplicationModels/SerialModel.cs
trunk/AgateLib.Platform.WinForms/GuiDebug/frmGuiDebug.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/Style.css
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeGuiEngine.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/GuiStuff.cs
trunk/AgateLib.Tests/Tests.WinForms/frmLauncher.Designer.cs
trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssBindingTest.cs
trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs
Added Paths:
-----------
trunk/AgateLib/UserInterface/Css/Rendering/Animators/
trunk/AgateLib/UserInterface/Css/Rendering/Animators/WidgetAnimator.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/TransitionTest.cs
Removed Paths:
-------------
trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-09-16 03:21:33 UTC (rev 1526)
+++ trunk/AgateLib/AgateLib.csproj 2014-09-17 13:48:09 UTC (rev 1527)
@@ -553,7 +553,7 @@
<Compile Include="UserInterface\Css\Rendering\Transitions\NullTransition.cs" />
<Compile Include="UserInterface\Css\Rendering\Transitions\SlideTransition.cs" />
<Compile Include="UserInterface\Css\Rendering\Transitions\TransitionFactory.cs" />
- <Compile Include="UserInterface\Css\Rendering\WidgetAnimator.cs" />
+ <Compile Include="UserInterface\Css\Rendering\Animators\WidgetAnimator.cs" />
<Compile Include="UserInterface\Css\Selectors\CssSelectorIndividual.cs" />
<Compile Include="UserInterface\Css\Selectors\CssSelectorChain.cs" />
<Compile Include="UserInterface\Css\Selectors\CssSelector.cs" />
Modified: trunk/AgateLib/InputLib/InputHandlerList.cs
===================================================================
--- trunk/AgateLib/InputLib/InputHandlerList.cs 2014-09-16 03:21:33 UTC (rev 1526)
+++ trunk/AgateLib/InputLib/InputHandlerList.cs 2014-09-17 13:48:09 UTC (rev 1527)
@@ -33,6 +33,8 @@
}
public void Add(IInputHandler handler)
{
+ if (handler == null)
+ throw new ArgumentNullException("Cannot add a null input handler.");
if (mHandlers.Contains(handler))
throw new InvalidOperationException("Cannot add the same input handler twice.");
Modified: trunk/AgateLib/UserInterface/Css/CssAdapter.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/CssAdapter.cs 2014-09-16 03:21:33 UTC (rev 1526)
+++ trunk/AgateLib/UserInterface/Css/CssAdapter.cs 2014-09-17 13:48:09 UTC (rev 1527)
@@ -28,6 +28,7 @@
using System.Text;
using System.Threading.Tasks;
using AgateLib.Platform;
+using AgateLib.UserInterface.Css.Rendering.Animators;
namespace AgateLib.UserInterface.Css
{
Modified: trunk/AgateLib/UserInterface/Css/CssStyle.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/CssStyle.cs 2014-09-16 03:21:33 UTC (rev 1526)
+++ trunk/AgateLib/UserInterface/Css/CssStyle.cs 2014-09-17 13:48:09 UTC (rev 1527)
@@ -19,6 +19,7 @@
using AgateLib.UserInterface.Css.Cache;
using AgateLib.UserInterface.Css.Layout;
using AgateLib.UserInterface.Css.Rendering;
+using AgateLib.UserInterface.Css.Rendering.Animators;
using AgateLib.UserInterface.Css.Selectors;
using AgateLib.UserInterface.Widgets;
using System;
@@ -45,14 +46,11 @@
Cache = new StyleCache();
- Animator = new WidgetAnimator(this);
-
MatchParameters = new WidgetMatchParameters(widget);
}
public CssStyleData Data { get; set; }
public CssBoxModel BoxModel { get; set; }
- public WidgetAnimator Animator { get; set; }
public Widget Widget { get; set; }
@@ -73,5 +71,7 @@
public AgateLib.DisplayLib.Font Font { get; set; }
public WidgetMatchParameters MatchParameters { get; private set; }
+
+ public bool IncludeInLayout { get; set; }
}
}
Modified: trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs 2014-09-16 03:21:33 UTC (rev 1526)
+++ trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs 2014-09-17 13:48:09 UTC (rev 1527)
@@ -50,6 +50,9 @@
int numberLength = 0;
int start = 0;
+ if (string.IsNullOrWhiteSpace(value))
+ return new CssDistance(true);
+
if (value.Equals("auto", StringComparison.OrdinalIgnoreCase))
{
return new CssDistance(true);
Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-09-16 03:21:33 UTC (rev 1526)
+++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-09-17 13:48:09 UTC (rev 1527)
@@ -69,20 +69,22 @@
{
var style = mAdapter.GetStyle(desktop);
- style.Animator.ClientRect = new Rectangle(0, 0, desktop.Width, desktop.Height);
+ style.Widget.ClientRect = new Rectangle(0, 0, desktop.Width, desktop.Height);
}
private void RedoFixedLayout(Desktop desktop)
{
var deskStyle = mAdapter.GetStyle(desktop);
- deskStyle.Animator.ClientRect = new Rectangle(0, 0, desktop.Width, desktop.Height);
+ desktop.ClientRect = new Rectangle(0, 0, desktop.Width, desktop.Height);
- foreach (var child in desktop.Descendants.Where(x => {
+ foreach (var child in desktop.Descendants.Where(x =>
+ {
var pos = mAdapter.GetStyle(x).Data.Position;
- return pos == CssPosition.Absolute || pos == CssPosition.Fixed;} ))
+ return pos == CssPosition.Absolute || pos == CssPosition.Fixed;
+ }))
{
var style = mAdapter.GetStyle(child);
- var sz = style.Animator.ClientRect.Size;
+ var sz = style.Widget.ClientRect.Size;
var box = style.BoxModel;
switch (style.Data.Position)
@@ -96,36 +98,40 @@
}
private void SetFixedCoordinates(CssStyle style, CssBoxModel box, Size sz)
{
- var anim = style.Animator;
var position = style.Data.PositionData;
- var parentStyle = mAdapter.GetStyle(style.Animator.ParentCoordinateSystem);
+ var parentStyle = mAdapter.GetStyle(style.Widget.ParentCoordinateSystem);
+ var widget = style.Widget;
+ Rectangle clientRect = widget.ClientRect;
+
if (position.Left.Automatic == false)
{
var targetLeft = ConvertDistance(style.Widget, position.Left, true, false).Value;
- anim.ClientX = targetLeft + box.Left;
+ clientRect.X = targetLeft + box.Left;
}
if (position.Right.Automatic == false)
{
int targetRight = ConvertDistance(style.Widget, position.Right, true, false).Value;
- targetRight = parentStyle.Animator.ClientRect.Width - targetRight;
+ targetRight = parentStyle.Widget.ClientRect.Width - targetRight;
- anim.ClientX = targetRight - anim.ClientRect.Width - box.Right;
+ clientRect.X = targetRight - clientRect.Width - box.Right;
}
if (position.Top.Automatic == false)
{
int targetTop = ConvertDistance(style.Widget, position.Top, false, false).Value;
- anim.ClientY = targetTop + box.Top;
+ clientRect.Y = targetTop + box.Top;
}
if (position.Bottom.Automatic == false)
{
int targetBottom = ConvertDistance(style.Widget, position.Bottom, false, false).Value;
- targetBottom = parentStyle.Animator.ClientRect.Height - targetBottom;
+ targetBottom = parentStyle.Widget.ClientRect.Height - targetBottom;
- anim.ClientY = targetBottom - anim.ClientRect.Height - box.Bottom;
+ clientRect.Y = targetBottom - clientRect.Height - box.Bottom;
}
+
+ widget.ClientRect = clientRect;
}
public CssAdapter Adapter { get { return mAdapter; } }
@@ -133,7 +139,6 @@
private void RedoLayout(Container container, bool forceRefresh = false)
{
var containerStyle = mAdapter.GetStyle(container);
- var containerAnim = containerStyle.Animator;
CssBoxModel containerBox = containerStyle.BoxModel;
if (forceRefresh == false)
@@ -145,8 +150,9 @@
}
}
- containerAnim.ClientX = 0;
- containerAnim.ClientY = 0;
+ Rectangle containerClientRect = container.ClientRect;
+ containerClientRect.X = 0;
+ containerClientRect.Y = 0;
int maxWidth = ComputeMaxWidthForContainer(containerStyle);
Point nextPos = Point.Empty;
@@ -157,7 +163,7 @@
int largestWidth = 0;
int bottom = 0;
- containerAnim.ClientWidth = maxWidth;
+ containerClientRect.Width = maxWidth;
int? fixedContainerWidth = ConvertDistance(container, containerStyle.Data.PositionData.Width, true);
int? fixedContainerHeight = ConvertDistance(container, containerStyle.Data.PositionData.Height, true);
@@ -166,6 +172,9 @@
bool resetNextPosition = false;
+ if (container is Desktop == false)
+ container.ClientRect = containerClientRect;
+
foreach (var child in container.Children)
{
var style = mAdapter.GetStyle(child);
@@ -218,62 +227,74 @@
break;
}
- var anim = style.Animator;
- anim.IncludeInLayout = true;
- anim.ClientWidth = sz.Width;
- anim.ClientHeight = sz.Height;
+ style.IncludeInLayout = true;
+ Rectangle clientRect = new Rectangle();
+
+ clientRect.Size = sz;
+
switch (style.Data.Position)
{
case CssPosition.Absolute:
- anim.IncludeInLayout = false;
+ style.IncludeInLayout = false;
child.ParentCoordinateSystem = TopLevelWidget(child, x => mAdapter.GetStyle(x).Data.Position != CssPosition.Static);
break;
case CssPosition.Fixed:
- anim.IncludeInLayout = false;
+ style.IncludeInLayout = false;
child.ParentCoordinateSystem = TopLevelWidget(child, x => x is Desktop);
break;
}
- if (anim.IncludeInLayout)
+ if (style.IncludeInLayout)
{
- anim.ClientX = nextPos.X + box.Left;
- anim.ClientY = nextPos.Y + box.Top;
+ clientRect.X = nextPos.X + box.Left;
+ clientRect.Y = nextPos.Y + box.Top;
}
- anim.ClientWidgetOffset = new Point(
+ style.Widget.ClientWidgetOffset = new Point(
box.Padding.Left + box.Border.Left,
box.Padding.Top + box.Border.Top);
- if (anim.IncludeInLayout)
+ style.Widget.WidgetSize = new Size(
+ clientRect.Width + box.Padding.Left + box.Border.Left + box.Padding.Right + box.Border.Right,
+ clientRect.Height + box.Padding.Top + box.Border.Top + box.Padding.Bottom + box.Border.Bottom);
+
+ if (style.IncludeInLayout)
{
switch (containerStyle.Data.Layout.Kind)
{
case CssLayoutKind.Flow:
- nextPos.X += anim.ClientRect.Width + box.Left + box.Right;
+ nextPos.X += clientRect.Width + box.Left + box.Right;
largestWidth = Math.Max(largestWidth, nextPos.X);
break;
case CssLayoutKind.Column:
nextPos.X = 0;
- nextPos.Y += anim.ClientRect.Height + box.Top + box.Bottom;
- largestWidth = Math.Max(largestWidth, anim.ClientRect.Width + box.Right + box.Left);
+ nextPos.Y += clientRect.Height + box.Top + box.Bottom;
+ largestWidth = Math.Max(largestWidth, clientRect.Width + box.Right + box.Left);
break;
+
+ case CssLayoutKind.Row:
+ nextPos.X += clientRect.Width + box.Left + box.Right;
+ largestWidth = Math.Max(largestWidth, nextPos.X);
+ break;
}
- maxHeight = Math.Max(maxHeight, anim.ClientRect.Height + box.Top + box.Bottom);
- bottom = Math.Max(bottom, anim.ClientRect.Y + anim.ClientRect.Height + box.Bottom); // only add box.Bottom here, because box.Top is taken into account in child.Y.
+ maxHeight = Math.Max(maxHeight, clientRect.Height + box.Top + box.Bottom);
+ bottom = Math.Max(bottom, clientRect.Y + clientRect.Height + box.Bottom); // only add box.Bottom here, because box.Top is taken into account in child.Y.
}
+
+ style.Widget.ClientRect = clientRect;
}
- containerAnim.ClientWidth = Math.Min(largestWidth, maxWidth);
- containerAnim.ClientHeight = bottom;
+ containerClientRect.Width = Math.Min(largestWidth, maxWidth);
+ containerClientRect.Height = bottom;
if (fixedContainerWidth != null)
- containerAnim.ClientWidth = (int)fixedContainerWidth;
+ containerClientRect.Width = (int)fixedContainerWidth;
if (fixedContainerHeight != null)
- containerAnim.ClientHeight = (int)fixedContainerHeight;
+ containerClientRect.Height = (int)fixedContainerHeight;
switch (containerStyle.Data.Layout.Kind)
{
@@ -281,11 +302,10 @@
foreach (var child in container.Children)
{
var style = mAdapter.GetStyle(child);
- var anim = style.Animator;
var box = style.BoxModel;
- int width = containerAnim.ClientRect.Width - box.Left - box.Right;
+ int width = containerClientRect.Width - box.Left - box.Right;
- if (anim.IncludeInLayout == false)
+ if (style.IncludeInLayout == false)
continue;
if (style.Data.PositionData.MinWidth.Automatic == false)
@@ -299,11 +319,17 @@
width = Math.Min(width, maxwidth);
}
- anim.ClientWidth = width;
+ style.Widget.ClientRect = new Rectangle(
+ style.Widget.ClientRect.X,
+ style.Widget.ClientRect.Y,
+ width,
+ style.Widget.ClientRect.Height);
}
break;
}
+ if (container is Desktop == false)
+ container.ClientRect = containerClientRect;
}
private Container TopLevelWidget(Widget child)
@@ -333,7 +359,7 @@
var parentStyle = mAdapter.GetStyle(container.Parent);
- int availableWidth = parentStyle.Animator.ClientRect.Width - container.X;
+ int availableWidth = container.Parent.ClientRect.Width - container.X;
if (styleData.PositionData.MaxWidth.Automatic)
return availableWidth;
@@ -375,9 +401,8 @@
private Size ComputeContainerSize(Container container, bool forceRefresh)
{
RedoLayout(container, forceRefresh);
- var anim = mAdapter.GetStyle(container).Animator;
- return new Size(anim.ClientRect.Width, anim.ClientRect.Height);
+ return container.ClientRect.Size;
}
}
}
Copied: trunk/AgateLib/UserInterface/Css/Rendering/Animators/WidgetAnimator.cs (from rev 1525, trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs)
===================================================================
--- trunk/AgateLib/UserInterface/Css/Rendering/Animators/WidgetAnimator.cs (rev 0)
+++ trunk/AgateLib/UserInterface/Css/Rendering/Animators/WidgetAnimator.cs 2014-09-17 13:48:09 UTC (rev 1527)
@@ -0,0 +1,245 @@
+// 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 AgateLib.Geometry;
+using AgateLib.UserInterface.Css.Documents;
+using AgateLib.UserInterface.Css.Rendering.Transitions;
+using AgateLib.UserInterface.Widgets;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.UserInterface.Css.Rendering.Animators
+{
+ public class WidgetAnimator
+ {
+ CssStyle mStyle;
+ Rectangle mClientRect;
+ WidgetAnimator mParentCoordinates;
+
+ public List<WidgetAnimator> Children { get; private set; }
+ public WidgetAnimator Parent { get; set; }
+ public WidgetAnimator ParentCoordinateSystem
+ {
+ get
+ {
+ return mParentCoordinates ?? Parent;
+ }
+ set { mParentCoordinates = value; }
+ }
+
+ public Point ClientWidgetOffset { get { return Widget.ClientWidgetOffset; } }
+ public Size WidgetSize
+ {
+ get
+ {
+ var widgetSize = ClientRect.Size;
+ var box = mStyle.BoxModel;
+
+ widgetSize.Width += box.Padding.Left + box.Padding.Right + box.Border.Left + box.Border.Right;
+ widgetSize.Height += box.Padding.Top + box.Padding.Bottom + box.Border.Bottom + box.Border.Top;
+
+ return widgetSize;
+ }
+ }
+ public Rectangle ClientRect
+ {
+ get { return mClientRect; }
+ set { mClientRect = value; }
+ }
+ public Rectangle WidgetRect
+ {
+ get
+ {
+ return new Rectangle(
+ mClientRect.X - ClientWidgetOffset.X,
+ mClientRect.Y - ClientWidgetOffset.Y,
+ WidgetSize.Width,
+ WidgetSize.Height);
+ }
+ }
+
+ public int X
+ {
+ get { return mClientRect.X; }
+ set { mClientRect.X = value; }
+ }
+ public int Y
+ {
+ get { return mClientRect.Y; }
+ set { mClientRect.Y = value; }
+ }
+ public int Width
+ {
+ get { return mClientRect.Width; }
+ set { mClientRect.Width = value; }
+ }
+ public int Height
+ {
+ get { return mClientRect.Height; }
+ set { mClientRect.Height = value; }
+ }
+
+ public Rectangle ClientToScreen(Rectangle value)
+ {
+ Rectangle translated = value;
+
+ translated.Location = ClientToScreen(value.Location);
+
+ return translated;
+ }
+ public Point ClientToScreen(Point clientPoint)
+ {
+ if (Parent == null)
+ return clientPoint;
+
+ Point translated = ClientToParent(clientPoint);
+
+ return ParentCoordinateSystem.ClientToScreen(translated);
+ }
+ public Point ScreenToClient(Point screenPoint)
+ {
+ if (Parent == null)
+ return screenPoint;
+
+ Point translated = ParentToClient(screenPoint);
+
+ return Parent.ScreenToClient(translated);
+ }
+ public Point ClientToParent(Point clientPoint)
+ {
+ Point translated = clientPoint;
+
+ translated.X += X;
+ translated.Y += Y;
+
+ return translated;
+ }
+ public Point ParentToClient(Point parentClientPoint)
+ {
+ Point translated = parentClientPoint;
+
+ translated.X -= X;
+ translated.Y -= Y;
+
+ return translated;
+ }
+
+ public bool IsDead { get; set; }
+
+ public bool Active { get; private set; }
+ public bool Visible { get; set; }
+
+ public Widget Widget { get { return mStyle.Widget; } }
+ public CssStyle Style { get { return mStyle; } }
+
+ CssTransitionType mTransitionType;
+ public IWidgetTransition Transition { get; private set; }
+
+ public bool InTransition
+ {
+ get
+ {
+ if (IsDead) return false;
+ if (Transition == null) return false;
+
+ return (Transition != null && (Transition.Active || Transition.NeedTransition));
+ }
+ }
+
+ public WidgetAnimator(CssStyle style)
+ {
+ mStyle = style;
+ Children = new List<WidgetAnimator>();
+ }
+
+ public void Update(double deltaTime)
+ {
+ if (Transition == null || mTransitionType != mStyle.Data.Transition.Type)
+ {
+ mTransitionType = mStyle.Data.Transition.Type;
+ Transition = TransitionFactory.CreateTransition(mTransitionType);
+ Transition.Animator = this;
+ Transition.Style = mStyle;
+
+ Transition.Initialize();
+ }
+
+ if (Transition.NeedTransition && Transition.Active == false)
+ {
+ Transition.ActivateTransition();
+ }
+
+ if (Transition.Active)
+ {
+ Transition.Update(deltaTime);
+ }
+
+
+ if (Transition.AnimationDead)
+ IsDead = true;
+
+ if (Gesture != null)
+ {
+ AnimateForGesture();
+ }
+ }
+
+ private void AnimateForGesture()
+ {
+ switch (Gesture.GestureType)
+ {
+ case GestureType.Drag:
+ case GestureType.Swipe:
+ case GestureType.LongPressDrag:
+ AnimateDrag();
+ break;
+ }
+
+ }
+
+ private void AnimateDrag()
+ {
+ if (Gesture.IsValidForTarget == false)
+ return;
+
+ Vector2 delta = new Vector2(Gesture.CurrentPoint);
+ delta -= new Vector2(Gesture.StartPoint);
+
+ if (Gesture.Axis == AxisType.Horizontal)
+ delta.Y = 0;
+ else if (Gesture.Axis == AxisType.Vertical)
+ delta.X = 0;
+
+ ClientRect = new Rectangle(
+ Widget.ClientRect.X + (int)delta.X,
+ Widget.ClientRect.Y + (int)delta.Y,
+ Widget.ClientRect.Width,
+ Widget.ClientRect.Height);
+ }
+
+ public override string ToString()
+ {
+ return "Animator: " + mStyle.Widget.ToString();
+ }
+
+ public Gesture Gesture { get; set; }
+ }
+}
Modified: trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-09-16 03:21:33 UTC (rev 1526)
+++ trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-09-17 13:48:09 UTC (rev 1527)
@@ -19,6 +19,7 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.UserInterface.Css.Documents;
+using AgateLib.UserInterface.Css.Rendering.Animators;
using AgateLib.UserInterface.Widgets;
using System;
using System.Collections.Generic;
@@ -35,9 +36,12 @@
private CssAdapter mAdapter;
Surface mBlankSurface;
ICssImageProvider mImageProvider = new CssDefaultImageProvider();
- private CssAdapter adapter;
+ Gui mGui;
+ Dictionary<Widget, WidgetAnimator> mAnimators = new Dictionary<Widget, WidgetAnimator>();
+ WidgetAnimator mRootAnimator { get { return GetOrCreateAnimator(mGui.Desktop); } }
+
public CssRenderer(CssAdapter adapter)
{
mAdapter = adapter;
@@ -48,67 +52,148 @@
mBlankSurface = new Surface(buffer);
}
+ public Gui MyGui { get { return mGui; } set { mGui = value; } }
public Gesture ActiveGesture { get; set; }
- public void Update(Gui gui, double deltaTime)
+ public void Update(double deltaTime)
{
- foreach (var widget in gui.Desktop.Descendants)
+ UpdateAnimatorTree();
+
+
+ InTransition = false;
+
+ foreach (var anim in mAnimators.Values)
{
- var style = mAdapter.GetStyle(widget);
+ if (ActiveGesture != null && ActiveGesture.TargetWidget == anim.Widget)
+ {
+ anim.Gesture = ActiveGesture;
+ }
+ else
+ anim.Gesture = null;
- if (ActiveGesture != null)
- style.Animator.Gesture = ActiveGesture.TargetWidget == widget ? ActiveGesture : null;
+ anim.Update(deltaTime);
+ anim.Widget.OnUpdate(deltaTime);
- style.Animator.Update(deltaTime);
+ if (anim.InTransition)
+ InTransition = true;
+ }
+ }
- widget.OnUpdate(deltaTime);
+ public WidgetAnimator GetAnimator(Widget widget)
+ {
+ return mAnimators[widget];
+ }
+ WidgetAnimator GetOrCreateAnimator(Widget widget)
+ {
+ if (mAnimators.ContainsKey(widget) == false)
+ {
+ mAnimators.Add(widget, new WidgetAnimator(mAdapter.GetStyle(widget)));
}
+
+ return GetAnimator(widget);
}
- public void Draw(Gui gui)
+
+ #region --- Animation Tree Updating ---
+
+ public void UpdateAnimatorTree()
{
- foreach (var window in gui.Desktop.Windows)
+ // update animator tree
+ var rootAnimator = GetOrCreateAnimator(MyGui.Desktop);
+
+ TreeAddMissingAnimators(rootAnimator, MyGui.Desktop);
+ TreeRemoveDeadAnimators(rootAnimator, MyGui.Desktop);
+ }
+
+ List<WidgetAnimator> animsToRemove = new List<WidgetAnimator>();
+
+ private void TreeAddMissingAnimators(WidgetAnimator anim, Container container)
+ {
+ foreach (var widget in container.Children)
{
- DrawComponent(window);
+ var childAnim = GetOrCreateAnimator(widget);
+
+ if (anim.Children.Contains(childAnim) == false)
+ {
+ anim.Children.Add(childAnim);
+ childAnim.Parent = anim;
+ }
+
+ if (widget is Container)
+ {
+ TreeAddMissingAnimators(childAnim, (Container)widget);
+ }
}
}
+ private void TreeRemoveDeadAnimators(WidgetAnimator anim, Widget widget)
+ {
+ lock (animsToRemove)
+ {
+ animsToRemove.Clear();
- private void DrawComponent(Container window)
+ foreach (var animator in anim.Children)
+ {
+ if (animator.IsDead)
+ animsToRemove.Add(animator);
+ }
+
+ foreach (var deadAnimator in animsToRemove)
+ {
+ anim.Children.Remove(deadAnimator);
+ mAnimators.Remove(deadAnimator.Widget);
+ }
+
+
+ foreach (var animator in anim.Children)
+ {
+ TreeRemoveDeadAnimators(animator, animator.Widget);
+ }
+ }
+ }
+
+ #endregion;
+
+ public bool InTransition { get; private set;}
+
+ public void Draw()
{
- var style = mAdapter.GetStyle(window);
- if (style.Animator.Visible == false)
+ foreach (var anim in mRootAnimator.Children)
+ {
+ DrawComponent(anim);
+ }
+ }
+
+ private void DrawComponent(WidgetAnimator anim)
+ {
+ if (anim.Visible == false)
return;
- DrawComponentStyle(window);
- DrawComponentContents(window);
+ DrawComponentStyle(anim);
+ DrawComponentContents(anim);
}
- private bool PushClipRect(CssStyle style)
+ private bool PushClipRect(WidgetAnimator anim)
{
- Rectangle clipRect = style.Widget.ClientToScreen(new Rectangle(0, 0, style.Widget.ClientRect.Width, style.Widget.ClientRect.Height));
-
- if (style.Data.Overflow == CssOverflow.Visible)
+ if (anim.Style.Data.Overflow == CssOverflow.Visible)
return false;
+ Rectangle clipRect = anim.ClientToScreen(new Rectangle(0, 0, anim.ClientRect.Width, anim.ClientRect.Height));
+
Display.PushClipRect(clipRect);
return true;
}
- private void DrawComponentContents(Container window)
+ private void DrawComponentContents(WidgetAnimator anim)
{
- var style = mAdapter.GetStyle(window);
bool clipping = false;
try
{
- clipping = PushClipRect(style);
+ clipping = PushClipRect(anim);
- foreach (var control in window.Children)
+ foreach (var child in anim.Children)
{
- if (control is Container)
- DrawComponent((Container)control);
- else
- DrawComponentStyle(control);
+ DrawComponent(child);
}
}
finally
@@ -118,27 +203,27 @@
}
}
- private void DrawComponentStyle(Widget control)
+ private void DrawComponentStyle(WidgetAnimator anim)
{
- CssStyle style = mAdapter.GetStyle(control);
+ CssStyle style = anim.Style;
- mAdapter.SetFont(control);
+ mAdapter.SetFont(anim.Widget);
- if (control is ITextAlignment)
+ if (anim.Widget is ITextAlignment)
{
- ITextAlignment txa = (ITextAlignment)control;
+ ITextAlignment txa = (ITextAlignment)anim.Widget;
txa.TextAlign = ConvertTextAlign(style.Data.Text.Align);
}
- if (style.Animator.Visible == false)
+ if (anim.Visible == false)
return;
- DrawBackground(style);
- DrawBorder(style);
+ DrawBackground(anim);
+ DrawBorder(anim);
SetFontProperties(style);
- control.DrawImpl();
+ anim.Widget.DrawImpl(anim.ClientToScreen(new Rectangle(Point.Empty, anim.ClientRect.Size)));
}
private OriginAlignment ConvertTextAlign(CssTextAlign cssTextAlign)
@@ -161,33 +246,34 @@
style.Widget.FontColor = style.Data.Font.Color;
}
- private void DrawBackground(CssStyle style)
+ private void DrawBackground(WidgetAnimator anim)
{
Rectangle clipRect;
- var control = style.Widget;
+ var style = anim.Style;
+ var control = anim.Widget;
switch (style.Data.Background.Clip)
{
case CssBackgroundClip.Content_Box:
- clipRect = control.ClientRect;
+ clipRect = anim.ClientRect;
break;
case CssBackgroundClip.Padding_Box:
clipRect = Rectangle.FromLTRB(
- control.WidgetRect.Left + style.BoxModel.Border.Left,
- control.WidgetRect.Top + style.BoxModel.Border.Top,
- control.WidgetRect.Right + style.BoxModel.Border.Right,
- control.WidgetRect.Bottom + style.BoxModel.Border.Bottom);
+ anim.WidgetRect.Left + style.BoxModel.Border.Left,
+ anim.WidgetRect.Top + style.BoxModel.Border.Top,
+ anim.WidgetRect.Right + style.BoxModel.Border.Right,
+ anim.WidgetRect.Bottom + style.BoxModel.Border.Bottom);
break;
case CssBackgroundClip.Border_Box:
default:
- clipRect = control.WidgetRect;
+ clipRect = anim.WidgetRect;
break;
}
- clipRect = control.Parent.ClientToScreen(clipRect);
+ clipRect = anim.ParentCoordinateSystem.ClientToScreen(clipRect);
if (style.Data.Background.Color.A > 0)
{
@@ -354,9 +440,11 @@
frameSurface.Draw(src, dest);
}
- private void DrawBorder(CssStyle style)
+ private void DrawBorder(WidgetAnimator anim)
{
- Rectangle borderRect = style.Widget.Parent.ClientToScreen(style.Widget.WidgetRect);
+ Rectangle borderRect = anim.ParentCoordinateSystem.ClientToScreen(
+ anim.WidgetRect);
+ var style = anim.Style;
var border = style.Data.Border;
Modified: trunk/AgateLib/UserInterface/Css/Rendering/Transitions/IWidgetTransition.cs
==============================================================...
[truncated message content] |
|
From: <ka...@us...> - 2014-09-21 23:27:28
|
Revision: 1528
http://sourceforge.net/p/agate/code/1528
Author: kanato
Date: 2014-09-21 23:27:19 +0000 (Sun, 21 Sep 2014)
Log Message:
-----------
Add manual layout option to GUI.
Modified Paths:
--------------
trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs
trunk/AgateLib/UserInterface/Widgets/Container.cs
trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs
Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-09-17 13:48:09 UTC (rev 1527)
+++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-09-21 23:27:19 UTC (rev 1528)
@@ -150,6 +150,7 @@
}
}
+ Rectangle originalContainerClient = container.ClientRect;
Rectangle containerClientRect = container.ClientRect;
containerClientRect.X = 0;
containerClientRect.Y = 0;
@@ -164,7 +165,6 @@
int bottom = 0;
containerClientRect.Width = maxWidth;
-
int? fixedContainerWidth = ConvertDistance(container, containerStyle.Data.PositionData.Width, true);
int? fixedContainerHeight = ConvertDistance(container, containerStyle.Data.PositionData.Height, true);
if (fixedContainerWidth != null)
@@ -175,10 +175,18 @@
if (container is Desktop == false)
container.ClientRect = containerClientRect;
+ if (container.ManualLayout)
+ {
+ containerClientRect.Size = originalContainerClient.Size;
+ fixedContainerWidth = originalContainerClient.Width;
+ fixedContainerHeight = originalContainerClient.Height;
+ }
+
foreach (var child in container.Children)
{
var style = mAdapter.GetStyle(child);
child.Font = style.Font;
+ Rectangle originalClient = child.ClientRect;
if (child.Visible == false)
continue;
@@ -186,6 +194,7 @@
continue;
var sz = ComputeSize(child, containerStyle, forceRefresh);
+
var box = style.BoxModel;
int? fixedWidth = ConvertDistance(child, style.Data.PositionData.Width, true);
int? fixedHeight = ConvertDistance(child, style.Data.PositionData.Height, false);
@@ -199,6 +208,7 @@
if (minWidth != null && sz.Width < (int)minWidth) sz.Width = (int)minWidth;
if (minHeight != null && sz.Height < (int)minHeight) sz.Height = (int)minHeight;
+
bool resetPosition = false;
switch (containerStyle.Data.Layout.Kind)
@@ -285,6 +295,12 @@
bottom = Math.Max(bottom, clientRect.Y + clientRect.Height + box.Bottom); // only add box.Bottom here, because box.Top is taken into account in child.Y.
}
+ if (container.ManualLayout)
+ {
+ clientRect = originalClient;
+ style.IncludeInLayout = false;
+ }
+
style.Widget.ClientRect = clientRect;
}
Modified: trunk/AgateLib/UserInterface/Widgets/Container.cs
===================================================================
--- trunk/AgateLib/UserInterface/Widgets/Container.cs 2014-09-17 13:48:09 UTC (rev 1527)
+++ trunk/AgateLib/UserInterface/Widgets/Container.cs 2014-09-21 23:27:19 UTC (rev 1528)
@@ -185,5 +185,13 @@
{
throw new NotImplementedException();
}
+
+
+ /// <summary>
+ /// If this is set to true, then the layout engine will not determine the
+ /// size of this control, or the size or positions of any child controls.
+ /// Grandchildren of this control will have layout performed as normal.
+ /// </summary>
+ public bool ManualLayout { get; set; }
}
}
Modified: trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs
===================================================================
--- trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs 2014-09-17 13:48:09 UTC (rev 1527)
+++ trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs 2014-09-21 23:27:19 UTC (rev 1528)
@@ -71,11 +71,38 @@
engine.UpdateLayout(gui, new Size(1000, 1000));
}
+
[TestMethod]
+ public void CssLManualLayout()
+ {
+ Window wind = new Window();
+ wind.ManualLayout = true;
+ wind.ClientRect = new Rectangle(40, 40, 500, 600);
+
+ Menu menu = new Menu();
+ menu.ClientRect = new Rectangle(30, 50, 100, 300);
+ menu.Children.Add(MenuItem.OfLabel("Menu 1"));
+ menu.Children.Add(MenuItem.OfLabel("Menu 2"));
+
+ wind.Children.Add(menu);
+
+ gui.AddWindow(wind);
+
+ RedoLayout();
+
+ Assert.AreEqual(new Rectangle(14, 14, 500, 600), wind.ClientRect);
+ Assert.AreEqual(new Rectangle(30, 50, 100, 300), menu.ClientRect);
+
+ Assert.AreEqual(new Rectangle(0, 0, 52, 8), menu.Children[0].ClientRect);
+ Assert.AreEqual(new Rectangle(0, 8, 52, 8), menu.Children[1].ClientRect);
+ }
+
+ [TestMethod]
public void CssLBoxModel()
{
- CssDocument doc = CssDocument.FromText("window { border: 5px solid black; padding: 10px; margin: 20px; }");
- CssAdapter adapter = new CssAdapter(doc);
+ doc.Clear();
+ doc.Parse("window { border: 5px solid black; padding: 10px; margin: 20px; }");
+
Window wind = new Window();
var style = adapter.GetStyle(wind);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-22 00:58:21
|
Revision: 1529
http://sourceforge.net/p/agate/code/1529
Author: kanato
Date: 2014-09-22 00:58:07 +0000 (Mon, 22 Sep 2014)
Log Message:
-----------
Fixes to layout.
Modified Paths:
--------------
trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs
trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs
trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs
trunk/AgateLib/UserInterface/Widgets/Label.cs
trunk/AgateLib/UserInterface/Widgets/Menu.cs
trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs
Modified: trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs 2014-09-21 23:27:19 UTC (rev 1528)
+++ trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs 2014-09-22 00:58:07 UTC (rev 1529)
@@ -1,4 +1,5 @@
-// The contents of this file are subject to the Mozilla Public License
+using AgateLib.Diagnostics;
+// 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/
@@ -38,7 +39,17 @@
if (targetType == typeof(CssDistance))
return CssDistance.FromString(value);
if (targetType.GetTypeInfo().IsEnum)
- return Enum.Parse(targetType, value.Replace("-", "_"), true);
+ {
+ try
+ {
+ return Enum.Parse(targetType, value.Replace("-", "_"), true);
+ }
+ catch
+ {
+ Log.WriteLine("Failed to parse {0}: {1}", targetType.Name, value);
+ return 0;
+ }
+ }
throw new NotImplementedException();
}
Modified: trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs 2014-09-21 23:27:19 UTC (rev 1528)
+++ trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs 2014-09-22 00:58:07 UTC (rev 1529)
@@ -52,6 +52,8 @@
if (string.IsNullOrWhiteSpace(value))
return new CssDistance(true);
+ if (value == "none")
+ return new CssDistance { Amount = 0, Automatic = false, DistanceUnit = DistanceUnit.Pixels };
if (value.Equals("auto", StringComparison.OrdinalIgnoreCase))
{
Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-09-21 23:27:19 UTC (rev 1528)
+++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-09-22 00:58:07 UTC (rev 1529)
@@ -155,21 +155,22 @@
containerClientRect.X = 0;
containerClientRect.Y = 0;
- int maxWidth = ComputeMaxWidthForContainer(containerStyle);
+ int maxContWidth = ComputeMaxWidthForContainer(containerStyle);
Point nextPos = Point.Empty;
- int maxHeight = 0;
+ int largestHeight = 0;
- maxWidth -= containerBox.Left + containerBox.Right;
+ maxContWidth -= containerBox.Left + containerBox.Right;
int largestWidth = 0;
int bottom = 0;
- containerClientRect.Width = maxWidth;
int? fixedContainerWidth = ConvertDistance(container, containerStyle.Data.PositionData.Width, true);
int? fixedContainerHeight = ConvertDistance(container, containerStyle.Data.PositionData.Height, true);
if (fixedContainerWidth != null)
- maxWidth = (int)fixedContainerWidth;
+ maxContWidth = (int)fixedContainerWidth;
+ containerClientRect.Width = maxContWidth;
+
bool resetNextPosition = false;
if (container is Desktop == false)
@@ -193,7 +194,30 @@
if (style.Data.Display == CssDisplay.None)
continue;
- var sz = ComputeSize(child, containerStyle, forceRefresh);
+ style.IncludeInLayout = true;
+
+ switch (style.Data.Position)
+ {
+ case CssPosition.Absolute:
+ style.IncludeInLayout = false;
+ child.ParentCoordinateSystem = TopLevelWidget(child, x => mAdapter.GetStyle(x).Data.Position != CssPosition.Static);
+ break;
+
+ case CssPosition.Fixed:
+ style.IncludeInLayout = false;
+ child.ParentCoordinateSystem = TopLevelWidget(child, x => x is Desktop);
+ break;
+ }
+
+ int? maxWidth = ConvertDistance(child, style.Data.PositionData.MaxWidth, true, true);
+ int? maxHeight = ConvertDistance(child, style.Data.PositionData.MaxHeight, true, true);
+
+ if(style.IncludeInLayout)
+ {
+ maxWidth = maxContWidth - nextPos.X;
+ }
+
+ var sz = ComputeSize(child, containerStyle, forceRefresh, maxWidth, maxHeight);
var box = style.BoxModel;
int? fixedWidth = ConvertDistance(child, style.Data.PositionData.Width, true);
@@ -225,37 +249,23 @@
resetNextPosition = true;
}
- if (nextPos.X + sz.Width + style.BoxModel.Left + style.BoxModel.Right > maxWidth)
+ if (nextPos.X + sz.Width + style.BoxModel.Left + style.BoxModel.Right > maxContWidth)
resetPosition = true;
if (resetPosition)
{
nextPos.X = 0;
- nextPos.Y += maxHeight;
- maxHeight = 0;
+ nextPos.Y += largestHeight;
+ largestHeight = 0;
}
break;
}
- style.IncludeInLayout = true;
-
Rectangle clientRect = new Rectangle();
clientRect.Size = sz;
- switch (style.Data.Position)
- {
- case CssPosition.Absolute:
- style.IncludeInLayout = false;
- child.ParentCoordinateSystem = TopLevelWidget(child, x => mAdapter.GetStyle(x).Data.Position != CssPosition.Static);
- break;
- case CssPosition.Fixed:
- style.IncludeInLayout = false;
- child.ParentCoordinateSystem = TopLevelWidget(child, x => x is Desktop);
- break;
- }
-
if (style.IncludeInLayout)
{
clientRect.X = nextPos.X + box.Left;
@@ -291,7 +301,7 @@
break;
}
- maxHeight = Math.Max(maxHeight, clientRect.Height + box.Top + box.Bottom);
+ largestHeight = Math.Max(largestHeight, clientRect.Height + box.Top + box.Bottom);
bottom = Math.Max(bottom, clientRect.Y + clientRect.Height + box.Bottom); // only add box.Bottom here, because box.Top is taken into account in child.Y.
}
@@ -304,7 +314,7 @@
style.Widget.ClientRect = clientRect;
}
- containerClientRect.Width = Math.Min(largestWidth, maxWidth);
+ containerClientRect.Width = Math.Min(largestWidth, maxContWidth);
containerClientRect.Height = bottom;
if (fixedContainerWidth != null)
@@ -387,11 +397,11 @@
}
}
- private Size ComputeSize(Widget control, CssStyle parentStyle, bool forceRefresh)
+ private Size ComputeSize(Widget control, CssStyle parentStyle, bool forceRefresh, int? maxWidth, int? maxHeight)
{
- return ComputeSize(control, parentStyle.Data, forceRefresh);
+ return ComputeSize(control, parentStyle.Data, forceRefresh, maxWidth, maxHeight);
}
- private Size ComputeSize(Widget control, CssStyleData parentStyle, bool forceRefresh)
+ private Size ComputeSize(Widget control, CssStyleData parentStyle, bool forceRefresh, int? maxWidth, int? maxHeight)
{
if (control is Container)
return ComputeContainerSize((Container)control, forceRefresh);
@@ -399,11 +409,20 @@
mAdapter.SetFont(control);
var style = mAdapter.GetStyle(control);
- return control.ComputeSize(
- ConvertDistance(control, style.Data.PositionData.MinWidth, true),
- ConvertDistance(control, style.Data.PositionData.MinHeight, false),
- ConvertDistance(control, style.Data.PositionData.MaxWidth, true),
- ConvertDistance(control, style.Data.PositionData.MaxHeight, false));
+ int? minWidth = ConvertDistance(control, style.Data.PositionData.MinWidth, true);
+ int? minHeight = ConvertDistance(control, style.Data.PositionData.MinHeight, false);
+ int? styleMaxWidth = ConvertDistance(control, style.Data.PositionData.MaxWidth, true);
+ int? styleMaxHeight = ConvertDistance(control, style.Data.PositionData.MaxHeight, false);
+
+ if (maxWidth == null) maxWidth = styleMaxWidth;
+ else if (maxWidth != null && styleMaxWidth != null)
+ maxWidth = Math.Min(maxWidth.Value, styleMaxWidth.Value);
+
+ if (maxHeight == null) maxHeight = styleMaxHeight;
+ else if (maxHeight != null && styleMaxHeight != null)
+ maxWidth = Math.Min(maxHeight.Value, styleMaxHeight.Value);
+
+ return control.ComputeSize(minWidth, minHeight, maxWidth, maxHeight);
}
private int? ConvertDistance(Widget control, CssDistance cssDistance, bool width, bool autoIsNull = true)
Modified: trunk/AgateLib/UserInterface/Widgets/Label.cs
===================================================================
--- trunk/AgateLib/UserInterface/Widgets/Label.cs 2014-09-21 23:27:19 UTC (rev 1528)
+++ trunk/AgateLib/UserInterface/Widgets/Label.cs 2014-09-22 00:58:07 UTC (rev 1529)
@@ -34,6 +34,18 @@
double mSlowReadTime;
const double mSlowReadTextPeriod = 0.05;
+
+ public Label()
+ {
+ TextAlign = OriginAlignment.TopLeft;
+ WrapText = true;
+ }
+ public Label(string text)
+ : this()
+ {
+ this.Text = text;
+ }
+
public string Text
{
get { return mText; }
@@ -96,7 +108,7 @@
string text = mText.Substring(lineStart, length);
int width = Font.MeasureString(text).Width;
- if (width > this.Width)
+ if (width > maxWidth)
{
lineStart = spacePositions[i - 1] + 1;
mWrapPositions.Add(lineStart);
@@ -108,18 +120,33 @@
}
int WrappedHeight
{
- get { return (mWrapPositions.Count + 1) * Font.FontHeight; }
+ get { return mWrapPositions.Count * Font.FontHeight; }
}
+ int WrappedWidth
+ {
+ get
+ {
+ int lastPos = 0;
+ int largestWidth = 0;
- public Label()
- {
- TextAlign = OriginAlignment.TopLeft;
+ for(int i = 0; i <= mWrapPositions.Count; i++)
+ {
+ string text;
+
+ if (i == mWrapPositions.Count)
+ text = mText.Substring(lastPos);
+ else
+ {
+ text = mText.Substring(lastPos, mWrapPositions[i] - lastPos);
+ lastPos = mWrapPositions[i];
+ }
+
+ largestWidth = Math.Max(largestWidth, Font.MeasureString(text).Width);
+ }
+
+ return largestWidth;
+ }
}
- public Label(string text)
- : this()
- {
- this.Text = text;
- }
public override void Update(double delta_t, ref bool processInput)
{
@@ -256,12 +283,17 @@
internal override Size ComputeSize(int? minWidth, int? minHeight, int? maxWidth, int? maxHeight)
{
+ if (WrapText == false)
+ {
+ return Font.MeasureString(Text);
+ }
+
if (maxWidth != null)
{
RewrapText(maxWidth.Value);
if (mWrapPositions.Count > 0)
- return new Size(maxWidth.Value, WrappedHeight);
+ return new Size(WrappedWidth, WrappedHeight);
}
var retval = Font.MeasureString(Text);
Modified: trunk/AgateLib/UserInterface/Widgets/Menu.cs
===================================================================
--- trunk/AgateLib/UserInterface/Widgets/Menu.cs 2014-09-21 23:27:19 UTC (rev 1528)
+++ trunk/AgateLib/UserInterface/Widgets/Menu.cs 2014-09-22 00:58:07 UTC (rev 1529)
@@ -504,6 +504,9 @@
}
protected internal override void OnGestureChange(Gesture gesture)
{
+ if (mGestureItem == null)
+ return;
+
switch(gesture.GestureType)
{
case GestureType.Touch:
Modified: trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs
===================================================================
--- trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs 2014-09-21 23:27:19 UTC (rev 1528)
+++ trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs 2014-09-22 00:58:07 UTC (rev 1529)
@@ -125,7 +125,7 @@
Assert.AreEqual(new Point(14, 14), wind.ClientRect.Location);
Assert.AreEqual(new Point(18, 14), wind.Children[0].ClientToScreen(Point.Empty));
- Assert.AreEqual(new Point(18, 14 + fh), wind.Children[1].ClientToScreen(Point.Empty));
+ Assert.AreEqual(new Point(18, 22), wind.Children[1].ClientToScreen(Point.Empty));
}
[TestMethod]
@@ -474,5 +474,22 @@
Assert.AreEqual(new Point(18, 18), label1.ClientToScreen(Point.Empty));
}
+
+ [TestMethod]
+ public void CssLTextWrapping()
+ {
+ doc.Clear();
+ doc.Parse(@"window { max-width: 50px; }");
+
+ Window wind = new Window();
+ Label lbl = new Label("This is a test label with lots of text.");
+
+ wind.Children.Add(lbl);
+ gui.AddWindow(wind);
+
+ RedoLayout();
+
+ Assert.AreEqual(new Rectangle(0, 0, 48, 64), lbl.ClientRect);
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-23 01:38:47
|
Revision: 1530
http://sourceforge.net/p/agate/code/1530
Author: kanato
Date: 2014-09-23 01:38:42 +0000 (Tue, 23 Sep 2014)
Log Message:
-----------
Minor fixes. Add Deselect event to MenuItem.
Modified Paths:
--------------
trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs
trunk/AgateLib/UserInterface/Widgets/Menu.cs
trunk/AgateLib/UserInterface/Widgets/MenuItem.cs
trunk/AgateLib.OpenGL/ContextFB.cs
trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs
Modified: trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-09-22 00:58:07 UTC (rev 1529)
+++ trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-09-23 01:38:42 UTC (rev 1530)
@@ -81,7 +81,7 @@
public WidgetAnimator GetAnimator(Widget widget)
{
- return mAnimators[widget];
+ return GetOrCreateAnimator(widget);
}
WidgetAnimator GetOrCreateAnimator(Widget widget)
{
@@ -90,7 +90,7 @@
mAnimators.Add(widget, new WidgetAnimator(mAdapter.GetStyle(widget)));
}
- return GetAnimator(widget);
+ return mAnimators[widget];
}
Modified: trunk/AgateLib/UserInterface/Widgets/Menu.cs
===================================================================
--- trunk/AgateLib/UserInterface/Widgets/Menu.cs 2014-09-22 00:58:07 UTC (rev 1529)
+++ trunk/AgateLib/UserInterface/Widgets/Menu.cs 2014-09-23 01:38:42 UTC (rev 1530)
@@ -461,8 +461,6 @@
mScrollRow++;
}
}
-
- SelectedItem.OnSelect();
}
private void UpdateSelectedItem()
Modified: trunk/AgateLib/UserInterface/Widgets/MenuItem.cs
===================================================================
--- trunk/AgateLib/UserInterface/Widgets/MenuItem.cs 2014-09-22 00:58:07 UTC (rev 1529)
+++ trunk/AgateLib/UserInterface/Widgets/MenuItem.cs 2014-09-23 01:38:42 UTC (rev 1530)
@@ -26,6 +26,8 @@
{
public class MenuItem : Container
{
+ bool mSelected;
+
public MenuItem()
{
Children.WidgetAdded += Children_WidgetAdded;
@@ -80,12 +82,28 @@
get { return (Menu)Parent; }
}
- public bool Selected { get; set; }
+ public bool Selected
+ {
+ get { return mSelected; }
+ set
+ {
+ if (value == mSelected)
+ return;
+ mSelected = value;
+
+ if (mSelected)
+ OnSelect();
+ else
+ OnDeselect();
+ }
+ }
+
public event EventHandler PressAccept;
public event EventHandler PressToggle;
public event EventHandler PressMenu;
public event EventHandler Select;
+ public event EventHandler Deselect;
public event EventHandler Discard;
void Children_WidgetAdded(object sender, WidgetEventArgs e)
@@ -187,6 +205,12 @@
if (Select != null)
Select(this, EventArgs.Empty);
}
+ void OnDeselect()
+ {
+ if (Deselect != null)
+ Deselect(this, EventArgs.Empty);
+ }
+
internal void OnPressAccept()
{
if (PressAccept != null)
Modified: trunk/AgateLib.OpenGL/ContextFB.cs
===================================================================
--- trunk/AgateLib.OpenGL/ContextFB.cs 2014-09-22 00:58:07 UTC (rev 1529)
+++ trunk/AgateLib.OpenGL/ContextFB.cs 2014-09-23 01:38:42 UTC (rev 1530)
@@ -37,6 +37,7 @@
IWindowInfo mWindowInfo;
Size mSize;
AgateLib.DisplayLib.DisplayWindow mAttachedWindow;
+ bool mIsDisposed;
public ContextFB(AgateLib.DisplayLib.DisplayWindow attachedWindow,
GraphicsMode graphicsMode, IWindowInfo window, Size size,
@@ -60,6 +61,8 @@
public void CreateContextForThread()
{
+ if (IsDisposed)
+ throw new InvalidOperationException("Cannot create a context for a framebuffer which is disposed.");
if (mContexts.ContainsKey(Thread.CurrentThread))
return;
@@ -73,6 +76,8 @@
context.ToString(), Thread.CurrentThread.ManagedThreadId));
}
+ public bool IsDisposed { get { return mIsDisposed; } }
+
GraphicsContext CurrentContext
{
get
@@ -85,6 +90,16 @@
}
public override void Dispose()
{
+ if (mIsDisposed)
+ return;
+
+ foreach(var context in mContexts.Values)
+ {
+ context.Dispose();
+ }
+
+ mContexts.Clear();
+ mIsDisposed = true;
}
public override AgateLib.Geometry.Size Size
@@ -95,6 +110,9 @@
public void SetSize(Size size)
{
mSize = size;
+
+ foreach (var context in mContexts.Values)
+ context.Update(mWindowInfo);
}
public override AgateLib.DisplayLib.DisplayWindow AttachedWindow
Modified: trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs 2014-09-22 00:58:07 UTC (rev 1529)
+++ trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs 2014-09-23 01:38:42 UTC (rev 1530)
@@ -49,7 +49,6 @@
DisplayWindow mOwner;
Form frm;
Control mRenderTarget;
- IGraphicsContext mContext;
IWindowInfo mWindowInfo;
DesktopGLDisplay mDisplay;
@@ -132,11 +131,8 @@
DetachEvents();
Form oldForm = frm;
- IGraphicsContext oldcontext = mContext;
IWindowInfo oldWindowInfo = mWindowInfo;
- mContext = null;
-
frm = new frmFullScreen();
frm.Show();
@@ -162,7 +158,6 @@
mIsFullScreen = true;
if (oldWindowInfo != null) oldWindowInfo.Dispose();
- if (oldcontext != null) oldcontext.Dispose();
if (oldForm != null) oldForm.Dispose();
Core.IsActive = true;
@@ -173,10 +168,8 @@
DetachEvents();
Form oldForm = frm;
- IGraphicsContext oldcontext = mContext;
IWindowInfo oldWindowInfo = mWindowInfo;
- mContext = null;
mIsFullScreen = false;
Form myform;
@@ -201,7 +194,6 @@
AttachEvents();
if (oldWindowInfo != null) oldWindowInfo.Dispose();
- if (oldcontext != null) oldcontext.Dispose();
if (oldForm != null) oldForm.Dispose();
Core.IsActive = true;
@@ -365,12 +357,6 @@
mFrameBuffer = null;
}
- if (mContext != null)
- {
- mContext.Dispose();
- mContext = null;
- }
-
if (frm != null)
{
frm.Close();
@@ -463,7 +449,6 @@
}
void mRenderTarget_Resize(object sender, EventArgs e)
{
- mContext.Update(mWindowInfo);
mFrameBuffer.SetSize(new Size(mRenderTarget.Width, mRenderTarget.Height));
OnResize();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-09-28 16:31:00
|
Revision: 1531
http://sourceforge.net/p/agate/code/1531
Author: kanato
Date: 2014-09-28 16:30:47 +0000 (Sun, 28 Sep 2014)
Log Message:
-----------
Fix coordinate system transform for legacy mouse events.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
trunk/AgateLib/InputLib/Legacy/LegacyInputHandler.cs
trunk/AgateLib/InputLib/Legacy/Mouse.cs
trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj
trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
Added Paths:
-----------
trunk/AgateLib/packages.config
trunk/AgateLib.AgateSDL/packages.config
trunk/AgateLib.OpenGL/packages.config
trunk/AgateLib.Platform.WinForms/packages.config
Removed Paths:
-------------
trunk/AgateLib/packages.config
trunk/AgateLib.AgateSDL/packages.config
trunk/AgateLib.OpenGL/packages.config
trunk/AgateLib.Platform.WinForms/packages.config
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-09-28 16:30:47 UTC (rev 1531)
@@ -91,7 +91,7 @@
[Obsolete("This is probably obsolete.")]
protected void SetInternalMousePosition(AgateLib.Geometry.Point pt)
{
- AgateLib.InputLib.Legacy.Mouse.SetStoredPosition(pt);
+ AgateLib.InputLib.Legacy.Mouse.SetStoredPosition(PixelToLogicalCoords(pt));
}
/// <summary>
Modified: trunk/AgateLib/InputLib/Legacy/LegacyInputHandler.cs
===================================================================
--- trunk/AgateLib/InputLib/Legacy/LegacyInputHandler.cs 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib/InputLib/Legacy/LegacyInputHandler.cs 2014-09-28 16:30:47 UTC (rev 1531)
@@ -13,10 +13,22 @@
{
case InputEventType.KeyDown: Keyboard.OnKeyDown(args); break;
case InputEventType.KeyUp: Keyboard.OnKeyUp(args); break;
- case InputEventType.MouseDown: Mouse.OnMouseDown(args); break;
- case InputEventType.MouseUp: Mouse.OnMouseUp(args); break;
- case InputEventType.MouseWheel: Mouse.OnMouseWheel(args); break;
- case InputEventType.MouseMove: Mouse.OnMouseMove(args); break;
+ case InputEventType.MouseDown:
+ Mouse.Position = args.MousePosition;
+ Mouse.OnMouseDown(args);
+ break;
+ case InputEventType.MouseUp:
+ Mouse.Position = args.MousePosition;
+ Mouse.OnMouseUp(args);
+ break;
+ case InputEventType.MouseWheel:
+ Mouse.Position = args.MousePosition;
+ Mouse.OnMouseWheel(args);
+ break;
+ case InputEventType.MouseMove:
+ Mouse.Position = args.MousePosition;
+ Mouse.OnMouseMove(args);
+ break;
}
}
Modified: trunk/AgateLib/InputLib/Legacy/Mouse.cs
===================================================================
--- trunk/AgateLib/InputLib/Legacy/Mouse.cs 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib/InputLib/Legacy/Mouse.cs 2014-09-28 16:30:47 UTC (rev 1531)
@@ -61,7 +61,7 @@
{
return mMouseButtons[(int)id];
}
- set
+ internal set
{
if (id == MouseButton.None)
{
Deleted: trunk/AgateLib/packages.config
===================================================================
--- trunk/AgateLib/packages.config 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib/packages.config 2014-09-28 16:30:47 UTC (rev 1531)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net35" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib/packages.config
===================================================================
--- trunk/AgateLib/packages.config (rev 0)
+++ trunk/AgateLib/packages.config 2014-09-28 16:30:47 UTC (rev 1531)
@@ -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+MonoAndroid10+MonoTouch10" />
+</packages>
\ No newline at end of file
Deleted: trunk/AgateLib.AgateSDL/packages.config
===================================================================
--- trunk/AgateLib.AgateSDL/packages.config 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib.AgateSDL/packages.config 2014-09-28 16:30:47 UTC (rev 1531)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net35" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib.AgateSDL/packages.config
===================================================================
--- trunk/AgateLib.AgateSDL/packages.config (rev 0)
+++ trunk/AgateLib.AgateSDL/packages.config 2014-09-28 16:30:47 UTC (rev 1531)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net45" />
+</packages>
\ No newline at end of file
Modified: trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj
===================================================================
--- trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj 2014-09-28 16:30:47 UTC (rev 1531)
@@ -79,7 +79,7 @@
<ItemGroup>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath>
+ <HintPath>..\..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -140,9 +140,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <None Include="packages.config">
- <SubType>Designer</SubType>
- </None>
+ <None Include="packages.config" />
<None Include="Resources\Basic2D_pixel.txt" />
</ItemGroup>
<ItemGroup>
Deleted: trunk/AgateLib.OpenGL/packages.config
===================================================================
--- trunk/AgateLib.OpenGL/packages.config 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib.OpenGL/packages.config 2014-09-28 16:30:47 UTC (rev 1531)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net35" />
- <package id="OpenTK" version="1.1.1589.5942" targetFramework="net45" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib.OpenGL/packages.config
===================================================================
--- trunk/AgateLib.OpenGL/packages.config (rev 0)
+++ trunk/AgateLib.OpenGL/packages.config 2014-09-28 16:30:47 UTC (rev 1531)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net45" />
+ <package id="OpenTK" version="1.1.1589.5942" targetFramework="net45" />
+</packages>
\ No newline at end of file
Modified: trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-09-28 16:30:47 UTC (rev 1531)
@@ -79,7 +79,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK">
- <HintPath>..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath>
+ <HintPath>..\..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Deleted: trunk/AgateLib.Platform.WinForms/packages.config
===================================================================
--- trunk/AgateLib.Platform.WinForms/packages.config 2014-09-23 01:38:42 UTC (rev 1530)
+++ trunk/AgateLib.Platform.WinForms/packages.config 2014-09-28 16:30:47 UTC (rev 1531)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net35" />
- <package id="OpenTK" version="1.1.1589.5942" targetFramework="net45" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib.Platform.WinForms/packages.config
===================================================================
--- trunk/AgateLib.Platform.WinForms/packages.config (rev 0)
+++ trunk/AgateLib.Platform.WinForms/packages.config 2014-09-28 16:30:47 UTC (rev 1531)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net45" />
+ <package id="OpenTK" version="1.1.1589.5942" targetFramework="net45" />
+</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-09-30 00:42:12
|
Revision: 1532
http://sourceforge.net/p/agate/code/1532
Author: kanato
Date: 2014-09-30 00:42:08 +0000 (Tue, 30 Sep 2014)
Log Message:
-----------
Some refactorings.
Modified Paths:
--------------
trunk/AgateLib/Algorithms/PathFinding/AStar.cs
trunk/AgateLib/ApplicationModels/Scene.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/Font.cs
trunk/AgateLib/DisplayLib/IDrawable.cs
trunk/AgateLib/DisplayLib/ISurface.cs
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/BasicSprite.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ClipRect.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ColorTest.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/Interpolation.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ParticleTests.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/RotatingSpriteTester.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/Builtin.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/TextLayout.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/Resources.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/BasicGuiTest.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/TransitionTest.cs
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/LargeImage.cs
trunk/AgateLib.Tests/Tests.WinForms/InputTests/InputStateTester.cs
trunk/AgateLib.Tests/Tests.WinForms/WinFormsTests/Converters.cs
Modified: trunk/AgateLib/Algorithms/PathFinding/AStar.cs
===================================================================
--- trunk/AgateLib/Algorithms/PathFinding/AStar.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib/Algorithms/PathFinding/AStar.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -38,7 +38,7 @@
: this(map, (x, y) => x.Equals(y))
{ }
public AStar(IAStarMap<T> map, IEqualityComparer<T> comparer)
- : this(map, (x, y) => comparer.Equals(x, y))
+ : this(map, comparer.Equals)
{ }
public AStar(IAStarMap<T> map, Func<T, T, bool> comparison)
{
Modified: trunk/AgateLib/ApplicationModels/Scene.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/Scene.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib/ApplicationModels/Scene.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -19,7 +19,7 @@
protected internal virtual void OnSceneEnd()
{ }
- public abstract void Update(double delta_t);
+ public abstract void Update(double deltaT);
public abstract void Draw();
}
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib/Core.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -346,7 +346,7 @@
DefaultResources res = new DefaultResources();
var task = mFactory.DisplayFactory.InitializeDefaultResourcesAsync(res);
- Assets.Fonts.Initialize(res);
+ Fonts.Initialize(res);
Task.WaitAll(task);
}
Modified: trunk/AgateLib/DisplayLib/Font.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Font.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib/DisplayLib/Font.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -56,7 +56,7 @@
int MaxSize(FontStyles style)
{
var keys = mFontSurfaces.Keys.Where(x => x.Style == style);
- if (keys.Count() > 0)
+ if (keys.Any())
return keys.Max(x => x.Size);
else
return -1;
Modified: trunk/AgateLib/DisplayLib/IDrawable.cs
===================================================================
--- trunk/AgateLib/DisplayLib/IDrawable.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib/DisplayLib/IDrawable.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -7,9 +7,15 @@
namespace AgateLib.DisplayLib
{
public interface IDrawable
- {
- void Draw(Point point);
-
+ {
+ /// <summary>
+ /// Draws the surface at the specified point.
+ /// </summary>
+ /// <param name="destPt"></param>
+ void Draw(Point destPt);
+ /// <summary>
+ /// Gets or sets the display size of the surface, in pixels.
+ /// </summary>
Size DisplaySize { get; set; }
}
}
Modified: trunk/AgateLib/DisplayLib/ISurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ISurface.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib/DisplayLib/ISurface.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -49,10 +49,6 @@
/// </summary>
int DisplayHeight { get; set; }
/// <summary>
- /// Gets or sets the display size of the surface, in pixels.
- /// </summary>
- Size DisplaySize { get; set; }
- /// <summary>
/// Gets or sets the display width of the surface, in pixels.
/// </summary>
int DisplayWidth { get; set; }
@@ -60,11 +56,6 @@
/// Draws the surface at the specified point.
/// </summary>
/// <param name="destPt"></param>
- void Draw(Point destPt);
- /// <summary>
- /// Draws the surface at the specified point.
- /// </summary>
- /// <param name="destPt"></param>
void Draw(PointF destPt);
/// <summary>
/// Draws the surface at the specified point.
Modified: trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -121,8 +121,6 @@
/// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param>
public void Write(string name, string value, bool asAttribute = false)
{
- if (value == null) value = "";
-
WriteImpl(name, value ?? string.Empty, asAttribute);
}
Modified: trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -81,7 +81,7 @@
if (windowParams.RenderToControl)
{
- if (typeof(Control).IsAssignableFrom(windowParams.RenderTarget.GetType()) == false)
+ if (windowParams.RenderTarget is Control == false)
throw new AgateException(string.Format("The specified render target is of type {0}, " +
"which does not derive from System.Windows.Forms.Control.", windowParams.RenderTarget.GetType().Name));
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/BasicSprite.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/BasicSprite.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/BasicSprite.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -36,9 +36,9 @@
p.Dispose();
}
- public override void Update(double time_ms)
+ public override void Update(double deltaT)
{
- p.Update(time_ms);
+ p.Update(deltaT);
}
public override void Draw()
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ClipRect.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ClipRect.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ClipRect.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -42,9 +42,9 @@
get { return this; }
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
- time += delta_t / 1000.0;
+ time += deltaT / 1000.0;
}
public override void Draw()
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ColorTest.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ColorTest.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ColorTest.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -21,7 +21,7 @@
get { return "Display"; }
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/Interpolation.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/Interpolation.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/Interpolation.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -47,7 +47,7 @@
surf2.Draw(500, 10);
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ParticleTests.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ParticleTests.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ParticleTests.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -86,19 +86,19 @@
gpm.SubscribeToEmitter(pe);
}
- public override void Update(double time_ms)
+ public override void Update(double deltaT)
{
gm2.Gravity = new Vector2((float)ran.Next(-300, 300), 0f);
fom.AlphaAmount = (float)ran.NextDouble() * 1.3f;
fom.LifeBarrier = (float)ran.NextDouble() * 5f;
- pe.Update(time_ms);
+ pe.Update(deltaT);
pe.EmitVelocity = new Vector2((float)ran.Next(-10, 10), 0f);
- sm.Update(time_ms);
+ sm.Update(deltaT);
- se.Update(time_ms);
+ se.Update(deltaT);
se.GetSpriteByKey(0).TimePerFrame = ran.NextDouble() * 3 + 1.5d;
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/RotatingSpriteTester.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/RotatingSpriteTester.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/RotatingSpriteTester.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -40,7 +40,7 @@
sp.RotationAngleDegrees = 90;
sp.SetScale(2, 2);
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
if (Keyboard.Keys[KeyCode.Escape])
SceneFinished = true;
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/Builtin.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/Builtin.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/Builtin.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -47,7 +47,7 @@
get { return this; }
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/TextLayout.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/TextLayout.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/TextLayout.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -57,7 +57,7 @@
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/Resources.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/Resources.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/FoundationTests/Resources.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -30,7 +30,7 @@
sprite.StartAnimation();
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
sprite.Update();
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/BasicGuiTest.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/BasicGuiTest.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/BasicGuiTest.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -37,7 +37,7 @@
gs = new GuiStuff();
gs.CreateGui();
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
gs.Update();
}
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/TransitionTest.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/TransitionTest.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/UserInterfaceTests/TransitionTest.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -49,7 +49,7 @@
}
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
gs.Update();
}
Modified: trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/LargeImage.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/LargeImage.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/LargeImage.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -15,21 +15,21 @@
public string Name { get { return "Large Image"; } }
public string Category { get { return "Display"; } }
- double loadTime;
- Surface someSurface;
+ Surface mSomeSurface;
+ private double mLoadTime;
protected override void OnSceneStart()
{
- System.Diagnostics.Stopwatch watch = new Stopwatch();
+ var watch = new Stopwatch();
watch.Start();
- someSurface = new Surface("largeimage.png");
- someSurface.LoadComplete += (sender, e) =>
+ mSomeSurface = new Surface("largeimage.png");
+ mSomeSurface.LoadComplete += (sender, e) =>
{
watch.Stop();
- double loadTime = watch.ElapsedMilliseconds / 1000.0;
+ mLoadTime = watch.ElapsedMilliseconds / 1000.0;
};
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
}
@@ -39,8 +39,8 @@
var font = AgateLib.Assets.Fonts.AgateSans;
font.Size = 24;
- someSurface.Draw();
- font.DrawText(0, 0, "Load took {0} seconds.", loadTime);
+ mSomeSurface.Draw();
+ font.DrawText(0, 0, "Load took {0} seconds.", mLoadTime);
}
public void ModifyModelParameters(SceneModelParameters parameters)
Modified: trunk/AgateLib.Tests/Tests.WinForms/InputTests/InputStateTester.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/InputTests/InputStateTester.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/Tests.WinForms/InputTests/InputStateTester.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -25,7 +25,7 @@
get { return this; }
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
}
Modified: trunk/AgateLib.Tests/Tests.WinForms/WinFormsTests/Converters.cs
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/WinFormsTests/Converters.cs 2014-09-28 16:30:47 UTC (rev 1531)
+++ trunk/AgateLib.Tests/Tests.WinForms/WinFormsTests/Converters.cs 2014-09-30 00:42:08 UTC (rev 1532)
@@ -41,7 +41,7 @@
get { return this; }
}
- public override void Update(double delta_t)
+ public override void Update(double deltaT)
{
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-10-11 00:30:38
|
Revision: 1535
http://sourceforge.net/p/agate/code/1535
Author: kanato
Date: 2014-10-11 00:30:23 +0000 (Sat, 11 Oct 2014)
Log Message:
-----------
Add writing files functionality.
Modified Paths:
--------------
trunk/AgateLib/Diagnostics/Log.cs
trunk/AgateLib/IO/IReadWriteFileProvider.cs
trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs
Modified: trunk/AgateLib/Diagnostics/Log.cs
===================================================================
--- trunk/AgateLib/Diagnostics/Log.cs 2014-10-11 00:24:39 UTC (rev 1534)
+++ trunk/AgateLib/Diagnostics/Log.cs 2014-10-11 00:30:23 UTC (rev 1535)
@@ -34,5 +34,13 @@
{
Debug.WriteLine(format, args);
}
+
+ public static void Indent()
+ {
+ }
+
+ public static void Unindent()
+ {
+ }
}
}
Modified: trunk/AgateLib/IO/IReadWriteFileProvider.cs
===================================================================
--- trunk/AgateLib/IO/IReadWriteFileProvider.cs 2014-10-11 00:24:39 UTC (rev 1534)
+++ trunk/AgateLib/IO/IReadWriteFileProvider.cs 2014-10-11 00:30:23 UTC (rev 1535)
@@ -18,12 +18,17 @@
//
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text;
+using System.Threading.Tasks;
namespace AgateLib.IO
{
public interface IReadWriteFileProvider : IReadFileProvider, IWriteFileProvider
{
+ Task<Stream> OpenWriteAsync(string file);
+
+ void CreateDirectory(string folder);
}
}
Modified: trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-10-11 00:24:39 UTC (rev 1534)
+++ trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-10-11 00:30:23 UTC (rev 1535)
@@ -30,7 +30,7 @@
/// FileSystemProvider implements IFileProvider, providing access to files
/// from the operating system file system.
/// </summary>
- public class FileSystemProvider : IReadFileProvider
+ public class FileSystemProvider : IReadWriteFileProvider
{
string mPath;
Uri mPathUri;
@@ -66,7 +66,7 @@
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.
@@ -290,5 +290,18 @@
{
get { return true; }
}
+
+ public async Task<Stream> OpenWriteAsync(string file)
+ {
+ string resolvedName = FindFileName(file);
+
+ return await Task.Run(() => File.Open(resolvedName, FileMode.Create));
+ }
+
+ public void CreateDirectory(string folder)
+ {
+ DebugCrossPlatform(folder);
+ Directory.CreateDirectory(Path.Combine(mPath, folder));
+ }
}
}
Modified: trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs 2014-10-11 00:24:39 UTC (rev 1534)
+++ trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs 2014-10-11 00:30:23 UTC (rev 1535)
@@ -1,8 +1,11 @@
using AgateLib.ApplicationModels;
+using AgateLib.IO;
using AgateLib.Platform.WinForms.ApplicationModels;
using AgateLib.Platform.WinForms.Factories;
using AgateLib.Platform.WinForms.IO;
using AgateLib.Utility;
+using System;
+using System.IO;
namespace AgateLib.Platform.WinForms
{
@@ -21,6 +24,10 @@
factory.SetAssetLocations(parameters.AssetLocations);
Core.InitAssetLocations(parameters.AssetLocations);
+ var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+
+ FileProvider.UserFiles = new FileSystemProvider(Path.Combine(appData, parameters.ApplicationName));
+
////var assetProvider = new FileSystemProvider(System.IO.Path.GetFullPath(parameters.AssetLocations.Path));
////AgateLib.IO.FileProvider.Initialize(assetProvider, parameters.AssetLocations);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-10-11 05:52:59
|
Revision: 1536
http://sourceforge.net/p/agate/code/1536
Author: kanato
Date: 2014-10-11 05:52:54 +0000 (Sat, 11 Oct 2014)
Log Message:
-----------
Trying to resolve nuget package restore issues.
Modified Paths:
--------------
trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj
trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj
trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj
Added Paths:
-----------
trunk/AgateLib/packages.config
trunk/AgateLib.AgateSDL/packages.config
trunk/AgateLib.Platform.WindowsStoreCommon/packages.config
trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config
trunk/AgateLib.Tests/Tests.WinForms/packages.config
trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config
trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config
trunk/AgateLib.Tests/UnitTests/packages.config
Removed Paths:
-------------
trunk/AgateLib/packages.config
trunk/AgateLib.AgateSDL/packages.config
trunk/AgateLib.Platform.WindowsStoreCommon/packages.config
trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config
trunk/AgateLib.Tests/Tests.WinForms/packages.config
trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config
trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config
trunk/AgateLib.Tests/UnitTests/packages.config
Deleted: trunk/AgateLib/packages.config
===================================================================
--- trunk/AgateLib/packages.config 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MSBuildTasks" version="1.4.0.65" targetFramework="portable-net45+win+wpa81+wp80+MonoAndroid10+MonoTouch10" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib/packages.config
===================================================================
--- trunk/AgateLib/packages.config (rev 0)
+++ trunk/AgateLib/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -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
Deleted: trunk/AgateLib.AgateSDL/packages.config
===================================================================
--- trunk/AgateLib.AgateSDL/packages.config 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.AgateSDL/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net45" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib.AgateSDL/packages.config
===================================================================
--- trunk/AgateLib.AgateSDL/packages.config (rev 0)
+++ trunk/AgateLib.AgateSDL/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net45" />
+</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-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-10-11 05:52:54 UTC (rev 1536)
@@ -15,7 +15,7 @@
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile32</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
- <NuGetPackageImportStamp>2455b0df</NuGetPackageImportStamp>
+ <NuGetPackageImportStamp>2117cc66</NuGetPackageImportStamp>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
@@ -40,7 +40,6 @@
</PropertyGroup>
<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>
@@ -68,6 +67,7 @@
<Content Include="Resources\Basic2Dvert.fxo">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <None Include="packages.config" />
<None Include="Resources\buildshaders.bat" />
<None Include="Resources\fxc.bat" />
</ItemGroup>
@@ -111,6 +111,20 @@
<Compile Include="ApplicationModels\WindowsStoreSceneModelParameters.cs" />
</ItemGroup>
<ItemGroup>
+ <Content Include="Resources\ShaderSource\Basic2Dpixel.hlsl" />
+ <Content Include="Resources\ShaderSource\Basic2Dvert.hlsl" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\AgateLib\AgateLib.csproj">
+ <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
+ <Name>AgateLib</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <TargetPlatform Include="Windows, Version=8.1" />
+ <TargetPlatform Include="WindowsPhoneApp, Version=8.1" />
+ </ItemGroup>
+ <ItemGroup>
<Reference Include="SharpDX">
<HintPath>$(SharpDXPackageBinDir)\SharpDX.dll</HintPath>
</Reference>
@@ -124,36 +138,22 @@
<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>
+ <HintPath>$(SharpDXPackageBinDir)\SharpDX.XAudio2.dll</HintPath>
</Reference>
</ItemGroup>
- <ItemGroup>
- <Content Include="Resources\ShaderSource\Basic2Dpixel.hlsl" />
- <Content Include="Resources\ShaderSource\Basic2Dvert.hlsl" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\AgateLib\AgateLib.csproj">
- <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
- <Name>AgateLib</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <TargetPlatform Include="Windows, Version=8.1" />
- <TargetPlatform Include="WindowsPhoneApp, Version=8.1" />
- </ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
- <Import Project="..\packages\SharpDX.2.6.2\build\SharpDX.targets" Condition="Exists('..\packages\SharpDX.2.6.2\build\SharpDX.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'))" />
<Error Condition="!Exists('..\packages\SharpDX.2.6.2\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.2.6.2\build\SharpDX.targets'))" />
- <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<PropertyGroup>
<PreBuildEvent>cd "$(ProjectDir)\Resources" & "$(ProjectDir)Resources\buildshaders.bat" /Zi</PreBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Import Project="..\packages\SharpDX.2.6.2\build\SharpDX.targets" Condition="Exists('..\packages\SharpDX.2.6.2\build\SharpDX.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">
Deleted: trunk/AgateLib.Platform.WindowsStoreCommon/packages.config
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/packages.config 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -1,9 +0,0 @@
-<?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" />
- <package id="SharpDX.SimpleInitializer" version="1.0.0" targetFramework="portable-win81+wpa81" />
- <package id="SharpDX.XAudio2" version="2.6.2" targetFramework="portable-win81+wpa81" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib.Platform.WindowsStoreCommon/packages.config
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/packages.config (rev 0)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -0,0 +1,9 @@
+<?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" />
+ <package id="SharpDX.SimpleInitializer" version="1.0.0" targetFramework="portable-win81+wpa81" />
+ <package id="SharpDX.XAudio2" version="2.6.2" targetFramework="portable-win81+wpa81" />
+</packages>
\ No newline at end of file
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj 2014-10-11 05:52:54 UTC (rev 1536)
@@ -80,9 +80,6 @@
<Compile Include="UserInterfaceTests\TransitionTest.cs" />
</ItemGroup>
<ItemGroup>
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup>
<Content Include="Assets\attacke.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -178,7 +175,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
- <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">
Deleted: trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -1,4 +0,0 @@
-<?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
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-10-11 05:52:54 UTC (rev 1536)
@@ -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.WinForms/AgateLib.Tests.WinForms.csproj
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-10-11 05:52:54 UTC (rev 1536)
@@ -457,10 +457,10 @@
<None Include="Assets\CssTest.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
- <None Include="packages.config" />
<None Include="Assets\settings_list.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\largeimage.png">
Deleted: trunk/AgateLib.Tests/Tests.WinForms/packages.config
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/packages.config 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Tests/Tests.WinForms/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net35" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib.Tests/Tests.WinForms/packages.config
===================================================================
--- trunk/AgateLib.Tests/Tests.WinForms/packages.config (rev 0)
+++ trunk/AgateLib.Tests/Tests.WinForms/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net451" />
+</packages>
\ No newline at end of file
Deleted: trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Tests/Tests.WindowsMetro/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -1,4 +0,0 @@
-<?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
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-10-11 05:52:54 UTC (rev 1536)
@@ -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
Deleted: trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config
===================================================================
--- trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Tests/Tests.WindowsPhone/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -1,4 +0,0 @@
-<?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
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-10-11 05:52:54 UTC (rev 1536)
@@ -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
Modified: trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj
===================================================================
--- trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj 2014-10-11 05:52:54 UTC (rev 1536)
@@ -117,9 +117,6 @@
<Compile Include="Utility\RefTest.cs" />
</ItemGroup>
<ItemGroup>
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup>
<ProjectReference Include="..\..\AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj">
<Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
<Name>AgateLib.Platform.WinForms</Name>
@@ -133,6 +130,9 @@
<Name>AgateLib.Tests.Portable</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
Deleted: trunk/AgateLib.Tests/UnitTests/packages.config
===================================================================
--- trunk/AgateLib.Tests/UnitTests/packages.config 2014-10-11 00:30:23 UTC (rev 1535)
+++ trunk/AgateLib.Tests/UnitTests/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net45" />
-</packages>
\ No newline at end of file
Added: trunk/AgateLib.Tests/UnitTests/packages.config
===================================================================
--- trunk/AgateLib.Tests/UnitTests/packages.config (rev 0)
+++ trunk/AgateLib.Tests/UnitTests/packages.config 2014-10-11 05:52:54 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MSBuildTasks" version="1.4.0.65" targetFramework="net451" />
+</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-10-13 02:37:10
|
Revision: 1537
http://sourceforge.net/p/agate/code/1537
Author: kanato
Date: 2014-10-13 02:36:59 +0000 (Mon, 13 Oct 2014)
Log Message:
-----------
Add ability to have multiple asset stores.
Some fixes for windows metro/phone apps.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/ApplicationModels/ModelParameters.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/Drivers/IPlatformFactory.cs
trunk/AgateLib/IO/FileProvider.cs
trunk/AgateLib/Serialization/Xle/XleSerializer.cs
trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs
trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs
trunk/AgateLib.Platform.WindowsMetro/Factories/WinPlatformFactory.cs
trunk/AgateLib.Platform.WindowsMetro/Factories/WindowsFactory.cs
trunk/AgateLib.Platform.WindowsMetro/WindowsInitializer.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs
trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs
trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj
trunk/AgateLib.Platform.WindowsStoreCommon/AudioImplementation/XAudio2_Music.cs
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs
trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStorePlatformFactory.cs
trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SpriteTester/frmSpriteTester.cs
trunk/AgateLib.Tests/Tests.WindowsMetro/TestContainer.xaml.cs
trunk/AgateLib.Tests/Tests.WindowsPhone/TestContainer.xaml.cs
trunk/AgateLib.Tests/UnitTests/Resources/SerializationTest.cs
trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssLayoutTest.cs
trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssParseTest.cs
trunk/AgateLib.Tests/UnitTests/UserInterface/Css/CssTestBase.cs
Added Paths:
-----------
trunk/AgateLib/IO/AssetLocations.cs
trunk/AgateLib/IO/Assets.cs
trunk/AgateLib/IO/ReadFileProviderList.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/AgateConsoleImpl.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/IsolatedStorageFileProvider.cs
Removed Paths:
-------------
trunk/AgateLib/ApplicationModels/AssetLocations.cs
trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib/AgateLib.csproj 2014-10-13 02:36:59 UTC (rev 1537)
@@ -68,6 +68,8 @@
<Compile Include="InputLib\GamepadMap.cs" />
<Compile Include="InputLib\GamepadMapDatabase.cs" />
<Compile Include="InputLib\GamepadStickEventArgs.cs" />
+ <Compile Include="IO\Assets.cs" />
+ <Compile Include="IO\ReadFileProviderList.cs" />
<Compile Include="Mathematics\MathHelper.cs" />
<Compile Include="Algorithms\PathFinding\IAStarMap.cs" />
<Compile Include="Algorithms\Pair.cs" />
@@ -75,7 +77,7 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="ApplicationModels\AgateAppModel.cs" />
- <Compile Include="ApplicationModels\AssetLocations.cs" />
+ <Compile Include="IO\AssetLocations.cs" />
<Compile Include="Geometry\CoordinateSystems\FixedAspectRatioCoordinates.cs" />
<Compile Include="Geometry\ICoordinateSystemCreator.cs" />
<Compile Include="ApplicationModels\ModelParameters.cs" />
Deleted: trunk/AgateLib/ApplicationModels/AssetLocations.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AssetLocations.cs 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib/ApplicationModels/AssetLocations.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -1,63 +0,0 @@
-// 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.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace AgateLib.ApplicationModels
-{
- /// <summary>
- /// Structure which indicates where various assets are stored.
- /// </summary>
- public class AssetLocations
- {
- public AssetLocations()
- {
- Path = ".";
- }
-
- /// <summary>
- /// Path prefix to load surfaces from.
- /// </summary>
- public string Surfaces { get; set; }
- /// <summary>
- /// Path prefix to load sound effects from.
- /// </summary>
- public string Sound { get; set; }
- /// <summary>
- /// Path prefix to load music files from.
- /// </summary>
- public string Music { get; set; }
- /// <summary>
- /// Path prefix to load resource files from.
- /// </summary>
- public string Resources { get; set; }
- /// <summary>
- /// Path prefix to load user interface files from.
- /// </summary>
- public string UserInterface { get; set; }
-
- /// <summary>
- /// Root path used to load all assets.
- /// </summary>
- public string Path { get; set; }
- }
-}
Modified: trunk/AgateLib/ApplicationModels/ModelParameters.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -18,6 +18,7 @@
//
using AgateLib.Geometry;
using AgateLib.Geometry.CoordinateSystems;
+using AgateLib.IO;
using AgateLib.Platform;
using System;
using System.Collections.Generic;
Modified: trunk/AgateLib/DisplayLib/Surface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Surface.cs 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib/DisplayLib/Surface.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -91,7 +91,7 @@
throw new ArgumentNullException("You must supply a file name.");
if (fileprovider == null)
- fileprovider = AgateLib.IO.FileProvider.SurfaceAssets;
+ fileprovider = AgateLib.IO.Assets.Surfaces;
mImpl = Core.Factory.DisplayFactory.CreateSurface(fileprovider, filename);
Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -38,6 +38,9 @@
IEnumerable<System.Reflection.Assembly> GetSerializationSearchAssemblies(Type objectType);
+ /// <summary>
+ /// Gets a file provider which points to the application directory.
+ /// </summary>
IReadFileProvider AssetFileProvider { get; }
IPlatformSerialization CreateDefaultSerializationConstructor();
Copied: trunk/AgateLib/IO/AssetLocations.cs (from rev 1534, trunk/AgateLib/ApplicationModels/AssetLocations.cs)
===================================================================
--- trunk/AgateLib/IO/AssetLocations.cs (rev 0)
+++ trunk/AgateLib/IO/AssetLocations.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -0,0 +1,65 @@
+// 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.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.IO
+{
+ /// <summary>
+ /// Structure which indicates where various assets are stored.
+ /// </summary>
+ public class AssetLocations
+ {
+ public AssetLocations()
+ {
+ Path = ".";
+ }
+
+ /// <summary>
+ /// Path prefix to load surfaces from.
+ /// </summary>
+ public string Surfaces { get; set; }
+ /// <summary>
+ /// Path prefix to load sound effects from.
+ /// </summary>
+ public string Sound { get; set; }
+ /// <summary>
+ /// Path prefix to load music files from.
+ /// </summary>
+ public string Music { get; set; }
+ /// <summary>
+ /// Path prefix to load resource files from.
+ /// </summary>
+ public string Resources { get; set; }
+ /// <summary>
+ /// Path prefix to load user interface files from.
+ /// </summary>
+ public string UserInterface { get; set; }
+
+ /// <summary>
+ /// Root path used to load all assets.
+ /// </summary>
+ public string Path { get; set; }
+
+ public AssetLocations ExtraAssets { get; set; }
+ }
+}
Added: trunk/AgateLib/IO/Assets.cs
===================================================================
--- trunk/AgateLib/IO/Assets.cs (rev 0)
+++ trunk/AgateLib/IO/Assets.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -0,0 +1,184 @@
+using AgateLib.ApplicationModels;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.IO
+{
+ public static class Assets
+ {
+ static IReadFileProvider mAssetProvider;
+ static IReadFileProvider mSurfaces;
+ static IReadFileProvider mResources;
+ static IReadFileProvider mMusic;
+ static IReadFileProvider mSounds;
+ static IReadFileProvider mUserInterfaceAssets;
+
+ public static void AddAssetLocations(IReadFileProvider ap, AssetLocations assetLocations)
+ {
+ // check for circular reference
+ VerifyNoncircular(assetLocations);
+
+ var assetProvider = NewProviderFromSubdirectory(ap, assetLocations.Path);
+ var surfaces = NewProviderFromSubdirectory(assetProvider, assetLocations.Surfaces);
+ var sounds = NewProviderFromSubdirectory(assetProvider, assetLocations.Sound);
+ var music = NewProviderFromSubdirectory(assetProvider, assetLocations.Music);
+ var resources = NewProviderFromSubdirectory(assetProvider, assetLocations.Resources);
+ var userInterfaceAssets = NewProviderFromSubdirectory(assetProvider, assetLocations.UserInterface);
+
+ AddOrCombine(ref mAssetProvider, assetProvider);
+ AddOrCombine(ref mSurfaces, surfaces);
+ AddOrCombine(ref mResources, resources);
+ AddOrCombine(ref mMusic, music);
+ AddOrCombine(ref mSounds, sounds);
+ AddOrCombine(ref mUserInterfaceAssets, userInterfaceAssets);
+
+ if (assetLocations.ExtraAssets != null)
+ {
+ AddAssetLocations(ap, assetLocations.ExtraAssets);
+ }
+ }
+
+ private static void VerifyNoncircular(AssetLocations al)
+ {
+ List<AssetLocations> examined = new List<AssetLocations>();
+
+ while (al.ExtraAssets != null)
+ {
+ if (examined.Contains(al))
+ throw new AgateException("AssetLocations passed contains circular references.");
+
+ examined.Add(al);
+ al = al.ExtraAssets;
+ }
+ }
+
+ private static void AddOrCombine(ref IReadFileProvider storage, IReadFileProvider provider)
+ {
+ if (storage == null)
+ storage = provider;
+ else if (storage is ReadFileProviderList)
+ {
+ var rfpl = (ReadFileProviderList)storage;
+
+ rfpl.Add(provider);
+ }
+ else
+ {
+ var rfpl = new ReadFileProviderList();
+
+ rfpl.Add(storage);
+ rfpl.Add(provider);
+
+ storage = rfpl;
+ }
+ }
+
+ static IReadFileProvider NewProviderFromSubdirectory(IReadFileProvider parent, string subdir)
+ {
+ if (string.IsNullOrWhiteSpace(subdir) || subdir == ".")
+ return parent;
+
+ return new SubdirectoryProvider(parent, subdir);
+ }
+
+ internal static IReadFileProvider AssetProvider { get { return mAssetProvider; } set { mAssetProvider = value; } }
+ public static IReadFileProvider Surfaces { get { return mSurfaces; } set { mSurfaces = value; } }
+ public static IReadFileProvider Resources { get { return mResources; } set { mResources = value; } }
+ public static IReadFileProvider Music { get { return mMusic; } set { mMusic = value; } }
+ public static IReadFileProvider Sounds { get { return mSounds; } set { mSounds = value; } }
+ public static IReadFileProvider UserInterfaceAssets { get { return mUserInterfaceAssets; } set { mUserInterfaceAssets = value; } }
+
+ /// <summary>
+ /// Opens the specified file returning a stream. Throws
+ /// FileNotFoundException if the file does not exist.
+ /// </summary>
+ /// <param name="filename">The path and filename of the file to read from.</param>
+ /// <returns></returns>
+ public static Task<Stream> OpenReadAsync(string filename)
+ {
+ return mAssetProvider.OpenReadAsync(filename);
+ }
+
+ /// <summary>
+ /// Opens the specified file returning a stream. Throws
+ /// FileNotFoundException if the file does not exist.
+ /// </summary>
+ /// <param name="filename">The path and filename of the file to read from.</param>
+ /// <returns></returns>
+ public static Stream OpenRead(string filename)
+ {
+ return mAssetProvider.OpenRead(filename);
+ }
+ /// <summary>
+ /// Checks to if the specified file exists in the file provider.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ public static bool FileExists(string filename)
+ {
+ return mAssetProvider.FileExists(filename);
+ }
+
+ /// <summary>
+ /// Enumerates through all existing filenames in the file provider.
+ /// </summary>
+ /// <returns></returns>
+ public static IEnumerable<string> GetAllFiles()
+ {
+ return mAssetProvider.GetAllFiles();
+ }
+
+ /// <summary>
+ /// Enumerates through all filenames which match the specified search pattern.
+ /// </summary>
+ /// <remarks>The search pattern is not regex style pattern matching, rather it should
+ /// be bash pattern matching, so a searchPattern of "*" would match all files, and
+ /// "*.*" would match all filenames with a period in them.</remarks>
+ /// <param name="searchPattern"></param>
+ /// <returns></returns>
+ public static IEnumerable<string> GetAllFiles(string searchPattern)
+ {
+ return mAssetProvider.GetAllFiles(searchPattern);
+ }
+ /// <summary>
+ /// Returns a string containing the entire contents of the specified file.
+ /// </summary>
+ /// <param name="filename">The path and filename of the file to read from.</param>
+ /// <returns></returns>
+ public static string ReadAllText(string filename)
+ {
+ return mAssetProvider.ReadAllText(filename);
+ }
+
+ /// <summary>
+ /// Returns true if the specified filename points to an actual file on disk.
+ /// If this method returns false, then ResolveFile will throw an exception
+ /// for that file.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ public static bool IsRealFile(string filename)
+ {
+ return mAssetProvider.IsRealFile(filename);
+ }
+
+ /// <summary>
+ /// Returns the full path of the given filename.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ public static string ResolveFile(string filename)
+ {
+ return mAssetProvider.ResolveFile(filename);
+ }
+
+ /// <summary>
+ /// Returns true if the file system is not a physical file system.
+ /// </summary>
+ public static bool IsLogicalFilesystem { get { return mAssetProvider.IsLogicalFilesystem; } }
+ }
+}
Modified: trunk/AgateLib/IO/FileProvider.cs
===================================================================
--- trunk/AgateLib/IO/FileProvider.cs 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib/IO/FileProvider.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -29,32 +29,25 @@
{
public static void Initialize(IReadFileProvider assetProvider, AssetLocations assetLocations)
{
- Assets = assetProvider;
-
- SurfaceAssets = NewProviderFromSubdirectory(Assets, assetLocations.Surfaces);
- SoundAssets = NewProviderFromSubdirectory(Assets, assetLocations.Sound);
- MusicAssets = NewProviderFromSubdirectory(Assets, assetLocations.Music);
- ResourceAssets = NewProviderFromSubdirectory(Assets, assetLocations.Resources);
- UserInterfaceAssets = NewProviderFromSubdirectory(Assets, assetLocations.UserInterface);
+ AgateLib.IO.Assets.AddAssetLocations(assetProvider, assetLocations);
}
- public static IReadFileProvider Assets { get; set; }
+ [Obsolete("Use AgateLib.IO.Assets instead.")]
+ public static IReadFileProvider Assets { get { return AgateLib.IO.Assets.AssetProvider; } }
- public static IReadFileProvider SurfaceAssets { get; set; }
- public static IReadFileProvider ResourceAssets { get; set; }
- public static IReadFileProvider MusicAssets { get; set; }
- public static IReadFileProvider SoundAssets { get; set; }
- public static IReadFileProvider UserInterfaceAssets { get; set; }
+ [Obsolete("Use AgateLib.IO.Assets.Surfaces instead.")]
+ public static IReadFileProvider SurfaceAssets { get { return AgateLib.IO.Assets.Surfaces; } }
+ [Obsolete("Use AgateLib.IO.Assets.Resources instead.")]
+ public static IReadFileProvider ResourceAssets { get { return AgateLib.IO.Assets.Resources; } }
+ [Obsolete("Use AgateLib.IO.Assets.Music instead.")]
+ public static IReadFileProvider MusicAssets { get { return AgateLib.IO.Assets.Music; } }
+ [Obsolete("Use AgateLib.IO.Assets.Sounds instead.")]
+ public static IReadFileProvider SoundAssets { get { return AgateLib.IO.Assets.Sounds; } }
+ [Obsolete("Use AgateLib.IO.Assets.UserInterfaceAssets instead.")]
+ public static IReadFileProvider UserInterfaceAssets { get { return AgateLib.IO.Assets.UserInterfaceAssets; } }
public static IReadWriteFileProvider UserFiles { get; set; }
- static IReadFileProvider NewProviderFromSubdirectory(IReadFileProvider parent, string subdir)
- {
- if (string.IsNullOrWhiteSpace(subdir) || subdir == ".")
- return parent;
- return new SubdirectoryProvider(parent, subdir);
- }
-
}
}
Copied: trunk/AgateLib/IO/ReadFileProviderList.cs (from rev 1534, trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs)
===================================================================
--- trunk/AgateLib/IO/ReadFileProviderList.cs (rev 0)
+++ trunk/AgateLib/IO/ReadFileProviderList.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -0,0 +1,310 @@
+// 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.Text;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace AgateLib.IO
+{
+ /// <summary>
+ /// Contains a list of IFileProvider objects that are used to search for
+ /// and open files.
+ /// </summary>
+ public class ReadFileProviderList : IList<IReadFileProvider>, IReadFileProvider
+ {
+ List<IReadFileProvider> mProviders = new List<IReadFileProvider>();
+
+ /// <summary>
+ /// Returns the IFileProvider object which would return the specified
+ /// file when OpenRead is called. Throws a FileNotFoundException if the file is not available.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ public IReadFileProvider GetProvider(string filename)
+ {
+ for (int i = mProviders.Count - 1; i >= 0; i--)
+ {
+ if (mProviders[i].FileExists(filename))
+ return mProviders[i];
+ }
+
+ throw new FileNotFoundException(string.Format(
+ "Could not find the file {0}.", filename));
+ }
+ /// <summary>
+ /// Opens a specified file by searching backwards through the list of
+ /// providers until a matching filename is found. A FileNotFoundException
+ /// is thrown if the file does not exist.
+ /// </summary>
+ /// <param name="filename">The filename to search for.</param>
+ /// <returns></returns>
+ public async Task<Stream> OpenReadAsync(string filename)
+ {
+ if (string.IsNullOrEmpty(filename))
+ throw new ArgumentNullException("You must supply a file name.");
+
+ for (int i = mProviders.Count - 1; i >= 0; i--)
+ {
+ if (mProviders[i].FileExists(filename))
+ {
+ return await mProviders[i].OpenReadAsync(filename);
+ }
+ }
+
+ throw new FileNotFoundException(string.Format(
+ "Could not find the file {0}.", filename));
+ }
+
+
+
+ public bool IsRealFile(string filename)
+ {
+ if (string.IsNullOrEmpty(filename))
+ throw new ArgumentNullException("You must supply a file name.");
+
+ for (int i = mProviders.Count - 1; i >= 0; i--)
+ {
+ if (mProviders[i].FileExists(filename))
+ {
+ return mProviders[i].IsRealFile(filename);
+ }
+ }
+
+ throw new FileNotFoundException(string.Format(
+ "Could not find the file {0}.", filename));
+ }
+
+ public string ResolveFile(string filename)
+ {
+ if (string.IsNullOrEmpty(filename))
+ throw new ArgumentNullException("You must supply a file name.");
+
+ for (int i = mProviders.Count - 1; i >= 0; i--)
+ {
+ if (mProviders[i].FileExists(filename))
+ {
+ return mProviders[i].ResolveFile(filename);
+ }
+ }
+
+ throw new FileNotFoundException(string.Format(
+ "Could not find the file {0}.", filename));
+ }
+
+ /// <summary>
+ /// Returns all filenames matching the specified filter in
+ /// all file providers.
+ /// </summary>
+ /// <param name="filter"></param>
+ /// <returns></returns>
+ public IEnumerable<string> GetAllFiles(string filter)
+ {
+ for (int i = mProviders.Count - 1; i >= 0; i--)
+ {
+ foreach (string files in mProviders[i].GetAllFiles(filter))
+ yield return files;
+ }
+ }
+ /// <summary>
+ /// Returns all filenames in all file providers.
+ /// </summary>
+ /// <returns></returns>
+ public IEnumerable<string> GetAllFiles()
+ {
+ for (int i = mProviders.Count - 1; i >= 0; i--)
+ {
+ foreach (string files in mProviders[i].GetAllFiles())
+ yield return files;
+ }
+ }
+
+ /// <summary>
+ /// Returns true if the specified file exists in a file provider.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ public bool FileExists(string filename)
+ {
+ for (int i = mProviders.Count - 1; i >= 0; i--)
+ {
+ if (mProviders[i].FileExists(filename))
+ return true;
+ }
+
+ return false;
+ }
+
+ #region IList<IFileProvider> Members
+
+ /// <summary>
+ /// Returns the index of the specified IFileProvider.
+ /// </summary>
+ /// <param name="item"></param>
+ /// <returns></returns>
+ public int IndexOf(IReadFileProvider item)
+ {
+ return mProviders.IndexOf(item);
+ }
+
+ /// <summary>
+ /// Insers an IFileProvider into the list.
+ /// </summary>
+ /// <param name="index"></param>
+ /// <param name="item"></param>
+ public void Insert(int index, IReadFileProvider item)
+ {
+ if (item is ReadFileProviderList)
+ {
+ if (item == this) throw new ArgumentException("Cannot add a FileProviderList to itself!");
+ }
+
+ mProviders.Insert(index, item);
+ }
+ /// <summary>
+ /// Removes an IFileProvider from the list.
+ /// </summary>
+ /// <param name="index"></param>
+ public void RemoveAt(int index)
+ {
+ mProviders.RemoveAt(index);
+ }
+ /// <summary>
+ /// Gets or sets the IFileProvider at the specified location.
+ /// </summary>
+ /// <param name="index"></param>
+ /// <returns></returns>
+ public IReadFileProvider this[int index]
+ {
+ get
+ {
+ return mProviders[index];
+ }
+ set
+ {
+ if (value is ReadFileProviderList)
+ {
+ if (value == this) throw new ArgumentException("Cannot add a FileProviderList to itself!");
+ }
+
+ mProviders[index] = value;
+ }
+ }
+
+ #endregion
+ #region ICollection<IFileProvider> Members
+
+ /// <summary>
+ /// Adds an IFileProvider to the list.
+ /// </summary>
+ /// <param name="item"></param>
+ public void Add(IReadFileProvider item)
+ {
+ if (item is ReadFileProviderList)
+ {
+ if (item == this) throw new ArgumentException("Cannot add a FileProviderList to itself!");
+ }
+ mProviders.Add(item);
+ }
+ /// <summary>
+ /// Clears the list.
+ /// </summary>
+ public void Clear()
+ {
+ mProviders.Clear();
+ }
+ /// <summary>
+ /// Returns true if the list contains the specified IFileProvider.
+ /// </summary>
+ /// <param name="item"></param>
+ /// <returns></returns>
+ public bool Contains(IReadFileProvider item)
+ {
+ return mProviders.Contains(item);
+ }
+
+ void ICollection<IReadFileProvider>.CopyTo(IReadFileProvider[] array, int arrayIndex)
+ {
+ mProviders.CopyTo(array, arrayIndex);
+ }
+ /// <summary>
+ /// Gets the number of items in the list.
+ /// </summary>
+ public int Count
+ {
+ get { return mProviders.Count; }
+ }
+ /// <summary>
+ /// Always returns false.
+ /// </summary>
+ public bool IsReadOnly
+ {
+ get { return false; }
+ }
+ /// <summary>
+ /// Removes an IFileProvider from the list.
+ /// </summary>
+ /// <param name="item"></param>
+ /// <returns></returns>
+ public bool Remove(IReadFileProvider item)
+ {
+ return mProviders.Remove(item);
+ }
+
+ #endregion
+ #region IEnumerable<IFileProvider> Members
+
+ /// <summary>
+ /// Enumerates items.
+ /// </summary>
+ /// <returns></returns>
+ public IEnumerator<IReadFileProvider> GetEnumerator()
+ {
+ return mProviders.GetEnumerator();
+ }
+
+ #endregion
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ #endregion
+
+ /// <summary>
+ /// Returns a string containing all the text in the specified file.
+ /// </summary>
+ /// <param name="filename">The name of the file to read from.</param>
+ /// <returns></returns>
+ public string ReadAllText(string filename)
+ {
+ Stream s = OpenReadAsync(filename).Result;
+
+ return new StreamReader(s).ReadToEnd();
+ }
+
+ public bool IsLogicalFilesystem
+ {
+ get { return true; }
+ }
+ }
+}
Modified: trunk/AgateLib/Serialization/Xle/XleSerializer.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -60,7 +60,7 @@
public XleSerializer(Type objectType, IPlatformSerialization objectConstructor = null)
{
if (objectConstructor == null)
- objectConstructor = Core.Factory.PlatformFactory.CreateDefaultSerializationConstructor();
+ objectConstructor = new AgateLib.Platform.Common.PlatformImplementation.PlatformSerialization();// Core.Factory.PlatformFactory.CreateDefaultSerializationConstructor();
ObjectConstructor = objectConstructor;
Modified: trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs
===================================================================
--- trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-10-13 02:36:59 UTC (rev 1537)
@@ -153,7 +153,7 @@
#endregion;
- public bool InTransition { get; private set;}
+ public bool InTransition { get; private set; }
public void Draw()
{
@@ -176,6 +176,8 @@
{
if (anim.Style.Data.Overflow == CssOverflow.Visible)
return false;
+ if (anim.ClientRect.Width == 0 || anim.ClientRect.Height == 0)
+ return true;
Rectangle clipRect = anim.ClientToScreen(new Rectangle(0, 0, anim.ClientRect.Width, anim.ClientRect.Height));
@@ -187,6 +189,12 @@
{
bool clipping = false;
+ if (anim.Style.Data.Overflow != CssOverflow.Visible &&
+ (anim.ClientRect.Width == 0 || anim.ClientRect.Height == 0))
+ {
+ return;
+ }
+
try
{
clipping = PushClipRect(anim);
Modified: trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-10-11 05:52:54 UTC (rev 1536)
+++ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-10-13 02:36:59 UTC (rev 1537)
@@ -131,7 +131,6 @@
<DependentUpon>frmGuiDebug.cs</DependentUpon>
</Compile>
<Compile Include="PixelBufferExtensions.cs" />
- <Compile Include="IO\FileProviderList.cs" />
<Compile Include="IO\FileSystemProvider.cs" />
<Compile Include="PlatformImplementation\FormsPlatformInfo.cs" />
<Compile Include="IO\TgzFileProvider.cs" />
Modified: trunk/Agat...
[truncated message content] |
|
From: <ka...@us...> - 2014-11-15 19:21:37
|
Revision: 1538
http://sourceforge.net/p/agate/code/1538
Author: kanato
Date: 2014-11-15 19:21:32 +0000 (Sat, 15 Nov 2014)
Log Message:
-----------
Fix asset paths for windows forms applications.
Modified Paths:
--------------
trunk/AgateLib/Algorithms/Inverting.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/Drivers/IPlatformFactory.cs
trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs
trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs
trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStorePlatformFactory.cs
trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakePlatformFactory.cs
trunk/AgateLib.Tests/UnitTests/Algorithms/EMathTest.cs
Modified: trunk/AgateLib/Algorithms/Inverting.cs
===================================================================
--- trunk/AgateLib/Algorithms/Inverting.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib/Algorithms/Inverting.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -25,16 +25,11 @@
{
public class Inverting
{
- public static double IterateInvert(Func<double, double> func, double targetVal)
+ public static double IterateInvert(Func<double, double> func, double targetVal, double initialPt = 0, int itermax = 500)
{
- return IterateInvert(func, targetVal, 0);
- }
- public static double IterateInvert(Func<double, double> func, double targetVal, double initialPt)
- {
bool hasLower = false;
bool hasUpper = false;
int iter = 0;
- const int itermax = 500;
var p1 = new Pair<double, double>(initialPt, func(initialPt));
Pair<double, double> lowerVal, upperVal;
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib/Core.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -353,7 +353,7 @@
public static void InitAssetLocations(AssetLocations assets)
{
- FileProvider.Initialize(mFactory.PlatformFactory.AssetFileProvider, assets);
+ FileProvider.Initialize(mFactory.PlatformFactory.ApplicationFolderFileProvider, assets);
}
public static IAgateFactory Factory
Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -41,7 +41,7 @@
/// <summary>
/// Gets a file provider which points to the application directory.
/// </summary>
- IReadFileProvider AssetFileProvider { get; }
+ IReadFileProvider ApplicationFolderFileProvider { get; }
IPlatformSerialization CreateDefaultSerializationConstructor();
}
Modified: trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -28,11 +28,6 @@
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; }
Modified: trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -20,18 +20,16 @@
public PlatformFactory()
{
Info = new FormsPlatformInfo();
- AssetFileProvider = new FileSystemProvider(".");
+
+ var appdir = Path.GetDirectoryName(System.IO.Path.GetFullPath(Assembly.GetEntryAssembly().Location));
+
+ ApplicationFolderFileProvider = new FileSystemProvider(appdir);
}
public PlatformInfo Info { get; private set; }
- public IReadFileProvider AssetFileProvider { get; private set; }
+ public IReadFileProvider ApplicationFolderFileProvider { get; private set; }
- public void SetAssetLocations(AssetLocations assetLocations)
- {
- AssetFileProvider = new FileSystemProvider(System.IO.Path.GetFullPath(assetLocations.Path));
- }
-
public IStopwatch CreateStopwatch()
{
return new DiagnosticsStopwatch();
Modified: trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -245,8 +245,13 @@
{
List<string> files = new List<string>();
- files.AddRange(Directory.GetFiles(mPath, searchPattern)
- .Select(x => MakeRelativePath(x)));
+ try
+ {
+ files.AddRange(Directory.GetFiles(mPath, searchPattern)
+ .Select(x => MakeRelativePath(x)));
+ }
+ catch (DirectoryNotFoundException)
+ { }
return files;
}
Modified: trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs
===================================================================
--- trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -21,7 +21,6 @@
Core.Initialize(factory);
}
- factory.SetAssetLocations(parameters.AssetLocations);
Core.InitAssetLocations(parameters.AssetLocations);
var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStorePlatformFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStorePlatformFactory.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStorePlatformFactory.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -14,11 +14,11 @@
public WindowsStorePlatformFactory(bool handheld, AssetLocations assetLocations)
{
Info = new WindowsStorePlatformInfo(handheld);
- AssetFileProvider = new WindowsStoreAssetFileProvider(".");
+ ApplicationFolderFileProvider = new WindowsStoreAssetFileProvider(".");
FileProvider.UserFiles = new IsolatedStorageFileProvider();
}
public PlatformInfo Info { get; private set;}
- public IReadFileProvider AssetFileProvider { get; private set; }
+ public IReadFileProvider ApplicationFolderFileProvider { get; private set; }
public IStopwatch CreateStopwatch()
{
Modified: trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakePlatformFactory.cs
===================================================================
--- trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakePlatformFactory.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakePlatformFactory.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -15,7 +15,7 @@
Info = new FakePlatformInfo();
}
public Platform.PlatformInfo Info { get; private set; }
- public IReadFileProvider AssetFileProvider { get; private set;}
+ public IReadFileProvider ApplicationFolderFileProvider { get; private set;}
public Platform.IStopwatch CreateStopwatch()
{
Modified: trunk/AgateLib.Tests/UnitTests/Algorithms/EMathTest.cs
===================================================================
--- trunk/AgateLib.Tests/UnitTests/Algorithms/EMathTest.cs 2014-10-13 02:36:59 UTC (rev 1537)
+++ trunk/AgateLib.Tests/UnitTests/Algorithms/EMathTest.cs 2014-11-15 19:21:32 UTC (rev 1538)
@@ -37,6 +37,11 @@
}
[TestMethod]
+ public void IterateInvertMaxIterationsTest()
+ {
+ AssertThrows.Throws<Exception>(() => Inverting.IterateInvert(x => x, 4, itermax: 1));
+ }
+ [TestMethod]
public void InterateInvertTest()
{
Assert.AreEqual(0, Inverting.IterateInvert(x => 2 * x, 0), 0.000001);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-05 09:28:50
|
Revision: 1141
http://agate.svn.sourceforge.net/agate/?rev=1141&view=rev
Author: kanato
Date: 2009-12-05 09:28:38 +0000 (Sat, 05 Dec 2009)
Log Message:
-----------
Workaround for mono bug crashing on settings access.
Modified Paths:
--------------
trunk/AgateTools.sln
trunk/Tools/FontCreator/FontCreator.csproj
trunk/Tools/FontCreator/FontCreatorProgram.cs
trunk/Tools/FontCreator/frmWarningSplash.cs
trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj
trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj
trunk/Tools/PackedSpriteCreator/SpriteRenderer.cs
trunk/Tools/ResourceEditor/ResourceEditor.csproj
Modified: trunk/AgateTools.sln
===================================================================
--- trunk/AgateTools.sln 2009-12-02 21:04:43 UTC (rev 1140)
+++ trunk/AgateTools.sln 2009-12-05 09:28:38 UTC (rev 1141)
@@ -1,18 +1,18 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "Tools\ResourceEditor\ResourceEditor.csproj", "{5E31315E-8A37-4A55-A8D8-A0136C0C2F4C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "Tools\ResourceEditor\ResourceEditor.csproj", "{FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.WinForms", "Drivers\AgateLib.WinForms\AgateLib.WinForms.csproj", "{2E6579F9-1F70-4DF9-98A9-22687425A830}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.WinForms", "Drivers\AgateLib.WinForms\AgateLib.WinForms.csproj", "{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackedSpriteCreator", "Tools\PackedSpriteCreator\PackedSpriteCreator.csproj", "{674650F4-8E72-4DD2-8E5C-1FF858C7B5E4}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackedSpriteCreator", "Tools\PackedSpriteCreator\PackedSpriteCreator.csproj", "{C653C244-F604-4BA4-8822-D04FA9ACEFA5}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateDrawing", "Drivers\AgateDrawing\AgateDrawing.csproj", "{AAC01466-7370-4464-B1AD-1593A3A3BEC1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateDrawing", "Drivers\AgateDrawing\AgateDrawing.csproj", "{164A785D-924E-40FB-A517-D7E677F3B53A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontCreator", "Tools\FontCreator\FontCreator.csproj", "{49F8D445-EF44-46AA-93C0-E9C563B2074C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontCreator", "Tools\FontCreator\FontCreator.csproj", "{A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib", "AgateLib\AgateLib.csproj", "{BED5DD5D-13C6-4BA4-80DC-A47478E74F84}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib", "AgateLib\AgateLib.csproj", "{9490B719-829E-43A7-A5FE-8001F8A81759}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotebookLib", "Tools\NotebookLib\NotebookLib\NotebookLib.csproj", "{826129F3-81A8-4D87-99E0-60DA009C9E3C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotebookLib", "Tools\NotebookLib\NotebookLib\NotebookLib.csproj", "{91F57346-B574-4D52-9EB0-AA191B552C94}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{4B147B99-8BC3-4B78-938A-1035B16A8D1B}"
ProjectSection(SolutionItems) = preProject
@@ -27,34 +27,34 @@
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5E31315E-8A37-4A55-A8D8-A0136C0C2F4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5E31315E-8A37-4A55-A8D8-A0136C0C2F4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5E31315E-8A37-4A55-A8D8-A0136C0C2F4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5E31315E-8A37-4A55-A8D8-A0136C0C2F4C}.Release|Any CPU.Build.0 = Release|Any CPU
- {2E6579F9-1F70-4DF9-98A9-22687425A830}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2E6579F9-1F70-4DF9-98A9-22687425A830}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2E6579F9-1F70-4DF9-98A9-22687425A830}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2E6579F9-1F70-4DF9-98A9-22687425A830}.Release|Any CPU.Build.0 = Release|Any CPU
- {674650F4-8E72-4DD2-8E5C-1FF858C7B5E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {674650F4-8E72-4DD2-8E5C-1FF858C7B5E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {674650F4-8E72-4DD2-8E5C-1FF858C7B5E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {674650F4-8E72-4DD2-8E5C-1FF858C7B5E4}.Release|Any CPU.Build.0 = Release|Any CPU
- {AAC01466-7370-4464-B1AD-1593A3A3BEC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AAC01466-7370-4464-B1AD-1593A3A3BEC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AAC01466-7370-4464-B1AD-1593A3A3BEC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AAC01466-7370-4464-B1AD-1593A3A3BEC1}.Release|Any CPU.Build.0 = Release|Any CPU
- {49F8D445-EF44-46AA-93C0-E9C563B2074C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {49F8D445-EF44-46AA-93C0-E9C563B2074C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {49F8D445-EF44-46AA-93C0-E9C563B2074C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {49F8D445-EF44-46AA-93C0-E9C563B2074C}.Release|Any CPU.Build.0 = Release|Any CPU
- {BED5DD5D-13C6-4BA4-80DC-A47478E74F84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BED5DD5D-13C6-4BA4-80DC-A47478E74F84}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BED5DD5D-13C6-4BA4-80DC-A47478E74F84}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BED5DD5D-13C6-4BA4-80DC-A47478E74F84}.Release|Any CPU.Build.0 = Release|Any CPU
- {826129F3-81A8-4D87-99E0-60DA009C9E3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {826129F3-81A8-4D87-99E0-60DA009C9E3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {826129F3-81A8-4D87-99E0-60DA009C9E3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {826129F3-81A8-4D87-99E0-60DA009C9E3C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {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}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/Tools/FontCreator/FontCreator.csproj
===================================================================
--- trunk/Tools/FontCreator/FontCreator.csproj 2009-12-02 21:04:43 UTC (rev 1140)
+++ trunk/Tools/FontCreator/FontCreator.csproj 2009-12-05 09:28:38 UTC (rev 1141)
@@ -1,12 +1,13 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon></ApplicationIcon>
+ <ApplicationIcon>
+ </ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>FontCreator</AssemblyName>
@@ -16,9 +17,11 @@
<DelaySign>false</DelaySign>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputType>WinExe</OutputType>
- <AppDesignerFolder></AppDesignerFolder>
+ <AppDesignerFolder>
+ </AppDesignerFolder>
<RootNamespace>FontCreator</RootNamespace>
- <StartupObject></StartupObject>
+ <StartupObject>
+ </StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -29,7 +32,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -38,7 +42,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -47,7 +52,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@@ -56,26 +62,27 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
- <Name>System</Name>
+ <Name>System</Name>
</Reference>
<Reference Include="System.Core">
- <Name>System.Core</Name>
+ <Name>System.Core</Name>
</Reference>
<Reference Include="System.Data">
- <Name>System.Data</Name>
+ <Name>System.Data</Name>
</Reference>
<Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
+ <Name>System.Drawing</Name>
</Reference>
<Reference Include="System.Windows.Forms">
- <Name>System.Windows.Forms</Name>
+ <Name>System.Windows.Forms</Name>
</Reference>
<Reference Include="System.Xml">
- <Name>System.Xml</Name>
+ <Name>System.Xml</Name>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -96,14 +103,14 @@
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="CreateFont.cs">
- <SubType>Code</SubType>
+ <SubType>UserControl</SubType>
</Compile>
<Compile Include="CreateFont.Designer.cs">
<DependentUpon>CreateFont.cs</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="EditGlyphs.cs">
- <SubType>Code</SubType>
+ <SubType>UserControl</SubType>
</Compile>
<Compile Include="EditGlyphs.Designer.cs">
<DependentUpon>EditGlyphs.cs</DependentUpon>
@@ -116,21 +123,21 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="frmFontCreator.cs">
- <SubType>Code</SubType>
+ <SubType>Form</SubType>
</Compile>
<Compile Include="frmFontCreator.Designer.cs">
<DependentUpon>frmFontCreator.cs</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="frmWarningSplash.cs">
- <SubType>Code</SubType>
+ <SubType>Form</SubType>
</Compile>
<Compile Include="frmWarningSplash.Designer.cs">
<DependentUpon>frmWarningSplash.cs</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="SaveFont.cs">
- <SubType>Code</SubType>
+ <SubType>UserControl</SubType>
</Compile>
<Compile Include="SaveFont.Designer.cs">
<DependentUpon>SaveFont.cs</DependentUpon>
@@ -186,4 +193,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified: trunk/Tools/FontCreator/FontCreatorProgram.cs
===================================================================
--- trunk/Tools/FontCreator/FontCreatorProgram.cs 2009-12-02 21:04:43 UTC (rev 1140)
+++ trunk/Tools/FontCreator/FontCreatorProgram.cs 2009-12-05 09:28:38 UTC (rev 1141)
@@ -35,12 +35,29 @@
frm.Show();
Properties.Settings.Default.Reload();
- if (Properties.Settings.Default.SkipWarning == false)
+
+ // workaround for bug in mono
+ bool skipWarning = false;
+
+ try
+ {
+ skipWarning = Properties.Settings.Default.SkipWarning;
+ }
+ catch
+ {}
+
+ if (skipWarning == false)
{
new frmWarningSplash().ShowDialog(frm);
}
- Properties.Settings.Default.Save();
+ try
+ {
+ Properties.Settings.Default.Save();
+ }
+ catch
+ { }
+
Application.Run(frm);
}
Modified: trunk/Tools/FontCreator/frmWarningSplash.cs
===================================================================
--- trunk/Tools/FontCreator/frmWarningSplash.cs 2009-12-02 21:04:43 UTC (rev 1140)
+++ trunk/Tools/FontCreator/frmWarningSplash.cs 2009-12-05 09:28:38 UTC (rev 1141)
@@ -19,7 +19,12 @@
private void btnOK_Click(object sender, EventArgs e)
{
- Properties.Settings.Default.SkipWarning = chkSkipWarning.Checked;
+ try
+ {
+ Properties.Settings.Default.SkipWarning = chkSkipWarning.Checked;
+ }
+ catch
+ { }
}
}
}
Modified: trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj
===================================================================
--- trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj 2009-12-02 21:04:43 UTC (rev 1140)
+++ trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj 2009-12-05 09:28:38 UTC (rev 1141)
@@ -1,12 +1,13 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{91F57346-B574-4D52-9EB0-AA191B552C94}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon></ApplicationIcon>
+ <ApplicationIcon>
+ </ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>NotebookLib</AssemblyName>
@@ -16,9 +17,11 @@
<DelaySign>false</DelaySign>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputType>Library</OutputType>
- <AppDesignerFolder></AppDesignerFolder>
+ <AppDesignerFolder>
+ </AppDesignerFolder>
<RootNamespace>NotebookLib</RootNamespace>
- <StartupObject></StartupObject>
+ <StartupObject>
+ </StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -29,7 +32,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -38,7 +42,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -47,7 +52,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@@ -56,32 +62,33 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
- <Name>System</Name>
+ <Name>System</Name>
</Reference>
<Reference Include="System.Core">
- <Name>System.Core</Name>
+ <Name>System.Core</Name>
</Reference>
<Reference Include="System.Data">
- <Name>System.Data</Name>
+ <Name>System.Data</Name>
</Reference>
<Reference Include="System.Deployment">
- <Name>System.Deployment</Name>
+ <Name>System.Deployment</Name>
</Reference>
<Reference Include="System.Design">
- <Name>System.Design</Name>
+ <Name>System.Design</Name>
</Reference>
<Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
+ <Name>System.Drawing</Name>
</Reference>
<Reference Include="System.Windows.Forms">
- <Name>System.Windows.Forms</Name>
+ <Name>System.Windows.Forms</Name>
</Reference>
<Reference Include="System.Xml">
- <Name>System.Xml</Name>
+ <Name>System.Xml</Name>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -91,7 +98,7 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="HSeparator.cs">
- <SubType>Code</SubType>
+ <SubType>UserControl</SubType>
</Compile>
<Compile Include="HSeparator.Designer.cs">
<DependentUpon>HSeparator.cs</DependentUpon>
@@ -110,14 +117,14 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="Notebook.cs">
- <SubType>Code</SubType>
+ <SubType>UserControl</SubType>
</Compile>
<Compile Include="Notebook.Designer.cs">
<DependentUpon>Notebook.cs</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="NotebookPage.cs">
- <SubType>Code</SubType>
+ <SubType>Component</SubType>
</Compile>
<Compile Include="NotebookPage.Designer.cs">
<DependentUpon>NotebookPage.cs</DependentUpon>
@@ -136,19 +143,19 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="FlatTabs\FlatTabNavigator.cs">
- <SubType>Code</SubType>
+ <SubType>Component</SubType>
</Compile>
<Compile Include="FlatTabs\FlatTabProperties.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ListBookNavigator\ListBookNavigator.cs">
- <SubType>Code</SubType>
+ <SubType>Component</SubType>
</Compile>
<Compile Include="ListBookNavigator\ListBookProperties.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="NoNavigator\NoNavigator.cs">
- <SubType>Code</SubType>
+ <SubType>Component</SubType>
</Compile>
<Compile Include="NoNavigator\NoNavigatorProperties.cs">
<SubType>Code</SubType>
@@ -193,4 +200,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified: trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj
===================================================================
--- trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj 2009-12-02 21:04:43 UTC (rev 1140)
+++ trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj 2009-12-05 09:28:38 UTC (rev 1141)
@@ -1,12 +1,13 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C653C244-F604-4BA4-8822-D04FA9ACEFA5}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon></ApplicationIcon>
+ <ApplicationIcon>
+ </ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>PackedSpriteCreator</AssemblyName>
@@ -16,9 +17,11 @@
<DelaySign>false</DelaySign>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputType>WinExe</OutputType>
- <AppDesignerFolder></AppDesignerFolder>
+ <AppDesignerFolder>
+ </AppDesignerFolder>
<RootNamespace>PackedSpriteCreator</RootNamespace>
- <StartupObject></StartupObject>
+ <StartupObject>
+ </StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -29,7 +32,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -38,7 +42,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -47,7 +52,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@@ -56,23 +62,24 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
- <Name>System</Name>
+ <Name>System</Name>
</Reference>
<Reference Include="System.Core">
- <Name>System.Core</Name>
+ <Name>System.Core</Name>
</Reference>
<Reference Include="System.Data">
- <Name>System.Data</Name>
+ <Name>System.Data</Name>
</Reference>
<Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
+ <Name>System.Drawing</Name>
</Reference>
<Reference Include="System.Windows.Forms">
- <Name>System.Windows.Forms</Name>
+ <Name>System.Windows.Forms</Name>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -94,21 +101,21 @@
</ItemGroup>
<ItemGroup>
<Compile Include="frmAddSpriteFrames.cs">
- <SubType>Code</SubType>
+ <SubType>Form</SubType>
</Compile>
<Compile Include="frmAddSpriteFrames.Designer.cs">
<DependentUpon>frmAddSpriteFrames.cs</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="frmNewSprite.cs">
- <SubType>Code</SubType>
+ <SubType>Form</SubType>
</Compile>
<Compile Include="frmNewSprite.Designer.cs">
<DependentUpon>frmNewSprite.cs</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="frmSpriteCreator.cs">
- <SubType>Code</SubType>
+ <SubType>Form</SubType>
</Compile>
<Compile Include="frmSpriteCreator.Designer.cs">
<DependentUpon>frmSpriteCreator.cs</DependentUpon>
@@ -121,7 +128,7 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="SpriteEditor.cs">
- <SubType>Code</SubType>
+ <SubType>UserControl</SubType>
</Compile>
<Compile Include="SpriteEditor.Designer.cs">
<DependentUpon>SpriteEditor.cs</DependentUpon>
@@ -172,4 +179,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified: trunk/Tools/PackedSpriteCreator/SpriteRenderer.cs
===================================================================
--- trunk/Tools/PackedSpriteCreator/SpriteRenderer.cs 2009-12-02 21:04:43 UTC (rev 1140)
+++ trunk/Tools/PackedSpriteCreator/SpriteRenderer.cs 2009-12-05 09:28:38 UTC (rev 1141)
@@ -17,7 +17,7 @@
}
public Color BackgroundColor { get; set; }
- public void DrawSprite(IRenderTarget renderTarget, Sprite sprite)
+ public void DrawSprite(FrameBuffer renderTarget, Sprite sprite)
{
if (renderTarget == null)
return;
Modified: trunk/Tools/ResourceEditor/ResourceEditor.csproj
===================================================================
--- trunk/Tools/ResourceEditor/ResourceEditor.csproj 2009-12-02 21:04:43 UTC (rev 1140)
+++ trunk/Tools/ResourceEditor/ResourceEditor.csproj 2009-12-05 09:28:38 UTC (rev 1141)
@@ -1,12 +1,13 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon></ApplicationIcon>
+ <ApplicationIcon>
+ </ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>ResourceEditor</AssemblyName>
@@ -16,9 +17,11 @@
<DelaySign>false</DelaySign>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputType>WinExe</OutputType>
- <AppDesignerFolder></AppDesignerFolder>
+ <AppDesignerFolder>
+ </AppDesignerFolder>
<RootNamespace>ResourceEditor</RootNamespace>
- <StartupObject></StartupObject>
+ <StartupObject>
+ </StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -29,7 +32,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -38,7 +42,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -47,7 +52,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@@ -56,26 +62,27 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
- <Name>System</Name>
+ <Name>System</Name>
</Reference>
<Reference Include="System.Core">
- <Name>System.Core</Name>
+ <Name>System.Core</Name>
</Reference>
<Reference Include="System.Data">
- <Name>System.Data</Name>
+ <Name>System.Data</Name>
</Reference>
<Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
+ <Name>System.Drawing</Name>
</Reference>
<Reference Include="System.Windows.Forms">
- <Name>System.Windows.Forms</Name>
+ <Name>System.Windows.Forms</Name>
</Reference>
<Reference Include="System.Xml">
- <Name>System.Xml</Name>
+ <Name>System.Xml</Name>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -102,7 +109,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="frmResourceEditor.cs">
- <SubType>Code</SubType>
+ <SubType>Form</SubType>
</Compile>
<Compile Include="frmRe...
[truncated message content] |
|
From: <ka...@us...> - 2009-12-06 04:40:36
|
Revision: 1146
http://agate.svn.sourceforge.net/agate/?rev=1146&view=rev
Author: kanato
Date: 2009-12-06 04:40:22 +0000 (Sun, 06 Dec 2009)
Log Message:
-----------
Add in large sans font.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/InternalResources/Data.cs
trunk/AgateLib/InternalResources/Fonts.zip
trunk/Examples/BallBuster.Net/CImage.cs
trunk/Examples/BallBuster.Net/main.cs
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-06 02:18:07 UTC (rev 1145)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-06 04:40:22 UTC (rev 1146)
@@ -637,6 +637,17 @@
}
/// <summary>
+ /// The default AgateLib sans serif font at 24 points.
+ /// </summary>
+ /// <remarks>
+ /// AgateSans was rasterized from Bitstream Vera Sans.
+ /// </remarks>
+ public static FontSurface AgateSans24
+ {
+ get { return InternalResources.Data.AgateSans24; }
+ }
+
+ /// <summary>
/// The default AgateLib serif font at 10 points.
/// </summary>
/// <remarks>
Modified: trunk/AgateLib/InternalResources/Data.cs
===================================================================
--- trunk/AgateLib/InternalResources/Data.cs 2009-12-06 02:18:07 UTC (rev 1145)
+++ trunk/AgateLib/InternalResources/Data.cs 2009-12-06 04:40:22 UTC (rev 1146)
@@ -89,6 +89,10 @@
{
get { return GetFont(mSans, 14, "AgateSans-14"); }
}
+ internal static FontSurface AgateSans24
+ {
+ get { return GetFont(mSans, 24, "AgateSans-24"); }
+ }
internal static FontSurface AgateSerif10
{
Modified: trunk/AgateLib/InternalResources/Fonts.zip
===================================================================
(Binary files differ)
Modified: trunk/Examples/BallBuster.Net/CImage.cs
===================================================================
--- trunk/Examples/BallBuster.Net/CImage.cs 2009-12-06 02:18:07 UTC (rev 1145)
+++ trunk/Examples/BallBuster.Net/CImage.cs 2009-12-06 04:40:22 UTC (rev 1146)
@@ -58,8 +58,10 @@
public void preload()
{
- this.font = new FontSurface("Arial", 11.0f);
- this.largeFont = new FontSurface("Arial", 22.0f);
+ this.font = FontSurface.AgateSans10;
+ this.largeFont = FontSurface.AgateSans24;
+ this.largeFont.SetScale(0.8, 0.8);
+
this.palogo = new Sprite(spritesSrc, "palogo");
}
Modified: trunk/Examples/BallBuster.Net/main.cs
===================================================================
--- trunk/Examples/BallBuster.Net/main.cs 2009-12-06 02:18:07 UTC (rev 1145)
+++ trunk/Examples/BallBuster.Net/main.cs 2009-12-06 04:40:22 UTC (rev 1146)
@@ -1645,6 +1645,7 @@
{
Display.BeginFrame();
+ img.largeFont.SetScale(0.8, 0.8);
median = (int)Timing.TotalMilliseconds - start;
Display.Clear(Color.White);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-31 08:12:13
|
Revision: 1172
http://agate.svn.sourceforge.net/agate/?rev=1172&view=rev
Author: kanato
Date: 2009-12-31 08:12:05 +0000 (Thu, 31 Dec 2009)
Log Message:
-----------
Integrate Tao.Sdl source code into AgateSDL.
Add debug output to XAud2/XAudio2_StreamingSoundBuffer.cs.
Make text useful in Lighting3DTest.cs.
Modified Paths:
--------------
trunk/Drivers/AgateSDL/AgateSDL.csproj
trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
trunk/Tests/Shaders/Lighting3DTest.cs
Added Paths:
-----------
trunk/Drivers/AgateSDL/AgateSDL.dll.config
trunk/Drivers/AgateSDL/Tao.Sdl/
trunk/Drivers/AgateSDL/Tao.Sdl/AUTHORS
trunk/Drivers/AgateSDL/Tao.Sdl/COPYING
trunk/Drivers/AgateSDL/Tao.Sdl/README
trunk/Drivers/AgateSDL/Tao.Sdl/Sdl.cs
trunk/Drivers/AgateSDL/Tao.Sdl/SdlGfx.cs
trunk/Drivers/AgateSDL/Tao.Sdl/SdlMixer.cs
trunk/Drivers/AgateSDL/Tao.Sdl/Smpeg.cs
Removed Paths:
-------------
trunk/Drivers/AgateSDL/Tao.Sdl.dll
trunk/Drivers/AgateSDL/Tao.Sdl.dll.config
Modified: trunk/Drivers/AgateSDL/AgateSDL.csproj
===================================================================
--- trunk/Drivers/AgateSDL/AgateSDL.csproj 2009-12-30 20:42:39 UTC (rev 1171)
+++ trunk/Drivers/AgateSDL/AgateSDL.csproj 2009-12-31 08:12:05 UTC (rev 1172)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{00C7FA95-98F4-43D9-9B63-34122B1DB003}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -150,12 +150,13 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
- <None Include="Tao.Sdl.dll.config">
+ <Compile Include="Tao.Sdl\Sdl.cs" />
+ <Compile Include="Tao.Sdl\SdlGfx.cs" />
+ <Compile Include="Tao.Sdl\SdlMixer.cs" />
+ <Compile Include="Tao.Sdl\Smpeg.cs" />
+ <None Include="AgateSDL.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
- <None Include="Tao.Sdl.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
<None Include="SDL.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -174,6 +175,9 @@
<None Include="Readme-SDL.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
+ <None Include="Tao.Sdl\AUTHORS" />
+ <None Include="Tao.Sdl\COPYING" />
+ <None Include="Tao.Sdl\README" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
Copied: trunk/Drivers/AgateSDL/AgateSDL.dll.config (from rev 1157, trunk/Drivers/AgateSDL/Tao.Sdl.dll.config)
===================================================================
--- trunk/Drivers/AgateSDL/AgateSDL.dll.config (rev 0)
+++ trunk/Drivers/AgateSDL/AgateSDL.dll.config 2009-12-31 08:12:05 UTC (rev 1172)
@@ -0,0 +1,6 @@
+<configuration>
+ <dllmap os="linux" dll="SDL.dll" target="libSDL-1.2.so.0"/>
+ <dllmap os="linux" dll="SDL_mixer.dll" target="libSDL_mixer-1.2.so.0"/>
+ <dllmap os="osx" dll="SDL.dll" target="SDL.framework/SDL"/>
+ <dllmap os="osx" dll="SDL_mixer.dll" target="SDL_mixer.framework/SDL_mixer"/>
+</configuration>
Added: trunk/Drivers/AgateSDL/Tao.Sdl/AUTHORS
===================================================================
--- trunk/Drivers/AgateSDL/Tao.Sdl/AUTHORS (rev 0)
+++ trunk/Drivers/AgateSDL/Tao.Sdl/AUTHORS 2009-12-31 08:12:05 UTC (rev 1172)
@@ -0,0 +1 @@
+David Hudson (je...@ya...)
Added: trunk/Drivers/AgateSDL/Tao.Sdl/COPYING
===================================================================
--- trunk/Drivers/AgateSDL/Tao.Sdl/COPYING (rev 0)
+++ trunk/Drivers/AgateSDL/Tao.Sdl/COPYING 2009-12-31 08:12:05 UTC (rev 1172)
@@ -0,0 +1,22 @@
+MIT License
+Copyright \xA92003-2006 Tao Framework Team
+http://www.taoframework.com
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
Added: trunk/Drivers/AgateSDL/Tao.Sdl/README
===================================================================
--- trunk/Drivers/AgateSDL/Tao.Sdl/README (rev 0)
+++ trunk/Drivers/AgateSDL/Tao.Sdl/README 2009-12-31 08:12:05 UTC (rev 1172)
@@ -0,0 +1,19 @@
+Tao.Sdl 1.2.12.0
+Copyright \xA92003-2005 Tao Framework Team
+http://www.taoframework.com
+All rights reserved.
+
+Tao.Sdl is an SDL API binding for .NET, implementing SDL 1.2.12.
+
+Change Log:
+1.2.13.0 - January 2008:
+ Updated to latest version of SDL.
+1.2.12.0 - August 2007:
+ Updated to latest version of SDL.
+1.2.11 - June 2006:
+ Updated to latest version of SDL.
+1.2.10.0 - June 15, 2006:
+ Updated to latest version of SDL.
+1.2.7.0 - April 20, 2004:
+ Initial release. Special thanks to Dave Hudson for doing most of this
+ implementation.
Added: trunk/Drivers/AgateSDL/Tao.Sdl/Sdl.cs
===================================================================
--- trunk/Drivers/AgateSDL/Tao.Sdl/Sdl.cs (rev 0)
+++ trunk/Drivers/AgateSDL/Tao.Sdl/Sdl.cs 2009-12-31 08:12:05 UTC (rev 1172)
@@ -0,0 +1,13290 @@
+#region License
+/*
+MIT License
+Copyright \xA92003-2006 Tao Framework Team
+http://www.taoframework.com
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+#endregion License
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Security;
+using System.Text;
+
+namespace Tao.Sdl
+{
+ #region Class Documentation
+ /// <summary>
+ /// Simple DirectMedia Layer binding for .NET, implementing SDL 1.2.13.
+ /// </summary>
+ /// <remarks>
+ /// This library is designed to make it easy to write games that run
+ /// the .NET runtime using the various native high-performance media
+ /// interfaces, (for video, audio, etc) and presenting a single
+ /// source-code level API to your application. This is a fairly
+ /// low level API, but using this, completely portable applications
+ /// can be written with a great deal of flexibility.
+ /// <p>An introduction to SDL can be found online at: http://www.libsdl.org/intro/ </p>
+ /// <p>Binds to functions and definitions in SDL.dll or libSDL.so.</p>
+ /// </remarks>
+ #endregion Class Documentation
+ [SuppressUnmanagedCodeSecurityAttribute()]
+ public static class Sdl
+ {
+ #region Private Constants
+ #region string SDL_NATIVE_LIBRARY
+ /// <summary>
+ /// Specifies SDL's native library archive.
+ /// </summary>
+ /// <remarks>
+ /// Specifies SDL.dll everywhere; will be mapped via .config for mono.
+ /// </remarks>
+ private const string SDL_NATIVE_LIBRARY = "SDL.dll";
+ #endregion string SDL_NATIVE_LIBRARY
+
+ #region CallingConvention CALLING_CONVENTION
+ /// <summary>
+ /// Specifies the calling convention.
+ /// </summary>
+ /// <remarks>
+ /// Specifies <see cref="CallingConvention.Cdecl" />
+ /// for Windows and Linux.
+ /// </remarks>
+ private const CallingConvention CALLING_CONVENTION =
+ CallingConvention.Cdecl;
+ #endregion CallingConvention CALLING_CONVENTION
+
+ private const int BYTE_SIZE = 8;
+ #endregion Private Constants
+
+ #region Private Methods
+ // OS X compatibility.
+ [DllImport("/System/Library/Frameworks/Cocoa.framework/Cocoa", EntryPoint = "NSApplicationLoad")]
+ private static extern void NSApplicationLoad();
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="name"></param>
+ /// <returns></returns>
+ [DllImport("libobjc.dylib", EntryPoint = "objc_getClass")]
+ public static extern int objc_getClass(string name);
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="name"></param>
+ /// <returns></returns>
+ [DllImport("libobjc.dylib", EntryPoint = "sel_registerName")]
+ public static extern int sel_registerName(string name);
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="self"></param>
+ /// <param name="cmd"></param>
+ /// <returns></returns>
+ [DllImport("libobjc.dylib", EntryPoint = "objc_msgSend")]
+ public static extern int objc_msgSend(int self, int cmd);
+
+ #endregion Private Methods
+
+ #region Public Constants
+ #region SDL.h
+ #region SDL_INIT_TIMER
+ /// <summary>
+ /// The timer subsystem.
+ /// </summary>
+ // #define SDL_INIT_TIMER 0x00000001
+ public const int SDL_INIT_TIMER = 0x00000001;
+ #endregion SDL_INIT_TIMER
+
+ #region SDL_INIT_AUDIO
+ /// <summary>
+ /// The audio subsystem.
+ /// </summary>
+ // #define SDL_INIT_AUDIO 0x00000010
+ public const int SDL_INIT_AUDIO = 0x00000010;
+ #endregion SDL_INIT_AUDIO
+
+ #region SDL_INIT_VIDEO
+ /// <summary>
+ /// The video subsystem.
+ /// </summary>
+ // #define SDL_INIT_VIDEO 0x00000020
+ public const int SDL_INIT_VIDEO = 0x00000020;
+ #endregion SDL_INIT_VIDEO
+
+ #region SDL_INIT_CDROM
+ /// <summary>
+ /// The CD-ROM subsystem.
+ /// </summary>
+ // #define SDL_INIT_CDROM 0x00000100
+ public const int SDL_INIT_CDROM = 0x00000100;
+ #endregion SDL_INIT_CDROM
+
+ #region SDL_INIT_JOYSTICK
+ /// <summary>
+ /// The joystick subsystem.
+ /// </summary>
+ // #define SDL_INIT_JOYSTICK 0x00000200
+ public const int SDL_INIT_JOYSTICK = 0x00000200;
+ #endregion SDL_INIT_JOYSTICK
+
+ #region SDL_INIT_NOPARACHUTE
+ /// <summary>
+ /// Prevents SDL from catching fatal signals.
+ /// </summary>
+ // #define SDL_INIT_NOPARACHUTE 0x00100000
+ public const int SDL_INIT_NOPARACHUTE = 0x00100000;
+ #endregion SDL_INIT_NOPARACHUTE
+
+ #region SDL_INIT_EVENTTHREAD
+ /// <summary>
+ /// Not supported on all OS's.
+ /// </summary>
+ // #define SDL_INIT_EVENTTHREAD 0x01000000
+ public const int SDL_INIT_EVENTTHREAD = 0x01000000;
+ #endregion SDL_INIT_EVENTTHREAD
+
+ #region SDL_INIT_EVERYTHING
+ /// <summary>
+ /// All subsystems.
+ /// These are the flags which may be passed to SDL_Init()
+ /// -- you should specify the subsystems which you will be
+ /// using in your application..
+ /// </summary>
+ // #define SDL_INIT_EVERYTHING 0x0000FFFF
+ public const int SDL_INIT_EVERYTHING = 0x0000FFFF;
+ #endregion SDL_INIT_EVERYTHING
+ #endregion SDL.h
+
+ #region SDL_active.h
+ #region SDL_APPMOUSEFOCUS
+ /// <summary>
+ /// The app has mouse coverage
+ /// </summary>
+ /// <remarks>
+ /// The available application states
+ /// </remarks>
+ public const byte SDL_APPMOUSEFOCUS = 0x01;
+ #endregion SDL_APPMOUSEFOCUS
+
+ #region SDL_APPINPUTFOCUS
+ /// <summary>
+ /// The app has input focus
+ /// </summary>
+ /// <remarks>
+ /// The available application states
+ /// </remarks>
+ public const byte SDL_APPINPUTFOCUS = 0x02;
+ #endregion SDL_APPINPUTFOCUS
+
+ #region SDL_APPACTIVE
+ /// <summary>
+ /// The application is active
+ /// </summary>
+ /// <remarks>
+ /// The available application states
+ /// </remarks>
+ public const byte SDL_APPACTIVE = 0x04;
+ #endregion SDL_APPACTIVE
+ #endregion SDL_active.h
+
+ #region SDL_audio.h
+ #region AUDIO_U8
+ /// <summary>
+ /// Unsigned 8-bit samples.
+ /// </summary>
+ public const short AUDIO_U8 = 0x0008;
+ #endregion AUDIO_U8
+
+ #region AUDIO_S8
+ /// <summary>
+ /// Signed 8-bit samples.
+ /// </summary>
+ public const short AUDIO_S8 = unchecked((short)0x8008);
+ #endregion AUDIO_S8
+
+ #region AUDIO_U16LSB
+ /// <summary>
+ /// Unsigned 16-bit little-endian samples.
+ /// </summary>
+ public const short AUDIO_U16LSB = 0x0010;
+ #endregion AUDIO_U16LSB
+
+ #region AUDIO_S16LSB
+ /// <summary>
+ /// Signed 16-bit little-endian samples
+ /// </summary>
+ public const short AUDIO_S16LSB = unchecked((short)0x8010);
+ #endregion AUDIO_S16LSB
+
+ #region AUDIO_U16MSB
+ /// <summary>
+ /// Unsigned 16-bit big-endian samples
+ /// </summary>
+ public const short AUDIO_U16MSB = 0x1010;
+ #endregion AUDIO_U16MSB
+
+ #region AUDIO_S16MSB
+ /// <summary>
+ /// Signed 16-bit big-endian samples
+ /// </summary>
+ public const short AUDIO_S16MSB = unchecked((short)0x9010);
+ #endregion AUDIO_S16MSB
+
+ #region AUDIO_U16
+ /// <summary>
+ /// Unsigned 16-bit little-endian samples
+ /// </summary>
+ public static readonly short AUDIO_U16 = AUDIO_U16LSB;
+ #endregion AUDIO_U16
+
+ #region AUDIO_S16
+ /// <summary>
+ /// Signed 16-bit little-endian samples
+ /// </summary>
+ public static readonly short AUDIO_S16 = unchecked((short)AUDIO_S16LSB);
+ #endregion AUDIO_S16
+
+ #region SDL_MIX_MAXVOLUME
+ /// <summary>
+ /// Full audio volume
+ /// </summary>
+ public const int SDL_MIX_MAXVOLUME = 128;
+ #endregion SDL_MIX_MAXVOLUME
+ #endregion SDL_audio.h
+
+ // SDL_byteorder.h -- deprecated
+
+ #region SDL_cdrom.h
+ #region SDL_MAX_TRACKS
+ /// <summary>
+ /// The maximum number of CD-ROM tracks on a disk
+ /// </summary>
+ public const int SDL_MAX_TRACKS = 99;
+ #endregion SDL_MAX_TRACKS
+
+ #region SDL_AUDIO_TRACK
+ /// <summary>
+ /// The types of CD-ROM track possible
+ /// </summary>
+ public const int SDL_AUDIO_TRACK = 0x00;
+ #endregion SDL_AUDIO_TRACK
+
+ #region SDL_DATA_TRACK
+ /// <summary>
+ /// The types of CD-ROM track possible
+ /// </summary>
+ public const int SDL_DATA_TRACK = 0x04;
+ #endregion SDL_DATA_TRACK
+
+ #region CD_FPS
+ /// <summary>
+ /// Frames per second.
+ /// </summary>
+ public const int CD_FPS = 75;
+ #endregion CD_FPS
+ #endregion SDL_cdrom.h
+
+ // SDL_config.h -- none
+ // SDL_copying.h -- none
+ // SDL_cpuinfo.h -- none
+
+ #region SDL_endian.h
+ #region SDL_LIL_ENDIAN
+ /// <summary>
+ /// Little Endian
+ /// </summary>
+ /// <remarks>
+ /// e.g. i386 machines</remarks>
+ public const int SDL_LIL_ENDIAN = 1234;
+ #endregion SDL_LIL_ENDIAN
+
+ #region SDL_BIG_ENDIAN
+ /// <summary>
+ /// Big Endian
+ /// </summary>
+ /// <remarks>
+ /// e.g. Macs
+ /// </remarks>
+ public const int SDL_BIG_ENDIAN = 4321;
+ #endregion SDL_BIG_ENDIAN
+ #endregion SDL_endian.h
+
+ // SDL_error.h -- none
+
+ #region SDL_events.h
+ /// <summary>
+ /// Button in pressed state.
+ /// </summary>
+ /// <remarks>
+ /// SDL_events.h defines SDL_PRESSED and <see cref="SDL_RELEASED"/>
+ /// in a nameless enum. Defining SDL_PRESSED as a const works
+ /// better for Tao.SDL purposes</remarks>
+ /// <seealso cref="SDL_RELEASED"/>
+ public const byte SDL_PRESSED = 0x01;
+ /// <summary>
+ /// Button in released state.
+ /// </summary>
+ /// <remarks>
+ /// SDL_events.h defines <see cref="SDL_PRESSED"/> and SDL_RELEASED
+ /// in a nameless enum. Defining SDL_RELEASED as a const works
+ /// better for Tao.SDL purposes</remarks>
+ /// <seealso cref="SDL_PRESSED"/>
+ public const byte SDL_RELEASED = 0x00;
+
+ /// <summary>
+ /// This is the mask which refers to all hotkey bindings.
+ /// </summary>
+ public const int SDL_ALLEVENTS = unchecked((int)0xFFFFFFFF);
+
+ /// <summary>
+ /// If 'state' is set to SDL_QUERY, SDL_EventState()
+ /// will return the
+ /// current processing state of the specified event.
+ /// </summary>
+ public const int SDL_QUERY = -1;
+ /// <summary>
+ /// If 'state' is set to SDL_IGNORE, that event will be
+ /// automatically dropped
+ /// from the event queue and will not event be filtered.
+ /// </summary>
+ public const int SDL_IGNORE = 0;
+ /// <summary>
+ ///
+ /// </summary>
+ public const int SDL_DISABLE = 0;
+ /// <summary>
+ /// If 'state' is set to SDL_ENABLE, that event will
+ /// be processed normally.
+ /// </summary>
+ public const int SDL_ENABLE = 1;
+ #endregion SDL_events.h
+
+ // SDL_getenv.h -- deprecated
+
+ #region SDL_joystick.h
+ /// <summary>
+ /// Indicates which position a joystick hat is pressed in
+ /// </summary>
+ public const byte SDL_HAT_CENTERED = 0x00;
+
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_HAT_UP = 0x01;
+
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_HAT_RIGHT = 0x02;
+
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_HAT_DOWN = 0x04;
+
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_HAT_LEFT = 0x08;
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_HAT_RIGHTUP = (SDL_HAT_RIGHT | SDL_HAT_UP);
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_HAT_RIGHTDOWN = (SDL_HAT_RIGHT | SDL_HAT_DOWN);
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_HAT_LEFTUP = (SDL_HAT_LEFT | SDL_HAT_UP);
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_HAT_LEFTDOWN = (SDL_HAT_LEFT | SDL_HAT_DOWN);
+ #endregion SDL_joystick.h
+
+ #region SDL_keyboard.h
+ /// <summary>
+ /// This is the mask which refers to all hotkey bindings.
+ /// </summary>
+ public const int SDL_ALL_HOTKEYS = unchecked((int)0xFFFFFFFF);
+
+ /// <summary>
+ /// Enable/Disable keyboard repeat. Keyboard repeat defaults to off.
+ /// 'delay' is the initial delay in ms between the time
+ /// when a key is pressed,
+ /// and keyboard repeat begins.
+ /// </summary>
+ /// <seealso cref="SDL_EnableKeyRepeat"/>
+ public const int SDL_DEFAULT_REPEAT_DELAY = 500;
+
+ /// <summary>
+ /// Enable/Disable keyboard repeat. Keyboard repeat defaults to off.
+ /// 'interval' is the time in ms between keyboard repeat events.
+ /// </summary>
+ /// <seealso cref="SDL_EnableKeyRepeat"/>
+ public const int SDL_DEFAULT_REPEAT_INTERVAL = 30;
+ #endregion SDL_keyboard.h
+
+ #region SDL_keysym.h
+ /// <summary>
+ /// Both CTRL keys.
+ /// </summary>
+ public const short KMOD_CTRL =
+ (short)(KMOD_LCTRL | KMOD_RCTRL);
+
+ /// <summary>
+ /// Both SHIFT keys.
+ /// </summary>
+ public const short KMOD_SHIFT =
+ (short)(KMOD_LSHIFT | KMOD_RSHIFT);
+
+ /// <summary>
+ /// Both ALT keys.
+ /// </summary>
+ public const short KMOD_ALT =
+ (short)(KMOD_LALT | KMOD_RALT);
+
+ /// <summary>
+ /// Both META keys.
+ /// </summary>
+ public const short KMOD_META = (
+ short)(KMOD_LMETA | KMOD_RMETA);
+ #endregion SDL_keysym.h
+
+ // SDL_loadso.h -- none
+ // SDL_main.h -- none
+
+ #region SDL_mouse.h
+ /// <summary>
+ /// Used as a mask when testing buttons in buttonstate
+ /// Button 1: Left mouse button
+ /// </summary>
+ public const byte SDL_BUTTON_LEFT = 1;
+ /// <summary>
+ /// Button 2: Middle mouse button
+ /// </summary>
+ public const byte SDL_BUTTON_MIDDLE = 2;
+ /// <summary>
+ /// Button 3: Right mouse button
+ /// </summary>
+ public const byte SDL_BUTTON_RIGHT = 3;
+ /// <summary>
+ /// Button 4: Mouse wheel up (may also be a real button)
+ /// </summary>
+ public const byte SDL_BUTTON_WHEELUP = 4;
+ /// <summary>
+ /// Button 5: Mouse wheel down (may also be a real button)
+ /// </summary>
+ public const byte SDL_BUTTON_WHEELDOWN = 5;
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_BUTTON_X1 = 6;
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_BUTTON_X2 = 7;
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_BUTTON_LMASK = SDL_PRESSED << ((byte)SDL_BUTTON_LEFT - 1);
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_BUTTON_MMASK = SDL_PRESSED << ((byte)SDL_BUTTON_MIDDLE - 1);
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_BUTTON_RMASK = SDL_PRESSED << ((byte)SDL_BUTTON_RIGHT - 1);
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_BUTTON_X1MASK = SDL_PRESSED << ((byte)SDL_BUTTON_X1 - 1);
+ /// <summary>
+ ///
+ /// </summary>
+ public const byte SDL_BUTTON_X2MASK = SDL_PRESSED << ((byte)SDL_BUTTON_X2 - 1);
+ #endregion SDL_mouse.h
+
+ #region SDL_mutex.h
+ /// <summary>
+ /// Synchronization functions which can time out return this value
+ /// if they time out.
+ /// </summary>
+ public const int SDL_MUTEX_TIMEDOUT = 1;
+ /// <summary>
+ /// This is the timeout value which corresponds to never time out
+ /// </summary>
+ public const int SDL_MUTEX_MAXWAIT = (~(int)0);
+ #endregion SDL_mutex.h
+
+ // SDL_name.h -- none
+ // SDL_opengl.h -- TODO superceded by Tao.OpenGL?
+ // SDL_platform.h -- none
+ // SDL_quit.h -- none
+
+ #region SDL_rwops.h
+ /// <summary>
+ /// Seek from the beginning of data
+ /// </summary>
+ public const int RW_SEEK_SET = 0;
+ /// <summary>
+ /// Seek relative to current read point
+ /// </summary>
+ public const int RW_SEEK_CUR = 1;
+ /// <summary>
+ /// Seek relative to the end of data
+ /// </summary>
+ public const int RW_SEEK_END = 2;
+ #endregion SDL_rwops.h
+
+ // SDL_stdinc.h -- TODO skipped for now
+ // SDL_syswm.h -- none
+ // SDL_thread.h -- none
+
+ #region SDL_timer.h
+ #region SDL_TIMESLICE
+ /// <summary>
+ /// The OS scheduler timeslice, in milliseconds.
+ /// </summary>
+ public const int SDL_TIMESLICE = 10;
+ #endregion SDL_TIMESLICE
+
+ #region TIMER_RESOLUTION
+ /// <summary>
+ /// The maximum resolution of the SDL timer on all platforms.
+ /// </summary>
+ /// <remarks>
+ /// Experimentally determined.
+ /// </remarks>
+ public const int TIMER_RESOLUTION = 10;
+ #endregion TIMER_RESOLUTION
+ #endregion SDL_timer.h
+
+ // SDL_types.h - deprecated
+
+ #region SDL_version.h
+ /// <summary>
+ /// Major Version
+ /// </summary>
+ public const int SDL_MAJOR_VERSION = 1;
+ /// <summary>
+ /// Minor Version
+ /// </summary>
+ public const int SDL_MINOR_VERSION = 2;
+ /// <summary>
+ /// Patch Version
+ /// </summary>
+ public const int SDL_PATCHLEVEL = 11;
+ #endregion SDL_version.h
+
+ #region SDL_video.h
+ #region SDL_ALPHA_OPAQUE
+ /// <summary>
+ /// Transparency definition of Opaque
+ /// </summary>
+ /// <remarks>
+ /// Define alpha as the opacity of a surface
+ /// </remarks>
+ public const int SDL_ALPHA_OPAQUE = 255;
+ #endregion SDL_ALPHA_OPAQUE
+
+ #region SDL_ALPHA_TRANSPARENT
+ /// <summary>
+ /// Transparency definition of Transparent
+ /// </summary>
+ /// <remarks>
+ /// Define alpha as the opacity of a surface
+ /// </remarks>
+ public const int SDL_ALPHA_TRANSPARENT = 0;
+ #endregion SDL_ALPHA_TRANSPARENT
+
+ #region SDL_SWSURFACE
+ /// <summary>
+ /// Surface is in system memory
+ /// </summary>
+ public const int SDL_SWSURFACE = 0x00000000;
+ #endregion SDL_SWSURFACE
+
+ #region SDL_HWSURFACE
+ /// <summary>
+ /// Surface is in video memory
+ /// </summary>
+ public const int SDL_HWSURFACE = 0x00000001;
+ #endregion SDL_HWSURFACE
+
+ #region SDL_ASYNCBLIT
+ /// <summary>
+ /// Use asynchronous blits if possible
+ /// </summary>
+ public const int SDL_ASYNCBLIT = 0X00000004;
+ #endregion SDL_ASYNCBLIT
+
+ #region SDL_ANYFORMAT
+ /// <summary>
+ /// Allow any video depth/pixel-format
+ /// </summary>
+ public const int SDL_ANYFORMAT = 0X10000000;
+ #endregion SDL_ANYFORMAT
+
+ #region SDL_HWPALETTE
+ /// <summary>
+ /// Surface has exclusive palette
+ /// </summary>
+ public const int SDL_HWPALETTE = 0x20000000;
+ #endregion SDL_HWPALETTE
+
+ #region SDL_DOUBLEBUF
+ /// <summary>
+ /// Set up double-buffered video mode
+ /// </summary>
+ public const int SDL_DOUBLEBUF = 0X40000000;
+ #endregion SDL_DOUBLEBUF
+
+ #region SDL_FULLSCREEN
+ /// <summary>
+ /// Full screen display surface.
+ /// </summary>
+ // #define SDL_FULLSCREEN 0x80000000
+ public const int SDL_FULLSCREEN = unchecked((int)0x80000000);
+ #endregion SDL_FULLSCREEN
+
+ #region SDL_OPENGL
+ /// <summary>
+ /// Create an OpenGL rendering context
+ /// </summary>
+ public const int SDL_OPENGL = 0x00000002;
+ #endregion SDL_OPENGL
+
+ #region SDL_OPENGLBLIT
+ /// <summary>
+ /// Create an OpenGL rendering context and use it for blitting
+ /// </summary>
+ public const int SDL_OPENGLBLIT = 0X0000000A;
+ #endregion SDL_OPENGLBLIT
+
+ #region SDL_RESIZABLE
+ /// <summary>
+ /// This video mode may be resized
+ /// </summary>
+ public const int SDL_RESIZABLE = 0x00000010;
+ #endregion SDL_RESIZABLE
+
+ #region SDL_NOFRAME
+ /// <summary>
+ /// No window caption or edge frame
+ /// </summary>
+ public const int SDL_NOFRAME = 0X00000020;
+ #endregion SDL_NOFRAME
+
+ #region SDL_HWACCEL
+ /// <summary>
+ /// Blit uses hardware acceleration
+ /// </summary>
+ public const int SDL_HWACCEL = 0x00000100;
+ #endregion SDL_HWACCEL
+
+ #region SDL_SRCCOLORKEY
+ /// <summary>
+ /// Blit uses a source color key
+ /// </summary>
+ public const int SDL_SRCCOLORKEY = 0x00001000;
+ #endregion SDL_SRCCOLORKEY
+
+ #region SDL_RLEACCELOK
+ /// <summary>
+ ///...
[truncated message content] |
|
From: <ka...@us...> - 2014-07-28 03:13:57
|
Revision: 1423
http://sourceforge.net/p/agate/code/1423
Author: kanato
Date: 2014-07-28 03:13:49 +0000 (Mon, 28 Jul 2014)
Log Message:
-----------
Fix serial model to allow exiting.
Modified Paths:
--------------
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/IPrimaryWindow.cs
trunk/Examples/BallBuster.Net/Program.cs
trunk/Examples/Pong/Pong.cs
trunk/Tools/FontCreator/FontCreatorProgram.cs
trunk/Tools/PackedSpriteCreator/SpritePacker.cs
Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs 2014-07-28 03:13:49 UTC (rev 1423)
@@ -41,15 +41,26 @@
get { return (SerialModelParameters)base.Parameters; }
}
+ bool done = false;
+
int ExecuteEntry(Func<int> entryPoint)
{
- OpenTK.Graphics.GraphicsContext.ShareContexts = true;
- var window = AutoCreatedWindow.Impl as IPrimaryWindow;
+ try
+ {
+ OpenTK.Graphics.GraphicsContext.ShareContexts = true;
+ var window = AutoCreatedWindow.Impl as IPrimaryWindow;
- window.ReinitializeFramebuffer();
+ window.ReinitializeFramebuffer();
- return entryPoint();
+ return entryPoint();
+ }
+ finally
+ {
+ var primaryWindow = AutoCreatedWindow.Impl as IPrimaryWindow;
+ primaryWindow.ExitMessageLoop();
+ }
}
+
protected override int BeginModel(Func<int> entryPoint)
{
int retval = 0;
@@ -57,7 +68,6 @@
thread.Start();
var primaryWindow = AutoCreatedWindow.Impl as IPrimaryWindow;
-
primaryWindow.RunApplication();
return retval;
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-07-28 03:13:49 UTC (rev 1423)
@@ -615,5 +615,11 @@
{
Application.Run(frm);
}
+
+
+ public void ExitMessageLoop()
+ {
+ Application.Exit();
+ }
}
}
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-07-28 03:13:49 UTC (rev 1423)
@@ -523,5 +523,11 @@
{
CreateFrameBuffer();
}
+
+
+ public void ExitMessageLoop()
+ {
+ mWindow.Exit();
+ }
}
}
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/IPrimaryWindow.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/IPrimaryWindow.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/IPrimaryWindow.cs 2014-07-28 03:13:49 UTC (rev 1423)
@@ -6,5 +6,7 @@
void RunApplication();
void ReinitializeFramebuffer();
+
+ void ExitMessageLoop();
}
}
Modified: trunk/Examples/BallBuster.Net/Program.cs
===================================================================
--- trunk/Examples/BallBuster.Net/Program.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/Examples/BallBuster.Net/Program.cs 2014-07-28 03:13:49 UTC (rev 1423)
@@ -31,7 +31,7 @@
[STAThread]
static void Main(string[] args)
{
- PassiveModel.Run(args, () =>
+ new PassiveModel(args).Run(() =>
{
BBX bbx = new BBX();
Modified: trunk/Examples/Pong/Pong.cs
===================================================================
--- trunk/Examples/Pong/Pong.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/Examples/Pong/Pong.cs 2014-07-28 03:13:49 UTC (rev 1423)
@@ -6,6 +6,7 @@
using AgateLib.InputLib;
using AgateLib.Platform.WindowsForms.ApplicationModels;
using AgateLib.Platform.WindowsForms.Resources;
+using AgateLib.ApplicationModels;
namespace Pong
{
@@ -18,7 +19,11 @@
[STAThread]
static void Main(string[] args)
{
- PassiveModel.Run(args, () =>
+ new SerialModel(new SerialModelParameters
+ {
+ Arguments = args,
+ ApplicationName = "Pong Example",
+ }).Run(() =>
{
new Program().Run(args);
});
@@ -45,9 +50,6 @@
void Run(string[] args)
{
- DisplayWindow wind = DisplayWindow.CreateWindowed
- ("Pong Example", displayWidth, displayHeight);
-
font = BuiltinResources.AgateSans14;
paddle[0] = new Vector2(50, displayHeight / 2);
@@ -55,11 +57,11 @@
ball = new Vector2(playAreaWidth / 2, displayHeight / 2);
ballvelocity = new Vector2(-70, 70);
- while (wind.IsClosed == false)
+ while (AgateAppModel.IsAlive)
{
Display.BeginFrame();
Display.Clear(Color.DarkGray);
-
+
DrawBorder();
DrawPaddles();
DrawBall();
@@ -69,7 +71,7 @@
Core.KeepAlive();
if (Keyboard.Keys[KeyCode.Escape])
- wind.Dispose();
+ return;
float time_s = (float)Display.DeltaTime / 1000.0f;
Modified: trunk/Tools/FontCreator/FontCreatorProgram.cs
===================================================================
--- trunk/Tools/FontCreator/FontCreatorProgram.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/Tools/FontCreator/FontCreatorProgram.cs 2014-07-28 03:13:49 UTC (rev 1423)
@@ -20,7 +20,7 @@
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- PassiveModel.Run(args, () =>
+ new PassiveModel(args).Run(() =>
{
Directory.CreateDirectory("./images");
Modified: trunk/Tools/PackedSpriteCreator/SpritePacker.cs
===================================================================
--- trunk/Tools/PackedSpriteCreator/SpritePacker.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/Tools/PackedSpriteCreator/SpritePacker.cs 2014-07-28 03:13:49 UTC (rev 1423)
@@ -16,7 +16,7 @@
[STAThread]
static void Main(string[] args)
{
- PassiveModel.Run(args, () =>
+ new PassiveModel(args).Run(() =>
{
System.Windows.Forms.Application.Run(new frmSpriteCreator());
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-24 02:45:25
|
Revision: 1477
http://sourceforge.net/p/agate/code/1477
Author: kanato
Date: 2014-08-24 02:45:10 +0000 (Sun, 24 Aug 2014)
Log Message:
-----------
Initial workings of Windows Phone implementation.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
trunk/AgateLib/Drivers/IPlatformFactory.cs
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/AgateLib/Serialization/Xle/XleSerializer.cs
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs
trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs
trunk/AgateLib.sln
trunk/Tests/DisplayTests/RotatingSpriteTester.cs
trunk/UnitTests/Fakes/FakeDisplayWindow.cs
trunk/UnitTests/Fakes/FakePlatformFactory.cs
trunk/UnitTests/Serialization/Xle/XSTests.cs
trunk/UnitTests/UnitTests.csproj
Added Paths:
-----------
trunk/AgateLib/Drivers/IPlatformSerialization.cs
trunk/AgateLib.Platform.Common/
trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj
trunk/AgateLib.Platform.Common/PlatformImplementation/
trunk/AgateLib.Platform.Common/PlatformImplementation/ActivatorConstructor.cs
trunk/AgateLib.Platform.Common/PlatformImplementation/DiagnosticsStopwatch.cs
trunk/AgateLib.Platform.Common/Properties/
trunk/AgateLib.Platform.Common/Properties/AssemblyInfo.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModelParameters.cs
trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleImpl.cs
trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleTraceListener.cs
trunk/AgateLib.Platform.WindowsPhone/
trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj
trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/
trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs
trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModelParameters.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferSurface.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_DisplayWindow.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_FrameBuffer.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_IndexBuffer.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDL_Lighting3DShader.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Lighting2DShader.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderFactory.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/
trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/FakeFile.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/FakePath.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs
trunk/AgateLib.Platform.WindowsPhone/Interop.cs
trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/
trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs
trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/DiagnosticsStopwatch.cs
trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPPlatformInfo.cs
trunk/AgateLib.Platform.WindowsPhone/Properties/
trunk/AgateLib.Platform.WindowsPhone/Properties/AssemblyInfo.cs
trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs
trunk/AgateLib.Platform.WindowsPhone/packages.config
trunk/Tests.WindowsPhone/
trunk/Tests.WindowsPhone/App.xaml
trunk/Tests.WindowsPhone/App.xaml.cs
trunk/Tests.WindowsPhone/Assets/
trunk/Tests.WindowsPhone/Assets/AlignmentGrid.png
trunk/Tests.WindowsPhone/Assets/ApplicationIcon.png
trunk/Tests.WindowsPhone/Assets/Tiles/
trunk/Tests.WindowsPhone/Assets/Tiles/FlipCycleTileLarge.png
trunk/Tests.WindowsPhone/Assets/Tiles/FlipCycleTileMedium.png
trunk/Tests.WindowsPhone/Assets/Tiles/FlipCycleTileSmall.png
trunk/Tests.WindowsPhone/Assets/Tiles/IconicTileMediumLarge.png
trunk/Tests.WindowsPhone/Assets/Tiles/IconicTileSmall.png
trunk/Tests.WindowsPhone/LocalizedStrings.cs
trunk/Tests.WindowsPhone/MainPage.xaml
trunk/Tests.WindowsPhone/MainPage.xaml.cs
trunk/Tests.WindowsPhone/Properties/
trunk/Tests.WindowsPhone/Properties/AppManifest.xml
trunk/Tests.WindowsPhone/Properties/AssemblyInfo.cs
trunk/Tests.WindowsPhone/Properties/WMAppManifest.xml
trunk/Tests.WindowsPhone/Resources/
trunk/Tests.WindowsPhone/Resources/AppResources.Designer.cs
trunk/Tests.WindowsPhone/Resources/AppResources.resx
trunk/Tests.WindowsPhone/TestScene.cs
trunk/Tests.WindowsPhone/Tests.WindowsPhone.csproj
Removed Paths:
-------------
trunk/AgateLib/Drivers/AgateDriverInfo.cs
trunk/AgateLib/Drivers/AgateDriverReporter.cs
trunk/AgateLib/Drivers/AgateSandBoxLoader.cs
trunk/AgateLib/Drivers/IDesktopDriver.cs
trunk/AgateLib/Drivers/IObjectConstructor.cs
trunk/AgateLib/Drivers/IUserSetSystems.cs
trunk/AgateLib/Drivers/Registrar.cs
trunk/AgateLib/Drivers/TypeID.cs
trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleImpl.cs
trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleTraceListener.cs
trunk/AgateLib.Platform.WindowsForms/Factories/ActivatorConstructor.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/AgateLib.csproj 2014-08-24 02:45:10 UTC (rev 1477)
@@ -34,42 +34,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
- <OutputPath>bin\x86\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugType>full</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
- <OutputPath>bin\x64\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
</ItemGroup>
@@ -157,7 +121,7 @@
<Compile Include="Drivers\IAudioFactory.cs" />
<Compile Include="Drivers\IDisplayFactory.cs" />
<Compile Include="Drivers\IInputFactory.cs" />
- <Compile Include="Drivers\IObjectConstructor.cs" />
+ <Compile Include="Drivers\IPlatformSerialization.cs" />
<Compile Include="Drivers\IPlatformFactory.cs" />
<Compile Include="ApplicationModels\ExitGameException.cs" />
<Compile Include="Extensions\Collections\Generic\ListSorting.cs" />
Modified: trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-24 02:45:10 UTC (rev 1477)
@@ -10,5 +10,28 @@
public SceneAppModelBase(ModelParameters parameters)
: base(parameters)
{ }
+
+ public void Run(Scene scene)
+ {
+ if (SceneStack.Contains(scene) == false)
+ SceneStack.Add(scene);
+
+ try
+ {
+ Initialize();
+ AutoCreateDisplayWindow();
+ PrerunInitialization();
+
+ BeginModel();
+ }
+ finally
+ {
+ //DisposeAutoCreatedWindow();
+
+ //Dispose();
+ }
+ }
+
+ protected abstract void BeginModel();
}
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/Core.cs 2014-08-24 02:45:10 UTC (rev 1477)
@@ -324,7 +324,7 @@
return;
mFactory = factory;
- mPlatform = factory.PlatformFactory.CreatePlatformInfo();
+ mPlatform = factory.PlatformFactory.Info;
mTime = factory.PlatformFactory.CreateStopwatch();
FileSystem.File = factory.PlatformFactory.CreateFile();
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-08-24 02:45:10 UTC (rev 1477)
@@ -284,6 +284,7 @@
/// Gets or sets the position of the cursor, in the
/// client coordinates of the window.
/// </summary>
+ [Obsolete("Don't use this", true)]
public Point MousePosition
{
get { return mImpl.MousePosition; }
@@ -316,51 +317,8 @@
{
get { return mImpl.IsFullScreen; }
}
- /// <summary>
- /// Sets the display to windowed. Does nothing if the display is already
- /// windowed. The DisplayWindow retains the same height and width as the
- /// previous full screen resolution.
- /// </summary>
- [Obsolete("Instead of calling SetWindowed, you should create another DisplayWindow by calling DisplayWindow.CreateWindowed() and Dispose of the full screen DisplayWindow object.")]
- public void SetWindowed()
- {
- mImpl.SetWindowed();
- }
/// <summary>
- /// Sets the display to a full screen Display. This overload uses the
- /// desktop resolution for the full-screen Display.
- /// </summary>
- /// <remarks>
- /// This call is not guaranteed to work; some drivers (eg. GDI) don't support
- /// fullscreen displays. If this fails it returns without any error
- /// thrown. Check to see if it worked by examining IsFullScreen property.
- /// </remarks>
- [Obsolete("Instead of calling SetFullScreen, you should create another DisplayWindow by calling DisplayWindow.CreateFullScreen()")]
- public void SetFullScreen()
- {
- mImpl.SetFullScreen();
- }
- /// <summary>
- /// Sets the display to a full screen Display. The resolution chosen is
- /// driver/video card/monitor dependent, but it should be fairly close to
- /// values specified.
- /// </summary>
- /// <remarks>
- /// This call is not guaranteed to work; some drivers (eg. GDI) don't support
- /// fullscreen displays. If this fails it returns without any error
- /// thrown. Check to see if it worked by examining IsFullScreen property.
- /// </remarks>
- /// <param name="width"></param>
- /// <param name="height"></param>
- /// <param name="bpp"></param>
- [Obsolete("Instead of calling SetFullScreen, you should create another DisplayWindow by calling DisplayWindow.CreateFullScreen()")]
- public void SetFullScreen(int width, int height, int bpp)
- {
- mImpl.SetFullScreen(width, height, bpp);
- }
-
- /// <summary>
/// Creates an orthogonal projection matrix that maps drawing units onto pixels.
/// </summary>
public Matrix4x4 OrthoProjection
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-24 02:45:10 UTC (rev 1477)
@@ -52,28 +52,6 @@
public abstract FrameBufferImpl FrameBuffer { get; }
/// <summary>
- /// Sets the display to windowed. Does nothing if the display is already
- /// windowed. The DisplayWindow retains the same height and width as the
- /// previous full screen resolution.
- /// </summary>
- public abstract void SetWindowed();
-
- /// <summary>
- /// Sets the display to a full screen Display. This overload should use the
- /// same resolution as the desktop environment.
- /// </summary>
- public abstract void SetFullScreen();
- /// <summary>
- /// Sets the display to a full screen Display. The resolution chosen is
- /// driver/video card/monitor dependent, but it should be fairly close to
- /// values specified.
- /// </summary>
- /// <param name="width"></param>
- /// <param name="height"></param>
- /// <param name="bpp"></param>
- public abstract void SetFullScreen(int width, int height, int bpp);
-
- /// <summary>
/// Gets or sets the size of the render area.
/// </summary>
public abstract Size Size { get; set; }
Deleted: trunk/AgateLib/Drivers/AgateDriverInfo.cs
===================================================================
--- trunk/AgateLib/Drivers/AgateDriverInfo.cs 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/Drivers/AgateDriverInfo.cs 2014-08-24 02:45:10 UTC (rev 1477)
@@ -1,216 +0,0 @@
-// 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.Text;
-using AgateLib.AudioLib.ImplementationBase;
-using AgateLib.DisplayLib.ImplementationBase;
-using AgateLib.InputLib.ImplementationBase;
-
-namespace AgateLib.Drivers
-{
- /// <summary>
- /// Class which describes a driver for use by AgateLib. A class
- /// inheriting from AgateDriverReporter should construct AgateDriverInfo
- /// instances for each driver in a plug-in assembly.
- /// </summary>
- [Serializable]
- public class AgateDriverInfo
- {
- private void SetValues(DriverType type, string driverTypeName, string friendlyName, int typeID, int priority)
- {
- mDriverTypeName = driverTypeName;
- mFriendlyName = friendlyName;
- mDriverType = type;
- mDriverTypeID = (int)typeID;
- mPriority = priority;
- }
-
- /// <summary>
- /// Constructs an AgateDriverInfo for a display driver.
- /// </summary>
- /// <param name="typeID">The DisplayTypeID member indicating what the driver uses.</param>
- /// <param name="driverType">The System.Type object for the type inheriting from DisplayImpl.</param>
- /// <param name="friendlyName">A friendly name to show the user when choosing a driver.</param>
- /// <param name="priority">A integer indicating the priority of this driver over others which is used when autoselecting a driver.</param>
- public AgateDriverInfo(DisplayTypeID typeID, Type driverType, string friendlyName, int priority)
- {
- if (typeof(DisplayImpl).IsAssignableFrom(driverType) == false ||
- driverType.IsAbstract == true)
- {
- throw new ArgumentException(string.Format(
- "The type {0} is not a concrete implementation of DisplayImpl."));
- }
-
- SetValues(DriverType.Display, driverType.FullName, friendlyName, (int)typeID, priority);
- }
- /// <summary>
- /// Constructs an AgateDriverInfo for an audio driver.
- /// </summary>
- /// <param name="typeID">The AudioTypeID member indicating what the driver uses.</param>
- /// <param name="driverType">The System.Type object for the type inheriting from AudioImpl.</param>
- /// <param name="friendlyName">A friendly name to show the user when choosing a driver.</param>
- /// <param name="priority">A integer indicating the priority of this driver over others which is used when autoselecting a driver.</param>
- public AgateDriverInfo(AudioTypeID typeID, Type driverType, string friendlyName, int priority)
- {
- if (typeof(AudioImpl).IsAssignableFrom(driverType) == false ||
- driverType.IsAbstract == true)
- {
- throw new ArgumentException(string.Format(
- "The type {0} is not a concrete implementation of AudioImpl."));
- }
-
- SetValues(DriverType.Audio, driverType.FullName, friendlyName, (int)typeID, priority);
- }
- /// <summary>
- /// Constructs an AgateDriverInfo for an input driver.
- /// </summary>
- /// <param name="typeID">The InputTypeID member indicating what the driver uses.</param>
- /// <param name="driverType">The System.Type object for the type inheriting from InputImpl.</param>
- /// <param name="friendlyName">A friendly name to show the user when choosing a driver.</param>
- /// <param name="priority">A integer indicating the priority of this driver over others which is used when autoselecting a driver.</param>
- public AgateDriverInfo(InputTypeID typeID, Type driverType, string friendlyName, int priority)
- {
- if (typeof(InputImpl).IsAssignableFrom(driverType) == false ||
- driverType.IsAbstract == true)
- {
- throw new ArgumentException(string.Format(
- "The type {0} is not a concrete implementation of InputImpl."));
- }
-
- SetValues(DriverType.Input, driverType.FullName, friendlyName, (int)typeID, priority);
- }
- /// <summary>
- /// Constructs an AgateDriverInfo for a desktop driver.
- /// </summary>
- /// <param name="typeID">The DesktopTypeID member indicating what the driver uses.</param>
- /// <param name="driverType">The System.Type object for the type implementing IDesktopDriver.</param>
- /// <param name="friendlyName">A friendly name to show the user when choosing a driver.</param>
- /// <param name="priority">A integer indicating the priority of this driver over others which is used when autoselecting a driver.</param>
- public AgateDriverInfo(DesktopTypeID typeID, Type driverType, string friendlyName, int priority)
- {
- if (typeof(IDesktopDriver).IsAssignableFrom(driverType) == false ||
- driverType.IsAbstract == true)
- {
- throw new ArgumentException(string.Format(
- "The type {0} is not a concrete implementation of IDesktopDriver."));
- }
-
- SetValues(DriverType.Desktop, driverType.FullName, friendlyName, (int)typeID, priority);
- }
-
- // These properties filled out by the driver
- private string mDriverTypeName;
- private string mFriendlyName;
- private DriverType mDriverType;
- private int mDriverTypeID;
- private int mPriority;
-
- // These properties filled out by the registrar.
- private string mAssemblyName;
- private string mAssemblyFile;
-
- /// <summary>
- /// Gets the fully qualified type name of the type implementing the driver routines.
- /// </summary>
- public string DriverTypeName
- {
- get { return mDriverTypeName; }
- }
- /// <summary>
- /// Gets the friendly name that may be displayed to the user which identifies this driver.
- /// </summary>
- public string FriendlyName
- {
- get { return mFriendlyName; }
- }
- /// <summary>
- /// Gets the type of driver.
- /// </summary>
- public DriverType DriverType
- {
- get { return mDriverType; }
- }
- /// <summary>
- /// Gets the type id of this driver. This value should be cast to DisplayTypeID, AudioTypeID, etc. depending
- /// on the value of DriverType.
- /// </summary>
- public int DriverTypeID
- {
- get { return mDriverTypeID; }
- }
- /// <summary>
- /// Gets the priority of this driver when autoselecting which driver to use.
- /// </summary>
- public int Priority
- {
- get { return mPriority; }
- }
-
- /// <summary>
- /// Full name of the assembly.
- /// </summary>
- public string AssemblyName
- {
- get { return mAssemblyName; }
- internal set { mAssemblyName = value; }
- }
- /// <summary>
- /// Path to the assembly.
- /// </summary>
- public string AssemblyFile
- {
- get { return mAssemblyFile; }
- internal set { mAssemblyFile = value; }
- }
-
- /// <summary>
- /// Gets a string representation of the AgateDriverInfo object.
- /// </summary>
- /// <returns></returns>
- public override string ToString()
- {
- return "AgateDriverInfo: " + DriverTypeName + " in " + AssemblyFile;
- }
- }
-
- /// <summary>
- /// Enum which indicates what type of driver is specified in an <c>AgateDriverInfo</c> structure.
- /// </summary>
- public enum DriverType
- {
- /// <summary>
- /// Display driver
- /// </summary>
- Display,
- /// <summary>
- /// Audio driver
- /// </summary>
- Audio,
- /// <summary>
- /// Input driver
- /// </summary>
- Input,
- /// <summary>
- /// Desktop driver
- /// </summary>
- Desktop,
- }
-
-}
\ No newline at end of file
Deleted: trunk/AgateLib/Drivers/AgateDriverReporter.cs
===================================================================
--- trunk/AgateLib/Drivers/AgateDriverReporter.cs 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/Drivers/AgateDriverReporter.cs 2014-08-24 02:45:10 UTC (rev 1477)
@@ -1,41 +0,0 @@
-// 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.Text;
-
-namespace AgateLib.Drivers
-{
- /// <summary>
- /// Class which is used by the <c>Registrar</c> to enumerate the drivers available
- /// in a satellite assembly. Any assembly with drivers for use by AgateLib should
- /// have a class inheriting from AgateDriverReporter and should construct AgateDriverInfo
- /// objects for each driver in the assembly.
- /// </summary>
- [Serializable]
- public abstract class AgateDriverReporter
- {
- /// <summary>
- /// Constructs and returns AgateDriverInfo objects for each driver
- /// in the hosted assembly.
- /// </summary>
- /// <returns></returns>
- public abstract IEnumerable<AgateDriverInfo> ReportDrivers();
- }
-}
Deleted: trunk/AgateLib/Drivers/AgateSandBoxLoader.cs
===================================================================
--- trunk/AgateLib/Drivers/AgateSandBoxLoader.cs 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/Drivers/AgateSandBoxLoader.cs 2014-08-24 02:45:10 UTC (rev 1477)
@@ -1,134 +0,0 @@
-// 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.Diagnostics;
-using System.IO;
-using System.Text;
-using System.Reflection;
-
-namespace AgateLib.Drivers
-{
- class AgateSandBoxLoader : MarshalByRefObject
- {
- public AgateDriverInfo[] ReportDrivers(string file)
- {
- List<AgateDriverInfo> retval = new List<AgateDriverInfo>();
- Assembly ass;
-
- try
- {
- ass = Assembly.LoadFrom(file);
- Trace.WriteLine("Loaded assembly " + file + " in sandbox.");
- }
- catch (BadImageFormatException)
- {
- Trace.WriteLine(string.Format("Could not load the file {0}.", file));
- Trace.WriteLine("BadImageFormatException caught. This file probably is not a CLR assembly.");
-
- return retval.ToArray();
- }
- catch (FileLoadException e)
- {
- Trace.WriteLine(string.Format("Could not load the file {0}.", file));
- Trace.WriteLine("FileLoadException caught:");
- Trace.Indent();
- Trace.WriteLine(e.Message);
- Trace.Unindent();
-
- return retval.ToArray();
- }
- catch (Exception e)
- {
- Trace.WriteLine(string.Format("Could not load the file {0}.", file));
- Trace.WriteLine(string.Format("{0} caught:"), e.GetType().Name);
- Trace.Indent();
- Trace.WriteLine(e.Message);
- Trace.Unindent();
-
- return retval.ToArray();
- }
-
-
- Type[] types;
-
- try
- {
- types = ass.GetTypes();
- }
- catch (ReflectionTypeLoadException e)
- {
- string message = string.Format(
- "Caught ReflectionTypeLoadException in {0}.", file);
-
- foreach (var ex in e.LoaderExceptions)
- {
- message += Environment.NewLine;
- message += ex.Message;
- }
-
- message += Environment.NewLine +
- "This is probably a sign that the build of the file " + file +
- " does not match the build of AgateLib.dll.";
-
- Trace.WriteLine(message);
-
- return retval.ToArray();
- }
- catch (Exception e)
- {
- Trace.WriteLine(string.Format(
- "Could not load types in the file {0}. Check to make sure its dependencies are available. " +
- "Caught exception {1}. {2}", file, e.GetType().ToString(), e.Message));
-
- return retval.ToArray();
- }
-
- foreach (Type t in types)
- {
- if (t.IsAbstract)
- continue;
- if (typeof(AgateDriverReporter).IsAssignableFrom(t) == false)
- continue;
-
- AgateDriverReporter reporter = (AgateDriverReporter)Activator.CreateInstance(t);
-
- try
- {
- foreach (AgateDriverInfo info in reporter.ReportDrivers())
- {
- info.AssemblyFile = file;
- info.AssemblyName = ass.FullName;
-
- retval.Add(info);
- }
- }
- catch (Exception e)
- {
- Trace.WriteLine(string.Format(
- "The driver reporter in {0} encountered an error." + Environment.NewLine +
- "Caught exception {1}." + Environment.NewLine +
- "{2}", file, e.GetType().Name, e.Message));
- }
- }
-
- return retval.ToArray();
- }
- }
-}
\ No newline at end of file
Deleted: trunk/AgateLib/Drivers/IDesktopDriver.cs
===================================================================
--- trunk/AgateLib/Drivers/IDesktopDriver.cs 2014-08-23 21:28:36 UTC (rev 1476)
+++ trunk/AgateLib/Drivers/IDesktopDriver.cs 2014-08-24 02:45:10 UTC (rev 1477)
@@ -1,47 +0,0 @@
-// 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.Text;
-
-namespace AgateLib.Drivers
-{
- /// <summary>
- /// An interface which provides a basic user interface for things which can't
- /// be done with the driver system.
- /// </summary>
- public interface IDesktopDriver
- {
- /// <summary>
- /// Creates an object which provides an interface to ask the user which drivers
- /// to use.
- /// </summar...
[truncated message content] |
|
From: <ka...@us...> - 2014-08-24 07:13:10
|
Revision: 1478
http://sourceforge.net/p/agate/code/1478
Author: kanato
Date: 2014-08-24 07:13:05 +0000 (Sun, 24 Aug 2014)
Log Message:
-----------
Direct3D 11 surface loading works now.
Modified Paths:
--------------
trunk/AgateLib/ApplicationModels/Scene.cs
trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs
trunk/AgateLib/ApplicationModels/SceneStack.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/Drivers/IPlatformFactory.cs
trunk/AgateLib/IO/FileProvider.cs
trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs
trunk/AgateLib.Platform.WindowsForms/Initializer.cs
trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj
trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs
trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs
trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs
trunk/AgateLib.Platform.WindowsPhone/Interop.cs
trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs
trunk/AgateLib.Platform.WindowsPhone/packages.config
trunk/Tests.WindowsPhone/TestScene.cs
trunk/UnitTests/Fakes/FakePlatformFactory.cs
trunk/UnitTests/Resources/SerializationTest.cs
trunk/UnitTests/UserInterface/Css/LayoutTest.cs
Added Paths:
-----------
trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPAssetFileProvider.cs
Removed Paths:
-------------
trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs
Modified: trunk/AgateLib/ApplicationModels/Scene.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/Scene.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib/ApplicationModels/Scene.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -11,6 +11,11 @@
public bool UpdateBelow { get; set; }
public bool DrawBelow { get; set; }
+ protected internal virtual void OnSceneStart()
+ { }
+ protected internal virtual void OnSceneEnd()
+ { }
+
public abstract void Update(double delta_t);
public abstract void Draw();
}
Modified: trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -11,17 +11,17 @@
: base(parameters)
{ }
+ protected Scene sceneToStartWith;
+
public void Run(Scene scene)
{
- if (SceneStack.Contains(scene) == false)
- SceneStack.Add(scene);
-
try
{
Initialize();
AutoCreateDisplayWindow();
PrerunInitialization();
+ sceneToStartWith = scene;
BeginModel();
}
finally
Modified: trunk/AgateLib/ApplicationModels/SceneStack.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/SceneStack.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib/ApplicationModels/SceneStack.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -12,10 +12,20 @@
public static void Add(Scene scene)
{
+ if (mScenes.Contains(scene))
+ throw new InvalidOperationException();
+
mScenes.Add(scene);
+
+ scene.OnSceneStart();
}
public static void Remove(Scene scene)
{
+ if (mScenes.Contains(scene) == false)
+ throw new InvalidOperationException();
+
+ scene.OnSceneEnd();
+
mScenes.Remove(scene);
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib/Core.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -318,7 +318,7 @@
/// Initializes Core class. Also causes the Registrar to probe drivers.
/// Can be called multiple times without adverse effects.
/// </summary>
- public static void Initialize(IAgateFactory factory)
+ public static void Initialize(IAgateFactory factory, AssetLocations assets)
{
if (sInititalized)
return;
@@ -329,7 +329,7 @@
FileSystem.File = factory.PlatformFactory.CreateFile();
FileSystem.Path = factory.PlatformFactory.CreatePath();
- FileProvider.Initialize(factory.PlatformFactory);
+ FileProvider.Initialize(factory.PlatformFactory.AssetFileProvider, assets);
Display.Initialize(factory.DisplayFactory.DisplayImpl);
Audio.Initialize(factory.AudioFactory.CreateAudioImpl());
Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -38,7 +38,7 @@
IEnumerable<System.Reflection.Assembly> GetSerializationSearchAssemblies(Type objectType);
- IReadFileProvider CreateAssetFileProvider();
+ IReadFileProvider AssetFileProvider { get; }
IPlatformSerialization CreateDefaultSerializationConstructor();
}
Modified: trunk/AgateLib/IO/FileProvider.cs
===================================================================
--- trunk/AgateLib/IO/FileProvider.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib/IO/FileProvider.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -27,11 +27,6 @@
{
public static class FileProvider
{
- internal static void Initialize(IPlatformFactory platformFactory)
- {
- Assets = platformFactory.CreateAssetFileProvider();
- }
-
public static void Initialize(IReadFileProvider assetProvider, AssetLocations assetLocations)
{
Assets = assetProvider;
Modified: trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -19,9 +19,11 @@
public PlatformFactory()
{
Info = new FormsPlatformInfo();
+ AssetFileProvider = new FileSystemProvider(".");
}
public PlatformInfo Info { get; private set; }
+ public IReadFileProvider AssetFileProvider { get; private set; }
public IStopwatch CreateStopwatch()
{
@@ -46,12 +48,6 @@
return new SysIoPath();
}
- public IReadFileProvider CreateAssetFileProvider()
- {
- //return new FileSystemProvider(AssemblyLoadDirectory);
- return new FileSystemProvider(".");
- }
-
static public string AssemblyLoadDirectory
{
get
Modified: trunk/AgateLib.Platform.WindowsForms/Initializer.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Initializer.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsForms/Initializer.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -6,12 +6,12 @@
{
static class Initializer
{
- public static void Initialize(FormsModelParameters Parameters)
+ public static void Initialize(FormsModelParameters parameters)
{
- Core.Initialize(new FormsFactory());
+ Core.Initialize(new FormsFactory(), parameters.AssetLocations);
- var assetProvider = new FileSystemProvider(System.IO.Path.GetFullPath(Parameters.AssetPath));
- AgateLib.IO.FileProvider.Initialize(assetProvider, Parameters.AssetLocations);
+ var assetProvider = new FileSystemProvider(System.IO.Path.GetFullPath(parameters.AssetPath));
+ AgateLib.IO.FileProvider.Initialize(assetProvider, parameters.AssetLocations);
System.IO.Directory.SetCurrentDirectory(assetProvider.SearchPath);
}
Modified: trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-24 07:13:05 UTC (rev 1478)
@@ -18,7 +18,7 @@
<ValidateXaml>true</ValidateXaml>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
- <NuGetPackageImportStamp>ddef659b</NuGetPackageImportStamp>
+ <NuGetPackageImportStamp>15cec27f</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -104,7 +104,7 @@
<Compile Include="Factories\WPPlatformFactory.cs" />
<Compile Include="Factories\WindowsPhoneFactory.cs" />
<Compile Include="Interop.cs" />
- <Compile Include="PlatformImplementation\AssetFileProvider.cs" />
+ <Compile Include="PlatformImplementation\WPAssetFileProvider.cs" />
<Compile Include="PlatformImplementation\WPPlatformInfo.cs" />
<Compile Include="PlatformImplementation\DiagnosticsStopwatch.cs" />
<Compile Include="DisplayImplementation\Shaders\SDX_Basic2DShader.cs" />
@@ -128,6 +128,12 @@
<Reference Include="SharpDX.SimpleInitializer">
<HintPath>..\packages\SharpDX.SimpleInitializer.1.0.0\lib\wp8\SharpDX.SimpleInitializer.dll</HintPath>
</Reference>
+ <Reference Include="SharpDX.Toolkit">
+ <HintPath>$(SharpDXPackageBinDir)\SharpDX.Toolkit.dll</HintPath>
+ </Reference>
+ <Reference Include="SharpDX.Toolkit.Graphics">
+ <HintPath>$(SharpDXPackageBinDir)\SharpDX.Toolkit.Graphics.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
@@ -149,7 +155,9 @@
<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('..\packages\SharpDX.2.6.2\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.2.6.2\build\SharpDX.targets'))" />
+ <Error Condition="!Exists('..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets'))" />
</Target>
+ <Import Project="..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets" Condition="Exists('..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.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">
Modified: trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -27,11 +27,21 @@
{
context = new SharpDXContext();
context.Render += context_Render;
+ context.DeviceReset += context_DeviceReset;
context.BindToControl(Parameters.RenderTarget);
- WindowsPhoneInitializer.Initialize(context, Parameters.RenderTarget);
+ WindowsPhoneInitializer.Initialize(context, Parameters.RenderTarget, Parameters.AssetLocations);
}
+ void context_DeviceReset(object sender, DeviceResetEventArgs e)
+ {
+ if (sceneToStartWith != null)
+ {
+ SceneStack.Add(sceneToStartWith);
+ sceneToStartWith = null;
+ }
+ }
+
void context_Render(object sender, EventArgs e)
{
foreach (var sc in SceneStack.UpdateScenes)
@@ -43,7 +53,6 @@
sc.Draw();
Display.EndFrame();
-
Core.KeepAlive();
}
Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -35,7 +35,8 @@
private SharpDXContext context;
private Device mDevice { get { return context.D3DDevice; } }
- private DeviceContext mContext { get { return context.D3DContext; } }
+ private DeviceContext mDeviceContext { get { return context.D3DContext; } }
+ SharpDX.Toolkit.Graphics.GraphicsDevice mGraphicsDevice;
private Texture2D[] mLastTexture = new Texture2D[8];
private SDX_FrameBuffer mRenderTarget;
@@ -44,6 +45,7 @@
private bool mAlphaBlend;
private Matrix mWorld2D;
+
//VertexBuffer mSurfaceVB;
//const int NumVertices = 1000;
//int mSurfaceVBPointer = 0;
@@ -57,7 +59,7 @@
this.context = context;
mWorld2D = Matrix.Identity;
-
+
mDrawBuffer = new DrawBuffer(this);
}
@@ -99,7 +101,7 @@
}
public DeviceContext DeviceContext
{
- get { return mContext; }
+ get { return mDeviceContext; }
}
public SharpDXContext Context
{
@@ -222,11 +224,11 @@
public void Clear(AgateLib.Geometry.Color color, float zdepth, int stencil)
{
- mContext.ClearDepthStencilView(mRenderTarget.DepthStencilView,
+ mDeviceContext.ClearDepthStencilView(mRenderTarget.DepthStencilView,
DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil,
zdepth, (byte)stencil);
- mContext.ClearRenderTargetView(mRenderTarget.RenderTargetView, new Color4(color.ToArgb()));
+ mDeviceContext.ClearRenderTargetView(mRenderTarget.RenderTargetView, color.ToColor4());
}
//public void WriteToSurfaceVBAndRender
@@ -323,5 +325,21 @@
mMaxLightsUsed = lights.Count;
}
* */
+
+ public SharpDX.Toolkit.Graphics.GraphicsDevice GraphicsDevice
+ {
+ get
+ {
+ if (mGraphicsDevice == null)
+ {
+ mGraphicsDevice = SharpDX.Toolkit.Graphics.GraphicsDevice.New
+ (context.D3DDevice);
+ }
+
+ return mGraphicsDevice;
+ }
+ }
+
+ public SharpDX.Toolkit.Graphics.BasicEffect Effect { get; set; }
}
}
\ No newline at end of file
Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -22,7 +22,8 @@
using System.Text;
using AgateLib.DisplayLib;
using AgateLib.Geometry.VertexTypes;
-using SharpDX.Direct3D11;
+using Texture2D = SharpDX.Direct3D11.Texture2D;
+using SharpDX.Toolkit.Graphics;
namespace AgateLib.Platform.WindowsPhone.DisplayImplementation
{
@@ -36,6 +37,7 @@
int pages = 1;
D3DDevice mDevice;
+ BasicEffect mEffect;
PositionTextureColor[] mVerts;
short[] mIndices;
@@ -49,6 +51,7 @@
public DrawBuffer(D3DDevice device)
{
mDevice = device;
+ mEffect = mDevice.Effect;
AllocateVerts();
}
@@ -96,7 +99,6 @@
if (mVertPointer == 0)
return;
- mDevice.SetDeviceStateTexture(mTexture);
mDevice.AlphaBlend = mAlphaBlend;
//mDevice.AlphaArgument1 = TextureArgument.Texture;
//mDevice.AlphaArgument2 = TextureArgument.Diffuse;
Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -31,7 +31,10 @@
using ImageFileFormat = AgateLib.DisplayLib.ImageFileFormat;
using Surface = AgateLib.DisplayLib.Surface;
using Vector2 = AgateLib.Geometry.Vector2;
-using SharpDX.Direct3D11;
+using System.Windows.Resources;
+using System.Windows.Media.Imaging;
+using SharpDX.IO;
+using Texture2D = SharpDX.Direct3D11.Texture2D;
namespace AgateLib.Platform.WindowsPhone.DisplayImplementation
{
@@ -41,6 +44,7 @@
SDX_Display mDisplay;
D3DDevice mDevice;
+ SharpDX.Toolkit.Graphics.GraphicsDevice mGraphicsDevice { get { return mDevice.GraphicsDevice; } }
Ref<Texture2D> mTexture;
@@ -55,6 +59,7 @@
PositionTextureColor[] mExtraVerts = new PositionTextureColor[4];
short[] mExtraIndices = new short[] { 0, 2, 1, 1, 2, 3 };
+ private SharpDX.Direct3D11.ShaderResourceView mTextureView;
#endregion
@@ -187,97 +192,69 @@
}
public void LoadFromStream(Stream st)
{
- throw new NotImplementedException();
- //Drawing.Bitmap bitmap = new Drawing.Bitmap(st);
+ System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ ReadFromStream(st);
+ });
+ }
- //mSrcRect = new Rectangle(Point.Empty, Interop.Convert(bitmap.Size));
-
- //// this is the speed issue fix in the debugger found on the net (thezbuffer.com has it documented)
- //System.IO.MemoryStream stream = new System.IO.MemoryStream();
- //bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp);
-
- //bitmap.Dispose();
-
- //stream.Position = 0;
-
- ////mTexture = Texture(mDevice, bitmap, Usage.None, Pool.Managed);
-
- //Format format;
-
-
- //switch (mDisplay.DisplayMode.Format)
- //{
- // case Format.X8R8G8B8:
- // format = Format.A8R8G8B8;
- // break;
-
- // case Format.X8B8G8R8:
- // format = Format.A8B8G8R8;
- // break;
-
- // default:
- // System.Diagnostics.Debug.Assert(false);
- // throw new Exception("What format do I use?");
-
- //}
-
- //mTexture = new Ref<Texture>(Texture.FromStream(mDevice.Device,
- // stream, 0, 0, 1, Usage.None,
- // format, Pool.Managed, Filter.None, Filter.None, 0x00000000));
-
- //mTextureSize = new Size(mTexture.Value.GetSurfaceLevel(0).Description.Width,
- // mTexture.Value.GetSurfaceLevel(0).Description.Height);
-
- //stream.Dispose();
- }
public void LoadFromFile()
{
- throw new NotImplementedException();
-
if (string.IsNullOrEmpty(mFileName))
return;
- //string path = mFileName;
- //Drawing.Bitmap bitmap = new Drawing.Bitmap(path);
+ //mTexture = new Ref<Texture2D>(Texture2D.Load(
+ // mGraphicsDevice, mFileName));
- //mSrcRect = new Rectangle(Point.Empty, Interop.Convert(bitmap.Size));
- /*
- // this is the speed issue fix in the debugger found on the net (thezbuffer.com has it documented)
- System.IO.MemoryStream stream = new System.IO.MemoryStream();
- bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp);
+ System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ using (MemoryStream sourceStream = new MemoryStream(NativeFile.ReadAllBytes(mFileName)))
+ {
+ ReadFromStream(sourceStream);
+ }
+ });
+ }
- stream.Position = 0;
-
- mTexture = Texture.FromStream(mDevice, stream, Usage.None, Pool.Managed);
- * */
- //mTexture = new Texture(mDevice, bitmap, Usage.None, Pool.Managed);
- //Format format;
+ /// <summary>
+ /// Only call thsi function on the main UI thread.
+ /// </summary>
+ /// <param name="sourceStream"></param>
+ private void ReadFromStream(Stream sourceStream)
+ {
+ var image = new BitmapImage();
+ image.CreateOptions = BitmapCreateOptions.None;
+ image.SetSource(sourceStream);
- throw new NotImplementedException();
+ var bitmap = new WriteableBitmap(image);
- //switch (mDevice.Device.DisplayMode.Format)
- //{
- // case Format.X8R8G8B8:
- // format = Format.A8R8G8B8;
- // break;
+ using (var dataStream = new SharpDX.DataStream(bitmap.Pixels.Length * 4, true, true))
+ {
+ dataStream.WriteRange<int>(bitmap.Pixels);
- // case Format.X8B8G8R8:
- // format = Format.A8B8G8R8;
- // break;
+ dataStream.Seek(0, SeekOrigin.Begin);
- // default:
- // System.Diagnostics.Debug.Assert(false);
- // throw new Exception("What format do I use?");
+ var dataRectangle = new SharpDX.DataRectangle(dataStream.DataPointer, (int)(bitmap.PixelWidth * 4));
- //}
+ var texture = new Texture2D(mDevice.Device, new SharpDX.Direct3D11.Texture2DDescription()
+ {
+ Format = SharpDX.DXGI.Format.B8G8R8A8_UNorm,
+ Width = (int)bitmap.PixelWidth,
+ Height = (int)bitmap.PixelHeight,
+ ArraySize = 1,
+ MipLevels = 1,
+ BindFlags = SharpDX.Direct3D11.BindFlags.ShaderResource,
+ Usage = SharpDX.Direct3D11.ResourceUsage.Default,
+ CpuAccessFlags = SharpDX.Direct3D11.CpuAccessFlags.None,
+ OptionFlags = SharpDX.Direct3D11.ResourceOptionFlags.None,
+ SampleDescription = new SharpDX.DXGI.SampleDescription(1, 0)
+ }, dataRectangle);
- //mTexture = new Ref<Texture>(TextureLoader.FromFile(mDevice.Device, path, 0, 0, 1, Usage.None,
- // format, Pool.Managed, Filter.None, Filter.None, 0x00000000));
+ mTexture = new Ref<Texture2D>(texture);
+ mTextureView = new SharpDX.Direct3D11.ShaderResourceView(mDevice.Device, texture);
+ }
- //mTextureSize = new Size(mTexture.Value.GetSurfaceLevel(0).Description.Width,
- // mTexture.Value.GetSurfaceLevel(0).Description.Height);
-
- //bitmap.Dispose();
+ bitmap = null;
+ image = null;
}
#endregion
@@ -616,7 +593,7 @@
throw new NotImplementedException();
//SharpDX.DXGI.Surface surf = mTexture.Value.GetSurfaceLevel(0);
-
+
//if (surf.Description.Pool == Pool.Default)
//{
// throw new AgateLib.AgateException(
Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -178,17 +178,19 @@
private void SetTextures()
{
- for (int i = 0; i < Textures.Count; i++)
- {
- if (Textures[i] == null)
- mDisplay.D3D_Device.SetDeviceStateTexture(null, i);
- else
- {
- SDX_Surface surf = (SDX_Surface)Textures[i].Impl;
+ throw new NotImplementedException();
+ //for (int i = 0; i < Textures.Count; i++)
+ //{
+ // if (Textures[i] == null)
+ // mDisplay.D3D_Device.SetDeviceStateTexture(null, i);
+ // else
+ // {
+ // SDX_Surface surf = (SDX_Surface)Textures[i].Impl;
- mDisplay.D3D_Device.SetDeviceStateTexture(surf.D3dTexture, i);
- }
- }
+ // mDisplay.D3D_Device.GraphicsDevice.effec
+ // mDisplay.D3D_Device.SetDeviceStateTexture(surf.D3dTexture, i);
+ // }
+ //}
}
public override int VertexCount
Modified: trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -14,7 +14,6 @@
{
class DisplayFactory : IDisplayFactory
{
- private SharpDX.SimpleInitializer.SharpDXContext context;
private System.Windows.Controls.DrawingSurfaceBackgroundGrid renderTarget;
public DisplayFactory(SharpDX.SimpleInitializer.SharpDXContext context, System.Windows.Controls.DrawingSurfaceBackgroundGrid renderTarget)
Modified: trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -12,9 +12,12 @@
public WPPlatformFactory()
{
Info = new WPPlatformInfo();
+ AssetFileProvider = new WPAssetFileProvider();
+
}
public PlatformInfo Info { get; private set;}
-
+ public IReadFileProvider AssetFileProvider { get; private set; }
+
public IStopwatch CreateStopwatch()
{
return new DiagnosticsStopwatch();
@@ -40,10 +43,6 @@
throw new NotImplementedException();
}
- public IReadFileProvider CreateAssetFileProvider()
- {
- return new AssetFileProvider();
- }
public IPlatformSerialization CreateDefaultSerializationConstructor()
{
Modified: trunk/AgateLib.Platform.WindowsPhone/Interop.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/Interop.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/Interop.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -1,4 +1,5 @@
-using System;
+using SharpDX;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -19,5 +20,12 @@
{
return new AgateLib.Geometry.Point((int)point.X, (int)point.Y);
}
+
+ public static SharpDX.Color4 ToColor4(this AgateLib.Geometry.Color color)
+ {
+ var retval = new Color4(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
+
+ return retval;
+ }
}
}
Deleted: trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -1,46 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace AgateLib.Platform.WindowsPhone.PlatformImplementation
-{
- class AssetFileProvider : IReadFileProvider
- {
- public System.IO.Stream OpenRead(string filename)
- {
- throw new NotImplementedException();
- }
-
- public bool FileExists(string filename)
- {
- throw new NotImplementedException();
- }
-
- public IEnumerable<string> GetAllFiles()
- {
- throw new NotImplementedException();
- }
-
- public IEnumerable<string> GetAllFiles(string searchPattern)
- {
- throw new NotImplementedException();
- }
-
- public string ReadAllText(string filename)
- {
- throw new NotImplementedException();
- }
-
- public bool IsRealFile(string filename)
- {
- throw new NotImplementedException();
- }
-
- public string ResolveFile(string filename)
- {
- throw new NotImplementedException();
- }
- }
-}
Copied: trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPAssetFileProvider.cs (from rev 1477, trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs)
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPAssetFileProvider.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPAssetFileProvider.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Windows.ApplicationModel;
+
+namespace AgateLib.Platform.WindowsPhone.PlatformImplementation
+{
+ class WPAssetFileProvider : IReadFileProvider
+ {
+ public System.IO.Stream OpenRead(string filename)
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool FileExists(string filename)
+ {
+ throw new NotImplementedException();
+ }
+
+ public IEnumerable<string> GetAllFiles()
+ {
+ throw new NotImplementedException();
+ }
+
+ public IEnumerable<string> GetAllFiles(string searchPattern)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string ReadAllText(string filename)
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool IsRealFile(string filename)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string ResolveFile(string filename)
+ {
+ return Package.Current.InstalledLocation.Path + "/Assets/" + filename;
+ }
+ }
+}
Modified: trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs 2014-08-24 07:13:05 UTC (rev 1478)
@@ -1,4 +1,5 @@
-using AgateLib.Platform.WindowsPhone.Factories;
+using AgateLib.ApplicationModels;
+using AgateLib.Platform.WindowsPhone.Factories;
using SharpDX.SimpleInitializer;
using System;
using System.Net;
@@ -15,9 +16,9 @@
{
static class WindowsPhoneInitializer
{
- internal static void Initialize(SharpDXContext context, DrawingSurfaceBackgroundGrid renderTarget)
+ internal static void Initialize(SharpDXContext context, DrawingSurfaceBackgroundGrid renderTarget, AssetLocations assets)
{
- Core.Initialize(new WindowsPhoneFactory(context, renderTarget));
+ Core.Initialize(new WindowsPhoneFactory(context, renderTarget), assets);
}
}
}
Modified: trunk/AgateLib.Platform.WindowsPhone/packages.config
===================================================================
--- trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-08-24 07:13:05 UTC (rev 1478)
@@ -4,4 +4,6 @@
<package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="wp80" />
<package id="SharpDX.DXGI" version="2.6.2" targetFramework="wp80" />
<package id="SharpDX.SimpleInitializer" version="1.0.0" targetFramework="wp80" />
+ <package id="SharpDX.Toolkit" version="2.6.2" targetFramework="wp80" />
+ <package id="SharpDX.Toolkit.Graphics" version="2.6.2" targetFramework="wp80" />
</packages>
\ No newline at end of file
Modified: trunk/Tests.WindowsPhone/TestScene.cs
===================================================================
--- trunk/Tests.WindowsPhone/TestScene.cs 2014-08-24 02:45:10 UTC (rev 1477)
+++ trunk/Tests.WindowsP...
[truncated message content] |
|
From: <ka...@us...> - 2014-08-28 02:35:19
|
Revision: 1482
http://sourceforge.net/p/agate/code/1482
Author: kanato
Date: 2014-08-28 02:34:56 +0000 (Thu, 28 Aug 2014)
Log Message:
-----------
Fix drawing for default culling mode.
Works when deployed to physical windows phone device now.
Modified Paths:
--------------
trunk/AgateLib/Utility/Ref.cs
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs
trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs
trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo
trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo
trunk/AgateLib.sln
trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs
Modified: trunk/AgateLib/Utility/Ref.cs
===================================================================
--- trunk/AgateLib/Utility/Ref.cs 2014-08-27 07:22:57 UTC (rev 1481)
+++ trunk/AgateLib/Utility/Ref.cs 2014-08-28 02:34:56 UTC (rev 1482)
@@ -169,15 +169,24 @@
v = null;
}
- public static bool operator==(Ref<T> r, object obj)
+ public static bool operator ==(Ref<T> r, T obj)
{
- if (obj == null && r.v == null)
- return true;
+ if (obj == null)
+ {
+ if (r.v == null)
+ return true;
+ else
+ return false;
+ }
- else
+ if (r.v == null)
return false;
+ if (r.v.Value == null)
+ return false;
+
+ return r.v.Value.Equals(obj);
}
- public static bool operator !=(Ref<T> r, object obj)
+ public static bool operator !=(Ref<T> r, T obj)
{
return !(r == obj);
}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs 2014-08-27 07:22:57 UTC (rev 1481)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs 2014-08-28 02:34:56 UTC (rev 1482)
@@ -31,7 +31,7 @@
{
public class DrawBuffer
{
- const int vertPageSize = 8;
+ const int vertPageSize = 1000;
int pages = 1;
SharpDXContext mContext;
@@ -177,8 +177,6 @@
private void DoDraw(object ignored)
{
- //mDevice.DeviceContext.OutputMerger.SetTargets(this.parentContext.DepthStencilView, this.parentContext.BackBufferView);
-
mDevice.DeviceContext.UpdateSubresource(mVerts, mVertexBuffer);
mDevice.DeviceContext.UpdateSubresource(mIndices, mIndexBuffer);
@@ -186,12 +184,10 @@
mDevice.DeviceContext.InputAssembler.InputLayout = mVertexLayout;
mDevice.DeviceContext.InputAssembler.SetIndexBuffer(mIndexBuffer, SharpDX.DXGI.Format.R16_UInt, 0);
- mDevice.DeviceContext.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleStrip;
+ mDevice.DeviceContext.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleList;
mDevice.DeviceContext.PixelShader.SetShaderResource(0, mTextureView);
mDevice.DeviceContext.DrawIndexed(mIndexPointer, 0, 0);
- mDevice.DeviceContext.Draw(4, 0);
}
-
}
}
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs 2014-08-27 07:22:57 UTC (rev 1481)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs 2014-08-28 02:34:56 UTC (rev 1482)
@@ -55,10 +55,10 @@
PointF mCenterPoint;
PositionTextureColor[] mVerts = new PositionTextureColor[4];
- short[] mIndices = new short[] { 0, 2, 1, 1, 2, 3 };
+ short[] mIndices = new short[] { 0, 1, 2, 2, 1, 3 };
PositionTextureColor[] mExtraVerts = new PositionTextureColor[4];
- short[] mExtraIndices = new short[] { 0, 2, 1, 1, 2, 3 };
+ short[] mExtraIndices = new short[] { 0, 1, 2, 2, 1, 3 };
#endregion
Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs 2014-08-27 07:22:57 UTC (rev 1481)
+++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs 2014-08-28 02:34:56 UTC (rev 1482)
@@ -27,7 +27,7 @@
namespace AgateLib.Platform.WindowsStoreCommon.DisplayImplementation.Shaders
{
- class SDX_Basic2DShader : Basic2DImpl
+ class SDX_Basic2DShader : Basic2DImpl
{
Rectangle mCoords;
@@ -39,6 +39,7 @@
SharpDX.Direct3D11.Buffer mConstantBuffer;
SamplerState mSampler;
+ BlendState mBlendState;
public SDX_Basic2DShader()
{
@@ -88,11 +89,29 @@
MinimumLod = -float.MaxValue,
MaximumLod = float.MaxValue
});
+
+
+ var desc = new BlendStateDescription();
+
+ desc.RenderTarget[0] = new RenderTargetBlendDescription
+ {
+ SourceBlend = BlendOption.SourceAlpha,
+ SourceAlphaBlend = BlendOption.SourceAlpha,
+ DestinationBlend = BlendOption.InverseSourceAlpha,
+ DestinationAlphaBlend = BlendOption.InverseSourceAlpha,
+ AlphaBlendOperation = BlendOperation.Add,
+ BlendOperation = BlendOperation.Add,
+ IsBlendEnabled = true,
+ RenderTargetWriteMask = ColorWriteMaskFlags.All,
+ };
+
+ mBlendState = new BlendState(mDevice.Device, desc);
+
}
public override AgateLib.Geometry.Rectangle CoordinateSystem
{
- get { return mCoords; }
+ get { return mCoords; }
set
{
mCoords = value;
@@ -118,6 +137,9 @@
//mDevice.SetTransform(TransformState.World, SlimDX.Matrix.Identity);
//mDevice.SetTransform(TransformState.View, SlimDX.Matrix.Identity);
+
+ mDevice.DeviceContext.OutputMerger.BlendState = mBlendState;
+ //mDevice.DeviceContext.Rasterizer.State = rs;
SetOrthoProjection();
}
@@ -138,9 +160,7 @@
mDevice.DeviceContext.PixelShader.Set(mPixelShader);
mDevice.DeviceContext.PixelShader.SetSampler(0, mSampler);
- //SDX_Display mDisplay = (SDX_Display)AgateLib.DisplayLib.Display.Impl;
-
- //Set2DDrawState();
+ Set2DDrawState();
}
public override void BeginPass(int passIndex)
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.sln
===================================================================
--- trunk/AgateLib.sln 2014-08-27 07:22:57 UTC (rev 1481)
+++ trunk/AgateLib.sln 2014-08-28 02:34:56 UTC (rev 1482)
@@ -52,12 +52,10 @@
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
- Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
- Release|Mixed Platforms = Release|Mixed Platforms
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
@@ -65,8 +63,6 @@
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Mixed Platforms.Build.0 = Debug|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.ActiveCfg = Debug|x64
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.Build.0 = Debug|x64
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.ActiveCfg = Debug|x86
@@ -74,8 +70,6 @@
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|ARM.ActiveCfg = Release|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Mixed Platforms.Build.0 = Release|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.ActiveCfg = Release|x64
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.Build.0 = Release|x64
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.ActiveCfg = Release|x86
@@ -83,23 +77,17 @@
{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|ARM.ActiveCfg = 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|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|ARM.ActiveCfg = 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
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Mixed Platforms.Build.0 = Debug|x86
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x64.ActiveCfg = Debug|x64
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x64.Build.0 = Debug|x64
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.ActiveCfg = Debug|x86
@@ -107,8 +95,6 @@
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.Build.0 = Release|Any CPU
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|ARM.ActiveCfg = Release|Any CPU
- {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Mixed Platforms.Build.0 = Release|x86
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x64.ActiveCfg = Release|x64
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x64.Build.0 = Release|x64
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.ActiveCfg = Release|x86
@@ -116,8 +102,6 @@
{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|ARM.ActiveCfg = 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
@@ -125,8 +109,6 @@
{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|ARM.ActiveCfg = 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
@@ -134,8 +116,6 @@
{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|ARM.ActiveCfg = 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
@@ -143,8 +123,6 @@
{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|ARM.ActiveCfg = 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
@@ -152,8 +130,6 @@
{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|ARM.ActiveCfg = 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
@@ -161,8 +137,6 @@
{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|ARM.ActiveCfg = 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
@@ -173,9 +147,6 @@
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|ARM.ActiveCfg = Debug|ARM
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|ARM.Build.0 = Debug|ARM
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|ARM.Deploy.0 = Debug|ARM
- {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|x64.ActiveCfg = Debug|Any CPU
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|x86.ActiveCfg = Debug|x86
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|x86.Build.0 = Debug|x86
@@ -186,9 +157,6 @@
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|ARM.ActiveCfg = Release|ARM
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|ARM.Build.0 = Release|ARM
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|ARM.Deploy.0 = Release|ARM
- {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|Mixed Platforms.Build.0 = Release|x86
- {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|Mixed Platforms.Deploy.0 = Release|x86
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|x64.ActiveCfg = Release|Any CPU
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|x86.ActiveCfg = Release|x86
{EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|x86.Build.0 = Release|x86
@@ -196,39 +164,30 @@
{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|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Mixed Platforms.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}.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|Mixed Platforms.ActiveCfg = Release|Any CPU
- {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Mixed Platforms.Build.0 = 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
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|ARM.Build.0 = Debug|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|x64.ActiveCfg = Debug|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|x86.ActiveCfg = Debug|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|x86.Build.0 = Debug|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Any CPU.Build.0 = Release|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|ARM.ActiveCfg = Release|Any CPU
- {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|x64.ActiveCfg = Release|Any CPU
{C7F9AE34-B781-4490-A9B2-5728F44F3523}.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
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|ARM.Build.0 = Debug|ARM
- {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Mixed Platforms.Build.0 = Debug|x86
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x64.ActiveCfg = Debug|x64
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x64.Build.0 = Debug|x64
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x86.ActiveCfg = Debug|x86
@@ -237,8 +196,6 @@
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|Any CPU.Build.0 = Release|Any CPU
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|ARM.ActiveCfg = Release|ARM
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|ARM.Build.0 = Release|ARM
- {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|Mixed Platforms.Build.0 = Release|x86
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x64.ActiveCfg = Release|x64
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x64.Build.0 = Release|x64
{C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x86.ActiveCfg = Release|x86
@@ -248,10 +205,6 @@
{376B6926-005D-4A36-9EB3-272173A377A4}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{376B6926-005D-4A36-9EB3-272173A377A4}.Debug|ARM.ActiveCfg = Debug|ARM
{376B6926-005D-4A36-9EB3-272173A377A4}.Debug|ARM.Build.0 = Debug|ARM
- {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|ARM.Deploy.0 = Debug|ARM
- {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
{376B6926-005D-4A36-9EB3-272173A377A4}.Debug|x64.ActiveCfg = Debug|x64
{376B6926-005D-4A36-9EB3-272173A377A4}.Debug|x64.Build.0 = Debug|x64
{376B6926-005D-4A36-9EB3-272173A377A4}.Debug|x64.Deploy.0 = Debug|x64
@@ -264,9 +217,6 @@
{376B6926-005D-4A36-9EB3-272173A377A4}.Release|ARM.ActiveCfg = Release|ARM
{376B6926-005D-4A36-9EB3-272173A377A4}.Release|ARM.Build.0 = Release|ARM
{376B6926-005D-4A36-9EB3-272173A377A4}.Release|ARM.Deploy.0 = Release|ARM
- {376B6926-005D-4A36-9EB3-272173A377A4}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {376B6926-005D-4A36-9EB3-272173A377A4}.Release|Mixed Platforms.Build.0 = Release|x86
- {376B6926-005D-4A36-9EB3-272173A377A4}.Release|Mixed Platforms.Deploy.0 = Release|x86
{376B6926-005D-4A36-9EB3-272173A377A4}.Release|x64.ActiveCfg = Release|x64
{376B6926-005D-4A36-9EB3-272173A377A4}.Release|x64.Build.0 = Release|x64
{376B6926-005D-4A36-9EB3-272173A377A4}.Release|x64.Deploy.0 = Release|x64
@@ -279,9 +229,6 @@
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|ARM.ActiveCfg = Debug|ARM
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|ARM.Build.0 = Debug|ARM
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|ARM.Deploy.0 = Debug|ARM
- {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|x64.ActiveCfg = Debug|Any CPU
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|x86.ActiveCfg = Debug|x86
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|x86.Build.0 = Debug|x86
@@ -292,9 +239,6 @@
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|ARM.ActiveCfg = Release|ARM
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|ARM.Build.0 = Release|ARM
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|ARM.Deploy.0 = Release|ARM
- {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|Mixed Platforms.Build.0 = Release|x86
- {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|Mixed Platforms.Deploy.0 = Release|x86
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|x64.ActiveCfg = Release|Any CPU
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|x86.ActiveCfg = Release|x86
{270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|x86.Build.0 = Release|x86
@@ -303,8 +247,6 @@
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|ARM.ActiveCfg = Debug|ARM
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|ARM.Build.0 = Debug|ARM
- {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|Mixed Platforms.Build.0 = Debug|x86
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x64.ActiveCfg = Debug|Any CPU
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x86.ActiveCfg = Debug|x86
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x86.Build.0 = Debug|x86
@@ -312,8 +254,6 @@
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|Any CPU.Build.0 = Release|Any CPU
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|ARM.ActiveCfg = Release|ARM
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|ARM.Build.0 = Release|ARM
- {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|Mixed Platforms.Build.0 = Release|x86
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x64.ActiveCfg = Release|Any CPU
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x86.ActiveCfg = Release|x86
{9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x86.Build.0 = Release|x86
Modified: trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs
===================================================================
--- trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs 2014-08-27 07:22:57 UTC (rev 1481)
+++ trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs 2014-08-28 02:34:56 UTC (rev 1482)
@@ -34,6 +34,8 @@
int pos = (int)(time * 100);
image.Draw(pos % 100, pos % 200);
+
+ image.Draw(200, 200);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|