agate-svn-commit Mailing List for AgateLib (Page 6)
Status: Alpha
Brought to you by:
kanato
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
(86) |
May
(77) |
Jun
|
Jul
(1) |
Aug
(31) |
Sep
(12) |
Oct
(31) |
Nov
(53) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(53) |
Feb
(14) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(13) |
2011 |
Jan
(17) |
Feb
(5) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(21) |
Dec
|
2012 |
Jan
(6) |
Feb
(14) |
Mar
(5) |
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(8) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
(5) |
Nov
(9) |
Dec
(5) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
|
Jun
(5) |
Jul
(33) |
Aug
(69) |
Sep
(35) |
Oct
(4) |
Nov
(1) |
Dec
|
From: <ka...@us...> - 2014-07-24 02:07:20
|
Revision: 1412 http://sourceforge.net/p/agate/code/1412 Author: kanato Date: 2014-07-24 02:07:05 +0000 (Thu, 24 Jul 2014) Log Message: ----------- Refactor AgateConsole to be more portable. Rename Desktop.Forms to Platform.WindowsForms. Modified Paths: -------------- trunk/AgateLib/AgateLib-Portable.csproj trunk/AgateLib/AgateLib.csproj trunk/AgateLib/Core.cs trunk/AgateLib/DisplayLib/Display.cs trunk/AgateLib/InputLib/Keyboard.cs trunk/AgateLib-Everything.sln trunk/AgateLib-Windows.sln trunk/AgateLib.GL/AL_Audio.cs trunk/AgateLib.GL/AgateLib.GL.csproj trunk/AgateLib.GL/ContextFB.cs trunk/AgateLib.GL/GL3/DrawBuffer.cs trunk/AgateLib.GL/GL3/FrameBuffer.cs trunk/AgateLib.GL/GL3/GLPrimitiveRenderer.cs trunk/AgateLib.GL/GL3/GLVertexBuffer.cs trunk/AgateLib.GL/GL3/Shaders/GL3_Basic2DShader.cs trunk/AgateLib.GL/GL3/Shaders/GlslFragmentProgram.cs trunk/AgateLib.GL/GL3/Shaders/GlslShader.cs trunk/AgateLib.GL/GL3/Shaders/GlslShaderCompiler.cs trunk/AgateLib.GL/GL3/Shaders/GlslVertexProgram.cs trunk/AgateLib.GL/GL3/Shaders/IGL3Shader.cs trunk/AgateLib.GL/GL3/Shaders/ShaderFactory3.cs trunk/AgateLib.GL/GL3/Shaders/ShaderSources.Designer.cs trunk/AgateLib.GL/GLDrawBuffer.cs trunk/AgateLib.GL/GL_FrameBuffer.cs trunk/AgateLib.GL/GL_IndexBuffer.cs trunk/AgateLib.GL/GeoHelper.cs trunk/AgateLib.GL/IGL_Display.cs trunk/AgateLib.GL/IGL_Surface.cs trunk/AgateLib.GL/Legacy/FixedFunction/FixedFunctionShaderFactory.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Basic2DShader.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Lighting2D.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Lighting3D.cs trunk/AgateLib.GL/Legacy/FrameBufferExt.cs trunk/AgateLib.GL/Legacy/FrameBufferReadPixels.cs trunk/AgateLib.GL/Legacy/LegacyDrawBuffer.cs trunk/AgateLib.GL/Legacy/LegacyPrimitiveRenderer.cs trunk/AgateLib.GL/Legacy/LegacyVertexBuffer.cs trunk/AgateLib.GL/PrimitiveRenderer.cs trunk/AgateLib.GL/Properties/AssemblyInfo.cs trunk/AgateLib.GL/ShaderFactory.cs trunk/AgateLib.GL/TextureCoordinates.cs trunk/AgateLib.Platform.WindowsForms/Setup.cs trunk/AgateLib.Platform.WindowsForms/WinForms/AgateRenderTarget.Designer.cs trunk/AgateLib.Platform.WindowsForms/WinForms/AgateRenderTarget.cs trunk/AgateLib.Platform.WindowsForms/WinForms/BitmapFontUtil.cs trunk/AgateLib.Platform.WindowsForms/WinForms/BitmapFontUtilRenderers.cs trunk/AgateLib.Platform.WindowsForms/WinForms/DisplayWindowForm.Designer.cs trunk/AgateLib.Platform.WindowsForms/WinForms/DisplayWindowForm.cs trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs trunk/AgateLib.Platform.WindowsForms/WinForms/FormsInterop.cs trunk/AgateLib.Platform.WindowsForms/WinForms/Icons.Designer.cs trunk/AgateLib.Platform.WindowsForms/WinForms/SetSystemsForm.Designer.cs trunk/AgateLib.Platform.WindowsForms/WinForms/SetSystemsForm.cs trunk/AgateLib.Platform.WindowsForms/WinForms/TypeConverters.cs trunk/AgateLib.Platform.WindowsForms/WinForms/WinFormsDriver.cs trunk/AgateLib.Platform.WindowsForms/WinForms/WinFormsReporter.cs trunk/Drivers/AgateSDL/AgateSDL.csproj trunk/Examples/Pong/Pong.csproj trunk/Examples/ShootTheTraps/ShootTheTraps.csproj trunk/Tests/AudioTests/AudioPlayer/frmAudioPlayer.cs trunk/Tests/DisplayTests/RenderStates/frmRenderStateTest.Designer.cs trunk/Tests/DisplayTests/TestPacker/frmTestPacker.cs trunk/Tests/DisplayTests/TileTester/frmTileTester.Designer.cs trunk/Tests/InputTests/Input/frmInputTester.Designer.cs trunk/Tests/Launcher.cs trunk/Tests/Shaders/LightingTest/LightingTestForm.Designer.cs trunk/Tests/Shaders/LightingTest/LightingTestForm.cs trunk/Tests/Tests.csproj trunk/Tests/WinFormsTests/Converters.cs trunk/Tests/frmLauncher.cs trunk/Tools/DatabaseEditor/DatabaseEditor.csproj trunk/Tools/FontCreator/FontCreator.csproj trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj trunk/Tools/ResourceEditor/ResourceEditor.csproj trunk/UnitTests/Core/ConsoleTests.cs trunk/UnitTests/PlatformTests.cs trunk/UnitTests/UnitTests.csproj Added Paths: ----------- trunk/AgateLib/Diagnostics/ trunk/AgateLib/Diagnostics/AgateConsole.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleDictionary.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessage.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessageType.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ICommandProcessor.cs trunk/AgateLib/Platform/ trunk/AgateLib/Platform/Platform.cs trunk/AgateLib/Platform/PlatformType.cs trunk/AgateLib.Platform.WindowsForms/ trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj trunk/AgateLib.Platform.WindowsForms/Diagnostics/ trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleImpl.cs trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleTraceListener.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_Surface.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/frmFullScreen.Designer.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/frmFullScreen.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/frmFullScreen.resx trunk/AgateLib.Platform.WindowsForms/packages.config Removed Paths: ------------- trunk/AgateLib/AgateConsole.cs trunk/AgateLib/ICommandProcessor.cs trunk/AgateLib/Platform.cs trunk/AgateLib/PlatformType.cs trunk/AgateLib.Desktop.Forms/ trunk/AgateLib.Platform.WindowsForms/AgateLib.Desktop.Forms.csproj trunk/AgateLib.Platform.WindowsForms/DisplayImpl/ Deleted: trunk/AgateLib/AgateConsole.cs =================================================================== --- trunk/AgateLib/AgateConsole.cs 2014-07-21 01:50:48 UTC (rev 1411) +++ trunk/AgateLib/AgateConsole.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -1,645 +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.Linq; -using System.Text; -using System.Text.RegularExpressions; -using AgateLib.DisplayLib; -using AgateLib.Geometry; -using AgateLib.InputLib; -using System.ComponentModel; -using AgateLib.DisplayLib.Shaders; - -namespace AgateLib -{ - public class AgateConsole : IDisposable - { - #region --- Static Members --- - - static AgateConsole sInstance; - - public static bool IsInitialized { get { return sInstance != null; } } - - public static FontSurface Font { get; set; } - public static KeyCode VisibleToggleKey { get; set; } - public static bool IsVisible - { - get - { - if (sInstance == null) - return false; - - return sInstance.mVisible; - } - set - { - if (sInstance == null) - throw new AgateException("You must initalize the console before making it visible."); - - sInstance.mVisible = value; - } - } - - public static Color TextColor { get; set; } - public static Color EntryColor { get; set; } - public static Color BackgroundColor { get; set; } - public static AgateConsole Instance { get { return sInstance; } } - - public static ConsoleDictionary Commands { get { return Instance.CommandProcessor.Commands; } } - - public static void Initialize() - { - if (sInstance != null) - return; - - PrivateInitialize(); - } - - private static void PrivateInitialize() - { - if (sInstance == null) - sInstance = new AgateConsole(); - - VisibleToggleKey = KeyCode.Tilde; - - TextColor = Color.White; - EntryColor = Color.Yellow; - BackgroundColor = Color.FromArgb(192, Color.Black); - } - /// <summary> - /// Draws the console window. Call this right before your Display.EndFrame call. - /// </summary> - public static void Draw() - { - if (sInstance == null) return; - - if (Font == null) - Font = FontSurface.AgateSans10; - - sInstance.DrawImpl(); - } - - internal static void Keyboard_KeyDown(InputEventArgs e) - { - if (e.KeyCode == VisibleToggleKey) - { - sInstance.mVisible = !sInstance.mVisible; - sInstance.mHeight = Display.RenderTarget.Height * 5 / 12; - } - else if (sInstance.mVisible) - { - sInstance.ProcessKeyDown(e); - } - } - internal static void Keyboard_KeyUp(InputEventArgs eventArgs) - { - } - - - /// <summary> - /// Writes a line to the output part of the console window. - /// </summary> - /// <param name="text"></param> - public static void WriteLine(string text, params object[] args) - { - Instance.WriteLineImpl(string.Format(text, args)); - } - /// <summary> - /// Writes some text to the output part of the console window. - /// </summary> - /// <param name="text"></param> - public static void Write(string text) - { - Instance.WriteImpl(text); - } - - #endregion - - class AgateConsoleTraceListener : TraceListener - { - AgateConsole mOwner; - ConsoleMessage current; - Stopwatch watch = new Stopwatch(); - - public AgateConsoleTraceListener(AgateConsole owner) - { - mOwner = owner; - Trace.Listeners.Add(this); - - watch.Start(); - } - - public override void Write(string message) - { - if (current == null) - { - current = new ConsoleMessage(); - mOwner.mMessages.Add(current); - } - - current.Time = watch.ElapsedMilliseconds; - current.Text += message; - } - public override void WriteLine(string message) - { - if (current == null) - { - current = new ConsoleMessage(); - mOwner.mMessages.Add(current); - } - - current.Text += message; - current.Time = watch.ElapsedMilliseconds; - current = null; - } - - public Stopwatch Watch { get { return watch; } } - } - - List<ConsoleMessage> mInputHistory = new List<ConsoleMessage>(); - List<ConsoleMessage> mMessages = new List<ConsoleMessage>(); - AgateConsoleTraceListener mTraceListener; - ICommandProcessor mCommandProcessor = new AgateConsoleCommandProcessor(); - - bool mVisible = false; - string mCurrentLine; - int mHeight; - int mHistoryIndex; - - public AgateConsole() - { - if (sInstance != null) - throw new InvalidOperationException("Cannot create two AgateConsole objects!"); - - sInstance = this; - Initialize(); - - mTraceListener = new AgateConsoleTraceListener(this); - } - - public ICommandProcessor CommandProcessor - { - get { return mCommandProcessor; } - set { mCommandProcessor = value; } - } - - public void Dispose() - { - Dispose(true); - sInstance = null; - } - protected virtual void Dispose(bool disposing) { } - - - protected void WriteLineImpl(string text) - { - mTraceListener.WriteLine(text); - } - protected void WriteImpl(string text) - { - mTraceListener.Write(text); - } - - void DrawImpl() - { - if (mVisible == false) - { - long time = mTraceListener.Watch.ElapsedMilliseconds; - int y = 0; - Font.DisplayAlignment = OriginAlignment.TopLeft; - Font.Color = TextColor; - - for (int i = 0; i < mMessages.Count; i++) - { - if (time - mMessages[i].Time > 5000) - continue; - if (mMessages[i].MessageType != ConsoleMessageType.Text) - continue; - - Font.DrawText(new Point(0, y), mMessages[i].Text); - y += Font.FontHeight; - } - - while (mMessages.Count > 100) - mMessages.RemoveAt(0); - } - else - { - Display.Shader = AgateBuiltInShaders.Basic2DShader; - AgateBuiltInShaders.Basic2DShader.CoordinateSystem = new Rectangle(0, 0, Display.CurrentWindow.Width, Display.CurrentWindow.Height); - - Display.FillRect(new Rectangle(0, 0, Display.RenderTarget.Width, mHeight), BackgroundColor); - - int y = mHeight; - Font.DisplayAlignment = OriginAlignment.BottomLeft; - - string currentLineText = "> "; - - if (mHistoryIndex != 0) - currentLineText += EscapeText(mInputHistory[mInputHistory.Count - mHistoryIndex].Text); - else - currentLineText += EscapeText(mCurrentLine); - - Font.Color = EntryColor; - Font.DrawText(0, y, currentLineText); - - // draw insertion point - if (mTraceListener.Watch.ElapsedMilliseconds % 1000 < 500) - { - int x = Font.MeasureString(currentLineText).Width; - - Display.DrawLine( - new Point(x, y - Font.FontHeight), - new Point(x, y), - EntryColor); - } - - for (int i = mMessages.Count - 1; i >= 0; i--) - { - y -= Font.FontHeight; - var message = mMessages[i]; - - if (message.MessageType == ConsoleMessageType.UserInput) - { - Font.Color = EntryColor; - Font.DrawText(0, y, "> " + EscapeText(message.Text)); - } - else - { - Font.Color = TextColor; - Font.DrawText(0, y, EscapeText(message.Text)); - } - - if (y < 0) - break; - } - } - } - - private string EscapeText(string p) - { - if (p == null) - return p; - - return p.Replace("{", "{{}"); - } - - - /// <summary> - /// Sends the key string to the console as if the user typed it. - /// </summary> - /// <param name="keys"></param> - /// <remarks> - /// Control characters are treated specially. A line feed (\n) is - /// treated as the end of line. \r is ignored. - /// \t is converted to a space. - /// </remarks> - public void ProcessKeys(string keys) - { - keys = keys.Replace('\t', ' '); - keys = keys.Replace("\r", ""); - - ModifyHistoryLine(); - - int index = keys.IndexOf('\n'); - while (index > -1) - { - mCurrentLine += keys.Substring(0, index); - ProcessKeyDown(new InputEventArgs(KeyCode.Enter, new KeyModifiers())); - - keys = keys.Substring(index + 1); - index = keys.IndexOf('\n'); - } - - mCurrentLine += keys; - } - /// <summary> - /// Processes an input key. - /// </summary> - /// <param name="e"></param> - public void ProcessKeyDown(InputEventArgs e) - { - if (e.KeyCode == KeyCode.Up) - { - mHistoryIndex++; - - if (mHistoryIndex > mInputHistory.Count) - mHistoryIndex = mInputHistory.Count; - } - else if (e.KeyCode == KeyCode.Down) - { - mHistoryIndex--; - - if (mHistoryIndex < 0) - mHistoryIndex = 0; - } - else if (e.KeyCode == KeyCode.Enter || e.KeyCode == KeyCode.Return) - { - ModifyHistoryLine(); - - ConsoleMessage input = new ConsoleMessage - { - Text = mCurrentLine, - MessageType = ConsoleMessageType.UserInput, - Time = mTraceListener.Watch.ElapsedMilliseconds - }; - - mMessages.Add(input); - mInputHistory.Add(input); - - ExecuteCommand(); - } - else if (string.IsNullOrEmpty(e.KeyString) == false) - { - ModifyHistoryLine(); - - if (e.KeyCode == KeyCode.Tab) - mCurrentLine += " "; - else - mCurrentLine += e.KeyString; - } - else if (e.KeyCode == KeyCode.BackSpace) - { - ModifyHistoryLine(); - - if (mCurrentLine.Length > 0) - { - mCurrentLine = mCurrentLine.Substring(0, mCurrentLine.Length - 1); - } - } - } - - private void ModifyHistoryLine() - { - if (mHistoryIndex > 0) - { - mCurrentLine = mInputHistory[mInputHistory.Count - mHistoryIndex].Text; - mHistoryIndex = 0; - } - } - - static char[] splitters = new char[] { ' ' }; - - private void ExecuteCommand() - { - if (string.IsNullOrEmpty(mCurrentLine)) - return; - if (mCurrentLine.Trim() == string.Empty) - return; - - // regular expression obtained from - // http://stackoverflow.com/questions/554013/regular-expression-to-split-on-spaces-unless-in-quotes - // - var regexMatches = Regex.Matches(mCurrentLine, @"((""((?<token>.*?)(?<!\\)"")|(?<token>[\w]+))(\s)*)"); - - string[] tokens = (from Match m in regexMatches - where m.Groups["token"].Success - select m.Groups["token"].Value).ToArray(); - - tokens[0] = tokens[0].ToLowerInvariant(); - - mCurrentLine = string.Empty; - - try - { - mCommandProcessor.ExecuteCommand(tokens); - } - catch (System.Reflection.TargetInvocationException ex) - { - var e = ex.InnerException; - - WriteLine("Caught exception: {0}", e.GetType()); - WriteLine(e.Message); - } - } - - public string CurrentLine { get { return mCurrentLine; } } - } - - public class ConsoleDictionary : Dictionary<string, Delegate> - { - public void Add<T>(string key, Action<T> value) - { - base.Add(key, value); - } - public void Add<T1, T2>(string key, Action<T1, T2> value) - { - base.Add(key, value); - } - public void Add<T1, T2, T3>(string key, Action<T1, T2, T3> value) - { - base.Add(key, value); - } - public void Add<T1, T2, T3, T4>(string key, Action<T1, T2, T3, T4> value) - { - base.Add(key, value); - } - - public void Add<TResult>(string key, Func<TResult> value) - { - base.Add(key, value); - } - public void Add<T1, TResult>(string key, Func<T1, TResult> value) - { - base.Add(key, value); - } - public void Add<T1, T2, TResult>(string key, Func<T1, T2, TResult> value) - { - base.Add(key, value); - } - public void Add<T1, T2, T3, TResult>(string key, Func<T1, T2, T3, TResult> value) - { - base.Add(key, value); - } - public void Add<T1, T2, T3, T4, TResult>(string key, Func<T1, T2, T3, T4, TResult> value) - { - base.Add(key, value); - } - } - public delegate string DescribeCommandHandler(string command); - - class ConsoleMessage - { - public string Text; - public long Time; - public ConsoleMessageType MessageType; - } - - enum ConsoleMessageType - { - Text, - UserInput, - } - - public class AgateConsoleCommandProcessor : ICommandProcessor - { - ConsoleDictionary mCommands = new ConsoleDictionary(); - - public AgateConsoleCommandProcessor() - { - mCommands.Add("help", new Action<string>(HelpCommand)); - } - - public ConsoleDictionary Commands { get { return mCommands; } } - - public void ExecuteCommand(string[] tokens) - { - if (mCommands.ContainsKey(tokens[0]) == false) - { - WriteLine("Invalid command: " + tokens[0]); - } - else - { - ExecuteDelegate(mCommands[tokens[0]], tokens); - } - } - - private void ExecuteDelegate(Delegate p, string[] tokens) - { - var parameters = p.Method.GetParameters(); - object[] args = new object[parameters.Length]; - bool notEnoughArgs = false; - bool badArgs = false; - - for (int i = 0; i < parameters.Length || i < tokens.Length - 1; i++) - { - if (i < args.Length && i < tokens.Length - 1) - { - try - { - args[i] = Convert.ChangeType(tokens[i + 1], parameters[i].ParameterType); - } - catch - { - WriteLine("Argument #" + (i + 1).ToString() + " invalid: \"" + - tokens[i + 1] + "\" not convertable to " + parameters[i].ParameterType.Name); - badArgs = true; - } - } - else if (i < args.Length) - { - if (parameters[i].IsOptional) - { - args[i] = Type.Missing; - } - else - { - if (notEnoughArgs == false) - { - WriteLine("Insufficient arguments for command: " + tokens[0]); - } - notEnoughArgs = true; - - WriteLine(" missing " + parameters[i].ParameterType.Name + " argument: " + parameters[i].Name); - } - } - else - { - WriteLine("[Ignoring extra argument: " + tokens[i + 1] + "]"); - } - } - - if (badArgs || notEnoughArgs) - return; - - object retval = p.Method.Invoke(p.Target, args); - - if (p.Method.ReturnType != typeof(void) && retval != null) - { - WriteLine(retval.ToString()); - } - } - - - private void HelpCommand(string command = "") - { - command = command.ToLowerInvariant().Trim(); - - if (string.IsNullOrEmpty(command) || mCommands.ContainsKey(command) == false) - { - WriteLine("Available Commands:"); - - foreach (var cmd in mCommands.Keys) - { - if (cmd == "help") - continue; - - WriteLine(" " + cmd); - } - - WriteLine("Type \"help <command>\" for help on a specific command."); - } - else - { - Delegate d = mCommands[command]; - - Write("Usage: "); - Write(command + " "); - - var parameters = d.Method.GetParameters(); - for (int i = 0; i < parameters.Length; i++) - { - if (parameters[i].IsOptional) - Write("["); - - Write(parameters[i].Name); - - if (parameters[i].IsOptional) - Write("]"); - } - - WriteLine(""); - - string description = ""; - - if (DescribeCommand != null) - { - description = DescribeCommand(command); - } - if (string.IsNullOrEmpty(description)) - { - var descripAttrib = (DescriptionAttribute)d.Method.GetCustomAttributes(typeof(DescriptionAttribute), false).FirstOrDefault(); - - if (descripAttrib != null) - description = descripAttrib.Description; - } - - if (string.IsNullOrEmpty(description) == false) - { - WriteLine(description); - } - - } - } - - void WriteLine(string text) - { - AgateConsole.WriteLine(text); - } - void Write(string text) - { - AgateConsole.Write(text); - } - - public event DescribeCommandHandler DescribeCommand; - } - -} Modified: trunk/AgateLib/AgateLib-Portable.csproj =================================================================== --- trunk/AgateLib/AgateLib-Portable.csproj 2014-07-21 01:50:48 UTC (rev 1411) +++ trunk/AgateLib/AgateLib-Portable.csproj 2014-07-24 02:07:05 UTC (rev 1412) @@ -57,7 +57,6 @@ <Folder Include="Serialization\Xle\" /> </ItemGroup> <ItemGroup> - <Compile Include="AgateConsole.cs" /> <Compile Include="AgateException.cs"> <SubType>Code</SubType> </Compile> @@ -83,6 +82,12 @@ <Compile Include="Core.cs"> <SubType>Code</SubType> </Compile> + <Compile Include="Diagnostics\AgateConsole.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\AgateConsoleCommandProcessor.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\ConsoleDictionary.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\ConsoleMessage.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\ConsoleMessageType.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\ICommandProcessor.cs" /> <Compile Include="DisplayLib\FrameBuffer.cs" /> <Compile Include="DisplayLib\IFrameBuffer.cs" /> <Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" /> @@ -100,7 +105,6 @@ <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" /> - <Compile Include="ICommandProcessor.cs" /> <Compile Include="IFileProvider.cs"> <SubType>Code</SubType> </Compile> @@ -108,8 +112,8 @@ <Compile Include="InputLib\Delegates.cs" /> <Compile Include="InputLib\HatState.cs" /> <Compile Include="InputLib\JoystickEventArgs.cs" /> - <Compile Include="Platform.cs" /> - <Compile Include="PlatformType.cs" /> + <Compile Include="Platform\Platform.cs" /> + <Compile Include="Platform\PlatformType.cs" /> <Compile Include="Resources\ImageResource.cs" /> <Compile Include="Settings\SettingsGroup.cs" /> <Compile Include="Timing.cs"> Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-07-21 01:50:48 UTC (rev 1411) +++ trunk/AgateLib/AgateLib.csproj 2014-07-24 02:07:05 UTC (rev 1412) @@ -125,7 +125,6 @@ </ItemGroup> <ItemGroup /> <ItemGroup> - <Compile Include="AgateConsole.cs" /> <Compile Include="AgateException.cs"> <SubType>Code</SubType> </Compile> @@ -161,6 +160,11 @@ <Compile Include="Data\FieldType.cs" /> <Compile Include="Data\AgateRowList.cs" /> <Compile Include="Data\AgateTableDictionary.cs" /> + <Compile Include="Diagnostics\AgateConsole.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\AgateConsoleCommandProcessor.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\ConsoleDictionary.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\ConsoleMessage.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\ConsoleMessageType.cs" /> <Compile Include="DisplayLib\FrameBuffer.cs" /> <Compile Include="DisplayLib\IFrameBuffer.cs" /> <Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" /> @@ -179,7 +183,7 @@ <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" /> - <Compile Include="ICommandProcessor.cs" /> + <Compile Include="Diagnostics\ConsoleSupport\ICommandProcessor.cs" /> <Compile Include="IFileProvider.cs"> <SubType>Code</SubType> </Compile> @@ -187,8 +191,8 @@ <Compile Include="InputLib\Delegates.cs" /> <Compile Include="InputLib\HatState.cs" /> <Compile Include="InputLib\JoystickEventArgs.cs" /> - <Compile Include="Platform.cs" /> - <Compile Include="PlatformType.cs" /> + <Compile Include="Platform\Platform.cs" /> + <Compile Include="Platform\PlatformType.cs" /> <Compile Include="Resources\ImageResource.cs" /> <Compile Include="Serialization\Xle\CompressionType.cs" /> <Compile Include="Serialization\Xle\IXleTypeSerializer.cs" /> Modified: trunk/AgateLib/Core.cs =================================================================== --- trunk/AgateLib/Core.cs 2014-07-21 01:50:48 UTC (rev 1411) +++ trunk/AgateLib/Core.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -25,6 +25,7 @@ using AgateLib.AudioLib; using AgateLib.DisplayLib; using AgateLib.Settings; +using AgateLib.Platform; namespace AgateLib { @@ -90,7 +91,7 @@ private static bool sAutoPause = false; private static bool sIsActive = true; private static bool sInititalized = false; - private static readonly Platform mPlatform = new Platform(); + private static readonly PlatformInfo mPlatform = new PlatformInfo(); private static PersistantSettings sSettings; @@ -329,7 +330,7 @@ /// <summary> /// Gets an object which describes details about the current platform. /// </summary> - public static Platform Platform + public static PlatformInfo Platform { get { return mPlatform; } } Added: trunk/AgateLib/Diagnostics/AgateConsole.cs =================================================================== --- trunk/AgateLib/Diagnostics/AgateConsole.cs (rev 0) +++ trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -0,0 +1,371 @@ +using AgateLib.Diagnostics.ConsoleSupport; +using AgateLib.DisplayLib; +using AgateLib.DisplayLib.Shaders; +using AgateLib.Geometry; +using AgateLib.InputLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace AgateLib.Diagnostics +{ + public abstract class AgateConsole : IDisposable + { + #region --- Static Members --- + + protected static AgateConsole sInstance; + + public static bool IsInitialized { get { return sInstance != null; } } + + public static FontSurface Font { get; set; } + public static KeyCode VisibleToggleKey { get; set; } + public static bool IsVisible + { + get + { + if (sInstance == null) + return false; + + return sInstance.mVisible; + } + set + { + if (sInstance == null) + throw new AgateException("You must initalize the console before making it visible."); + + sInstance.mVisible = value; + } + } + + public static Color TextColor { get; set; } + public static Color EntryColor { get; set; } + public static Color BackgroundColor { get; set; } + public static AgateConsole Instance { get { return sInstance; } } + + public static ConsoleDictionary Commands { get { return Instance.CommandProcessor.Commands; } } + + public static void Initialize() + { + if (sInstance != null) + return; + + PrivateInitialize(); + } + + private static void PrivateInitialize() + { + if (sInstance == null) + throw new InvalidOperationException(); + + VisibleToggleKey = KeyCode.Tilde; + + TextColor = Color.White; + EntryColor = Color.Yellow; + BackgroundColor = Color.FromArgb(192, Color.Black); + } + /// <summary> + /// Draws the console window. Call this right before your Display.EndFrame call. + /// </summary> + public static void Draw() + { + if (sInstance == null) return; + + if (Font == null) + Font = FontSurface.AgateSans10; + + sInstance.DrawImpl(); + } + + internal static void Keyboard_KeyDown(InputEventArgs e) + { + if (e.KeyCode == VisibleToggleKey) + { + sInstance.mVisible = !sInstance.mVisible; + sInstance.mHeight = Display.RenderTarget.Height * 5 / 12; + } + else if (sInstance.mVisible) + { + sInstance.ProcessKeyDown(e); + } + } + internal static void Keyboard_KeyUp(InputEventArgs eventArgs) + { + } + + + /// <summary> + /// Writes a line to the output part of the console window. + /// </summary> + /// <param name="text"></param> + public static void WriteLine(string text, params object[] args) + { + Instance.WriteLineImpl(string.Format(text, args)); + } + /// <summary> + /// Writes some text to the output part of the console window. + /// </summary> + /// <param name="text"></param> + public static void Write(string text) + { + Instance.WriteImpl(text); + } + + #endregion + + protected bool mVisible = false; + protected List<ConsoleMessage> mInputHistory = new List<ConsoleMessage>(); + List<ConsoleMessage> mMessages = new List<ConsoleMessage>(); + + string mCurrentLine; + int mHeight; + int mHistoryIndex; + + ICommandProcessor mCommandProcessor = new AgateConsoleCommandProcessor(); + + public AgateConsole() + { + if (sInstance != null) + throw new InvalidOperationException("Cannot create two AgateConsole objects!"); + + sInstance = this; + } + + public void Dispose() + { + Dispose(true); + sInstance = null; + } + protected virtual void Dispose(bool disposing) { } + + public ICommandProcessor CommandProcessor + { + get { return mCommandProcessor; } + set { mCommandProcessor = value; } + } + + public List<ConsoleMessage> Messages { get { return mMessages; } } + + + void DrawImpl() + { + if (mVisible == false) + { + long time = CurrentTime; + int y = 0; + Font.DisplayAlignment = OriginAlignment.TopLeft; + Font.Color = TextColor; + + for (int i = 0; i < mMessages.Count; i++) + { + if (time - mMessages[i].Time > 5000) + continue; + if (mMessages[i].MessageType != ConsoleMessageType.Text) + continue; + + Font.DrawText(new Point(0, y), mMessages[i].Text); + y += Font.FontHeight; + } + + while (mMessages.Count > 100) + mMessages.RemoveAt(0); + } + else + { + Display.Shader = AgateBuiltInShaders.Basic2DShader; + AgateBuiltInShaders.Basic2DShader.CoordinateSystem = new Rectangle(0, 0, Display.CurrentWindow.Width, Display.CurrentWindow.Height); + + Display.FillRect(new Rectangle(0, 0, Display.RenderTarget.Width, mHeight), BackgroundColor); + + int y = mHeight; + Font.DisplayAlignment = OriginAlignment.BottomLeft; + + string currentLineText = "> "; + + if (mHistoryIndex != 0) + currentLineText += EscapeText(mInputHistory[mInputHistory.Count - mHistoryIndex].Text); + else + currentLineText += EscapeText(mCurrentLine); + + Font.Color = EntryColor; + Font.DrawText(0, y, currentLineText); + + // draw insertion point + if (CurrentTime % 1000 < 500) + { + int x = Font.MeasureString(currentLineText).Width; + + Display.DrawLine( + new Point(x, y - Font.FontHeight), + new Point(x, y), + EntryColor); + } + + for (int i = mMessages.Count - 1; i >= 0; i--) + { + y -= Font.FontHeight; + var message = mMessages[i]; + + if (message.MessageType == ConsoleMessageType.UserInput) + { + Font.Color = EntryColor; + Font.DrawText(0, y, "> " + EscapeText(message.Text)); + } + else + { + Font.Color = TextColor; + Font.DrawText(0, y, EscapeText(message.Text)); + } + + if (y < 0) + break; + } + } + } + + private string EscapeText(string p) + { + if (p == null) + return p; + + return p.Replace("{", "{{}"); + } + + protected abstract void WriteLineImpl(string text); + protected abstract void WriteImpl(string text); + + /// <summary> + /// Sends the key string to the console as if the user typed it. + /// </summary> + /// <param name="keys"></param> + /// <remarks> + /// Control characters are treated specially. A line feed (\n) is + /// treated as the end of line. \r is ignored. + /// \t is converted to a space. + /// </remarks> + public void ProcessKeys(string keys) + { + keys = keys.Replace('\t', ' '); + keys = keys.Replace("\r", ""); + + ModifyHistoryLine(); + + int index = keys.IndexOf('\n'); + while (index > -1) + { + mCurrentLine += keys.Substring(0, index); + ProcessKeyDown(new InputEventArgs(KeyCode.Enter, new KeyModifiers())); + + keys = keys.Substring(index + 1); + index = keys.IndexOf('\n'); + } + + mCurrentLine += keys; + } + /// <summary> + /// Processes an input key. + /// </summary> + /// <param name="e"></param> + public void ProcessKeyDown(InputEventArgs e) + { + if (e.KeyCode == KeyCode.Up) + { + mHistoryIndex++; + + if (mHistoryIndex > mInputHistory.Count) + mHistoryIndex = mInputHistory.Count; + } + else if (e.KeyCode == KeyCode.Down) + { + mHistoryIndex--; + + if (mHistoryIndex < 0) + mHistoryIndex = 0; + } + else if (e.KeyCode == KeyCode.Enter || e.KeyCode == KeyCode.Return) + { + ModifyHistoryLine(); + + ConsoleMessage input = new ConsoleMessage + { + Text = mCurrentLine, + MessageType = ConsoleMessageType.UserInput, + Time = CurrentTime + }; + + mMessages.Add(input); + mInputHistory.Add(input); + + ExecuteCommand(); + } + else if (string.IsNullOrEmpty(e.KeyString) == false) + { + ModifyHistoryLine(); + + if (e.KeyCode == KeyCode.Tab) + mCurrentLine += " "; + else + mCurrentLine += e.KeyString; + } + else if (e.KeyCode == KeyCode.BackSpace) + { + ModifyHistoryLine(); + + if (mCurrentLine.Length > 0) + { + mCurrentLine = mCurrentLine.Substring(0, mCurrentLine.Length - 1); + } + } + } + + private void ExecuteCommand() + { + if (string.IsNullOrEmpty(mCurrentLine)) + return; + if (mCurrentLine.Trim() == string.Empty) + return; + + // regular expression obtained from + // http://stackoverflow.com/questions/554013/regular-expression-to-split-on-spaces-unless-in-quotes + // + var regexMatches = Regex.Matches(mCurrentLine, @"((""((?<token>.*?)(?<!\\)"")|(?<token>[\w]+))(\s)*)"); + + string[] tokens = (from Match m in regexMatches + where m.Groups["token"].Success + select m.Groups["token"].Value).ToArray(); + + tokens[0] = tokens[0].ToLowerInvariant(); + + mCurrentLine = string.Empty; + + try + { + CommandProcessor.ExecuteCommand(tokens); + } + catch (System.Reflection.TargetInvocationException ex) + { + var e = ex.InnerException; + + WriteLine("Caught exception: {0}", e.GetType()); + WriteLine(e.Message); + } + } + + public string CurrentLine { get { return mCurrentLine; } } + + + private void ModifyHistoryLine() + { + if (mHistoryIndex > 0) + { + mCurrentLine = mInputHistory[mInputHistory.Count - mHistoryIndex].Text; + mHistoryIndex = 0; + } + } + + + protected abstract long CurrentTime { get; } + } +} Added: trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs (rev 0) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -0,0 +1,163 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Diagnostics.ConsoleSupport +{ + public class AgateConsoleCommandProcessor : ICommandProcessor + { + ConsoleDictionary mCommands = new ConsoleDictionary(); + + public AgateConsoleCommandProcessor() + { + mCommands.Add("help", new Action<string>(HelpCommand)); + } + + public ConsoleDictionary Commands { get { return mCommands; } } + + public void ExecuteCommand(string[] tokens) + { + if (mCommands.ContainsKey(tokens[0]) == false) + { + WriteLine("Invalid command: " + tokens[0]); + } + else + { + ExecuteDelegate(mCommands[tokens[0]], tokens); + } + } + + private void ExecuteDelegate(Delegate p, string[] tokens) + { + var parameters = p.Method.GetParameters(); + object[] args = new object[parameters.Length]; + bool notEnoughArgs = false; + bool badArgs = false; + + for (int i = 0; i < parameters.Length || i < tokens.Length - 1; i++) + { + if (i < args.Length && i < tokens.Length - 1) + { + try + { + args[i] = Convert.ChangeType(tokens[i + 1], parameters[i].ParameterType); + } + catch + { + WriteLine("Argument #" + (i + 1).ToString() + " invalid: \"" + + tokens[i + 1] + "\" not convertable to " + parameters[i].ParameterType.Name); + badArgs = true; + } + } + else if (i < args.Length) + { + if (parameters[i].IsOptional) + { + args[i] = Type.Missing; + } + else + { + if (notEnoughArgs == false) + { + WriteLine("Insufficient arguments for command: " + tokens[0]); + } + notEnoughArgs = true; + + WriteLine(" missing " + parameters[i].ParameterType.Name + " argument: " + parameters[i].Name); + } + } + else + { + WriteLine("[Ignoring extra argument: " + tokens[i + 1] + "]"); + } + } + + if (badArgs || notEnoughArgs) + return; + + object retval = p.Method.Invoke(p.Target, args); + + if (p.Method.ReturnType != typeof(void) && retval != null) + { + WriteLine(retval.ToString()); + } + } + + + private void HelpCommand(string command = "") + { + command = command.ToLowerInvariant().Trim(); + + if (string.IsNullOrEmpty(command) || mCommands.ContainsKey(command) == false) + { + WriteLine("Available Commands:"); + + foreach (var cmd in mCommands.Keys) + { + if (cmd == "help") + continue; + + WriteLine(" " + cmd); + } + + WriteLine("Type \"help <command>\" for help on a specific command."); + } + else + { + Delegate d = mCommands[command]; + + Write("Usage: "); + Write(command + " "); + + var parameters = d.Method.GetParameters(); + for (int i = 0; i < parameters.Length; i++) + { + if (parameters[i].IsOptional) + Write("["); + + Write(parameters[i].Name); + + if (parameters[i].IsOptional) + Write("]"); + } + + WriteLine(""); + + string description = ""; + + if (DescribeCommand != null) + { + description = DescribeCommand(command); + } + if (string.IsNullOrEmpty(description)) + { + var descripAttrib = (DescriptionAttribute)d.Method.GetCustomAttributes(typeof(DescriptionAttribute), false).FirstOrDefault(); + + if (descripAttrib != null) + description = descripAttrib.Description; + } + + if (string.IsNullOrEmpty(description) == false) + { + WriteLine(description); + } + + } + } + + void WriteLine(string text) + { + AgateConsole.WriteLine(text); + } + void Write(string text) + { + AgateConsole.Write(text); + } + + public event DescribeCommandHandler DescribeCommand; + } + +} Added: trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleDictionary.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleDictionary.cs (rev 0) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleDictionary.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Diagnostics.ConsoleSupport +{ + + public class ConsoleDictionary : Dictionary<string, Delegate> + { + public void Add<T>(string key, Action<T> value) + { + base.Add(key, value); + } + public void Add<T1, T2>(string key, Action<T1, T2> value) + { + base.Add(key, value); + } + public void Add<T1, T2, T3>(string key, Action<T1, T2, T3> value) + { + base.Add(key, value); + } + public void Add<T1, T2, T3, T4>(string key, Action<T1, T2, T3, T4> value) + { + base.Add(key, value); + } + + public void Add<TResult>(string key, Func<TResult> value) + { + base.Add(key, value); + } + public void Add<T1, TResult>(string key, Func<T1, TResult> value) + { + base.Add(key, value); + } + public void Add<T1, T2, TResult>(string key, Func<T1, T2, TResult> value) + { + base.Add(key, value); + } + public void Add<T1, T2, T3, TResult>(string key, Func<T1, T2, T3, TResult> value) + { + base.Add(key, value); + } + public void Add<T1, T2, T3, T4, TResult>(string key, Func<T1, T2, T3, T4, TResult> value) + { + base.Add(key, value); + } + } +} Added: trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessage.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessage.cs (rev 0) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessage.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Diagnostics.ConsoleSupport +{ + public class ConsoleMessage + { + public string Text; + public long Time; + public ConsoleMessageType MessageType; + } + +} Added: trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessageType.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessageType.cs (rev 0) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessageType.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Diagnostics.ConsoleSupport +{ + + public delegate string DescribeCommandHandler(string command); + + public enum ConsoleMessageType + { + Text, + UserInput, + } +} Added: trunk/AgateLib/Diagnostics/ConsoleSupport/ICommandProcessor.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/ICommandProcessor.cs (rev 0) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/ICommandProcessor.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -0,0 +1,11 @@ +using System; + +namespace AgateLib.Diagnostics.ConsoleSupport +{ + public interface ICommandProcessor + { + ConsoleDictionary Commands { get; } + event DescribeCommandHandler DescribeCommand; + void ExecuteCommand(string[] tokens); + } +} Modified: trunk/AgateLib/DisplayLib/Display.cs =================================================================== --- trunk/AgateLib/DisplayLib/Display.cs 2014-07-21 01:50:48 UTC (rev 1411) +++ trunk/AgateLib/DisplayLib/Display.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -25,6 +25,7 @@ using AgateLib.Drivers; using AgateLib.Geometry; using AgateLib.Utility; +using AgateLib.Diagnostics; namespace AgateLib.DisplayLib { Deleted: trunk/AgateLib/ICommandProcessor.cs =================================================================== --- trunk/AgateLib/ICommandProcessor.cs 2014-07-21 01:50:48 UTC (rev 1411) +++ trunk/AgateLib/ICommandProcessor.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -1,11 +0,0 @@ -using System; - -namespace AgateLib -{ - public interface ICommandProcessor - { - ConsoleDictionary Commands { get; } - event DescribeCommandHandler DescribeCommand; - void ExecuteCommand(string[] tokens); - } -} Modified: trunk/AgateLib/InputLib/Keyboard.cs =================================================================== --- trunk/AgateLib/InputLib/Keyboard.cs 2014-07-21 01:50:48 UTC (rev 1411) +++ trunk/AgateLib/InputLib/Keyboard.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -21,6 +21,7 @@ using System.Text; using AgateLib.Geometry; +using AgateLib.Diagnostics; namespace AgateLib.InputLib { Added: trunk/AgateLib/Platform/Platform.cs =================================================================== --- trunk/AgateLib/Platform/Platform.cs (rev 0) +++ trunk/AgateLib/Platform/Platform.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -0,0 +1,374 @@ +// 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.Linq; +using System.Text; +using System.Reflection; +using System.Runtime.InteropServices; + +namespace AgateLib.Platform +{ + /// <summary> + /// Class which contains known information about the platform. + /// This class also contains the folders where the application should store its data, + /// which are automatically created from the AssemblyCompanhy and AssemblyProduct + /// attributes for the assembly where the entry point for the application is. + /// </summary> + public class PlatformInfo + { + PlatformType mType; + DotNetRuntime mRuntime; + WindowsVersion mWindowsVersion; + string mDocuments; + string mAppData; + string mAppDir; + bool m64Bit; + + internal PlatformInfo() + { + + mType = DetectPlatformType(); + mRuntime = DetectRuntime(); + m64Bit = Detect64Bit(); + + // According to http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k%28SYSTEM.DIAGNOSTICS.DEBUG.LISTENERS%29;k%28TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV3.5%22%29;k%28DevLang-CSHARP%29&rd=true + // The Listeners collection is shared by both the Debug and the Trace classes; + // adding a trace listener to either class adds the listener to both. + // So we will just use the Trace.Listeners class. + if (PlatformType != PlatformType.Windows) + { + Trace.Listeners.Add(new TextWriterTraceListener(Console.Out)); + } + + //CheckOSVersion(); + + //if (mType == PlatformType.Windows) + // mWindowsVersion = DetectWindowsVersion(); + + SetFolders(); + + string debugLog = "agate-debuglog.txt"; + + if (HasWriteAccessToAppDirectory()) + { + debugLog = Path.Combine(mAppDir, debugLog); + } + else + { + debugLog = Path.Combine(mAppData, debugLog); + } + + try + { + Trace.Listeners.Add(new TextWriterTraceListener(new StreamWriter(debugLog))); + } + catch (Exception) + { + Trace.WriteLine("Could not open debug or trace log for writing."); + } + + Trace.WriteLine("64-bit platform: " + m64Bit.ToString()); + + } + + private bool Detect64Bit() + { + unsafe + { + int size = sizeof(IntPtr); + + switch (size) + { + case 4: return false; + case 8: return true; + default: + throw new AgateException(string.Format("Size of IntPtr is {0}.", size)); + } + } + } + + private bool HasWriteAccessToAppDirectory() + { + return false; + /* + * TODO: Fix this!! + // TODO: Maybe there is a better way to inspect permissions? + // here we just try to write and see if we fail. + string filename = Path.GetTempFileName(); + + try + { + string targetFile = Path.Combine(mAppDir, Path.GetFileName(filename)); + + using (var w = new StreamWriter( targetFile)) + { + w.WriteLine("x"); + } + + File.Delete(targetFile); + return true; + } + catch + { + return false; + }*/ + } + + internal void EnsureAppDataDirectoryExists() + { + Directory.CreateDirectory(AppDataDirectory); + } + + /// <summary> + /// Gets the directory where the application should store its configuration data. + /// </summary> + public string AppDataDirectory + { + get { return mAppData; } + } + + static T GetCustomAttribute<T>(Assembly ass) where T : Attribute + { + try + { + return ass.GetCustomAttributes(typeof(T), false)[0] as T; + } + catch + { + return null; + } + } + + private void SetFolders() + { + Assembly entryPt = Assembly.GetEntryAssembly() ?? Assembly.GetCallingAssembly(); + string fqn = entryPt.GetLoadedModules()[0].FullyQualifiedName; + + var companyAttribute = GetCustomAttribute<AssemblyCompanyAttribute>(entryPt); + var nameAttribute = GetCustomAttribute<AssemblyProductAttribute>(entryPt); + + mAppDir = Path.GetDirectoryName(fqn); + Console.WriteLine("App Dir: {0}", mAppDir); + + string companyName = companyAttribute != null ? companyAttribute.Company : string.Empty; + string product = nameAttribute != null ? nameAttribute.Product : string.Empty; + + SetFolderPaths(companyName, product); + } + + /// <summary> + /// Sets the folder paths for data based on the company name and application name. + /// This only needs to be called if the values used in the AssemblyCompany and + /// AssemblyProduct are not what you want to use to define these locations. + /// </summary> + /// <param name="companyName"></param> + /// <param name="appName"></param> + public void SetFolderPaths(string companyName, string appName) + { + string combDir = Path.Combine(companyName, appName); + + if (string.IsNullOrEmpty(combDir)) + { + mAppData = mAppDir; + Trace.WriteLine("Warning: No assembly level company / product name attributes were found."); + } + else + mAppData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + + mDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + + mAppData = Path.Combine(mAppData, combDir); + mDocuments = Path.Combine(mDocuments, combDir); + + Console.WriteLine("App Data: {0}", mAppData); + Console.WriteLine("Documents: {0}", mDocuments); + + } + + private DotNetRuntime DetectRuntime() + { + DotNetRuntime runtime = DotNetRuntime.MicrosoftDotNet; + + if (Type.GetType("Mono.Runtime") != null) + runtime = DotNetRuntime.Mono; + + return runtime; + } + + /// <summary> + /// Returns the version of windows being used, if the current platform is Windows. + /// An exception is thrown if this property is checked when the platform is not Windows. + /// </summary> + public WindowsVersion WindowsVersion + { + get + { + if (PlatformType != PlatformType.Windows) + throw new AgateCrossPlatformException( + "Current platform is not Windows, but the WindowsVersion property was checked."); + + return mWindowsVersion; + } + } + + /// <summary> + /// Gets the platform type. + /// </summary> + public PlatformType PlatformType + { + get { return mType; } + } + /// <summary> + /// Gets the runtime being used. + /// </summary> + public DotNetRuntime Runtime + { + get { return mRuntime; } + } + + PlatformType DetectPlatformType() + { + switch (Environment.OSVersion.Platform) + { + case PlatformID.WinCE: + case PlatformID.Win32NT: + case PlatformID.Win32S: + case PlatformID.Win32Windows: + return PlatformType.Windows; + + case PlatformID.Unix: + string kernel = DetectUnixKernel(); + + if (kernel == "Darwin") + return PlatformType.MacOS; + else + return PlatformType.Linux; + + case PlatformID.MacOSX: + return PlatformType.MacOS; + + case PlatformID.Xbox: + return PlatformType.XBox360; + } + + return PlatformType.Unknown; + } + + #region private static string DetectUnixKernel() + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] + struct utsname + { + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string sysname; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string nodename; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string release; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string version; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string machine; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] + private string extraJustInCase; + + } + + /// <summary> + /// Detects the unix kernel by p/invoking the uname call in libc. + /// </summary> + /// <returns></returns> + private static string DetectUnixKernel() + { + Debug.WriteLine("Size: {0}", Marshal.SizeOf(typeof(utsname)).ToString()); + Debug.Flush(); + + utsname uts = new utsname(); + uname(out uts); + + Debug.WriteLine("System:"); + Debug.WriteLine(uts.sysname); + Debug.WriteLine(uts.nodename); + Debug.WriteLine(uts.release); + Debug.WriteLine(uts.version); + Debug.WriteLine(uts.machine); + + return uts.sysname.ToString(); + } + + [DllImport("libc")] + private static extern void uname(out utsname uname_struct); + + #endregion + + + private void CheckOSVersion() + { + var version = System.Environment.OSVersion.Version; + + + Debug.WriteLine("OS Version: {0}", System.Environment.OSVersion.VersionString); + Debug.IndentLevel++; + Debug.WriteLine("Major: {0}", version.Major); + Debug.WriteLine("Major revision: {0}", version.MajorRevision); + Debug.WriteLine("Minor: {0}", version.Minor); + Debug.WriteLine("Minor revision: {0}", version.MinorRevision); + Debug.WriteLine("Revision: {0}", version.Revision); + Debug.WriteLine("Build: {0}", version.Build); + Debug.WriteLine("Service Pack: {0}", System.Environment.OSVersion.ServicePack); + Debug.IndentLevel--; + } + + private WindowsVersion DetectWindowsVersion() + { + WindowsVersion retval = WindowsVersion.WindowsVista; + + switch (System.Environment.OSVersion.Version.Major) + { + case 4: + retval = WindowsVersion.Windows98; + break; + case 5: + retval = WindowsVersion.WindowsXP; + break; + case 6: + retval = WindowsVersion.WindowsVista; + break; + case 7: + retval = WindowsVersion.Windows7; + break; + case 8: + retval = WindowsVersion.Windows8; + break; + } + + return retval; + } + + + } +} Added: trunk/AgateLib/Platform/PlatformType.cs =================================================================== --- trunk/AgateLib/Platform/PlatformType.cs (rev 0) +++ trunk/AgateLib/Platform/PlatformType.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -0,0 +1,116 @@ +// 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; + +namespace AgateLib.Platform +{ + /// <summary> + /// Enumeration listing the known platform types. + /// </summary> + public enum PlatformType + { + /// <summary> + /// Default value. + /// </summary> + Unknown = 0, + + /// <summary> + /// The Microsoft Windows platform, including Windows 98, Windows NT, Windows XP, Windows Vista, etc. + /// </summary> + Windows, + /// <summary> + /// Some Linux / Unix platform, typically running with an X windowing system. + /// </summary> + Linux, + /// <summary> + /// Mac OS 10.3 or later. + /// </summary> + MacOS, + + /// <summary> + /// Microsoft's XBox 360 console. + /// </summary> + XBox360, + /// <summary> + /// The portable GP2x handheld, or compatible. + /// </summary> + Gp2x, + } + + /// <summary> + /// Enum indicating which version of Microsoft Windows is currently being run. + /// </summary> + public enum WindowsVersion + { + /// <summary> + /// An unknown version of Windows. + /// </summary> + Unknown = 0, + + /// <summary> + /// Windows 98. + /// </summary> + Windows98, + /// <summary> + /// Windows XP or Server 2003. + /// </summary> + WindowsXP, + /// <summary> + /// Windows Vista or Server 2008. + /// </summary> + WindowsVista, + /// <summary> + /// Windows 7. + /// </summary> + Windows7, + /// <summary> + /// Windows 8. + /// </summary> + Windows8 + } + + /// <summary> + /// Enum indicating which .NET runtime is currently in use. + /// </summary> + public enum DotNetRuntime + { + /// <summary> + /// An unknown runtime. + /// </summary> + Unknown = 0, + + /// <summary> + /// Microsoft's runtime. + /// </summary> + MicrosoftDotNet = 1, + /// <summary> + /// The runtime of the Mono project. + /// </summary> + Mono = 2, + /// <summary> + /// The DotGnu / Portable.NET runtime. + /// Note that presence of this enumeration value does not indicate + /// that using AgateLib on DotGnu is supported. + /// </summary> + DotGnu = 9999, + } +} Deleted: trunk/AgateLib/Platform.cs =================================================================== --- trunk/AgateLib/Platform.cs 2014-07-21 01:50:48 UTC (rev 1411) +++ trunk/AgateLib/Platform.cs 2014-07-24 02:07:05 UTC (rev 1412) @@ -1,374 +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.Linq; -using System.Text; -using System.Reflection; -using System.Runtime.InteropServices; - -namespace AgateLib -{ - /// <summa... [truncated message content] |
From: <ka...@us...> - 2014-07-21 01:51:03
|
Revision: 1411 http://sourceforge.net/p/agate/code/1411 Author: kanato Date: 2014-07-21 01:50:48 +0000 (Mon, 21 Jul 2014) Log Message: ----------- Replace AgateOtk and AgateWinForms with AgateLib.GL and AgateLib.Desktop.Forms Modified Paths: -------------- trunk/AgateLib/AgateLib-Portable.csproj trunk/AgateLib/AgateLib.csproj trunk/AgateLib/Drivers/Registrar.cs trunk/AgateLib-Windows.sln trunk/Drivers/AgateOTK/AgateOTK.csproj trunk/Tests/Launcher.cs trunk/Tests/Tests.csproj trunk/Tests/settings_list.txt Added Paths: ----------- trunk/AgateLib/Drivers/TypeRegistry.cs trunk/AgateLib.Desktop.Forms/ trunk/AgateLib.Desktop.Forms/AgateLib.Desktop.Forms.csproj trunk/AgateLib.Desktop.Forms/DisplayImpl/ trunk/AgateLib.Desktop.Forms/DisplayImpl/DesktopGLDisplay.cs trunk/AgateLib.Desktop.Forms/DisplayImpl/GL_DisplayControl.cs trunk/AgateLib.Desktop.Forms/DisplayImpl/GL_GameWindow.cs trunk/AgateLib.Desktop.Forms/DisplayImpl/GL_Surface.cs trunk/AgateLib.Desktop.Forms/DisplayImpl/frmFullScreen.Designer.cs trunk/AgateLib.Desktop.Forms/DisplayImpl/frmFullScreen.cs trunk/AgateLib.Desktop.Forms/DisplayImpl/frmFullScreen.resx trunk/AgateLib.Desktop.Forms/Properties/ trunk/AgateLib.Desktop.Forms/Properties/AssemblyInfo.cs trunk/AgateLib.Desktop.Forms/Resources/ trunk/AgateLib.Desktop.Forms/Resources/AgateLib-mono.ico trunk/AgateLib.Desktop.Forms/Resources/AgateLib.ico trunk/AgateLib.Desktop.Forms/Resources/blankcursor.cur trunk/AgateLib.Desktop.Forms/Setup.cs trunk/AgateLib.Desktop.Forms/WinForms/ trunk/AgateLib.Desktop.Forms/WinForms/AgateRenderTarget.Designer.cs trunk/AgateLib.Desktop.Forms/WinForms/AgateRenderTarget.cs trunk/AgateLib.Desktop.Forms/WinForms/BitmapFontUtil.cs trunk/AgateLib.Desktop.Forms/WinForms/BitmapFontUtilRenderers.cs trunk/AgateLib.Desktop.Forms/WinForms/DisplayWindowForm.Designer.cs trunk/AgateLib.Desktop.Forms/WinForms/DisplayWindowForm.cs trunk/AgateLib.Desktop.Forms/WinForms/DisplayWindowForm.resx trunk/AgateLib.Desktop.Forms/WinForms/FormUtil.cs trunk/AgateLib.Desktop.Forms/WinForms/FormsInterop.cs trunk/AgateLib.Desktop.Forms/WinForms/Icons.Designer.cs trunk/AgateLib.Desktop.Forms/WinForms/Icons.resx trunk/AgateLib.Desktop.Forms/WinForms/SetSystemsForm.Designer.cs trunk/AgateLib.Desktop.Forms/WinForms/SetSystemsForm.cs trunk/AgateLib.Desktop.Forms/WinForms/SetSystemsForm.resx trunk/AgateLib.Desktop.Forms/WinForms/TypeConverters.cs trunk/AgateLib.Desktop.Forms/WinForms/WinFormsDriver.cs trunk/AgateLib.Desktop.Forms/WinForms/WinFormsReporter.cs trunk/AgateLib.Desktop.Forms/WinForms/packages.config trunk/AgateLib.GL/ trunk/AgateLib.GL/AL_Audio.cs trunk/AgateLib.GL/AgateLib.GL.csproj trunk/AgateLib.GL/ContextFB.cs trunk/AgateLib.GL/GL3/ trunk/AgateLib.GL/GL3/DrawBuffer.cs trunk/AgateLib.GL/GL3/FrameBuffer.cs trunk/AgateLib.GL/GL3/GLPrimitiveRenderer.cs trunk/AgateLib.GL/GL3/GLVertexBuffer.cs trunk/AgateLib.GL/GL3/Shaders/GL3_Basic2DShader.cs trunk/AgateLib.GL/GL3/Shaders/GlslFragmentProgram.cs trunk/AgateLib.GL/GL3/Shaders/GlslShader.cs trunk/AgateLib.GL/GL3/Shaders/GlslShaderCompiler.cs trunk/AgateLib.GL/GL3/Shaders/GlslVertexProgram.cs trunk/AgateLib.GL/GL3/Shaders/IGL3Shader.cs trunk/AgateLib.GL/GL3/Shaders/ShaderFactory3.cs trunk/AgateLib.GL/GL3/Shaders/ShaderSources.Designer.cs trunk/AgateLib.GL/GLDrawBuffer.cs trunk/AgateLib.GL/GL_FrameBuffer.cs trunk/AgateLib.GL/GL_IndexBuffer.cs trunk/AgateLib.GL/GeoHelper.cs trunk/AgateLib.GL/IGL_Display.cs trunk/AgateLib.GL/IGL_Surface.cs trunk/AgateLib.GL/Legacy/ trunk/AgateLib.GL/Legacy/FixedFunction/FixedFunctionShaderFactory.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Basic2DShader.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Lighting2D.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Lighting3D.cs trunk/AgateLib.GL/Legacy/FrameBufferExt.cs trunk/AgateLib.GL/Legacy/FrameBufferReadPixels.cs trunk/AgateLib.GL/Legacy/LegacyDrawBuffer.cs trunk/AgateLib.GL/Legacy/LegacyPrimitiveRenderer.cs trunk/AgateLib.GL/Legacy/LegacyVertexBuffer.cs trunk/AgateLib.GL/OpenTK.dll trunk/AgateLib.GL/OpenTK.dll.config trunk/AgateLib.GL/OpenTK.xml trunk/AgateLib.GL/PrimitiveRenderer.cs trunk/AgateLib.GL/Properties/ trunk/AgateLib.GL/Properties/AssemblyInfo.cs trunk/AgateLib.GL/Resources/ trunk/AgateLib.GL/ShaderFactory.cs trunk/AgateLib.GL/ShaderSources.resx trunk/AgateLib.GL/TextureCoordinates.cs trunk/AgateLib.GL/packages.config Removed Paths: ------------- trunk/AgateLib.GL/GL3/DrawBuffer.cs trunk/AgateLib.GL/GL3/FrameBuffer.cs trunk/AgateLib.GL/GL3/GLPrimitiveRenderer.cs trunk/AgateLib.GL/GL3/GLVertexBuffer.cs trunk/AgateLib.GL/GL3/Shaders/GL3_Basic2DShader.cs trunk/AgateLib.GL/GL3/Shaders/GlslFragmentProgram.cs trunk/AgateLib.GL/GL3/Shaders/GlslShader.cs trunk/AgateLib.GL/GL3/Shaders/GlslShaderCompiler.cs trunk/AgateLib.GL/GL3/Shaders/GlslVertexProgram.cs trunk/AgateLib.GL/GL3/Shaders/IGL3Shader.cs trunk/AgateLib.GL/GL3/Shaders/ShaderFactory3.cs trunk/AgateLib.GL/GL3/Shaders/ShaderSources.Designer.cs trunk/AgateLib.GL/Legacy/FixedFunction/FixedFunctionShaderFactory.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Basic2DShader.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Lighting2D.cs trunk/AgateLib.GL/Legacy/FixedFunction/OTK_FF_Lighting3D.cs trunk/AgateLib.GL/Legacy/FrameBufferExt.cs trunk/AgateLib.GL/Legacy/FrameBufferReadPixels.cs trunk/AgateLib.GL/Legacy/LegacyDrawBuffer.cs trunk/AgateLib.GL/Legacy/LegacyPrimitiveRenderer.cs trunk/AgateLib.GL/Legacy/LegacyVertexBuffer.cs trunk/Drivers/AgateOTK/AL_Audio.cs trunk/Drivers/AgateOTK/ContextFB.cs trunk/Drivers/AgateOTK/GL3/ trunk/Drivers/AgateOTK/GLDrawBuffer.cs trunk/Drivers/AgateOTK/GL_Display.cs trunk/Drivers/AgateOTK/GL_DisplayControl.cs trunk/Drivers/AgateOTK/GL_FrameBuffer.cs trunk/Drivers/AgateOTK/GL_GameWindow.cs trunk/Drivers/AgateOTK/GL_IndexBuffer.cs trunk/Drivers/AgateOTK/GL_Surface.cs trunk/Drivers/AgateOTK/GeoHelper.cs trunk/Drivers/AgateOTK/Legacy/ trunk/Drivers/AgateOTK/OpenTK.dll trunk/Drivers/AgateOTK/OpenTK.dll.config trunk/Drivers/AgateOTK/OpenTK.xml trunk/Drivers/AgateOTK/Otk_Reporter.cs trunk/Drivers/AgateOTK/PrimitiveRenderer.cs trunk/Drivers/AgateOTK/Resources/ trunk/Drivers/AgateOTK/ShaderFactory.cs trunk/Drivers/AgateOTK/TextureCoordinates.cs trunk/Drivers/AgateOTK/frmFullScreen.Designer.cs trunk/Drivers/AgateOTK/frmFullScreen.cs trunk/Drivers/AgateOTK/frmFullScreen.resx trunk/Drivers/AgateOTK/packages.config Modified: trunk/AgateLib/AgateLib-Portable.csproj =================================================================== --- trunk/AgateLib/AgateLib-Portable.csproj 2014-07-20 20:34:02 UTC (rev 1410) +++ trunk/AgateLib/AgateLib-Portable.csproj 2014-07-21 01:50:48 UTC (rev 1411) @@ -34,6 +34,24 @@ <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> <ItemGroup> <!-- A reference to the entire .NET Framework is automatically included --> <Folder Include="Serialization\Xle\" /> Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-07-20 20:34:02 UTC (rev 1410) +++ trunk/AgateLib/AgateLib.csproj 2014-07-21 01:50:48 UTC (rev 1411) @@ -175,6 +175,7 @@ <Compile Include="DisplayLib\Shaders\Implementation\Lighting3DImpl.cs" /> <Compile Include="DisplayLib\Shaders\Lighting2D.cs" /> <Compile Include="DisplayLib\Shaders\Lighting3D.cs" /> + <Compile Include="Drivers\TypeRegistry.cs" /> <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" /> Modified: trunk/AgateLib/Drivers/Registrar.cs =================================================================== --- trunk/AgateLib/Drivers/Registrar.cs 2014-07-20 20:34:02 UTC (rev 1410) +++ trunk/AgateLib/Drivers/Registrar.cs 2014-07-21 01:50:48 UTC (rev 1411) @@ -344,6 +344,9 @@ public static bool IgnoreSavedSettings { get; set; } internal static DisplayImpl CreateDisplayDriver(DisplayTypeID displayType) { + if (TypeRegistry.DisplayDriver != null) + return (DisplayImpl)Activator.CreateInstance(TypeRegistry.DisplayDriver); + if (displayDrivers.Count == 0) throw new AgateException("No display drivers registered."); Added: trunk/AgateLib/Drivers/TypeRegistry.cs =================================================================== --- trunk/AgateLib/Drivers/TypeRegistry.cs (rev 0) +++ trunk/AgateLib/Drivers/TypeRegistry.cs 2014-07-21 01:50:48 UTC (rev 1411) @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Drivers +{ + public static class TypeRegistry + { + public static Type DisplayDriver { get; set; } + public static Type AudioDriver { get; set; } + public static Type InputDriver { get; set; } + } +} Modified: trunk/AgateLib-Windows.sln =================================================================== --- trunk/AgateLib-Windows.sln 2014-07-20 20:34:02 UTC (rev 1410) +++ trunk/AgateLib-Windows.sln 2014-07-21 01:50:48 UTC (rev 1411) @@ -42,238 +42,158 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib-Portable", "AgateLib\AgateLib-Portable.csproj", "{DB2152AD-E467-40A2-94E8-EB3804863C71}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.GL", "AgateLib.GL\AgateLib.GL.csproj", "{94734E5A-0344-43E8-BB30-E32E3F57F611}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Desktop.Forms", "AgateLib.Desktop.Forms\AgateLib.Desktop.Forms.csproj", "{4B12561E-D37B-48A1-B6DB-218E94906C22}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Public|Any CPU = Public|Any CPU - Public|Mixed Platforms = Public|Mixed Platforms - Public|x64 = Public|x64 Public|x86 = Public|x86 Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {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|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 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.Build.0 = Debug|x86 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Any CPU.ActiveCfg = Release|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Mixed Platforms.ActiveCfg = Release|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Mixed Platforms.Build.0 = Release|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x64.ActiveCfg = Release|x86 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x86.ActiveCfg = Release|x86 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x86.Build.0 = Release|x86 {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|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 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.Build.0 = Release|x86 {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}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.ActiveCfg = Debug|x64 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.Build.0 = Debug|x64 {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.ActiveCfg = Debug|x86 {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.Build.0 = Debug|x86 {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Any CPU.ActiveCfg = Release|x86 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Mixed Platforms.ActiveCfg = Release|x86 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Mixed Platforms.Build.0 = Release|x86 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|x64.ActiveCfg = Release|x86 {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|x86.ActiveCfg = Release|x86 {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|x86.Build.0 = Release|x86 {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 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Mixed Platforms.Build.0 = Release|x86 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.ActiveCfg = Release|x64 - {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.Build.0 = Release|x64 {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.ActiveCfg = Release|x86 {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.Build.0 = Release|x86 {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}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.ActiveCfg = Debug|x64 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.Build.0 = Debug|x64 {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.ActiveCfg = Debug|x86 {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.Build.0 = Debug|x86 {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Any CPU.ActiveCfg = Release|x86 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Mixed Platforms.ActiveCfg = Release|x86 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Mixed Platforms.Build.0 = Release|x86 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|x64.ActiveCfg = Release|x86 {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|x86.ActiveCfg = Release|x86 {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|x86.Build.0 = Release|x86 {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 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Mixed Platforms.Build.0 = Release|x86 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.ActiveCfg = Release|x64 - {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.Build.0 = Release|x64 {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.ActiveCfg = Release|x86 {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.Build.0 = Release|x86 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.Build.0 = Debug|Any CPU - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x64.ActiveCfg = Debug|x64 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x64.Build.0 = Debug|x64 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x86.ActiveCfg = Debug|x86 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x86.Build.0 = Debug|x86 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Any CPU.ActiveCfg = Release|x86 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Mixed Platforms.ActiveCfg = Release|x86 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Mixed Platforms.Build.0 = Release|x86 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|x64.ActiveCfg = Release|x86 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|x86.ActiveCfg = Release|x86 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|x86.Build.0 = Release|x86 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.ActiveCfg = Release|Any CPU {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.Build.0 = Release|Any CPU - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Mixed Platforms.Build.0 = Release|x86 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x64.ActiveCfg = Release|x64 - {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x64.Build.0 = Release|x64 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x86.ActiveCfg = Release|x86 {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x86.Build.0 = Release|x86 {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|x64.ActiveCfg = Debug|x64 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|x64.Build.0 = Debug|x64 {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|x86.ActiveCfg = Debug|x86 {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|x86.Build.0 = Debug|x86 {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Any CPU.ActiveCfg = Release|Any CPU {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Any CPU.Build.0 = Release|Any CPU - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Mixed Platforms.ActiveCfg = Release|x86 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Mixed Platforms.Build.0 = Release|x86 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|x64.ActiveCfg = Release|x64 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|x64.Build.0 = Release|x64 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|x86.ActiveCfg = Release|x64 + {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|x86.ActiveCfg = Release|x86 + {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|x86.Build.0 = Release|x86 {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Any CPU.ActiveCfg = Release|Any CPU {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Any CPU.Build.0 = Release|Any CPU - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Mixed Platforms.Build.0 = Release|x86 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|x64.ActiveCfg = Release|x64 - {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|x64.Build.0 = Release|x64 {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|x86.ActiveCfg = Release|x86 {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|x86.Build.0 = Release|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|x64 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.Build.0 = Debug|x64 {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Any CPU.ActiveCfg = Release|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Mixed Platforms.ActiveCfg = Release|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Mixed Platforms.Build.0 = Release|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x64.ActiveCfg = Release|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.ActiveCfg = Release|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.Build.0 = Release|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.Build.0 = Release|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|x64 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.Build.0 = Release|x64 {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.Build.0 = Release|x86 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x64.ActiveCfg = Debug|x64 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x64.Build.0 = Debug|x64 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x86.ActiveCfg = Debug|x86 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x86.Build.0 = Debug|x86 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Any CPU.ActiveCfg = Release|x86 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Mixed Platforms.ActiveCfg = Release|x86 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Mixed Platforms.Build.0 = Release|x86 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|x64.ActiveCfg = Release|x86 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|x86.ActiveCfg = Release|x86 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|x86.Build.0 = Release|x86 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.ActiveCfg = Release|Any CPU {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.Build.0 = Release|Any CPU - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Mixed Platforms.Build.0 = Release|x86 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x64.ActiveCfg = Release|x64 - {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x64.Build.0 = Release|x64 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x86.ActiveCfg = Release|x86 {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x86.Build.0 = Release|x86 {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|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 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.Build.0 = Debug|x86 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Any CPU.ActiveCfg = Release|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Any CPU.Build.0 = Release|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Mixed Platforms.ActiveCfg = Release|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Mixed Platforms.Build.0 = Release|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x64.ActiveCfg = Release|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.ActiveCfg = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.ActiveCfg = Release|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.Build.0 = Release|x86 {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|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 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.Build.0 = Release|x86 {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|x64.ActiveCfg = Debug|Any CPU {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|x86.ActiveCfg = Debug|x86 {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|x86.Build.0 = Debug|x86 {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|Any CPU.ActiveCfg = Release|Any CPU {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|Any CPU.Build.0 = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|Mixed Platforms.ActiveCfg = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|Mixed Platforms.Build.0 = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|x64.ActiveCfg = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|x86.ActiveCfg = Release|Any CPU + {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|x86.ActiveCfg = Release|x86 + {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|x86.Build.0 = Release|x86 {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|Any CPU.Build.0 = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|Mixed Platforms.Build.0 = Release|x86 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|x64.ActiveCfg = Release|x64 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|x64.Build.0 = Release|x64 {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|x86.ActiveCfg = Release|x86 {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|x86.Build.0 = Release|x86 {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|x64.ActiveCfg = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|x86.ActiveCfg = Debug|Any CPU + {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|x86.ActiveCfg = Debug|x86 + {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|x86.Build.0 = Debug|x86 {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Any CPU.ActiveCfg = Release|Any CPU {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Any CPU.Build.0 = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Mixed Platforms.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Mixed Platforms.Build.0 = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|x64.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|x86.ActiveCfg = Release|Any CPU + {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|x86.ActiveCfg = Release|x86 + {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|x86.Build.0 = Release|x86 {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Any CPU.Build.0 = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|x64.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|x86.ActiveCfg = Release|Any CPU + {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|x86.ActiveCfg = Release|x86 + {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|x86.Build.0 = Release|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.ActiveCfg = Debug|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.Build.0 = Debug|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|Any CPU.ActiveCfg = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|Any CPU.Build.0 = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|x86.ActiveCfg = Release|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|x86.Build.0 = Release|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.Build.0 = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.ActiveCfg = Release|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.Build.0 = Release|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.ActiveCfg = Debug|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.Build.0 = Debug|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Any CPU.ActiveCfg = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Any CPU.Build.0 = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x86.ActiveCfg = Release|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x86.Build.0 = Release|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.Build.0 = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.ActiveCfg = Release|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Index: trunk/AgateLib.Desktop.Forms =================================================================== --- trunk/AgateLib.Desktop.Forms 2014-07-20 20:34:02 UTC (rev 1410) +++ trunk/AgateLib.Desktop.Forms 2014-07-21 01:50:48 UTC (rev 1411) Property changes on: trunk/AgateLib.Desktop.Forms ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,10 ## +[Bb]in +obj +[Dd]ebug +[Rr]elease +*.user +*.aps +*.eto +ClientBin +GeneratedArtifacts +_Pvt_Extensions Added: trunk/AgateLib.Desktop.Forms/AgateLib.Desktop.Forms.csproj =================================================================== --- trunk/AgateLib.Desktop.Forms/AgateLib.Desktop.Forms.csproj (rev 0) +++ trunk/AgateLib.Desktop.Forms/AgateLib.Desktop.Forms.csproj 2014-07-21 01:50:48 UTC (rev 1411) @@ -0,0 +1,157 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{4B12561E-D37B-48A1-B6DB-218E94906C22}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AgateLib.Desktop.Forms</RootNamespace> + <AssemblyName>AgateLib.Desktop.Forms</AssemblyName> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <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> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </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> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <ItemGroup> + <Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\AgateLib.GL\OpenTK.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="DisplayImpl\frmFullScreen.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayImpl\frmFullScreen.Designer.cs"> + <DependentUpon>frmFullScreen.cs</DependentUpon> + </Compile> + <Compile Include="DisplayImpl\DesktopGLDisplay.cs" /> + <Compile Include="DisplayImpl\GL_DisplayControl.cs" /> + <Compile Include="DisplayImpl\GL_GameWindow.cs" /> + <Compile Include="DisplayImpl\GL_Surface.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Setup.cs" /> + <Compile Include="WinForms\AgateRenderTarget.cs"> + <SubType>Component</SubType> + </Compile> + <Compile Include="WinForms\AgateRenderTarget.Designer.cs"> + <DependentUpon>AgateRenderTarget.cs</DependentUpon> + </Compile> + <Compile Include="WinForms\BitmapFontUtil.cs" /> + <Compile Include="WinForms\BitmapFontUtilRenderers.cs" /> + <Compile Include="WinForms\DisplayWindowForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="WinForms\DisplayWindowForm.Designer.cs"> + <DependentUpon>DisplayWindowForm.cs</DependentUpon> + </Compile> + <Compile Include="WinForms\FormsInterop.cs" /> + <Compile Include="WinForms\FormUtil.cs" /> + <Compile Include="WinForms\Icons.Designer.cs"> + <DependentUpon>Icons.resx</DependentUpon> + <DesignTime>True</DesignTime> + <AutoGen>True</AutoGen> + </Compile> + <Compile Include="WinForms\SetSystemsForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="WinForms\SetSystemsForm.Designer.cs"> + <DependentUpon>SetSystemsForm.cs</DependentUpon> + </Compile> + <Compile Include="WinForms\TypeConverters.cs" /> + <Compile Include="WinForms\WinFormsDriver.cs" /> + <Compile Include="WinForms\WinFormsReporter.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\AgateLib.GL\AgateLib.GL.csproj"> + <Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project> + <Name>AgateLib.GL</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib\AgateLib.csproj"> + <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> + <Name>AgateLib</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="DisplayImpl\frmFullScreen.resx"> + <DependentUpon>frmFullScreen.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="WinForms\DisplayWindowForm.resx"> + <DependentUpon>DisplayWindowForm.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="WinForms\Icons.resx"> + <SubType>Designer</SubType> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Icons.Designer.cs</LastGenOutput> + </EmbeddedResource> + <EmbeddedResource Include="WinForms\SetSystemsForm.resx"> + <DependentUpon>SetSystemsForm.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <None Include="WinForms\packages.config" /> + </ItemGroup> + <ItemGroup> + <Content Include="Resources\AgateLib-mono.ico" /> + <Content Include="Resources\AgateLib.ico" /> + <Content Include="Resources\blankcursor.cur" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Copied: trunk/AgateLib.Desktop.Forms/DisplayImpl/DesktopGLDisplay.cs (from rev 1409, trunk/Drivers/AgateOTK/GL_Display.cs) =================================================================== --- trunk/AgateLib.Desktop.Forms/DisplayImpl/DesktopGLDisplay.cs (rev 0) +++ trunk/AgateLib.Desktop.Forms/DisplayImpl/DesktopGLDisplay.cs 2014-07-21 01:50:48 UTC (rev 1411) @@ -0,0 +1,668 @@ +// 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.Linq; +using System.Text; +using System.Runtime.InteropServices; +using AgateLib.BitmapFont; +using AgateLib.DisplayLib; +using AgateLib.DisplayLib.ImplementationBase; +using AgateLib.Drivers; +using AgateLib.Geometry; +using AgateLib.Geometry.VertexTypes; +using OpenTK.Graphics.OpenGL; +using PixelFormat = AgateLib.DisplayLib.PixelFormat; + +namespace AgateOTK +{ + /// <summary> + /// OpenGL 3.1 compatible. + /// </summary> + public sealed class GL_Display : DisplayImpl, AgateOTK.IGL_Display + { + GL_FrameBuffer mRenderTarget; + Stack<Rectangle> mClipRects = new Stack<Rectangle>(); + Rectangle mCurrentClip = Rectangle.Empty; + private bool mVSync = true; + private bool mSupportsFramebufferArb; + private bool mSupportsFramebufferExt; + private bool mNonPowerOf2Textures; + private bool mSupportsShaders; + private decimal mGLVersion; + + System.Windows.Forms.Form mFakeWindow; + DisplayWindow mFakeDisplayWindow; + + PrimitiveRenderer mPrimitives; + + bool mGL3; + + public Surface WhiteSurface + { + get; + private set; + } + public bool SupportsNonPowerOf2Textures + { + get { return mNonPowerOf2Textures; } + private set { mNonPowerOf2Textures = value; } + } + + internal event EventHandler ProcessEventsEvent; + + protected override void ProcessEvents() + { + if (ProcessEventsEvent != null) + ProcessEventsEvent(this, EventArgs.Empty); + } + + protected override void OnRenderTargetChange(FrameBuffer oldRenderTarget) + { + mRenderTarget = RenderTarget.Impl as GL_FrameBuffer; + mRenderTarget.MakeCurrent(); + + OnRenderTargetResize(); + } + protected override void OnRenderTargetResize() + { + + } + + public override PixelFormat DefaultSurfaceFormat + { + get { return PixelFormat.RGBA8888; } + } + + #region --- Object Factory --- + + protected override AgateLib.DisplayLib.Shaders.Implementation.AgateShaderImpl CreateBuiltInShader(AgateLib.DisplayLib.Shaders.Implementation.BuiltInShader builtInShaderType) + { + return ShaderFactory.CreateBuiltInShader(builtInShaderType); + } + public override DisplayWindowImpl CreateDisplayWindow(DisplayWindow owner, CreateWindowParams windowParams) + { + if (windowParams.IsFullScreen && windowParams.RenderToControl == false) + return new GL_GameWindow(owner, windowParams); + else + return new GL_DisplayControl(owner, windowParams); + + //if (windowParams.RenderToControl) + //{ + // return new GL_DisplayControl(windowParams); + //} + //else + //{ + // return new GL_GameWindow(windowParams); + //} + } + public override SurfaceImpl CreateSurface(string fileName) + { + return new GL_Surface(fileName); + } + protected override VertexBufferImpl CreateVertexBuffer(VertexLayout layout, int vertexCount) + { + if (mGL3) + return new GL3.GLVertexBuffer(layout, vertexCount); + else + return new Legacy.LegacyVertexBuffer(layout, vertexCount); + } + protected override IndexBufferImpl CreateIndexBuffer(IndexBufferType type, int size) + { + return new GL_IndexBuffer(type, size); + } + + public override SurfaceImpl CreateSurface(Size surfaceSize) + { + return new GL_Surface(surfaceSize); + } + public override SurfaceImpl CreateSurface(System.IO.Stream fileStream) + { + return new GL_Surface(fileStream); + } + public override FontSurfaceImpl CreateFont(string fontFamily, float sizeInPoints, FontStyle style) + { + BitmapFontOptions options = new BitmapFontOptions(fontFamily, sizeInPoints, style); + + return AgateLib.WinForms.BitmapFontUtil.ConstructFromOSFont(options); + } + public override FontSurfaceImpl CreateFont(BitmapFontOptions bitmapOptions) + { + return AgateLib.WinForms.BitmapFontUtil.ConstructFromOSFont(bitmapOptions); + } + + protected override FrameBufferImpl CreateFrameBuffer(Size size) + { + if (mGL3 || (mSupportsFramebufferArb && ReadSettingsBool("DisableFramebufferArb") == false)) + return new GL3.FrameBuffer((IGL_Surface)new Surface(size).Impl); + else if (mSupportsFramebufferExt && ReadSettingsBool("DisableFramebufferExt") == false) + { + try + { + return new Legacy.FrameBufferExt((IGL_Surface)new Surface(size).Impl); + } + catch (Exception e) + { + Trace.WriteLine(string.Format("Caught exception {0} when trying to create GL_FrameBuffer_Ext wrapper.", e.GetType())); + Trace.Indent(); + Trace.WriteLine(e.Message); + Trace.Unindent(); + Trace.WriteLine(""); + Trace.WriteLine("Disabling frame buffer extension, and falling back onto glCopyTexSubImage2D."); + Trace.WriteLine("Extensive use of offscreen rendering targets will result in poor performance."); + Trace.WriteLine(""); + + mSupportsFramebufferExt = false; + } + } + + return new Legacy.FrameBufferReadPixels((IGL_Surface)new Surface(size).Impl); + } + + bool ReadSettingsBool(string name) + { + string value; + + if (AgateLib.Core.Settings["AgateLib.OpenGL"].TryGetValue(name, out value) == false) + return false; + + if (value == "false" || value == "0") + return false; + + return true; + } + + public GLDrawBuffer CreateDrawBuffer() + { + if (mGL3) + return new GL3.DrawBuffer(); + else + return new Legacy.LegacyDrawBuffer(); + } + + + #endregion + + protected override void OnBeginFrame() + { + mRenderTarget.BeginRender(); + + GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); + GL.Viewport(0, 0, mRenderTarget.Width, mRenderTarget.Height); + } + protected override void OnEndFrame() + { + DrawBuffer.Flush(); + + mRenderTarget.EndRender(); + + FlushDeleteQueue(); + } + + public GLDrawBuffer DrawBuffer + { + get { return ((GL_FrameBuffer)RenderTarget.Impl).DrawBuffer; } + } + + // TODO: Test clip rect stuff. + public override void SetClipRect(Rectangle newClipRect) + { + GL.Viewport(newClipRect.X, mRenderTarget.Height - newClipRect.Bottom, + newClipRect.Width, newClipRect.Height); + + if (Display.Shader is AgateLib.DisplayLib.Shaders.IShader2D) + { + AgateLib.DisplayLib.Shaders.IShader2D s = (AgateLib.DisplayLib.Shaders.IShader2D)Display.Shader; + + s.CoordinateSystem = newClipRect; + } + + mCurrentClip = newClipRect; + } + + public override void FlushDrawBuffer() + { + DrawBuffer.Flush(); + } + + public override void Clear(Color color) + { + DrawBuffer.Flush(); + + GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f); + + ClearBufferMask mask = ClearBufferMask.ColorBufferBit; + + mask |= RenderTarget.HasDepthBuffer ? ClearBufferMask.DepthBufferBit : 0; + mask |= RenderTarget.HasStencilBuffer ? ClearBufferMask.StencilBufferBit : 0; + + GL.Clear(mask); + } + public override void Clear(Color color, Rectangle destRect) + { + // hack because FBO's need to be flipped. So we shift the rectangle. + if (mRenderTarget is GL3.FrameBuffer) + { + destRect.Y = mRenderTarget.Height - destRect.Y - destRect.Height; + } + + // OpenGL apparently doesn't have direct capability to clear within a + // destination region, but we can use the glScissor function to restrict + // the clear to a specified area. + GL.Scissor(destRect.Left, destRect.Top, destRect.Width, destRect.Height); + GL.Enable(EnableCap.ScissorTest); + + Clear(color); + GL.Disable(EnableCap.ScissorTest); + } + + #region --- Drawing Primitives --- + + public override void DrawLine(Point a, Point b, Color color) + { + DrawBuffer.Flush(); + mPrimitives.DrawLine(a, b, color); + } + + public override void DrawRect(Rectangle rect, Color color) + { + DrawRect(new RectangleF(rect.X, rect.Y, rect.Width, rect.Height), color); + } + public override void DrawRect(RectangleF rect, Color color) + { + DrawBuffer.Flush(); + mPrimitives.DrawRect(rect, color); + } + + public override void FillRect(Rectangle rect, Color color) + { + FillRect(new RectangleF(rect.X, rect.Y, rect.Width, rect.Height), color); + } + public override void FillRect(RectangleF rect, Color color) + { + DrawBuffer.Flush(); + mPrimitives.FillRect(rect, color); + } + + public override void FillRect(Rectangle rect, Gradient color) + { + FillRect(new RectangleF(rect.X, rect.Y, rect.Width, rect.Height), color); + } + public override void FillRect(RectangleF rect, Gradient color) + { + DrawBuffer.Flush(); + mPrimitives.FillRect(rect, color); + } + + public override void FillPolygon(PointF[] pts, int startIndex, int length, Color color) + { + DrawBuffer.Flush(); + mPrimitives.FillPolygon(pts, startIndex, length, color); + } + + #endregion + #region --- Initialization --- + + public override void Initialize() + { + CreateFakeWindow(); + + Report("OpenTK / OpenGL driver instantiated for display."); + } + public void InitializeCurrentContext() + { + GL.ClearColor(0, 0, 0, 1.0f); // Black Background + GL.ClearDepth(1); // Depth Buffer Setup + GL.Enable(EnableCap.DepthTest); // Enables Depth Testing + GL.DepthFunc(DepthFunction.Lequal); // The Type Of Depth Testing To Do + + + } + + private void CreateWhiteSurface() + { + if (WhiteSurface == null) + { + int size = 2; + + PixelBuffer buffer = new PixelBuffer(PixelFormat.ARGB8888, new Size(size, size)); + + for (int i = 0; i < size; i++) + { + for (int j = 0; j < size; j++) + { + buffer.SetPixel(i, j, Color.White); + } + } + + WhiteSurface = new Surface(buffer); + } + } + + private void CreateFakeWindow() + { + mFakeWindow = new System.Windows.Forms.Form(); + mFakeDisplayWindow = DisplayWindow.CreateFromControl(mFakeWindow); + + mFakeWindow.Visible = false; + + string vendor = GL.GetString(StringName.Vendor); + mSupportsShaders = false; + + mGLVersion = DetectOpenGLVersion(); + if (mGLVersion >= 3m) + { + if (ReadSettingsBool("EnableGL3")) + { + mGL3 = true; + } + else + { + mGL3 = false; + mGLVersion = 2.1m; + } + } + + LoadExtensions(); + + mSupportsFramebufferArb = SupportsExtension("GL_ARB_FRAMEBUFFER_OBJECT"); + mSupportsFramebufferExt = SupportsExtension("GL_EXT_FRAMEBUFFER_OBJECT"); + mNonPowerOf2Textures = SupportsExtension("GL_ARB_NON_POWER_OF_TWO"); + + if (mGLVersion >= 3m) + { + mNonPowerOf2Textures = true; + mSupportsShaders = true; + } + if (mGLVersion >= 2m) + { + mNonPowerOf2Textures = true; + mSupportsShaders = true; + } + if (mGLVersion < 1.2m) + { + System.Windows.Forms.MessageBox.Show( + "Error: OpenGL 1.2 or higher is required, but your system only supports OpenGL " + mGLVersion.ToString(), + "OpenGL 1.2 not aviable", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Stop); + + throw new AgateLib.AgateException("OpenGL 1.2 or higher is required, but this system only supports OpenGL " + mGLVersion.ToString() + "."); + } + + if (mGL3) + mPrimitives = new GL3.GLPrimitiveRenderer(); + else + mPrimitives = new Legacy.LegacyPrimitiveRenderer(); + + if (SupportsExtension("GL_ARB_FRAGMENT_PROGRAM")) + { + mSupportsShaders = true; + } + + ShaderFactory.Initialize(mGL3); + + Trace.WriteLine(string.Format("OpenGL version {0} from vendor {1} detected.", mGLVersion, vendor)); + Trace.WriteLine("NPOT: " + mNonPowerOf2Textures.ToString()); + Trace.WriteLine("Shaders: " + mSupportsShaders.ToString()); + + CreateWhiteSurface(); + } + + string[] extensions; + private void LoadExtensions() + { + if (mGL3) + { + // Forward compatible context (GL 3.0+) + int num_extensions; + GL.GetInteger(GetPName.NumExtensions, out num_extensions); + + if (GL.GetError() != ErrorCode.NoError) + throw new OpenTK.Graphics.GraphicsErrorException("Not 3.0 context."); + + extensions = new string[num_extensions]; + + for (int i = 0; i < num_extensions; i++) + extensions[i] = GL.GetString(StringName.Extensions, i).ToLowerInvariant(); + } + else + { + string ext = GL.GetString(StringName.Extensions); + + extensions = ext.Split(' '); + + for (int i = 0; i < extensions.Length; i++) + { + //Debug.Print(extensions[i]); + extensions[i] = extensions[i].ToLowerInvariant(); + } + } + } + private bool SupportsExtension(string name) + { + return extensions.Contains(name.ToLowerInvariant()); + } + + private static decimal DetectOpenGLVersion() + { + string versionString = GL.GetString(StringName.Version).Trim(); + + // Not sure whether OpenGL drivers will universally report version in the machine's + // culture settings or not. So we switch the current decimal separator with a period. + versionString = versionString.Replace(System.Globalization.NumberFormatInfo.CurrentInfo.NumberDecimalSeparator, "."); + int pointLoc = versionString.IndexOf("."); + + // Remove any additional version information. Some drivers report version string as + // something like 2.1.8577, which will be problematic for the decimal.Parse call below. + // We are only interested in the first two numbers, so discard everything else. + if (versionString.IndexOf(".", pointLoc + 1) > -1) + { + versionString = versionString.Substring(0, versionString.IndexOf(".", pointLoc + 1)); + } + + // Some drivers report a version like "2.0 Chromium 1", so dump everything after the space. + if (versionString.Contains(" ")) + { + versionString = versionString.Substring(0, versionString.IndexOf(" ")); + } + + decimal retval; + + if (decimal.TryParse(versionString, System.Globalization.NumberStyles.Number, + System.Globalization.CultureInfo.InvariantCulture, out retval) == false) + { + Trace.WriteLine("AgateOTK was unable to parse the OpenGL version string."); + Trace.WriteLine(" The reported string was: " + versionString); + Trace.WriteLine(" Please report this issue to http://www.agatelib.org along"); + Trace.WriteLine(" with details about your operating system and graphics drivers."); + Trace.WriteLine(" Falling back to OpenGL 1.1 supported functionality."); + + retval = 1.1m; + } + + return retval; + } + + #endregion + + #region --- Shaders --- + + public override void Dispose() + { + mFakeDisplayWindow.Dispose(); + mFakeWindow.Dispose(); + } + + + private void SetArray(float[] array, Vector3 vec) + { + array[0] = vec.X; + array[1] = vec.Y; + array[2] = vec.Z; + } + private void SetArray(float[] array, Color color) + { + array[0] = color.R / 255.0f; + array[1] = color.G / 255.0f; + array[2] = color.B / 255.0f; + array[3] = color.A / 255.0f; + } + + #endregion + + + protected override void SavePixelBuffer(PixelBuffer pixelBuffer, string filename, ImageFileFormat format) + { + AgateLib.WinForms.FormUtil.SavePixelBuffer(pixelBuffer, filename, format); + } + + protected override void HideCursor() + { + System.Windows.Forms.Cursor.Hide(); + + if (Display.CurrentWindow != null) + { + DisplayWindowImpl impl = Display.CurrentWindow.Impl; + //((GL_DisplayW)impl).HideCursor(); + } + } + protected override void ShowCursor() + { + System.Windows.Forms.Cursor.Show(); + + if (Display.CurrentWindow != null) + { + DisplayWindowImpl impl = Display.CurrentWindow.Impl; + + //((GL_FrameBufferExt)impl).ShowCursor(); + } + } + + #region --- Display Capabilities --- + + public override bool CapsBool(DisplayBoolCaps caps) + { + switch (caps) + { + case DisplayBoolCaps.Scaling: return true; + case DisplayBoolCaps.Rotation: return true; + case DisplayBoolCaps.Color: return true; + case DisplayBoolCaps.Gradient: return true; + case DisplayBoolCaps.SurfaceAlpha: return true; + case DisplayBoolCaps.PixelAlpha: return true; + case DisplayBoolCaps.IsHardwareAccelerated: return true; + case DisplayBoolCaps.FullScreen: return true; + case DisplayBoolCaps.FullScreenModeSwitching: return true; + case DisplayBoolCaps.CustomShaders: return false; + case DisplayBoolCaps.CanCreateBitmapFont: return true; + } + + return false; + } + public override Size CapsSize(DisplaySizeCaps displaySizeCaps) + { + switch (displaySizeCaps) + { + case DisplaySizeCaps.MaxSurfaceSize: + int val; + GL.GetInteger(GetPName.MaxTextureSize, out val); + + return new Size(val, val); + } + + return new Size(0, 0); + } + public override IEnumerable<AgateLib.DisplayLib.Shaders.ShaderLanguage> SupportedShaderLanguages + { + get { yield return AgateLib.DisplayLib.Shaders.ShaderLanguage.Glsl; } + } + + #endregion + #region --- Render States --- + + bool mAlphaBlend; + + protected override bool GetRenderState(RenderStateBool renderStateBool) + { + switch (renderStateBool) + { + case RenderStateBool.WaitForVerticalBlank: return mVSync; + case RenderStateBool.AlphaBlend: return mAlphaBlend; + + default: + throw new NotSupportedException(string.Format( + "The specified render state, {0}, is not supported by this driver.")); + } + } + protected override void SetRenderState(RenderStateBool renderStateBool, bool value) + { + switch (renderStateBool) + { + case RenderStateBool.WaitForVerticalBlank: + mVSync = value; + break; + + case RenderStateBool.AlphaBlend: + mAlphaBlend = value; + if (value) + GL.Enable(EnableCap.Blend); + else + GL.Disable(EnableCap.Blend); + break; + + default: + throw new NotSupportedException(string.Format( + "The specified render state, {0}, is not supported by this driver.")); + } + } + + #endregion + + #region --- Deletion queuing --- + + List<int> mTexturesToDelete = new List<int>(); + + + private void FlushDeleteQueue() + { + lock (mTexturesToDelete) + { + if (mTexturesToDelete.Count == 0) + return; + + int[] tex = mTexturesToDelete.ToArray(); + mTexturesToDelete.Clear(); + + GL.DeleteTextures(mTexturesToDelete.Count, tex); + } + } + + internal void QueueDeleteTexture(int p) + { + lock (mTexturesToDelete) + { + mTexturesToDelete.Add(p); + } + } + + #endregion + + } +} \ No newline at end of file Copied: trunk/AgateLib.Desktop.Forms/DisplayImpl/GL_DisplayControl.cs (from rev 1409, trunk/Drivers/AgateOTK/GL_DisplayControl.cs) =================================================================== --- trunk/AgateLib.Desktop.Forms/DisplayImpl/GL_DisplayControl.cs (rev 0) +++ trunk/AgateLib.Desktop.Forms/DisplayImpl/GL_DisplayControl.cs 2014-07-21 01:50:48 UTC (rev 1411) @@ -0,0 +1,598 @@ +// 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.... [truncated message content] |
From: <ka...@us...> - 2014-07-20 20:34:11
|
Revision: 1410 http://sourceforge.net/p/agate/code/1410 Author: kanato Date: 2014-07-20 20:34:02 +0000 (Sun, 20 Jul 2014) Log Message: ----------- Refactor type converters and move them to winforms. Modified Paths: -------------- trunk/AgateLib/AgateConsole.cs trunk/AgateLib/AgateLib-Portable.csproj trunk/AgateLib/AgateLib.csproj trunk/AgateLib/Geometry/Color.cs trunk/AgateLib/Geometry/Point.cs trunk/AgateLib/Geometry/Rectangle.cs trunk/AgateLib/Geometry/Size.cs trunk/AgateLib/Resources/XmlHelper.cs trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj Added Paths: ----------- trunk/Drivers/AgateLib.WinForms/TypeConverters.cs Removed Paths: ------------- trunk/AgateLib/Geometry/TypeConverters.cs Modified: trunk/AgateLib/AgateConsole.cs =================================================================== --- trunk/AgateLib/AgateConsole.cs 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/AgateConsole.cs 2014-07-20 20:34:02 UTC (rev 1410) @@ -1,4 +1,22 @@ -using System; +// 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.Linq; Modified: trunk/AgateLib/AgateLib-Portable.csproj =================================================================== --- trunk/AgateLib/AgateLib-Portable.csproj 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/AgateLib-Portable.csproj 2014-07-20 20:34:02 UTC (rev 1410) @@ -81,7 +81,6 @@ <Compile Include="DisplayLib\Shaders\Lighting3D.cs" /> <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> - <Compile Include="Geometry\TypeConverters.cs" /> <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" /> <Compile Include="ICommandProcessor.cs" /> <Compile Include="IFileProvider.cs"> Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/AgateLib.csproj 2014-07-20 20:34:02 UTC (rev 1410) @@ -177,7 +177,6 @@ <Compile Include="DisplayLib\Shaders\Lighting3D.cs" /> <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> - <Compile Include="Geometry\TypeConverters.cs" /> <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" /> <Compile Include="ICommandProcessor.cs" /> <Compile Include="IFileProvider.cs"> Modified: trunk/AgateLib/Geometry/Color.cs =================================================================== --- trunk/AgateLib/Geometry/Color.cs 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/Geometry/Color.cs 2014-07-20 20:34:02 UTC (rev 1410) @@ -26,7 +26,6 @@ /// Replacement for System.Drawing.Color structure. /// </summary> [StructLayout(LayoutKind.Explicit)] - [Serializable] public struct Color { #region --- Static Named Color properties --- @@ -749,7 +748,7 @@ /// <returns></returns> public static Color FromArgb(string str) { - if (str.StartsWith("0x", StringComparison.InvariantCultureIgnoreCase)) + if (str.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) str = str.Substring(2); if (str.Length == 6) Modified: trunk/AgateLib/Geometry/Point.cs =================================================================== --- trunk/AgateLib/Geometry/Point.cs 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/Geometry/Point.cs 2014-07-20 20:34:02 UTC (rev 1410) @@ -60,6 +60,40 @@ this.y = size.Height; } + public static Point FromString(string str) + { + if (str.StartsWith("{") && str.EndsWith("}")) + str = str.Substring(1, str.Length - 2); + + string[] values = str.Split(','); + Point retval = new Point(); + + if (values.Length > 2) + throw new FormatException("Could not parse point data from text."); + + retval.X = ParseEntry(values[0], "X"); + retval.Y = ParseEntry(values[1], "Y"); + + return retval; + } + + + private static int ParseEntry(string str, string name) + { + var r = new System.Text.RegularExpressions.Regex(name + " *="); + var matches = r.Matches(str); + + switch (matches.Count) + { + case 0: + return int.Parse(str); + case 1: + return int.Parse(str.Substring(matches[0].Index + matches[0].Length)); + default: + throw new FormatException("Could not parse " + name + " value."); + } + } + #endregion #region --- Public Properties --- Modified: trunk/AgateLib/Geometry/Rectangle.cs =================================================================== --- trunk/AgateLib/Geometry/Rectangle.cs 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/Geometry/Rectangle.cs 2014-07-20 20:34:02 UTC (rev 1410) @@ -54,6 +54,62 @@ this.sz = sz; } + public static Rectangle FromString(string text) + { + if (text.StartsWith("{") && text.EndsWith("}")) + { + text = text.Substring(1, text.Length - 2); + } + + string[] values = text.Split(','); + Rectangle retval = new Rectangle(); + + if (values.Length != 4) + throw new FormatException("Could not parse rectangle data from text."); + + if (text.Contains("=")) + { + // parse named arguments + for (int i = 0; i < values.Length; i++) + { + if (values[i].ToLowerInvariant().Contains("width") + && values[i].Contains("=")) + { + retval.Width = ParseNumeric(values[i]); + } + else if (values[i].ToLowerInvariant().Contains("height") + && values[i].Contains("=")) + { + retval.Height = ParseNumeric(values[i]); + } + else if (values[i].ToLowerInvariant().Contains("x") + && values[i].Contains("=")) + { + retval.X = ParseNumeric(values[i]); + } + else if (values[i].ToLowerInvariant().Contains("y") + && values[i].Contains("=")) + { + retval.Y = ParseNumeric(values[i]); + } + } + } + else + { + retval.X = int.Parse(values[0], System.Globalization.CultureInfo.InvariantCulture); + retval.Y = int.Parse(values[1], System.Globalization.CultureInfo.InvariantCulture); + retval.Width = int.Parse(values[2], System.Globalization.CultureInfo.InvariantCulture); + retval.Height = int.Parse(values[3], System.Globalization.CultureInfo.InvariantCulture); + } + return retval; + } + private static int ParseNumeric(string text) + { + int equals = text.IndexOf("=", StringComparison.InvariantCultureIgnoreCase); + int value = int.Parse(text.Substring(equals + 1), System.Globalization.CultureInfo.CurrentCulture); + return value; + } + /// <summary> /// Static method which returns a rectangle with specified left, top, right and bottom. /// </summary> Modified: trunk/AgateLib/Geometry/Size.cs =================================================================== --- trunk/AgateLib/Geometry/Size.cs 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/Geometry/Size.cs 2014-07-20 20:34:02 UTC (rev 1410) @@ -20,7 +20,6 @@ using System.Collections.Generic; using System.ComponentModel; using System.Text; -using AgateLib.Serialization.Xle; namespace AgateLib.Geometry { @@ -178,9 +177,46 @@ /// </summary> /// <param name="text"></param> /// <returns></returns> - public static Size FromString(string text) + public static Size FromString(string str) { - return SizeConverter.ConvertFromString(null, System.Globalization.CultureInfo.CurrentCulture, text); + if (str.StartsWith("{") && str.EndsWith("}")) + { + str = str.Substring(1, str.Length - 2); + } + + string[] values = str.Split(','); + Size retval = new Size(); + + if (values.Length != 2) + throw new FormatException("Could not parse size data from text."); + + if (str.Contains("=")) + { + // parse named arguments + for (int i = 0; i < values.Length; i++) + { + if (values[i].ToLowerInvariant().Contains("width") + && values[i].Contains("=")) + { + int equals = values[i].IndexOf("=", StringComparison.OrdinalIgnoreCase); + + retval.Width = int.Parse(values[i].Substring(equals + 1), System.Globalization.CultureInfo.CurrentCulture); + } + else if (values[i].ToLowerInvariant().Contains("height") + && values[i].Contains("=")) + { + int equals = values[i].IndexOf('='); + + retval.Height = int.Parse(values[i].Substring(equals + 1)); + } + } + } + else + { + retval.Width = int.Parse(values[0], System.Globalization.CultureInfo.InvariantCulture); + retval.Height = int.Parse(values[1], System.Globalization.CultureInfo.InvariantCulture); + } + return retval; } } Deleted: trunk/AgateLib/Geometry/TypeConverters.cs =================================================================== --- trunk/AgateLib/Geometry/TypeConverters.cs 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/Geometry/TypeConverters.cs 2014-07-20 20:34:02 UTC (rev 1410) @@ -1,287 +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.ComponentModel; -using System.Text; - -namespace AgateLib.Geometry -{ - /// <summary> - /// PointConverter. - /// </summary> - class PointConverter : ExpandableObjectConverter - { - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="sourceType"></param> - /// <returns></returns> - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (sourceType == typeof(string)) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="culture"></param> - /// <param name="value"></param> - /// <returns></returns> - public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) - { - string str = value as string; - - if (str == null) - { - return base.ConvertFrom(context, culture, value); - } - - return ConvertFrom(context, culture, str); - } - - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="culture"></param> - /// <param name="str"></param> - /// <returns></returns> - public new static Point ConvertFromString(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, string str) - { - if (str.StartsWith("{") && str.EndsWith("}")) - str = str.Substring(1, str.Length - 2); - - string[] values = str.Split(','); - Point retval = new Point(); - - if (values.Length > 2) - throw new FormatException("Could not parse point data from text."); - - retval.X = ParseEntry(values[0], "X"); - retval.Y = ParseEntry(values[1], "Y"); - - return retval; - } - - private static int ParseEntry(string str, string name) - { - var r = new System.Text.RegularExpressions.Regex(name + " *="); - var matches = r.Matches(str); - - switch (matches.Count) - { - case 0: - return int.Parse(str); - case 1: - return int.Parse(str.Substring(matches[0].Index + matches[0].Length)); - default: - throw new FormatException("Could not parse " + name + " value."); - } - } - - } - /// <summary> - /// - /// </summary> - class SizeConverter : ExpandableObjectConverter - { - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="sourceType"></param> - /// <returns></returns> - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (sourceType == typeof(string)) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="culture"></param> - /// <param name="value"></param> - /// <returns></returns> - public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) - { - string str = value as string; - - if (str == null) - return base.ConvertFrom(context, culture, value); - - return ConvertFromString(str); - - } - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="culture"></param> - /// <param name="str"></param> - /// <returns></returns> - public new static Size ConvertFromString(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, string str) - { - if (str.StartsWith("{") && str.EndsWith("}")) - { - str = str.Substring(1, str.Length - 2); - } - - string[] values = str.Split(','); - Size retval = new Size(); - - if (values.Length != 2) - throw new FormatException("Could not parse size data from text."); - - if (str.Contains("=")) - { - // parse named arguments - for (int i = 0; i < values.Length; i++) - { - if (values[i].ToLowerInvariant().Contains("width") - && values[i].Contains("=")) - { - int equals = values[i].IndexOf("=", StringComparison.InvariantCultureIgnoreCase); - - retval.Width = int.Parse(values[i].Substring(equals + 1), System.Globalization.CultureInfo.CurrentCulture); - } - else if (values[i].ToLowerInvariant().Contains("height") - && values[i].Contains("=")) - { - int equals = values[i].IndexOf('='); - - retval.Height = int.Parse(values[i].Substring(equals + 1)); - } - } - } - else - { - retval.Width = int.Parse(values[0], System.Globalization.CultureInfo.InvariantCulture); - retval.Height = int.Parse(values[1], System.Globalization.CultureInfo.InvariantCulture); - } - return retval; - } - } - class RectangleConverter : ExpandableObjectConverter - { - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="sourceType"></param> - /// <returns></returns> - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (sourceType == typeof(string)) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="culture"></param> - /// <param name="value"></param> - /// <returns></returns> - public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) - { - string str = value as string; - - if (str == null) - return base.ConvertFrom(context, culture, value); - - return ConvertFromString(str); - } - - /// <summary> - /// - /// </summary> - /// <param name="context"></param> - /// <param name="culture"></param> - /// <param name="str"></param> - /// <returns></returns> - public new static Rectangle ConvertFromString(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, string str) - { - if (str.StartsWith("{") && str.EndsWith("}")) - { - str = str.Substring(1, str.Length - 2); - } - - string[] values = str.Split(','); - Rectangle retval = new Rectangle(); - - if (values.Length != 4) - throw new FormatException("Could not parse rectangle data from text."); - - if (str.Contains("=")) - { - // parse named arguments - for (int i = 0; i < values.Length; i++) - { - if (values[i].ToLowerInvariant().Contains("width") - && values[i].Contains("=")) - { - retval.Width = ParseNumeric(values[i]); - } - else if (values[i].ToLowerInvariant().Contains("height") - && values[i].Contains("=")) - { - retval.Height = ParseNumeric(values[i]); - } - else if (values[i].ToLowerInvariant().Contains("x") - && values[i].Contains("=")) - { - retval.X = ParseNumeric(values[i]); - } - else if (values[i].ToLowerInvariant().Contains("y") - && values[i].Contains("=")) - { - retval.Y = ParseNumeric(values[i]); - } - } - } - else - { - retval.X = int.Parse(values[0], System.Globalization.CultureInfo.InvariantCulture); - retval.Y = int.Parse(values[1], System.Globalization.CultureInfo.InvariantCulture); - retval.Width = int.Parse(values[2], System.Globalization.CultureInfo.InvariantCulture); - retval.Height = int.Parse(values[3], System.Globalization.CultureInfo.InvariantCulture); - } - return retval; - } - - private static int ParseNumeric(string text) - { - int equals = text.IndexOf("=", StringComparison.InvariantCultureIgnoreCase); - int value = int.Parse(text.Substring(equals + 1), System.Globalization.CultureInfo.CurrentCulture); - return value; - } - } -} Modified: trunk/AgateLib/Resources/XmlHelper.cs =================================================================== --- trunk/AgateLib/Resources/XmlHelper.cs 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/AgateLib/Resources/XmlHelper.cs 2014-07-20 20:34:02 UTC (rev 1410) @@ -67,7 +67,7 @@ CheckAttributeExists(node, attributeName); string text = node.Attribute(attributeName).Value; - return PointConverter.ConvertFromString(null, System.Globalization.CultureInfo.CurrentCulture, text); + return Point.FromString(text); } internal static Point ReadAttributePoint(XElement node, string attributeName, Point defaultValue) { @@ -82,7 +82,7 @@ CheckAttributeExists(node, attributeName); string text = node.Attribute(attributeName).Value; - return SizeConverter.ConvertFromString(null, System.Globalization.CultureInfo.CurrentCulture, text); + return Size.FromString(text); } internal static Size ReadAttributeSize(XElement node, string attributeName, Size defaultValue) { @@ -97,7 +97,7 @@ CheckAttributeExists(node, attributeName); string text = node.Attribute(attributeName).Value; - return RectangleConverter.ConvertFromString(null, System.Globalization.CultureInfo.CurrentCulture, text); + return Rectangle.FromString(text); } internal static Rectangle ReadAttributeRectangle(XElement node, string attributeName, Rectangle defaultValue) { Modified: trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj =================================================================== --- trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2014-07-20 20:24:00 UTC (rev 1409) +++ trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2014-07-20 20:34:02 UTC (rev 1410) @@ -164,6 +164,7 @@ <DependentUpon>SetSystemsForm.cs</DependentUpon> <SubType>Code</SubType> </Compile> + <Compile Include="TypeConverters.cs" /> <Compile Include="WinFormsDriver.cs"> <SubType>Code</SubType> </Compile> Copied: trunk/Drivers/AgateLib.WinForms/TypeConverters.cs (from rev 1409, trunk/AgateLib/Geometry/TypeConverters.cs) =================================================================== --- trunk/Drivers/AgateLib.WinForms/TypeConverters.cs (rev 0) +++ trunk/Drivers/AgateLib.WinForms/TypeConverters.cs 2014-07-20 20:34:02 UTC (rev 1410) @@ -0,0 +1,170 @@ +// 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.ComponentModel; +using System.Text; + +namespace AgateLib.Geometry +{ + /// <summary> + /// PointConverter. + /// </summary> + class PointConverter : ExpandableObjectConverter + { + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="sourceType"></param> + /// <returns></returns> + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (sourceType == typeof(string)) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="culture"></param> + /// <param name="value"></param> + /// <returns></returns> + public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) + { + string str = value as string; + + if (str == null) + { + return base.ConvertFrom(context, culture, value); + } + + return ConvertFrom(context, culture, str); + } + + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="culture"></param> + /// <param name="str"></param> + /// <returns></returns> + public new static Point ConvertFromString(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, string str) + { + return Point.FromString(str); + } + } + /// <summary> + /// + /// </summary> + class SizeConverter : ExpandableObjectConverter + { + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="sourceType"></param> + /// <returns></returns> + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (sourceType == typeof(string)) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="culture"></param> + /// <param name="value"></param> + /// <returns></returns> + public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) + { + string str = value as string; + + if (str == null) + return base.ConvertFrom(context, culture, value); + + return ConvertFromString(str); + + } + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="culture"></param> + /// <param name="str"></param> + /// <returns></returns> + public new static Size ConvertFromString(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, string str) + { + return Size.FromString(str); + } + } + class RectangleConverter : ExpandableObjectConverter + { + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="sourceType"></param> + /// <returns></returns> + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (sourceType == typeof(string)) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="culture"></param> + /// <param name="value"></param> + /// <returns></returns> + public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) + { + string str = value as string; + + if (str == null) + return base.ConvertFrom(context, culture, value); + + return ConvertFromString(str); + } + + /// <summary> + /// + /// </summary> + /// <param name="context"></param> + /// <param name="culture"></param> + /// <param name="str"></param> + /// <returns></returns> + public new static Rectangle ConvertFromString(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, string str) + { + return Rectangle.FromString(str); + } + + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-20 20:24:08
|
Revision: 1409 http://sourceforge.net/p/agate/code/1409 Author: kanato Date: 2014-07-20 20:24:00 +0000 (Sun, 20 Jul 2014) Log Message: ----------- Delete exception remoting attributes and constructors. Update copyright dates in headers. Modified Paths: -------------- trunk/AgateLib/AgateException.cs trunk/AgateLib/AgateFileProvider.cs trunk/AgateLib/AgateGame.cs trunk/AgateLib/AgateSetup.cs trunk/AgateLib/AppInitParameters.cs trunk/AgateLib/AudioLib/Audio.cs trunk/AgateLib/AudioLib/AudioCapsInfo.cs trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs trunk/AgateLib/AudioLib/ImplementationBase/MusicImpl.cs trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferImpl.cs trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferSessionImpl.cs trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs trunk/AgateLib/AudioLib/Music.cs trunk/AgateLib/AudioLib/SoundBuffer.cs trunk/AgateLib/AudioLib/SoundBufferSession.cs trunk/AgateLib/AudioLib/SoundFormat.cs trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs trunk/AgateLib/BitmapFont/BitmapFontImpl.cs trunk/AgateLib/BitmapFont/BitmapFontOptions.cs trunk/AgateLib/BitmapFont/FontMetrics.cs trunk/AgateLib/BitmapFont/GlyphMetrics.cs trunk/AgateLib/Core.cs trunk/AgateLib/Data/AgateColumn.cs trunk/AgateLib/Data/AgateColumnDictionary.cs trunk/AgateLib/Data/AgateDataHelper.cs trunk/AgateLib/Data/AgateDatabase.cs trunk/AgateLib/Data/AgateDatabaseException.cs trunk/AgateLib/Data/AgateRow.cs trunk/AgateLib/Data/AgateRowList.cs trunk/AgateLib/Data/AgateTable.cs trunk/AgateLib/Data/AgateTableDictionary.cs trunk/AgateLib/Data/FieldType.cs trunk/AgateLib/DisplayLib/Cache/FontStateCache.cs trunk/AgateLib/DisplayLib/Cache/SurfaceStateCache.cs trunk/AgateLib/DisplayLib/CreateWindowParams.cs trunk/AgateLib/DisplayLib/Display.cs trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs trunk/AgateLib/DisplayLib/DisplayWindow.cs trunk/AgateLib/DisplayLib/FontState.cs trunk/AgateLib/DisplayLib/FontSurface.cs trunk/AgateLib/DisplayLib/FrameBuffer.cs trunk/AgateLib/DisplayLib/ISurface.cs trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/FontSurfaceImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/ShaderCompilerImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs trunk/AgateLib/DisplayLib/IndexBuffer.cs trunk/AgateLib/DisplayLib/Origin.cs trunk/AgateLib/DisplayLib/OriginAlignment.cs trunk/AgateLib/DisplayLib/PixelBuffer.cs trunk/AgateLib/DisplayLib/PixelFormat.cs trunk/AgateLib/DisplayLib/PrimitiveType.cs trunk/AgateLib/DisplayLib/RenderStateAdapter.cs trunk/AgateLib/DisplayLib/ScreenMode.cs trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs trunk/AgateLib/DisplayLib/Shaders/AgateShader.cs trunk/AgateLib/DisplayLib/Shaders/AgateShaderCompileException.cs trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs trunk/AgateLib/DisplayLib/Shaders/IShader2D.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateInternalShader.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderImpl.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/BuiltInShader.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/Effect.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting3DImpl.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderCompiler.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderLanguage.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderProgram.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/Technique.cs trunk/AgateLib/DisplayLib/Shaders/Implementation/UniformState.cs trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs trunk/AgateLib/DisplayLib/Shaders/Lighting3D.cs trunk/AgateLib/DisplayLib/StringTransformer.cs trunk/AgateLib/DisplayLib/Surface.cs trunk/AgateLib/DisplayLib/SurfaceState.cs trunk/AgateLib/DisplayLib/TextLayout.cs trunk/AgateLib/DisplayLib/VertexBuffer.cs trunk/AgateLib/Drivers/AgateDriverInfo.cs trunk/AgateLib/Drivers/AgateDriverReporter.cs trunk/AgateLib/Drivers/AgateSandBoxLoader.cs trunk/AgateLib/Drivers/DriverImplBase.cs trunk/AgateLib/Drivers/IDesktopDriver.cs trunk/AgateLib/Drivers/IUserSetSystems.cs trunk/AgateLib/Drivers/NullInputImpl.cs trunk/AgateLib/Drivers/NullSoundImpl.cs trunk/AgateLib/Drivers/Registrar.cs trunk/AgateLib/Drivers/TypeID.cs trunk/AgateLib/Geometry/Builders/Cube.cs trunk/AgateLib/Geometry/Builders/Terrain.cs trunk/AgateLib/Geometry/Color.cs trunk/AgateLib/Geometry/Gradient.cs trunk/AgateLib/Geometry/Matrix4x4.cs trunk/AgateLib/Geometry/Point.cs trunk/AgateLib/Geometry/PointF.cs trunk/AgateLib/Geometry/Rectangle.cs trunk/AgateLib/Geometry/RectangleF.cs trunk/AgateLib/Geometry/Size.cs trunk/AgateLib/Geometry/SizeF.cs trunk/AgateLib/Geometry/TypeConverters.cs trunk/AgateLib/Geometry/Vector2.cs trunk/AgateLib/Geometry/Vector3.cs trunk/AgateLib/Geometry/Vector4.cs trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNormal.cs trunk/AgateLib/Geometry/VertexTypes/PositionTextureNTB.cs trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormal.cs trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormalTangent.cs trunk/AgateLib/Geometry/VertexTypes/VertexLayout.cs trunk/AgateLib/IFileProvider.cs trunk/AgateLib/InputLib/HatState.cs trunk/AgateLib/InputLib/ImplementationBase/InputImpl.cs trunk/AgateLib/InputLib/ImplementationBase/JoystickImpl.cs trunk/AgateLib/InputLib/InputEventArgs.cs trunk/AgateLib/InputLib/Joystick.cs trunk/AgateLib/InputLib/JoystickInput.cs trunk/AgateLib/InputLib/KeyCode.cs trunk/AgateLib/InputLib/KeyModifiers.cs trunk/AgateLib/InputLib/Keyboard.cs trunk/AgateLib/InputLib/Mouse.cs trunk/AgateLib/InternalResources/Data.cs trunk/AgateLib/Platform.cs trunk/AgateLib/PlatformType.cs trunk/AgateLib/Properties/AssemblyInfo.cs trunk/AgateLib/Resources/AgateResource.cs trunk/AgateLib/Resources/AgateResourceCollection.cs trunk/AgateLib/Resources/AgateResourceException.cs trunk/AgateLib/Resources/AgateResourceLoader.cs trunk/AgateLib/Resources/BitmapFontResource.cs trunk/AgateLib/Resources/DisplayWindowResource.cs trunk/AgateLib/Resources/ImageResource.cs trunk/AgateLib/Resources/SpriteResource.cs trunk/AgateLib/Resources/StringTable.cs trunk/AgateLib/Resources/SurfaceResource.cs trunk/AgateLib/Resources/XmlHelper.cs trunk/AgateLib/Serialization/Formatters/Xml/XmlFormatter.cs trunk/AgateLib/Serialization/Xle/ITypeBinder.cs trunk/AgateLib/Serialization/Xle/IXleSerializable.cs trunk/AgateLib/Serialization/Xle/NumericEncoding.cs trunk/AgateLib/Serialization/Xle/TypeBinder.cs trunk/AgateLib/Serialization/Xle/XleSerializationException.cs trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs trunk/AgateLib/Serialization/Xle/XleSerializer.cs trunk/AgateLib/Settings/ISettingsTracer.cs trunk/AgateLib/Settings/PersistantSettings.cs trunk/AgateLib/Settings/SettingsGroup.cs trunk/AgateLib/Sprites/FrameList.cs trunk/AgateLib/Sprites/IFrameList.cs trunk/AgateLib/Sprites/ISprite.cs trunk/AgateLib/Sprites/ISpriteFrame.cs trunk/AgateLib/Sprites/Sprite.cs trunk/AgateLib/Sprites/SpriteFrame.cs trunk/AgateLib/Timing.cs trunk/AgateLib/Utility/FileProviderList.cs trunk/AgateLib/Utility/FileSystemProvider.cs trunk/AgateLib/Utility/Ref.cs trunk/AgateLib/Utility/SurfacePacker.cs trunk/AgateLib/Utility/TgzFileProvider.cs trunk/AgateLib/Utility/ZipFileProvider.cs trunk/Drivers/AgateDrawing/Drawing_Display.cs trunk/Drivers/AgateDrawing/Drawing_DisplayWindow.cs trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs trunk/Drivers/AgateDrawing/Drawing_Reporter.cs trunk/Drivers/AgateDrawing/Drawing_Surface.cs trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs trunk/Drivers/AgateLib.WinForms/AgateRenderTarget.Designer.cs trunk/Drivers/AgateLib.WinForms/AgateRenderTarget.cs trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs trunk/Drivers/AgateLib.WinForms/BitmapFontUtilRenderers.cs trunk/Drivers/AgateLib.WinForms/DisplayWindowForm.Designer.cs trunk/Drivers/AgateLib.WinForms/DisplayWindowForm.cs trunk/Drivers/AgateLib.WinForms/FormUtil.cs trunk/Drivers/AgateLib.WinForms/FormsInterop.cs trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs trunk/Drivers/AgateLib.WinForms/SetSystemsForm.Designer.cs trunk/Drivers/AgateLib.WinForms/SetSystemsForm.cs trunk/Drivers/AgateLib.WinForms/WinFormsDriver.cs trunk/Drivers/AgateLib.WinForms/WinFormsReporter.cs trunk/Drivers/AgateOTK/AL_Audio.cs trunk/Drivers/AgateOTK/ContextFB.cs trunk/Drivers/AgateOTK/GL3/DrawBuffer.cs trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs trunk/Drivers/AgateOTK/GL3/GLPrimitiveRenderer.cs trunk/Drivers/AgateOTK/GL3/GLVertexBuffer.cs trunk/Drivers/AgateOTK/GL3/Shaders/GL3_Basic2DShader.cs trunk/Drivers/AgateOTK/GL3/Shaders/GlslFragmentProgram.cs trunk/Drivers/AgateOTK/GL3/Shaders/GlslShader.cs trunk/Drivers/AgateOTK/GL3/Shaders/GlslShaderCompiler.cs trunk/Drivers/AgateOTK/GL3/Shaders/GlslVertexProgram.cs trunk/Drivers/AgateOTK/GL3/Shaders/IGL3Shader.cs trunk/Drivers/AgateOTK/GL3/Shaders/ShaderFactory3.cs trunk/Drivers/AgateOTK/GLDrawBuffer.cs trunk/Drivers/AgateOTK/GL_Display.cs trunk/Drivers/AgateOTK/GL_DisplayControl.cs trunk/Drivers/AgateOTK/GL_FrameBuffer.cs trunk/Drivers/AgateOTK/GL_GameWindow.cs trunk/Drivers/AgateOTK/GL_IndexBuffer.cs trunk/Drivers/AgateOTK/GL_Surface.cs trunk/Drivers/AgateOTK/GeoHelper.cs trunk/Drivers/AgateOTK/Legacy/FixedFunction/FixedFunctionShaderFactory.cs trunk/Drivers/AgateOTK/Legacy/FixedFunction/OTK_FF_Basic2DShader.cs trunk/Drivers/AgateOTK/Legacy/FixedFunction/OTK_FF_Lighting2D.cs trunk/Drivers/AgateOTK/Legacy/FixedFunction/OTK_FF_Lighting3D.cs trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs trunk/Drivers/AgateOTK/Legacy/LegacyDrawBuffer.cs trunk/Drivers/AgateOTK/Legacy/LegacyPrimitiveRenderer.cs trunk/Drivers/AgateOTK/Legacy/LegacyVertexBuffer.cs trunk/Drivers/AgateOTK/Otk_Reporter.cs trunk/Drivers/AgateOTK/PrimitiveRenderer.cs trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs trunk/Drivers/AgateOTK/ShaderFactory.cs trunk/Drivers/AgateOTK/TextureCoordinates.cs trunk/Drivers/AgateOTK/frmFullScreen.Designer.cs trunk/Drivers/AgateOTK/frmFullScreen.cs trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs trunk/Drivers/AgateSDL/Audio/SDL_Music.cs trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs trunk/Drivers/AgateSDL/Input/SDL_Input.cs trunk/Drivers/AgateSDL/Reporter.cs trunk/Drivers/AgateSDX/D3DDevice.cs trunk/Drivers/AgateSDX/DrawBuffer.cs trunk/Drivers/AgateSDX/EffectParameter.cs trunk/Drivers/AgateSDX/FrameBufferSurface.cs trunk/Drivers/AgateSDX/FrameBufferWindow.cs trunk/Drivers/AgateSDX/GeoHelper.cs trunk/Drivers/AgateSDX/HlslCompiler.cs trunk/Drivers/AgateSDX/HlslEffect.cs trunk/Drivers/AgateSDX/Reporter.cs trunk/Drivers/AgateSDX/SDX_Display.cs trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs trunk/Drivers/AgateSDX/SDX_Effect.cs trunk/Drivers/AgateSDX/SDX_FrameBuffer.cs trunk/Drivers/AgateSDX/SDX_IndexBuffer.cs trunk/Drivers/AgateSDX/SDX_Input.cs trunk/Drivers/AgateSDX/SDX_Surface.cs trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs trunk/Drivers/AgateSDX/Shaders/FixedFunction/FixedFunctionShaderFactory.cs trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Basic2DShader.cs trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting2D.cs trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting3D.cs trunk/Drivers/AgateSDX/Shaders/ShaderFactory.cs trunk/Drivers/AgateSDX/VertexFormats.cs trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs trunk/Drivers/AgateSDX/XAud2/XAudio2_Music.cs trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBuffer.cs trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBufferSession.cs trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs trunk/Drivers/AgateSDX/frmFullScreen.Designer.cs trunk/Drivers/AgateSDX/frmFullScreen.cs Modified: trunk/AgateLib/AgateException.cs =================================================================== --- trunk/AgateLib/AgateException.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AgateException.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker @@ -25,16 +25,8 @@ /// <summary> /// Base exception class for exceptions which are thrown by AgateLib. /// </summary> - [global::System.Serializable] public class AgateException : Exception { - // - // For guidelines regarding the creation of new exception types, see - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp - // and - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp - // - /// <summary> /// Constructs an AgateException. /// </summary> @@ -57,14 +49,6 @@ /// </summary> public AgateException(Exception inner, string format, params object[] args) : base(string.Format(format, args), inner) { } - - /// <summary> - /// Deserializes an AgateException. - /// </summary> - protected AgateException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) - : base(info, context) { } } /// <summary> @@ -72,16 +56,8 @@ /// may not be portable to different platforms, /// and Core.CrossPlatformDebugLevel is set to Exception. /// </summary> - [global::System.Serializable] public class AgateCrossPlatformException : AgateException { - // - // For guidelines regarding the creation of new exception types, see - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp - // and - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp - // - /// <summary> /// Constructs a new AgateCrossPlatformException object. /// </summary> @@ -94,14 +70,5 @@ /// Constructs a new AgateCrossPlatformException object. /// </summary> public AgateCrossPlatformException(string message, Exception inner) : base(message, inner) { } - /// <summary> - /// Constructs a new AgateCrossPlatformException object from serialization data. - /// </summary> - /// <param name="info"></param> - /// <param name="context"></param> - protected AgateCrossPlatformException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) - : base(info, context) { } } } \ No newline at end of file Modified: trunk/AgateLib/AgateFileProvider.cs =================================================================== --- trunk/AgateLib/AgateFileProvider.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AgateFileProvider.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AgateGame.cs =================================================================== --- trunk/AgateLib/AgateGame.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AgateGame.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AgateSetup.cs =================================================================== --- trunk/AgateLib/AgateSetup.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AgateSetup.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AppInitParameters.cs =================================================================== --- trunk/AgateLib/AppInitParameters.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AppInitParameters.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/Audio.cs =================================================================== --- trunk/AgateLib/AudioLib/Audio.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/Audio.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/AudioCapsInfo.cs =================================================================== --- trunk/AgateLib/AudioLib/AudioCapsInfo.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/AudioCapsInfo.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs =================================================================== --- trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/ImplementationBase/MusicImpl.cs =================================================================== --- trunk/AgateLib/AudioLib/ImplementationBase/MusicImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/ImplementationBase/MusicImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferImpl.cs =================================================================== --- trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferSessionImpl.cs =================================================================== --- trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferSessionImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferSessionImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs =================================================================== --- trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/Music.cs =================================================================== --- trunk/AgateLib/AudioLib/Music.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/Music.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/SoundBuffer.cs =================================================================== --- trunk/AgateLib/AudioLib/SoundBuffer.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/SoundBuffer.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/SoundBufferSession.cs =================================================================== --- trunk/AgateLib/AudioLib/SoundBufferSession.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/SoundBufferSession.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/SoundFormat.cs =================================================================== --- trunk/AgateLib/AudioLib/SoundFormat.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/SoundFormat.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs =================================================================== --- trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs =================================================================== --- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/BitmapFont/BitmapFontOptions.cs =================================================================== --- trunk/AgateLib/BitmapFont/BitmapFontOptions.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/BitmapFont/BitmapFontOptions.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/BitmapFont/FontMetrics.cs =================================================================== --- trunk/AgateLib/BitmapFont/FontMetrics.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/BitmapFont/FontMetrics.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/BitmapFont/GlyphMetrics.cs =================================================================== --- trunk/AgateLib/BitmapFont/GlyphMetrics.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/BitmapFont/GlyphMetrics.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Core.cs =================================================================== --- trunk/AgateLib/Core.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Core.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/AgateColumn.cs =================================================================== --- trunk/AgateLib/Data/AgateColumn.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateColumn.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/AgateColumnDictionary.cs =================================================================== --- trunk/AgateLib/Data/AgateColumnDictionary.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateColumnDictionary.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/AgateDataHelper.cs =================================================================== --- trunk/AgateLib/Data/AgateDataHelper.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateDataHelper.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/AgateDatabase.cs =================================================================== --- trunk/AgateLib/Data/AgateDatabase.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateDatabase.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/AgateDatabaseException.cs =================================================================== --- trunk/AgateLib/Data/AgateDatabaseException.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateDatabaseException.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker @@ -83,16 +83,6 @@ ErrorCount = errorCount; } - /// <summary> - /// Constructs a database exception. - /// </summary> - /// <param name="info"></param> - /// <param name="context"></param> - protected AgateDatabaseException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) - : base(info, context) { } - internal int ErrorCount { get; set; } } } Modified: trunk/AgateLib/Data/AgateRow.cs =================================================================== --- trunk/AgateLib/Data/AgateRow.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateRow.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/AgateRowList.cs =================================================================== --- trunk/AgateLib/Data/AgateRowList.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateRowList.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/AgateTable.cs =================================================================== --- trunk/AgateLib/Data/AgateTable.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateTable.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/AgateTableDictionary.cs =================================================================== --- trunk/AgateLib/Data/AgateTableDictionary.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/AgateTableDictionary.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/Data/FieldType.cs =================================================================== --- trunk/AgateLib/Data/FieldType.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/Data/FieldType.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Cache/FontStateCache.cs =================================================================== --- trunk/AgateLib/DisplayLib/Cache/FontStateCache.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Cache/FontStateCache.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Cache/SurfaceStateCache.cs =================================================================== --- trunk/AgateLib/DisplayLib/Cache/SurfaceStateCache.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Cache/SurfaceStateCache.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/CreateWindowParams.cs =================================================================== --- trunk/AgateLib/DisplayLib/CreateWindowParams.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/CreateWindowParams.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Display.cs =================================================================== --- trunk/AgateLib/DisplayLib/Display.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Display.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs =================================================================== --- trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs =================================================================== --- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/FontState.cs =================================================================== --- trunk/AgateLib/DisplayLib/FontState.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/FontState.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/FontSurface.cs =================================================================== --- trunk/AgateLib/DisplayLib/FontSurface.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/FontSurface.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ISurface.cs =================================================================== --- trunk/AgateLib/DisplayLib/ISurface.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ISurface.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ImplementationBase/FontSurfaceImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/FontSurfaceImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ImplementationBase/FontSurfaceImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ImplementationBase/ShaderCompilerImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/ShaderCompilerImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ImplementationBase/ShaderCompilerImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/IndexBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/IndexBuffer.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/IndexBuffer.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Origin.cs =================================================================== --- trunk/AgateLib/DisplayLib/Origin.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Origin.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/OriginAlignment.cs =================================================================== --- trunk/AgateLib/DisplayLib/OriginAlignment.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/OriginAlignment.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/PixelBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/PixelFormat.cs =================================================================== --- trunk/AgateLib/DisplayLib/PixelFormat.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/PixelFormat.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/PrimitiveType.cs =================================================================== --- trunk/AgateLib/DisplayLib/PrimitiveType.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/PrimitiveType.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/RenderStateAdapter.cs =================================================================== --- trunk/AgateLib/DisplayLib/RenderStateAdapter.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/RenderStateAdapter.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/ScreenMode.cs =================================================================== --- trunk/AgateLib/DisplayLib/ScreenMode.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/ScreenMode.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/AgateShader.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/AgateShader.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/AgateShader.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/AgateShaderCompileException.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/AgateShaderCompileException.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/AgateShaderCompileException.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker @@ -24,7 +24,6 @@ /// <summary> /// Exception raised when there is an error with the shader compiler. /// </summary> - [global::System.Serializable] public class AgateShaderCompilerException : AgateException { /// <summary> @@ -42,14 +41,5 @@ /// <param name="inner"></param> /// <param name="message"></param> public AgateShaderCompilerException(string message, Exception inner) : base(message, inner) { } - /// <summary> - /// Constructs an AgateShaderCompilerException object. - /// </summary> - /// <param name="context"></param> - /// <param name="info"></param> - protected AgateShaderCompilerException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) - : base(info, context) { } } } Modified: trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/IShader2D.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/IShader2D.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/IShader2D.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateInternalShader.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateInternalShader.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateInternalShader.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/BuiltInShader.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/Implementation/BuiltInShader.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/Implementation/BuiltInShader.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Ylvisaker Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/Effect.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/Implementation/Effect.cs 2014-07-20 20:16:55 UTC (rev 1408) +++ trunk/AgateLib/DisplayLib/Shaders/Implementation/Effect.cs 2014-07-20 20:24:00 UTC (rev 1409) @@ -11,7 +11,7 @@ // The Original Code is AgateLib. // // The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2011. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. // All Rights Reserved. // // Contributor(s): Erik Yl... [truncated message content] |
From: <ka...@us...> - 2014-07-20 20:17:08
|
Revision: 1408 http://sourceforge.net/p/agate/code/1408 Author: kanato Date: 2014-07-20 20:16:55 +0000 (Sun, 20 Jul 2014) Log Message: ----------- Refactor XleSerializer to make parts of AgateLib more portable. Modified Paths: -------------- trunk/AgateLib/AgateLib-Portable.csproj trunk/AgateLib/AgateLib.csproj trunk/AgateLib/Geometry/Gradient.cs trunk/AgateLib/Geometry/Point.cs trunk/AgateLib/Geometry/PointF.cs trunk/AgateLib/Geometry/Rectangle.cs trunk/AgateLib/Geometry/RectangleF.cs trunk/AgateLib/Geometry/Size.cs trunk/AgateLib/Geometry/SizeF.cs trunk/AgateLib/Geometry/Vector3.cs trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs trunk/AgateLib/Serialization/Xle/XleSerializer.cs trunk/Tests/Tests.csproj trunk/UnitTests/UnitTests.csproj Added Paths: ----------- trunk/AgateLib/Serialization/Xle/IXleTypeSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/ trunk/AgateLib/Serialization/Xle/TypeSerializers/PointFSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/PointSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleFSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeFSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeSerializer.cs trunk/AgateLib/Serialization/Xle/XleTypeSerializerBase.cs trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs trunk/Tests/Service References/ trunk/UnitTests/Serialization/ trunk/UnitTests/Serialization/Xle/ trunk/UnitTests/Serialization/Xle/Serializable.cs trunk/UnitTests/Serialization/Xle/XSTests.cs Removed Paths: ------------- trunk/AgateLib/Serialization/Xle/TypeSerializer.cs Modified: trunk/AgateLib/AgateLib-Portable.csproj =================================================================== --- trunk/AgateLib/AgateLib-Portable.csproj 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/AgateLib-Portable.csproj 2014-07-20 20:16:55 UTC (rev 1408) @@ -65,16 +65,6 @@ <Compile Include="Core.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Data\AgateDatabaseException.cs" /> - <Compile Include="Data\AgateColumn.cs" /> - <Compile Include="Data\AgateDatabase.cs" /> - <Compile Include="Data\AgateRow.cs" /> - <Compile Include="Data\AgateTable.cs" /> - <Compile Include="Data\AgateColumnDictionary.cs" /> - <Compile Include="Data\AgateDataHelper.cs" /> - <Compile Include="Data\FieldType.cs" /> - <Compile Include="Data\AgateRowList.cs" /> - <Compile Include="Data\AgateTableDictionary.cs" /> <Compile Include="DisplayLib\FrameBuffer.cs" /> <Compile Include="DisplayLib\IFrameBuffer.cs" /> <Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" /> @@ -91,6 +81,7 @@ <Compile Include="DisplayLib\Shaders\Lighting3D.cs" /> <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> + <Compile Include="Geometry\TypeConverters.cs" /> <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" /> <Compile Include="ICommandProcessor.cs" /> <Compile Include="IFileProvider.cs"> @@ -356,9 +347,6 @@ <Compile Include="InputLib\Mouse.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="InternalResources\Data.cs"> - <SubType>Code</SubType> - </Compile> <Compile Include="InternalResources\DataResources.Designer.cs"> <DependentUpon>DataResources.resx</DependentUpon> <SubType>Code</SubType> Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/AgateLib.csproj 2014-07-20 20:16:55 UTC (rev 1408) @@ -177,6 +177,7 @@ <Compile Include="DisplayLib\Shaders\Lighting3D.cs" /> <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> + <Compile Include="Geometry\TypeConverters.cs" /> <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" /> <Compile Include="ICommandProcessor.cs" /> <Compile Include="IFileProvider.cs"> @@ -190,8 +191,16 @@ <Compile Include="PlatformType.cs" /> <Compile Include="Resources\ImageResource.cs" /> <Compile Include="Serialization\Xle\CompressionType.cs" /> + <Compile Include="Serialization\Xle\IXleTypeSerializer.cs" /> <Compile Include="Serialization\Xle\NumericEncoding.cs" /> - <Compile Include="Serialization\Xle\TypeSerializer.cs" /> + <Compile Include="Serialization\Xle\TypeSerializers\PointFSerializer.cs" /> + <Compile Include="Serialization\Xle\TypeSerializers\PointSerializer.cs" /> + <Compile Include="Serialization\Xle\TypeSerializers\RectangleFSerializer.cs" /> + <Compile Include="Serialization\Xle\TypeSerializers\RectangleSerializer.cs" /> + <Compile Include="Serialization\Xle\TypeSerializers\SizeFSerializer.cs" /> + <Compile Include="Serialization\Xle\TypeSerializers\SizeSerializer.cs" /> + <Compile Include="Serialization\Xle\XleTypeSerializerBase.cs" /> + <Compile Include="Serialization\Xle\XleTypeSerializerCollection.cs" /> <Compile Include="Settings\SettingsGroup.cs" /> <Compile Include="Timing.cs"> <SubType>Code</SubType> @@ -361,9 +370,6 @@ <Compile Include="Geometry\SizeF.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Geometry\TypeConverters.cs"> - <SubType>Code</SubType> - </Compile> <Compile Include="Geometry\Vector2.cs"> <SubType>Code</SubType> </Compile> Modified: trunk/AgateLib/Geometry/Gradient.cs =================================================================== --- trunk/AgateLib/Geometry/Gradient.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Geometry/Gradient.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -27,7 +27,6 @@ /// A four color gradient, with a different color value for each corner. /// </summary> [StructLayout(LayoutKind.Sequential)] - [Serializable] public struct Gradient { private Color mTopLeft; Modified: trunk/AgateLib/Geometry/Point.cs =================================================================== --- trunk/AgateLib/Geometry/Point.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Geometry/Point.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -19,16 +19,13 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using AgateLib.Serialization.Xle; namespace AgateLib.Geometry { /// <summary> /// Replacement for System.Drawing.Point structure. /// </summary> - [Serializable] - [TypeConverter(typeof(PointConverter))] - public struct Point : IXleSerializable + public struct Point { int x, y; @@ -63,18 +60,6 @@ this.y = size.Height; } - - void IXleSerializable.WriteData(XleSerializationInfo info) - { - info.Write("X", X, true); - info.Write("Y", Y, true); - } - void IXleSerializable.ReadData(XleSerializationInfo info) - { - X = info.ReadInt32("X"); - Y = info.ReadInt32("Y"); - } - #endregion #region --- Public Properties --- Modified: trunk/AgateLib/Geometry/PointF.cs =================================================================== --- trunk/AgateLib/Geometry/PointF.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Geometry/PointF.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -19,15 +19,13 @@ using System; using System.Collections.Generic; using System.Text; -using AgateLib.Serialization.Xle; namespace AgateLib.Geometry { /// <summary> /// Replacement for System.Drawing.PointF structure. /// </summary> - [Serializable] - public struct PointF : IXleSerializable + public struct PointF { float x, y; @@ -62,18 +60,6 @@ this.y = size.Height; } - - void IXleSerializable.WriteData(XleSerializationInfo info) - { - info.Write("X", X, true); - info.Write("Y", Y, true); - } - void IXleSerializable.ReadData(XleSerializationInfo info) - { - X = info.ReadFloat("X"); - Y = info.ReadFloat("Y"); - } - #endregion #region --- Public Properties --- Modified: trunk/AgateLib/Geometry/Rectangle.cs =================================================================== --- trunk/AgateLib/Geometry/Rectangle.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Geometry/Rectangle.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -20,16 +20,13 @@ using System.Collections.Generic; using System.ComponentModel; using System.Text; -using AgateLib.Serialization.Xle; namespace AgateLib.Geometry { /// <summary> /// Implements a Rectangle structure, containing position and size. /// </summary> - [Serializable] - [TypeConverter(typeof(ExpandableObjectConverter))] - public struct Rectangle : IXleSerializable + public struct Rectangle { Point pt; Size sz; @@ -57,25 +54,6 @@ this.sz = sz; } - #region IXleSerializable Members - - void IXleSerializable.WriteData(XleSerializationInfo info) - { - info.Write("X", X, true); - info.Write("Y", Y, true); - info.Write("Width", Width, true); - info.Write("Height", Height, true); - } - void IXleSerializable.ReadData(XleSerializationInfo info) - { - X = info.ReadInt32("X"); - Y = info.ReadInt32("Y"); - Width = info.ReadInt32("Width"); - Height = info.ReadInt32("Height"); - } - - #endregion - /// <summary> /// Static method which returns a rectangle with specified left, top, right and bottom. /// </summary> @@ -442,10 +420,10 @@ } static bool FindValue(string text, string name, out int value) { - int index = text.IndexOf(name, StringComparison.InvariantCultureIgnoreCase); - int comma = text.IndexOf(",", index, StringComparison.InvariantCultureIgnoreCase); + int index = text.IndexOf(name, StringComparison.OrdinalIgnoreCase); + int comma = text.IndexOf(",", index, StringComparison.OrdinalIgnoreCase); if (comma == -1) - comma = text.IndexOf("}", index, StringComparison.InvariantCultureIgnoreCase); + comma = text.IndexOf("}", index, StringComparison.OrdinalIgnoreCase); int start = index + name.Length; Modified: trunk/AgateLib/Geometry/RectangleF.cs =================================================================== --- trunk/AgateLib/Geometry/RectangleF.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Geometry/RectangleF.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -20,16 +20,13 @@ using System.Collections.Generic; using System.ComponentModel; using System.Text; -using AgateLib.Serialization.Xle; namespace AgateLib.Geometry { /// <summary> /// Replacement for System.Drawing.RectangleF structure. /// </summary> - [Serializable] - [TypeConverter(typeof(ExpandableObjectConverter))] - public struct RectangleF : IXleSerializable + public struct RectangleF { PointF pt; SizeF sz; @@ -57,24 +54,6 @@ this.sz = sz; } - #region IXleSerializable Members - - void IXleSerializable.WriteData(XleSerializationInfo info) - { - info.Write("X", X, true); - info.Write("Y", Y, true); - info.Write("Width", Width, true); - info.Write("Height", Height, true); - } - void IXleSerializable.ReadData(XleSerializationInfo info) - { - X = info.ReadFloat("X"); - Y = info.ReadFloat("Y"); - Width = info.ReadFloat("Width"); - Height = info.ReadFloat("Height"); - } - - #endregion /// <summary> /// Static method which returns a RectangleF with specified left, top, right and bottom. /// </summary> Modified: trunk/AgateLib/Geometry/Size.cs =================================================================== --- trunk/AgateLib/Geometry/Size.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Geometry/Size.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -27,9 +27,7 @@ /// <summary> /// A structure with two properties, a width and height. /// </summary> - [Serializable] - [TypeConverter(typeof(ExpandableObjectConverter))] - public partial struct Size : IXleSerializable + public partial struct Size { int width, height; @@ -53,21 +51,6 @@ this.height = height; } - #region IXleSerializable Members - - void IXleSerializable.WriteData(XleSerializationInfo info) - { - info.Write("Width", Width, true); - info.Write("Height", Height, true); - } - void IXleSerializable.ReadData(XleSerializationInfo info) - { - Width = info.ReadInt32("Width"); - Height = info.ReadInt32("Height"); - } - - #endregion - /// <summary> /// Gets or sets the width. /// </summary> Modified: trunk/AgateLib/Geometry/SizeF.cs =================================================================== --- trunk/AgateLib/Geometry/SizeF.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Geometry/SizeF.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -20,16 +20,13 @@ using System.Collections.Generic; using System.ComponentModel; using System.Text; -using AgateLib.Serialization.Xle; namespace AgateLib.Geometry { /// <summary> /// SizeF structure. /// </summary> - [Serializable] - [TypeConverter(typeof(ExpandableObjectConverter))] - public struct SizeF : IXleSerializable + public struct SizeF { float width, height; @@ -54,20 +51,6 @@ this.height = height; } - #region IXleSerializable Members - - void IXleSerializable.WriteData(XleSerializationInfo info) - { - info.Write("Width", Width, true); - info.Write("Height", Height, true); - } - void IXleSerializable.ReadData(XleSerializationInfo info) - { - Width = info.ReadFloat("Width"); - Height = info.ReadFloat("Height"); - } - - #endregion /// <summary> /// Gets or sets the width. /// </summary> Modified: trunk/AgateLib/Geometry/Vector3.cs =================================================================== --- trunk/AgateLib/Geometry/Vector3.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Geometry/Vector3.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -26,7 +26,6 @@ /// <summary> /// Structure which describes a vector in 3-space. /// </summary> - [Serializable] [StructLayout(LayoutKind.Sequential)] public struct Vector3 { Added: trunk/AgateLib/Serialization/Xle/IXleTypeSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/IXleTypeSerializer.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/IXleTypeSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Serialization.Xle +{ + public interface IXleTypeSerializer + { + IEnumerable<Type> AllowedTypes { get; } + + void Serialize(XleSerializationInfo xleSerializationInfo, object value); + object Deserialize(XleSerializationInfo xleSerializationInfo); + } +} Deleted: trunk/AgateLib/Serialization/Xle/TypeSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/TypeSerializer.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Serialization/Xle/TypeSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AgateLib.Serialization.Xle -{ - public abstract class XleTypeSerializer - { - //public virtual - } -} Added: trunk/AgateLib/Serialization/Xle/TypeSerializers/PointFSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/TypeSerializers/PointFSerializer.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/TypeSerializers/PointFSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,27 @@ +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Serialization.Xle.TypeSerializers +{ + class PointFSerializer : XleTypeSerializerBase<PointF> + { + public override void Serialize(XleSerializationInfo info, PointF value) + { + info.Write("X", value.X, true); + info.Write("Y", value.Y, true); + } + + public override PointF Deserialize(XleSerializationInfo info) + { + return new PointF() + { + X = info.ReadFloat("X"), + Y = info.ReadFloat("Y"), + }; + } + } +} Added: trunk/AgateLib/Serialization/Xle/TypeSerializers/PointSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/TypeSerializers/PointSerializer.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/TypeSerializers/PointSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,28 @@ +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Serialization.Xle.TypeSerializers +{ + class PointSerializer : XleTypeSerializerBase<Point> + { + public override void Serialize(XleSerializationInfo info, Point value) + { + info.Write("X", value.X, true); + info.Write("Y", value.Y, true); + + } + + public override Point Deserialize(XleSerializationInfo info) + { + return new Point() + { + X = info.ReadInt32("X"), + Y = info.ReadInt32("Y"), + }; + } + } +} Added: trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleFSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleFSerializer.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleFSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,29 @@ +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Serialization.Xle.TypeSerializers +{ + class RectangleFSerializer : XleTypeSerializerBase<RectangleF> + { + public override void Serialize(XleSerializationInfo info, RectangleF value) + { + info.Write("X", value.X, true); + info.Write("Y", value.Y, true); + info.Write("Width", value.Width, true); + info.Write("Height", value.Height, true); + } + + public override RectangleF Deserialize(XleSerializationInfo info) + { + return new RectangleF( + info.ReadFloat("X"), + info.ReadFloat("Y"), + info.ReadFloat("Width"), + info.ReadFloat("Height")); + } + } +} Added: trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleSerializer.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,29 @@ +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Serialization.Xle.TypeSerializers +{ + class RectangleSerializer : XleTypeSerializerBase<Rectangle> + { + public override void Serialize(XleSerializationInfo info, Rectangle value) + { + info.Write("X", value.X, true); + info.Write("Y", value.Y, true); + info.Write("Width", value.Width, true); + info.Write("Height", value.Height, true); + } + + public override Rectangle Deserialize(XleSerializationInfo info) + { + return new Rectangle( + info.ReadInt32("X"), + info.ReadInt32("Y"), + info.ReadInt32("Width"), + info.ReadInt32("Height")); + } + } +} Added: trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeFSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeFSerializer.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeFSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,27 @@ +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Serialization.Xle.TypeSerializers +{ + class SizeFSerializer : XleTypeSerializerBase<SizeF> + { + public override void Serialize(XleSerializationInfo info, SizeF value) + { + info.Write("Width", value.Width, true); + info.Write("Height", value.Height, true); + } + + public override SizeF Deserialize(XleSerializationInfo info) + { + return new SizeF() + { + Width = info.ReadFloat("Width"), + Height = info.ReadFloat("Height"), + }; + } + } +} Added: trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeSerializer.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,27 @@ +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Serialization.Xle.TypeSerializers +{ + class SizeSerializer : XleTypeSerializerBase<Size> + { + public override void Serialize(XleSerializationInfo info, Size value) + { + info.Write("Width", value.Width, true); + info.Write("Height", value.Height, true); + } + + public override Size Deserialize(XleSerializationInfo info) + { + return new Size() + { + Width = info.ReadInt32("Width"), + Height = info.ReadInt32("Height"), + }; + } + } +} Modified: trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -35,15 +35,18 @@ { XDocument doc; Stack<XElement> nodes = new Stack<XElement>(); + XleTypeSerializerCollection TypeSerializers; - internal XleSerializationInfo() + internal XleSerializationInfo(ITypeBinder Binder1, XleTypeSerializerCollection TypeSerializers, XDocument document = null) { - doc = new XDocument(); + this.Binder = Binder1; + this.TypeSerializers = TypeSerializers; + + this.doc = document; + + if (this.doc == null) + this.doc = new XDocument(); } - internal XleSerializationInfo(XDocument doc) - { - this.doc = doc; - } internal XDocument XmlDoc { @@ -90,97 +93,12 @@ #region --- Writing single values to the XML --- /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, string value) - { - if (value == null) value = ""; - - Write(name, value, false); - } - /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, double value) - { - Write(name, value, false); - } - /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, float value) - { - Write(name, value, false); - } - /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, bool value) - { - Write(name, value, false); - } - /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, char value) - { - Write(name, value, false); - } - /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, short value) - { - Write(name, value, false); - } - /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, int value) - { - Write(name, value, false); - } - /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, long value) - { - Write(name, value, false); - } - /// <summary> - /// Writes a field to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The value to write.</param> - public void Write(string name, decimal value) - { - Write(name, value, false); - } - - - /// <summary> /// Writes a field to the XML data as an element or an attribute. /// </summary> /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <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) + public void Write(string name, string value, bool asAttribute = false) { if (value == null) value = ""; @@ -194,7 +112,7 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void WriteEnum<T>(string name, T value, bool asAttribute) where T : struct + public void WriteEnum<T>(string name, T value, bool asAttribute = false) where T : struct { if (typeof(T).IsEnum == false) throw new XleSerializationException("Type passed is not an enum."); @@ -207,7 +125,7 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void Write(string name, double value, bool asAttribute) + public void Write(string name, double value, bool asAttribute = false) { WriteImpl(name, value, asAttribute); } @@ -217,7 +135,7 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void Write(string name, float value, bool asAttribute) + public void Write(string name, float value, bool asAttribute = false) { WriteImpl(name, value, asAttribute); } @@ -227,7 +145,7 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void Write(string name, bool value, bool asAttribute) + public void Write(string name, bool value, bool asAttribute = false) { WriteImpl(name, value, asAttribute); } @@ -237,7 +155,7 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void Write(string name, char value, bool asAttribute) + public void Write(string name, char value, bool asAttribute = false) { WriteImpl(name, value, asAttribute); } @@ -247,7 +165,7 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void Write(string name, short value, bool asAttribute) + public void Write(string name, short value, bool asAttribute = false) { WriteImpl(name, value, asAttribute); } @@ -257,7 +175,7 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void Write(string name, int value, bool asAttribute) + public void Write(string name, int value, bool asAttribute = false) { WriteImpl(name, value, asAttribute); } @@ -267,7 +185,7 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void Write(string name, long value, bool asAttribute) + public void Write(string name, long value, bool asAttribute = false) { WriteImpl(name, value, asAttribute); } @@ -277,17 +195,13 @@ /// <param name="name">The name of the XML element used.</param> /// <param name="value">The value to write.</param> /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param> - public void Write(string name, decimal value, bool asAttribute) + public void Write(string name, decimal value, bool asAttribute = false) { WriteImpl(name, value, asAttribute); } - void WriteImpl<T>(string name, T value) where T : IConvertible + void WriteImpl<T>(string name, T value, bool asAttribute = false) where T : IConvertible { - WriteImpl(name, value, false); - } - void WriteImpl<T>(string name, T value, bool asAttribute) where T : IConvertible - { if (asAttribute) { WriteAsAttribute<T>(name, value); @@ -297,6 +211,13 @@ } + /// <summary> + /// Writes a nullable value to + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="name"></param> + /// <param name="value"></param> + /// <param name="asAttribute"></param> public void Write<T>(string name, T? value, bool asAttribute = false) where T : struct, IConvertible { if (asAttribute) @@ -315,41 +236,12 @@ } } - /// <summary> - /// Writes an object implementing IXleSerializable to the XML data as an element. - /// </summary> - /// <param name="name">The name of the XML element used.</param> - /// <param name="value">The object data to write.</param> - public void Write(string name, IXleSerializable value) + private XElement WriteAsElement<T>(string name, T value) where T : IConvertible { XElement element = CreateElement(name); - if (value == null) - AddAttribute(element, "type", "null"); - else - { - AddAttribute(element, "type", value.GetType().ToString()); - - try - { - nodes.Push(element); - - Serialize(value); - } - finally - { - nodes.Pop(); - } - } - } - private XElement WriteAsElement<T>(string name, T value) where T : IConvertible - { - XElement element = new XElement(name); - element.Value = value.ToString(); - CurrentNode.Add(element); - return element; } private void WriteAsAttribute<T>(string name, T value) where T : IConvertible @@ -368,6 +260,7 @@ return element; } + #endregion #region --- Writing arrays --- @@ -378,7 +271,7 @@ /// <param name="value">The array data to write.</param> public void Write(string name, int[] value) { - WriteImpl(name, value, NumericEncoding.Base64); + WriteImpl(name, value, NumericEncoding.Csv); } /// <summary> /// Writes an int[] array to the XML data as an element with the specified encoding. @@ -749,8 +642,131 @@ } #endregion + #region --- Writing generic objects --- + public void Write(string name, Array value) + { + XElement element = CreateElement(name); + AddAttribute(element, "array", "true"); + + if (value == null) + AddAttribute(element, "type", "null"); + else + { + AddAttribute(element, "type", value.GetType().GetElementType().FullName); + + IXleTypeSerializer typeSer = TypeSerializers[value.GetType().GetElementType()]; + if (typeSer == null) + throw new XleSerializationException("Could not serialize object of type " + value.GetType().FullName); + + try + { + nodes.Push(element); + + for (int i = 0; i < value.Length; i++) + { + object item = value.GetValue(i); + + if (item == null) + { + XElement eitem = new XElement("Item", new XAttribute("type", "null")); + element.Add(eitem); + } + else + { + XElement eitem = new XElement("Item", + new XAttribute("type", item.GetType().FullName)); + + element.Add(eitem); + + try + { + nodes.Push(eitem); + + typeSer.Serialize(this, value.GetValue(i)); + } + finally + { + nodes.Pop(); + } + } + } + } + finally + { + nodes.Pop(); + } + } + } + public void Write(string name, object value) + { + if (value is IXleSerializable) + { + Write(name, (IXleSerializable)value); + return; + } + if (value is Array) + { + Write(name, (Array)value); + return; + } + + XElement element = CreateElement(name); + + if (value == null) + AddAttribute(element, "type", "null"); + else + { + AddAttribute(element, "type", value.GetType().ToString()); + + IXleTypeSerializer typeSer = TypeSerializers[value.GetType()]; + if (typeSer == null) + throw new XleSerializationException("Could not serialize object of type " + value.GetType().FullName); + + try + { + nodes.Push(element); + + typeSer.Serialize(this, value); + } + finally + { + nodes.Pop(); + } + } + } + + /// <summary> + /// Writes an object implementing IXleSerializable to the XML data as an element. + /// </summary> + /// <param name="name">The name of the XML element used.</param> + /// <param name="value">The object data to write.</param> + public void Write(string name, IXleSerializable value) + { + XElement element = CreateElement(name); + + if (value == null) + AddAttribute(element, "type", "null"); + else + { + AddAttribute(element, "type", value.GetType().ToString()); + + try + { + nodes.Push(element); + + Serialize(value); + } + finally + { + nodes.Pop(); + } + } + } + #endregion + + #endregion #region --- Reading methods --- /// <summary> @@ -1057,8 +1073,56 @@ /// </summary> /// <param name="name">Name of the field.</param> /// <returns></returns> + [Obsolete("Use ReadArray<byte> instead.")] public byte[] ReadByteArray(string name) { + return ReadArray<byte>(name); + } + + /// <summary> + /// Reads a integer array from the XML data. If the name is not present + /// an XleSerializationException is thrown. + /// </summary> + /// <param name="name">Name of the field.</param> + /// <returns></returns> + [Obsolete("Use ReadArray<int> instead.")] + public int[] ReadInt32Array(string name) + { + return ReadArray<int>(name); + } + + /// <summary> + /// Reads a boolean array from the XML data. If the name is not present + /// an XleSerializationException is thrown. + /// </summary> + /// <param name="name">Name of the field.</param> + /// <returns></returns> + [Obsolete("Use ReadArray<bool> instead.")] + public bool[] ReadBooleanArray(string name) + { + return ReadArray<bool>(name); + } + + /// <summary> + /// Reads a double array from the XML data. If the name is not present + /// an XleSerializationException is thrown. + /// </summary> + /// <param name="name">Name of the field.</param> + /// <returns></returns> + [Obsolete("Use ReadArray<double> instead.")] + public double[] ReadDoubleArray(string name) + { + return ReadArray<double>(name); + } + + /// <summary> + /// Reads a byte array from the XML data. If the name is not present + /// an XleSerializationException is thrown. + /// </summary> + /// <param name="name">Name of the field.</param> + /// <returns></returns> + byte[] _ReadByteArray(string name) + { XElement element = CurrentNode.Element(name); string encoding = GetEncoding(name); @@ -1083,7 +1147,7 @@ /// </summary> /// <param name="name">Name of the field.</param> /// <returns></returns> - public int[] ReadInt32Array(string name) + int[] _ReadInt32Array(string name) { XElement element = CurrentNode.Element(name); string encoding = GetEncoding(name); @@ -1131,7 +1195,7 @@ /// </summary> /// <param name="name">Name of the field.</param> /// <returns></returns> - public bool[] ReadBooleanArray(string name) + bool[] _ReadBooleanArray(string name) { byte[] array = ReadByteArray(name); bool[] result = new bool[array.Length]; @@ -1148,7 +1212,7 @@ /// </summary> /// <param name="name">Name of the field.</param> /// <returns></returns> - public double[] ReadDoubleArray(string name) + double[] _ReadDoubleArray(string name) { byte[] array = ReadByteArray(name); double[] result = new double[array.Length / 8]; @@ -1175,8 +1239,10 @@ /// <returns></returns> public T[] ReadArray<T>(string name) { - if (typeof(T) == typeof(int) || typeof(T) == typeof(double)) - throw new XleSerializationException("Cannot use the generic ReadArray method to deserialize an array of primitives."); + if (typeof(T) == typeof(int)) return (T[])(object)_ReadInt32Array(name); + if (typeof(T) == typeof(double)) return (T[])(object)_ReadDoubleArray(name); + if (typeof(T) == typeof(bool)) return (T[])(object)_ReadBooleanArray(name); + if (typeof(T) == typeof(byte)) return (T[])(object)_ReadByteArray(name); try { @@ -1208,6 +1274,7 @@ Type type; if (element.Attribute("type") == null) type = defaultType; + else { string typename = element.Attribute("type").Value; @@ -1467,7 +1534,7 @@ /// <summary> /// The ITypeBinder object used. /// </summary> - public ITypeBinder Binder { get; internal set; } + public ITypeBinder Binder { get; private set; } #endregion #region --- Dealing with streams --- @@ -1509,7 +1576,6 @@ #endregion - internal object BeginDeserialize() { XElement root = doc.Element("XleRoot"); @@ -1560,20 +1626,32 @@ } } - IXleSerializable obj; + if (typeof(IXleSerializable).IsAssignableFrom(type)) + { + IXleSerializable obj; - try - { - obj = (IXleSerializable)Activator.CreateInstance(type, true); + try + { + obj = (IXleSerializable)Activator.CreateInstance(type, true); + } + catch (MissingMethodException e) + { + throw new XleSerializationException("Type " + type.ToString() + " does not have a default constructor.", e); + } + + obj.ReadData(this); + + return obj; } - catch (MissingMethodException e) + else { - throw new XleSerializationException("Type " + type.ToString() + " does not have a default constructor.", e); - } + var typser = TypeSerializers[type]; - obj.ReadData(this); + if (typser == null) + throw new XleSerializationException("Could not deserialize type " + type.ToString()); - return obj; + return typser.Deserialize(this); + } } public void WritePublicProperties(IXleSerializable item) Modified: trunk/AgateLib/Serialization/Xle/XleSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -32,6 +32,7 @@ public class XleSerializer { Type objectType; + XleTypeSerializerCollection mTypeSerializers = new XleTypeSerializerCollection(); /// <summary> /// An object which implements the AgateLib.Serialization.Xle.ITypeBinder interface. @@ -40,6 +41,10 @@ /// it may be replaced for custom type binding. /// </summary> public ITypeBinder Binder { get; set; } + /// <summary> + /// Gets the collection of type serializers that can be used to serialize arbitrary types. + /// </summary> + public XleTypeSerializerCollection TypeSerializers { get { return mTypeSerializers; } } /// <summary> /// Constructs the XleSerializer. Pass in the type of the object which is @@ -76,12 +81,11 @@ if (objectType.IsAssignableFrom(objectGraph.GetType()) == false) throw new ArgumentException("Object is not of type " + objectType.Name); - XleSerializationInfo info = new XleSerializationInfo(); + XleSerializationInfo info = new XleSerializationInfo(Binder, TypeSerializers); - info.Binder = Binder; info.BeginSerialize(objectGraph); - info.XmlDoc.Save(XmlWriter.Create(outStream)); + info.XmlDoc.Save(outStream); } @@ -94,9 +98,8 @@ { XDocument doc = XDocument.Load(XmlReader.Create(inStream)); - XleSerializationInfo info = new XleSerializationInfo(doc); + XleSerializationInfo info = new XleSerializationInfo(Binder, TypeSerializers, doc); - info.Binder = Binder; return info.BeginDeserialize(); } Copied: trunk/AgateLib/Serialization/Xle/XleTypeSerializerBase.cs (from rev 1406, trunk/AgateLib/Serialization/Xle/TypeSerializer.cs) =================================================================== --- trunk/AgateLib/Serialization/Xle/XleTypeSerializerBase.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/XleTypeSerializerBase.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Serialization.Xle +{ + /// <summary> + /// Provides an abstract base class which implements IXleTypeSerializer. + /// Slightly easier because it provides strongly typed methods. + /// </summary> + /// <typeparam name="T"></typeparam> + public abstract class XleTypeSerializerBase<T> : IXleTypeSerializer + { + void IXleTypeSerializer.Serialize(XleSerializationInfo info, object value) + { + Serialize(info, (T)value); + } + object IXleTypeSerializer.Deserialize(XleSerializationInfo info) + { + return Deserialize(info); + } + + /// <summary> + /// Override this to serialize an object. + /// </summary> + /// <param name="info"></param> + /// <param name="value"></param> + public abstract void Serialize(XleSerializationInfo info, T value); + /// <summary> + /// Override this to deserialize an object. + /// </summary> + /// <param name="info"></param> + /// <returns></returns> + public abstract T Deserialize(XleSerializationInfo info); + + public virtual IEnumerable<Type> AllowedTypes + { + get { yield return typeof(T); } + } + } +} Added: trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs (rev 0) +++ trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,78 @@ +using AgateLib.Serialization.Xle.TypeSerializers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Serialization.Xle +{ + public class XleTypeSerializerCollection + { + Dictionary<Type, IXleTypeSerializer> mInherited = new Dictionary<Type, IXleTypeSerializer>(); + Dictionary<Type, IXleTypeSerializer> mDirect = new Dictionary<Type, IXleTypeSerializer>(); + + public XleTypeSerializerCollection() + { + AddTypeSerializer(new PointSerializer()); + AddTypeSerializer(new PointFSerializer()); + AddTypeSerializer(new SizeSerializer()); + AddTypeSerializer(new SizeFSerializer()); + AddTypeSerializer(new RectangleSerializer()); + AddTypeSerializer(new RectangleFSerializer()); + } + + private void AddTypeSerializer(IXleTypeSerializer serializer, bool allowInherit = false) + { + int count = 0; + var dictionary = allowInherit ? mInherited : mDirect; + + + foreach(var type in serializer.AllowedTypes) + { + count++; + + dictionary.Add(type, serializer); + } + + if (count == 0) + throw new InvalidOperationException("The serializer doesn't serialize any types!"); + } + + /// <summary> + /// Adds a type serializer to the colleciton + /// </summary> + /// <param name="type">The type of object to be serialized</param> + /// <param name="serializer">The object which will perform the serialization</param> + /// <param name="allowInherit">Indicates whether this serializer will also be used to serialize types which inherit + /// from <c>type</c>.</param> + public void AddTypeSerializer(Type type, IXleTypeSerializer serializer, bool allowInherit = false) + { + var dictionary = allowInherit ? mInherited : mDirect; + + dictionary.Add(type, serializer); + } + + /// <summary> + /// Gets the type serializer to use for the specified type. + /// </summary> + /// <param name="type"></param> + /// <returns></returns> + public IXleTypeSerializer this[Type type] + { + get + { + if (mDirect.ContainsKey(type)) + return mDirect[type]; + + foreach (var supertype in mInherited.Keys) + { + if (supertype.IsAssignableFrom(type)) + return mInherited[supertype]; + } + + throw new ArgumentException("The specified type \"" + type.Name + "\" was not found, and there is no ancestor type serializer which can be used."); + } + } + } +} Modified: trunk/Tests/Tests.csproj =================================================================== --- trunk/Tests/Tests.csproj 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/Tests/Tests.csproj 2014-07-20 20:16:55 UTC (rev 1408) @@ -535,16 +535,6 @@ </None> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\AgateLib\AgateLib.csproj"> - <Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project> - <Name>AgateLib</Name> - </ProjectReference> - <ProjectReference Include="..\Drivers\AgateLib.WinForms\AgateLib.WinForms.csproj"> - <Project>{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}</Project> - <Name>AgateLib.WinForms</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> <None Include="Data\largeimage.png"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> @@ -576,6 +566,19 @@ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> + <ItemGroup> + <WCFMetadata Include="Service References\" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\AgateLib\AgateLib.csproj"> + <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> + <Name>AgateLib</Name> + </ProjectReference> + <ProjectReference Include="..\Drivers\AgateLib.WinForms\AgateLib.WinForms.csproj"> + <Project>{bef6d67b-4c84-4d3e-8047-6db2c8754d77}</Project> + <Name>AgateLib.WinForms</Name> + </ProjectReference> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <PreBuildEvent> Added: trunk/UnitTests/Serialization/Xle/Serializable.cs =================================================================== --- trunk/UnitTests/Serialization/Xle/Serializable.cs (rev 0) +++ trunk/UnitTests/Serialization/Xle/Serializable.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,61 @@ +using AgateLib.Geometry; +using AgateLib.Serialization.Xle; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.UnitTests.Serialization.Xle +{ + public class Serializable : IXleSerializable + { + public void WriteData(XleSerializationInfo info) + { + info.Write("Text", Text); + info.Write("Number", Number); + info.Write("Integer", Integer); + info.Write("Location", Location); + info.Write("LocationF", LocationF); + info.Write("Size", Size); + info.Write("SizeF", SizeF); + info.Write("Rect", Rect); + info.Write("RectF", RectF); + + info.Write("BoolArray", BoolArray); + info.Write("IntArray", IntArray); + info.Write("DoubleArray", DoubleArray); + } + + public void ReadData(XleSerializationInfo info) + { + Text = info.ReadString("Text"); + Number = info.ReadDouble("Number"); + Integer = info.ReadInt32("Integer"); + Location = info.ReadObject<Point>("Location"); + LocationF = info.ReadObject<PointF>("LocationF"); + Size = info.ReadObject<Size>("Size"); + SizeF = info.ReadObject<SizeF>("SizeF"); + Rect = info.ReadObject<Rectangle>("Rect"); + RectF = info.ReadObject<RectangleF>("RectF"); + + BoolArray = info.ReadArray<bool>("BoolArray"); + IntArray = info.ReadArray<int>("IntArray"); + DoubleArray = info.ReadArray<double>("DoubleArray"); + } + + public string Text { get; set; } + public double Number { get; set; } + public int Integer { get; set; } + public Point Location { get; set; } + public PointF LocationF { get; set; } + public Size Size { get; set; } + public SizeF SizeF { get; set; } + public Rectangle Rect { get; set; } + public RectangleF RectF { get; set; } + + public bool[] BoolArray { get; set; } + public int[] IntArray { get; set; } + public double[] DoubleArray { get; set; } + } +} Added: trunk/UnitTests/Serialization/Xle/XSTests.cs =================================================================== --- trunk/UnitTests/Serialization/Xle/XSTests.cs (rev 0) +++ trunk/UnitTests/Serialization/Xle/XSTests.cs 2014-07-20 20:16:55 UTC (rev 1408) @@ -0,0 +1,78 @@ +using AgateLib.Geometry; +using AgateLib.Serialization.Xle; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.UnitTests.Serialization.Xle +{ + [TestClass] + public class XSTests + { + private static Serializable RoundTrip(Serializable obj) + { + XleSerializer ser = new XleSerializer(obj.GetType()); + var memory = new MemoryStream(); + + ser.Serialize(memory, obj); + + string val = System.Text.Encoding.UTF8.GetString(memory.GetBuffer()); + + memory.Seek(0, SeekOrigin.Begin); + Serializable newobj = (Serializable)ser.Deserialize(memory); + return newobj; + } + + void AssertArrayEqual<T>(T[] expected, T[] actual) + { + Assert.AreEqual(expected.Length, actual.Length); + + for(int i = 0; i < expected.Length; i++) + { + Assert.AreEqual(expected[i], actual[i]); + } + } + + [TestMethod] + public void XSRoundTrip() + { + Serializable obj = new Serializable(); + + obj.Text = "This is a test"; + obj.Number = 88.990098; + obj.Integer = 4; + obj.Location = new Point(454, 33); + obj.LocationF = new PointF(383.4f, 44956.6f); + obj.Size = new Size(1001, 7437); + obj.SizeF = new SizeF(896.4f, 8887.3f); + obj.Rect = new Rectangle(34, 34, 34, 38); + obj.RectF = new RectangleF(1001.1f, 1002.2f, 1003.3f, 1004.4f); + + obj.BoolArray = new bool[] { true, false, true, true, false, true, false }; + obj.IntArray = new int[] { 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 8, 9, 10, -99 }; + obj.DoubleArray = new double[] { 3, 53.5, 1.888e-8, -3.8484e-32, 1.999e24 }; + + Serializable newobj = RoundTrip(obj); + + Assert.AreEqual(obj.Text, newobj.Text); + Assert.AreEqual(obj.Number, newobj.Number); + Assert.AreEqual(obj.Integer, newobj.Integer); + Assert.AreEqual(obj.Location, newobj.Location); + Assert.AreEqual(obj.LocationF, newobj.LocationF); + Assert.AreEqual(obj.Size, newobj.Size); + Assert.AreEqual(obj.SizeF, newobj.SizeF); + Assert.AreEqual(obj.Rect, newobj.Rect); + Assert.AreEqual(obj.RectF, newobj.RectF); + + AssertArrayEqual(obj.BoolArray, newobj.BoolArray); + AssertArrayEqual(obj.IntArray, newobj.IntArray); + AssertArrayEqual(obj.DoubleArray, newobj.DoubleArray); + + } + + } +} Modified: trunk/UnitTests/UnitTests.csproj =================================================================== --- trunk/UnitTests/UnitTests.csproj 2014-07-20 05:46:14 UTC (rev 1407) +++ trunk/UnitTests/UnitTests.csproj 2014-07-20 20:16:55 UTC (rev 1408) @@ -95,6 +95,8 @@ <Compile Include="Fakes\FakeReporter.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="PlatformTests.cs" /> + <Compile Include="Serialization\Xle\Serializable.cs" /> + <Compile Include="Serialization\Xle\XSTests.cs" /> <Compile Include="Utility\RefTest.cs" /> </ItemGroup> <ItemGroup> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-20 05:46:27
|
Revision: 1407 http://sourceforge.net/p/agate/code/1407 Author: kanato Date: 2014-07-20 05:46:14 +0000 (Sun, 20 Jul 2014) Log Message: ----------- Change target framework to 4.5.1 in everything. Modified Paths: -------------- trunk/AgateLib-Everything.sln trunk/Drivers/AgateDrawing/AgateDrawing.csproj trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs trunk/Drivers/AgateSDL/AgateSDL.csproj trunk/Drivers/AgateSDX/AgateSDX.csproj trunk/Examples/BallBuster.Net/BallBuster.Net.csproj trunk/Examples/BallBuster.Net/Properties/Resources.Designer.cs trunk/Examples/BallBuster.Net/Properties/Settings.Designer.cs trunk/Examples/BallBuster.Net/app.config trunk/Examples/ExampleUnitTests/ExampleUnitTests.csproj trunk/Examples/Pong/Pong.csproj trunk/Examples/Pong/Properties/Resources.Designer.cs trunk/Examples/Pong/Properties/Settings.Designer.cs trunk/Examples/Pong/app.config trunk/Examples/ShootTheTraps/ShootTheTraps.csproj trunk/Examples/ShootTheTraps/app.config trunk/IntegrationTests/IntegrationTests.csproj trunk/Tools/AgateDataLib/AgateDataLib.csproj trunk/Tools/DatabaseEditor/DatabaseEditor.csproj trunk/Tools/DatabaseEditor/Properties/Resources.Designer.cs trunk/Tools/DatabaseEditor/Properties/Settings.Designer.cs trunk/Tools/DatabaseEditor/app.config trunk/Tools/FontCreator/FontCreator.csproj trunk/Tools/FontCreator/Properties/Resources.Designer.cs trunk/Tools/FontCreator/Properties/Settings.Designer.cs trunk/Tools/FontCreator/app.config trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj trunk/Tools/NotebookLib/NotebookLib/Properties/Resources.Designer.cs trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj trunk/Tools/PackedSpriteCreator/Properties/Resources.Designer.cs trunk/Tools/PackedSpriteCreator/app.config trunk/Tools/ResourceEditor/Properties/Resources.Designer.cs trunk/Tools/ResourceEditor/ResourceEditor.csproj trunk/Tools/ResourceEditor/app.config trunk/UnitTests/UnitTests.csproj Modified: trunk/AgateLib-Everything.sln =================================================================== --- trunk/AgateLib-Everything.sln 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/AgateLib-Everything.sln 2014-07-20 05:46:14 UTC (rev 1407) @@ -51,8 +51,6 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleUnitTests", "Examples\ExampleUnitTests\ExampleUnitTests.csproj", "{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib-Portable", "AgateLib\AgateLib-Portable.csproj", "{DB2152AD-E467-40A2-94E8-EB3804863C71}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -560,27 +558,6 @@ {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Win32.ActiveCfg = Release|Any CPU {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x64.ActiveCfg = Release|Any CPU {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x86.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|Win32.ActiveCfg = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|x64.ActiveCfg = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Debug|x86.ActiveCfg = Debug|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Any CPU.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Any CPU.Build.0 = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Mixed Platforms.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Mixed Platforms.Build.0 = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|Win32.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|x64.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Public|x86.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Any CPU.Build.0 = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|Win32.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|x64.ActiveCfg = Release|Any CPU - {DB2152AD-E467-40A2-94E8-EB3804863C71}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/Drivers/AgateDrawing/AgateDrawing.csproj =================================================================== --- trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.30729</ProductVersion> @@ -14,7 +14,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>Library</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -40,6 +40,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <BaseAddress>285212672</BaseAddress> @@ -55,6 +56,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -66,6 +68,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>bin\x64\Release\</OutputPath> @@ -76,6 +79,7 @@ <PlatformTarget>x64</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -88,6 +92,7 @@ <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> <UseVSHostingProcess>true</UseVSHostingProcess> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\..\Binaries\Release\</OutputPath> @@ -98,6 +103,7 @@ <PlatformTarget>x86</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System"> Modified: trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj =================================================================== --- trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.30729</ProductVersion> @@ -14,7 +14,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>Library</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -40,6 +40,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <BaseAddress>285212672</BaseAddress> @@ -54,6 +55,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -65,6 +67,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>bin\x64\Release\</OutputPath> @@ -76,6 +79,7 @@ <PlatformTarget>x64</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -88,6 +92,7 @@ <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> <UseVSHostingProcess>true</UseVSHostingProcess> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\..\Binaries\Release\</OutputPath> @@ -99,6 +104,7 @@ <PlatformTarget>x86</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System"> @@ -121,12 +127,6 @@ </Reference> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\AgateLib\AgateLib.csproj"> - <Name>AgateLib</Name> - <Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project> - </ProjectReference> - </ItemGroup> - <ItemGroup> <Compile Include="AgateRenderTarget.cs"> <SubType>Component</SubType> </Compile> @@ -190,6 +190,12 @@ <ItemGroup> <None Include="packages.config" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\AgateLib\AgateLib.csproj"> + <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> + <Name>AgateLib</Name> + </ProjectReference> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> Modified: trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs =================================================================== --- trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/Drivers/AgateSDL/AgateSDL.csproj =================================================================== --- trunk/Drivers/AgateSDL/AgateSDL.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Drivers/AgateSDL/AgateSDL.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.21022</ProductVersion> @@ -14,7 +14,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>Library</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -41,6 +41,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> @@ -57,6 +58,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -69,6 +71,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>bin\x64\Release\</OutputPath> @@ -80,6 +83,7 @@ <PlatformTarget>x64</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -93,6 +97,7 @@ <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> <UseVSHostingProcess>true</UseVSHostingProcess> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\..\Binaries\Release\</OutputPath> @@ -104,6 +109,7 @@ <PlatformTarget>x86</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System"> Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj =================================================================== --- trunk/Drivers/AgateSDX/AgateSDX.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.21022</ProductVersion> @@ -16,7 +16,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>Library</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -48,6 +48,7 @@ <WarningLevel>4</WarningLevel> <NoWarn> </NoWarn> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <AllowUnsafeBlocks>True</AllowUnsafeBlocks> @@ -68,6 +69,7 @@ <WarningLevel>4</WarningLevel> <NoWarn> </NoWarn> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -77,6 +79,7 @@ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <FileAlignment>4096</FileAlignment> <PlatformTarget>x86</PlatformTarget> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\..\Binaries\Release\</OutputPath> @@ -86,6 +89,7 @@ <Optimize>true</Optimize> <FileAlignment>4096</FileAlignment> <PlatformTarget>x86</PlatformTarget> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -95,6 +99,7 @@ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <FileAlignment>4096</FileAlignment> <PlatformTarget>x64</PlatformTarget> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>..\..\Binaries\Release\</OutputPath> @@ -104,6 +109,7 @@ <Optimize>true</Optimize> <FileAlignment>4096</FileAlignment> <PlatformTarget>x64</PlatformTarget> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="SlimDX, Version=2.0.13.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86" /> Modified: trunk/Examples/BallBuster.Net/BallBuster.Net.csproj =================================================================== --- trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -30,7 +30,7 @@ <IsWebBootstrapper>false</IsWebBootstrapper> <UseApplicationTrust>false</UseApplicationTrust> <BootstrapperEnabled>true</BootstrapperEnabled> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -41,6 +41,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -49,6 +50,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <DebugSymbols>true</DebugSymbols> @@ -58,6 +60,7 @@ <PlatformTarget>x64</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <OutputPath>out\</OutputPath> @@ -68,6 +71,7 @@ <ErrorReport>prompt</ErrorReport> <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets> <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <DebugSymbols>true</DebugSymbols> @@ -77,6 +81,7 @@ <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <OutputPath>out\</OutputPath> @@ -85,6 +90,7 @@ <DebugType>pdbonly</DebugType> <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System" /> Modified: trunk/Examples/BallBuster.Net/Properties/Resources.Designer.cs =================================================================== --- trunk/Examples/BallBuster.Net/Properties/Resources.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/BallBuster.Net/Properties/Resources.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18052 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/Examples/BallBuster.Net/Properties/Settings.Designer.cs =================================================================== --- trunk/Examples/BallBuster.Net/Properties/Settings.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/BallBuster.Net/Properties/Settings.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18052 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); Modified: trunk/Examples/BallBuster.Net/app.config =================================================================== --- trunk/Examples/BallBuster.Net/app.config 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/BallBuster.Net/app.config 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,3 +1,3 @@ <?xml version="1.0"?> <configuration> -<startup><supportedRuntime version="v2.0.50727"/></startup></configuration> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration> Modified: trunk/Examples/ExampleUnitTests/ExampleUnitTests.csproj =================================================================== --- trunk/Examples/ExampleUnitTests/ExampleUnitTests.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/ExampleUnitTests/ExampleUnitTests.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -8,7 +8,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>ExampleUnitTests</RootNamespace> <AssemblyName>ExampleUnitTests</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> @@ -16,6 +16,7 @@ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> <IsCodedUITest>False</IsCodedUITest> <TestProjectType>UnitTest</TestProjectType> + <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> Modified: trunk/Examples/Pong/Pong.csproj =================================================================== --- trunk/Examples/Pong/Pong.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/Pong/Pong.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -15,7 +15,7 @@ <OldToolsVersion>3.5</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -26,6 +26,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -34,6 +35,7 @@ <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <DebugSymbols>true</DebugSymbols> @@ -45,6 +47,7 @@ <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets> <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <OutputPath>bin\x64\Release\</OutputPath> @@ -56,6 +59,7 @@ <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets> <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <DebugSymbols>true</DebugSymbols> @@ -65,6 +69,7 @@ <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <OutputPath>bin\x86\Release\</OutputPath> @@ -74,6 +79,7 @@ <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System" /> Modified: trunk/Examples/Pong/Properties/Resources.Designer.cs =================================================================== --- trunk/Examples/Pong/Properties/Resources.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/Pong/Properties/Resources.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/Examples/Pong/Properties/Settings.Designer.cs =================================================================== --- trunk/Examples/Pong/Properties/Settings.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/Pong/Properties/Settings.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); Modified: trunk/Examples/Pong/app.config =================================================================== --- trunk/Examples/Pong/app.config 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/Pong/app.config 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,3 +1,3 @@ <?xml version="1.0"?> <configuration> -<startup><supportedRuntime version="v2.0.50727"/></startup></configuration> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration> Modified: trunk/Examples/ShootTheTraps/ShootTheTraps.csproj =================================================================== --- trunk/Examples/ShootTheTraps/ShootTheTraps.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/ShootTheTraps/ShootTheTraps.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -15,7 +15,7 @@ <OldToolsVersion>3.5</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -26,6 +26,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -34,6 +35,7 @@ <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <DebugSymbols>true</DebugSymbols> @@ -45,6 +47,7 @@ <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets> <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <OutputPath>bin\x64\Release\</OutputPath> @@ -53,6 +56,7 @@ <DebugType>pdbonly</DebugType> <PlatformTarget>x64</PlatformTarget> <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <DebugSymbols>true</DebugSymbols> @@ -63,6 +67,7 @@ <ErrorReport>prompt</ErrorReport> <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules> <UseVSHostingProcess>false</UseVSHostingProcess> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <OutputPath>bin\x86\Release\</OutputPath> @@ -71,6 +76,7 @@ <DebugType>pdbonly</DebugType> <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System" /> Modified: trunk/Examples/ShootTheTraps/app.config =================================================================== --- trunk/Examples/ShootTheTraps/app.config 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Examples/ShootTheTraps/app.config 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,3 +1,3 @@ <?xml version="1.0"?> <configuration> -<startup><supportedRuntime version="v2.0.50727"/></startup></configuration> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration> Modified: trunk/IntegrationTests/IntegrationTests.csproj =================================================================== --- trunk/IntegrationTests/IntegrationTests.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/IntegrationTests/IntegrationTests.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -8,7 +8,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>IntegrationTests</RootNamespace> <AssemblyName>IntegrationTests</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> @@ -16,8 +16,8 @@ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> <IsCodedUITest>False</IsCodedUITest> <TestProjectType>UnitTest</TestProjectType> + <TargetFrameworkProfile /> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> Modified: trunk/Tools/AgateDataLib/AgateDataLib.csproj =================================================================== --- trunk/Tools/AgateDataLib/AgateDataLib.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/AgateDataLib/AgateDataLib.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -10,7 +10,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>DataLib</RootNamespace> <AssemblyName>DataLib</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <FileUpgradeFlags> </FileUpgradeFlags> @@ -26,6 +26,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -34,6 +35,7 @@ <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -44,6 +46,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>bin\x64\Release\</OutputPath> @@ -53,6 +56,7 @@ <PlatformTarget>x64</PlatformTarget> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -63,6 +67,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>bin\x86\Release\</OutputPath> @@ -72,6 +77,7 @@ <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System" /> Modified: trunk/Tools/DatabaseEditor/DatabaseEditor.csproj =================================================================== --- trunk/Tools/DatabaseEditor/DatabaseEditor.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/DatabaseEditor/DatabaseEditor.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -10,7 +10,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>AgateDatabaseEditor</RootNamespace> <AssemblyName>DatabaseEditor</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <FileUpgradeFlags> </FileUpgradeFlags> @@ -26,6 +26,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -34,6 +35,7 @@ <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -44,6 +46,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>bin\x64\Release\</OutputPath> @@ -53,6 +56,7 @@ <PlatformTarget>x64</PlatformTarget> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -63,6 +67,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>bin\x86\Release\</OutputPath> @@ -72,6 +77,7 @@ <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System" /> Modified: trunk/Tools/DatabaseEditor/Properties/Resources.Designer.cs =================================================================== --- trunk/Tools/DatabaseEditor/Properties/Resources.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/DatabaseEditor/Properties/Resources.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/Tools/DatabaseEditor/Properties/Settings.Designer.cs =================================================================== --- trunk/Tools/DatabaseEditor/Properties/Settings.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/DatabaseEditor/Properties/Settings.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); Modified: trunk/Tools/DatabaseEditor/app.config =================================================================== --- trunk/Tools/DatabaseEditor/app.config 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/DatabaseEditor/app.config 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,3 +1,3 @@ <?xml version="1.0"?> <configuration> -<startup><supportedRuntime version="v2.0.50727"/></startup></configuration> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration> Modified: trunk/Tools/FontCreator/FontCreator.csproj =================================================================== --- trunk/Tools/FontCreator/FontCreator.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/FontCreator/FontCreator.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.21022</ProductVersion> @@ -14,7 +14,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>WinExe</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -40,6 +40,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <BaseAddress>285212672</BaseAddress> @@ -55,6 +56,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -66,6 +68,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>..\..\Binaries\Debug\FontCreator\</OutputPath> @@ -76,6 +79,7 @@ <PlatformTarget>x64</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -87,6 +91,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\..\Binaries\Debug\FontCreator\</OutputPath> @@ -97,6 +102,7 @@ <PlatformTarget>x86</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System"> Modified: trunk/Tools/FontCreator/Properties/Resources.Designer.cs =================================================================== --- trunk/Tools/FontCreator/Properties/Resources.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/FontCreator/Properties/Resources.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/Tools/FontCreator/Properties/Settings.Designer.cs =================================================================== --- trunk/Tools/FontCreator/Properties/Settings.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/FontCreator/Properties/Settings.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); Modified: trunk/Tools/FontCreator/app.config =================================================================== --- trunk/Tools/FontCreator/app.config 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/FontCreator/app.config 2014-07-20 05:46:14 UTC (rev 1407) @@ -12,4 +12,4 @@ </setting> </FontCreator.Properties.Settings> </userSettings> -<startup><supportedRuntime version="v2.0.50727"/></startup></configuration> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration> Modified: trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj =================================================================== --- trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.21022</ProductVersion> @@ -14,7 +14,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>Library</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -40,6 +40,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <BaseAddress>285212672</BaseAddress> @@ -55,6 +56,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -66,6 +68,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>..\..\..\Binaries\Debug\Libraries\</OutputPath> @@ -76,6 +79,7 @@ <PlatformTarget>x64</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -87,6 +91,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\..\..\Binaries\Debug\Libraries\</OutputPath> @@ -97,6 +102,7 @@ <PlatformTarget>x86</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System"> Modified: trunk/Tools/NotebookLib/NotebookLib/Properties/Resources.Designer.cs =================================================================== --- trunk/Tools/NotebookLib/NotebookLib/Properties/Resources.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/NotebookLib/NotebookLib/Properties/Resources.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj =================================================================== --- trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.21022</ProductVersion> @@ -14,7 +14,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>WinExe</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -40,6 +40,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <BaseAddress>285212672</BaseAddress> @@ -55,6 +56,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -66,6 +68,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>..\..\Binaries\Debug\PackedSpriteCreator\</OutputPath> @@ -76,6 +79,7 @@ <PlatformTarget>x64</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -87,6 +91,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\..\Binaries\Debug\PackedSpriteCreator\</OutputPath> @@ -97,6 +102,7 @@ <PlatformTarget>x86</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System"> Modified: trunk/Tools/PackedSpriteCreator/Properties/Resources.Designer.cs =================================================================== --- trunk/Tools/PackedSpriteCreator/Properties/Resources.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/PackedSpriteCreator/Properties/Resources.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/Tools/PackedSpriteCreator/app.config =================================================================== --- trunk/Tools/PackedSpriteCreator/app.config 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/PackedSpriteCreator/app.config 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,3 +1,3 @@ <?xml version="1.0"?> <configuration> -<startup><supportedRuntime version="v2.0.50727"/></startup></configuration> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration> Modified: trunk/Tools/ResourceEditor/Properties/Resources.Designer.cs =================================================================== --- trunk/Tools/ResourceEditor/Properties/Resources.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/ResourceEditor/Properties/Resources.Designer.cs 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/Tools/ResourceEditor/ResourceEditor.csproj =================================================================== --- trunk/Tools/ResourceEditor/ResourceEditor.csproj 2014-07-20 05:34:38 UTC (rev 1406) +++ trunk/Tools/ResourceEditor/ResourceEditor.csproj 2014-07-20 05:46:14 UTC (rev 1407) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.21022</ProductVersion> @@ -14,7 +14,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>WinExe</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -40,6 +40,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <BaseAddress>285212672</BaseAddress> @@ -55,6 +56,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -66,6 +68,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>..\..\Binaries\Debug\ResourceEditor\</OutputPath> @@ -76,6 +79,7 @@ <PlatformTarget>x64</Platfor... [truncated message content] |
From: <ka...@us...> - 2014-07-20 05:34:41
|
Revision: 1406 http://sourceforge.net/p/agate/code/1406 Author: kanato Date: 2014-07-20 05:34:38 +0000 (Sun, 20 Jul 2014) Log Message: ----------- Initial refactorings to converter AgateLib to a portable library. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/BitmapFont/BitmapFontImpl.cs trunk/AgateLib/BitmapFont/FontMetrics.cs trunk/AgateLib/BitmapFont/GlyphMetrics.cs trunk/AgateLib/Data/AgateColumn.cs trunk/AgateLib/DisplayLib/FontState.cs trunk/AgateLib/DisplayLib/PixelBuffer.cs trunk/AgateLib/Geometry/Point.cs trunk/AgateLib/Geometry/Rectangle.cs trunk/AgateLib/Geometry/RectangleF.cs trunk/AgateLib/Geometry/Size.cs trunk/AgateLib/Geometry/SizeF.cs trunk/AgateLib/InputLib/Keyboard.cs trunk/AgateLib/InternalResources/DataResources.Designer.cs trunk/AgateLib/Platform.cs trunk/AgateLib/Properties/AssemblyInfo.cs trunk/AgateLib/Resources/AgateResource.cs trunk/AgateLib/Resources/AgateResourceLoader.cs trunk/AgateLib/Resources/BitmapFontResource.cs trunk/AgateLib/Resources/DisplayWindowResource.cs trunk/AgateLib/Resources/ImageResource.cs trunk/AgateLib/Resources/SpriteResource.cs trunk/AgateLib/Resources/StringTable.cs trunk/AgateLib/Resources/SurfaceResource.cs trunk/AgateLib/Resources/XmlHelper.cs trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs trunk/AgateLib/Serialization/Xle/XleSerializer.cs trunk/AgateLib/Settings/PersistantSettings.cs trunk/AgateLib-Everything.sln trunk/AgateLib-Windows.sln trunk/Drivers/AgateOTK/AgateOTK.csproj trunk/Drivers/AgateOTK/GL3/Shaders/ShaderSources.Designer.cs trunk/Tests/Tests.csproj trunk/Tests/app.config trunk/Tests/settings_list.txt Added Paths: ----------- trunk/AgateLib/AgateLib-Portable.csproj trunk/AgateLib/Serialization/Xle/TypeSerializer.cs Removed Paths: ------------- trunk/Drivers/AgateFMOD/ trunk/Drivers/OldCode/ Added: trunk/AgateLib/AgateLib-Portable.csproj =================================================================== --- trunk/AgateLib/AgateLib-Portable.csproj (rev 0) +++ trunk/AgateLib/AgateLib-Portable.csproj 2014-07-20 05:34:38 UTC (rev 1406) @@ -0,0 +1,499 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{DB2152AD-E467-40A2-94E8-EB3804863C71}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AgateLib</RootNamespace> + <AssemblyName>AgateLib</AssemblyName> + <DefaultLanguage>en-US</DefaultLanguage> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <TargetFrameworkProfile>Profile344</TargetFrameworkProfile> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <RunCodeAnalysis>false</RunCodeAnalysis> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <!-- A reference to the entire .NET Framework is automatically included --> + <Folder Include="Serialization\Xle\" /> + </ItemGroup> + <ItemGroup> + <Compile Include="AgateConsole.cs" /> + <Compile Include="AgateException.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AgateFileProvider.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AgateGame.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AgateSetup.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AppInitParameters.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioLib\AudioCapsInfo.cs" /> + <Compile Include="AudioLib\ImplementationBase\MusicImpl.cs" /> + <Compile Include="AudioLib\ImplementationBase\SoundBufferImpl.cs" /> + <Compile Include="AudioLib\ImplementationBase\SoundBufferSessionImpl.cs" /> + <Compile Include="AudioLib\ImplementationBase\StreamingSoundBufferImpl.cs" /> + <Compile Include="AudioLib\SoundFormat.cs" /> + <Compile Include="AudioLib\StreamingSoundBuffer.cs" /> + <Compile Include="Core.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Data\AgateDatabaseException.cs" /> + <Compile Include="Data\AgateColumn.cs" /> + <Compile Include="Data\AgateDatabase.cs" /> + <Compile Include="Data\AgateRow.cs" /> + <Compile Include="Data\AgateTable.cs" /> + <Compile Include="Data\AgateColumnDictionary.cs" /> + <Compile Include="Data\AgateDataHelper.cs" /> + <Compile Include="Data\FieldType.cs" /> + <Compile Include="Data\AgateRowList.cs" /> + <Compile Include="Data\AgateTableDictionary.cs" /> + <Compile Include="DisplayLib\FrameBuffer.cs" /> + <Compile Include="DisplayLib\IFrameBuffer.cs" /> + <Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" /> + <Compile Include="DisplayLib\Shaders\AgateShaderCompileException.cs" /> + <Compile Include="DisplayLib\Shaders\Basic2DShader.cs" /> + <Compile Include="DisplayLib\Shaders\AgateShader.cs" /> + <Compile Include="DisplayLib\Shaders\Implementation\AgateInternalShader.cs" /> + <Compile Include="DisplayLib\Shaders\Implementation\AgateShaderImpl.cs" /> + <Compile Include="DisplayLib\Shaders\Implementation\Basic2DImpl.cs" /> + <Compile Include="DisplayLib\Shaders\Implementation\BuiltInShader.cs" /> + <Compile Include="DisplayLib\Shaders\Implementation\Lighting2DImpl.cs" /> + <Compile Include="DisplayLib\Shaders\Implementation\Lighting3DImpl.cs" /> + <Compile Include="DisplayLib\Shaders\Lighting2D.cs" /> + <Compile Include="DisplayLib\Shaders\Lighting3D.cs" /> + <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> + <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> + <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" /> + <Compile Include="ICommandProcessor.cs" /> + <Compile Include="IFileProvider.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ImplementationBase\FrameBufferImpl.cs" /> + <Compile Include="InputLib\Delegates.cs" /> + <Compile Include="InputLib\HatState.cs" /> + <Compile Include="InputLib\JoystickEventArgs.cs" /> + <Compile Include="Platform.cs" /> + <Compile Include="PlatformType.cs" /> + <Compile Include="Resources\ImageResource.cs" /> + <Compile Include="Settings\SettingsGroup.cs" /> + <Compile Include="Timing.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioLib\Audio.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioLib\Music.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioLib\SoundBuffer.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioLib\SoundBufferSession.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="BitmapFont\BitmapFontImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="BitmapFont\BitmapFontOptions.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="BitmapFont\FontMetrics.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="BitmapFont\GlyphMetrics.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\CreateWindowParams.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Display.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\DisplayCapsInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\DisplayWindow.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\FontState.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\FontSurface.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\IndexBuffer.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ISurface.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Origin.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\OriginAlignment.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\PixelBuffer.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\PixelFormat.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\PrimitiveType.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\RenderStateAdapter.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ScreenMode.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\StringTransformer.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Surface.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\SurfaceState.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\TextLayout.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\VertexBuffer.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Cache\FontStateCache.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Cache\SurfaceStateCache.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Shaders\Implementation\Effect.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Shaders\Implementation\ShaderCompiler.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Shaders\Implementation\ShaderLanguage.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Shaders\Implementation\ShaderProgram.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Shaders\Implementation\Technique.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\Shaders\Implementation\UniformState.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\AgateDriverInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\AgateDriverReporter.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\AgateSandBoxLoader.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\DriverImplBase.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\IDesktopDriver.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\IUserSetSystems.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\NullInputImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\NullSoundImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\Registrar.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Drivers\TypeID.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Color.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Gradient.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Matrix4x4.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Point.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\PointF.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Rectangle.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\RectangleF.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Size.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\SizeF.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Vector2.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Vector3.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Vector4.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Builders\Cube.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\Builders\Terrain.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\VertexTypes\PositionColor.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\VertexTypes\PositionTextureColor.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\VertexTypes\PositionTextureNormal.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\VertexTypes\PositionTextureNormalTangent.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\VertexTypes\PositionTextureNTB.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Geometry\VertexTypes\VertexLayout.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioLib\ImplementationBase\AudioImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ImplementationBase\DisplayImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ImplementationBase\DisplayWindowImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ImplementationBase\FontSurfaceImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ImplementationBase\IndexBufferImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\ImplementationBase\InputImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\ImplementationBase\JoystickImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ImplementationBase\ShaderCompilerImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ImplementationBase\SurfaceImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayLib\ImplementationBase\VertexBufferImpl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\InputEventArgs.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\Joystick.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\JoystickInput.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\Keyboard.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\KeyCode.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\KeyModifiers.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputLib\Mouse.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InternalResources\Data.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InternalResources\DataResources.Designer.cs"> + <DependentUpon>DataResources.resx</DependentUpon> + <SubType>Code</SubType> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + </Compile> + <Compile Include="Meshes\Loaders\OBJFileRepresentation.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Meshes\Loaders\ObjFile\OBJFileRepresentation.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Meshes\Loaders\ObjFile\Parser.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Meshes\Loaders\ObjFile\TokenTypes.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Particle.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\ParticleEmitter.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Emitters\PixelEmitter.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Emitters\SpriteEmitter.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Emitters\SurfaceEmitter.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Manipulators\FadeOutManipulator.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Manipulators\GravityManipulator.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Manipulators\GravityPointManipulator.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Particles\PixelParticle.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Particles\SpriteParticle.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Particles\Particles\SurfaceParticle.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\AgateResource.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\AgateResourceCollection.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\AgateResourceException.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\AgateResourceLoader.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\BitmapFontResource.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\DisplayWindowResource.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\SpriteResource.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\StringTable.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\SurfaceResource.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Resources\XmlHelper.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Sprites\FrameList.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Sprites\IFrameList.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Sprites\ISprite.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Sprites\ISpriteFrame.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Sprites\Sprite.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Sprites\SpriteFrame.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Utility\FileProviderList.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Utility\FileSystemProvider.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Settings\PersistantSettings.cs" /> + <Compile Include="Utility\Ref.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Utility\SurfacePacker.cs"> + <SubType>Code</SubType> + </Compile> + <EmbeddedResource Include="InternalResources\DataResources.resx"> + <SubType>Designer</SubType> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>DataResources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <Compile Include="DisplayLib\Shaders\IShader2D.cs" /> + <Compile Include="Settings\ISettingsTracer.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="InternalResources\agate-black-gui.zip" /> + <None Include="InternalResources\Fonts.zip" /> + <None Include="InternalResources\images.tar.gz" /> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/AgateLib.csproj 2014-07-20 05:34:38 UTC (rev 1406) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>9.0.21022</ProductVersion> @@ -14,7 +14,7 @@ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <OutputType>Library</OutputType> <AppDesignerFolder> </AppDesignerFolder> @@ -41,6 +41,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> @@ -56,6 +57,7 @@ <RemoveIntegerChecks>False</RemoveIntegerChecks> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> @@ -68,6 +70,7 @@ <DebugType>full</DebugType> <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>bin\x64\Release\</OutputPath> @@ -80,6 +83,7 @@ <PlatformTarget>x64</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> @@ -93,6 +97,7 @@ <WarningLevel>4</WarningLevel> <Optimize>false</Optimize> <UseVSHostingProcess>true</UseVSHostingProcess> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <OutputPath>..\Binaries\Release\</OutputPath> @@ -105,6 +110,7 @@ <PlatformTarget>x86</PlatformTarget> <DebugType>none</DebugType> <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System"> @@ -114,9 +120,8 @@ <Name>System.Core</Name> </Reference> <Reference Include="System.Data" /> - <Reference Include="System.Xml"> - <Name>System.Xml</Name> - </Reference> + <Reference Include="System.XML" /> + <Reference Include="System.Xml.Linq" /> </ItemGroup> <ItemGroup /> <ItemGroup> @@ -186,6 +191,7 @@ <Compile Include="Resources\ImageResource.cs" /> <Compile Include="Serialization\Xle\CompressionType.cs" /> <Compile Include="Serialization\Xle\NumericEncoding.cs" /> + <Compile Include="Serialization\Xle\TypeSerializer.cs" /> <Compile Include="Settings\SettingsGroup.cs" /> <Compile Include="Timing.cs"> <SubType>Code</SubType> Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs =================================================================== --- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -106,7 +106,7 @@ public BitmapFontImpl(Surface surface, FontMetrics fontMetrics, string name) { FontName = name; - mFontMetrics = (FontMetrics)((ICloneable)fontMetrics).Clone(); + mFontMetrics = fontMetrics.Clone(); float maxHeight = 0; foreach (KeyValuePair<char, GlyphMetrics> kvp in mFontMetrics) Modified: trunk/AgateLib/BitmapFont/FontMetrics.cs =================================================================== --- trunk/AgateLib/BitmapFont/FontMetrics.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/BitmapFont/FontMetrics.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -28,7 +28,7 @@ /// FontMetrics is a class which describes everything needed to render a font /// from a bitmap image. /// </summary> - public sealed class FontMetrics : IDictionary<char, GlyphMetrics>, ICloneable + public sealed class FontMetrics : IDictionary<char, GlyphMetrics> { Dictionary<char, GlyphMetrics> mGlyphs = new Dictionary<char, GlyphMetrics>(); @@ -190,13 +190,5 @@ } #endregion - #region ICloneable Members - - object ICloneable.Clone() - { - return Clone(); - } - - #endregion } } \ No newline at end of file Modified: trunk/AgateLib/BitmapFont/GlyphMetrics.cs =================================================================== --- trunk/AgateLib/BitmapFont/GlyphMetrics.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/BitmapFont/GlyphMetrics.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -28,7 +28,7 @@ /// GlyphMetrics defines the metrics for a particular glyph in a font, including /// the rectangle of the glyph on the source image, overhang, and kerning pairs. /// </summary> - public sealed class GlyphMetrics : ICloneable + public sealed class GlyphMetrics { private Rectangle mSourceRect; @@ -139,13 +139,5 @@ return retval; } - #region ICloneable Members - - object ICloneable.Clone() - { - return Clone(); - } - - #endregion } } Modified: trunk/AgateLib/Data/AgateColumn.cs =================================================================== --- trunk/AgateLib/Data/AgateColumn.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Data/AgateColumn.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -103,7 +103,7 @@ /// auto increment field. If this is not an autoincrement /// field, the return value is undefined and meaningless. /// </summary> - [Browsable(false)] + public int NextAutoIncrementValue { get { return mNextAutoIncrementValue; } @@ -111,7 +111,7 @@ /// <summary> /// Gets the width of the column as displayed in the database editor. /// </summary> - [Browsable(false)] + public int ColumnWidth { get { return mColumnWidth; } @@ -121,7 +121,7 @@ /// Gets or sets the display index of this column. /// When saved, columns are sorted by their display index. /// </summary> - [Browsable(false)] + public int DisplayIndex { get; set; } /// <summary> @@ -165,7 +165,7 @@ /// Gets the actual Type object that corresponds to the /// FieldType enum. /// </summary> - [Browsable(false)] + public Type FieldTypeDataType { get Modified: trunk/AgateLib/DisplayLib/FontState.cs =================================================================== --- trunk/AgateLib/DisplayLib/FontState.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/DisplayLib/FontState.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -28,7 +28,7 @@ /// <summary> /// Class which represents the state information used to draw texdt on the screen. /// </summary> - public class FontState : ICloneable + public class FontState { private OriginAlignment mAlignment = OriginAlignment.TopLeft; private Color mColor = Color.White; @@ -187,11 +187,6 @@ return retval; } - object ICloneable.Clone() - { - return Clone(); - } - #endregion } Modified: trunk/AgateLib/DisplayLib/PixelBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -30,8 +30,7 @@ /// Class which encapsulates raw pixel data. This can be used to /// construct or modify surface data programmatically. /// </summary> - [Serializable] - public sealed class PixelBuffer : ICloneable + public sealed class PixelBuffer { #region --- Private Data --- @@ -1103,15 +1102,7 @@ } #endregion - #region --- ICloneable Members --- - object ICloneable.Clone() - { - return Clone(); - } - - #endregion - #region --- Normal Map conversion routines --- /// <summary> Modified: trunk/AgateLib/Geometry/Point.cs =================================================================== --- trunk/AgateLib/Geometry/Point.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Geometry/Point.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -98,7 +98,7 @@ /// <summary> /// Returns true if X and Y are zero. /// </summary> - [Browsable(false)] + public bool IsEmpty { get { return x == 0 && y == 0; } Modified: trunk/AgateLib/Geometry/Rectangle.cs =================================================================== --- trunk/AgateLib/Geometry/Rectangle.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Geometry/Rectangle.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -123,7 +123,7 @@ /// <summary> /// Gets bottom. /// </summary> - [Browsable(false)] + public int Bottom { get { return pt.Y + sz.Height; } @@ -131,7 +131,7 @@ /// <summary> /// Gets left. /// </summary> - [Browsable(false)] + public int Left { get { return pt.X; } @@ -139,7 +139,7 @@ /// <summary> /// Gets top. /// </summary> - [Browsable(false)] + public int Top { get { return pt.Y; } @@ -147,7 +147,7 @@ /// <summary> /// Gets right. /// </summary> - [Browsable(false)] + public int Right { get { return pt.X + sz.Width; } @@ -155,7 +155,7 @@ /// <summary> /// Gets or sets top-left point. /// </summary> - [Browsable(false)] + public Point Location { get { return pt; } @@ -164,7 +164,7 @@ /// <summary> /// Gets or sets size. /// </summary> - [Browsable(false)] + public Size Size { get { return sz; } @@ -256,7 +256,7 @@ /// <summary> /// True if this is (0,0,0,0). /// </summary> - [Browsable(false)] + public bool IsEmpty { get { return pt.IsEmpty && sz.IsEmpty; } Modified: trunk/AgateLib/Geometry/RectangleF.cs =================================================================== --- trunk/AgateLib/Geometry/RectangleF.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Geometry/RectangleF.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -122,7 +122,7 @@ /// <summary> /// Gets bottom. /// </summary> - [Browsable(false)] + public float Bottom { get { return pt.Y + sz.Height; } @@ -130,7 +130,7 @@ /// <summary> /// Gets left. /// </summary> - [Browsable(false)] + public float Left { get { return pt.X; } @@ -138,7 +138,7 @@ /// <summary> /// Gets top. /// </summary> - [Browsable(false)] + public float Top { get { return pt.Y; } @@ -146,7 +146,7 @@ /// <summary> /// Gets right. /// </summary> - [Browsable(false)] + public float Right { get { return pt.X + sz.Width; } @@ -154,7 +154,7 @@ /// <summary> /// Gets or sets top-left PointF. /// </summary> - [Browsable(false)] + public PointF Location { get { return pt; } @@ -163,7 +163,7 @@ /// <summary> /// Gets or sets SizeF. /// </summary> - [Browsable(false)] + public SizeF Size { get { return sz; } @@ -310,7 +310,7 @@ /// <summary> /// True if this is (0,0,0,0). /// </summary> - [Browsable(false)] + public bool IsEmpty { get { return pt.IsEmpty && sz.IsEmpty; } Modified: trunk/AgateLib/Geometry/Size.cs =================================================================== --- trunk/AgateLib/Geometry/Size.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Geometry/Size.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -88,7 +88,7 @@ /// <summary> /// Returns true if width and height are zero. /// </summary> - [Browsable(false)] + public bool IsEmpty { get { return width == 0 && height == 0; } Modified: trunk/AgateLib/Geometry/SizeF.cs =================================================================== --- trunk/AgateLib/Geometry/SizeF.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Geometry/SizeF.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -88,7 +88,7 @@ /// <summary> /// True if width and height are zero. /// </summary> - [Browsable(false)] + public bool IsEmpty { get { return width == 0 && height == 0; } Modified: trunk/AgateLib/InputLib/Keyboard.cs =================================================================== --- trunk/AgateLib/InputLib/Keyboard.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/InputLib/Keyboard.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -84,7 +84,7 @@ mKeyState[intID]++; mWaitForKeyUp[intID] = true; - //System.Diagnostics.Debug.Print("Set key {0} to {1}, repeat count {2}.", + //System.Diagnostics.Debug.WriteLine("Set key {0} to {1}, repeat count {2}.", // id, value, mKeyState[(int)id] - 1); Keyboard.OnKeyDown(id, @@ -115,7 +115,7 @@ { mKeyState[(int)id] = 0; mWaitForKeyUp[(int)id] = waitKeyUp; - //System.Diagnostics.Debug.Print("Set key {0} to {1}.", id, false); + //System.Diagnostics.Debug.WriteLine("Set key {0} to {1}.", id, false); Keyboard.OnKeyUp(id, new KeyModifiers(this[KeyCode.Alt], this[KeyCode.Control], this[KeyCode.Shift])); Modified: trunk/AgateLib/InternalResources/DataResources.Designer.cs =================================================================== --- trunk/AgateLib/InternalResources/DataResources.Designer.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/InternalResources/DataResources.Designer.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/AgateLib/Platform.cs =================================================================== --- trunk/AgateLib/Platform.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Platform.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -45,6 +45,7 @@ internal Platform() { + mType = DetectPlatformType(); mRuntime = DetectRuntime(); m64Bit = Detect64Bit(); @@ -58,10 +59,10 @@ Trace.Listeners.Add(new TextWriterTraceListener(Console.Out)); } - CheckOSVersion(); + //CheckOSVersion(); - if (mType == PlatformType.Windows) - mWindowsVersion = DetectWindowsVersion(); + //if (mType == PlatformType.Windows) + // mWindowsVersion = DetectWindowsVersion(); SetFolders(); @@ -86,23 +87,30 @@ } Trace.WriteLine("64-bit platform: " + m64Bit.ToString()); + } private bool Detect64Bit() { - int size = Marshal.SizeOf(typeof(IntPtr)); + unsafe + { + int size = sizeof(IntPtr); - switch (size) - { - case 4: return false; - case 8: return true; - default: - throw new AgateException(string.Format("Size of IntPtr is {0}.", size)); + switch (size) + { + case 4: return false; + case 8: return true; + default: + throw new AgateException(string.Format("Size of IntPtr is {0}.", size)); + } } } private bool HasWriteAccessToAppDirectory() { + return false; + /* + * TODO: Fix this!! // TODO: Maybe there is a better way to inspect permissions? // here we just try to write and see if we fail. string filename = Path.GetTempFileName(); @@ -111,7 +119,7 @@ { string targetFile = Path.Combine(mAppDir, Path.GetFileName(filename)); - using (var w = new StreamWriter(targetFile)) + using (var w = new StreamWriter( targetFile)) { w.WriteLine("x"); } @@ -122,7 +130,7 @@ catch { return false; - } + }*/ } internal void EnsureAppDataDirectoryExists() @@ -149,6 +157,7 @@ return null; } } + private void SetFolders() { Assembly entryPt = Assembly.GetEntryAssembly() ?? Assembly.GetCallingAssembly(); @@ -289,26 +298,24 @@ } - /// <summary> - /// Detects the unix kernel by p/invoking the uname call in libc. - /// </summary> - /// <returns></returns> + /// <summary> + /// Detects the unix kernel by p/invoking the uname call in libc. + /// </summary> + /// <returns></returns> private static string DetectUnixKernel() { - Debug.Print("Size: {0}", Marshal.SizeOf(typeof(utsname)).ToString()); + Debug.WriteLine("Size: {0}", Marshal.SizeOf(typeof(utsname)).ToString()); Debug.Flush(); utsname uts = new utsname(); uname(out uts); Debug.WriteLine("System:"); - Debug.Indent(); Debug.WriteLine(uts.sysname); Debug.WriteLine(uts.nodename); Debug.WriteLine(uts.release); Debug.WriteLine(uts.version); Debug.WriteLine(uts.machine); - Debug.Unindent(); return uts.sysname.ToString(); } @@ -323,15 +330,16 @@ { var version = System.Environment.OSVersion.Version; - Debug.Print("OS Version: {0}", System.Environment.OSVersion.VersionString); + + Debug.WriteLine("OS Version: {0}", System.Environment.OSVersion.VersionString); Debug.IndentLevel++; - Debug.Print("Major: {0}", version.Major); - Debug.Print("Major revision: {0}", version.MajorRevision); - Debug.Print("Minor: {0}", version.Minor); - Debug.Print("Minor revision: {0}", version.MinorRevision); - Debug.Print("Revision: {0}", version.Revision); - Debug.Print("Build: {0}", version.Build); - Debug.Print("Service Pack: {0}", System.Environment.OSVersion.ServicePack); + Debug.WriteLine("Major: {0}", version.Major); + Debug.WriteLine("Major revision: {0}", version.MajorRevision); + Debug.WriteLine("Minor: {0}", version.Minor); + Debug.WriteLine("Minor revision: {0}", version.MinorRevision); + Debug.WriteLine("Revision: {0}", version.Revision); + Debug.WriteLine("Build: {0}", version.Build); + Debug.WriteLine("Service Pack: {0}", System.Environment.OSVersion.ServicePack); Debug.IndentLevel--; } @@ -360,6 +368,7 @@ return retval; } - + + } } Modified: trunk/AgateLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/AgateLib/Properties/AssemblyInfo.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Properties/AssemblyInfo.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -37,14 +37,6 @@ [assembly: CLSCompliant(true)] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(true)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a671f4e2-e579-42b3-aae4-9beb962581ff")] - // Version information for an assembly consists of the following four values: // // Major Version Modified: trunk/AgateLib/Resources/AgateResource.cs =================================================================== --- trunk/AgateLib/Resources/AgateResource.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Resources/AgateResource.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -20,6 +20,7 @@ using System.Collections.Generic; using System.Text; using System.Xml; +using System.Xml.Linq; using System.Xml.Serialization; namespace AgateLib.Resources @@ -27,7 +28,7 @@ /// <summary> /// Class which represents a resource. /// </summary> - public abstract class AgateResource : ICloneable + public abstract class AgateResource { private string mName; private string mLanguage = "Default"; @@ -68,7 +69,7 @@ /// </summary> /// <param name="parent">The parent element of this resource.</param> /// <param name="doc">The XML document used to create elements.</param> - internal abstract void BuildNodes(XmlElement parent, XmlDocument doc); + internal abstract void BuildNodes(XElement parent); #region --- ICloneable Members --- @@ -78,10 +79,6 @@ /// <returns></returns> protected abstract AgateResource Clone(); - object ICloneable.Clone() - { - return Clone(); - } #endregion } Modified: trunk/AgateLib/Resources/AgateResourceLoader.cs =================================================================== --- trunk/AgateLib/Resources/AgateResourceLoader.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Resources/AgateResourceLoader.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -18,11 +18,13 @@ // using System; using System.Collections.Generic; +using System.Linq; using System.Text; using System.IO; using System.Xml; using AgateLib.Utility; using System.Diagnostics; +using System.Xml.Linq; namespace AgateLib.Resources { @@ -36,15 +38,15 @@ /// </summary> public static void SaveResources(AgateResourceCollection resources, string filename) { - XmlDocument doc = new XmlDocument(); - XmlElement root = doc.CreateElement("AgateResources"); - XmlHelper.AppendAttribute(root, doc, "Version", "1.0.0"); + XDocument doc = new XDocument(); + XElement root = new XElement("AgateResources", + new XAttribute("Version", "1.0.0")); - doc.AppendChild(root); + doc.Add(root); foreach (AgateResource res in resources) { - res.BuildNodes(root, doc); + res.BuildNodes(root); } doc.Save(filename); @@ -70,32 +72,30 @@ /// <param name="stream"></param> public static void LoadResources(AgateResourceCollection resources, Stream stream) { - XmlDocument doc = new XmlDocument(); + XDocument doc = new XDocument(); try { - doc.Load(stream); + doc = XDocument.Load(new StreamReader(stream)); } catch (XmlException e) { throw new AgateResourceException("The XML resource file is malformed.", e); } - XmlNode root; + XElement root; try { - root = doc.ChildNodes[0]; - if (root is XmlDeclaration) - root = doc.ChildNodes[1]; + root = doc.Elements().First(x => x is XDeclaration == false); } catch (XmlException e) { throw new AgateResourceException("Could not understand root XML element.", e); } - if (root.Attributes["Version"] == null) + if (root.Attribute("Version") == null) throw new AgateResourceException("XML resource file does not contain the required version attibute."); - string version = root.Attributes["Version"].Value; + string version = root.Attribute("Version").Value; switch (version) { @@ -114,14 +114,10 @@ } - private static void ReadVersion100(AgateResourceCollection resources, XmlNode root, string version) + private static void ReadVersion100(AgateResourceCollection resources, XElement root, string version) { - for (int i = 0; i < root.ChildNodes.Count; i++) + foreach (var node in root.Elements()) { - XmlNode node = root.ChildNodes[i]; - - if (node is XmlComment) continue; - try { resources.Add(ReadNode(node, version)); @@ -134,9 +130,9 @@ } } - private static AgateResource ReadNode(XmlNode node, string version) + private static AgateResource ReadNode(XElement node, string version) { - switch (node.Name) + switch (node.Name.LocalName) { case "StringTable": return new StringTable(node, version); @@ -147,7 +143,7 @@ case "Image": return new ImageResource(node, version); - case "Surface": + case "Surface": return new SurfaceResource(node, version); case "Sprite": @@ -168,7 +164,7 @@ throw new InvalidDataException(p); } else - Debug.Print(p); + Debug.WriteLine(p); } static bool mThrowOnReadError = true; Modified: trunk/AgateLib/Resources/BitmapFontResource.cs =================================================================== --- trunk/AgateLib/Resources/BitmapFontResource.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Resources/BitmapFontResource.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -22,6 +22,7 @@ using System.Xml; using AgateLib.BitmapFont; using AgateLib.Geometry; +using System.Xml.Linq; namespace AgateLib.Resources { @@ -40,13 +41,13 @@ public BitmapFontResource(string name) : base(name) { } - internal BitmapFontResource(XmlNode node, string version) + internal BitmapFontResource(XElement node, string version) : base(string.Empty) { switch (version) { case "0.3.2": - Name = node.Attributes["name"].Value; + Name = node.Attribute("name").Value; mImage = XmlHelper.ReadAttributeString(node, "image", string.Empty); ReadMetrics032(node); @@ -55,7 +56,7 @@ case "0.3.1": case "0.3.0": - Name = node.Attributes["name"].Value; + Name = node.Attribute("name").Value; mImage = XmlHelper.ReadAttributeString(node, "image", string.Empty); ReadMetrics030(node); @@ -68,12 +69,12 @@ } } - private void ReadMetrics032(XmlNode parent) + private void ReadMetrics032(XElement parent) { - XmlNode root = null; + XElement root = null; // find metrics node - foreach (XmlNode n in parent.ChildNodes) + foreach (XElement n in parent.Elements()) { if (n.Name == "Metrics") { @@ -86,14 +87,14 @@ throw new AgateResourceException(string.Format( "Could not find Metrics node in bitmap font resource {0}.", Name)); - foreach (XmlNode node in root.ChildNodes) + foreach (XElement node in root.Elements()) { if (node.Name == "Glyph") { GlyphMetrics glyph = new GlyphMetrics(); - char key = (char)int.Parse(node.Attributes["char"].Value); - glyph.SourceRect = Rectangle.Parse(node.Attributes["source"].Value); + char key = (char)int.Parse(node.Attribute("char").Value); + glyph.SourceRect = Rectangle.Parse(node.Attribute("source").Value); glyph.LeftOverhang = XmlHelper.ReadAttributeInt(node, "leftOverhang", 0); glyph.RightOverhang = XmlHelper.ReadAttributeInt(node, "rightOverhang", 0); @@ -116,12 +117,12 @@ } } - private void ReadMetrics030(XmlNode parent) + private void ReadMetrics030(XElement parent) { - XmlNode root = null; + XElement root = null; // find metrics node - foreach (XmlNode n in parent.ChildNodes) + foreach (XElement n in parent.Elements()) { if (n.Name == "Metrics") { @@ -134,16 +135,12 @@ throw new AgateResourceException(string.Format( "Could not find Metrics node in bitmap font resource {0}.", Name)); - foreach (XmlNode node in root.ChildNodes) + foreach (XElement node in root.Elements("Glyph")) { - if (node.Name != "Glyph") - throw new AgateResourceException(string.Format( - "Expected to find glyph node, but found {0} instead.", node.Name)); - GlyphMetrics glyph = new GlyphMetrics(); - char key = (char)int.Parse(node.Attributes["char"].Value); - glyph.SourceRect = Rectangle.Parse(node.Attributes["source"].Value); + char key = (char)int.Parse(node.Attribute("char").Value); + glyph.SourceRect = Rectangle.Parse(node.Attribute("source").Value); glyph.LeftOverhang = XmlHelper.ReadAttributeInt(node, "leftOverhang", 0); glyph.RightOverhang = XmlHelper.ReadAttributeInt(node, "rightOverhang", 0); @@ -152,46 +149,46 @@ } } - internal override void BuildNodes(XmlElement parent, XmlDocument doc) + internal override void BuildNodes(XElement parent) { - XmlNode root = doc.CreateElement("BitmapFont"); + XElement root = new XElement("BitmapFont"); - XmlHelper.AppendAttribute(root, doc, "name", Name); - XmlHelper.AppendAttribute(root, doc, "image", mImage); + root.Add(new XAttribute("name", Name)); + root.Add(new XAttribute("image", mImage)); - XmlNode metrics = doc.CreateElement("Metrics"); + XElement metrics = new XElement("Metrics"); foreach (char glyph in mMetrics.Keys) { - XmlNode current = doc.CreateElement("Glyph"); + XElement current = new XElement("Glyph"); GlyphMetrics glyphMetrics = mMetrics[glyph]; - XmlHelper.AppendAttribute(current, doc, "char", glyph); - XmlHelper.AppendAttribute(current, doc, "source", glyphMetrics.SourceRect.ToString()); + current.Add(new XAttribute("char", glyph)); + current.Add(new XAttribute("source", glyphMetrics.SourceRect.ToString())); if (glyphMetrics.LeftOverhang != 0) - XmlHelper.AppendAttribute(current, doc, "leftOverhang", glyphMetrics.LeftOverhang); + current.Add(new XAttribute("leftOverhang", glyphMetrics.LeftOverhang)); if (glyphMetrics.RightOverhang != 0) - XmlHelper.AppendAttribute(current, doc, "rightOverhang", glyphMetrics.RightOverhang); + current.Add(new XAttribute("rightOverhang", glyphMetrics.RightOverhang)); - metrics.AppendChild(current); + metrics.Add(current); } foreach (char glyph in mMetrics.Keys) { foreach (var kern in mMetrics[glyph].KerningPairs) { - XmlNode current = doc.CreateElement("Kerning"); + XElement current = new XElement("Kerning"); - XmlHelper.AppendAttribute(current, doc, "first", glyph); - XmlHelper.AppendAttribute(current, doc, "second", kern.Key); - XmlHelper.AppendAttribute(current, doc, "value", kern.Value); + current.Add(new XAttribute("first", glyph)); + current.Add(new XAttribute("second", kern.Key)); + current.Add(new XAttribute("value", kern.Value)); - metrics.AppendChild(current); + metrics.Add(current); } } - root.AppendChild(metrics); - parent.AppendChild(root); + root.Add(metrics); + parent.Add(root); } /// <summary> Modified: trunk/AgateLib/Resources/DisplayWindowResource.cs =================================================================== --- trunk/AgateLib/Resources/DisplayWindowResource.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Resources/DisplayWindowResource.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -21,6 +21,7 @@ using System.Text; using System.Xml; using AgateLib.Geometry; +using System.Xml.Linq; namespace AgateLib.Resources { @@ -105,7 +106,7 @@ : base(name) { } - internal DisplayWindowResource(XmlNode node, string version) + internal DisplayWindowResource(XElement node, string version) : base(string.Empty) { switch (version) @@ -113,7 +114,7 @@ case "0.3.2": case "0.3.1": case "0.3.0": - Name = node.Attributes["name"].Value; + Name = node.Attribute("name").Value; Size = XmlHelper.ReadAttributeSize(node, "preferred_size"); MinimumSize = XmlHelper.ReadAttributeSize(node, "minimum_size", Size.Empty); @@ -122,7 +123,7 @@ AllowResize = XmlHelper.ReadAttributeBool(node, "allow_resize", false); FullScreen = XmlHelper.ReadAttributeBool(node, "full_screen", false); - Title = node.InnerText.Trim(); + Title = node.Value.Trim(); break; @@ -133,21 +134,20 @@ } } - internal override void BuildNodes(System.Xml.XmlElement parent, System.Xml.XmlDocument doc) + internal override void BuildNodes(XElement parent) { - XmlElement el = doc.CreateElement("DisplayWindow"); + XElement el = new XElement("DisplayWindow", + new XAttribute("name", Name), + new XAttribute("preferred_size", Size.ToString()), + new XAttribute("minimum_size", MinimumSize.ToString()), + new XAttribute("maximum_size", MaximumSize.ToString()), + new XAttribute("allow_resize", AllowResize), + new XAttribute("full_screen", FullScreen), + new XAttribute("bpp", Bpp)); - XmlHelper.AppendAttribute(el, doc, "name", Name); - XmlHelper.AppendAttribute(el, doc, "preferred_size", Size.ToString()); - XmlHelper.AppendAttribute(el, doc, "minimum_size", MinimumSize.ToString()); - XmlHelper.AppendAttribute(el, doc, "maximum_size", MaximumSize.ToString()); - XmlHelper.AppendAttribute(el, doc, "allow_resize", AllowResize); - XmlHelper.AppendAttribute(el, doc, "full_screen", FullScreen); - XmlHelper.AppendAttribute(el, doc, "bpp", Bpp); + el.Value = Title; - el.InnerText = Title; - - parent.AppendChild(el); + parent.Add(el); } } Modified: trunk/AgateLib/Resources/ImageResource.cs =================================================================== --- trunk/AgateLib/Resources/ImageResource.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Resources/ImageResource.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -22,6 +22,7 @@ using System.Text; using System.Xml; using AgateLib.DisplayLib; +using System.Xml.Linq; namespace AgateLib.Resources { @@ -33,15 +34,15 @@ public ImageResource() { } - internal ImageResource(XmlNode node, string version) + internal ImageResource(XElement node, string version) { - if (node.Attributes["filename"] == null) + if (node.Attribute("filename") == null) throw new AgateResourceException("Image node did not include the required filename attribute."); switch (version) { case "0.3.2": - Filename = node.Attributes["filename"].Value; + Filename = node.Attribute("filename").Value; ReadSubNodes032(node); break; @@ -50,11 +51,11 @@ } } - private void ReadSubNodes032(XmlNode node) + private void ReadSubNodes032(XElement node) { - foreach (XmlNode n in node.ChildNodes) + foreach (XElement n in node.Elements()) { - switch (n.Name) + switch (n.Name.LocalName) { case "Surface": ReadSurface(n); @@ -71,19 +72,19 @@ } } - private void ReadSprite(XmlNode n) + private void ReadSprite(XElement n) { throw new NotImplementedException(); } - private void ReadSurface(XmlNode n) + private void ReadSurface(XElement n) { SurfaceResource res = new SurfaceResource(XmlHelper.ReadAttributeString(n, "name")); - if (n.Attributes["left"] != null || - n.Attributes["top"] != null || - n.Attributes["width"] != null || - n.Attributes["height"] != null) + if (n.Attribute("left") != null || + n.Attribute("top") != null || + n.Attribute("width") != null || + n.Attribute("height") != null) { res.SourceRect = new AgateLib.Geometry.Rectangle( XmlHelper.ReadAttributeInt(n, "left"), @@ -110,7 +111,7 @@ return mBackingSurface; } - internal override void BuildNodes(XmlElement parent, XmlDocument doc) + internal override void BuildNodes(XElement parent) { throw new NotImplementedException(); } Modified: trunk/AgateLib/Resources/SpriteResource.cs =================================================================== --- trunk/AgateLib/Resources/SpriteResource.cs 2014-07-20 01:12:48 UTC (rev 1405) +++ trunk/AgateLib/Resources/SpriteResource.cs 2014-07-20 05:34:38 UTC (rev 1406) @@ -24,6 +24,7 @@ using AgateLib.DisplayLib; using AgateLib.Geometry; using AgateLib.Sprites; +using System.Xml.Linq; namespace AgateLib.Resources { @@ -127,18 +128,18 @@ } - internal SpriteResource(XmlNode node, string version) + internal SpriteResource(XElement node, string version) : base(string.Empty) { switch (version) { case "0.3.2": case "0.3.1": - Name = node.Attributes["name"].Value; + Name = node.Attribute("name").Value; mFilename = XmlHelper.ReadAttributeString(node, "image", string.Empty); mPacked = XmlHelper.ReadAttributeBool(node, "packed", true); - if (node.Attributes["size"] != null) + if (node.Attribute("size") != null) { mSize = XmlHelper.ReadAttributeSize(node, "size"); mHasSize = true; @@ -158,11 +159,11 @@ break; case "0.3.0": - Name = node.Attributes["name"].Value; + Name = node.Attribute("name").Value; mFilename = XmlHelper.ReadAttributeString(node, "image", string.Empty); mPacked = XmlHelper.ReadAttributeBool(node, "packed", true); - if (node.Attributes["size"] != null) + if (node.Attribute("size") != null) { mSize = XmlHelper.ReadAttributeSize(node, "size"); mHasSize = true; @@ -183,9 +184,9 @@ } } - private void ReadFrames031(XmlNode node) + private void ReadFrames031(XElement node) { - foreach (XmlNode child in node.ChildNodes) + foreach (XElement child in node.Elements()) { if (child.Name == "Image") ReadImage031(child); @@ -197,41 +198,34 @@ } } - private void ReadFrames030(XmlNode node) + private void ReadFrames030(XElement node) { - foreach (XmlNode child in node.ChildNodes) + foreach (XElement child in node.Elements("Frame")) { - if (child.Name == "Frame") - ReadFrame030(child); - else - System.Diagnostics.Trace.WriteLine( - "Unrecognized node in Sprite " + Name + ": " + child.Name); + ReadFrame030(child); } } - private void ReadImage031(XmlNode node) + private void ReadImage031(XElement node) { SpriteImageResource image = new SpriteImageResource(); image.Filename = XmlHelper.ReadAttributeString(node, "file"); - for (int i = 0; i < node.ChildNodes.Count; i++) + foreach (var nd in node.Elements("Grid")) { - if (node.ChildNodes[i].Name == "Grid") - { - var g = new SpriteImageResource.Grid(); + var g = new SpriteImageResource.Grid(); - g.Location = XmlHelper.ReadAttributePoint(node.ChildNodes[i], "loc"); - g.Size = XmlHelper.ReadAttributeSize(node.ChildNodes[i], "size"); - g.Array = XmlHelper.ReadAttributeSize(node.ChildNodes[i], "array"); + g.Location = XmlHelper.ReadAttributePoint(nd, "loc"); + g.Size = XmlHelper.ReadAttributeSize(nd, "size"); + g.Array = XmlHelper.ReadAttributeSize(nd, "array"); - image.Grids.Add(g); - } + image.Grids.Add(g); } mImages.Add(image); } - private void ReadFrame030(XmlNode node) + private void ReadFrame030(XElement node) { SpriteFrameResource frame = new SpriteFrameResource(); @@ -257,57 +251,57 @@ mImages.Add(frame); } - internal override void BuildNodes(System.Xml.XmlElement parent, System.Xml.XmlDocument doc) + internal override void BuildNodes(XElement parent) { - XmlElement element = doc.CreateElement("Sprite"); + XElement element = new XElement("Sprite"); - XmlHelper.AppendAttribute(element, doc, "name", Name); - XmlHelper.AppendAttribute(element, doc, "image", Filename); - XmlHelper.AppendAttribute(element, doc, "timePerFrame", TimePerFrame); - XmlHelper.AppendAttribute(element, doc, "size", Size.ToString()); + element.Add(new XAttribute("name", Name)); + element.Add(new XAttribute("image", Filename)); + element.Add(new XAttribute("timePerFrame", TimePerFrame)); + element.Add(new XAttribute("size", Size.ToString())); for (int i = 0; i < ChildElements.Count; i++) { - BuildNodes(element, doc, ChildElements[i]); + BuildNodes(element, ChildElements[i]); } - parent.AppendChild(element); + parent.Add(element); } - internal void BuildNodes(XmlElement parent, XmlDocument doc, SpriteSubResource sub) + internal void BuildNodes(XElement ... [truncated message content] |
From: <ka...@us...> - 2014-07-20 01:12:59
|
Revision: 1405 http://sourceforge.net/p/agate/code/1405 Author: kanato Date: 2014-07-20 01:12:48 +0000 (Sun, 20 Jul 2014) Log Message: ----------- Revert previous rename. Added Paths: ----------- trunk/AgateLib/Drivers/ Removed Paths: ------------- trunk/AgateLib/DriversOld/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-20 01:09:47
|
Revision: 1404 http://sourceforge.net/p/agate/code/1404 Author: kanato Date: 2014-07-20 01:09:37 +0000 (Sun, 20 Jul 2014) Log Message: ----------- Rename obsolete driver folder. Added Paths: ----------- trunk/AgateLib/DriversOld/ Removed Paths: ------------- trunk/AgateLib/Drivers/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-20 01:05:31
|
Revision: 1403 http://sourceforge.net/p/agate/code/1403 Author: kanato Date: 2014-07-20 01:05:25 +0000 (Sun, 20 Jul 2014) Log Message: ----------- Update documentation. Modified Paths: -------------- trunk/Documentation/Doxyfile trunk/Documentation/Doxygen/footer.html Added Paths: ----------- trunk/Documentation/agatelogo.png Modified: trunk/Documentation/Doxyfile =================================================================== --- trunk/Documentation/Doxyfile 2014-07-19 01:58:21 UTC (rev 1402) +++ trunk/Documentation/Doxyfile 2014-07-20 01:05:25 UTC (rev 1403) @@ -1,11 +1,11 @@ -# Doxyfile 1.8.5 +# Doxyfile 1.8.7 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. -# +# # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. -# +# # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.3.5.0 +PROJECT_NUMBER = 1.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -51,7 +51,7 @@ # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = agatelogo.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -70,15 +70,25 @@ CREATE_SUBDIRS = NO +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese- -# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en, -# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# Turkish, Ukrainian and Vietnamese. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English @@ -92,7 +102,7 @@ # If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief # description of a member or function before the detailed description -# +# # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. @@ -147,12 +157,12 @@ # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. -# +# # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = C:\Users\Erik\Documents\devel\Games\Agate\trunk\AgateLib +STRIP_FROM_PATH = .. # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -192,7 +202,7 @@ # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. -# +# # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. @@ -216,7 +226,7 @@ # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. -TAB_SIZE = 8 +TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: @@ -269,12 +279,15 @@ # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. -# +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# # Note For files without extension you can use no_extension as a placeholder. -# +# # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -353,7 +366,7 @@ # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). -# +# # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. @@ -510,6 +523,13 @@ SHOW_INCLUDE_FILES = YES +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. @@ -531,7 +551,8 @@ # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO @@ -656,7 +677,7 @@ # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. -# +# # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. @@ -688,7 +709,7 @@ # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. -# +# # Tip: Turn warnings on while writing the documentation. # The default value is: YES. @@ -805,7 +826,7 @@ # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -# +# # Note that relative paths are relative to the directory from which doxygen is # run. @@ -821,7 +842,7 @@ # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. -# +# # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* @@ -832,7 +853,7 @@ # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -# +# # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* @@ -867,14 +888,14 @@ # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: -# +# # <filter> <input-file> -# +# # where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. -# +# # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. @@ -918,7 +939,7 @@ # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. -# +# # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. @@ -973,16 +994,16 @@ # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. -# +# # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal -# +# # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). -# +# # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. @@ -999,7 +1020,7 @@ VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. @@ -1070,7 +1091,7 @@ # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. -# +# # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a @@ -1238,7 +1259,7 @@ # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. -# +# # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old @@ -1280,7 +1301,8 @@ CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1406,7 +1428,7 @@ # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. -# +# # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. @@ -1440,7 +1462,7 @@ # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. -# +# # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. @@ -1520,11 +1542,11 @@ # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using Javascript. There -# are two flavours of web server based searching depending on the -# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for -# searching and an index file used by the script. When EXTERNAL_SEARCH is -# enabled the indexing and searching needs to be provided by external tools. See -# the section "External Indexing and Searching" for details. +# are two flavors of web server based searching depending on the EXTERNAL_SEARCH +# setting. When disabled, doxygen will generate a PHP script for searching and +# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing +# and searching needs to be provided by external tools. See the section +# "External Indexing and Searching" for details. # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1535,11 +1557,11 @@ # which needs to be processed by an external indexer. Doxygen will invoke an # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. -# +# # Doxygen ships with an example indexer ( doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). -# +# # See the section "External Indexing and Searching" for details. # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1548,7 +1570,7 @@ # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. -# +# # Doxygen ships with an example indexer ( doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and @@ -1602,7 +1624,7 @@ # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. -# +# # Note that when enabling USE_PDFLATEX this option is only used for generating # bitmaps for formulas in the HTML output, but not in the Makefile that is # written to the output directory. @@ -1649,7 +1671,7 @@ # chapter. If it is left blank doxygen will generate a standard header. See # section "Doxygen usage" for information on how to let doxygen write the # default header to a separate file. -# +# # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will @@ -1663,7 +1685,7 @@ # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last # chapter. If it is left blank doxygen will generate a standard footer. -# +# # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1712,7 +1734,7 @@ # If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source # code with syntax highlighting in the LaTeX output. -# +# # Note that which sources are shown also depends on other settings such as # SOURCE_BROWSER. # The default value is: NO. @@ -1760,7 +1782,7 @@ # output) instead of page references. This makes the output suitable for online # browsing using Word or some other Word compatible readers that support those # fields. -# +# # Note: WordPad (write) and others do not support links. # The default value is: NO. # This tag requires that the tag GENERATE_RTF is set to YES. @@ -1770,7 +1792,7 @@ # Load stylesheet definitions from file. Syntax is similar to doxygen's config # file, i.e. a series of assignments. You only have to provide replacements, # missing definitions are set to their default value. -# +# # See also section "Doxygen usage" for information on how to generate the # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. @@ -1812,6 +1834,13 @@ MAN_EXTENSION = .3 +# The MAN_SUBDIR tag determines the name of the directory created within +# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by +# MAN_EXTENSION with the initial . removed. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_SUBDIR = + # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # will generate one additional man file for each entity documented in the real # man page(s). These additional files only source the real man page, but without @@ -1839,18 +1868,6 @@ XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a -# validating XML parser to check the syntax of the XML files. -# This tag requires that the tag GENERATE_XML is set to YES. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify a XML DTD, which can be used by a -# validating XML parser to check the syntax of the XML files. -# This tag requires that the tag GENERATE_XML is set to YES. - -XML_DTD = - # If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size @@ -1896,7 +1913,7 @@ # If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module # file that captures the structure of the code including all documentation. -# +# # Note that this feature is still experimental and incomplete at the moment. # The default value is: NO. @@ -1936,7 +1953,7 @@ # C-preprocessor directives found in the sources and include files. # The default value is: YES. -ENABLE_PREPROCESSING = YES +ENABLE_PREPROCESSING = NO # If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names # in the source code. If set to NO only conditional compilation will be @@ -1997,9 +2014,9 @@ EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will -# remove all refrences to function-like macros that are alone on a line, have an -# all uppercase name, and do not end with a semicolon. Such function macros are -# typically used for boiler-plate code, and will confuse the parser if not +# remove all references to function-like macros that are alone on a line, have +# an all uppercase name, and do not end with a semicolon. Such function macros +# are typically used for boiler-plate code, and will confuse the parser if not # removed. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2019,7 +2036,7 @@ # where loc1 and loc2 can be relative or absolute paths or URLs. See the # section "Linking to external documentation" for more information about the use # of tag files. -# Note: Each tag file must have an unique name (where the name does NOT include +# Note: Each tag file must have a unique name (where the name does NOT include # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. @@ -2079,6 +2096,13 @@ MSCGEN_PATH = +# You can include diagrams made with dia in doxygen documentation. Doxygen will +# then run dia to produce the diagram and insert it in the documentation. The +# DIA_PATH tag allows you to specify the directory where the dia binary resides. +# If left empty dia is assumed to be found in the default search path. + +DIA_PATH = + # If set to YES, the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2201,7 +2225,7 @@ # If the CALL_GRAPH tag is set to YES then doxygen will generate a call # dependency graph for every global function or class method. -# +# # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. @@ -2212,7 +2236,7 @@ # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller # dependency graph for every global function or class method. -# +# # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. @@ -2250,7 +2274,7 @@ # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. -# +# # Note that this requires a modern browser other than Internet Explorer. Tested # and working are Firefox, Chrome, Safari, and Opera. # Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make @@ -2279,6 +2303,12 @@ MSCFILE_DIRS = +# The DIAFILE_DIRS tag can be used to specify one or more directories that +# contain dia files that are included in the documentation (see the \diafile +# command). + +DIAFILE_DIRS = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2306,7 +2336,7 @@ # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not seem # to support this out of the box. -# +# # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). Modified: trunk/Documentation/Doxygen/footer.html =================================================================== --- trunk/Documentation/Doxygen/footer.html 2014-07-19 01:58:21 UTC (rev 1402) +++ trunk/Documentation/Doxygen/footer.html 2014-07-20 01:05:25 UTC (rev 1403) @@ -1,7 +1,7 @@ <table width="100%"> <tr> <td align="left" valign="center"> - <a target="_top" href="http://www.agatelib.org/"><img src="http://www.agatelib.org/agatelogo.png" border="0"></a> + <a target="_top" href="http://www.agatelib.org/"><img src="http://www.agatelib.org/api/agatelogo.png" border="0"></a> </td> <td width="100%" align="left" valign="center"> <b><font size="+1">AgateLib</font></b><br> Added: trunk/Documentation/agatelogo.png =================================================================== (Binary files differ) Index: trunk/Documentation/agatelogo.png =================================================================== --- trunk/Documentation/agatelogo.png 2014-07-19 01:58:21 UTC (rev 1402) +++ trunk/Documentation/agatelogo.png 2014-07-20 01:05:25 UTC (rev 1403) Property changes on: trunk/Documentation/agatelogo.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-19 01:58:30
|
Revision: 1402 http://sourceforge.net/p/agate/code/1402 Author: kanato Date: 2014-07-19 01:58:21 +0000 (Sat, 19 Jul 2014) Log Message: ----------- Fix version number for integration server. Modified Paths: -------------- trunk/Build.proj Modified: trunk/Build.proj =================================================================== --- trunk/Build.proj 2014-07-19 01:34:30 UTC (rev 1401) +++ trunk/Build.proj 2014-07-19 01:58:21 UTC (rev 1402) @@ -8,16 +8,16 @@ <!-- Version Number --> <PropertyGroup Condition=" '$(SVN_REVISION)' == '' "> - <Version>0.3.5.0</Version> - <FileVersion>0.3.5.0</FileVersion> - <InformationalVersion>0.3.5.0</InformationalVersion> + <Version>1.0.0.0</Version> + <FileVersion>1.0.0.0</FileVersion> + <InformationalVersion>1.0.0.0</InformationalVersion> </PropertyGroup> <PropertyGroup Condition=" '$(SVN_REVISION)' != '' "> <!-- Build Server Number --> - <Version>0.3.5.$(SVN_REVISION)</Version> - <FileVersion>0.3.5.$(SVN_REVISION)</FileVersion> - <InformationalVersion>0.3.5.$(SVN_REVISION)</InformationalVersion> + <Version>1.0.$(BUILD_NUMBER).$(SVN_REVISION)</Version> + <FileVersion>1.0.$(BUILD_NUMBER).$(SVN_REVISION)</FileVersion> + <InformationalVersion>1.0.$(BUILD_NUMBER).$(SVN_REVISION)</InformationalVersion> </PropertyGroup> <PropertyGroup Condition=" '$(BuildConfiguration)' == '' "> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-19 01:34:37
|
Revision: 1401 http://sourceforge.net/p/agate/code/1401 Author: kanato Date: 2014-07-19 01:34:30 +0000 (Sat, 19 Jul 2014) Log Message: ----------- Added Paths: ----------- tags/rc-1.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-19 01:32:18
|
Revision: 1400 http://sourceforge.net/p/agate/code/1400 Author: kanato Date: 2014-07-19 01:32:09 +0000 (Sat, 19 Jul 2014) Log Message: ----------- Branch 1.0 Added Paths: ----------- branches/Agate-1.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-19 01:25:54
|
Revision: 1399 http://sourceforge.net/p/agate/code/1399 Author: kanato Date: 2014-07-19 01:25:49 +0000 (Sat, 19 Jul 2014) Log Message: ----------- Change version number to 1.0. Modified Paths: -------------- trunk/AgateLib/Properties/AssemblyInfo.cs trunk/AgateLib/Resources/AgateResourceLoader.cs trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs trunk/Drivers/AgateFMOD/Properties/AssemblyInfo.cs trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs trunk/Examples/BallBuster.Net/Properties/AssemblyInfo.cs trunk/Examples/Pong/Properties/AssemblyInfo.cs trunk/Examples/ShootTheTraps/Properties/AssemblyInfo.cs trunk/Tests/Properties/AssemblyInfo.cs trunk/Tools/AgateDataLib/Properties/AssemblyInfo.cs trunk/Tools/DatabaseEditor/Properties/AssemblyInfo.cs trunk/Tools/FontCreator/Properties/AssemblyInfo.cs trunk/Tools/NotebookLib/NotebookLib/Properties/AssemblyInfo.cs trunk/Tools/PackedSpriteCreator/Properties/AssemblyInfo.cs trunk/Tools/ResourceEditor/Properties/AssemblyInfo.cs trunk/UnitTests/Properties/AssemblyInfo.cs Modified: trunk/AgateLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/AgateLib/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/AgateLib/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -52,6 +52,6 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: NeutralResourcesLanguageAttribute("en")] Modified: trunk/AgateLib/Resources/AgateResourceLoader.cs =================================================================== --- trunk/AgateLib/Resources/AgateResourceLoader.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/AgateLib/Resources/AgateResourceLoader.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -38,7 +38,7 @@ { XmlDocument doc = new XmlDocument(); XmlElement root = doc.CreateElement("AgateResources"); - XmlHelper.AppendAttribute(root, doc, "Version", "0.3.2"); + XmlHelper.AppendAttribute(root, doc, "Version", "1.0.0"); doc.AppendChild(root); @@ -99,10 +99,13 @@ switch (version) { + case "1.0.0": + case "0.4.0": + case "0.3.5": case "0.3.2": case "0.3.1": case "0.3.0": - ReadVersion032(resources, root, version); + ReadVersion100(resources, root, version); break; default: @@ -111,7 +114,7 @@ } - private static void ReadVersion032(AgateResourceCollection resources, XmlNode root, string version) + private static void ReadVersion100(AgateResourceCollection resources, XmlNode root, string version) { for (int i = 0; i < root.ChildNodes.Count; i++) { Modified: trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs =================================================================== --- trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -48,5 +48,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Drivers/AgateFMOD/Properties/AssemblyInfo.cs =================================================================== --- trunk/Drivers/AgateFMOD/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Drivers/AgateFMOD/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -49,5 +49,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs =================================================================== --- trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -49,5 +49,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs =================================================================== --- trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -47,5 +47,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs =================================================================== --- trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -51,5 +51,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs =================================================================== --- trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Examples/BallBuster.Net/Properties/AssemblyInfo.cs =================================================================== --- trunk/Examples/BallBuster.Net/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Examples/BallBuster.Net/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -30,5 +30,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Examples/Pong/Properties/AssemblyInfo.cs =================================================================== --- trunk/Examples/Pong/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Examples/Pong/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Examples/ShootTheTraps/Properties/AssemblyInfo.cs =================================================================== --- trunk/Examples/ShootTheTraps/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Examples/ShootTheTraps/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Tests/Properties/AssemblyInfo.cs =================================================================== --- trunk/Tests/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Tests/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Tools/AgateDataLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/Tools/AgateDataLib/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Tools/AgateDataLib/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Tools/DatabaseEditor/Properties/AssemblyInfo.cs =================================================================== --- trunk/Tools/DatabaseEditor/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Tools/DatabaseEditor/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Tools/FontCreator/Properties/AssemblyInfo.cs =================================================================== --- trunk/Tools/FontCreator/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Tools/FontCreator/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Tools/NotebookLib/NotebookLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/Tools/NotebookLib/NotebookLib/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Tools/NotebookLib/NotebookLib/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Tools/PackedSpriteCreator/Properties/AssemblyInfo.cs =================================================================== --- trunk/Tools/PackedSpriteCreator/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Tools/PackedSpriteCreator/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/Tools/ResourceEditor/Properties/AssemblyInfo.cs =================================================================== --- trunk/Tools/ResourceEditor/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/Tools/ResourceEditor/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: trunk/UnitTests/Properties/AssemblyInfo.cs =================================================================== --- trunk/UnitTests/Properties/AssemblyInfo.cs 2014-07-19 01:17:45 UTC (rev 1398) +++ trunk/UnitTests/Properties/AssemblyInfo.cs 2014-07-19 01:25:49 UTC (rev 1399) @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.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-07-19 01:17:50
|
Revision: 1398 http://sourceforge.net/p/agate/code/1398 Author: kanato Date: 2014-07-19 01:17:45 +0000 (Sat, 19 Jul 2014) Log Message: ----------- Fix minor issue preventing AgateLib from getting more than 1000 fps. Modified Paths: -------------- trunk/AgateLib/Core.cs Modified: trunk/AgateLib/Core.cs =================================================================== --- trunk/AgateLib/Core.cs 2014-07-06 18:43:25 UTC (rev 1397) +++ trunk/AgateLib/Core.cs 2014-07-19 01:17:45 UTC (rev 1398) @@ -444,7 +444,7 @@ /// <returns></returns> internal static double GetTime() { - return mTime.ElapsedMilliseconds; + return mTime.ElapsedTicks / (double)System.Diagnostics.Stopwatch.Frequency * 1000.0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-06 18:43:32
|
Revision: 1397 http://sourceforge.net/p/agate/code/1397 Author: kanato Date: 2014-07-06 18:43:25 +0000 (Sun, 06 Jul 2014) Log Message: ----------- Fix bug in static named color getter. Modified Paths: -------------- trunk/AgateLib/Geometry/Color.cs Modified: trunk/AgateLib/Geometry/Color.cs =================================================================== --- trunk/AgateLib/Geometry/Color.cs 2014-07-04 18:10:08 UTC (rev 1396) +++ trunk/AgateLib/Geometry/Color.cs 2014-07-06 18:43:25 UTC (rev 1397) @@ -606,6 +606,9 @@ System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.IgnoreCase); + if (retval == null) + return null; + if (retval.PropertyType == typeof(Color)) return retval; else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-07-04 18:10:17
|
Revision: 1396 http://sourceforge.net/p/agate/code/1396 Author: kanato Date: 2014-07-04 18:10:08 +0000 (Fri, 04 Jul 2014) Log Message: ----------- Add properties to Color to get named colors by text. Modified Paths: -------------- trunk/AgateLib/Geometry/Color.cs trunk/AgateLib-Everything.sln Modified: trunk/AgateLib/Geometry/Color.cs =================================================================== --- trunk/AgateLib/Geometry/Color.cs 2014-06-24 05:50:30 UTC (rev 1395) +++ trunk/AgateLib/Geometry/Color.cs 2014-07-04 18:10:08 UTC (rev 1396) @@ -29,8 +29,8 @@ [Serializable] public struct Color { + #region --- Static Named Color properties --- - #region --- Static Named Color properties --- /// <summary> /// Color AliceBlue. 0xf0f8ff /// </summary> @@ -597,7 +597,50 @@ public static Color YellowGreen { get { return Color.FromArgb(154, 205, 50); } } #endregion + #region --- Accessing Static Named Colors --- + static System.Reflection.PropertyInfo NamedColorStaticProperty(string name) + { + var retval = typeof(Color).GetProperty(name, + System.Reflection.BindingFlags.Static | + System.Reflection.BindingFlags.Public | + System.Reflection.BindingFlags.IgnoreCase); + + if (retval.PropertyType == typeof(Color)) + return retval; + else + return null; + } + + /// <summary> + /// Gets whether or not the specified value is a named color. + /// Named colors correspond to the public static properties of the Color structure. + /// </summary> + /// <param name="colorName"></param> + /// <returns></returns> + public static bool IsNamedColor(string colorName) + { + return NamedColorStaticProperty(colorName) != null; + } + + /// <summary> + /// Returns the color structure corresponding to the named value. + /// Named colors correspond to the public static properties of the Color structure. + /// </summary> + /// <param name="colorName"></param> + /// <returns></returns> + public static Color GetNamedColor(string colorName) + { + var pi = NamedColorStaticProperty(colorName); + + if (pi == null) + throw new ArgumentException("Argument passed was not the name of a color."); + + return (Color)pi.GetValue(null, null); + } + + #endregion + #region --- Private Data --- [FieldOffset(3)] Modified: trunk/AgateLib-Everything.sln =================================================================== --- trunk/AgateLib-Everything.sln 2014-06-24 05:50:30 UTC (rev 1395) +++ trunk/AgateLib-Everything.sln 2014-07-04 18:10:08 UTC (rev 1396) @@ -1,5 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{6AFA2E43-361A-4AA6-83D9-6DE946C1F0B6}" ProjectSection(SolutionItems) = preProject ChangeLog.txt = ChangeLog.txt @@ -49,6 +51,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pong", "Examples\Pong\Pong.csproj", "{436641C4-846C-42D0-8E8F-95F70E211D22}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleUnitTests", "Examples\ExampleUnitTests\ExampleUnitTests.csproj", "{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -560,6 +564,27 @@ {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x64.Build.0 = Release|x64 {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x86.ActiveCfg = Release|x86 {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x86.Build.0 = Release|x86 + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Win32.ActiveCfg = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|x64.ActiveCfg = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|x86.ActiveCfg = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|Any CPU.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|Any CPU.Build.0 = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|Mixed Platforms.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|Mixed Platforms.Build.0 = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|Win32.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|x64.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|x86.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Any CPU.Build.0 = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Win32.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x64.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-06-24 05:50:33
|
Revision: 1395 http://sourceforge.net/p/agate/code/1395 Author: kanato Date: 2014-06-24 05:50:30 +0000 (Tue, 24 Jun 2014) Log Message: ----------- Remove BBX unit test for obsolete method removed. Modified Paths: -------------- trunk/Examples/ExampleUnitTests/UnitTest1.cs Modified: trunk/Examples/ExampleUnitTests/UnitTest1.cs =================================================================== --- trunk/Examples/ExampleUnitTests/UnitTest1.cs 2014-06-24 05:38:38 UTC (rev 1394) +++ trunk/Examples/ExampleUnitTests/UnitTest1.cs 2014-06-24 05:50:30 UTC (rev 1395) @@ -6,29 +6,5 @@ [TestClass] public class BbxUnitTests { - [TestMethod] - public void ColorFromHsv() - { - for (double h = 0; h < 360; h += 10) - { - for (double s = 0; s < 1; s += 0.05) - { - for (double v = 0; v < 1; v += 0.05) - { - var bbclr = BBUtility.HSVtoRGB((float)h, (float)s, (float)v); - - var agclr = AgateLib.Geometry.Color.FromHsv(h, s, v); - - Assert.AreEqual(agclr.R, bbclr.R, 1.0); - Assert.AreEqual(agclr.G, bbclr.G, 1.0); - Assert.AreEqual(agclr.B, bbclr.B, 1.0); - Assert.AreEqual(agclr.A, 255); - Assert.AreEqual(bbclr.A, 255); - } - } - - } - - } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-06-24 05:38:47
|
Revision: 1394 http://sourceforge.net/p/agate/code/1394 Author: kanato Date: 2014-06-24 05:38:38 +0000 (Tue, 24 Jun 2014) Log Message: ----------- Fix the missing texture issue by copying the ortho projection when a new 2D shader is set. Fix colors when lighting is enabled in Direct3D. Modified Paths: -------------- trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs trunk/Drivers/AgateOTK/Legacy/FixedFunction/OTK_FF_Lighting2D.cs trunk/Drivers/AgateSDX/DrawBuffer.cs trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting2D.cs trunk/Tests/DisplayTests/FullScreen.cs trunk/Tests/Shaders/LightingTest/LightingTest.cs Modified: trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs =================================================================== --- trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -1,118 +1,118 @@ -// 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-2011. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using AgateLib.Geometry; - -namespace AgateLib.DisplayLib -{ - /// <summary> - /// Class which can be used to query information about what features are supported - /// by the display driver. - /// </summary> - public class DisplayCapsInfo - { - internal DisplayCapsInfo() - { } - - /// <summary> - /// Indicates whether or not full screen windows can be created. - /// </summary> - public bool SupportsFullScreen - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.FullScreen); } - } - /// <summary> - /// Indicates whether or not the screen resolution can be changed. - /// If the Display driver supports full screen but not mode switching, - /// then a DisplayWindow which is created with as a full screen window - /// cannot change resolutions after it is initially set. - /// </summary> - public bool SupportsFullScreenModeSwitching - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.FullScreenModeSwitching); } - } - /// <summary> - /// Indicates whether setting Surface.SetScale has any visible effect. - /// </summary> - public bool SupportsScaling - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.Scaling); } - } - /// <summary> - /// Indicates whether setting Surface.RotationAngle has any visible effect. - /// </summary> - public bool SupportsRotation - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.Rotation); } - } - /// <summary> - /// Indicates whether setting Surface.Color has any visible effect. - /// </summary> - public bool SupportsColor - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.Color); } - } - /// <summary> - /// Indicates whether Surface gradients are supported. If not, then setting Surface.ColorGradient - /// color of a surface is the same as setting the Surface.Color with the average of the - /// gradient colors. - /// </summary> - public bool SupportsGradient - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.Gradient); } - } - /// <summary> - /// Indicates whether setting Surface.Alpha has any visible effect. - /// </summary> - public bool SupportsSurfaceAlpha - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.SurfaceAlpha); } - } - /// <summary> - /// Indicates whether the alpha channel in surface pixels is used. - /// </summary> - public bool SupportsPixelAlpha - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.PixelAlpha); } - } - /// <summary> - /// Indicates whether there is hardware acceleration available for 2D and 3D drawing. - /// </summary> - public bool IsHardwareAccelerated - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.IsHardwareAccelerated); } - } - /// <summary> - /// Indicates whether or not vertex/pixel shaders are supported. - /// </summary> - public bool SupportsCustomShaders - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.CustomShaders); } - } - /// <summary> - /// Indicates which shader language is supported. - /// </summary> - public AgateLib.DisplayLib.Shaders.ShaderLanguage ShaderLanguage - { +// 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-2011. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using AgateLib.Geometry; + +namespace AgateLib.DisplayLib +{ + /// <summary> + /// Class which can be used to query information about what features are supported + /// by the display driver. + /// </summary> + public class DisplayCapsInfo + { + internal DisplayCapsInfo() + { } + + /// <summary> + /// Indicates whether or not full screen windows can be created. + /// </summary> + public bool SupportsFullScreen + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.FullScreen); } + } + /// <summary> + /// Indicates whether or not the screen resolution can be changed. + /// If the Display driver supports full screen but not mode switching, + /// then a DisplayWindow which is created with as a full screen window + /// cannot change resolutions after it is initially set. + /// </summary> + public bool SupportsFullScreenModeSwitching + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.FullScreenModeSwitching); } + } + /// <summary> + /// Indicates whether setting Surface.SetScale has any visible effect. + /// </summary> + public bool SupportsScaling + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.Scaling); } + } + /// <summary> + /// Indicates whether setting Surface.RotationAngle has any visible effect. + /// </summary> + public bool SupportsRotation + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.Rotation); } + } + /// <summary> + /// Indicates whether setting Surface.Color has any visible effect. + /// </summary> + public bool SupportsColor + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.Color); } + } + /// <summary> + /// Indicates whether Surface gradients are supported. If not, then setting Surface.ColorGradient + /// color of a surface is the same as setting the Surface.Color with the average of the + /// gradient colors. + /// </summary> + public bool SupportsGradient + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.Gradient); } + } + /// <summary> + /// Indicates whether setting Surface.Alpha has any visible effect. + /// </summary> + public bool SupportsSurfaceAlpha + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.SurfaceAlpha); } + } + /// <summary> + /// Indicates whether the alpha channel in surface pixels is used. + /// </summary> + public bool SupportsPixelAlpha + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.PixelAlpha); } + } + /// <summary> + /// Indicates whether there is hardware acceleration available for 2D and 3D drawing. + /// </summary> + public bool IsHardwareAccelerated + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.IsHardwareAccelerated); } + } + /// <summary> + /// Indicates whether or not vertex/pixel shaders are supported. + /// </summary> + public bool SupportsCustomShaders + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.CustomShaders); } + } + /// <summary> + /// Indicates which shader language is supported. + /// </summary> + public AgateLib.DisplayLib.Shaders.ShaderLanguage ShaderLanguage + { get { var shad = Display.Impl.SupportedShaderLanguages.ToList(); @@ -121,90 +121,90 @@ return Shaders.ShaderLanguage.None; else return shad[0]; - } - } - /// <summary> - /// Indicates whether the driver can create a bitmap font from an operating - /// system font. - /// </summary> - public bool CanCreateBitmapFont - { - get { return Display.Impl.CapsBool(DisplayBoolCaps.CanCreateBitmapFont); } - } - - /// <summary> - /// Gets the maximum size a surface can be. - /// </summary> - public Size MaxSurfaceSize - { - get { return Display.Impl.CapsSize(DisplaySizeCaps.MaxSurfaceSize); } - } - } - - /// <summary> - /// Enum which is used to specify a Caps value which should return a Size object. - /// </summary> - public enum DisplaySizeCaps - { - /// <summary> - /// Value for getting the maximum supported surface size. - /// </summary> - MaxSurfaceSize, - } - /// <summary> - /// Enum which is used to specify a Caps value which should return a logical value. - /// </summary> - public enum DisplayBoolCaps - { - /// <summary> - /// Indicates whether or not full screen windows can be created. - /// </summary> - FullScreen, - /// <summary> - /// Indicates whether or not the screen resolution can be changed. - /// If the Display driver supports full screen but not mode switching, - /// then a DisplayWindow which is created with as a full screen window - /// cannot change resolutions after it is initially set. - /// </summary> - FullScreenModeSwitching, - /// <summary> - /// Indicates whether setting Surface.SetScale has any visible effect. - /// </summary> - Scaling, - /// <summary> - /// Indicates whether setting Surface.RotationAngle has any visible effect. - /// </summary> - Rotation, - /// <summary> - /// Indicates whether setting Surface.Color has any visible effect. - /// </summary> - Color, - /// <summary> - /// Indicates whether Surface gradients are supported. If not, then setting Surface.ColorGradient - /// color of a surface is the same as setting the Surface.Color with the average of the - /// gradient colors. - /// </summary> - Gradient, - /// <summary> - /// Indicates whether setting Surface.Alpha has any visible effect. - /// </summary> - SurfaceAlpha, - /// <summary> - /// Indicates whether the alpha channel in surface pixels is used. - /// </summary> - PixelAlpha, - /// <summary> - /// Indicates whether there is hardware acceleration available for 2D scaling and rotations. - /// </summary> - IsHardwareAccelerated, - /// <summary> - /// Indicates whether or not vertex/pixel shaders are supported. - /// </summary> - CustomShaders, - /// <summary> - /// Indicates whether the driver can create a bitmap font from an operating - /// system font. - /// </summary> - CanCreateBitmapFont, - } -} + } + } + /// <summary> + /// Indicates whether the driver can create a bitmap font from an operating + /// system font. + /// </summary> + public bool CanCreateBitmapFont + { + get { return Display.Impl.CapsBool(DisplayBoolCaps.CanCreateBitmapFont); } + } + + /// <summary> + /// Gets the maximum size a surface can be. + /// </summary> + public Size MaxSurfaceSize + { + get { return Display.Impl.CapsSize(DisplaySizeCaps.MaxSurfaceSize); } + } + } + + /// <summary> + /// Enum which is used to specify a Caps value which should return a Size object. + /// </summary> + public enum DisplaySizeCaps + { + /// <summary> + /// Value for getting the maximum supported surface size. + /// </summary> + MaxSurfaceSize, + } + /// <summary> + /// Enum which is used to specify a Caps value which should return a logical value. + /// </summary> + public enum DisplayBoolCaps + { + /// <summary> + /// Indicates whether or not full screen windows can be created. + /// </summary> + FullScreen, + /// <summary> + /// Indicates whether or not the screen resolution can be changed. + /// If the Display driver supports full screen but not mode switching, + /// then a DisplayWindow which is created with as a full screen window + /// cannot change resolutions after it is initially set. + /// </summary> + FullScreenModeSwitching, + /// <summary> + /// Indicates whether setting Surface.SetScale has any visible effect. + /// </summary> + Scaling, + /// <summary> + /// Indicates whether setting Surface.RotationAngle has any visible effect. + /// </summary> + Rotation, + /// <summary> + /// Indicates whether setting Surface.Color has any visible effect. + /// </summary> + Color, + /// <summary> + /// Indicates whether Surface gradients are supported. If not, then setting Surface.ColorGradient + /// color of a surface is the same as setting the Surface.Color with the average of the + /// gradient colors. + /// </summary> + Gradient, + /// <summary> + /// Indicates whether setting Surface.Alpha has any visible effect. + /// </summary> + SurfaceAlpha, + /// <summary> + /// Indicates whether the alpha channel in surface pixels is used. + /// </summary> + PixelAlpha, + /// <summary> + /// Indicates whether there is hardware acceleration available for 2D scaling and rotations. + /// </summary> + IsHardwareAccelerated, + /// <summary> + /// Indicates whether or not vertex/pixel shaders are supported. + /// </summary> + CustomShaders, + /// <summary> + /// Indicates whether the driver can create a bitmap font from an operating + /// system font. + /// </summary> + CanCreateBitmapFont, + } +} Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -705,12 +705,21 @@ if (mShader != null) mShader.EndInternal(); + if (value is IShader2D && mShader is IShader2D) + TransferShader2DSettings((IShader2D)value, (IShader2D)mShader); + mShader = value; mShader.BeginInternal(); } } + private void TransferShader2DSettings(IShader2D target, IShader2D src) + { + if (target.CoordinateSystem.IsEmpty) + target.CoordinateSystem = src.CoordinateSystem; + } + protected internal abstract bool GetRenderState(RenderStateBool renderStateBool); protected internal abstract void SetRenderState(RenderStateBool renderStateBool, bool value); Modified: trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs =================================================================== --- trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -85,6 +85,8 @@ return; } } + + Lights.Add(ptLight); } Modified: trunk/Drivers/AgateOTK/Legacy/FixedFunction/OTK_FF_Lighting2D.cs =================================================================== --- trunk/Drivers/AgateOTK/Legacy/FixedFunction/OTK_FF_Lighting2D.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/Drivers/AgateOTK/Legacy/FixedFunction/OTK_FF_Lighting2D.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -86,9 +86,7 @@ GL.MatrixMode(MatrixMode.Projection); GL.LoadIdentity(); GL.Ortho(coords.Left, coords.Right, coords.Bottom, coords.Top, -1, 1); - - GL.Enable(EnableCap.Lighting); - + float[] array = new float[4]; GL.Enable(EnableCap.Lighting); Modified: trunk/Drivers/AgateSDX/DrawBuffer.cs =================================================================== --- trunk/Drivers/AgateSDX/DrawBuffer.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/Drivers/AgateSDX/DrawBuffer.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -100,6 +100,10 @@ mDevice.SetDeviceStateTexture(mTexture); mDevice.AlphaBlend = mAlphaBlend; + mDevice.AlphaArgument1 = TextureArgument.Texture; + mDevice.AlphaArgument2 = TextureArgument.Diffuse; + mDevice.AlphaOperation = TextureOperation.Modulate; + mDevice.SetVertexDeclarationForSurfaces(); SDX_Display display = (SDX_Display)Display.Impl; Modified: trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs =================================================================== --- trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -217,7 +217,7 @@ SetTextures(); mDisplay.D3D_Device.AlphaArgument1 = Direct3D.TextureArgument.Texture; - + mDisplay.D3D_Device.Device.VertexDeclaration = mDeclaration; mDisplay.D3D_Device.Device.Indices = indexbuffer.DeviceIndexBuffer; mDisplay.D3D_Device.Device.SetStreamSource(0, mBuffer, 0, mLayout.VertexSize); Modified: trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting2D.cs =================================================================== --- trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting2D.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting2D.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -94,52 +94,61 @@ Set2DDrawState(); - //if (EnableLighting == false) - //{ - // mDisplay.D3D_Device.Device.SetRenderState(RenderState.Lighting, false); - // return; - //} + mDisplay.D3D_Device.Device.SetRenderState(RenderState.Lighting, true); + mDisplay.D3D_Device.Device.SetRenderState(RenderState.Ambient, AmbientLight.ToArgb()); + mDisplay.D3D_Device.Device.SetRenderState(RenderState.ColorVertex, true); - //mDisplay.D3D_Device.Device.SetRenderState(RenderState.Lighting, true); - //mDisplay.D3D_Device.Device.SetRenderState(RenderState.Ambient, AmbientLight.ToArgb()); + TextureArgument arg0 = (TextureArgument)mDisplay.D3D_Device.Device.GetTextureStageState(0, TextureStage.ColorArg0); + TextureArgument arg1 = (TextureArgument)mDisplay.D3D_Device.Device.GetTextureStageState(0, TextureStage.ColorArg1); + TextureArgument arg2 = (TextureArgument)mDisplay.D3D_Device.Device.GetTextureStageState(0, TextureStage.ColorArg2); + TextureOperation op = (TextureOperation)mDisplay.D3D_Device.Device.GetTextureStageState(0, TextureStage.ColorOperation); - //Material material = new Material(); - //material.Diffuse = new SlimDX.Color4(Color.White.ToArgb()); - //material.Ambient = new SlimDX.Color4(Color.White.ToArgb()); + mDisplay.D3D_Device.Device.SetTextureStageState(0, TextureStage.ColorArg0, TextureArgument.Current); + mDisplay.D3D_Device.Device.SetTextureStageState(0, TextureStage.ColorArg1, TextureArgument.Texture); + mDisplay.D3D_Device.Device.SetTextureStageState(0, TextureStage.ColorArg2, TextureArgument.Current); + mDisplay.D3D_Device.Device.SetTextureStageState(0, TextureStage.ColorOperation, TextureOperation.Modulate); + mDisplay.D3D_Device.Device.SetRenderState(RenderState.DiffuseMaterialSource, ColorSource.Color1); + mDisplay.D3D_Device.Device.SetRenderState(RenderState.AmbientMaterialSource, ColorSource.Color1); + + Material material = new Material(); + material.Diffuse = new SlimDX.Color4(Color.White.ToArgb()); + material.Ambient = new SlimDX.Color4(Color.White.ToArgb()); + + + mDisplay.D3D_Device.Device.Material = material; - //mDisplay.D3D_Device.Device.Material = material; + int index = 0; - //int index = 0; + for (int i = 0; i < Lights.Count; i++) + { + var agateLight = Lights[i]; - //for (int i = 0; i < Lights.Count; i++) - //{ - // var agateLight = Lights[i]; + if (agateLight == null) + continue; + if (agateLight.Enabled == false) + continue; - // if (agateLight == null) - // continue; - // if (agateLight.Enabled == false) - // continue; + SlimDX.Direct3D9.Light l = new SlimDX.Direct3D9.Light(); - // SlimDX.Direct3D9.Light l = new SlimDX.Direct3D9.Light(); + l.Ambient = new SlimDX.Color4(agateLight.AmbientColor.ToArgb()); + l.Attenuation0 = agateLight.AttenuationConstant; + l.Attenuation1 = agateLight.AttenuationLinear; + l.Attenuation2 = agateLight.AttenuationQuadratic; + l.Diffuse = new SlimDX.Color4(agateLight.DiffuseColor.ToArgb()); + l.Type = LightType.Point; + l.Direction = new SlimDX.Vector3(0, 0, 1); + l.Range = 100; + - // l.Ambient = new SlimDX.Color4(agateLight.AmbientColor.ToArgb()); - // l.Attenuation0 = agateLight.AttenuationConstant; - // l.Attenuation1 = agateLight.AttenuationLinear; - // l.Attenuation2 = agateLight.AttenuationQuadratic; - // l.Diffuse = new SlimDX.Color4(agateLight.DiffuseColor.ToArgb()); - // l.Type = LightType.Point; - // l.Direction = new SlimDX.Vector3(0, 0, 1); - // l.Range = 100; + Vector3 pos = agateLight.Position; - // Vector3 pos = agateLight.Position; + l.Position = new SlimDX.Vector3(pos.X, pos.Y, pos.Z); - // l.Position = new SlimDX.Vector3(pos.X, pos.Y, pos.Z); + mDisplay.D3D_Device.Device.SetLight(index, l); + mDisplay.D3D_Device.Device.EnableLight(index, true); - // mDisplay.D3D_Device.Device.SetLight(index, l); - // mDisplay.D3D_Device.Device.EnableLight(index, true); - - // index++; - //} + index++; + } } public override void BeginPass(int passIndex) Modified: trunk/Tests/DisplayTests/FullScreen.cs =================================================================== --- trunk/Tests/DisplayTests/FullScreen.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/Tests/DisplayTests/FullScreen.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -35,6 +35,8 @@ Keyboard.KeyDown += new InputEventHandler(Keyboard_KeyDown); FontSurface font = FontSurface.AgateSans14; + int frames = 1; + // Run the program while the window is open. while (Display.CurrentWindow.IsClosed == false && Keyboard.Keys[KeyCode.Escape] == false && @@ -44,10 +46,14 @@ Display.Clear(Color.DarkGreen); font.DrawText(text); + + font.DrawText(0, 480 - font.FontHeight, "Frames: {0}", frames); + mySurface.Draw(Mouse.X, Mouse.Y); Display.EndFrame(); Core.KeepAlive(); + frames++; } } } Modified: trunk/Tests/Shaders/LightingTest/LightingTest.cs =================================================================== --- trunk/Tests/Shaders/LightingTest/LightingTest.cs 2014-06-24 05:35:05 UTC (rev 1393) +++ trunk/Tests/Shaders/LightingTest/LightingTest.cs 2014-06-24 05:38:38 UTC (rev 1394) @@ -70,7 +70,7 @@ lt2.Position = new Vector3(e.MousePosition.X, e.MousePosition.Y, -1); }; - while (true)//(frm.Visible == true) + while (wnd.IsClosed == false) { //if (frm.chkMoveLight.Checked) time += Display.DeltaTime / 1000.0; @@ -86,9 +86,8 @@ Display.BeginFrame(); Display.Clear(Color.DarkRed); - //lights.Activate(); - - //lights.Enabled = frm.enableLightingCheck.Checked; + lights.Activate(); + //lights.DoLighting(); //fx.SetVariable("worldViewProj", wnd.OrthoProjection); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-06-24 05:35:21
|
Revision: 1393 http://sourceforge.net/p/agate/code/1393 Author: kanato Date: 2014-06-24 05:35:05 +0000 (Tue, 24 Jun 2014) Log Message: ----------- Add namespace to bbx files. Modified Paths: -------------- trunk/Examples/BallBuster.Net/BBUtility.cs trunk/Examples/BallBuster.Net/BallBuster.Net.csproj trunk/Examples/BallBuster.Net/CImage.cs trunk/Examples/BallBuster.Net/CSound.cs trunk/Examples/BallBuster.Net/Highscore.cs trunk/Examples/BallBuster.Net/ScoreByte.cs trunk/Examples/BallBuster.Net/SettingsFile.cs trunk/Examples/BallBuster.Net/World.cs trunk/Examples/BallBuster.Net/ball.cs trunk/Examples/BallBuster.Net/block.cs trunk/Examples/BallBuster.Net/blockpart.cs trunk/Examples/BallBuster.Net/fadeball.cs trunk/Examples/BallBuster.Net/flash.cs trunk/Examples/BallBuster.Net/main.cs trunk/Examples/BallBuster.Net/powerup.cs Removed Paths: ------------- trunk/Examples/BallBuster.Net/OpenTK.dll.config Modified: trunk/Examples/BallBuster.Net/BBUtility.cs =================================================================== --- trunk/Examples/BallBuster.Net/BBUtility.cs 2014-06-24 03:50:43 UTC (rev 1392) +++ trunk/Examples/BallBuster.Net/BBUtility.cs 2014-06-24 05:35:05 UTC (rev 1393) @@ -25,91 +25,17 @@ using AgateLib.DisplayLib; using AgateLib.Geometry; - -static class BBUtility +namespace BallBuster.Net { - [Obsolete] - public static Color HSVtoRGB(float H, float S, float V) + static class BBUtility { - return Color.FromHsv(H, S, V); - float R, G, B; - - if (S == 0.0f) // color is on black-and-white center line + public static void SWAP<T>(ref T a, ref T b) { - R = V; // achromatic: shades of gray - G = V; // supposedly invalid for h=0 but who cares - B = V; - } - else // -- chromatic color - { - if (H >= 360.0f) // -- 360 degrees same as 0 degrees - H -= 360.0f; + T temp; - float q, p, t, f; - int i; - - H = H / 60.0f; // h is now in [0,6) - i = (int)(H); // largest integer <= h - f = H - i; //- fractional part of h - - p = V * (1.0f - S); - q = V * (1.0f - (S * f)); - t = V * (1.0f - (S * (1.0f - f))); - - switch (i) - { - case 0: - R = V; - G = t; - B = p; - break; - - case 1: - R = q; - G = V; - B = p; - break; - - case 2: - R = p; - G = V; - B = t; - break; - - case 3: - R = p; - G = q; - B = V; - break; - - case 4: - R = t; - G = p; - B = V; - break; - - default: - case 5: - R = V; - G = p; - B = q; - break; - } + temp = a; + a = b; + b = temp; } - return Color.FromArgb(255, (int)(R * 255), (int)(G * 255), (int)(B * 255)); } - - - - - public static void SWAP<T>(ref T a, ref T b) - { - T temp; - - temp = a; - a = b; - b = temp; - } - - -} +} \ No newline at end of file Modified: trunk/Examples/BallBuster.Net/BallBuster.Net.csproj =================================================================== --- trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2014-06-24 03:50:43 UTC (rev 1392) +++ trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2014-06-24 05:35:05 UTC (rev 1393) @@ -120,9 +120,6 @@ <None Include="highscores"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> - <None Include="OpenTK.dll.config"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> Modified: trunk/Examples/BallBuster.Net/CImage.cs =================================================================== --- trunk/Examples/BallBuster.Net/CImage.cs 2014-06-24 03:50:43 UTC (rev 1392) +++ trunk/Examples/BallBuster.Net/CImage.cs 2014-06-24 05:35:05 UTC (rev 1393) @@ -26,175 +26,178 @@ using AgateLib.Sprites; using AgateLib.DisplayLib; -class CImage +namespace BallBuster.Net { - public Surface leftborder, rightborder, topborder; + class CImage + { + public Surface leftborder, rightborder, topborder; - public Sprite block; - public Sprite cblock, sblock; + public Sprite block; + public Sprite cblock, sblock; - public Sprite woodblock, marbleblock1, marbleblock2; - public Sprite rubyblock1, rubyblock2, rubyblock3; + public Sprite woodblock, marbleblock1, marbleblock2; + public Sprite rubyblock1, rubyblock2, rubyblock3; - public Sprite crack; + public Sprite crack; - public Sprite paddle, flash, smallpaddle, largepaddle, fireball, ball, spike, smash; + public Sprite paddle, flash, smallpaddle, largepaddle, fireball, ball, spike, smash; - public Sprite pupaddleregular, pupaddlesmall, pupaddlelarge, pufastball, puslowball, puregularspeed, - pumultiball, pu3ball, pu1up, publaster, pufireball, pusticky, pusupersticky, pureset, purandom, - pu100, pu250, pu500, pu1000, - pucatchblue, pucatchred, - pupow, pusmash, purbswap, pudoor; + public Sprite pupaddleregular, pupaddlesmall, pupaddlelarge, pufastball, puslowball, puregularspeed, + pumultiball, pu3ball, pu1up, publaster, pufireball, pusticky, pusupersticky, pureset, purandom, + pu100, pu250, pu500, pu1000, + pucatchblue, pucatchred, + pupow, pusmash, purbswap, pudoor; - AgateResourceCollection spritesSrc = new AgateResourceCollection("imgs/sprites.xml"); + AgateResourceCollection spritesSrc = new AgateResourceCollection("imgs/sprites.xml"); - public Sprite arrow, bblogo, palogo, xlogo; + public Sprite arrow, bblogo, palogo, xlogo; - public FontSurface font; - public FontSurface largeFont; + public FontSurface font; + public FontSurface largeFont; - //public TextStyler fontStyler; + //public TextStyler fontStyler; - public void preload() - { - this.font = FontSurface.AgateSans10; - this.largeFont = FontSurface.AgateSans24; - this.largeFont.SetScale(0.8, 0.8); + public void preload() + { + this.font = FontSurface.AgateSans10; + this.largeFont = FontSurface.AgateSans24; + this.largeFont.SetScale(0.8, 0.8); - this.palogo = new Sprite(spritesSrc, "palogo"); - } + this.palogo = new Sprite(spritesSrc, "palogo"); + } - public void load() - { + public void load() + { - this.leftborder = new Surface("leftborder.png"); - this.rightborder = new Surface("rightborder.png"); - this.topborder = new Surface("topborder.png"); - // this.bgtile= new Surface("bg1.jpg"); + this.leftborder = new Surface("leftborder.png"); + this.rightborder = new Surface("rightborder.png"); + this.topborder = new Surface("topborder.png"); + // this.bgtile= new Surface("bg1.jpg"); - this.ball = new Sprite(spritesSrc, "ball"); - this.fireball = new Sprite(spritesSrc, "fireball"); + this.ball = new Sprite(spritesSrc, "ball"); + this.fireball = new Sprite(spritesSrc, "fireball"); - this.spike = new Sprite(spritesSrc, "spike"); - this.smash = new Sprite(spritesSrc, "smash"); + this.spike = new Sprite(spritesSrc, "spike"); + this.smash = new Sprite(spritesSrc, "smash"); - this.paddle = new Sprite(spritesSrc, "default_paddle"); - this.paddle.AnimationType = SpriteAnimType.Looping; - this.smallpaddle = new Sprite(spritesSrc, "small_paddle"); - this.smallpaddle.AnimationType = SpriteAnimType.Looping; - this.largepaddle = new Sprite(spritesSrc, "large_paddle"); - this.largepaddle.AnimationType = SpriteAnimType.Looping; + this.paddle = new Sprite(spritesSrc, "default_paddle"); + this.paddle.AnimationType = SpriteAnimType.Looping; + this.smallpaddle = new Sprite(spritesSrc, "small_paddle"); + this.smallpaddle.AnimationType = SpriteAnimType.Looping; + this.largepaddle = new Sprite(spritesSrc, "large_paddle"); + this.largepaddle.AnimationType = SpriteAnimType.Looping; - this.block = new Sprite(spritesSrc, "block"); + this.block = new Sprite(spritesSrc, "block"); - this.cblock = new Sprite(spritesSrc, "cblock"); - this.sblock = new Sprite(spritesSrc, "sblock"); + this.cblock = new Sprite(spritesSrc, "cblock"); + this.sblock = new Sprite(spritesSrc, "sblock"); - this.woodblock = new Sprite(spritesSrc, "woodblock"); - this.marbleblock1 = new Sprite(spritesSrc, "marbleblock1"); - this.marbleblock2 = new Sprite(spritesSrc, "marbleblock2"); + this.woodblock = new Sprite(spritesSrc, "woodblock"); + this.marbleblock1 = new Sprite(spritesSrc, "marbleblock1"); + this.marbleblock2 = new Sprite(spritesSrc, "marbleblock2"); - this.rubyblock1 = new Sprite(spritesSrc, "rubyblock1"); - this.rubyblock2 = new Sprite(spritesSrc, "rubyblock2"); - this.rubyblock3 = new Sprite(spritesSrc, "rubyblock3"); + this.rubyblock1 = new Sprite(spritesSrc, "rubyblock1"); + this.rubyblock2 = new Sprite(spritesSrc, "rubyblock2"); + this.rubyblock3 = new Sprite(spritesSrc, "rubyblock3"); - this.flash = new Sprite(spritesSrc, "flash"); - this.crack = new Sprite(spritesSrc, "crack"); + this.flash = new Sprite(spritesSrc, "flash"); + this.crack = new Sprite(spritesSrc, "crack"); - this.pupaddleregular = new Sprite(spritesSrc, "pupaddleregular"); - this.pupaddlesmall = new Sprite(spritesSrc, "pupaddlesmall"); - this.pupaddlelarge = new Sprite(spritesSrc, "pupaddlelarge"); - this.publaster = new Sprite(spritesSrc, "publaster"); - this.pufastball = new Sprite(spritesSrc, "pufastball"); - this.pufireball = new Sprite(spritesSrc, "pufireball"); - this.pumultiball = new Sprite(spritesSrc, "pumultiball"); - this.pu3ball = new Sprite(spritesSrc, "pu3ball"); - this.puregularspeed = new Sprite(spritesSrc, "puregularspeed"); - this.puslowball = new Sprite(spritesSrc, "puslowball"); - this.pu1up = new Sprite(spritesSrc, "pu1up"); - this.pusticky = new Sprite(spritesSrc, "pusticky"); - this.pusupersticky = new Sprite(spritesSrc, "pusupersticky"); - this.pureset = new Sprite(spritesSrc, "pureset"); - this.purandom = new Sprite(spritesSrc, "purandom"); - this.pu100 = new Sprite(spritesSrc, "pu100"); - this.pu250 = new Sprite(spritesSrc, "pu250"); - this.pu500 = new Sprite(spritesSrc, "pu500"); - this.pu1000 = new Sprite(spritesSrc, "pu1000"); - this.pucatchblue = new Sprite(spritesSrc, "pucatchblue"); - this.pucatchred = new Sprite(spritesSrc, "pucatchred"); - this.pupow = new Sprite(spritesSrc, "pupow"); - this.pusmash = new Sprite(spritesSrc, "pusmash"); - this.purbswap = new Sprite(spritesSrc, "purbswap"); - this.pudoor = new Sprite(spritesSrc, "pudoor"); + this.pupaddleregular = new Sprite(spritesSrc, "pupaddleregular"); + this.pupaddlesmall = new Sprite(spritesSrc, "pupaddlesmall"); + this.pupaddlelarge = new Sprite(spritesSrc, "pupaddlelarge"); + this.publaster = new Sprite(spritesSrc, "publaster"); + this.pufastball = new Sprite(spritesSrc, "pufastball"); + this.pufireball = new Sprite(spritesSrc, "pufireball"); + this.pumultiball = new Sprite(spritesSrc, "pumultiball"); + this.pu3ball = new Sprite(spritesSrc, "pu3ball"); + this.puregularspeed = new Sprite(spritesSrc, "puregularspeed"); + this.puslowball = new Sprite(spritesSrc, "puslowball"); + this.pu1up = new Sprite(spritesSrc, "pu1up"); + this.pusticky = new Sprite(spritesSrc, "pusticky"); + this.pusupersticky = new Sprite(spritesSrc, "pusupersticky"); + this.pureset = new Sprite(spritesSrc, "pureset"); + this.purandom = new Sprite(spritesSrc, "purandom"); + this.pu100 = new Sprite(spritesSrc, "pu100"); + this.pu250 = new Sprite(spritesSrc, "pu250"); + this.pu500 = new Sprite(spritesSrc, "pu500"); + this.pu1000 = new Sprite(spritesSrc, "pu1000"); + this.pucatchblue = new Sprite(spritesSrc, "pucatchblue"); + this.pucatchred = new Sprite(spritesSrc, "pucatchred"); + this.pupow = new Sprite(spritesSrc, "pupow"); + this.pusmash = new Sprite(spritesSrc, "pusmash"); + this.purbswap = new Sprite(spritesSrc, "purbswap"); + this.pudoor = new Sprite(spritesSrc, "pudoor"); - this.arrow = new Sprite(spritesSrc, "arrow"); - this.bblogo = new Sprite(spritesSrc, "bblogo"); - this.xlogo = new Sprite(spritesSrc, "xlogo"); + this.arrow = new Sprite(spritesSrc, "arrow"); + this.bblogo = new Sprite(spritesSrc, "bblogo"); + this.xlogo = new Sprite(spritesSrc, "xlogo"); - //Display.PackAllSurfaces(); - } + //Display.PackAllSurfaces(); + } - public void unload() - { - ball.Dispose(); - fireball.Dispose(); - leftborder.Dispose(); - rightborder.Dispose(); - topborder.Dispose(); + public void unload() + { + ball.Dispose(); + fireball.Dispose(); + leftborder.Dispose(); + rightborder.Dispose(); + topborder.Dispose(); - paddle.Dispose(); - largepaddle.Dispose(); - smallpaddle.Dispose(); - block.Dispose(); + paddle.Dispose(); + largepaddle.Dispose(); + smallpaddle.Dispose(); + block.Dispose(); - cblock.Dispose(); - sblock.Dispose(); - woodblock.Dispose(); - marbleblock1.Dispose(); - marbleblock2.Dispose(); + cblock.Dispose(); + sblock.Dispose(); + woodblock.Dispose(); + marbleblock1.Dispose(); + marbleblock2.Dispose(); - rubyblock1.Dispose(); - rubyblock2.Dispose(); - rubyblock3.Dispose(); + rubyblock1.Dispose(); + rubyblock2.Dispose(); + rubyblock3.Dispose(); - flash.Dispose(); + flash.Dispose(); - pupaddleregular.Dispose(); - pupaddlesmall.Dispose(); - pupaddlelarge.Dispose(); - publaster.Dispose(); - pufastball.Dispose(); - pufireball.Dispose(); - pumultiball.Dispose(); - pu3ball.Dispose(); - puregularspeed.Dispose(); - puslowball.Dispose(); - pu1up.Dispose(); - pusticky.Dispose(); - pureset.Dispose(); - purandom.Dispose(); - pu100.Dispose(); - pu250.Dispose(); - pu500.Dispose(); - pu1000.Dispose(); - pucatchblue.Dispose(); - pucatchred.Dispose(); - pupow.Dispose(); - pusmash.Dispose(); - purbswap.Dispose(); + pupaddleregular.Dispose(); + pupaddlesmall.Dispose(); + pupaddlelarge.Dispose(); + publaster.Dispose(); + pufastball.Dispose(); + pufireball.Dispose(); + pumultiball.Dispose(); + pu3ball.Dispose(); + puregularspeed.Dispose(); + puslowball.Dispose(); + pu1up.Dispose(); + pusticky.Dispose(); + pureset.Dispose(); + purandom.Dispose(); + pu100.Dispose(); + pu250.Dispose(); + pu500.Dispose(); + pu1000.Dispose(); + pucatchblue.Dispose(); + pucatchred.Dispose(); + pupow.Dispose(); + pusmash.Dispose(); + purbswap.Dispose(); - arrow.Dispose(); - bblogo.Dispose(); - palogo.Dispose(); - xlogo.Dispose(); + arrow.Dispose(); + bblogo.Dispose(); + palogo.Dispose(); + xlogo.Dispose(); - font.Dispose(); + font.Dispose(); + } + } - } \ No newline at end of file Modified: trunk/Examples/BallBuster.Net/CSound.cs =================================================================== --- trunk/Examples/BallBuster.Net/CSound.cs 2014-06-24 03:50:43 UTC (rev 1392) +++ trunk/Examples/BallBuster.Net/CSound.cs 2014-06-24 05:35:05 UTC (rev 1393) @@ -24,53 +24,56 @@ using AgateLib; using AgateLib.AudioLib; -class CSound +namespace BallBuster.Net { + class CSound + { - public SoundBuffer bounce, shatter, powerup, ballfall, speedup, ching, die; - public List<Music> music = new List<Music>(); + public SoundBuffer bounce, shatter, powerup, ballfall, speedup, ching, die; + public List<Music> music = new List<Music>(); - public void load() - { - bounce = new SoundBuffer("snd/bounce.wav"); - shatter = new SoundBuffer("snd/break.wav"); - powerup = new SoundBuffer("snd/powerup.wav"); - ballfall = new SoundBuffer("snd/zoom.wav"); - speedup = new SoundBuffer("snd/speedup.wav"); - ching = new SoundBuffer("snd/ching.wav"); - die = new SoundBuffer("snd/die.wav"); + public void load() + { + bounce = new SoundBuffer("snd/bounce.wav"); + shatter = new SoundBuffer("snd/break.wav"); + powerup = new SoundBuffer("snd/powerup.wav"); + ballfall = new SoundBuffer("snd/zoom.wav"); + speedup = new SoundBuffer("snd/speedup.wav"); + ching = new SoundBuffer("snd/ching.wav"); + die = new SoundBuffer("snd/die.wav"); - try - { - music.Add(new Music("snd/music/Rockin1.ogg")); - music.Add(new Music("snd/music/Rockin2.ogg")); - music.Add(new Music("snd/music/Grunge.ogg")); - music.Add(new Music("snd/music/Rave.ogg")); - music.Add(new Music("snd/music/FastDance.ogg")); - music.Add(new Music("snd/music/SweetDreams.ogg")); - } - catch - { - // can't read ogg files. - } - } + try + { + music.Add(new Music("snd/music/Rockin1.ogg")); + music.Add(new Music("snd/music/Rockin2.ogg")); + music.Add(new Music("snd/music/Grunge.ogg")); + music.Add(new Music("snd/music/Rave.ogg")); + music.Add(new Music("snd/music/FastDance.ogg")); + music.Add(new Music("snd/music/SweetDreams.ogg")); + } + catch + { + // can't read ogg files. + } + } - public void unload() - { - bounce.Dispose(); - shatter.Dispose(); - powerup.Dispose(); - ballfall.Dispose(); - speedup.Dispose(); - ching.Dispose(); - die.Dispose(); - - for (int i = 0; i < music.Count; i++) - music[i].Dispose(); - } + public void unload() + { + bounce.Dispose(); + shatter.Dispose(); + powerup.Dispose(); + ballfall.Dispose(); + speedup.Dispose(); + ching.Dispose(); + die.Dispose(); + for (int i = 0; i < music.Count; i++) + music[i].Dispose(); + } + + } } \ No newline at end of file Modified: trunk/Examples/BallBuster.Net/Highscore.cs =================================================================== --- trunk/Examples/BallBuster.Net/Highscore.cs 2014-06-24 03:50:43 UTC (rev 1392) +++ trunk/Examples/BallBuster.Net/Highscore.cs 2014-06-24 05:35:05 UTC (rev 1393) @@ -21,53 +21,56 @@ using System; -class Highscore : IComparable<Highscore> +namespace BallBuster.Net { - public string name = ""; - public int score; + class Highscore : IComparable<Highscore> + { + public string name = ""; + public int score; - public Highscore() - { - score = 0; - } - public Highscore(string name, int score) - { - this.name = name; - this.score = score; - } - public Highscore(string buffer) - { - int i; - for (i = 0; i < buffer.Length; i++) + public Highscore() { - if (buffer[i] == ',') - break; + score = 0; } + public Highscore(string name, int score) + { + this.name = name; + this.score = score; + } + public Highscore(string buffer) + { + int i; + for (i = 0; i < buffer.Length; i++) + { + if (buffer[i] == ',') + break; + } - if (i == buffer.Length) - throw new Exception("Failed to read high score data."); + if (i == buffer.Length) + throw new Exception("Failed to read high score data."); - name = buffer.Substring(0, i); - score = int.Parse(buffer.Substring(i + 1)); + name = buffer.Substring(0, i); + score = int.Parse(buffer.Substring(i + 1)); - } + } - public override string ToString() - { - return string.Format("{0},{1}", name, score); - } + public override string ToString() + { + return string.Format("{0},{1}", name, score); + } - #region IComparable<CHighscore> Members + #region IComparable<CHighscore> Members - public int CompareTo(Highscore other) - { - return score.CompareTo(other.score); + public int CompareTo(Highscore other) + { + return score.CompareTo(other.score); + } + + #endregion } - - #endregion } \ No newline at end of file Deleted: trunk/Examples/BallBuster.Net/OpenTK.dll.config =================================================================== --- trunk/Examples/BallBuster.Net/OpenTK.dll.config 2014-06-24 03:50:43 UTC (rev 1392) +++ trunk/Examples/BallBuster.Net/OpenTK.dll.config 2014-06-24 05:35:05 UTC (rev 1393) @@ -1,8 +0,0 @@ -<configuration> - <dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/> - <dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/> - <dllmap os="linux" dll="openal32.dll" target="libopenal.so.0"/> - <dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> - <dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> - <dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> -</configuration> Modified: trunk/Examples/BallBuster.Net/ScoreByte.cs =================================================================== --- trunk/Examples/BallBuster.Net/ScoreByte.cs 2014-06-24 03:50:43 UTC (rev 1392) +++ trunk/Examples/BallBuster.Net/ScoreByte.cs 2014-06-24 05:35:05 UTC (rev 1393) @@ -22,66 +22,69 @@ using AgateLib.DisplayLib; using AgateLib.Geometry; -class CScoreByte +namespace BallBuster.Net { - string amount; + class CScoreByte + { + string amount; - float x, y; - float vx, vy; - float alpha; - double scale; + float x, y; + float vx, vy; + float alpha; + double scale; - Color mClr; + Color mClr; - Surface image; + Surface image; - public string getAmount() { return amount; } + public string getAmount() { return amount; } - public float getAlpha() { return alpha; } - public int getx - { - get { return (int)(x); } - } - public int gety - { - get - { return (int)(y); } - } + public float getAlpha() { return alpha; } + public int getx + { + get { return (int)(x); } + } + public int gety + { + get + { return (int)(y); } + } - public Surface getImage() { return image; } - public Color getColor() { return mClr; } + public Surface getImage() { return image; } + public Color getColor() { return mClr; } - public CScoreByte(int myx, int myy, string myamount, Surface myimage, Color clr, double scale) - { - alpha = 1.0f; + public CScoreByte(int myx, int myy, string myamount, Surface myimage, Color clr, double scale) + { + alpha = 1.0f; - x = (float)(myx); - y = (float)(myy); - amount = myamount; + x = (float)(myx); + y = (float)(myy); + amount = myamount; - vy = -40; - vx = 0; + vy = -40; + vx = 0; - image = myimage; + image = myimage; - mClr = clr; + mClr = clr; - this.scale = scale; - } + this.scale = scale; + } - public void update(float time_s) - { - x += vx * time_s; - y += vy * time_s; + public void update(float time_s) + { + x += vx * time_s; + y += vy * time_s; - if (y < 10) - y = 10; + if (y < 10) + y = 10; - alpha -= 1.0f * time_s; - } + alpha -= 1.0f * time_s; + } - public double Scale - { - get { return scale; } - } + public double Scale + { + get { return scale; } + } + } } \ No newline at end of file Modified: trunk/Examples/BallBuster.Net/SettingsFile.cs =================================================================== --- trunk/Examples/BallBuster.Net/SettingsFile.cs 2014-06-24 03:50:43 UTC (rev 1392) +++ trunk/Examples/BallBuster.Net/SettingsFile.cs 2014-06-24 05:35:05 UTC (rev 1393) @@ -25,704 +25,707 @@ using System.Collections.Generic; using System.IO; -class SetValStruct +namespace BallBuster.Net { - public string setting; - public string sValue; - public int iValue; - public double dValue; + class SetValStruct + { + public string setting; + public string sValue; + public int iValue; + public double dValue; - public List<int> multivalue = new List<int>(); - public List<string> multivalueString = new List<string>(); + public List<int> multivalue = new List<int>(); + public List<string> multivalueString = new List<string>(); - public override string ToString() - { - return string.Format("{0} = {1}", setting, sValue); - } -}; + public override string ToString() + { + return string.Format("{0} = {1}", setting, sValue); + } + }; -class CSettingsFile -{ - string mFileName; - string mData; - bool mIsValid; + class CSettingsFile + { + string mFileName; + string mData; + bool mIsValid; - Dictionary<string, SetValStruct> mSettings = new Dictionary<string, SetValStruct>(); - List<SetValStruct> mSettingsVector = new List<SetValStruct>(); + Dictionary<string, SetValStruct> mSettings = new Dictionary<string, SetValStruct>(); + List<SetValStruct> mSettingsVector = new List<SetValStruct>(); - List<string> mSections = new List<string>(); + List<string> mSections = new List<string>(); - /// <summary> - /// Initializes a blank settings file. Once initialized, call OpenFile to actuall - /// open a settings file. - /// </summary> - public CSettingsFile() - { - mIsValid = false; - } + /// <summary> + /// Initializes a blank settings file. Once initialized, call OpenFile to actuall + /// open a settings file. + /// </summary> + public CSettingsFile() + { + mIsValid = false; + } - /////////////////////////////////////////////////////////////////////////////////////////// - // CSettingsFile(string fileName) : mIsValid(false) - // - // Initializes a settings file. Automatically opens the file passed in. - // - // Arguments: fileName: name of file to open. - // - // Return Value: none - // - public CSettingsFile(string fileName) - : this() - { - OpenFile(fileName); - } + /////////////////////////////////////////////////////////////////////////////////////////// + // CSettingsFile(string fileName) : mIsValid(false) + // + // Initializes a settings file. Automatically opens the file passed in. + // + // Arguments: fileName: name of file to open. + // + // Return Value: none + // + public CSettingsFile(string fileName) + : this() + { + OpenFile(fileName); + } - /////////////////////////////////////////////////////////////////////////////////////////// - // ~CSettingsFile() - // - // Destroys the settings file and frees any memory used. - // - // Arguments: none - // - // Return Value: none - // - ~CSettingsFile() - { - Clear(); - } + /////////////////////////////////////////////////////////////////////////////////////////// + // ~CSettingsFile() + // + // Destroys the settings file and frees any memory used. + // + // Arguments: none + // + // Return Value: none + // + ~CSettingsFile() + { + Clear(); + } - /////////////////////////////////////////////////////////////////////////////////////////// - // void clear() - // - // Frees any memory used by the structures storing the settings. - // - // Arguments: none - // - // Return Value: none - // - public void Clear() - { - mSettingsVector.Clear(); - mSettings.Clear(); - } + /////////////////////////////////////////////////////////////////////////////////////////// + // void clear() + // + // Frees any memory used by the structures storing the settings. + // + // Arguments: none + // + // Return Value: none + // + public void Clear() + { + mSettingsVector.Clear(); + mSettings.Clear(); + } - /////////////////////////////////////////////////////////////////////////////////////////// - // bool IsValid() - // - // Tells whether or not the file was read properly - // - // Arguments: none - // - // Return Value: true if the object contains useful data. - // - public bool IsValid - { - get - { - return mIsValid; - } - } + /////////////////////////////////////////////////////////////////////////////////////////// + // bool IsValid() + // + // Tells whether or not the file was read properly + // + // Arguments: none + // + // Return Value: true if the object contains useful data. + // + public bool IsValid + { + get + { + return mIsValid; + } + } - /////////////////////////////////////////////////////////////////////////////////////////// - // bool OpenFile(string fileName) - // - // Opens a file, reads it in, and parses it into the settings. - // This function should be able to be called multiple times to combine multiple - // settings files into one data structure in memory. (untested) - // - // Arguments: fileName: name of the file to read. - // - // Return Value: true if the object contains useful data. - // - public bool OpenFile(string fileName) - { - mFileName = fileName; + /////////////////////////////////////////////////////////////////////////////////////////// + // bool OpenFile(string fileName) + // + // Opens a file, reads it in, and parses it into the settings. + // This function should be able to be called multiple times to combine multiple + // settings files into one data structure in memory. (untested) + // + // Arguments: fileName: name of the file to read. + // + // Return Value: true if the object contains useful data. + // + public bool OpenFile(string fileName) + { + mFileName = fileName; - using (StreamReader infile = new StreamReader(fileName)) - { + using (StreamReader infile = new StreamReader(fileName)) + { - mIsValid = false; + mIsValid = false; - mData = infile.ReadToEnd(); + mData = infile.ReadToEnd(); - ParseFile(); + ParseFile(); - return IsValid; - } - } + return IsValid; + } + } - public void Save() - { + public void Save() + { - mSettingsVector.Clear(); - foreach (KeyValuePair<string, SetValStruct> kvp in mSettings) - mSettingsVector.Add(kvp.Value); + mSettingsVector.Clear(); + foreach (KeyValuePair<string, SetValStruct> kvp in mSettings) + mSettingsVector.Add(kvp.Value); - mSettingsVector.Sort(Sorter); + mSettingsVector.Sort(Sorter); - using (StreamWriter writer = new StreamWriter(mFileName)) - { - string lastCategory = ""; + using (StreamWriter writer = new StreamWriter(mFileName)) + { + string lastCategory = ""; - for (int i = 0; i < mSettingsVector.Count; i++) - { - SetValStruct s = mSettingsVector[i]; - string settingname; + for (int i = 0; i < mSettingsVector.Count; i++) + { + SetValStruct s = mSettingsVector[i]; + string settingname; - if (s.setting.Contains(".")) - { - string cat = s.setting.Substring(0, s.setting.IndexOf(".")); + if (s.setting.Contains(".")) + { + string cat = s.setting.Substring(0, s.setting.IndexOf(".")); - if (cat.Equals(lastCategory, StringComparison.OrdinalIgnoreCase) == false) - { - lastCategory = cat; + if (cat.Equals(lastCategory, StringComparison.OrdinalIgnoreCase) == false) + { + lastCategory = cat; - writer.WriteLine(); - writer.WriteLine("[{0}]", lastCategory); - } + writer.WriteLine(); + writer.WriteLine("[{0}]", lastCategory); + } - settingname = s.setting.Replace(cat + ".", ""); - } - else settingname = s.setting; + settingname = s.setting.Replace(cat + ".", ""); + } + else settingname = s.setting; - writer.WriteLine("{0} = {1}", settingname, s.sValue); + writer.WriteLine("{0} = {1}", settingname, s.sValue); - } - } - } + } + } + } - private static int Sorter(SetValStruct a, SetValStruct b) - { - if (a.setting.Contains(".") && b.setting.Contains(".") == false) - return 1; - if (b.setting.Contains(".") && a.setting.Contains(".") == false) - return -1; + private static int Sorter(SetValStruct a, SetValStruct b) + { + if (a.setting.Contains(".") && b.setting.Contains(".") == false) + return 1; + if (b.setting.Contains(".") && a.setting.Contains(".") == false) + return -1; - return a.setting.CompareTo(b.setting); - } + return a.setting.CompareTo(b.setting); + } - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // void ParseFile() - // - // Parses the file. The Settings file parser does the following: - // Break up the file into lines, separated by carriage returns. - // Throw out lines that begin with a '#' which are considered comment lines. - // Look for section headers, which have format: "[section]" - // Split a settings the line on the = sign and store the setting for "Settingname = value" type lines. - // The names of settings are stored as "section.settingname" if there a section was read before this - // line, or just "settingname" otherwise. - // Reads values that list multiple values. If the following string is read: "4, 6, 10, 12..17" - // the values that would be stored are 4, 6, 10, 12, 13, 14, 15, 16, and 17. - // - // Arguments: fileName: name of the file to read. - // - // Return Value: true if the object contains useful data. - // - void ParseFile() - { - SetValStruct s; + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + // void ParseFile() + // + // Parses the file. The Settings file parser does the following: + // Break up the file into lines, separated by carriage returns. + // Throw out lines that begin with a '#' which are considered comment lines. + // Look for section headers, which have format: "[section]" + // Split a settings the line on the = sign and store the setting for "Settingname = value" type lines. + // The names of settings are stored as "section.settingname" if there a section was read before this + // line, or just "settingname" otherwise. + // Reads values that list multiple values. If the following string is read: "4, 6, 10, 12..17" + // the values that would be stored are 4, 6, 10, 12, 13, 14, 15, 16, and 17. + // + // Arguments: fileName: name of the file to read. + // + // Return Value: true if the object contains useful data. + // + void ParseFile() + { + SetValStruct s; - string objectName = ""; - string set, value; + string objectName = ""; + string set, value; - int linesRead = 0; - bool inScript = false; - string script = ""; + int linesRead = 0; + bool inScript = false; + string script = ""; - Clear(); + Clear(); - // - // find the next carriage return - string[] lines = (mData + "\n").Split('\n'); + // + // find the next carriage return + string[] lines = (mData + "\n").Split('\n'); - for (int lineIndex = 0; lineIndex < lines.Length; lineIndex++) - { - string line = lines[lineIndex]; + for (int lineIndex = 0; lineIndex < lines.Length; lineIndex++) + { + string line = lines[lineIndex]; - ++linesRead; + ++linesRead; - line = line.Replace("\r", "").Replace("\n", "").Trim(); + line = line.Replace("\r", "").Replace("\n", "").Trim(); - if (string.IsNullOrEmpty(line) || line[0] == '#') /// this is a comment in a mSettings file - continue; // go to the next part of the for loop + if (string.IsNullOrEmpty(line) || line[0] == '#') /// this is a comment in a mSettings file + continue; // go to the next part of the for loop - if (line.Length < 3) // this is a bogus line (of the file we are reading, not in the code) - { - System.Diagnostics.Debug.WriteLine("Unable to understand line #" + linesRead + ":\n" + line); - continue; - } + if (line.Length < 3) // this is a bogus line (of the file we are reading, not in the code) + { + System.Diagnostics.Debug.WriteLine("Unable to understand line #" + linesRead + ":\n" + line); + continue; + } - // check to see if there's inline script in there. - if (line.Trim().ToLower() == "<script>" && !inScript) - { - inScript = true; + // check to see if there's inline script in there. + if (line.Trim().ToLower() == "<script>" && !inScript) + { + inScript = true; - script = ""; + script = ""; - continue; + continue; - } - // check to see if we are ending a script - else if (line.Trim().ToLower() == "</script>" && inScript) - { - // well, we should save the script that's being read. - inScript = false; + } + // check to see if we are ending a script + else if (line.Trim().ToLower() == "</script>" && inScript) + { + // well, we should save the script that's being read. + inScript = false; - s = new SetValStruct(); + s = new SetValStruct(); - if (objectName != "") - s.setting = objectName + ".script"; - else - s.setting = "script"; + if (objectName != "") + s.setting = objectName + ".script"; + else + s.setting = "script"; - s.sValue = script; + s.sValue = script; - continue; - } - else if (inScript) - { - // we're in the script, but not at the end, so save the line. - script += line + "\n"; + continue; + } + else if (inScript) + { + // we're in the script, but not at the end, so save the line. + script += line + "\n"; - continue; - } + continue; + } - // look for a bracket - int lbracket = line.IndexOf('['); - int rbracket = line.IndexOf(']'); + // look for a bracket + int lbracket = line.IndexOf('['); + int rbracket = line.IndexOf(']'); - if (lbracket != -1 && rbracket != -1) - { - objectName = line.Substring(lbracket + 1, (rbracket - lbracket) - 1).Trim().ToLower(); + if (lbracket != -1 && rbracket != -1) + { + objectName = line.Substring(lbracket + 1, (rbracket - lbracket) - 1).Trim().ToLower(); - if (mSections.Contains(objectName) == false) - mSections.Add(objectName); + if (mSections.Contains(objectName) == false) + mSections.Add(objectName); - continue; - } - else if (lbracket != -1) - { - System.Diagnostics.Debug.Print("Unable to understand line: {0}\n{1}\n", linesRead, line); - continue; - } + continue; + } + else if (lbracket != -1) + { + System.Diagnostics.Debug.Print("Unable to understand line: {0}\n{1}\n", linesRead, line); + continue; + } - // now find an equals sign - int equals = line.IndexOf('='); + // now find an equals sign + int equals = line.IndexOf('='); - if (equals == -1) - { - // no setting? - System.Diagnostics.Debug.Print("No setting on line: {0}\n{1}\n", linesRead, line); - } - else - { - // we found an equals sign, so break this up into the setting and the value - s = new SetValStruct(); + if (equals == -1) + { + // no setting? + System.Diagnostics.Debug.Print("No setting on line: {0}\n{1}\n", linesRead, line); + } + else + { + // we found an equals sign, so break this up into the setting and the value + s = new SetValStruct(); - string[] items = line.Split('='); - set = items[0]; - value = items[1]; + string[] items = line.Split('='); + set = items[0]; + value = items[1]; - if (objectName != "") - s.setting = objectName + "." + set.Trim().ToLower(); - else - s.setting = set.Trim().ToLower(); + if (objectName != "") + s.setting = objectName + "." + set.Trim().ToLower(); + else + s.setting = set.Trim().ToLower(); - s.sValue = value.Trim(); - int.TryParse(value, out s.iValue); - double.TryParse(value, out s.dValue); + s.sValue = value.Trim(); + int.TryParse(value, out s.iValue); + double.TryParse(value, out s.dValue); - //////////////////////////////////////////////////////////////// - // check to see if this is multivalued. - if (s.sValue.Contains("..") || s.sValue.Contains(",")) - { - // yes, it's multivalued. now we need to split up the values and - // build an array + //////////////////////////////////////////////////////////////// + // check to see if this is multivalued. + if (s.sValue.Contains("..") || s.sValue.Contains(",")) + { + // yes, it's multivalued. now we need to split up the values and + // build an array - set = s.sValue; + set = s.sValue; - string[] values = s.sValue.Split(','); - List<string> listValues = new List<string>(); + string[] values = s.sValue.Split(','); + List<string> listValues = new List<string>(); - for (int i = 0; i < values.Length; i++) - { - if (values[i].Contains("..")) - { - string[] range = values[i].Split(new string[] { ".." }, StringSplitOptions.None); + for (int i = 0; i < values.Length; i++) + { + if (values[i].Contains("..")) + { + string[] range = values[i].Split(new string[] { ".." }, StringSplitOptions.None); - if (range.Length != 2) - { - System.Diagnostics.Debug.Print("Unable to understand line: {0}\n{1}\n", - linesRead, line); + if (range.Length != 2) + { + System.Diagnostics.Debug.Print("Unable to understand line: {0}\n{1}\n", + linesRead, line); - break; - } + break; + } - int low = int.Parse(range[0]); - int high = int.Parse(range[1]); + int low = int.Parse(range[0]); + int high = int.Parse(range[1]); - for (int sdf = low; sdf <= high; sdf ++) - { - listValues.Add(sdf.ToString().Trim()); - } + for (int sdf = low; sdf <= high; sdf++) + { + listValues.Add(sdf.ToString().Trim()); + } - } - else - listValues.Add(values[i].Trim()); - } + } + else + listValues.Add(values[i].Trim()); + } - // now store them - for (int i = 0; i < listValues.Count; i++) - { - s.multivalueString.Add(listValues[i]); + // now store them + for (int i = 0; i < listValues.Count; i++) + { + s.multivalueString.Add(listValues[i]); - int myvalue; + int myvalue; - if (int.TryParse(listValues[i], out myvalue)) - { - s.multivalue.Add(myvalue); - } + if (int.TryParse(listValues[i], out myvalue)) + { + s.multivalue.Add(myvalue); + } - } + } - } + } - // store it. - mSettings[s.setting] = s; - mSettingsVector.Add(s); - } + // store it. + mSettings[s.setting] = s; + mSettingsVector.Add(s); + } - } + } - mIsValid = true; + mIsValid = true; - } + } - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // SetValStruct GetSettingStruct(string setting) - // - // Private member used to lookup the setting name passed in. Not really necessary with the - // use of a map, but oh well. - // - // - SetValStruct GetSettingStruct(string setting) - { - return mSettings[setting.ToLower()]; - } + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + // SetValStruct GetSettingStruct(string setting) + // + // Private member used to lookup the setting name passed in. Not really necessary with the + // use of a map, but oh well. + // + // + SetValStruct GetSettingStruct(string setting) + { + return mSettings[setting.ToLower()]; + } - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // string ReadValueS(string setting, string defaultValue) - // - // Looks up the setting passed in and returns its string value. - // This is the part of the setting after the equals sign, exactly as typed, minus any - // leading or trailing spaces. - // - // Arguments: setting: name of the setting to lookup. - // - // Return Value: a string object which contains the value. - // - public string ReadString(string setting, string defaultValue) - { - try - { - SetValStruct s = GetSettingStruct(setting); - return s.sValue; - } - catch - { - return defaultValue; - } + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + // string ReadValueS(string setting, string defaultValue) + // + // Looks up the setting passed in and returns its string value. + // This is the part of the setting after the equals sign, exactly as typed, minus any + // leading or trailing spaces. + // + // Arguments: setting: name of the setting to lookup. + // + // Return Value: a string object which contains the value. + // + public string ReadString(string setting, string defaultValue) + { + try + { + SetValStruct s = GetSettingStruct(setting); + return s.sValue; + } + catch + { + return defaultValue; + } - } - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // int ReadValueI(string setting, int defaultValue) - // - // Looks up the setting passed in and returns its integer value. - // This is the part of the setting after the equals sign, converted to an integer. - // It should be zero if there was a string and no number. - // - // Arguments: setting: name of the setting to lookup. - // - // Return Value: an int which contains the value of the setting. - // - public int ReadInteger(string setting, int defaultValue) - { - try - { - SetValStruct s = GetSettingStruct(setting); - return s.iValue; - } - catch - { - return defaultValue; - } + } + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + // int ReadValueI(string setting, int defaultValue) + // + // Looks up the setting passed in and returns its integer value. + // This is the part of the setting after the equals sign, converted to an integer. + // It should be zero if there was a string and no number. + // + // Arguments: setting: name of the setting to lookup. + // + // Return Value: an int which contains the value of the setting. + // + public int ReadInteger(string setting, int defaultValue) + { + try + { + SetValStruct s = GetSettingStruct(setting); + return s.iValue; + } + catch + { + return defaultValue; + } - } - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // double ReadValueD(string setting, double defaultValue) - // - // Looks up the setting passed in and returns its double value. - // This is the part of the setting after the equals sign, converted to an double. - // It should be zero if there was a string and no number. - // - // Arguments: setting: name of the setting to lookup. - // - // Return Value: a double which contains the value of the setting. - // - public double ReadDouble(string setting, double defaultValue) - { - try - { - SetValStruct s = GetSettingStruct(setting); - return s.dValue; - } - catch - { - return defaultValue; - } + } + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + // double ReadValueD(string setting, double defaultValue) + // + // Looks up the setting passed in and returns its double value. + // This is the part of the setting after the equals sign, converted to an double. + // It should be zero if there was a string and no number. + // + // Arguments: setting: name of the setting to lookup. + // + // Return Value: a double which contains the value of the setting. + // + public double ReadDouble(string setting, double defaultValue) + { + try + { + SetValStruct s = GetSettingStruct(setting); + return s.dValue; + } + catch + { + return defaultValue; + } - } - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // int ReadMultiValueCount(string setting) - // - // Looks up the setting passed in and returns the number of multivalues that setting contains. - // This is for settings which list a series of values. This function returns how many, so that - // the calling function can allocate an array of ints that size. - // - // Arguments: setting: name of the setting to lookup. - // - // Return Value: an int which contains the number of values there are. - // - public int ReadMultiValueCount(string setting) - { - try - { - SetValStruct s = GetSettingStruct(setting); - return s.multivalue.Count; - } - catch - { - return 0; - } + } + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + // int ReadMultiValueCount(string setting) + // + // Looks up the setting passed in and returns the number of multivalues that setting contains. + // This is for settings which list a series of values. This function returns how many, so that + // the calling function can allocate an array of ints that size. + // + // Arguments: setting: name of the setting to lookup. + // + // Return Value: an int which contains the number of values there are. + // + public int ReadMultiValueCount(string setting) + { + try + { + SetValStruct s = GetSettingStruct(setting); + return s.multivalue.Count; + } + catch + { + return 0; + } - } - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // void ReadMultiValueI(string setting, int *array, int arraySize) - // - // Looks up the setting passed in and copies the values into the array. - // This is for settings which list a series of values. This function will copy the - // series of values into the array pointer passed in. The values are unsorted. - // - // Arguments: setting: name of the setting to lookup. - // array: pointer to memory to fill - // arraySize: maximum number of values to write to that pointer. - // - // Return Value: an int which contains the number of values there are. - // - public int[] ReadIntegerArray(string setting) - { - List<int> array; + } + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + // void ReadMultiValueI(string setting, int *array, int arraySize) + // + // Looks up the setting passed in and copies the values into the array. + // This is for settings which list a series of values. This function will copy the + // series of values into the array pointer passed in. The values are unsorted. + // + // Arguments: setting: name of the setting to lookup. + // array: pointer to memory to fill + // arraySize: maximum number of values to write to that pointer. + // + // Return Value: an int which contains the number of values there are. + // + public int[] ReadIntegerArray(string setting) + { + List<int> array; - try - { - SetValStruct s = GetSettingStruct(setting); + try + { + SetValStruct s = GetSettingStruct(setting); - array = new List<int>(); - array.AddRange(s.multivalue); - } - catch - { - return new int[0]; - } + array = new List<int>(); + array.AddRange(s.multivalue); + } + catch + { + return new int[0]; + } - return array.ToArray(); - } - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // string ReadMultiValueS(string setting, int index) - // - // Looks up the setting passed in returns the string index of the multivalued string requested. - // - // Arguments: setting: name of the setting to lookup. - // index: the number of the string to get - // - // Return Value: the actual string value set in the settings file. - // - public string[] ReadStringArray(string setting) - { - try - { - SetValStruct s = GetSettingStruct(setting); + return array.ToArray(); + } + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + // string ReadMultiValueS(string setting, int index) + // + // Looks up the setting passed in returns the string index of the multivalued string requested. + // + // Arguments: setting: name of the setting to lookup. + // index: the number of the string to get + // + // Return Value: the actual string value set in the settings file. + // + public string[] ReadStringArray(string setting) + { + try + { + SetValStruct s = GetSettingStruct(setting); - return s.multivalueString.ToArray(); - } - catch - { - return new string[0]; - } + return s.multivalueString.ToArray(); + } + catch + { + return new string[0]; + } - } + } - public void WriteString(string setting, string value) - { - SetValStruct s; + public void WriteString(string setting, string value) + { + SetValStruct s; - if (mSections.Contains(setting.ToLower())) - { - s = mSettings[setting.ToLower()]; - } - else - { - s = new SetValStruct(); - s.setting = setting; - mSettings.Add(setting.ToLower(), s); - } + if (mSections.Contains(setting.ToLower())) + { + s = mSettings[setting.ToLower()]; + } + else + { + s = new SetValStruct(); + s.setting = setting; + mSettings.Add(setting.ToLower(), s); + } - s.sValue = value; - } - public void WriteInteger(string setting, int value) - { - SetValStruct s; + s.sValue = value; + } + public void WriteInteger(string setting, int value) + { + SetValStruct s; - if (mSections.Contains(setting.ToLower())) - { - s = mSettings[setting.ToLower()]; - } - else - { - s = new SetValStruct(); - s.setting = setting; - mSettings.Add(setting.ToLower(), s); - } + if (mSections.Contains(setting.ToLower())) + { + s = mSettings[setting.ToLower()]; + } + else + { + s = new SetValStruct(); + s.setting = setting; + mSettings.Add(setting.ToLower(), s); + } - s.sValue = value.ToString(); - s.iValue = value; - } - public void WriteDouble(string setting, double value) - { - SetValStruct s; + s.sValue = value.ToString(); + s.iValue = value; + } + public void WriteDouble(string setting, double value) + { + SetValStruct s; - if (mSections.Contains(setting.ToLower())) - { - s = mSettings[setting.ToLower()]; - } - else - { - s = new SetValStruct(); - s.setting = setting; - mSettings.Add(setting.ToLower(), s); - } + if (mSections.Contains(setting.ToLower())) + { + s = mSettings[setting.ToLower()]; + } + else + { + s = new SetValStruct(); + s.setting = setting; + mSettings.Add(setting.ToLower(), s); + } - s.sValue = value.ToString(); - s.dValue = value; - } - public void WriteStringArray(string setting, string[] values) - { - SetValStruct s; + s.sValue = value.ToString(); + s.dValue = value; + } + public void WriteStringArray(string setting, string[] values) + { + SetValStruct s; - if (mSettings.ContainsKey(setting.ToLower())) - { - s = mSettings[setting.ToLower()]; - } - else - { - s = new SetValStruct(); - s.setting = setting; - mSettings.Add(setting.ToLower(), s); - } + if (mSettings.ContainsKey(setting.ToLower())) + { + s = mSettings[setting.ToLower()]; + } + else + { + s = new SetValStruct(); + s.setting = setting; + mSettings.Add(setting.ToLower(), s); + } - s.sValue = string.Join(", ", values); - s.multivalueString.Clear(); - s.multivalueString.AddRange(values); - } - public int SectionCount - { - get - { - return mSections.Count; - } - } + s.sValue = string.Join(", ", values); + s.multivalueString.Clear(); + s.multivalueString.AddRange(values); + } + public int SectionCount + { + get + { + return mSections.Count; + } + } - public string getSection(int index) - { - return mSections[index]; - } + public string getSection(int index) + { + return mSections[index]; + } - - public string ReadString(string setting) - { - return ReadString(setting, ""); - } - public int ReadInteger(string setting) - { - return ReadInteger(setting, 0); - } - public bool ReadBoolean(string setting) - { - return ReadBoolean(setting, false); - } - public bool ReadBoolean(string setting, bool defaultValue) - { - return (ReadInteger(setting, 0) != 0) ? true : false; - } - public double ReadDouble(string setting) - { - return ReadDouble(setting, 0); - } - + public string ReadString(string setting) + { + return ReadString(setting, ""); + } + public int ReadInteger(string setting) + { + return ReadInteger(setting, 0); + } + public bool ReadBoolean(string setting) + { + return ReadBoolean(setting, false); + } + public bool ReadBoolean(string setting, bool defaultValue) + { + return (ReadInteger(setting, 0) != 0) ? true : false; + } + public double ReadDouble(string setting) + { + return ReadDouble(setting, 0); + } - //////////////////////////////////////////////////////////////// - // Array type functions - // - /* - int SettingsCount() - { - return mSettings.Count; - } - string GetSetting(int index) - { - return (mSettings.begin()..setting; - } - string GetValue(int index) - { - return mSettings.GetAt(iSettings[index]).sValue; - } + //////////////////////////////////////////////////////////////// + // Array type functions + // + /* + int SettingsCount() + { + return mSettings.Count; + } - int GetMultiValueCount(int index) - { - return mSettings.GetAt(iSettings[index]).multivalueCount; - } + string GetSetting(int index) + { + return (mSettings.begin()..setting; + } - void GetMultiValue(int index, int *array, int arraySize) - { - SetValStruct s = mSettings.GetAt(iSettings[index]); + string GetValue(int index) + { + return mSettings.GetAt(iSettings[index]).sValue; + } - memcpy(array, s.multivalue, M... [truncated message content] |
From: <ka...@us...> - 2014-06-24 03:50:48
|
Revision: 1392 http://sourceforge.net/p/agate/code/1392 Author: kanato Date: 2014-06-24 03:50:43 +0000 (Tue, 24 Jun 2014) Log Message: ----------- Fix minor bug where framebuffer would remain bound after being created. Modified Paths: -------------- trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs trunk/Drivers/AgateOTK/GL_Surface.cs trunk/Tests/DisplayTests/Prerendered.cs trunk/Tests/DisplayTests/ScreenCapture.cs Modified: trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs =================================================================== --- trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs 2014-06-24 03:28:09 UTC (rev 1391) +++ trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs 2014-06-24 03:50:43 UTC (rev 1392) @@ -84,6 +84,9 @@ mHasDepth = true; mHasStencil = true; + + + GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0); } public override void Dispose() { Modified: trunk/Drivers/AgateOTK/GL_Surface.cs =================================================================== --- trunk/Drivers/AgateOTK/GL_Surface.cs 2014-06-24 03:28:09 UTC (rev 1391) +++ trunk/Drivers/AgateOTK/GL_Surface.cs 2014-06-24 03:50:43 UTC (rev 1392) @@ -332,13 +332,20 @@ { for (int i = rect.Top; i < rect.Bottom; i++) { - int dataIndex = (i - rect.Top) * pixelStride * rect.Width; + int row = i - rect.Top; + + if (FlipVertical) + { + row = rect.Height - row - 1; + } + + int dataIndex = (row) * pixelStride * rect.Width; IntPtr memPtr = (IntPtr)((byte*)memory + i * memStride + rect.Left * pixelStride); Marshal.Copy(memPtr, data, dataIndex, pixelStride * rect.Width); } } - + Marshal.FreeHGlobal(memory); if (format == PixelFormat.RGBA8888) Modified: trunk/Tests/DisplayTests/Prerendered.cs =================================================================== --- trunk/Tests/DisplayTests/Prerendered.cs 2014-06-24 03:28:09 UTC (rev 1391) +++ trunk/Tests/DisplayTests/Prerendered.cs 2014-06-24 03:50:43 UTC (rev 1392) @@ -75,8 +75,6 @@ Display.EndFrame(); Display.RenderTarget = save; - } - } } \ No newline at end of file Modified: trunk/Tests/DisplayTests/ScreenCapture.cs =================================================================== --- trunk/Tests/DisplayTests/ScreenCapture.cs 2014-06-24 03:28:09 UTC (rev 1391) +++ trunk/Tests/DisplayTests/ScreenCapture.cs 2014-06-24 03:50:43 UTC (rev 1392) @@ -41,7 +41,6 @@ } if (capturing) { - // TODO: reimplement this with framebuffers. Display.RenderTarget = capture; someSurface.SetScale(2, 2); } @@ -51,6 +50,7 @@ Display.Clear(Color.White); someSurface.Draw(); + Display.FillRect(10, 10, 10, 10, Color.Gray); Display.EndFrame(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-06-24 03:33:13
|
Revision: 1391 http://sourceforge.net/p/agate/code/1391 Author: kanato Date: 2014-06-24 03:28:09 +0000 (Tue, 24 Jun 2014) Log Message: ----------- Fix bugs in the EXT and ReadPixels framebuffers where images wouldn't render to the framebuffer and the framebuffer would flip if resized. Also fixed some bugs in the persistant settings. Modified Paths: -------------- trunk/AgateLib/Platform.cs trunk/AgateLib/Settings/PersistantSettings.cs trunk/Drivers/AgateLib.WinForms/FormUtil.cs trunk/Drivers/AgateOTK/AgateOTK.csproj trunk/Drivers/AgateOTK/GL3/GLVertexBuffer.cs trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs trunk/Drivers/AgateOTK/Legacy/LegacyVertexBuffer.cs trunk/Drivers/AgateOTK/OpenTK.dll trunk/Drivers/AgateOTK/OpenTK.dll.config trunk/Drivers/AgateOTK/OpenTK.xml trunk/Tests/DisplayTests/MultipleWindows/MultipleWindowTest.cs trunk/Tests/Launcher.cs trunk/Tests/frmLauncher.cs trunk/Tests/settings_list.txt Modified: trunk/AgateLib/Platform.cs =================================================================== --- trunk/AgateLib/Platform.cs 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/AgateLib/Platform.cs 2014-06-24 03:28:09 UTC (rev 1391) @@ -127,9 +127,6 @@ internal void EnsureAppDataDirectoryExists() { - if (Directory.Exists(AppDataDirectory)) - return; - Directory.CreateDirectory(AppDataDirectory); } Modified: trunk/AgateLib/Settings/PersistantSettings.cs =================================================================== --- trunk/AgateLib/Settings/PersistantSettings.cs 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/AgateLib/Settings/PersistantSettings.cs 2014-06-24 03:28:09 UTC (rev 1391) @@ -39,7 +39,7 @@ public class PersistantSettings { Dictionary<string, SettingsGroup> mSettings = new Dictionary<string, SettingsGroup>(); - + #region --- Static Members --- public static ISettingsTracer SettingsTracer { get; set; } @@ -57,7 +57,7 @@ { if (Debug) { - Trace.WriteLine(string.Format("Settings[\"{0}\"][\"{1}\"] read.", groupName, key)); + Trace.WriteLine(string.Format("Settings[\"{0}\"][\"{1}\"]=\"{2}\" read.", groupName, key, value)); } if (SettingsTracer == null) return; @@ -68,7 +68,7 @@ { if (Debug) { - Trace.WriteLine(string.Format("Settings[\"{0}\"][\"{1}\"] written.", groupName, key)); + Trace.WriteLine(string.Format("Settings[\"{0}\"][\"{1}\"]=\"{2}\" written.", groupName, key, value)); } if (SettingsTracer == null) return; @@ -83,16 +83,16 @@ LoadSettings(); } - + private SettingsGroup GetOrCreateSettingsGroup(string name) { - if (name.Contains(" ")) - throw new AgateException("Settings group name cannot contain a space."); + if (name.Contains(" ")) throw new ArgumentException("Settings group name cannot contain a space."); + if (string.IsNullOrEmpty(name)) throw new ArgumentException("Settings group name cannot be blank."); if (mSettings.ContainsKey(name) == false) { mSettings[name] = new SettingsGroup(); - mSettings[name].Name = name; + mSettings[name].Name = name; } return mSettings[name]; @@ -185,12 +185,13 @@ { SettingsGroup g = new SettingsGroup(); + g.Name = node.Name; + foreach (XmlElement pair in node.ChildNodes) { g.Add(pair.Name, pair.InnerXml); } - - g.Name = node.Name; + mSettings.Add(node.Name, g); } } Modified: trunk/Drivers/AgateLib.WinForms/FormUtil.cs =================================================================== --- trunk/Drivers/AgateLib.WinForms/FormUtil.cs 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/Drivers/AgateLib.WinForms/FormUtil.cs 2014-06-24 03:28:09 UTC (rev 1391) @@ -181,9 +181,10 @@ public static void SavePixelBuffer(PixelBuffer buffer, string filename, ImageFileFormat format) { Bitmap bmp = Interop.BitmapFromPixelBuffer(buffer); + var dirname = Path.GetDirectoryName(filename); - if (Directory.Exists(Path.GetDirectoryName(filename)) == false) - throw new DirectoryNotFoundException("The directory " + Path.GetDirectoryName(filename) + " does not exist."); + if (string.IsNullOrEmpty(dirname) == false && Directory.Exists(dirname) == false) + throw new DirectoryNotFoundException("The directory " + dirname + " does not exist."); switch (format) { Modified: trunk/Drivers/AgateOTK/AgateOTK.csproj =================================================================== --- trunk/Drivers/AgateOTK/AgateOTK.csproj 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/Drivers/AgateOTK/AgateOTK.csproj 2014-06-24 03:28:09 UTC (rev 1391) @@ -106,6 +106,10 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>.\OpenTK.dll</HintPath> + </Reference> <Reference Include="System"> <Name>System</Name> </Reference> @@ -124,9 +128,6 @@ <Reference Include="System.Windows.Forms"> <Name>System.Windows.Forms</Name> </Reference> - <Reference Include="OpenTK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4"> - <HintPath>OpenTK.dll</HintPath> - </Reference> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\AgateLib\AgateLib.csproj"> Modified: trunk/Drivers/AgateOTK/GL3/GLVertexBuffer.cs =================================================================== --- trunk/Drivers/AgateOTK/GL3/GLVertexBuffer.cs 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/Drivers/AgateOTK/GL3/GLVertexBuffer.cs 2014-06-24 03:28:09 UTC (rev 1391) @@ -239,9 +239,9 @@ BeginMode beginMode; switch (PrimitiveType) { - case PrimitiveType.TriangleList: beginMode = BeginMode.Triangles; break; - case PrimitiveType.TriangleFan: beginMode = BeginMode.TriangleFan; break; - case PrimitiveType.TriangleStrip: beginMode = BeginMode.TriangleStrip; break; + case AgateLib.DisplayLib.PrimitiveType.TriangleList: beginMode = BeginMode.Triangles; break; + case AgateLib.DisplayLib.PrimitiveType.TriangleFan: beginMode = BeginMode.TriangleFan; break; + case AgateLib.DisplayLib.PrimitiveType.TriangleStrip: beginMode = BeginMode.TriangleStrip; break; default: throw new AgateException(string.Format( Modified: trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs =================================================================== --- trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs 2014-06-24 03:28:09 UTC (rev 1391) @@ -35,10 +35,12 @@ int mFramebufferID; int mDepthBuffer, mStencilBuffer; GL_Surface mTexture; + bool first = true; static bool sDepthSupported = true; static bool sStencilSupported = true; + public FrameBufferExt(Size size) { mSize = size; @@ -188,6 +190,12 @@ { GL.Ext.BindFramebuffer(FramebufferTarget.FramebufferExt, mFramebufferID); GL.PushAttrib(AttribMask.ViewportBit); + + if (first) + { + AgateLib.DisplayLib.Display.Clear(Color.FromArgb(0, 0, 0, 0)); + first = false; + } } public override void EndRender() Modified: trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs =================================================================== --- trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs 2014-06-24 03:28:09 UTC (rev 1391) @@ -39,6 +39,7 @@ this.size = size; surface = new GL_Surface(size); + surface.FlipVertical = true; } public override void MakeCurrent() Modified: trunk/Drivers/AgateOTK/Legacy/LegacyVertexBuffer.cs =================================================================== --- trunk/Drivers/AgateOTK/Legacy/LegacyVertexBuffer.cs 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/Drivers/AgateOTK/Legacy/LegacyVertexBuffer.cs 2014-06-24 03:28:09 UTC (rev 1391) @@ -235,9 +235,9 @@ BeginMode beginMode; switch (PrimitiveType) { - case PrimitiveType.TriangleList: beginMode = BeginMode.Triangles; break; - case PrimitiveType.TriangleFan: beginMode = BeginMode.TriangleFan; break; - case PrimitiveType.TriangleStrip: beginMode = BeginMode.TriangleStrip; break; + case AgateLib.DisplayLib.PrimitiveType.TriangleList: beginMode = BeginMode.Triangles; break; + case AgateLib.DisplayLib.PrimitiveType.TriangleFan: beginMode = BeginMode.TriangleFan; break; + case AgateLib.DisplayLib.PrimitiveType.TriangleStrip: beginMode = BeginMode.TriangleStrip; break; default: throw new AgateException(string.Format( Modified: trunk/Drivers/AgateOTK/OpenTK.dll =================================================================== (Binary files differ) Modified: trunk/Drivers/AgateOTK/OpenTK.dll.config =================================================================== --- trunk/Drivers/AgateOTK/OpenTK.dll.config 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/Drivers/AgateOTK/OpenTK.dll.config 2014-06-24 03:28:09 UTC (rev 1391) @@ -4,9 +4,22 @@ <dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/> <dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> <dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/> + <dllmap os="linux" dll="libX11" target="libX11.so.6"/> + <dllmap os="linux" dll="libXi" target="libXi.so.6"/> + <dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/> + <dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/> <dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> <dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> - <dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> - <dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> + <dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> + <dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> + <dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> <dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/> + <dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/> + <!-- XQuartz compatibility (X11 on Mac) --> + <dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/> + <dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/> + <dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/> + <dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/> + <dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/> + <dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/> </configuration> Modified: trunk/Drivers/AgateOTK/OpenTK.xml =================================================================== --- trunk/Drivers/AgateOTK/OpenTK.xml 2014-04-12 02:38:27 UTC (rev 1390) +++ trunk/Drivers/AgateOTK/OpenTK.xml 2014-06-24 03:28:09 UTC (rev 1391) @@ -4,359 +4,6684 @@ <name>OpenTK</name> </assembly> <members> - <member name="T:OpenTK.Properties.Resources"> + <member name="T:OpenTK.DisplayDevice"> <summary> - A strongly-typed resource class, for looking up localized strings, etc. + Defines a display device on the underlying system, and provides + methods to query and change its display parameters. </summary> </member> - <member name="P:OpenTK.Properties.Resources.ResourceManager"> + <member name="M:OpenTK.DisplayDevice.SelectResolution(System.Int32,System.Int32,System.Int32,System.Single)"> <summary> - Returns the cached ResourceManager instance used by this class. + Selects an available resolution that matches the specified parameters. </summary> + <param name="width">The width of the requested resolution in pixels.</param> + <param name="height">The height of the requested resolution in pixels.</param> + <param name="bitsPerPixel">The bits per pixel of the requested resolution.</param> + <param name="refreshRate">The refresh rate of the requested resolution in hertz.</param> + <returns>The requested DisplayResolution or null if the parameters cannot be met.</returns> + <remarks> + <para>If a matching resolution is not found, this function will retry ignoring the specified refresh rate, + bits per pixel and resolution, in this order. If a matching resolution still doesn't exist, this function will + return the current resolution.</para> + <para>A parameter set to 0 or negative numbers will not be used in the search (e.g. if refreshRate is 0, + any refresh rate will be considered valid).</para> + <para>This function allocates memory.</para> + </remarks> </member> - <member name="P:OpenTK.Properties.Resources.Culture"> + <member name="M:OpenTK.DisplayDevice.ChangeResolution(OpenTK.DisplayResolution)"> + <summary>Changes the resolution of the DisplayDevice.</summary> + <param name="resolution">The resolution to set. <see cref="M:OpenTK.DisplayDevice.SelectResolution(System.Int32,System.Int32,System.Int32,System.Single)"/></param> + <exception cref="T:OpenTK.Graphics.GraphicsModeException">Thrown if the requested resolution could not be set.</exception> + <remarks>If the specified resolution is null, this function will restore the original DisplayResolution.</remarks> + </member> + <member name="M:OpenTK.DisplayDevice.ChangeResolution(System.Int32,System.Int32,System.Int32,System.Single)"> + <summary>Changes the resolution of the DisplayDevice.</summary> + <param name="width">The new width of the DisplayDevice.</param> + <param name="height">The new height of the DisplayDevice.</param> + <param name="bitsPerPixel">The new bits per pixel of the DisplayDevice.</param> + <param name="refreshRate">The new refresh rate of the DisplayDevice.</param> + <exception cref="T:OpenTK.Graphics.GraphicsModeException">Thrown if the requested resolution could not be set.</exception> + </member> + <member name="M:OpenTK.DisplayDevice.RestoreResolution"> + <summary>Restores the original resolution of the DisplayDevice.</summary> + <exception cref="T:OpenTK.Graphics.GraphicsModeException">Thrown if the original resolution could not be restored.</exception> + </member> + <member name="M:OpenTK.DisplayDevice.GetDisplay(OpenTK.DisplayIndex)"> <summary> - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. + Gets the <see cref="T:OpenTK.DisplayDevice"/> for the specified <see cref="T:OpenTK.DisplayIndex"/>. </summary> + <param name="index">The <see cref="T:OpenTK.DisplayIndex"/> that defines the desired display.</param> + <returns>A <see cref="T:OpenTK.DisplayDevice"/> or null, if no device corresponds to the specified index.</returns> </member> - <member name="T:OpenTK.Audio.AudioContext"> + <member name="M:OpenTK.DisplayDevice.ToString"> <summary> - Provides methods to instantiate, use and destroy an audio context for playback. - Static methods are provided to list available devices known by the driver. + Returns a System.String representing this DisplayDevice. </summary> + <returns>A System.String representing this DisplayDevice.</returns> </member> - <member name="M:OpenTK.Audio.AudioContext.#cctor"> - \internal + <member name="P:OpenTK.DisplayDevice.Bounds"> <summary> - Runs before the actual class constructor, to load available devices. + Gets the bounds of this instance in pixel coordinates.. </summary> </member> - <member name="M:OpenTK.Audio.AudioContext.#ctor"> - <summary>Constructs a new AudioContext, using the default audio device.</summary> + <member name="P:OpenTK.DisplayDevice.Width"> + <summary>Gets a System.Int32 that contains the width of this display in pixels.</summary> </member> - <member name="M:OpenTK.Audio.AudioContext.#ctor(System.String)"> + <member name="P:OpenTK.DisplayDevice.Height"> + <summary>Gets a System.Int32 that contains the height of this display in pixels.</summary> + </member> + <member name="P:OpenTK.DisplayDevice.BitsPerPixel"> + <summary>Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.</summary> + </member> + <member name="P:OpenTK.DisplayDevice.RefreshRate"> <summary> - Constructs a new AudioContext instance. + Gets a System.Single representing the vertical refresh rate of this display. </summary> - <param name="device">The device name that will host this instance.</param> </member> - <member name="M:OpenTK.Audio.AudioContext.#ctor(System.String,System.Int32)"> - <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary> - <param name="device">The name of the audio device to use.</param> - <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param> - <remarks> - Use AudioContext.AvailableDevices to obtain a list of all available audio devices. - devices. - </remarks> + <member name="P:OpenTK.DisplayDevice.IsPrimary"> + <summary>Gets a System.Boolean that indicates whether this Display is the primary Display in systems with multiple Displays.</summary> </member> - <member name="M:OpenTK.Audio.AudioContext.#ctor(System.String,System.Int32,System.Int32)"> - <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary> - <param name="device">The name of the audio device to use.</param> - <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param> - <param name="refresh">Refresh intervals, in units of Hz. Pass 0 for driver default.</param> - <remarks> - Use AudioContext.AvailableDevices to obtain a list of all available audio devices. - devices. - </remarks> + <member name="P:OpenTK.DisplayDevice.AvailableResolutions"> + <summary> + Gets the list of <see cref="T:OpenTK.DisplayResolution"/> objects available on this device. + </summary> </member> - <member name="M:OpenTK.Audio.AudioContext.#ctor(System.String,System.Int32,System.Int32,System.Boolean)"> - <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary> - <param name="device">The name of the audio device to use.</param> - <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param> - <param name="refresh">Refresh intervals, in units of Hz. Pass 0 for driver default.</param> - <param name="sync">Flag, indicating a synchronous context.</param> - <remarks> - Use AudioContext.AvailableDevices to obtain a list of all available audio devices. - devices. - </remarks> + <member name="P:OpenTK.DisplayDevice.AvailableDisplays"> + <summary> + Gets the list of available <see cref="T:OpenTK.DisplayDevice"/> objects. + This function allocates memory. + </summary> </member> - <member name="M:OpenTK.Audio.AudioContext.#ctor(System.String,System.Int32,System.Int32,System.Boolean,System.Boolean)"> - <summary>Creates the audio context using the specified device and device parameters.</summary> - <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param> - <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param> - <param name="refresh">Refresh intervals, in units of Hz. Pass 0 for driver default.</param> - <param name="sync">Flag, indicating a synchronous context.</param> - <param name="enableEfx">Indicates whether the EFX extension should be initialized, if present.</param> - <exception cref="T:System.ArgumentNullException">Occurs when the device string is invalid.</exception> - <exception cref="T:System.ArgumentOutOfRangeException">Occurs when a specified parameter is invalid.</exception> - <exception cref="T:OpenTK.Audio.AudioDeviceException"> - Occurs when the specified device is not available, or is in use by another program. - </exception> - <exception cref="T:OpenTK.Audio.AudioContextException"> - Occurs when an audio context could not be created with the specified parameters. - </exception> - <exception cref="T:System.NotSupportedException"> - Occurs when an AudioContext already exists.</exception> - <remarks> - <para>For maximum compatibility, you are strongly recommended to use the default constructor.</para> - <para>Multiple AudioContexts are not supported at this point.</para> - <para> - The number of auxilliary EFX sends depends on the audio hardware and drivers. Most Realtek devices, as well - as the Creative SB Live!, support 1 auxilliary send. Creative's Audigy and X-Fi series support 4 sends. - Values higher than supported will be clamped by the driver. - </para> - </remarks> + <member name="P:OpenTK.DisplayDevice.Default"> + <summary>Gets the default (primary) display of this system.</summary> </member> - <member name="M:OpenTK.Audio.AudioContext.#ctor(System.String,System.Int32,System.Int32,System.Boolean,System.Boolean,OpenTK.Audio.AudioContext.MaxAuxiliarySends)"> - <summary>Creates the audio context using the specified device and device parameters.</summary> - <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param> - <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param> - <param name="refresh">Refresh intervals, in units of Hz. Pass 0 for driver default.</param> - <param name="sync">Flag, indicating a synchronous context.</param> - <param name="enableEfx">Indicates whether the EFX extension should be initialized, if present.</param> - <param name="efxMaxAuxSends">Requires EFX enabled. The number of desired Auxiliary Sends per source.</param> - <exception cref="T:System.ArgumentNullException">Occurs when the device string is invalid.</exception> - <exception cref="T:System.ArgumentOutOfRangeException">Occurs when a specified parameter is invalid.</exception> - <exception cref="T:OpenTK.Audio.AudioDeviceException"> - Occurs when the specified device is not available, or is in use by another program. - </exception> - <exception cref="T:OpenTK.Audio.AudioContextException"> - Occurs when an audio context could not be created with the specified parameters. - </exception> - <exception cref="T:System.NotSupportedException"> - Occurs when an AudioContext already exists.</exception> - <remarks> - <para>For maximum compatibility, you are strongly recommended to use the default constructor.</para> - <para>Multiple AudioContexts are not supported at this point.</para> - <para> - The number of auxilliary EFX sends depends on the audio hardware and drivers. Most Realtek devices, as well - as the Creative SB Live!, support 1 auxilliary send. Creative's Audigy and X-Fi series support 4 sends. - Values higher than supported will be clamped by the driver. - </para> - </remarks> + <member name="P:OpenTK.DisplayDevice.OriginalResolution"> + <summary> + Gets the original resolution of this instance. + </summary> </member> - <member name="M:OpenTK.Audio.AudioContext.CreateContext(System.String,System.Int32,System.Int32,System.Boolean,System.Boolean,OpenTK.Audio.AudioContext.MaxAuxiliarySends)"> - \internal - <summary>Creates the audio context using the specified device.</summary> - <param name="device">The device descriptor obtained through AudioContext.AvailableDevices, or null for the default device.</param> - <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param> - <param name="refresh">Refresh intervals, in units of Hz. Pass 0 for driver default.</param> - <param name="sync">Flag, indicating a synchronous context.</param> - <param name="enableEfx">Indicates whether the EFX extension should be initialized, if present.</param> - <param name="efxAuxiliarySends">Requires EFX enabled. The number of desired Auxiliary Sends per source.</param> - <exception cref="T:System.ArgumentOutOfRangeException">Occurs when a specified parameter is invalid.</exception> - <exception cref="T:OpenTK.Audio.AudioDeviceException"> - Occurs when the specified device is not available, or is in use by another program. - </exception> - <exception cref="T:OpenTK.Audio.AudioContextException"> - Occurs when an audio context could not be created with the specified parameters. - </exception> - <exception cref="T:System.NotSupportedException"> - Occurs when an AudioContext already exists.</exception> - <remarks> - <para>For maximum compatibility, you are strongly recommended to use the default constructor.</para> - <para>Multiple AudioContexts are not supported at this point.</para> - <para> - The number of auxilliary EFX sends depends on the audio hardware and drivers. Most Realtek devices, as well - as the Creative SB Live!, support 1 auxilliary send. Creative's Audigy and X-Fi series support 4 sends. - Values higher than supported will be clamped by the driver. - </para> - </remarks> + <member name="T:OpenTK.DisplayIndex"> + <summary> + Defines <see cref="T:OpenTK.DisplayDevice"/> indices. + </summary> </member> - <member name="M:OpenTK.Audio.AudioContext.MakeCurrent(OpenTK.Audio.AudioContext)"> - \internal - <summary>Makes the specified AudioContext current in the calling thread.</summary> - <param name="context">The OpenTK.Audio.AudioContext to make current, or null.</param> - <exception cref="T:System.ObjectDisposedException"> - Occurs if this function is called after the AudioContext has been disposed. - </exception> - <exception cref="T:OpenTK.Audio.AudioContextException"> - Occurs when the AudioContext could not be made current. - </exception> + <member name="F:OpenTK.DisplayIndex.First"> + <summary> + The first DisplayDevice. + </summary> </member> - <member name="M:OpenTK.Audio.AudioContext.CheckErrors"> + <member name="F:OpenTK.DisplayIndex.Second"> <summary> - Checks for ALC error conditions. + The second DisplayDevice. </summary> - <exception cref="T:System.OutOfMemoryException">Raised when an out of memory error is detected.</exception> - <exception cref="T:OpenTK.Audio.AudioValueException">Raised when an invalid value is detected.</exception> - <exception cref="T:OpenTK.Audio.AudioDeviceException">Raised when an invalid device is detected.</exception> - <exception cref="T:OpenTK.Audio.AudioContextException">Raised when an invalid context is detected.</exception> </member> - <member name="M:OpenTK.Audio.AudioContext.MakeCurrent"> - <summary>Makes the AudioContext current in the calling thread.</summary> - <exception cref="T:System.ObjectDisposedException"> - Occurs if this function is called after the AudioContext has been disposed. - </exception> - <exception cref="T:OpenTK.Audio.AudioContextException"> - Occurs when the AudioContext could not be made current. - </exception> - <remarks> - Only one AudioContext can be current in the application at any time, - <b>regardless of the number of threads</b>. - </remarks> + <member name="F:OpenTK.DisplayIndex.Third"> + <summary> + The third DisplayDevice. + </summary> </member> - <member name="M:OpenTK.Audio.AudioContext.Process"> + <member name="F:OpenTK.DisplayIndex.Fourth"> <summary> - Processes queued audio events. + The fourth DisplayDevice. </summary> + </member> + <member name="F:OpenTK.DisplayIndex.Fifth"> + <summary> + The fifth DisplayDevice. + </summary> + </member> + <member name="F:OpenTK.DisplayIndex.Sixth"> + <summary> + The sixth DisplayDevice. + </summary> + </member> + <member name="F:OpenTK.DisplayIndex.Primary"> + <summary> + The default (primary) DisplayDevice. + </summary> + </member> + <member name="F:OpenTK.DisplayIndex.Default"> + <summary> + The default (primary) DisplayDevice. + </summary> + </member> + <member name="T:OpenTK.Input.GamePadThumbSticks"> + <summary> + Describes the current thumb stick state of a <see cref="T:OpenTK.Input.GamePad"/> device + </summary> + </member> + <member name="M:OpenTK.Input.GamePadThumbSticks.op_Equality(OpenTK.Input.GamePadThumbSticks,OpenTK.Input.GamePadThumbSticks)"> + <param name="left">A <see cref="T:OpenTK.Input.GamePadThumbSticks"/> instance to test for equality.</param> + <param name="right">A <see cref="T:OpenTK.Input.GamePadThumbSticks"/> instance to test for equality.</param> + </member> + <member name="M:OpenTK.Input.GamePadThumbSticks.op_Inequality(OpenTK.Input.GamePadThumbSticks,OpenTK.Input.GamePadThumbSticks)"> + <param name="left">A <see cref="T:OpenTK.Input.GamePadThumbSticks"/> instance to test for inequality.</param> + <param name="right">A <see cref="T:OpenTK.Input.GamePadThumbSticks"/> instance to test for inequality.</param> + </member> + <member name="M:OpenTK.Input.GamePadThumbSticks.ToString"> + <summary> + Returns a <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>. + </summary> + <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>.</returns> + </member> + <member name="M:OpenTK.Input.GamePadThumbSticks.GetHashCode"> + <summary> + Serves as a hash function for a <see cref="T:OpenTK.Input.GamePadThumbSticks"/> object. + </summary> + <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.</returns> + </member> + <member name="M:OpenTK.Input.GamePadThumbSticks.Equals(System.Object)"> + <summary> + Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>. + </summary> + <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>.</param> + <returns><c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current + <see cref="T:OpenTK.Input.GamePadThumbSticks"/>; otherwise, <c>false</c>.</returns> + </member> + <member name="M:OpenTK.Input.GamePadThumbSticks.Equals(OpenTK.Input.GamePadThumbSticks)"> + <summary> + Determines whether the specified <see cref="T:OpenTK.Input.GamePadThumbSticks"/> is equal to the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>. + </summary> + <param name="other">The <see cref="T:OpenTK.Input.GamePadThumbSticks"/> to compare with the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>.</param> + <returns><c>true</c> if the specified <see cref="T:OpenTK.Input.GamePadThumbSticks"/> is equal to the current + <see cref="T:OpenTK.Input.GamePadThumbSticks"/>; otherwise, <c>false</c>.</returns> + </member> + <member name="P:OpenTK.Input.GamePadThumbSticks.Left"> + <summary> + Gets a <see cref="T:OpenTK.Vector2"/> describing the state of the left thumb stick. + </summary> + </member> + <member name="P:OpenTK.Input.GamePadThumbSticks.Right"> + <summary> + Gets a <see cref="T:OpenTK.Vector2"/> describing the state of the right thumb stick. + </summary> + </member> + <member name="T:OpenTK.Input.GamePadTriggers"> + <summary> + Describes the state of a <see cref="T:OpenTK.Input.GamePad"/> trigger buttons. + </summary> + </member> + <member name="M:OpenTK.Input.GamePadTriggers.op_Equality(OpenTK.Input.GamePadTriggers,OpenTK.Input.GamePadTriggers)"> + <param name="left">A <see cref="T:OpenTK.Input.GamePadTriggers"/> instance to test for equality.</param> + <param name="right">A <see cref="T:OpenTK.Input.GamePadTriggers"/> instance to test for equality.</param> + </member> + <member name="M:OpenTK.Input.GamePadTriggers.op_Inequality(OpenTK.Input.GamePadTriggers,OpenTK.Input.GamePadTriggers)"> + <param name="left">A <see cref="T:OpenTK.Input.GamePadTriggers"/> instance to test for equality.</param> + <param name="right">A <see cref="T:OpenTK.Input.GamePadTriggers"/> instance to test for equality.</param> + </member> + <member name="M:OpenTK.Input.GamePadTriggers.ToString"> + <summary> + Returns a <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.GamePadTriggers"/>. + </summary> + <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.GamePadTriggers"/>.</returns> + </member> + <member name="M:OpenTK.Input.GamePadTriggers.GetHashCode"> + <summary> + Serves as a hash function for a <see cref="T:OpenTK.Input.GamePadTriggers"/> object. + </summary> + <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.</returns> + </member> + <member name="M:OpenTK.Input.GamePadTriggers.Equals(System.Object)"> + <summary> + Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:OpenTK.Input.GamePadTriggers"/>. + </summary> + <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:OpenTK.Input.GamePadTriggers"/>.</param> + <returns><c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current + <see cref="T:OpenTK.Input.GamePadTriggers"/>; otherwise, <c>false</c>.</returns> + </member> + <member name="M:OpenTK.Input.GamePadTriggers.Equals(OpenTK.Input.GamePadTriggers)"> + <summary> + Determines whether the specified <see cref="T:OpenTK.Input.GamePadTriggers"/> is equal to the current <see cref="T:OpenTK.Input.GamePadTriggers"/>. + </summary> + <param name="other">The <see cref="T:OpenTK.Input.GamePadTriggers"/> to compare with the current <see cref="T:OpenTK.Input.GamePadTriggers"/>.</param> + <returns><c>true</c> if the specified <see cref="T:OpenTK.Input.GamePadTriggers"/> is equal to the current + <see cref="T:OpenTK.Input.GamePadTriggers"/>; otherwise, <c>false</c>.</returns> + </member> + <member name="P:OpenTK.Input.GamePadTriggers.Left"> + <summary> + Gets the offset of the left trigger button, between 0.0 and 1.0. + </summary> + </member> + <member name="P:OpenTK.Input.GamePadTriggers.Right"> + <summary> + Gets the offset of the left trigger button, between 0.0 and 1.0. + </summary> + </member> + <member name="T:OpenTK.Input.GamePadType"> + <summary> + Enumerates available <see cref="F:OpenTK.Input.GamePadType.GamePad"/> types. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.Unknown"> + <summary> + The <c>GamePad</c> is of an unknown type. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.ArcadeStick"> + <summary> + The <c>GamePad</c> is an arcade stick. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.DancePad"> + <summary> + The <c>GamePad</c> is a dance pad. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.FlightStick"> + <summary> + The <c>GamePad</c> is a flight stick. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.Guitar"> + <summary> + The <c>GamePad</c> is a guitar. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.Wheel"> + <summary> + The <c>GamePad</c> is a driving wheel. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.AlternateGuitar"> + <summary> + The <c>GamePad</c> is an alternate guitar. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.BigButtonPad"> + <summary> + The <c>GamePad</c> is a big button pad. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.DrumKit"> + <summary> + The <c>GamePad</c> is a drum kit. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.GamePad"> + <summary> + The <c>GamePad</c> is a game pad. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.ArcadePad"> + <summary> + The <c>GamePad</c> is an arcade pad. + </summary> + </member> + <member name="F:OpenTK.Input.GamePadType.BassGuitar"> + <summary> + The <c>GamePad</c> is a bass guitar. + </summary> + </member> + <member name="M:OpenTK.Input.IGamePadDriver.GetName(System.Int32)"> + <summary> + Retrieves the device name for the gamepad device. + </summary> + <param name="index">The index of the gamepad device.</param> + <returns>A <see cref="T:System.String"/> with the name of the specified device or <see cref="F:System.String.Empty"/>.</returns> <remarks> - <para> - If AudioContext.IsSynchronized is true, this function will resume - the internal audio processing thread. If AudioContext.IsSynchronized is false, - you will need to call this function multiple times per second to process - audio events. - </para> - <para> - In some implementations this function may have no effect. - </para> - </remarks> - <exception cref="T:System.ObjectDisposedException">Occurs when this function is called after the AudioContext had been disposed.</exception> - <seealso cref="M:OpenTK.Audio.AudioContext.Suspend"/> - <seealso cref="P:OpenTK.Audio.AudioContext.IsProcessing"/> - <seealso cref="P:OpenTK.Audio.AudioContext.IsSynchronized"/> + <para>If no device exists at the specified index, the return value is <see cref="F:System.String.Empty"/>.</para></remarks> </member> - <member name="M:OpenTK.Audio.AudioContext.Suspend"> + <member name="M:OpenTK.Input.IKeyboardDriver2.GetState"> <summary> - Suspends processing of audio events. + Retrieves the combined <see cref="T:OpenTK.Input.KeyboardState"/> for all keyboard devices. </summary> + <returns>An <see cref="T:OpenTK.Input.KeyboardState"/> structure containing the combined state for all keyboard devices.</returns> + </member> + <member name="M:OpenTK.Input.IKeyboardDriver2.GetState(System.Int32)"> + <summary> + Retrieves the <see cref="T:OpenTK.Input.KeyboardState"/> for the specified keyboard device. + </summary> + <param name="index">The index of the keyboard device.</param> + <returns>An <see cref="T:OpenTK.Input.KeyboardState"/> structure containing the state of the keyboard device.</returns> + </member> + <member name="M:OpenTK.Input.IKeyboardDriver2.GetDeviceName(System.Int32)"> + <summary> + Retrieves the device name for the keyboard device. + </summary> + <param name="index">The index of the keyboard device.</param> + <returns>A <see cref="T:System.String"/> with the name of the specified device or <see cref="F:System.String.Empty"/>.</returns> <remarks> - <para> - To avoid audio artifacts when calling this function, set audio gain to zero before - suspending an AudioContext. - </para> - <para> - In some implementations, it can be faster to suspend processing before changing - AudioContext state. - </para> - <para> - In some implementations this function may have no effect. - </para> - </remarks> - <exception cref="T:System.ObjectDisposedException">Occurs when this function is called after the AudioContext had been disposed.</exception> - <seealso cref="M:OpenTK.Audio.AudioContext.Process"/> - <seealso cref="P:OpenTK.Audio.AudioContext.IsProcessing"/> - <seealso cref="P:OpenTK.Audio.AudioContext.IsSynchronized"/> + <para>If no device exists at the specified index, the return value is <see cref="F:System.String.Empty"/>.</para></remarks> </member> - <member name="M:OpenTK.Audio.AudioContext.SupportsExtension(System.String)"> + <member name="T:OpenTK.Input.Joystick"> <summary> - Checks whether the specified OpenAL extension is supported. + Provides access to Joystick devices. + Joystick devices provide a varying number of axes and buttons. + Use <c>GetCapabilities</c> to retrieve the number of supported + axes and buttons on a given device. + Use <c>GetState</c> to retrieve the current state of a given device. </summary> - <param name="extension">The name of the extension to check (e.g. "ALC_EXT_EFX").</param> - <returns>true if the extension is supported; false otherwise.</returns> + <seealso cref="T:OpenTK.Input.GamePad"/> </member> - <member name="M:OpenTK.Audio.AudioContext.Dispose"> + <member name="M:OpenTK.Input.Joystick.GetCapabilities(System.Int32)"> <summary> - Disposes of the AudioContext, cleaning up all resources consumed by it. + Retrieves the <see cref="T:OpenTK.Input.JoystickCapabilities"/> of the device connected + at the specified index. </summary> + <returns> + A <see cref="T:OpenTK.Input.JoystickCapabilities"/> structure describing + the capabilities of the device at the specified index. + If no device is connected at the specified index, the <c>IsConnected</c> + property of the returned structure will be false. + </returns> + <param name="index">The zero-based index of the device to poll.</param> </member> - <member name="M:OpenTK.Audio.AudioContext.Finalize"> + <member name="M:OpenTK.Input.Joystick.GetState(System.Int32)"> <summary> - Finalizes this instance. + Retrieves the <see cref="T:OpenTK.Input.JoystickState"/> of the device connected + at the specified index. </summary> + <returns>A <see cref="T:OpenTK.Input.JoystickState"/> structure describing + the current state of the device at the specified index. + If no device is connected at this index, the <c>IsConnected</c> + property of the returned structure will be false. + </returns> + <param name="index">The zero-based index of the device to poll.</param> </member> - <member name="M:OpenTK.Audio.AudioContext.GetHashCode"> + <member name="T:OpenTK.Input.JoystickAxis"> <summary> - Calculates the hash code for this instance. + Defines available JoystickDevice axes. </summary> - <returns></returns> </member> - <member name="M:OpenTK.Audio.AudioContext.Equals(System.Object)"> + <member name="F:OpenTK.Input.JoystickAxis.Axis0"> + <summary>The first axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis1"> + <summary>The second axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis2"> + <summary>The third axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis3"> + <summary>The fourth axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis4"> + <summary>The fifth axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis5"> + <summary>The sixth axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis6"> + <summary>The seventh axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis7"> + <summary>The eighth axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis8"> + <summary>The ninth axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis9"> + <summary>The tenth axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Axis10"> + <summary>The eleventh axis of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickAxis.Last"> + <summary>The highest supported axis of the JoystickDevice.</summary> + </member> + <member name="T:OpenTK.Input.JoystickButton"> <summary> - Compares this instance with another. + Defines available JoystickDevice buttons. </summary> - <param name="obj">The instance to compare to.</param> - <returns>True, if obj refers to this instance; false otherwise.</returns> </member> - <member name="M:OpenTK.Audio.AudioContext.ToString"> + <member name="F:OpenTK.Input.JoystickButton.Button0"> + <summary>The first button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button1"> + <summary>The second button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button2"> + <summary>The third button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button3"> + <summary>The fourth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button4"> + <summary>The fifth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button5"> + <summary>The sixth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button6"> + <summary>The seventh button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button7"> + <summary>The eighth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button8"> + <summary>The ninth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button9"> + <summary>The tenth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button10"> + <summary>The eleventh button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button11"> + <summary>The twelfth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button12"> + <summary>The thirteenth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button13"> + <summary>The fourteenth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button14"> + <summary>The fifteenth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button15"> + <summary>The sixteenth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button16"> + <summary>The seventeenth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button17"> + <summary>The eighteenth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button18"> + <summary>The nineteenth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button19"> + <summary>The twentieth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button20"> + <summary>The twentyfirst button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button21"> + <summary>The twentysecond button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button22"> + <summary>The twentythird button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button23"> + <summary>The twentyfourth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button24"> + <summary>The twentyfifth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button25"> + <summary>The twentysixth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button26"> + <summary>The twentyseventh button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button27"> + <summary>The twentyeighth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button28"> + <summary>The twentynineth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button29"> + <summary>The thirtieth button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button30"> + <summary>The thirtyfirst button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Button31"> + <summary>The thirtysecond button of the JoystickDevice.</summary> + </member> + <member name="F:OpenTK.Input.JoystickButton.Last"> + <summary>The last supported button of the JoystickDevice.</summary> + </member> + <member name="T:OpenTK.Input.JoystickCapabilities"> <summary> - Returns a <see cref="T:System.String"/> that desrcibes this instance. + Describes the <c>JoystickCapabilities</c> of a <see cref="T:OpenTK.Input.JoystickDevice"/>. </summary> - <returns>A <see cref="T:System.String"/> that desrcibes this instance.</returns> </member> - <member name="P:OpenTK.Audio.AudioContext.IsCurrent"> + <member name="M:OpenTK.Input.JoystickCapabilities.ToString"> <summary> - Gets or sets a System.Boolean indicating whether the AudioContext - is current. + Returns a <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>. </summary> - <remarks> - Only one AudioContext can be current in the application at any time, - <b>regardless of the number of threads</b>. - </remarks> + <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>.</returns> </member> - <member name="P:OpenTK.Audio.AudioContext.CurrentError"> + <member name="M:OpenTK.Input.JoystickCapabilities.GetHashCode"> <summary> - Returns the ALC error code for this instance. + Serves as a hash function for a <see cref="T:OpenTK.Input.JoystickCapabilities"/> object. </summary> + <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.</returns> </member> - <member name="P:OpenTK.Audio.AudioContext.IsProcessing"> + <member name="M:OpenTK.Input.JoystickCapabilities.Equals(System.Object)"> <summary> - Gets a System.Boolean indicating whether the AudioContext is - currently processing audio events. + Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>. </summary> - <seealso cref="M:OpenTK.Audio.AudioContext.Process"/> - <seealso cref="M:OpenTK.Audio.AudioContext.Suspend"/> + <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>.</param> + <returns><c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current + <see cref="T:OpenTK.Input.JoystickCapabilities"/>; otherwise, <c>false</c>.</returns> </member> - <member name="P:OpenTK.Audio.AudioContext.IsSynchronized"> + <member name="M:OpenTK.Input.JoystickCapabilities.Equals(OpenTK.Input.JoystickCapabilities)"> <summary> - Gets a System.Boolean indicating whether the AudioContext is - synchronized. + Determines whether the specified <see cref="T:OpenTK.Input.JoystickCapabilities"/> is equal to the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>. </summary> - <seealso cref="M:OpenTK.Audio.AudioContext.Process"/> + <param name="other">The <see cref="T:OpenTK.Input.JoystickCapabilities"/> to compare with the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>.</param> + <returns><c>true</c> if the specified <see cref="T:OpenTK.Input.JoystickCapabilities"/> is equal to the current + <see cref="T:OpenTK.Input.JoystickCapabilities"/>; otherwise, <c>false</c>.</returns> </member> - <member name="P:OpenTK.Audio.AudioContext.CurrentDevice"> + <member name="P:OpenTK.Input.JoystickCapabilities.AxisCount"> <summary> - Gets a System.String with the name of the device used in this context. + Gets the number of axes supported by this <see cref="T:OpenTK.Input.JoystickDevice"/>. </summary> </member> - <member name="P:OpenTK.Audio.AudioContext.CurrentContext"> + <member name="P:OpenTK.Input.JoystickCapabilities.ButtonCount"> <summary> - Gets the OpenTK.Audio.AudioContext which is current in the application. + Gets the number of buttons supported by this <see cref="T:OpenTK.Input.JoystickDevice"/>. </summary> - <remarks> - Only one AudioContext can be current in the application at any time, - <b>regardless of the number of threads</b>. - </remarks> </member> - <member name="P:OpenTK.Audio.AudioContext.AvailableDevices"> + <member name="P:OpenTK.Input.JoystickCapabilities.HatCount"> <summary> - Returns a list of strings containing all known playback devices. + Gets the number of hats supported by this <see cref="T:OpenTK.Input.JoystickDevice"/>. </summary> </member> - <member name="P:OpenTK.Audio.AudioContext.DefaultDevice"> + <member name="P:OpenTK.Input.JoystickCapabilities.IsConnected"> <summary> - Returns the name of the device that will be used as playback default. + Gets a value indicating whether this <see cref="T:OpenTK.Input.JoystickDevice"/> is connected. </summary> + <value><c>true</c> if this instance is connected; otherwise, <c>false</c>.</value> </member> - <member name="T:OpenTK.Audio.AudioContext.MaxAuxiliarySends"> - <summary>May be passed at context construction time to indicate the number of desired auxiliary effect slot sends per source.</summary> + <member name="T:OpenTK.Input.JoystickState"> + <summary> + Describes the current state of a <see cref="T:OpenTK.Input.JoystickDevice"/>. + </summary> </member> - <member name="F:OpenTK.Audio.AudioContext.MaxAuxiliarySends.UseDriverDefault"> - <summary>Wi... [truncated message content] |
From: <ka...@us...> - 2014-04-12 02:38:31
|
Revision: 1390 http://sourceforge.net/p/agate/code/1390 Author: kanato Date: 2014-04-12 02:38:27 +0000 (Sat, 12 Apr 2014) Log Message: ----------- Attempt to fix bug where referenced assemblies aren't searched for types. Modified Paths: -------------- trunk/AgateLib/Serialization/Xle/XleSerializer.cs Modified: trunk/AgateLib/Serialization/Xle/XleSerializer.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-04-12 02:17:55 UTC (rev 1389) +++ trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-04-12 02:38:27 UTC (rev 1390) @@ -58,7 +58,8 @@ assembly = Assembly.GetCallingAssembly(); typeBinder.AddAssembly(assembly); - + typeBinder.AddAssembly(Assembly.GetCallingAssembly()); + Binder = typeBinder; this.objectType = objectType; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-04-12 02:18:00
|
Revision: 1389 http://sourceforge.net/p/agate/code/1389 Author: kanato Date: 2014-04-12 02:17:55 +0000 (Sat, 12 Apr 2014) Log Message: ----------- Add FillRectangle for PixelBuffer and some better error reporting when saving images. Modified Paths: -------------- trunk/AgateLib/DisplayLib/PixelBuffer.cs trunk/Drivers/AgateLib.WinForms/FormUtil.cs Modified: trunk/AgateLib/DisplayLib/PixelBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-04-05 18:18:57 UTC (rev 1388) +++ trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-04-12 02:17:55 UTC (rev 1389) @@ -1248,6 +1248,21 @@ } } } + /// <summary> + /// Fills the specified rectangle with the passed color. + /// </summary> + /// <param name="color"></param> + /// <param name="inside"></param> + public void FillRectangle(Color color, Rectangle inside) + { + for (int j = inside.Y; j < inside.Bottom ;j++) + { + for (int i = inside.X; i < inside.Right; i++) + { + SetPixel(i, j, color); + } + } + } public static bool PixelsEqual(PixelBuffer a, PixelBuffer b) { Modified: trunk/Drivers/AgateLib.WinForms/FormUtil.cs =================================================================== --- trunk/Drivers/AgateLib.WinForms/FormUtil.cs 2014-04-05 18:18:57 UTC (rev 1388) +++ trunk/Drivers/AgateLib.WinForms/FormUtil.cs 2014-04-12 02:17:55 UTC (rev 1389) @@ -24,6 +24,7 @@ using AgateLib.DisplayLib; using AgateLib.InputLib; +using System.IO; namespace AgateLib.WinForms { @@ -181,6 +182,9 @@ { Bitmap bmp = Interop.BitmapFromPixelBuffer(buffer); + if (Directory.Exists(Path.GetDirectoryName(filename)) == false) + throw new DirectoryNotFoundException("The directory " + Path.GetDirectoryName(filename) + " does not exist."); + switch (format) { case ImageFileFormat.Bmp: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-04-05 18:18:58
|
Revision: 1388 http://sourceforge.net/p/agate/code/1388 Author: kanato Date: 2014-04-05 18:18:57 +0000 (Sat, 05 Apr 2014) Log Message: ----------- Enhance PixelBuffer.CopyFrom to optionally skip transparent pixels. Add comparison method for PixelBuffers. Modified Paths: -------------- trunk/AgateLib/DisplayLib/PixelBuffer.cs Modified: trunk/AgateLib/DisplayLib/PixelBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-03-22 23:31:10 UTC (rev 1387) +++ trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-04-05 18:18:57 UTC (rev 1388) @@ -18,6 +18,7 @@ // using System; using System.Collections.Generic; +using System.Linq; using System.Runtime.InteropServices; using System.Text; @@ -483,7 +484,11 @@ /// <param name="clip">If true, the copied region will automatically /// be clipped. If false, this method will throw an exception if the area /// being copied to is out of range.</param> - public void CopyFrom(PixelBuffer buffer, Rectangle srcRect, Point destPt, bool clip) + /// <param name="skipTransparent">Pass true to avoid copying transparent pixels + /// for pixel formats that contain an alpha channel. This will only avoid copying + /// a pixel if it has an alpha of exactly 0. Passing true can reduce performance + /// significantly.</param> + public void CopyFrom(PixelBuffer buffer, Rectangle srcRect, Point destPt, bool clip, bool skipTransparent = false) { if (clip == false) { @@ -499,32 +504,50 @@ if (destPt.X < 0 || destPt.Y < 0) throw new ArgumentOutOfRangeException("destPt", "Destination cannot be less than zero."); - if (buffer.RowStride == RowStride && buffer.PixelFormat == PixelFormat && destPt.X == 0) + if (skipTransparent) { - int destIndex = GetPixelIndex(destPt.X, destPt.Y); - int srcIndex = buffer.GetPixelIndex(srcRect.X, srcRect.Y); + for (int y = 0; y < srcRect.Height; y++) + { + for (int x = 0; x < srcRect.Width; x++) + { + Color pixel = buffer.GetPixel(x + srcRect.X, y + srcRect.Y); - int size = buffer.RowStride * srcRect.Height; + if (pixel.A == 0) + continue; - Array.Copy(buffer.Data, srcIndex, Data, destIndex, size); + SetPixel(x + destPt.X, y + destPt.Y, pixel); + } + } } - for (int y = 0; y < srcRect.Height; y++) + else { - if (buffer.PixelFormat == PixelFormat) + if (buffer.RowStride == RowStride && buffer.PixelFormat == PixelFormat && destPt.X == 0) { - int destIndex = GetPixelIndex(destPt.X, y + destPt.Y); - int srcIndex = buffer.GetPixelIndex(srcRect.X, y + srcRect.Y); + int destIndex = GetPixelIndex(destPt.X, destPt.Y); + int srcIndex = buffer.GetPixelIndex(srcRect.X, srcRect.Y); - Array.Copy(buffer.Data, srcIndex, - Data, destIndex, PixelStride * srcRect.Width); + int size = buffer.RowStride * srcRect.Height; + + Array.Copy(buffer.Data, srcIndex, Data, destIndex, size); } - else + for (int y = 0; y < srcRect.Height; y++) { - for (int x = 0; x < srcRect.Width; x++) + if (buffer.PixelFormat == PixelFormat) { - Color pixel = buffer.GetPixel(x + srcRect.X, y + srcRect.Y); - SetPixel(x + destPt.X, y + destPt.Y, pixel); + int destIndex = GetPixelIndex(destPt.X, y + destPt.Y); + int srcIndex = buffer.GetPixelIndex(srcRect.X, y + srcRect.Y); + + Array.Copy(buffer.Data, srcIndex, + Data, destIndex, PixelStride * srcRect.Width); } + else + { + for (int x = 0; x < srcRect.Width; x++) + { + Color pixel = buffer.GetPixel(x + srcRect.X, y + srcRect.Y); + SetPixel(x + destPt.X, y + destPt.Y, pixel); + } + } } } } @@ -724,7 +747,7 @@ for (int y = 0; y < Height; y++) { Marshal.Copy(rowPtr, srcPixel, 0, srcRowStride); - + // check for common Win32 - OpenGL conversion case if (this.PixelFormat == PixelFormat.RGBA8888 && srcFormat == PixelFormat.BGRA8888) @@ -1217,7 +1240,7 @@ { for (int i = x; i < x + width; i++) { - if (Math.Pow(i - centerx, 2) * _height * _height + Math.Pow(j - centery, 2) * _width * _width + if (Math.Pow(i - centerx, 2) * _height * _height + Math.Pow(j - centery, 2) * _width * _width <= _height * _height * _width * _width) { SetPixel(i, j, color); @@ -1225,5 +1248,35 @@ } } } + + public static bool PixelsEqual(PixelBuffer a, PixelBuffer b) + { + if (object.ReferenceEquals(a, b)) + return true; + + if (a.Width != b.Width) + return false; + if (a.Height != b.Height) + return false; + + if (a.PixelFormat == b.PixelFormat) + { + if (a.Data.SequenceEqual(b.Data)) + return true; + else + return false; + } + + for (int y = 0; y < a.Height; y++) + { + for (int x = 0; x < a.Width; x++) + { + if (a.GetPixel(x, y) != b.GetPixel(x, y)) + return false; + } + } + + return true; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |