Thread: [Agate-svn-commit] SF.net SVN: agate:[1406] trunk (Page 5)
Status: Alpha
Brought to you by:
kanato
|
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 IsE...
[truncated message content] |
|
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.SettingsSingleFileGener...
[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 nam...
[truncated message content] |
|
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)
+++ tru...
[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-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...
[truncated message content] |
|
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...
[truncated message content] |
|
From: <ka...@us...> - 2014-07-25 01:11:11
|
Revision: 1413
http://sourceforge.net/p/agate/code/1413
Author: kanato
Date: 2014-07-25 01:11:04 +0000 (Fri, 25 Jul 2014)
Log Message:
-----------
Almost compiles as a portable library.
Modified Paths:
--------------
trunk/AgateLib/AgateGame.cs
trunk/AgateLib/AgateLib-Portable.csproj
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AppInitParameters.cs
trunk/AgateLib/AudioLib/Audio.cs
trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/InputLib/JoystickInput.cs
trunk/AgateLib/Resources/AgateResourceException.cs
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
Added Paths:
-----------
trunk/AgateLib/Diagnostics/Log.cs
trunk/AgateLib/Drivers/IAgateFactory.cs
trunk/AgateLib/Drivers/IAudioFactory.cs
trunk/AgateLib/Drivers/IDisplayFactory.cs
trunk/AgateLib/Drivers/IInputFactory.cs
trunk/AgateLib/Drivers/IPlatformFactory.cs
trunk/AgateLib/IO/
trunk/AgateLib/IO/FileSystem.cs
trunk/AgateLib/Platform/IStopWatch.cs
trunk/AgateLib/Platform/PlatformInfo.cs
trunk/AgateLib/Platform/Timing.cs
trunk/AgateLib.Platform.WindowsForms/FormsPlatformInfo.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs
Removed Paths:
-------------
trunk/AgateLib/Platform/Platform.cs
trunk/AgateLib/Timing.cs
Modified: trunk/AgateLib/AgateGame.cs
===================================================================
--- trunk/AgateLib/AgateGame.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/AgateGame.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -87,10 +87,6 @@
{
using (AgateSetup setup = new AgateSetup(args))
{
- setup.PreferredDisplay = InitParams.PreferredDisplay;
- setup.PreferredAudio = InitParams.PreferredAudio;
- setup.PreferredInput = InitParams.PreferredInput;
-
setup.Initialize(
InitParams.InitializeDisplay,
InitParams.InitializeAudio,
Modified: trunk/AgateLib/AgateLib-Portable.csproj
===================================================================
--- trunk/AgateLib/AgateLib-Portable.csproj 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/AgateLib-Portable.csproj 2014-07-25 01:11:04 UTC (rev 1413)
@@ -66,9 +66,6 @@
<Compile Include="AgateGame.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="AgateSetup.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="AppInitParameters.cs">
<SubType>Code</SubType>
</Compile>
@@ -88,6 +85,7 @@
<Compile Include="Diagnostics\ConsoleSupport\ConsoleMessage.cs" />
<Compile Include="Diagnostics\ConsoleSupport\ConsoleMessageType.cs" />
<Compile Include="Diagnostics\ConsoleSupport\ICommandProcessor.cs" />
+ <Compile Include="Diagnostics\Log.cs" />
<Compile Include="DisplayLib\FrameBuffer.cs" />
<Compile Include="DisplayLib\IFrameBuffer.cs" />
<Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" />
@@ -102,6 +100,15 @@
<Compile Include="DisplayLib\Shaders\Implementation\Lighting3DImpl.cs" />
<Compile Include="DisplayLib\Shaders\Lighting2D.cs" />
<Compile Include="DisplayLib\Shaders\Lighting3D.cs" />
+ <Compile Include="Drivers\DriverImplBase.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\IAgateFactory.cs" />
+ <Compile Include="Drivers\IAudioFactory.cs" />
+ <Compile Include="Drivers\IDisplayFactory.cs" />
+ <Compile Include="Drivers\IInputFactory.cs" />
+ <Compile Include="Drivers\IPlatformFactory.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" />
@@ -112,11 +119,13 @@
<Compile Include="InputLib\Delegates.cs" />
<Compile Include="InputLib\HatState.cs" />
<Compile Include="InputLib\JoystickEventArgs.cs" />
- <Compile Include="Platform\Platform.cs" />
+ <Compile Include="IO\FileSystem.cs" />
+ <Compile Include="Platform\IStopWatch.cs" />
+ <Compile Include="Platform\PlatformInfo.cs" />
<Compile Include="Platform\PlatformType.cs" />
<Compile Include="Resources\ImageResource.cs" />
<Compile Include="Settings\SettingsGroup.cs" />
- <Compile Include="Timing.cs">
+ <Compile Include="Platform\Timing.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="AudioLib\Audio.cs">
@@ -227,36 +236,12 @@
<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>
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/AgateLib.csproj 2014-07-25 01:11:04 UTC (rev 1413)
@@ -165,6 +165,7 @@
<Compile Include="Diagnostics\ConsoleSupport\ConsoleDictionary.cs" />
<Compile Include="Diagnostics\ConsoleSupport\ConsoleMessage.cs" />
<Compile Include="Diagnostics\ConsoleSupport\ConsoleMessageType.cs" />
+ <Compile Include="Diagnostics\Log.cs" />
<Compile Include="DisplayLib\FrameBuffer.cs" />
<Compile Include="DisplayLib\IFrameBuffer.cs" />
<Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" />
@@ -179,6 +180,11 @@
<Compile Include="DisplayLib\Shaders\Implementation\Lighting3DImpl.cs" />
<Compile Include="DisplayLib\Shaders\Lighting2D.cs" />
<Compile Include="DisplayLib\Shaders\Lighting3D.cs" />
+ <Compile Include="Drivers\IAgateFactory.cs" />
+ <Compile Include="Drivers\IAudioFactory.cs" />
+ <Compile Include="Drivers\IDisplayFactory.cs" />
+ <Compile Include="Drivers\IInputFactory.cs" />
+ <Compile Include="Drivers\IPlatformFactory.cs" />
<Compile Include="Drivers\TypeRegistry.cs" />
<Compile Include="Extensions\Collections\Generic\ListSorting.cs" />
<Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" />
@@ -191,8 +197,11 @@
<Compile Include="InputLib\Delegates.cs" />
<Compile Include="InputLib\HatState.cs" />
<Compile Include="InputLib\JoystickEventArgs.cs" />
- <Compile Include="Platform\Platform.cs" />
+ <Compile Include="IO\FileSystem.cs" />
+ <Compile Include="Platform\IStopWatch.cs" />
+ <Compile Include="Platform\PlatformInfo.cs" />
<Compile Include="Platform\PlatformType.cs" />
+ <Compile Include="Platform\Timing.cs" />
<Compile Include="Resources\ImageResource.cs" />
<Compile Include="Serialization\Xle\CompressionType.cs" />
<Compile Include="Serialization\Xle\IXleTypeSerializer.cs" />
@@ -206,9 +215,6 @@
<Compile Include="Serialization\Xle\XleTypeSerializerBase.cs" />
<Compile Include="Serialization\Xle\XleTypeSerializerCollection.cs" />
<Compile Include="Settings\SettingsGroup.cs" />
- <Compile Include="Timing.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="AudioLib\Audio.cs">
<SubType>Code</SubType>
</Compile>
Modified: trunk/AgateLib/AgateSetup.cs
===================================================================
--- trunk/AgateLib/AgateSetup.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/AgateSetup.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -109,7 +109,6 @@
/// </summary>
public AgateSetup() : this("AgateLib", null)
{
- Core.Initialize();
}
/// <summary>
/// Constructs a Setup object.
@@ -204,20 +203,20 @@
private void InitializeDisplay()
{
DoAskUser();
- InitializeDisplay(mSelectDisplay);
+ InitializeDisplay();
}
- /// <summary>
- /// Initializes the display to the specified subsystem.
- /// </summary>
- /// <param name="type"></param>
- public void InitializeDisplay(DisplayTypeID type)
- {
- if (WasCanceled)
- return;
+ ///// <summary>
+ ///// Initializes the display to the specified subsystem.
+ ///// </summary>
+ ///// <param name="type"></param>
+ //public void InitializeDisplay(DisplayTypeID type)
+ //{
+ // if (WasCanceled)
+ // return;
- Display.Initialize(type);
- }
+ // Display.Initialize(type);
+ //}
/// <summary>
/// Initializes the Audio subsystem.
/// Automatically picks which driver to use.
@@ -225,19 +224,19 @@
private void InitializeAudio()
{
DoAskUser();
- InitializeAudio(mSelectAudio);
+ InitializeAudio();
}
- /// <summary>
- /// Initializes the Audio subsystem, to the specified driver.
- /// </summary>
- /// <param name="type"></param>
- public void InitializeAudio(AudioTypeID type)
- {
- if (WasCanceled)
- return;
+ ///// <summary>
+ ///// Initializes the Audio subsystem, to the specified driver.
+ ///// </summary>
+ ///// <param name="type"></param>
+ //public void InitializeAudio(AudioTypeID type)
+ //{
+ // if (WasCanceled)
+ // return;
- AudioLib.Audio.Initialize(type);
- }
+ // AudioLib.Audio.Initialize(type);
+ //}
/// <summary>
/// Initializes the Input subsystem.
@@ -246,20 +245,20 @@
private void InitializeInput()
{
DoAskUser();
- InitializeInput(mSelectInput);
+ InitializeInput();
}
/// <summary>
/// Initializes the Input subsystem, to the specified driver.
/// </summary>
/// <param name="inputTypeID"></param>
- public void InitializeInput(InputTypeID inputTypeID)
- {
- if (WasCanceled)
- return;
+ //public void InitializeInput(InputTypeID inputTypeID)
+ //{
+ // if (WasCanceled)
+ // return;
- InputLib.JoystickInput.Initialize(inputTypeID);
+ // InputLib.JoystickInput.Initialize(inputTypeID);
- }
+ //}
/// <summary>
/// Disposes of the SetupDisplay object and all initialized sub-systems.
/// </summary>
@@ -329,8 +328,6 @@
/// </summary>
private void DoAskUser()
{
- Core.Initialize();
-
if (mAlreadyAsked)
return;
if (mAskUser == false)
Modified: trunk/AgateLib/AppInitParameters.cs
===================================================================
--- trunk/AgateLib/AppInitParameters.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/AppInitParameters.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -66,18 +66,5 @@
/// </summary>
public bool InitializeJoysticks { get; set; }
- /// <summary>
- /// Gets or sets the preferred display driver.
- /// </summary>
- public Drivers.DisplayTypeID PreferredDisplay { get; set; }
- /// <summary>
- /// Gets or sets the preferred audio driver.
- /// </summary>
- public Drivers.AudioTypeID PreferredAudio { get; set; }
- /// <summary>
- /// Gets or sets the preferred input driver.
- /// </summary>
- public Drivers.InputTypeID PreferredInput { get; set; }
-
}
}
Modified: trunk/AgateLib/AudioLib/Audio.cs
===================================================================
--- trunk/AgateLib/AudioLib/Audio.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/AudioLib/Audio.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -55,13 +55,10 @@
/// class.
/// </summary>
/// <param name="audioType"></param>
- public static void Initialize(AudioTypeID audioType)
+ public static void Initialize(AudioImpl audioImpl)
{
- Core.Initialize();
-
- sImpl = Registrar.CreateAudioDriver(audioType);
+ sImpl = audioImpl;
sImpl.Initialize();
-
}
/// <summary>
/// Disposes of the audio driver.
Modified: trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -18,9 +18,10 @@
//
using System;
using System.Collections.Generic;
-using System.IO;
using System.Text;
using AgateLib.Drivers;
+using AgateLib.IO;
+using System.IO;
namespace AgateLib.AudioLib.ImplementationBase
{
@@ -36,7 +37,7 @@
/// <returns></returns>
public virtual SoundBufferImpl CreateSoundBuffer(string filename)
{
- using (Stream stream = File.OpenRead(filename))
+ using (Stream stream = FileSystem.OpenRead(filename))
{
return CreateSoundBuffer(stream);
}
@@ -49,7 +50,7 @@
/// <returns></returns>
public virtual MusicImpl CreateMusic(string filename)
{
- using (Stream stream = File.OpenRead(filename))
+ using (Stream stream = FileSystem.OpenRead(filename))
{
return CreateMusic(stream);
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/Core.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -26,6 +26,7 @@
using AgateLib.DisplayLib;
using AgateLib.Settings;
using AgateLib.Platform;
+using AgateLib.Drivers;
namespace AgateLib
{
@@ -91,14 +92,14 @@
private static bool sAutoPause = false;
private static bool sIsActive = true;
private static bool sInititalized = false;
- private static readonly PlatformInfo mPlatform = new PlatformInfo();
+ private static PlatformInfo mPlatform;
private static PersistantSettings sSettings;
+ private static IAgateFactory mFactory;
-
#region --- Error Reporting ---
private static CrossPlatformDebugLevel mCrossPlatform = CrossPlatformDebugLevel.Comment;
- private static System.Diagnostics.Stopwatch mTime = Stopwatch.StartNew();
+ private static IStopWatch mTime;
/// <summary>
/// Static class which is used to handle all error reports.
@@ -310,23 +311,27 @@
#endregion
- static Core()
- {
- }
/// <summary>
/// Initializes Core class. Also causes the Registrar to probe drivers.
/// Can be called multiple times without adverse effects.
/// </summary>
- public static void Initialize()
+ public static void Initialize(IAgateFactory factory)
{
if (sInititalized)
return;
- Drivers.Registrar.Initialize();
+ mFactory = factory;
+ mPlatform = factory.PlatformFactory.CreatePlatformInfo();
+ mTime = factory.PlatformFactory.CreateStopwatch();
sInititalized = true;
}
+ public static IAgateFactory Factory
+ {
+ get { return mFactory; }
+ }
+
/// <summary>
/// Gets an object which describes details about the current platform.
/// </summary>
Added: trunk/AgateLib/Diagnostics/Log.cs
===================================================================
--- trunk/AgateLib/Diagnostics/Log.cs (rev 0)
+++ trunk/AgateLib/Diagnostics/Log.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.Diagnostics
+{
+ public static class Log
+ {
+ internal static void WriteLine(string p)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/DisplayLib/Display.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -88,11 +88,9 @@
/// a using block, to ensure that the Display is disposed of properly.
/// </summary>
/// <param name="displayType"></param>
- public static void Initialize(DisplayTypeID displayType)
+ public static void Initialize(DisplayImpl impl)
{
- Core.Initialize();
-
- sImpl = Registrar.CreateDisplayDriver(displayType);
+ sImpl = impl;
sImpl.Initialize();
sSurfacePacker = new SurfacePacker();
Added: trunk/AgateLib/Drivers/IAgateFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IAgateFactory.cs (rev 0)
+++ trunk/AgateLib/Drivers/IAgateFactory.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Drivers
+{
+ public interface IAgateFactory
+ {
+ IDisplayFactory DisplayFactory { get; }
+ IAudioFactory AudioFactory { get; }
+ IInputFactory InputFactory { get; }
+ IPlatformFactory PlatformFactory { get; }
+ }
+}
Added: trunk/AgateLib/Drivers/IAudioFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IAudioFactory.cs (rev 0)
+++ trunk/AgateLib/Drivers/IAudioFactory.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Drivers
+{
+ public interface IAudioFactory
+ {
+ }
+}
Added: trunk/AgateLib/Drivers/IDisplayFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IDisplayFactory.cs (rev 0)
+++ trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Drivers
+{
+ public interface IDisplayFactory
+ {
+ }
+}
Added: trunk/AgateLib/Drivers/IInputFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IInputFactory.cs (rev 0)
+++ trunk/AgateLib/Drivers/IInputFactory.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Drivers
+{
+ public interface IInputFactory
+ {
+ }
+}
Added: trunk/AgateLib/Drivers/IPlatformFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IPlatformFactory.cs (rev 0)
+++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -0,0 +1,15 @@
+using AgateLib.Platform;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.Drivers
+{
+ public interface IPlatformFactory
+ {
+ PlatformInfo CreatePlatformInfo();
+
+ IStopWatch CreateStopwatch();
+ }
+}
Added: trunk/AgateLib/IO/FileSystem.cs
===================================================================
--- trunk/AgateLib/IO/FileSystem.cs (rev 0)
+++ trunk/AgateLib/IO/FileSystem.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.IO
+{
+ public static class FileSystem
+ {
+ public static Stream OpenRead(string filename)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
Modified: trunk/AgateLib/InputLib/JoystickInput.cs
===================================================================
--- trunk/AgateLib/InputLib/JoystickInput.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/InputLib/JoystickInput.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -31,7 +31,7 @@
/// </summary>
public static class JoystickInput
{
- static InputImpl impl;
+ static InputImpl sImpl;
static List<Joystick> mRawJoysticks = new List<Joystick>();
/// <summary>
@@ -40,20 +40,18 @@
/// class.
/// </summary>
/// <param name="inputType"></param>
- public static void Initialize(InputTypeID inputType)
+ public static void Initialize(InputImpl impl)
{
- Core.Initialize();
+ sImpl = impl;
+ sImpl.Initialize();
- impl = Registrar.CreateInputDriver(inputType);
- impl.Initialize();
-
InitializeJoysticks();
}
private static void InitializeJoysticks()
{
mRawJoysticks.Clear();
- mRawJoysticks.AddRange(impl.CreateJoysticks().Select(x => new Joystick(x)));
+ mRawJoysticks.AddRange(sImpl.CreateJoysticks().Select(x => new Joystick(x)));
}
/// <summary>
@@ -72,8 +70,8 @@
internal static void Dispose()
{
- if (impl != null)
- impl.Dispose();
+ if (sImpl != null)
+ sImpl.Dispose();
}
}
}
Added: trunk/AgateLib/Platform/IStopWatch.cs
===================================================================
--- trunk/AgateLib/Platform/IStopWatch.cs (rev 0)
+++ trunk/AgateLib/Platform/IStopWatch.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -0,0 +1,16 @@
+using System;
+
+namespace AgateLib.Platform
+{
+ public interface IStopWatch
+ {
+ void Dispose();
+ void ForceResume();
+ bool IsPaused { get; }
+ void Pause();
+ void Reset();
+ void Resume();
+ double TotalMilliseconds { get; }
+ double TotalSeconds { get; }
+ }
+}
Deleted: trunk/AgateLib/Platform/Platform.cs
===================================================================
--- trunk/AgateLib/Platform/Platform.cs 2014-07-24 02:07:05 UTC (rev 1412)
+++ trunk/AgateLib/Platform/Platform.cs 2014-07-25 01:11:04 UTC (rev 1413)
@@ -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.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...
[truncated message content] |
|
From: <ka...@us...> - 2014-07-25 01:53:42
|
Revision: 1414
http://sourceforge.net/p/agate/code/1414
Author: kanato
Date: 2014-07-25 01:53:37 +0000 (Fri, 25 Jul 2014)
Log Message:
-----------
Even cleaner
Modified Paths:
--------------
trunk/AgateLib/AgateGame.cs
trunk/AgateLib/AgateLib-Portable.csproj
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/AudioLib/Music.cs
trunk/AgateLib/AudioLib/SoundBuffer.cs
trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/Diagnostics/AgateConsole.cs
trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs
trunk/AgateLib/DisplayLib/PixelBuffer.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/DisplayLib/TextLayout.cs
trunk/AgateLib/Drivers/DriverImplBase.cs
trunk/AgateLib/Geometry/Rectangle.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/IO/FileSystem.cs
trunk/AgateLib/Platform/Timing.cs
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/AgateResourceLoader.cs
trunk/AgateLib/Resources/ImageResource.cs
trunk/AgateLib/Resources/SpriteResource.cs
trunk/AgateLib/Settings/PersistantSettings.cs
trunk/AgateLib/Utility/FileProviderList.cs
trunk/AgateLib/Utility/FileSystemProvider.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_Surface.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs
Added Paths:
-----------
trunk/AgateLib/Diagnostics/ConsoleSupport/DescriptionAttribute.cs
trunk/AgateLib/IO/IDirectory.cs
trunk/AgateLib/IO/IFile.cs
trunk/AgateLib/IO/IPath.cs
Modified: trunk/AgateLib/AgateGame.cs
===================================================================
--- trunk/AgateLib/AgateGame.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/AgateGame.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -85,49 +85,38 @@
/// <returns></returns>
public int Run(string[] args)
{
- using (AgateSetup setup = new AgateSetup(args))
- {
- setup.Initialize(
- InitParams.InitializeDisplay,
- InitParams.InitializeAudio,
- InitParams.InitializeJoysticks);
+ CreateDisplayWindow();
- if (setup.WasCanceled)
- return 1;
+ mFont = new FontSurface("Arial", 14);
- CreateDisplayWindow();
+ if (InitParams.ShowSplashScreen)
+ {
+ DoSplash();
+ }
- mFont = FontSurface.AgateSans14;
+ Initialize();
- if (InitParams.ShowSplashScreen)
- {
- DoSplash();
- }
+ while (MainWindow.IsClosed == false)
+ {
+ Update(Display.DeltaTime);
- Initialize();
+ if (MainWindow.IsClosed)
+ break;
- while (MainWindow.IsClosed == false)
- {
- Update(Display.DeltaTime);
+ // if (GuiRoot != null)
+ // GuiRoot.DoUpdate();
- if (MainWindow.IsClosed)
- break;
-// if (GuiRoot != null)
-// GuiRoot.DoUpdate();
-
+ Display.RenderTarget = MainWindow.FrameBuffer;
+ Display.BeginFrame();
- Display.RenderTarget = MainWindow.FrameBuffer;
- Display.BeginFrame();
+ Render();
- Render();
+ // if (GuiRoot != null)
+ // GuiRoot.Draw();
-// if (GuiRoot != null)
-// GuiRoot.Draw();
-
- Display.EndFrame();
- Core.KeepAlive();
- }
+ Display.EndFrame();
+ Core.KeepAlive();
}
return 0;
@@ -203,8 +192,8 @@
if (mSplashFadeDone)
{
- Surface powered = InternalResources.Data.PoweredBy;
- Size size = powered.SurfaceSize;
+ Surface powered = null;// InternalResources.Data.PoweredBy;
+ Size size = Size.Empty;// powered.SurfaceSize;
int bottom = MainWindow.Height - size.Height;
int h = mFont.FontHeight;
@@ -232,8 +221,6 @@
Display.EndFrame();
Core.KeepAlive();
- System.Threading.Thread.Sleep(0);
-
if (MainWindow.IsClosed)
return;
}
@@ -262,8 +249,8 @@
{
Display.Clear(Color.White);
- Surface powered = InternalResources.Data.PoweredBy;
- Size size = powered.SurfaceSize;
+ Surface powered = null;//= InternalResources.Data.PoweredBy;
+ Size size = Size.Empty;// powered.SurfaceSize;
int left = (int)(mTotalSplashTime * size.Width - size.Width) + 1;
Rectangle gradientRect = new Rectangle(left, MainWindow.Height - size.Height,
@@ -274,8 +261,11 @@
else if (left > size.Width)
mSplashFadeDone = true;
- powered.DisplayAlignment = OriginAlignment.BottomLeft;
- powered.Draw(0, MainWindow.Height);
+ if (powered != null)
+ {
+ powered.DisplayAlignment = OriginAlignment.BottomLeft;
+ powered.Draw(0, MainWindow.Height);
+ }
Gradient g = new Gradient(
Color.FromArgb(0, Color.White),
@@ -339,26 +329,26 @@
get { return mWindow; }
}
-// / <summary>
-// / Gets or sets the GuiRoot object.
-// / </summary>
-// public Gui.GuiRoot GuiRoot
-// {
-// get { return mGui; }
-// set
-// {
-// if (value == null && mGui == null)
-// return;
-//
-// if (mGui != null)
-// mGui.EnableInteraction = false;
-//
-// mGui = value;
-//
-// if (mGui != null)
-// mGui.EnableInteraction = true;
-// }
-// }
+ // / <summary>
+ // / Gets or sets the GuiRoot object.
+ // / </summary>
+ // public Gui.GuiRoot GuiRoot
+ // {
+ // get { return mGui; }
+ // set
+ // {
+ // if (value == null && mGui == null)
+ // return;
+ //
+ // if (mGui != null)
+ // mGui.EnableInteraction = false;
+ //
+ // mGui = value;
+ //
+ // if (mGui != null)
+ // mGui.EnableInteraction = true;
+ // }
+ // }
#endregion
Modified: trunk/AgateLib/AgateLib-Portable.csproj
===================================================================
--- trunk/AgateLib/AgateLib-Portable.csproj 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/AgateLib-Portable.csproj 2014-07-25 01:53:37 UTC (rev 1414)
@@ -60,9 +60,6 @@
<Compile Include="AgateException.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="AgateFileProvider.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="AgateGame.cs">
<SubType>Code</SubType>
</Compile>
@@ -84,6 +81,7 @@
<Compile Include="Diagnostics\ConsoleSupport\ConsoleDictionary.cs" />
<Compile Include="Diagnostics\ConsoleSupport\ConsoleMessage.cs" />
<Compile Include="Diagnostics\ConsoleSupport\ConsoleMessageType.cs" />
+ <Compile Include="Diagnostics\ConsoleSupport\DescriptionAttribute.cs" />
<Compile Include="Diagnostics\ConsoleSupport\ICommandProcessor.cs" />
<Compile Include="Diagnostics\Log.cs" />
<Compile Include="DisplayLib\FrameBuffer.cs" />
@@ -120,6 +118,9 @@
<Compile Include="InputLib\HatState.cs" />
<Compile Include="InputLib\JoystickEventArgs.cs" />
<Compile Include="IO\FileSystem.cs" />
+ <Compile Include="IO\IDirectory.cs" />
+ <Compile Include="IO\IFile.cs" />
+ <Compile Include="IO\IPath.cs" />
<Compile Include="Platform\IStopWatch.cs" />
<Compile Include="Platform\PlatformInfo.cs" />
<Compile Include="Platform\PlatformType.cs" />
@@ -353,12 +354,6 @@
<Compile Include="InputLib\Mouse.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>
@@ -468,18 +463,10 @@
<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" />
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/AgateLib.csproj 2014-07-25 01:53:37 UTC (rev 1414)
@@ -198,6 +198,9 @@
<Compile Include="InputLib\HatState.cs" />
<Compile Include="InputLib\JoystickEventArgs.cs" />
<Compile Include="IO\FileSystem.cs" />
+ <Compile Include="IO\IDirectory.cs" />
+ <Compile Include="IO\IFile.cs" />
+ <Compile Include="IO\IPath.cs" />
<Compile Include="Platform\IStopWatch.cs" />
<Compile Include="Platform\PlatformInfo.cs" />
<Compile Include="Platform\PlatformType.cs" />
Modified: trunk/AgateLib/AudioLib/Music.cs
===================================================================
--- trunk/AgateLib/AudioLib/Music.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/AudioLib/Music.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -23,6 +23,7 @@
using AgateLib.Drivers;
using AgateLib.AudioLib.ImplementationBase;
using AgateLib.Utility;
+using AgateLib.IO;
namespace AgateLib.AudioLib
{
@@ -45,17 +46,8 @@
/// </summary>
/// <param name="filename">The name of the file to load.</param>
public Music(string filename)
- : this(AgateFileProvider.Music, filename)
- { }
- /// <summary>
- /// Constructs a Music object from a file given by the specified IFileProvider.
- /// </summary>
- /// <param name="fileProvider"></param>
- /// <param name="filename"></param>
- public Music(IFileProvider fileProvider, string filename)
- : this()
{
- using (System.IO.Stream s = fileProvider.OpenRead(filename))
+ using (System.IO.Stream s = FileSystem.OpenRead(filename))
{
impl = Audio.Impl.CreateMusic(s);
}
Modified: trunk/AgateLib/AudioLib/SoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBuffer.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/AudioLib/SoundBuffer.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -64,27 +64,8 @@
/// </summary>
/// <param name="filename"></param>
public SoundBuffer(string filename)
- : this(AgateFileProvider.Sounds, filename)
- { }
- /// <summary>
- /// Constructs a SoundBuffer object, loading audio data from the
- /// specified file given the specified IFileProvider.
- /// </summary>
- /// <param name="fileProvider"></param>
- /// <param name="filename"></param>
- public SoundBuffer(IFileProvider fileProvider, string filename)
{
- if (fileProvider.IsRealFile(filename))
- {
- mImpl = Audio.Impl.CreateSoundBuffer(fileProvider.ResolveFile(filename));
- }
- else
- {
- using (System.IO.Stream s = fileProvider.OpenRead(filename))
- {
- mImpl = Audio.Impl.CreateSoundBuffer(s);
- }
- }
+ mImpl = Audio.Impl.CreateSoundBuffer(filename);
mFilename = filename;
}
Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -26,6 +26,7 @@
using AgateLib.Geometry;
using AgateLib.Resources;
using AgateLib.DisplayLib.Cache;
+using AgateLib.IO;
namespace AgateLib.BitmapFont
{
@@ -86,7 +87,7 @@
/// <param name="characterSize">Size of each character in the image.</param>
public BitmapFontImpl(string filename, Size characterSize)
{
- FontName = System.IO.Path.GetFileNameWithoutExtension(filename);
+ FontName = FileSystem.Path.GetFileNameWithoutExtension(filename);
mFontMetrics = new FontMetrics();
mSurface = new Surface(filename);
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/Core.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -27,6 +27,8 @@
using AgateLib.Settings;
using AgateLib.Platform;
using AgateLib.Drivers;
+using AgateLib.Diagnostics;
+using AgateLib.IO;
namespace AgateLib
{
@@ -221,10 +223,10 @@
string text = b.ToString();
// show the error dialog if AgateWinForms.dll is present.
- if (showDialog && Drivers.Registrar.WinForms != null)
- {
- Drivers.Registrar.WinForms.ShowErrorDialog(message, e, level);
- }
+ //if (showDialog && Drivers.Registrar.WinForms != null)
+ //{
+ // Drivers.Registrar.WinForms.ShowErrorDialog(message, e, level);
+ //}
using (StreamWriter filewriter = OpenErrorFile())
{
@@ -232,7 +234,7 @@
filewriter.Write(text);
}
- Trace.WriteLine(text);
+ Log.WriteLine(text);
}
/// <summary>
@@ -259,13 +261,13 @@
{
if (sWroteHeader == true)
{
- FileStream stream = File.Open(ErrorFile, FileMode.Append, FileAccess.Write);
+ Stream stream = FileSystem.OpenWrite(ErrorFile, true);
return new StreamWriter(stream);
}
else
{
- FileStream stream = File.Open(ErrorFile, FileMode.Create, FileAccess.Write);
+ var stream = FileSystem.OpenWrite(ErrorFile);
StreamWriter writer = new StreamWriter(stream);
WriteHeader(writer);
@@ -281,8 +283,7 @@
"Error message: " + e.Message + "\r\n" +
"Errors cannot be saved to a text file.";
- Debug.WriteLine(message);
- Trace.WriteLine(message);
+ Log.WriteLine(message);
return null;
}
@@ -410,7 +411,7 @@
while (IsActive == false && AutoPause)
{
- System.Threading.Thread.Sleep(25);
+ //System.Threading.Thread.Sleep(25);
Display.ProcessEvents();
// Update Audio Engine, if necessary
@@ -433,16 +434,6 @@
InputLib.JoystickInput.PollTimer();
}
- /// <summary>
- /// Returns the directory the application that was started resides in.
- /// </summary>
- public static string BaseDirectory
- {
- get
- {
- return System.AppDomain.CurrentDomain.BaseDirectory;
- }
- }
/// <summary>
/// returns time since agatelib was initialized in milliseconds.
@@ -450,7 +441,7 @@
/// <returns></returns>
internal static double GetTime()
{
- return mTime.ElapsedTicks / (double)System.Diagnostics.Stopwatch.Frequency * 1000.0;
+ return mTime.TotalSeconds;
}
Modified: trunk/AgateLib/Diagnostics/AgateConsole.cs
===================================================================
--- trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -74,7 +74,7 @@
if (sInstance == null) return;
if (Font == null)
- Font = FontSurface.AgateSans10;
+ Font = new FontSurface("Arial", 10);
sInstance.DrawImpl();
}
Modified: trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs
===================================================================
--- trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -43,7 +43,7 @@
{
try
{
- args[i] = Convert.ChangeType(tokens[i + 1], parameters[i].ParameterType);
+ args[i] = Convert.ChangeType(tokens[i + 1], parameters[i].ParameterType, System.Globalization.CultureInfo.InvariantCulture);
}
catch
{
Added: trunk/AgateLib/Diagnostics/ConsoleSupport/DescriptionAttribute.cs
===================================================================
--- trunk/AgateLib/Diagnostics/ConsoleSupport/DescriptionAttribute.cs (rev 0)
+++ trunk/AgateLib/Diagnostics/ConsoleSupport/DescriptionAttribute.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.Diagnostics.ConsoleSupport
+{
+ public class DescriptionAttribute : Attribute
+ {
+ public string Description { get; set; }
+ }
+}
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -121,7 +121,7 @@
if (res is BitmapFontResource)
{
- Surface surf = new Surface(resources.FileProvider, resources.FullFileName(bmpFont.Image));
+ Surface surf = new Surface(resources.FullFileName(bmpFont.Image));
mImpl = new BitmapFontImpl(surf, bmpFont.FontMetrics, resourceName);
}
@@ -670,7 +670,7 @@
return obj.ToString();
}
-
+ /*
#region --- Built-in Fonts ---
/// <summary>
@@ -741,8 +741,8 @@
#endregion
+ */
-
}
/// <summary>
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -266,9 +266,7 @@
// hack to make sure delta time is never zero.
if (mDeltaTime == 0.0)
{
- System.Threading.Thread.Sleep(1);
- CalcDeltaTime();
- return;
+ mDeltaTime += 0.0000001;
}
}
else
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -194,7 +194,7 @@
#endregion
#region --- Protected Methods ---
-
+
/// <summary>
/// Scans a memory area to see if it entirely contains pixels which won't be
/// seen when drawn.
@@ -209,31 +209,12 @@
/// For example, if alphaMask = 0xff000000 then alphaShift should be 24.</param>
/// <returns></returns>
[CLSCompliant(false)]
- protected bool IsRowBlankScanARGB(IntPtr pixelData, int row, int cols, int strideInBytes,
+ protected virtual bool IsRowBlankScanARGB(IntPtr pixelData, int row, int cols, int strideInBytes,
int alphaThreshold, uint alphaMask, int alphaShift)
{
- unsafe
- {
- uint* ptr = (uint*)pixelData;
+ throw new NotImplementedException();
+ }
- int start = row * strideInBytes / sizeof(uint);
-
- for (int i = 0; i < cols; i++)
- {
- int index = start + i;
- uint pixel = ptr[index];
- byte alpha = (byte)((pixel & alphaMask) >> alphaShift);
-
- if (alpha > alphaThreshold)
- {
- return false;
- }
-
- }
- }
-
- return true;
- }
/// <summary>
/// Scans a memory area to see if it entirely contains pixels which won't be
/// seen when drawn.
@@ -248,31 +229,12 @@
/// For example, if alphaMask = 0xff000000 then alphaShift should be 24.</param>
/// <returns></returns>
[CLSCompliant(false)]
- protected bool IsColBlankScanARGB(IntPtr pixelData, int col, int rows, int strideInBytes,
+ protected virtual bool IsColBlankScanARGB(IntPtr pixelData, int col, int rows, int strideInBytes,
int alphaThreshold, uint alphaMask, int alphaShift)
{
- unsafe
- {
- uint* ptr = (uint*)pixelData;
+ throw new NotImplementedException();
+ }
-
- for (int i = 0; i < rows; i++)
- {
- int index = col + i * strideInBytes / sizeof(uint);
- uint pixel = ptr[index];
- byte alpha = (byte)((pixel & alphaMask) >> alphaShift);
-
- if (alpha > alphaThreshold)
- {
- return false;
- }
-
- }
- }
-
- return true;
-
- }
#endregion
};
}
Modified: trunk/AgateLib/DisplayLib/PixelBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -712,78 +712,80 @@
/// <param name="srcRowStride"></param>
public void SetData(IntPtr data, PixelFormat srcFormat, int srcRowStride)
{
- int sourceStride = GetPixelStride(srcFormat);
+ throw new NotImplementedException();
- unsafe
- {
- if (srcFormat == this.PixelFormat)
- {
- // optimized copy for same type of data
- int startIndex = 0;
- int rowLength = sourceStride * Width;
+ //int sourceStride = GetPixelStride(srcFormat);
- IntPtr rowPtr = data;
- byte* dataPtr = (byte*)data;
+ //unsafe
+ //{
+ // if (srcFormat == this.PixelFormat)
+ // {
+ // // optimized copy for same type of data
+ // int startIndex = 0;
+ // int rowLength = sourceStride * Width;
- for (int y = 0; y < Height; y++)
- {
- Marshal.Copy(rowPtr, mData, startIndex, rowLength);
+ // IntPtr rowPtr = data;
+ // byte* dataPtr = (byte*)data;
- startIndex += RowStride;
- dataPtr += srcRowStride;
- rowPtr = (IntPtr)dataPtr;
- }
- }
- else
- {
- byte[] srcPixel = new byte[srcRowStride];
- int destIndex = 0;
- IntPtr rowPtr = data;
- byte* dataPtr = (byte*)data;
- int width = Width;
- int destPixelStride = PixelStride;
+ // for (int y = 0; y < Height; y++)
+ // {
+ // Marshal.Copy(rowPtr, mData, startIndex, rowLength);
- for (int y = 0; y < Height; y++)
- {
- Marshal.Copy(rowPtr, srcPixel, 0, srcRowStride);
+ // startIndex += RowStride;
+ // dataPtr += srcRowStride;
+ // rowPtr = (IntPtr)dataPtr;
+ // }
+ // }
+ // else
+ // {
+ // byte[] srcPixel = new byte[srcRowStride];
+ // int destIndex = 0;
+ // IntPtr rowPtr = data;
+ // byte* dataPtr = (byte*)data;
+ // int width = Width;
+ // int destPixelStride = PixelStride;
- // check for common Win32 - OpenGL conversion case
- if (this.PixelFormat == PixelFormat.RGBA8888 &&
- srcFormat == PixelFormat.BGRA8888)
- {
- // this setup here is OPTIMIZED.
- // Calling ConvertPixel for each pixel when loading a large
- // image adds about 35% more CPU time to do the conversion.
- // By eliminating the function call and processing this special
- // case here we save some time on image loading.
- int srcIndex = 0;
+ // for (int y = 0; y < Height; y++)
+ // {
+ // Marshal.Copy(rowPtr, srcPixel, 0, srcRowStride);
- for (int x = 0; x < width; x++)
- {
- mData[destIndex] = srcPixel[srcIndex + 2];
- mData[destIndex + 1] = srcPixel[srcIndex + 1];
- mData[destIndex + 2] = srcPixel[srcIndex];
- mData[destIndex + 3] = srcPixel[srcIndex + 3];
+ // // check for common Win32 - OpenGL conversion case
+ // if (this.PixelFormat == PixelFormat.RGBA8888 &&
+ // srcFormat == PixelFormat.BGRA8888)
+ // {
+ // // this setup here is OPTIMIZED.
+ // // Calling ConvertPixel for each pixel when loading a large
+ // // image adds about 35% more CPU time to do the conversion.
+ // // By eliminating the function call and processing this special
+ // // case here we save some time on image loading.
+ // int srcIndex = 0;
- destIndex += destPixelStride;
- srcIndex += sourceStride;
- }
- }
- else
- {
- for (int x = 0; x < width; x++)
- {
- ConvertPixel(mData, destIndex, this.PixelFormat, srcPixel, x * sourceStride, srcFormat);
+ // for (int x = 0; x < width; x++)
+ // {
+ // mData[destIndex] = srcPixel[srcIndex + 2];
+ // mData[destIndex + 1] = srcPixel[srcIndex + 1];
+ // mData[destIndex + 2] = srcPixel[srcIndex];
+ // mData[destIndex + 3] = srcPixel[srcIndex + 3];
- destIndex += destPixelStride;
- }
- }
+ // destIndex += destPixelStride;
+ // srcIndex += sourceStride;
+ // }
+ // }
+ // else
+ // {
+ // for (int x = 0; x < width; x++)
+ // {
+ // ConvertPixel(mData, destIndex, this.PixelFormat, srcPixel, x * sourceStride, srcFormat);
- dataPtr += srcRowStride;
- rowPtr = (IntPtr)dataPtr;
- }
- }
- }
+ // destIndex += destPixelStride;
+ // }
+ // }
+
+ // dataPtr += srcRowStride;
+ // rowPtr = (IntPtr)dataPtr;
+ // }
+ // }
+ //}
}
Modified: trunk/AgateLib/DisplayLib/Surface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Surface.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/DisplayLib/Surface.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -23,6 +23,7 @@
using AgateLib.Geometry;
using AgateLib.DisplayLib.ImplementationBase;
using AgateLib.Utility;
+using AgateLib.IO;
namespace AgateLib.DisplayLib
{
@@ -83,22 +84,13 @@
/// </summary>
/// <param name="filename">Path and file name for the image file to load.</param>
public Surface(string filename)
- : this(AgateFileProvider.Images, filename)
{
- }
- /// <summary>
- /// Creates a surface object using the specified file provider to open the image file.
- /// </summary>
- /// <param name="filename">Path and file name for the image file to load.</param>
- /// <param name="fileProvider">The IFileProvider object which will resolve the filename and open the stream</param>
- public Surface(IFileProvider fileProvider, string filename)
- {
if (Display.Impl == null)
throw new AgateException("AgateLib's display system has not been initialized.");
if (string.IsNullOrEmpty(filename))
throw new ArgumentNullException("You must supply a file name.");
- using (System.IO.Stream s = fileProvider.OpenRead(filename))
+ using (System.IO.Stream s = FileSystem.OpenRead(filename))
{
mImpl = Display.Impl.CreateSurface(s);
}
@@ -840,7 +832,7 @@
/// <returns></returns>
public static ImageFileFormat FormatFromExtension(string filename)
{
- string ext = System.IO.Path.GetExtension(filename);
+ string ext = FileSystem.Path.GetExtension(filename);
switch (ext)
{
Modified: trunk/AgateLib/DisplayLib/TextLayout.cs
===================================================================
--- trunk/AgateLib/DisplayLib/TextLayout.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/DisplayLib/TextLayout.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -35,7 +35,8 @@
/// </summary>
public void DrawAll()
{
- ForEach(x => x.Draw());
+ foreach (var x in this)
+ x.Draw();
}
/// <summary>
Modified: trunk/AgateLib/Drivers/DriverImplBase.cs
===================================================================
--- trunk/AgateLib/Drivers/DriverImplBase.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/Drivers/DriverImplBase.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -1,3 +1,4 @@
+using AgateLib.Diagnostics;
// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
@@ -43,8 +44,7 @@
/// <param name="text"></param>
protected void Report(string text)
{
- //Console.WriteLine(text);
- System.Diagnostics.Trace.WriteLine(text);
+ Log.WriteLine(text);
}
}
}
Modified: trunk/AgateLib/Geometry/Rectangle.cs
===================================================================
--- trunk/AgateLib/Geometry/Rectangle.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/Geometry/Rectangle.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -105,7 +105,7 @@
}
private static int ParseNumeric(string text)
{
- int equals = text.IndexOf("=", StringComparison.InvariantCultureIgnoreCase);
+ int equals = text.IndexOf("=", StringComparison.OrdinalIgnoreCase);
int value = int.Parse(text.Substring(equals + 1), System.Globalization.CultureInfo.CurrentCulture);
return value;
}
Modified: trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs
===================================================================
--- trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -27,7 +27,7 @@
/// <summary>
/// Vertex layout which only contains position and color information.
/// </summary>
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
+ [StructLayout(LayoutKind.Sequential)]
public struct PositionColor
{
/// <summary>
Modified: trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs
===================================================================
--- trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs 2014-07-25 01:53:37 UTC (rev 1414)
@@ -27,7 +27,7 @@
/// <summary>
/// Vertex structure with position, texture and color values
/// </summary>
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
+ [StructLayout(LayoutKind.Sequential)]
public struct PositionTextureColor
{
/// <summary>
Modified: trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNormal.cs
===================================================================
--- trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNormal.cs 2014-07-25 01:11:04 UTC (rev 1413)
+++ trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNo...
[truncated message content] |
|
From: <ka...@us...> - 2014-07-25 01:57:40
|
Revision: 1415
http://sourceforge.net/p/agate/code/1415
Author: kanato
Date: 2014-07-25 01:57:36 +0000 (Fri, 25 Jul 2014)
Log Message:
-----------
AgateLib.dll is now portable. Tests don't compile yet.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib-Windows.sln
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
trunk/Tests/CoreTests/Timers/frmTimers.cs
trunk/Tests/Tests.csproj
trunk/Tests/frmLauncher.cs
Removed Paths:
-------------
trunk/AgateLib/AgateLib-Portable.csproj
trunk/AgateLib.Platform.WindowsForms/WinForms/SetSystemsForm.Designer.cs
trunk/AgateLib.Platform.WindowsForms/WinForms/SetSystemsForm.cs
trunk/AgateLib.Platform.WindowsForms/WinForms/SetSystemsForm.resx
trunk/AgateLib.Platform.WindowsForms/WinForms/WinFormsDriver.cs
trunk/AgateLib.Platform.WindowsForms/WinForms/WinFormsReporter.cs
Deleted: trunk/AgateLib/AgateLib-Portable.csproj
===================================================================
--- trunk/AgateLib/AgateLib-Portable.csproj 2014-07-25 01:53:37 UTC (rev 1414)
+++ trunk/AgateLib/AgateLib-Portable.csproj 2014-07-25 01:57:36 UTC (rev 1415)
@@ -1,480 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <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>
- <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\" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AgateException.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="AgateGame.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="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\DescriptionAttribute.cs" />
- <Compile Include="Diagnostics\ConsoleSupport\ICommandProcessor.cs" />
- <Compile Include="Diagnostics\Log.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="Drivers\DriverImplBase.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Drivers\IAgateFactory.cs" />
- <Compile Include="Drivers\IAudioFactory.cs" />
- <Compile Include="Drivers\IDisplayFactory.cs" />
- <Compile Include="Drivers\IInputFactory.cs" />
- <Compile Include="Drivers\IPlatformFactory.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" />
- <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="IO\FileSystem.cs" />
- <Compile Include="IO\IDirectory.cs" />
- <Compile Include="IO\IFile.cs" />
- <Compile Include="IO\IPath.cs" />
- <Compile Include="Platform\IStopWatch.cs" />
- <Compile Include="Platform\PlatformInfo.cs" />
- <Compile Include="Platform\PlatformType.cs" />
- <Compile Include="Resources\ImageResource.cs" />
- <Compile Include="Settings\SettingsGroup.cs" />
- <Compile Include="Platform\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\NullInputImpl.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Drivers\NullSoundImpl.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="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>
- <Compile Include="DisplayLib\Shaders\IShader2D.cs" />
- <Compile Include="Settings\ISettingsTracer.cs" />
- </ItemGroup>
- <ItemGroup>
- <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-25 01:53:37 UTC (rev 1414)
+++ trunk/AgateLib/AgateLib.csproj 2014-07-25 01:57:36 UTC (rev 1415)
@@ -1,142 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
+<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>
- <ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{9490B719-829E-43A7-A5FE-8001F8A81759}</ProjectGuid>
+ <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>AgateLib</AssemblyName>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
+ <ProjectGuid>{9490B719-829E-43A7-A5FE-8001F8A81759}</ProjectGuid>
<OutputType>Library</OutputType>
- <AppDesignerFolder>
- </AppDesignerFolder>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AgateLib</RootNamespace>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>3.5</OldToolsVersion>
- <UpgradeBackupLocation />
- <TargetFrameworkProfile />
+ <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' ">
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>DEBUG;TRACE;</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
<DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
+ <DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>..\Binaries\Debug\</OutputPath>
- <RegisterForComInterop>False</RegisterForComInterop>
- <RemoveIntegerChecks>False</RemoveIntegerChecks>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <DebugType>full</DebugType>
- <Prefer32Bit>false</Prefer32Bit>
+ <RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>TRACE;</DefineConstants>
- <DocumentationFile>AgateLib.xml</DocumentationFile>
- <FileAlignment>4096</FileAlignment>
+ <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>..\Binaries\Release\</OutputPath>
- <RegisterForComInterop>False</RegisterForComInterop>
- <RemoveIntegerChecks>False</RemoveIntegerChecks>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <DebugType>none</DebugType>
- <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>..\Binaries\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <FileAlignment>4096</FileAlignment>
- <PlatformTarget>x64</PlatformTarget>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
- <WarningLevel>4</WarningLevel>
- <Optimize>false</Optimize>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
- <OutputPath>bin\x64\Release\</OutputPath>
- <DefineConstants>TRACE;</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DocumentationFile>AgateLib.xml</DocumentationFile>
- <Optimize>true</Optimize>
- <FileAlignment>4096</FileAlignment>
- <PlatformTarget>x64</PlatformTarget>
- <DebugType>none</DebugType>
- <WarningLevel>4</WarningLevel>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>..\Binaries\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <FileAlignment>4096</FileAlignment>
<PlatformTarget>x86</PlatformTarget>
- <DebugType>full</DebugType>
- <WarningLevel>4</WarningLevel>
- <Optimize>false</Optimize>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- <Prefer32Bit>false</Prefer32Bit>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
- <OutputPath>..\Binaries\Release\</OutputPath>
- <DefineConstants>TRACE;</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DocumentationFile>AgateLib.xml</DocumentationFile>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
- <FileAlignment>4096</FileAlignment>
+ <DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
- <DebugType>none</DebugType>
- <WarningLevel>4</WarningLevel>
- <Prefer32Bit>false</Prefer32Bit>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
- <Reference Include="System">
- <Name>System</Name>
- </Reference>
- <Reference Include="System.Core">
- <Name>System.Core</Name>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.XML" />
- <Reference Include="System.Xml.Linq" />
+ <!-- A reference to the entire .NET Framework is automatically included -->
+ <Folder Include="Serialization\Xle\" />
</ItemGroup>
- <ItemGroup />
<ItemGroup>
<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>
@@ -150,21 +76,13 @@
<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="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\DescriptionAttribute.cs" />
+ <Compile Include="Diagnostics\ConsoleSupport\ICommandProcessor.cs" />
<Compile Include="Diagnostics\Log.cs" />
<Compile Include="DisplayLib\FrameBuffer.cs" />
<Compile Include="DisplayLib\IFrameBuffer.cs" />
@@ -180,6 +98,9 @@
<Compile Include="DisplayLib\Shaders\Implementation\Lighting3DImpl.cs" />
<Compile Include="DisplayLib\Shaders\Lighting2D.cs" />
<Compile Include="DisplayLib\Shaders\Lighting3D.cs" />
+ <Compile Include="Drivers\DriverImplBase.cs">
+ <SubType>Code</SubType>
+ </Compile>
<Compile Include="Drivers\IAgateFactory.cs" />
<Compile Include="Drivers\IAudioFactory.cs" />
<Compile Include="Drivers\IDisplayFactory.cs" />
@@ -189,7 +110,6 @@
<Compile Include="Extensions\Collections\Generic\ListSorting.cs" />
<Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" />
<Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" />
- <Compile Include="Diagnostics\ConsoleSupport\ICommandProcessor.cs" />
<Compile Include="IFileProvider.cs">
<SubType>Code</SubType>
</Compile>
@@ -204,20 +1...
[truncated message content] |
|
From: <ka...@us...> - 2014-07-26 07:10:09
|
Revision: 1416
http://sourceforge.net/p/agate/code/1416
Author: kanato
Date: 2014-07-26 07:09:55 +0000 (Sat, 26 Jul 2014)
Log Message:
-----------
Add application models.
Several fixes to get tests working.
Reintroduce XLE Serializer.
More cleanup to make AgateLib portable.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/AudioLib/Music.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/Diagnostics/Log.cs
trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/PixelBuffer.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/Drivers/IAudioFactory.cs
trunk/AgateLib/Drivers/IDisplayFactory.cs
trunk/AgateLib/Drivers/IInputFactory.cs
trunk/AgateLib/Drivers/IPlatformFactory.cs
trunk/AgateLib/IO/FileSystem.cs
trunk/AgateLib/IO/IFile.cs
trunk/AgateLib/Platform/Timing.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/PersistantSettings.cs
trunk/AgateLib.GL/AgateLib.GL.csproj
trunk/AgateLib.GL/ContextFB.cs
trunk/AgateLib.GL/GL3/FrameBuffer.cs
trunk/AgateLib.GL/GL3/GLPrimitiveRenderer.cs
trunk/AgateLib.GL/GL_IndexBuffer.cs
trunk/AgateLib.GL/IGL_Surface.cs
trunk/AgateLib.GL/Legacy/FrameBufferExt.cs
trunk/AgateLib.GL/Legacy/FrameBufferReadPixels.cs
trunk/AgateLib.GL/Legacy/LegacyPrimitiveRenderer.cs
trunk/AgateLib.GL/PrimitiveRenderer.cs
trunk/AgateLib.GL/ShaderFactory.cs
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
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/PlatformImplementation/DiagnosticsStopwatch.cs
trunk/AgateLib.Platform.WindowsForms/WinForms/BitmapFontUtil.cs
trunk/AgateLib.Platform.WindowsForms/WinForms/Icons.Designer.cs
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Tests/AudioTests/AudioPlayer/AudioPlayer.cs
trunk/Tests/AudioTests/SoundbufferStopTester.cs
trunk/Tests/AudioTests/StreamAudio.cs
trunk/Tests/CoreTests/ErrorReport/ErrorReport.cs
trunk/Tests/CoreTests/ErrorReport/frmErrorReport.cs
trunk/Tests/CoreTests/PersistantSettingsTest.cs
trunk/Tests/CoreTests/Resources.cs
trunk/Tests/CoreTests/Timers/Timers.cs
trunk/Tests/CoreTests/Timers/frmTimers.cs
trunk/Tests/DisplayTests/BasicDrawing/BasicDrawing.cs
trunk/Tests/DisplayTests/Capabilities/Capabilities.cs
trunk/Tests/DisplayTests/Capabilities/frmCapabilities.cs
trunk/Tests/DisplayTests/ClipRect.cs
trunk/Tests/DisplayTests/ColorTest.cs
trunk/Tests/DisplayTests/DisplayWindowEvents.cs
trunk/Tests/DisplayTests/FullScreen.cs
trunk/Tests/DisplayTests/LargeImage.cs
trunk/Tests/DisplayTests/MultipleFramebufferTest.cs
trunk/Tests/DisplayTests/MultipleWindows/MultipleWindowTest.cs
trunk/Tests/DisplayTests/PixelBufferMask.cs
trunk/Tests/DisplayTests/PixelBufferTest/PixelBufferTest.cs
trunk/Tests/DisplayTests/Prerendered.cs
trunk/Tests/DisplayTests/RenderStates/RenderStates.cs
trunk/Tests/DisplayTests/RenderTargetContinuous.cs
trunk/Tests/DisplayTests/RotatingSpriteTester.cs
trunk/Tests/DisplayTests/ScreenCapture.cs
trunk/Tests/DisplayTests/SpriteTester/SpriteTester.cs
trunk/Tests/DisplayTests/SpriteTester/frmSpriteTester.cs
trunk/Tests/DisplayTests/SurfaceTester/SurfaceTester.cs
trunk/Tests/DisplayTests/TileTester/TileTester.cs
trunk/Tests/DisplayTests/Tiling.cs
trunk/Tests/Fonts/BitmapFonts.cs
trunk/Tests/Fonts/Builtin.cs
trunk/Tests/Fonts/FontAlignment.cs
trunk/Tests/Fonts/FontLineTester.cs
trunk/Tests/Fonts/Fonts.cs
trunk/Tests/Fonts/Kerning.cs
trunk/Tests/Fonts/TextLayout.cs
trunk/Tests/InputTests/Input/InputTester.cs
trunk/Tests/Launcher.cs
trunk/Tests/Shaders/CoordinateSystem.cs
trunk/Tests/Shaders/Hlsl.cs
trunk/Tests/Shaders/Lighting3DTest.cs
trunk/Tests/Shaders/LightingTest/LightingTest.cs
trunk/Tests/Tests.csproj
trunk/Tests/frmLauncher.cs
trunk/UnitTests/UnitTests.csproj
Added Paths:
-----------
trunk/AgateLib/ApplicationModels/
trunk/AgateLib/ApplicationModels/AgateAppModel.cs
trunk/AgateLib/ApplicationModels/ModelParameters.cs
trunk/AgateLib/Drivers/NullDrivers/
trunk/AgateLib/Drivers/NullDrivers/NullInputImpl.cs
trunk/AgateLib/Drivers/NullDrivers/NullSoundImpl.cs
trunk/AgateLib/IO/IFileProvider.cs
trunk/AgateLib/Serialization/Xle/CompressionMode.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs
trunk/AgateLib.Platform.WindowsForms/Configuration.cs
trunk/AgateLib.Platform.WindowsForms/Factories/
trunk/AgateLib.Platform.WindowsForms/Factories/DisplayFactory.cs
trunk/AgateLib.Platform.WindowsForms/Factories/FormsFactory.cs
trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs
trunk/AgateLib.Platform.WindowsForms/Factories/SdlFactory.cs
trunk/AgateLib.Platform.WindowsForms/Factories/SysIoFile.cs
trunk/AgateLib.Platform.WindowsForms/PixelBufferExtensions.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FileProviderList.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FileSystemProvider.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FormsPlatformInfo.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/TgzFileProvider.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/ZipFileProvider.cs
trunk/AgateLib.Platform.WindowsForms/Resources/BuiltinResources.cs
trunk/AgateLib.Platform.WindowsForms/SurfaceExtensions.cs
Removed Paths:
-------------
trunk/AgateLib/Drivers/NullInputImpl.cs
trunk/AgateLib/Drivers/NullSoundImpl.cs
trunk/AgateLib/IFileProvider.cs
trunk/AgateLib/Utility/FileProviderList.cs
trunk/AgateLib/Utility/FileSystemProvider.cs
trunk/AgateLib.Platform.WindowsForms/FormsPlatformInfo.cs
trunk/AgateLib.Platform.WindowsForms/Setup.cs
trunk/Tests/ResourceTests/Res032.cs
trunk/UnitTests/Fakes/FakeReporter.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/AgateLib.csproj 2014-07-26 07:09:55 UTC (rev 1416)
@@ -54,7 +54,6 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
- <Folder Include="Serialization\Xle\" />
</ItemGroup>
<ItemGroup>
<Compile Include="AgateException.cs">
@@ -66,6 +65,8 @@
<Compile Include="AppInitParameters.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="ApplicationModels\AgateAppModel.cs" />
+ <Compile Include="ApplicationModels\ModelParameters.cs" />
<Compile Include="AudioLib\AudioCapsInfo.cs" />
<Compile Include="AudioLib\ImplementationBase\MusicImpl.cs" />
<Compile Include="AudioLib\ImplementationBase\SoundBufferImpl.cs" />
@@ -110,7 +111,7 @@
<Compile Include="Extensions\Collections\Generic\ListSorting.cs" />
<Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" />
<Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" />
- <Compile Include="IFileProvider.cs">
+ <Compile Include="IO\IFileProvider.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DisplayLib\ImplementationBase\FrameBufferImpl.cs" />
@@ -125,6 +126,24 @@
<Compile Include="Platform\PlatformInfo.cs" />
<Compile Include="Platform\PlatformType.cs" />
<Compile Include="Resources\ImageResource.cs" />
+ <Compile Include="Serialization\Xle\CompressionMode.cs" />
+ <Compile Include="Serialization\Xle\CompressionType.cs" />
+ <Compile Include="Serialization\Xle\ITypeBinder.cs" />
+ <Compile Include="Serialization\Xle\IXleSerializable.cs" />
+ <Compile Include="Serialization\Xle\IXleTypeSerializer.cs" />
+ <Compile Include="Serialization\Xle\NumericEncoding.cs" />
+ <Compile Include="Serialization\Xle\TypeBinder.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\XleSerializationException.cs" />
+ <Compile Include="Serialization\Xle\XleSerializationInfo.cs" />
+ <Compile Include="Serialization\Xle\XleSerializer.cs" />
+ <Compile Include="Serialization\Xle\XleTypeSerializerBase.cs" />
+ <Compile Include="Serialization\Xle\XleTypeSerializerCollection.cs" />
<Compile Include="Settings\SettingsGroup.cs" />
<Compile Include="Platform\Timing.cs">
<SubType>Code</SubType>
@@ -237,10 +256,10 @@
<Compile Include="DisplayLib\Shaders\Implementation\UniformState.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="Drivers\NullInputImpl.cs">
+ <Compile Include="Drivers\NullDrivers\NullInputImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="Drivers\NullSoundImpl.cs">
+ <Compile Include="Drivers\NullDrivers\NullSoundImpl.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Geometry\Color.cs">
@@ -354,18 +373,6 @@
<Compile Include="InputLib\Mouse.cs">
<SubType>Code</SubType>
</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>
@@ -450,12 +457,6 @@
<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>
Added: trunk/AgateLib/ApplicationModels/AgateAppModel.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AgateAppModel.cs (rev 0)
+++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -0,0 +1,103 @@
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.ApplicationModels
+{
+ public abstract class AgateAppModel
+ {
+ #region --- Static Members ---
+
+ public static AgateAppModel Instance { get; private set; }
+
+ public static bool IsAlive
+ {
+ get
+ {
+ if (Instance == null)
+ return false;
+
+ if (Instance.window != null)
+ return Instance.window.IsClosed == false;
+
+ if (Display.CurrentWindow == null)
+ return false;
+
+ return Display.CurrentWindow.IsClosed == false;
+ }
+ }
+
+ #endregion
+
+ DisplayWindow window;
+
+ public AgateAppModel(ModelParameters parameters)
+ {
+ Parameters = parameters;
+
+ if (IsAlive)
+ throw new AgateException("Cannot create a new application model when an existing one is active.");
+
+ Instance = this;
+ }
+
+ protected int RunModel(Func<int> entryPoint)
+ {
+ try
+ {
+ Initialize();
+ AutoCreateDisplayWindow();
+
+ int retval = BeginModel(entryPoint);
+
+ return retval;
+ }
+ finally
+ {
+ if (window != null)
+ window.Dispose();
+
+ Dispose();
+ }
+ }
+
+ protected abstract int BeginModel(Func<int> entryPoint);
+
+ private void AutoCreateDisplayWindow()
+ {
+ if (Parameters.AutoCreateDisplayWindow == false)
+ return;
+
+ if (Parameters.CreateFullScreenWindow)
+ {
+ window = DisplayWindow.CreateFullScreen(
+ Parameters.ApplicationName,
+ GetFullScreenSize());
+ }
+ }
+
+ private Size GetFullScreenSize()
+ {
+ if (Parameters.DisplayWindowSize.IsEmpty)
+ return GetScreenSize();
+
+ if (Parameters.DisplayWindowSize.Width == 0 ) throw new AgateException("Cannot create a display window with width 0.");
+ if (Parameters.DisplayWindowSize.Height == 0) throw new AgateException("Cannot create a display window with height 0.");
+
+ return Parameters.DisplayWindowSize;
+ }
+
+ private Size GetScreenSize()
+ {
+ return Display.Caps.ScreenResolution;
+ }
+
+ protected abstract void Initialize();
+ protected abstract void Dispose();
+
+ public ModelParameters Parameters { get; set; }
+ }
+}
Added: trunk/AgateLib/ApplicationModels/ModelParameters.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/ModelParameters.cs (rev 0)
+++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -0,0 +1,44 @@
+using AgateLib.Geometry;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.ApplicationModels
+{
+ public class ModelParameters
+ {
+ string[] args;
+
+ public ModelParameters()
+ {
+ CreateFullScreenWindow = true;
+ }
+ public ModelParameters(string[] args) : this()
+ {
+ Arguments = args;
+ }
+
+ public string ApplicationName { get; set; }
+
+ public bool AutoCreateDisplayWindow { get; set; }
+ public Size DisplayWindowSize { get; set; }
+ public bool CreateFullScreenWindow { get; set; }
+
+ public string[] Arguments
+ {
+ get { return args; }
+ set
+ {
+ args = value;
+ ParseArguments();
+ }
+ }
+
+ private void ParseArguments()
+ {
+ }
+
+ }
+}
Modified: trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -35,26 +35,15 @@
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
- public virtual SoundBufferImpl CreateSoundBuffer(string filename)
- {
- using (Stream stream = FileSystem.OpenRead(filename))
- {
- return CreateSoundBuffer(stream);
- }
- }
+ public abstract SoundBufferImpl CreateSoundBuffer(string filename);
/// <summary>
/// Creates a MusicImpl object.
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
- public virtual MusicImpl CreateMusic(string filename)
- {
- using (Stream stream = FileSystem.OpenRead(filename))
- {
- return CreateMusic(stream);
- }
- }
+ public abstract MusicImpl CreateMusic(string filename);
+
/// <summary>
/// Creates a MusicImpl object.
/// </summary>
Modified: trunk/AgateLib/AudioLib/Music.cs
===================================================================
--- trunk/AgateLib/AudioLib/Music.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/AudioLib/Music.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -29,8 +29,6 @@
{
/// <summary>
/// A class which performs Music playback.
- ///
- /// This class should support loading of .ogg and .mid files, at the very least.
/// </summary>
public sealed class Music
{
@@ -47,10 +45,7 @@
/// <param name="filename">The name of the file to load.</param>
public Music(string filename)
{
- using (System.IO.Stream s = FileSystem.OpenRead(filename))
- {
- impl = Audio.Impl.CreateMusic(s);
- }
+ impl = Audio.Impl.CreateMusic(filename);
mFilename = filename;
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/Core.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -29,6 +29,7 @@
using AgateLib.Drivers;
using AgateLib.Diagnostics;
using AgateLib.IO;
+using AgateLib.InputLib;
namespace AgateLib
{
@@ -261,13 +262,13 @@
{
if (sWroteHeader == true)
{
- Stream stream = FileSystem.OpenWrite(ErrorFile, true);
+ Stream stream = FileSystem.File.OpenWrite(ErrorFile, true);
return new StreamWriter(stream);
}
else
{
- var stream = FileSystem.OpenWrite(ErrorFile);
+ var stream = FileSystem.File.OpenWrite(ErrorFile);
StreamWriter writer = new StreamWriter(stream);
WriteHeader(writer);
@@ -325,6 +326,12 @@
mPlatform = factory.PlatformFactory.CreatePlatformInfo();
mTime = factory.PlatformFactory.CreateStopwatch();
+ FileSystem.File = factory.PlatformFactory.CreateFile();
+
+ Display.Initialize(factory.DisplayFactory.CreateDisplayImpl());
+ Audio.Initialize(factory.AudioFactory.CreateAudioImpl());
+ JoystickInput.Initialize(factory.InputFactory.CreateJoystickInputImpl());
+
sInititalized = true;
}
Modified: trunk/AgateLib/Diagnostics/Log.cs
===================================================================
--- trunk/AgateLib/Diagnostics/Log.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/Diagnostics/Log.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Text;
@@ -7,9 +8,13 @@
{
public static class Log
{
- internal static void WriteLine(string p)
+ public static void WriteLine(string message)
{
- throw new NotImplementedException();
+ Debug.WriteLine(message);
}
+ public static void WriteLine(string format, params object[] args)
+ {
+ Debug.WriteLine(format, args);
+ }
}
}
Modified: trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -139,6 +139,11 @@
{
get { return Display.Impl.CapsSize(DisplaySizeCaps.MaxSurfaceSize); }
}
+
+ public Size ScreenResolution
+ {
+ get { return Display.Impl.CapsSize(DisplaySizeCaps.NativeScreenResolution); }
+ }
}
/// <summary>
@@ -150,6 +155,7 @@
/// Value for getting the maximum supported surface size.
/// </summary>
MaxSurfaceSize,
+ NativeScreenResolution,
}
/// <summary>
/// Enum which is used to specify a Caps value which should return a logical value.
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -115,6 +115,18 @@
/// <param name="width"></param>
/// <param name="height"></param>
/// <returns></returns>
+ public static DisplayWindow CreateFullScreen(string title, Size size)
+ {
+ return new DisplayWindow(CreateWindowParams.FullScreen(title, size.Width, size.Height, 32));
+ }
+ /// <summary>
+ /// Creates a DisplayWindow object which renders to the entire screen, setting
+ /// the resolution to the value specified.
+ /// </summary>
+ /// <param name="title"></param>
+ /// <param name="width"></param>
+ /// <param name="height"></param>
+ /// <returns></returns>
public static DisplayWindow CreateFullScreen(string title, int width, int height)
{
return new DisplayWindow(CreateWindowParams.FullScreen(title, width, height, 32));
Modified: trunk/AgateLib/DisplayLib/PixelBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/DisplayLib/PixelBuffer.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -172,7 +172,8 @@
mData = new byte[size.Width * size.Height * PixelStride];
- SetData(data, sourceFormat, srcRowStride);
+ throw new NotImplementedException();
+ //SetData(data, sourceFormat, srcRowStride);
}
/// <summary>
@@ -701,94 +702,7 @@
}
}
- /// <summary>
- /// Copies the data from the unmanaged memory pointer passed in into the internal pixel
- /// buffer array. Automatic conversion is performed if the format the data
- /// is in (indicated by format parameter) differs from the format the
- /// pixel buffer is in.
- /// </summary>
- /// <param name="data"></param>
- /// <param name="srcFormat"></param>
- /// <param name="srcRowStride"></param>
- public void SetData(IntPtr data, PixelFormat srcFormat, int srcRowStride)
- {
- throw new NotImplementedException();
- //int sourceStride = GetPixelStride(srcFormat);
-
- //unsafe
- //{
- // if (srcFormat == this.PixelFormat)
- // {
- // // optimized copy for same type of data
- // int startIndex = 0;
- // int rowLength = sourceStride * Width;
-
- // IntPtr rowPtr = data;
- // byte* dataPtr = (byte*)data;
-
- // for (int y = 0; y < Height; y++)
- // {
- // Marshal.Copy(rowPtr, mData, startIndex, rowLength);
-
- // startIndex += RowStride;
- // dataPtr += srcRowStride;
- // rowPtr = (IntPtr)dataPtr;
- // }
- // }
- // else
- // {
- // byte[] srcPixel = new byte[srcRowStride];
- // int destIndex = 0;
- // IntPtr rowPtr = data;
- // byte* dataPtr = (byte*)data;
- // int width = Width;
- // int destPixelStride = PixelStride;
-
- // 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)
- // {
- // // this setup here is OPTIMIZED.
- // // Calling ConvertPixel for each pixel when loading a large
- // // image adds about 35% more CPU time to do the conversion.
- // // By eliminating the function call and processing this special
- // // case here we save some time on image loading.
- // int srcIndex = 0;
-
- // for (int x = 0; x < width; x++)
- // {
- // mData[destIndex] = srcPixel[srcIndex + 2];
- // mData[destIndex + 1] = srcPixel[srcIndex + 1];
- // mData[destIndex + 2] = srcPixel[srcIndex];
- // mData[destIndex + 3] = srcPixel[srcIndex + 3];
-
- // destIndex += destPixelStride;
- // srcIndex += sourceStride;
- // }
- // }
- // else
- // {
- // for (int x = 0; x < width; x++)
- // {
- // ConvertPixel(mData, destIndex, this.PixelFormat, srcPixel, x * sourceStride, srcFormat);
-
- // destIndex += destPixelStride;
- // }
- // }
-
- // dataPtr += srcRowStride;
- // rowPtr = (IntPtr)dataPtr;
- // }
- // }
- //}
- }
-
-
/// <summary>
/// Creates a new PixelBuffer and copies the data in this PixelBuffer,
/// performing automatic conversion.
Modified: trunk/AgateLib/DisplayLib/Surface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Surface.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/DisplayLib/Surface.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -90,10 +90,7 @@
if (string.IsNullOrEmpty(filename))
throw new ArgumentNullException("You must supply a file name.");
- using (System.IO.Stream s = FileSystem.OpenRead(filename))
- {
- mImpl = Display.Impl.CreateSurface(s);
- }
+ mImpl = Display.Impl.CreateSurface(filename);
Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose);
Display.PackAllSurfacesEvent += new EventHandler(Display_PackAllSurfacesEvent);
@@ -692,18 +689,6 @@
/// <summary>
- /// Saves the surface to the specified file.
- ///
- /// Infers the file format from the extension. If there
- /// is no extension present or it is unrecognized, PNG is
- /// assumed.
- /// </summary>
- /// <param name="filename">File name to save to.</param>
- public void SaveTo(string filename)
- {
- SaveTo(filename, FormatFromExtension(filename));
- }
- /// <summary>
/// Saves the surface to the specified file, with the specified
/// file format. If the file has an extension such as ".png" or
/// ".bmp" than the SaveTo(string) overload is prefered, as it
@@ -713,7 +698,7 @@
/// <param name="format">Image format for the target file.</param>
public void SaveTo(string filename, ImageFileFormat format)
{
- mImpl.SaveTo(filename, format);
+ Impl.SaveTo(filename, format);
}
/// <summary>
@@ -824,37 +809,6 @@
#endregion
/// <summary>
- /// Returns a value in the ImageFileFormat enum based on the file
- /// extension of the given filename. No checks are done to see
- /// if that file exists.
- /// </summary>
- /// <param name="filename"></param>
- /// <returns></returns>
- public static ImageFileFormat FormatFromExtension(string filename)
- {
- string ext = FileSystem.Path.GetExtension(filename);
-
- switch (ext)
- {
- case ".bmp":
- return ImageFileFormat.Bmp;
-
- case ".jpg":
- case ".jpe":
- case ".jpeg":
- return ImageFileFormat.Jpg;
-
- case ".tga":
- return ImageFileFormat.Tga;
-
- case ".png":
- default:
- return ImageFileFormat.Png;
- }
-
- }
-
- /// <summary>
/// Gets the object which does actual rendering of this surface.
/// This may be cast to a surface object in whatever rendering library
/// is being used (eg. if using the SDX library, this can be cast
Modified: trunk/AgateLib/Drivers/IAudioFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IAudioFactory.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/Drivers/IAudioFactory.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -8,5 +8,6 @@
{
public interface IAudioFactory
{
+ AudioLib.ImplementationBase.AudioImpl CreateAudioImpl();
}
}
Modified: trunk/AgateLib/Drivers/IDisplayFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -8,5 +8,6 @@
{
public interface IDisplayFactory
{
+ DisplayLib.ImplementationBase.DisplayImpl CreateDisplayImpl();
}
}
Modified: trunk/AgateLib/Drivers/IInputFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IInputFactory.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/Drivers/IInputFactory.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -8,5 +8,6 @@
{
public interface IInputFactory
{
+ InputLib.ImplementationBase.InputImpl CreateJoystickInputImpl();
}
}
Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-07-25 01:57:36 UTC (rev 1415)
+++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -11,5 +11,7 @@
PlatformInfo CreatePlatformInfo();
IStopWatch CreateStopwatch();
+
+ IO.IFile CreateFile();
}
}
Copied: trunk/AgateLib/Drivers/NullDrivers/NullInputImpl.cs (from rev 1411, trunk/AgateLib/Drivers/NullInputImpl.cs)
===================================================================
--- trunk/AgateLib/Drivers/NullDrivers/NullInputImpl.cs (rev 0)
+++ trunk/AgateLib/Drivers/NullDrivers/NullInputImpl.cs 2014-07-26 07:09:55 UTC (rev 1416)
@@ -0,0 +1,50 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+using AgateLib.Drivers;
+using AgateLib.InputLib.ImplementationBase;
+
+namespace AgateLib.Drivers.NullDrivers
+{
+ public class NullInputImpl : InputImpl
+ {
+ public override void Initialize()
+ {
+ Report("No input driver found. Joysticks will not work.");
+ }
+
+ public override void Dispose()
+ {
+
+ }
+
+ public override int JoystickCount
+ {
+ get { return 0; }
+ }
+
+ public override IEnumerable<JoystickImpl> CreateJoysticks()
+ {
+ return new List<JoystickImpl>();
+ }
+ }
+}
Copied: trunk/AgateLib/Drivers/NullDrivers/NullSoundImpl.cs (from r...
[truncated message content] |
|
From: <ka...@us...> - 2014-07-26 14:38:45
|
Revision: 1417
http://sourceforge.net/p/agate/code/1417
Author: kanato
Date: 2014-07-26 14:38:36 +0000 (Sat, 26 Jul 2014)
Log Message:
-----------
Add generic list sort method.
Modified Paths:
--------------
trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/AgateLib/Serialization/Xle/XleSerializer.cs
trunk/UnitTests/UnitTests.csproj
Added Paths:
-----------
trunk/UnitTests/Extensions/
trunk/UnitTests/Extensions/ListExtensions.cs
Modified: trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs
===================================================================
--- trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs 2014-07-26 07:09:55 UTC (rev 1416)
+++ trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs 2014-07-26 14:38:36 UTC (rev 1417)
@@ -19,16 +19,21 @@
{
if (list == null) throw new ArgumentNullException("list");
- Comparison<T> comp;
+ Comparison<T> comp = null;
if (typeof(IComparable<T>).IsAssignableFrom(typeof(T)))
{
- InsertionSort(list, (x, y) => ((IComparable<T>)x).CompareTo(y));
+ comp = (x, y) => ((IComparable<T>)x).CompareTo(y);
}
else if (typeof(IComparable).IsAssignableFrom(typeof(T)))
{
- InsertionSort(list, (x, y) => ((IComparable)x).CompareTo(y));
+ comp = (x, y) => ((IComparable)x).CompareTo(y);
}
+
+ if (comp == null)
+ throw new InvalidOperationException("No comparison method available for " + typeof(T).FullName);
+
+ InsertionSort(list, comp);
}
/// <summary>
/// Provides a sort method for IList<T> objects which
@@ -37,6 +42,19 @@
/// <typeparam name="T"></typeparam>
/// <param name="list"></param>
/// <param name="comparison"></param>
+ public static void InsertionSort<T>(this IList<T> list, IComparer<T> comparer)
+ {
+ if (list == null) throw new ArgumentNullException("list");
+
+ InsertionSort(list, (x, y) => comparer.Compare(x, y));
+ }
+ /// <summary>
+ /// Provides a sort method for IList<T> objects which
+ /// is stable, unlike the List<T>.Sort() method.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="list"></param>
+ /// <param name="comparison"></param>
public static void InsertionSort<T>(this IList<T> list, Comparison<T> comparison)
{
if (list == null) throw new ArgumentNullException("list");
Modified: trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-07-26 07:09:55 UTC (rev 1416)
+++ trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-07-26 14:38:36 UTC (rev 1417)
@@ -1591,7 +1591,7 @@
try
{
- obj = (IXleSerializable)Activator.CreateInstance(type, true);
+ obj = (IXleSerializable)Activator.CreateInstance(type);
}
catch (Exception e)
{
Modified: trunk/AgateLib/Serialization/Xle/XleSerializer.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-07-26 07:09:55 UTC (rev 1416)
+++ trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-07-26 14:38:36 UTC (rev 1417)
@@ -21,6 +21,7 @@
using System.IO;
using System.Text;
using System.Reflection;
+using System.Linq;
using System.Xml.Linq;
using System.Xml;
@@ -54,7 +55,7 @@
/// <param name="objectType">The type of the object to serialize.</param>
public XleSerializer(Type objectType)
{
- if (typeof(IXleSerializable).IsAssignableFrom(objectType))
+ if (objectType.GetInterfaces().Contains(typeof(IXleSerializable)) == false)
throw new ArgumentException("Object type is not IXleSerializable.");
var typeBinder = new TypeBinder();
Added: trunk/UnitTests/Extensions/ListExtensions.cs
===================================================================
--- trunk/UnitTests/Extensions/ListExtensions.cs (rev 0)
+++ trunk/UnitTests/Extensions/ListExtensions.cs 2014-07-26 14:38:36 UTC (rev 1417)
@@ -0,0 +1,24 @@
+using System;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Collections.Generic;
+using AgateLib.Extensions.Collections.Generic;
+
+namespace AgateLib.UnitTests.Extensions
+{
+ [TestClass]
+ public class ListExtensions
+ {
+ [TestMethod]
+ public void SortPrimitives()
+ {
+ List<int> li = new List<int> { 1, 6, 2, 3, 8, 10, 9, 7, 4, 5 };
+
+ Assert.AreEqual(10, li.Count);
+
+ li.InsertionSort();
+
+ for (int i = 0; i < li.Count; i++)
+ Assert.AreEqual(i + 1, li[i]);
+ }
+ }
+}
Modified: trunk/UnitTests/UnitTests.csproj
===================================================================
--- trunk/UnitTests/UnitTests.csproj 2014-07-26 07:09:55 UTC (rev 1416)
+++ trunk/UnitTests/UnitTests.csproj 2014-07-26 14:38:36 UTC (rev 1417)
@@ -89,6 +89,7 @@
<ItemGroup>
<Compile Include="Core\ConsoleTests.cs" />
<Compile Include="Display\DisplayTests.cs" />
+ <Compile Include="Extensions\ListExtensions.cs" />
<Compile Include="Fakes\FakeDisplayDriver.cs" />
<Compile Include="Fakes\FakeDisplayWindow.cs" />
<Compile Include="Fakes\FakeFrameBuffer.cs" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-07-26 15:17:51
|
Revision: 1418
http://sourceforge.net/p/agate/code/1418
Author: kanato
Date: 2014-07-26 15:17:42 +0000 (Sat, 26 Jul 2014)
Log Message:
-----------
Some fixes to serialization.
Modified Paths:
--------------
trunk/AgateLib/Core.cs
trunk/AgateLib/Diagnostics/AgateConsole.cs
trunk/AgateLib/Drivers/IPlatformFactory.cs
trunk/AgateLib/Platform/IStopWatch.cs
trunk/AgateLib/Platform/Timing.cs
trunk/AgateLib/Serialization/Xle/TypeBinder.cs
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/AgateLib/Serialization/Xle/XleSerializer.cs
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs
trunk/Tests/CoreTests/Timers/frmTimers.cs
Added Paths:
-----------
trunk/AgateLib.Platform.WindowsForms/Factories/SysIoPath.cs
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib/Core.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -102,7 +102,7 @@
#region --- Error Reporting ---
private static CrossPlatformDebugLevel mCrossPlatform = CrossPlatformDebugLevel.Comment;
- private static IStopWatch mTime;
+ private static IStopwatch mTime;
/// <summary>
/// Static class which is used to handle all error reports.
@@ -327,6 +327,7 @@
mTime = factory.PlatformFactory.CreateStopwatch();
FileSystem.File = factory.PlatformFactory.CreateFile();
+ FileSystem.Path = factory.PlatformFactory.CreatePath();
Display.Initialize(factory.DisplayFactory.CreateDisplayImpl());
Audio.Initialize(factory.AudioFactory.CreateAudioImpl());
Modified: trunk/AgateLib/Diagnostics/AgateConsole.cs
===================================================================
--- trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -52,6 +52,7 @@
if (sInstance != null)
return;
+ sInstance = Core.Factory.PlatformFactory.CreateConsole();
PrivateInitialize();
}
Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -10,8 +10,14 @@
{
PlatformInfo CreatePlatformInfo();
- IStopWatch CreateStopwatch();
+ IStopwatch CreateStopwatch();
IO.IFile CreateFile();
+
+ Diagnostics.AgateConsole CreateConsole();
+
+ IO.IPath CreatePath();
+
+ IEnumerable<System.Reflection.Assembly> GetSerializationSearchAssemblies(Type objectType);
}
}
Modified: trunk/AgateLib/Platform/IStopWatch.cs
===================================================================
--- trunk/AgateLib/Platform/IStopWatch.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib/Platform/IStopWatch.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -2,7 +2,7 @@
namespace AgateLib.Platform
{
- public interface IStopWatch
+ public interface IStopwatch
{
void Dispose();
void ForceResume();
Modified: trunk/AgateLib/Platform/Timing.cs
===================================================================
--- trunk/AgateLib/Platform/Timing.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib/Platform/Timing.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -29,7 +29,7 @@
/// </summary>
public static class Timing
{
- private static IStopWatch mAppTimer;
+ private static IStopwatch mAppTimer;
public delegate void TimerDelegate();
@@ -60,7 +60,7 @@
mAppTimer.Resume();
}
- public static IStopWatch CreateStopWatch()
+ public static IStopwatch CreateStopWatch()
{
return Core.Factory.PlatformFactory.CreateStopwatch();
}
Modified: trunk/AgateLib/Serialization/Xle/TypeBinder.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/TypeBinder.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib/Serialization/Xle/TypeBinder.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -23,7 +23,7 @@
namespace AgateLib.Serialization.Xle
{
- class TypeBinder : ITypeBinder
+ public class TypeBinder : ITypeBinder
{
public List<Assembly> SearchAssemblies = new List<Assembly>();
@@ -46,30 +46,20 @@
return null;
}
- internal void AddAssembly(Assembly assembly)
+ public void AddAssemblies(IEnumerable<Assembly> assemblies)
{
+ foreach (var assembly in assemblies)
+ AddAssembly(assembly);
+ }
+
+ public void AddAssembly(Assembly assembly)
+ {
if (assembly == null)
throw new ArgumentNullException("assembly cannot be null.");
if (SearchAssemblies.Contains(assembly))
return;
SearchAssemblies.Add(assembly);
-
- // TODO: See if this is still required.
-
- // add names of assemblies referenced by the current assembly.
- //Assembly[] loaded = assembly. AppDomain.CurrentDomain.GetAssemblies();
-
- //foreach (AssemblyName assname in assembly.GetReferencedAssemblies())
- //{
- // foreach (Assembly ass in loaded)
- // {
- // AssemblyName thisname = ass.GetName();
-
- // if (thisname.FullName == assname.FullName)
- // AddAssembly(ass);
- // }
- //}
}
}
}
Modified: trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -761,7 +761,7 @@
var attribute = CurrentNode.Attribute(name);
if (attribute == null)
- return true;
+ return false;
XElement element = CurrentNode.Element(name);
Modified: trunk/AgateLib/Serialization/Xle/XleSerializer.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib/Serialization/Xle/XleSerializer.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -63,6 +63,9 @@
typeBinder.AddAssembly(objectType.Assembly);
typeBinder.AddAssembly(Assembly.GetExecutingAssembly());
+ typeBinder.AddAssemblies(
+ Core.Factory.PlatformFactory.GetSerializationSearchAssemblies(objectType));
+
Binder = typeBinder;
this.objectType = objectType;
Modified: trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-07-26 15:17:42 UTC (rev 1418)
@@ -90,6 +90,7 @@
<Compile Include="Factories\PlatformFactory.cs" />
<Compile Include="Factories\SdlFactory.cs" />
<Compile Include="Factories\SysIoFile.cs" />
+ <Compile Include="Factories\SysIoPath.cs" />
<Compile Include="PixelBufferExtensions.cs" />
<Compile Include="PlatformImplementation\FileProviderList.cs" />
<Compile Include="PlatformImplementation\FileSystemProvider.cs" />
Modified: trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -1,9 +1,11 @@
-using AgateLib.Drivers;
+using AgateLib.Diagnostics;
+using AgateLib.Drivers;
using AgateLib.IO;
using AgateLib.Platform.WindowsForms.PlatformImplementation;
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -16,7 +18,7 @@
return new FormsPlatformInfo();
}
- public IStopWatch CreateStopwatch()
+ public IStopwatch CreateStopwatch()
{
return new DiagnosticsStopwatch();
}
@@ -26,5 +28,37 @@
{
return new SysIoFile();
}
+
+
+ public Diagnostics.AgateConsole CreateConsole()
+ {
+ return new AgateConsoleImpl();
+ }
+
+
+ public IPath CreatePath()
+ {
+ return new SysIoPath();
+ }
+
+
+ public IEnumerable<Assembly> GetSerializationSearchAssemblies(Type objectType)
+ {
+ var assembly = Assembly.GetEntryAssembly();
+
+ yield return assembly;
+
+ // add names of assemblies referenced by the current assembly.
+ Assembly[] loaded = AppDomain.CurrentDomain.GetAssemblies();
+ AssemblyName[] referenced = assembly.GetReferencedAssemblies();
+
+ foreach (AssemblyName assname in referenced)
+ {
+ Assembly ass = loaded.FirstOrDefault(x => x.FullName == assname.FullName);
+
+ if (ass != null)
+ yield return ass;
+ }
+ }
}
}
Added: trunk/AgateLib.Platform.WindowsForms/Factories/SysIoPath.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Factories/SysIoPath.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsForms/Factories/SysIoPath.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -0,0 +1,42 @@
+using AgateLib.IO;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.Platform.WindowsForms.Factories
+{
+ class SysIoPath : IPath
+ {
+ public string Combine(string p1, string p2)
+ {
+ return Path.Combine(p1, p2);
+ }
+
+ public string GetFileNameWithoutExtension(string filename)
+ {
+ return Path.GetFileNameWithoutExtension(filename);
+ }
+
+ public string GetDirectoryName(string filename)
+ {
+ return Path.GetDirectoryName(filename);
+ }
+
+ public string GetFileName(string p)
+ {
+ return Path.GetFileName(p);
+ }
+
+ public string GetExtension(string filename)
+ {
+ return Path.GetExtension(filename);
+ }
+
+ public string GetTempPath()
+ {
+ return Path.GetTempPath();
+ }
+ }
+}
Modified: trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -13,7 +13,7 @@
/// A StopWatch can be paused and reset independently of other
/// StopWatches.
/// </summary>
- public class DiagnosticsStopwatch : IDisposable, AgateLib.Platform.IStopWatch
+ public class DiagnosticsStopwatch : IDisposable, AgateLib.Platform.IStopwatch
{
Watch watch = new Watch();
int mPause = 1;
Modified: trunk/Tests/CoreTests/Timers/frmTimers.cs
===================================================================
--- trunk/Tests/CoreTests/Timers/frmTimers.cs 2014-07-26 14:38:36 UTC (rev 1417)
+++ trunk/Tests/CoreTests/Timers/frmTimers.cs 2014-07-26 15:17:42 UTC (rev 1418)
@@ -17,7 +17,7 @@
{
public partial class frmTimerTester : Form
{
- IStopWatch timer = Timing.CreateStopWatch();
+ IStopwatch timer = Timing.CreateStopWatch();
int start = Environment.TickCount;
double deltaTimeSum = 0;
int count = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-07-26 15:33:36
|
Revision: 1419
http://sourceforge.net/p/agate/code/1419
Author: kanato
Date: 2014-07-26 15:33:32 +0000 (Sat, 26 Jul 2014)
Log Message:
-----------
Make "Everything" project compile.
Modified Paths:
--------------
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/AgateLib-Everything.sln
trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs
trunk/ChangeLog.txt
trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
trunk/Examples/BallBuster.Net/CImage.cs
trunk/Examples/BallBuster.Net/Program.cs
trunk/Examples/BallBuster.Net/ball.cs
trunk/Examples/BallBuster.Net/block.cs
trunk/Examples/BallBuster.Net/blockpart.cs
trunk/Examples/BallBuster.Net/flash.cs
trunk/Examples/BallBuster.Net/main.cs
trunk/Examples/BallBuster.Net/powerup.cs
trunk/Examples/Pong/Pong.cs
trunk/Examples/Pong/Pong.csproj
trunk/Examples/ShootTheTraps/App.cs
trunk/Examples/ShootTheTraps/Particle.cs
trunk/Examples/ShootTheTraps/ShootTheTraps.csproj
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/EditGlyphs.cs
trunk/Tools/FontCreator/FontCreator.cs
trunk/Tools/FontCreator/FontCreator.csproj
trunk/Tools/FontCreator/FontCreatorProgram.cs
trunk/Tools/FontCreator/frmFontCreator.cs
trunk/Tools/FontCreator/frmWarningSplash.cs
trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj
trunk/Tools/PackedSpriteCreator/SpriteEditor.Designer.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.cs
trunk/Tools/PackedSpriteCreator/SpritePacker.cs
trunk/Tools/PackedSpriteCreator/frmSpriteCreator.cs
trunk/Tools/ResourceEditor/ResourceEditor.csproj
Modified: trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -760,15 +760,15 @@
{
var attribute = CurrentNode.Attribute(name);
- if (attribute == null)
- return false;
+ if (attribute != null)
+ return true;
XElement element = CurrentNode.Element(name);
- if (element == null)
- return false;
+ if (element != null)
+ return true;
- return true;
+ return false;
}
#region --- Reading single values ---
Modified: trunk/AgateLib-Everything.sln
===================================================================
--- trunk/AgateLib-Everything.sln 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/AgateLib-Everything.sln 2014-07-26 15:33:32 UTC (rev 1419)
@@ -10,12 +10,7 @@
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}"
- ProjectSection(ProjectDependencies) = postProject
- {00C7FA95-98F4-43D9-9B63-34122B1DB003} = {00C7FA95-98F4-43D9-9B63-34122B1DB003}
- EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateSDL", "Drivers\AgateSDL\AgateSDL.csproj", "{00C7FA95-98F4-43D9-9B63-34122B1DB003}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib", "AgateLib\AgateLib.csproj", "{9490B719-829E-43A7-A5FE-8001F8A81759}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{F22ADCCC-7991-4F52-B2D0-697D60121BB3}"
@@ -28,8 +23,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotebookLib", "Tools\NotebookLib\NotebookLib\NotebookLib.csproj", "{91F57346-B574-4D52-9EB0-AA191B552C94}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatabaseEditor", "Tools\DatabaseEditor\DatabaseEditor.csproj", "{685E7B82-4609-4ABB-B25B-0DC7C58BD45F}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BallBuster.Net", "Examples\BallBuster.Net\BallBuster.Net.csproj", "{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShootTheTraps", "Examples\ShootTheTraps\ShootTheTraps.csproj", "{50743D1B-A19E-42F1-842F-65FAD6D168C3}"
@@ -40,6 +33,8 @@
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.Platform.WindowsForms", "AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj", "{4B12561E-D37B-48A1-B6DB-218E94906C22}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -84,38 +79,12 @@
{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
- {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|Win32.ActiveCfg = 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|Win32.ActiveCfg = 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|Win32.ActiveCfg = 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
{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|Win32.ActiveCfg = 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|x64.ActiveCfg = Debug|Any CPU
{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
@@ -130,8 +99,7 @@
{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|Win32.ActiveCfg = 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|x64.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.Build.0 = Release|x86
{F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -275,36 +243,6 @@
{91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x64.Build.0 = Release|x64
{91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x86.ActiveCfg = Release|x86
{91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x86.Build.0 = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|Win32.ActiveCfg = Debug|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|Win32.Build.0 = Debug|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|x64.ActiveCfg = Debug|x64
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|x64.Build.0 = Debug|x64
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|x86.ActiveCfg = Debug|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|x86.Build.0 = Debug|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|Any CPU.ActiveCfg = Release|Any CPU
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|Any CPU.Build.0 = Release|Any CPU
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|Mixed Platforms.ActiveCfg = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|Mixed Platforms.Build.0 = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|Win32.ActiveCfg = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|Win32.Build.0 = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|x64.ActiveCfg = Release|x64
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|x64.Build.0 = Release|x64
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|x86.ActiveCfg = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Public|x86.Build.0 = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|Any CPU.Build.0 = Release|Any CPU
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|Mixed Platforms.Build.0 = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|Win32.ActiveCfg = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|Win32.Build.0 = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|x64.ActiveCfg = Release|x64
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|x64.Build.0 = Release|x64
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|x86.ActiveCfg = Release|x86
- {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|x86.Build.0 = Release|x86
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
@@ -443,6 +381,33 @@
{94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Debug|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Win32.ActiveCfg = Debug|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Win32.Build.0 = Debug|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x64.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Mixed Platforms.Build.0 = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Win32.ActiveCfg = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Win32.Build.0 = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x64.ActiveCfg = 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|Mixed Platforms.ActiveCfg = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Mixed Platforms.Build.0 = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Win32.ActiveCfg = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Win32.Build.0 = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.ActiveCfg = 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
Modified: trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -113,7 +113,7 @@
{
AgateLib.Core.ErrorReporting.Report(ErrorLevel.Warning,
"Caught a MissingManifestResourceException when looking for the AgateLib Icon. " +
- "This indicates a problem with the way resources were embedded into AgateLib.WinForms.dll when it was built.",
+ "This indicates a problem with the way resources were embedded into AgateLib.Platform.WindowsForms.WinForms.dll when it was built.",
e);
return null;
Modified: trunk/ChangeLog.txt
===================================================================
--- trunk/ChangeLog.txt 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/ChangeLog.txt 2014-07-26 15:33:32 UTC (rev 1419)
@@ -78,7 +78,7 @@
Linux and MacOS with MonoDevelop. This should help users of other operating systems use and contribute to
AgateLib.
-Added AgateLib.WinForms.dll to encapsulate all references to System.Drawing and System.Windows.Forms
+Added AgateLib.Platform.WindowsForms.WinForms.dll to encapsulate all references to System.Drawing and System.Windows.Forms
inside AgateLib.dll. This is the last release of AgateLib.dll which will contain any methods which
take System.Drawing types, such as Point and Size.
Modified: trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
===================================================================
--- trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2014-07-26 15:33:32 UTC (rev 1419)
@@ -157,26 +157,14 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj">
+ <Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
+ <Name>AgateLib.Platform.WindowsForms</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
<Name>AgateLib</Name>
</ProjectReference>
- <ProjectReference Include="..\..\Drivers\AgateDrawing\AgateDrawing.csproj">
- <Project>{164a785d-924e-40fb-a517-d7e677f3b53a}</Project>
- <Name>AgateDrawing</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Drivers\AgateOTK\AgateOTK.csproj">
- <Project>{9E095F03-BA3F-4EAD-A905-2A2647CE4405}</Project>
- <Name>AgateOTK</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Drivers\AgateSDL\AgateSDL.csproj">
- <Project>{00C7FA95-98F4-43D9-9B63-34122B1DB003}</Project>
- <Name>AgateSDL</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Drivers\AgateSDX\AgateSDX.csproj">
- <Project>{ef993b30-d9a9-4962-80bb-6826d39b3465}</Project>
- <Name>AgateSDX</Name>
- </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Modified: trunk/Examples/BallBuster.Net/CImage.cs
===================================================================
--- trunk/Examples/BallBuster.Net/CImage.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/CImage.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -25,6 +25,7 @@
using AgateLib.Resources;
using AgateLib.Sprites;
using AgateLib.DisplayLib;
+using AgateLib.Platform.WindowsForms.Resources;
namespace BallBuster.Net
{
@@ -60,8 +61,8 @@
public void preload()
{
- this.font = FontSurface.AgateSans10;
- this.largeFont = FontSurface.AgateSans24;
+ this.font = BuiltinResources.AgateSans10;
+ this.largeFont = BuiltinResources.AgateSans24;
this.largeFont.SetScale(0.8, 0.8);
this.palogo = new Sprite(spritesSrc, "palogo");
Modified: trunk/Examples/BallBuster.Net/Program.cs
===================================================================
--- trunk/Examples/BallBuster.Net/Program.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/Program.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -1,39 +1,42 @@
-/*****************************************************************************
- Ball: Buster
- Copyright (C) 2004-9 Patrick Avella, Erik Ylvisaker
+//Ball: Buster
+//Copyright (C) 2004-14 Patrick Avella, Erik Ylvisaker
- This file is part of Ball: Buster.
+//This file is part of Ball: Buster.
- Ball: Buster is free software; you can redistribute it and/or modify
- it under the terms of the GNU General internal License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+//Ball: Buster is free software; you can redistribute it and/or modify
+//it under the terms of the GNU General internal License as published by
+//the Free Software Foundation; either version 2 of the License, or
+//(at your option) any later version.
- Ball: Buster is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General internal License for more details.
+//Ball: Buster is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//GNU General internal License for more details.
- You should have received a copy of the GNU General internal License
- along with Ball: Buster; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+//You should have received a copy of the GNU General internal License
+//along with Ball: Buster; if not, write to the Free Software
+//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
using System;
using System.Collections.Generic;
+using AgateLib.Platform.WindowsForms.ApplicationModels;
namespace BallBuster.Net
{
- static class Program
- {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main(string[] args)
- {
- BBX bbx = new BBX();
+ static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main(string[] args)
+ {
+ PassiveModel.Run(args, () =>
+ {
+ BBX bbx = new BBX();
- bbx.Main(args);
- }
- }
+ bbx.Main(args);
+ });
+ }
+ }
}
\ No newline at end of file
Modified: trunk/Examples/BallBuster.Net/ball.cs
===================================================================
--- trunk/Examples/BallBuster.Net/ball.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/ball.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -23,6 +23,7 @@
using AgateLib;
using AgateLib.Geometry;
+using AgateLib.Platform;
namespace BallBuster.Net
{
Modified: trunk/Examples/BallBuster.Net/block.cs
===================================================================
--- trunk/Examples/BallBuster.Net/block.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/block.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -22,6 +22,7 @@
using AgateLib;
using AgateLib.DisplayLib;
using AgateLib.Geometry;
+using AgateLib.Platform;
using AgateLib.Sprites;
namespace BallBuster.Net
Modified: trunk/Examples/BallBuster.Net/blockpart.cs
===================================================================
--- trunk/Examples/BallBuster.Net/blockpart.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/blockpart.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -27,6 +27,7 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.Sprites;
+using AgateLib.Platform;
namespace BallBuster.Net
{
Modified: trunk/Examples/BallBuster.Net/flash.cs
===================================================================
--- trunk/Examples/BallBuster.Net/flash.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/flash.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -21,6 +21,7 @@
using AgateLib;
using AgateLib.DisplayLib;
+using AgateLib.Platform;
namespace BallBuster.Net
{
Modified: trunk/Examples/BallBuster.Net/main.cs
===================================================================
--- trunk/Examples/BallBuster.Net/main.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/main.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -30,6 +30,8 @@
using AgateLib.Sprites;
using AgateLib.InputLib;
using AgateLib.AudioLib;
+using AgateLib.Platform;
+using AgateLib.Platform.WindowsForms;
namespace BallBuster.Net
{
@@ -129,7 +131,7 @@
EditorState editorState = new EditorState();
- Timing.StopWatch mPauseTimer = new Timing.StopWatch();
+ IStopwatch mPauseTimer = Timing.CreateStopWatch();
// the variables here are REALLY sloppy, sorry......... :P
private string gamemode;
@@ -278,68 +280,59 @@
[STAThread]
public int Main(string[] args)
{
- using (AgateSetup setup = new AgateSetup(args))
+ if (Display.Caps.IsHardwareAccelerated == false ||
+ AgateBuiltInShaders.Lighting2D == null)
{
- setup.AskUser = true;
- setup.Initialize(true, true, true);
+ doLighting = false;
+ }
- if (setup.WasCanceled)
- return 0;
+ bool fulls = true;
- if (Display.Caps.IsHardwareAccelerated == false ||
- AgateBuiltInShaders.Lighting2D == null)
- {
- doLighting = false;
- }
+ if (args.Length > 0)
+ if (args[0] == "-debug") debugger = true;
- bool fulls = true;
-
- if (args.Length > 0)
- if (args[0] == "-debug") debugger = true;
-
- if (debugger)
- {
- fulls = false;
- playmusic = false;
- }
+ if (debugger)
+ {
fulls = false;
+ playmusic = false;
+ }
+ fulls = false;
- // now it gets fun, set up the display mode
- DisplayWindow mywindow;
+ // now it gets fun, set up the display mode
+ DisplayWindow mywindow;
- if (fulls)
- mywindow = DisplayWindow.CreateFullScreen("Ball: Buster Xtreme.NET", 800, 600);
- else
- mywindow = DisplayWindow.CreateWindowed("Ball: Buster Xtreme.NET", 800, 600);
+ if (fulls)
+ mywindow = DisplayWindow.CreateFullScreen("Ball: Buster Xtreme.NET", 800, 600);
+ else
+ mywindow = DisplayWindow.CreateWindowed("Ball: Buster Xtreme.NET", 800, 600);
- Mouse.Hide();
+ Mouse.Hide();
- // load the images, initiation frame rate counter, and register signals
- AgateLib.AgateFileProvider.Images.AddPath("imgs");
+ // load the images, initiation frame rate counter, and register signals
+ Configuration.Images.AddPath("imgs");
- splash();
+ splash();
- img.load();
- snd.load();
+ img.load();
+ snd.load();
- Mouse.MouseMove += new InputEventHandler(Mouse_MouseMoveEvent);
- Mouse.MouseUp += new InputEventHandler(Mouse_MouseUpEvent);
- Mouse.MouseDown += new InputEventHandler(Mouse_MouseDownEvent);
- Keyboard.KeyDown += new InputEventHandler(Keyboard_KeyDown);
+ Mouse.MouseMove += new InputEventHandler(Mouse_MouseMoveEvent);
+ Mouse.MouseUp += new InputEventHandler(Mouse_MouseUpEvent);
+ Mouse.MouseDown += new InputEventHandler(Mouse_MouseDownEvent);
+ Keyboard.KeyDown += new InputEventHandler(Keyboard_KeyDown);
- loadHighscores();
- loadWorlds();
+ loadHighscores();
+ loadWorlds();
- //here we go!
- run();
+ //here we go!
+ run();
- img.unload();
+ img.unload();
- saveHighscores();
+ saveHighscores();
- freeWorlds();
- }
+ freeWorlds();
return 0;
}
Modified: trunk/Examples/BallBuster.Net/powerup.cs
===================================================================
--- trunk/Examples/BallBuster.Net/powerup.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/BallBuster.Net/powerup.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -24,6 +24,7 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.Sprites;
+using AgateLib.Platform;
namespace BallBuster.Net
{
Modified: trunk/Examples/Pong/Pong.cs
===================================================================
--- trunk/Examples/Pong/Pong.cs 2014-07-26 15:17:42 UTC (rev 1418)
+++ trunk/Examples/Pong/Pong.cs 2014-07-26 15:33:32 UTC (rev 1419)
@@ -4,214 +4,211 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.InputLib;
+using AgateLib.Platform.WindowsForms.ApplicationModels;
+using AgateLib.Platform.WindowsForms.Resources;
namespace Pong
{
- class Program
- {
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main(string[] args)
- {
- new Program().Run(args);
- }
+ class Program
+ {
- FontSurface font;
- int[] score = new int[2];
- string[] names = new string[] { "Player", "CPU" };
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main(string[] args)
+ {
+ PassiveModel.Run(args, () =>
+ {
+ new Program().Run(args);
+ });
+ }
- Vector2 ball, ballvelocity;
- Vector2[] paddle = new Vector2[2];
-
- const int paddleHeight = 80;
- const int paddleWidth = 16;
- const int borderSize = paddleWidth;
- const int ballSize = paddleWidth;
- const int displayWidth = 800;
- const int playAreaWidth = 700;
- const int displayHeight = 600;
- const float paddleSpeed = 150.0f;
+ FontSurface font;
+ int[] score = new int[2];
+ string[] names = new string[] { "Player", "CPU" };
- Color paddleColor = Color.LightGray;
- Color ballColor = Color.LightGray;
+ Vector2 ball, ballvelocity;
+ Vector2[] paddle = new Vector2[2];
- void Run(string[] args)
- {
- using (AgateSetup setup = new AgateSetup(args))
- {
- setup.Initialize(true, false, false);
- if (setup.WasCanceled)
- return;
+ const int paddleHeight = 80;
+ const int paddleWidth = 16;
+ const int borderSize = paddleWidth;
+ const int ballSize = paddleWidth;
+ const int displayWidth = 800;
+ const int playAreaWidth = 700;
+ const int displayHeight = 600;
+ const float paddleSpeed = 150.0f;
- DisplayWindow wind = DisplayWindow.CreateWindowed
- ("Pong Example", displayWidth, displayHeight);
+ Color paddleColor = Color.LightGray;
+ Color ballColor = Color.LightGray;
- font = FontSurface.AgateSans14;
+ void Run(string[] args)
+ {
+ DisplayWindow wind = DisplayWindow.CreateWindowed
+ ("Pong Example", displayWidth, displayHeight);
- paddle[0] = new Vector2(50, displayHeight / 2);
- paddle[1] = new Vector2(playAreaWidth - 50 - paddleWidth, displayHeight / 2);
- ball = new Vector2(playAreaWidth / 2, displayHeight / 2);
- ballvelocity = new Vector2(-70, 70);
+ font = BuiltinResources.AgateSans14;
- while (wind.IsClosed == false)
- {
- Display.BeginFrame();
- Display.Clear(Color.DarkGray);
+ paddle[0] = new Vector2(50, displayHeight / 2);
+ paddle[1] = new Vector2(playAreaWidth - 50 - paddleWidth, displayHeight / 2);
+ ball = new Vector2(playAreaWidth / 2, displayHeight / 2);
+ ballvelocity = new Vector2(-70, 70);
- DrawBorder();
- DrawPaddles();
- DrawBall();
- DrawScore();
+ while (wind.IsClosed == false)
+ {
+ Display.BeginFrame();
+ Display.Clear(Color.DarkGray);
- Display.EndFrame();
- Core.KeepAlive();
+ DrawBorder();
+ DrawPaddles();
+ DrawBall();
+ DrawScore();
- if (Keyboard.Keys[KeyCode.Escape])
- wind.Dispose();
+ Display.EndFrame();
+ Core.KeepAlive();
- float time_s = (float)Displa...
[truncated message content] |
|
From: <ka...@us...> - 2014-07-26 17:13:57
|
Revision: 1421
http://sourceforge.net/p/agate/code/1421
Author: kanato
Date: 2014-07-26 17:13:50 +0000 (Sat, 26 Jul 2014)
Log Message:
-----------
Update version numbers to 2.0.
Modified Paths:
--------------
trunk/AgateLib/Properties/AssemblyInfo.cs
trunk/AgateLib.GL/Properties/AssemblyInfo.cs
trunk/AgateLib.Platform.WindowsForms/Properties/AssemblyInfo.cs
trunk/IntegrationTests/Properties/AssemblyInfo.cs
trunk/Tests/Properties/AssemblyInfo.cs
trunk/Tools/FontCreator/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-26 15:38:21 UTC (rev 1420)
+++ trunk/AgateLib/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -44,6 +44,6 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]
Modified: trunk/AgateLib.GL/Properties/AssemblyInfo.cs
===================================================================
--- trunk/AgateLib.GL/Properties/AssemblyInfo.cs 2014-07-26 15:38:21 UTC (rev 1420)
+++ trunk/AgateLib.GL/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -33,5 +33,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("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]
Modified: trunk/AgateLib.Platform.WindowsForms/Properties/AssemblyInfo.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Properties/AssemblyInfo.cs 2014-07-26 15:38:21 UTC (rev 1420)
+++ trunk/AgateLib.Platform.WindowsForms/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -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("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]
Modified: trunk/IntegrationTests/Properties/AssemblyInfo.cs
===================================================================
--- trunk/IntegrationTests/Properties/AssemblyInfo.cs 2014-07-26 15:38:21 UTC (rev 1420)
+++ trunk/IntegrationTests/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -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("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]
Modified: trunk/Tests/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tests/Properties/AssemblyInfo.cs 2014-07-26 15:38:21 UTC (rev 1420)
+++ trunk/Tests/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]
Modified: trunk/Tools/FontCreator/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tools/FontCreator/Properties/AssemblyInfo.cs 2014-07-26 15:38:21 UTC (rev 1420)
+++ trunk/Tools/FontCreator/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]
Modified: trunk/Tools/PackedSpriteCreator/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tools/PackedSpriteCreator/Properties/AssemblyInfo.cs 2014-07-26 15:38:21 UTC (rev 1420)
+++ trunk/Tools/PackedSpriteCreator/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -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("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]
Modified: trunk/Tools/ResourceEditor/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tools/ResourceEditor/Properties/AssemblyInfo.cs 2014-07-26 15:38:21 UTC (rev 1420)
+++ trunk/Tools/ResourceEditor/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]
Modified: trunk/UnitTests/Properties/AssemblyInfo.cs
===================================================================
--- trunk/UnitTests/Properties/AssemblyInfo.cs 2014-07-26 15:38:21 UTC (rev 1420)
+++ trunk/UnitTests/Properties/AssemblyInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
@@ -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("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.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-28 02:56:03
|
Revision: 1422
http://sourceforge.net/p/agate/code/1422
Author: kanato
Date: 2014-07-28 02:55:51 +0000 (Mon, 28 Jul 2014)
Log Message:
-----------
Refactor the application models.
Make the serial model run on a separate rendering thread.
Modified Paths:
--------------
trunk/AgateLib/ApplicationModels/AgateAppModel.cs
trunk/AgateLib/ApplicationModels/ModelParameters.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/Geometry/Size.cs
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs
trunk/AgateLib.Platform.WindowsForms/Configuration.cs
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/PlatformImplementation/DiagnosticsStopwatch.cs
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Tests/AudioTests/AudioPlayer/AudioPlayer.cs
trunk/Tests/AudioTests/SoundbufferStopTester.cs
trunk/Tests/AudioTests/StreamAudio.cs
trunk/Tests/CoreTests/ErrorReport/ErrorReport.cs
trunk/Tests/CoreTests/PersistantSettingsTest.cs
trunk/Tests/CoreTests/Resources.cs
trunk/Tests/CoreTests/Timers/Timers.cs
trunk/Tests/DisplayTests/BasicDrawing/BasicDrawing.cs
trunk/Tests/DisplayTests/Capabilities/Capabilities.cs
trunk/Tests/DisplayTests/ClipRect.cs
trunk/Tests/DisplayTests/ColorTest.cs
trunk/Tests/DisplayTests/DisplayWindowEvents.cs
trunk/Tests/DisplayTests/FullScreen.cs
trunk/Tests/DisplayTests/MultipleFramebufferTest.cs
trunk/Tests/DisplayTests/MultipleWindows/MultipleWindowTest.cs
trunk/Tests/DisplayTests/PixelBufferMask.cs
trunk/Tests/DisplayTests/PixelBufferTest/PixelBufferTest.cs
trunk/Tests/DisplayTests/Prerendered.cs
trunk/Tests/DisplayTests/RenderStates/RenderStates.cs
trunk/Tests/DisplayTests/RenderTargetContinuous.cs
trunk/Tests/DisplayTests/RotatingSpriteTester.cs
trunk/Tests/DisplayTests/ScreenCapture.cs
trunk/Tests/DisplayTests/SpriteTester/SpriteTester.cs
trunk/Tests/DisplayTests/SurfaceTester/SurfaceTester.cs
trunk/Tests/DisplayTests/TileTester/TileTester.cs
trunk/Tests/DisplayTests/Tiling.cs
trunk/Tests/Fonts/BitmapFonts.cs
trunk/Tests/Fonts/FontAlignment.cs
trunk/Tests/Fonts/FontLineTester.cs
trunk/Tests/Fonts/Fonts.cs
trunk/Tests/Fonts/Kerning.cs
trunk/Tests/InputTests/Input/InputTester.cs
trunk/Tests/Shaders/CoordinateSystem.cs
trunk/Tests/Shaders/Hlsl.cs
trunk/Tests/Shaders/Lighting3DTest.cs
trunk/Tests/Shaders/LightingTest/LightingTest.cs
trunk/UnitTests/Fakes/FakeDisplayDriver.cs
trunk/UnitTests/UnitTests.csproj
Added Paths:
-----------
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModelParameters.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModelParameters.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/IPrimaryWindow.cs
trunk/UnitTests/ApplicationModels/
trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs
Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -30,6 +30,12 @@
}
}
+
+ static Func<int> ActionToFunc(Action entry)
+ {
+ return () => { entry(); return 0; };
+ }
+
#endregion
DisplayWindow window;
@@ -42,8 +48,83 @@
throw new AgateException("Cannot create a new application model when an existing one is active.");
Instance = this;
+
+ ProcessArguments();
}
+ public int Run(Action entry)
+ {
+ return RunImpl(entry);
+ }
+ public int Run(Func<int> entry)
+ {
+ return RunImpl(entry);
+ }
+ public int Run(string[] args, Action entry)
+ {
+ Parameters.Arguments = args;
+
+ return RunImpl(entry);
+ }
+ public int Run(string[] args, Func<int> entry)
+ {
+ Parameters.Arguments = args;
+
+ return RunImpl(entry);
+ }
+
+ private int RunImpl(Action entry)
+ {
+ return RunImpl(ActionToFunc(entry));
+ }
+ protected virtual int RunImpl(Func<int> entry)
+ {
+ return RunModel(entry);
+ }
+
+ protected virtual void ProcessArguments()
+ {
+ if (Parameters.Arguments == null) return;
+
+ for(int i = 0; i < Parameters.Arguments.Length; i++)
+ {
+ var arg = Parameters.Arguments[i];
+ int extraArguments = Parameters.Arguments.Length - i- 1;
+ bool nextArgIsParam = extraArguments > 0 && Parameters.Arguments[i+1].StartsWith("--") == false;
+
+ if (arg.StartsWith("--"))
+ {
+ if (nextArgIsParam)
+ {
+ ProcessArgument(arg, Parameters.Arguments[i + 1]);
+ i++;
+ }
+ else
+ ProcessArgument(arg, "");
+ }
+ }
+ }
+
+ protected virtual void ProcessArgument(string arg, string parm)
+ {
+ switch(arg)
+ {
+ case "--window":
+ Parameters.CreateFullScreenWindow = false;
+ Parameters.DisplayWindowSize = Size.FromString(parm);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ private Size ParseSize(string parm)
+ {
+ Size.FromString(parm);
+ throw new NotImplementedException();
+ }
+
protected int RunModel(Func<int> entryPoint)
{
try
@@ -65,7 +146,7 @@
}
protected abstract int BeginModel(Func<int> entryPoint);
-
+
private void AutoCreateDisplayWindow()
{
if (Parameters.AutoCreateDisplayWindow == false)
@@ -77,8 +158,30 @@
Parameters.ApplicationName,
GetFullScreenSize());
}
+ else
+ {
+ window = DisplayWindow.CreateWindowed(
+ Parameters.ApplicationName,
+ GetWindowedScreenSize());
+ }
}
+ private Size GetWindowedScreenSize()
+ {
+ if (Parameters.DisplayWindowSize.IsEmpty)
+ {
+ var size = Display.Caps.NativeScreenResolution;
+ size.Width -= 60;
+ size.Height -= 60;
+
+ return size;
+ }
+ else
+ {
+ return Parameters.DisplayWindowSize;
+ }
+ }
+
private Size GetFullScreenSize()
{
if (Parameters.DisplayWindowSize.IsEmpty)
@@ -92,12 +195,14 @@
private Size GetScreenSize()
{
- return Display.Caps.ScreenResolution;
+ return Display.Caps.NativeScreenResolution;
}
protected abstract void Initialize();
protected abstract void Dispose();
+ protected DisplayWindow AutoCreatedWindow { get { return window; } }
+
public ModelParameters Parameters { get; set; }
}
}
Modified: trunk/AgateLib/ApplicationModels/ModelParameters.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -13,7 +13,9 @@
public ModelParameters()
{
+ AutoCreateDisplayWindow = true;
CreateFullScreenWindow = true;
+ ApplicationName = "AgateLib Application";
}
public ModelParameters(string[] args) : this()
{
@@ -26,19 +28,6 @@
public Size DisplayWindowSize { get; set; }
public bool CreateFullScreenWindow { get; set; }
- public string[] Arguments
- {
- get { return args; }
- set
- {
- args = value;
- ParseArguments();
- }
- }
-
- private void ParseArguments()
- {
- }
-
+ public string[] Arguments { get; set; }
}
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib/Core.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -328,7 +328,7 @@
FileSystem.File = factory.PlatformFactory.CreateFile();
FileSystem.Path = factory.PlatformFactory.CreatePath();
-
+
Display.Initialize(factory.DisplayFactory.CreateDisplayImpl());
Audio.Initialize(factory.AudioFactory.CreateAudioImpl());
JoystickInput.Initialize(factory.InputFactory.CreateJoystickInputImpl());
@@ -449,7 +449,7 @@
/// <returns></returns>
internal static double GetTime()
{
- return mTime.TotalSeconds;
+ return mTime.TotalMilliseconds;
}
Modified: trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -140,10 +140,21 @@
get { return Display.Impl.CapsSize(DisplaySizeCaps.MaxSurfaceSize); }
}
- public Size ScreenResolution
+ /// <summary>
+ /// Gets the native resolution of the main screen.
+ /// </summary>
+ public Size NativeScreenResolution
{
get { return Display.Impl.CapsSize(DisplaySizeCaps.NativeScreenResolution); }
}
+
+ /// <summary>
+ /// Gets the aspect ratio of the monitor.
+ /// </summary>
+ public double AspectRatio
+ {
+ get { return Display.Impl.CapsDouble(DisplayDoubleCaps.AspectRatio); }
+ }
}
/// <summary>
@@ -213,4 +224,11 @@
/// </summary>
CanCreateBitmapFont,
}
+ public enum DisplayDoubleCaps
+ {
+ /// <summary>
+ /// Indicates the aspect ratio (width / height) of the main monitor.
+ /// </summary>
+ AspectRatio,
+ }
}
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -136,6 +136,17 @@
/// This overload creates a window which has the default icon and is not resizeable.
/// </summary>
/// <param name="title"></param>
+ /// <param name="size"></param>
+ /// <returns></returns>
+ public static DisplayWindow CreateWindowed(string title, Size size)
+ {
+ return DisplayWindow.CreateWindowed(title, size.Width, size.Height);
+ }
+ /// <summary>
+ /// Creates a DisplayWindow object which generates a desktop window to render into.
+ /// This overload creates a window which has the default icon and is not resizeable.
+ /// </summary>
+ /// <param name="title"></param>
/// <param name="width"></param>
/// <param name="height"></param>
/// <returns></returns>
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -56,8 +56,15 @@
/// </summary>
/// <param name="displaySizeCaps"></param>
/// <returns></returns>
- public abstract Size CapsSize(DisplaySizeCaps displaySizeCaps);
+ public abstract Size CapsSize(DisplaySizeCaps caps);
+ /// <summary>
+ /// Gets a caps value which should return a floating point value.
+ /// </summary>
+ /// <param name="caps"></param>
+ /// <returns></returns>
+ public abstract double CapsDouble(DisplayDoubleCaps caps);
+
#endregion
public abstract IEnumerable<DisplayLib.Shaders.ShaderLanguage> SupportedShaderLanguages { get; }
Modified: trunk/AgateLib/Geometry/Size.cs
===================================================================
--- trunk/AgateLib/Geometry/Size.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib/Geometry/Size.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -187,6 +187,8 @@
string[] values = str.Split(',');
Size retval = new Size();
+ if (values.Length == 1 && str.Contains("x") && str.Contains("=") == false)
+ values = str.Split('x');
if (values.Length != 2)
throw new FormatException("Could not parse size data from text.");
Modified: trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-07-28 02:55:51 UTC (rev 1422)
@@ -71,8 +71,10 @@
<ItemGroup>
<Compile Include="ApplicationModels\FormsModelBase.cs" />
<Compile Include="ApplicationModels\PassiveModel.cs" />
+ <Compile Include="ApplicationModels\PassiveModelParameters.cs" />
<Compile Include="ApplicationModels\SceneModel.cs" />
<Compile Include="ApplicationModels\SerialModel.cs" />
+ <Compile Include="ApplicationModels\SerialModelParameters.cs" />
<Compile Include="Diagnostics\AgateConsoleImpl.cs" />
<Compile Include="Diagnostics\AgateConsoleTraceListener.cs" />
<Compile Include="DisplayImplementation\frmFullScreen.cs">
@@ -85,6 +87,7 @@
<Compile Include="DisplayImplementation\GL_DisplayControl.cs" />
<Compile Include="DisplayImplementation\GL_GameWindow.cs" />
<Compile Include="DisplayImplementation\GL_Surface.cs" />
+ <Compile Include="DisplayImplementation\IPrimaryWindow.cs" />
<Compile Include="Factories\DisplayFactory.cs" />
<Compile Include="Factories\FormsFactory.cs" />
<Compile Include="Factories\PlatformFactory.cs" />
Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -13,66 +13,31 @@
static PassiveModel()
{
- DefaultParameters = new ModelParameters
- {
- ApplicationName = "AgateLib Application",
- AutoCreateDisplayWindow = false,
- };
+ DefaultParameters = new PassiveModelParameters();
}
- static Func<int> ActionToFunc(Action entry)
- {
- return () => { entry(); return 0; };
- }
- public static int Run(Action entry)
- {
- return RunImpl(entry);
- }
- public static int Run(Func<int> entry)
- {
- return RunImpl(entry);
- }
- public static int Run(string[] args, Action entry)
- {
- DefaultParameters.Arguments = args;
+
+ public static PassiveModelParameters DefaultParameters { get; set; }
- return RunImpl(entry);
- }
- public static int Run(string[] args, Func<int> entry)
- {
- DefaultParameters.Arguments = args;
+ #endregion
- return RunImpl(entry);
- }
- public static int Run(ModelParameters parameters, Action entry)
+ public PassiveModel() : this(DefaultParameters)
+ { }
+
+ public PassiveModel(PassiveModelParameters parameters)
+ : base(parameters)
{
- DefaultParameters = parameters;
-
- return RunImpl(entry);
}
- public static int Run(ModelParameters parameters, Func<int> entry)
+ public PassiveModel(string[] args) : this(DefaultParameters)
{
- DefaultParameters = parameters;
+ Parameters.Arguments = args;
- return RunImpl(entry);
+ ProcessArguments();
}
- private static int RunImpl(Action entry)
- {
- return RunImpl(ActionToFunc(entry));
- }
- private static int RunImpl(Func<int> entry)
- {
- return new PassiveModel(DefaultParameters).RunModel(entry);
- }
- public static ModelParameters DefaultParameters { get; set; }
-
- #endregion
-
- PassiveModel(ModelParameters parameters)
- : base(parameters)
+ public new PassiveModelParameters Parameters
{
-
+ get { return (PassiveModelParameters)base.Parameters; }
}
protected override int BeginModel(Func<int> entryPoint)
Added: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModelParameters.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModelParameters.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModelParameters.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -0,0 +1,17 @@
+using AgateLib.ApplicationModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Platform.WindowsForms.ApplicationModels
+{
+ public class PassiveModelParameters : ModelParameters
+ {
+ public PassiveModelParameters()
+ {
+ AutoCreateDisplayWindow = false;
+ }
+ }
+}
Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -1,35 +1,67 @@
using AgateLib.ApplicationModels;
+using AgateLib.Platform.WindowsForms.DisplayImplementation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
namespace AgateLib.Platform.WindowsForms.ApplicationModels
{
public class SerialModel : FormsModelBase
{
+ #region --- Static Members ---
+
static SerialModel()
{
- DefaultParameters = new ModelParameters
- {
- ApplicationName = "AgateLib Application",
- AutoCreateDisplayWindow = true,
- };
+ DefaultParameters = new SerialModelParameters();
}
- private SerialModel(ModelParameters parameters) : base(parameters)
+
+ public static SerialModelParameters DefaultParameters { get; set; }
+
+ #endregion
+
+ public SerialModel() : this(DefaultParameters)
{ }
- public static void Run(string[] parameters, Action entryPoint)
+ public SerialModel(SerialModelParameters parameters)
+ : base(parameters)
{
- Configuration.Initialize();
}
+ public SerialModel(string[] args) : this(DefaultParameters)
+ {
+ Parameters.Arguments = args;
- public static ModelParameters DefaultParameters { get; set; }
+ ProcessArguments();
+ }
+ public new SerialModelParameters Parameters
+ {
+ get { return (SerialModelParameters)base.Parameters; }
+ }
+
+ int ExecuteEntry(Func<int> entryPoint)
+ {
+ OpenTK.Graphics.GraphicsContext.ShareContexts = true;
+ var window = AutoCreatedWindow.Impl as IPrimaryWindow;
+
+ window.ReinitializeFramebuffer();
+
+ return entryPoint();
+ }
protected override int BeginModel(Func<int> entryPoint)
{
- throw new NotImplementedException();
+ int retval = 0;
+ Thread thread = new Thread(() => { retval = ExecuteEntry(entryPoint); });
+ thread.Start();
+
+ var primaryWindow = AutoCreatedWindow.Impl as IPrimaryWindow;
+
+ primaryWindow.RunApplication();
+
+ return retval;
}
+
}
}
Added: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModelParameters.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModelParameters.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModelParameters.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -0,0 +1,13 @@
+using AgateLib.ApplicationModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AgateLib.Platform.WindowsForms.ApplicationModels
+{
+ public class SerialModelParameters : ModelParameters
+ {
+ }
+}
Modified: trunk/AgateLib.Platform.WindowsForms/Configuration.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Configuration.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib.Platform.WindowsForms/Configuration.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -21,6 +21,11 @@
public static void Initialize()
{
Core.Initialize(new FormsFactory());
+
+ Resources.AddPath(".");
+ Images.AddPath(".");
+ Sounds.AddPath(".");
+ MusicProvider.AddPath(".");
}
public static FileProviderList Resources { get { return mResourceProvider; } }
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -578,9 +578,9 @@
return false;
}
- public override Size CapsSize(DisplaySizeCaps displaySizeCaps)
+ public override Size CapsSize(DisplaySizeCaps caps)
{
- switch (displaySizeCaps)
+ switch (caps)
{
case DisplaySizeCaps.NativeScreenResolution:
return WinForms.Interop.Convert(
@@ -595,6 +595,22 @@
return new Size(0, 0);
}
+ public override double CapsDouble(DisplayDoubleCaps caps)
+ {
+ switch(caps)
+ {
+ case DisplayDoubleCaps.AspectRatio:
+ return AspectRatio(CapsSize(DisplaySizeCaps.NativeScreenResolution));
+ }
+
+ return 0;
+ }
+
+ private double AspectRatio(Size size)
+ {
+ return size.Width / (double)size.Height;
+ }
+
public override IEnumerable<AgateLib.DisplayLib.Shaders.ShaderLanguage> SupportedShaderLanguages
{
get { yield return AgateLib.DisplayLib.Shaders.ShaderLanguage.Glsl; }
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -43,7 +43,7 @@
/// <summary>
/// No OpenGL code here.
/// </summary>
- public sealed class GL_DisplayControl : DisplayWindowImpl
+ public sealed class GL_DisplayControl : DisplayWindowImpl, IPrimaryWindow
{
DisplayWindow mOwner;
Form frm;
@@ -84,6 +84,7 @@
"which does not derive from System.Windows.Forms.Control.", windowParams.RenderTarget.GetType().Name));
mRenderTarget = (Control)windowParams.RenderTarget;
+ mWindowInfo = CreateWindowInfo(CreateGraphicsMode());
if (mRenderTarget.TopLevelControl == null)
throw new ArgumentException("The specified render target has not been added to a Form yet. " +
@@ -96,7 +97,8 @@
mDisplay = Display.Impl as DesktopGLDisplay;
- CreateContext();
+ mContext = CreateContext();
+ mFrameBuffer = CreateFrameBuffer();
AttachEvents();
}
@@ -148,12 +150,11 @@
frm.TopLevel = true;
mRenderTarget = frm;
+ mWindowInfo = CreateWindowInfo(CreateGraphicsMode());
AttachEvents();
+ ReinitializeFramebuffer();
- CreateContext();
-
-
OpenTK.DisplayResolution resolution = OpenTK.DisplayDevice.Default.SelectResolution(
mChooseWidth, mChooseHeight, 32, 0);
OpenTK.DisplayDevice.Default.ChangeResolution(resolution);
@@ -194,12 +195,13 @@
frm = myform;
mRenderTarget = myRenderTarget;
+ mWindowInfo = CreateWindowInfo(CreateGraphicsMode());
if (mIcon != null)
frm.Icon = mIcon;
- frm.Show();
- CreateContext();
+ frm.Show();
+ ReinitializeFramebuffer();
AttachEvents();
@@ -210,28 +212,42 @@
Core.IsActive = true;
}
- private void CreateContext()
+ public void ReinitializeFramebuffer()
{
- GraphicsMode newMode = new GraphicsMode(
- GraphicsMode.Default.ColorFormat, GraphicsMode.Default.Depth,
- 0, 0, new ColorFormat(0), 2, false);
+ mContext = CreateContext();
+ mFrameBuffer = CreateFrameBuffer();
+ }
+ public OpenTK.Graphics.GraphicsContext CreateContext()
+ {
+ GraphicsMode newMode = CreateGraphicsMode();
+
Debug.Print("AgateLib GraphicsMode: {0}", newMode);
-
- mWindowInfo = CreateWindowInfo(newMode);
-
GraphicsContextFlags flags = GraphicsContextFlags.Default;
#if DEBUG
//flags = GraphicsContextFlags.ForwardCompatible;
#endif
- mContext = new OpenTK.Graphics.GraphicsContext(newMode, mWindowInfo, 3, 1, flags);
- mContext.MakeCurrent(mWindowInfo);
- (mContext as IGraphicsContextInternal).LoadAll();
+ var context = new OpenTK.Graphics.GraphicsContext(newMode, mWindowInfo, 3, 1, flags);
+ context.MakeCurrent(mWindowInfo);
+ (context as IGraphicsContextInternal).LoadAll();
- mFrameBuffer = new ContextFB(mOwner, mContext, mWindowInfo, this.Size, true, false);
+ return context;
}
+ private static GraphicsMode CreateGraphicsMode()
+ {
+ GraphicsMode newMode = new GraphicsMode(
+ GraphicsMode.Default.ColorFormat, GraphicsMode.Default.Depth,
+ 0, 0, new ColorFormat(0), 2, false);
+ return newMode;
+ }
+
+ private ContextFB CreateFrameBuffer()
+ {
+ return new ContextFB(mOwner, mContext, mWindowInfo, this.Size, true, false);
+ }
+
private IWindowInfo CreateWindowInfo(GraphicsMode mode)
{
switch (AgateLib.Core.Platform.PlatformType)
@@ -581,7 +597,6 @@
Keyboard.ReleaseAllKeys();
}
-
#region GL_IRenderTarget Members
@@ -595,5 +610,10 @@
}
#endregion
+
+ void IPrimaryWindow.RunApplication()
+ {
+ Application.Run(frm);
+ }
}
}
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -35,7 +35,7 @@
/// <summary>
/// Old, needs to be updated.
/// </summary>
- class GL_GameWindow : DisplayWindowImpl
+ class GL_GameWindow : DisplayWindowImpl, IPrimaryWindow
{
#region --- Static Members ---
@@ -202,8 +202,7 @@
else
CreateWindowedDisplay();
- mFrameBuffer = new ContextFB(mOwner, mWindow.Context, mWindow.WindowInfo,
- new Size(mWindow.ClientSize.Width, mWindow.ClientSize.Height), true, false);
+ CreateFrameBuffer();
mDisplay = Display.Impl as DesktopGLDisplay;
@@ -212,8 +211,21 @@
mDisplay.InitializeCurrentContext();
mDrawBuffer = mDisplay.CreateDrawBuffer();
+ }
+ private void CreateFrameBuffer()
+ {
+ GraphicsContext context = new GraphicsContext(mWindow.Context.GraphicsMode, mWindow.WindowInfo);
+ Debug.WriteLine(string.Format("Created context {0}", context.ToString()));
+ mFrameBuffer = new ContextFB(mOwner, context, mWindow.WindowInfo,
+ new Size(mWindow.ClientSize.Width, mWindow.ClientSize.Height), true, false);
+
+ if (mOwner.Impl != null)
+ {
+ // force recreation of the parent FrameBuffer object which wraps mFrameBuffer.
+ Display.RenderTarget = mOwner.FrameBuffer;
+ }
}
public override FrameBufferImpl FrameBuffer
@@ -495,5 +507,21 @@
}
#endregion
+
+ public void RunApplication()
+ {
+ mWindow.Run();
+ }
+
+
+ void IPrimaryWindow.RunApplication()
+ {
+ mWindow.Run();
+ }
+
+ public void ReinitializeFramebuffer()
+ {
+ CreateFrameBuffer();
+ }
}
}
Added: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/IPrimaryWindow.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/IPrimaryWindow.cs (rev 0)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/IPrimaryWindow.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -0,0 +1,10 @@
+using System;
+namespace AgateLib.Platform.WindowsForms.DisplayImplementation
+{
+ interface IPrimaryWindow
+ {
+ void RunApplication();
+
+ void ReinitializeFramebuffer();
+ }
+}
Modified: trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -25,6 +25,7 @@
public DiagnosticsStopwatch()
: this(true)
{
+ watch.Start();
}
/// <summary>
/// Constructs a timer object.
Modified: trunk/Drivers/AgateDrawing/AgateDrawing.csproj
===================================================================
--- trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2014-07-28 02:55:51 UTC (rev 1422)
@@ -152,10 +152,6 @@
<Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
<Name>AgateLib</Name>
</ProjectReference>
- <ProjectReference Include="..\AgateLib.WinForms\AgateLib.WinForms.csproj">
- <Project>{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}</Project>
- <Name>AgateLib.WinForms</Name>
- </ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Modified: trunk/Tests/AudioTests/AudioPlayer/AudioPlayer.cs
===================================================================
--- trunk/Tests/AudioTests/AudioPlayer/AudioPlayer.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/Tests/AudioTests/AudioPlayer/AudioPlayer.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -17,7 +17,7 @@
/// </summary>
public void Main(string[] args)
{
- PassiveModel.Run(args, () =>
+ new PassiveModel(args).Run( () =>
{
new frmAudioTester().ShowDialog();
});
Modified: trunk/Tests/AudioTests/SoundbufferStopTester.cs
===================================================================
--- trunk/Tests/AudioTests/SoundbufferStopTester.cs 2014-07-26 17:13:50 UTC (rev 1421)
+++ trunk/Tests/AudioTests/SoundbufferStopTester.cs 2014-07-28 02:55:51 UTC (rev 1422)
@@ -30,7 +30,7 @@
public void Main(string[] args)
{
- PassiveModel.Run(args, () =>
+ new PassiveModel(args).Run( () =>
{
DisplayWindow wind = new DisplayWindow(CreateWindowParams.Windowed(
"Sound Buffer Tester", 640, 480, false, null));
Modified: trunk/Tests/AudioTests/StreamAudio.cs
==========...
[truncated message content] |
|
From: <ka...@us...> - 2014-07-28 04:05:37
|
Revision: 1424
http://sourceforge.net/p/agate/code/1424
Author: kanato
Date: 2014-07-28 04:05:34 +0000 (Mon, 28 Jul 2014)
Log Message:
-----------
Some event processing cleanup.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/ApplicationModels/AgateAppModel.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs
trunk/Tests/Tests.csproj
trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs
trunk/UnitTests/Fakes/FakeDisplayDriver.cs
Added Paths:
-----------
trunk/AgateLib/ApplicationModels/ExitGameException.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib/AgateLib.csproj 2014-07-28 04:05:34 UTC (rev 1424)
@@ -108,6 +108,7 @@
<Compile Include="Drivers\IInputFactory.cs" />
<Compile Include="Drivers\IPlatformFactory.cs" />
<Compile Include="Drivers\TypeRegistry.cs" />
+ <Compile Include="ApplicationModels\ExitGameException.cs" />
<Compile Include="Extensions\Collections\Generic\ListSorting.cs" />
<Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" />
<Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" />
Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -79,7 +79,14 @@
}
protected virtual int RunImpl(Func<int> entry)
{
- return RunModel(entry);
+ try
+ {
+ return RunModel(entry);
+ }
+ catch (ExitGameException)
+ {
+ return 0;
+ }
}
protected virtual void ProcessArguments()
@@ -204,5 +211,7 @@
protected DisplayWindow AutoCreatedWindow { get { return window; } }
public ModelParameters Parameters { get; set; }
+
+ public abstract void KeepAlive();
}
}
Added: trunk/AgateLib/ApplicationModels/ExitGameException.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/ExitGameException.cs (rev 0)
+++ trunk/AgateLib/ApplicationModels/ExitGameException.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.ApplicationModels
+{
+ public class ExitGameException : Exception
+ {
+ public ExitGameException() { }
+ public ExitGameException(string message) : base(message) { }
+ public ExitGameException(string message, Exception inner) : base(message, inner) { }
+ }
+}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib/Core.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -30,6 +30,7 @@
using AgateLib.Diagnostics;
using AgateLib.IO;
using AgateLib.InputLib;
+using AgateLib.ApplicationModels;
namespace AgateLib
{
@@ -394,12 +395,14 @@
/// <summary>
/// Delegate for types which attach to the KeepAliveEvent.
/// </summary>
+ [Obsolete("This type is obsoleted by the Action delegate.", true)]
public delegate void KeepAliveDelegate();
/// <summary>
/// Event which occurs when KeepAlive is called.
/// This allows subsystems (such as GUI, Input, Sound) to make updates each frame.
/// </summary>
- public static event KeepAliveDelegate KeepAliveEvent;
+ [Obsolete("This is not relevant in the new application models.", true)]
+ public static event Action KeepAliveEvent;
/// <summary>
/// Plays nice with the OS, by allowing events to be handled.
/// This also handles user input events associated with the application,
@@ -407,34 +410,22 @@
/// </summary>
public static void KeepAlive()
{
- // Some tests indicate that using the Win32 platform-specific call
- // to PeekMessage before calling DoEvents is about 1 fps faster,
- // when there are no events to process. It's not clear whether or
- // not this is worth it when there lots of events being generated
- // (ie lots of mouse move events) but it does seem to speed up for
- // Direct3D.
- if (Display.IsAppIdle == false)
+ var appmodel = AgateAppModel.Instance;
+
+ appmodel.KeepAlive();
+
+ while (IsActive == false && AutoPause)
{
- Display.ProcessEvents();
+ appmodel.KeepAlive();
- while (IsActive == false && AutoPause)
- {
- //System.Threading.Thread.Sleep(25);
- Display.ProcessEvents();
+ AudioLib.Audio.Update();
- // Update Audio Engine, if necessary
- AudioLib.Audio.Update();
-
- if (Display.CurrentWindow == null)
- break;
- else if (Display.CurrentWindow.IsClosed)
- break;
- }
+ if (Display.CurrentWindow == null)
+ break;
+ else if (Display.CurrentWindow.IsClosed)
+ break;
}
- if (KeepAliveEvent != null)
- KeepAliveEvent();
-
// Update Audio Engine.
AudioLib.Audio.Update();
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib/DisplayLib/Display.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -123,13 +123,6 @@
Shaders.AgateBuiltInShaders.DisposeShaders();
}
- internal static void ProcessEvents()
- {
- if (sImpl == null)
- return;
-
- sImpl.ProcessEvents();
- }
internal static bool IsAppIdle
{
get
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -622,11 +622,6 @@
{ }
/// <summary>
- /// Processes pending events.
- /// </summary>
- protected internal abstract void ProcessEvents();
-
- /// <summary>
/// Returns true if the application is idle and processing of events can be skipped.
/// Base method just returns false to force processing of events at every frame.
/// </summary>
Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -7,6 +7,11 @@
namespace AgateLib.Platform.WindowsForms.ApplicationModels
{
+ /// <summary>
+ /// The passive model does very little - it simply initializes AgateLib and cleans up when your
+ /// program exits. The passive model is suitable for applications which provide their own message
+ /// pump and render loop logic.
+ /// </summary>
public class PassiveModel : FormsModelBase
{
#region --- Static Members ---
@@ -45,5 +50,10 @@
return entryPoint();
}
+
+ public override void KeepAlive()
+ {
+ System.Windows.Forms.Application.DoEvents();
+ }
}
}
Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -18,5 +18,10 @@
{
throw new NotImplementedException();
}
+
+ public override void KeepAlive()
+ {
+ throw new NotImplementedException();
+ }
}
}
Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -41,8 +41,6 @@
get { return (SerialModelParameters)base.Parameters; }
}
- bool done = false;
-
int ExecuteEntry(Func<int> entryPoint)
{
try
@@ -52,7 +50,14 @@
window.ReinitializeFramebuffer();
- return entryPoint();
+ try
+ {
+ return entryPoint();
+ }
+ catch(ExitGameException)
+ {
+ return 0;
+ }
}
finally
{
@@ -73,5 +78,9 @@
return retval;
}
+
+ public override void KeepAlive()
+ {
+ }
}
}
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -69,14 +69,6 @@
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;
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -122,16 +122,9 @@
mDisplay = Display.Impl as DesktopGLDisplay;
}
- mDisplay.ProcessEventsEvent += new EventHandler(mDisplay_ProcessEventsEvent);
mDisplay.InitializeCurrentContext();
-
}
- void mDisplay_ProcessEventsEvent(object sender, EventArgs e)
- {
- System.Windows.Forms.Application.DoEvents();
- }
-
private void CreateFullScreenDisplay()
{
DetachEvents();
@@ -365,8 +358,6 @@
public override void Dispose()
{
- mDisplay.ProcessEventsEvent -= mDisplay_ProcessEventsEvent;
-
if (mFrameBuffer != null)
{
mFrameBuffer.Dispose();
Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -206,8 +206,6 @@
mDisplay = Display.Impl as DesktopGLDisplay;
- mDisplay.ProcessEventsEvent += new EventHandler(mDisplay_ProcessEventsEvent);
-
mDisplay.InitializeCurrentContext();
mDrawBuffer = mDisplay.CreateDrawBuffer();
@@ -361,6 +359,7 @@
}
Point lastMouse;
+ [Obsolete]
void mDisplay_ProcessEventsEvent(object sender, EventArgs e)
{
try
@@ -393,8 +392,6 @@
mWindow.Dispose();
mWindow = null;
}
-
- mDisplay.ProcessEventsEvent -= mDisplay_ProcessEventsEvent;
}
public override bool IsClosed
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/Tests/Tests.csproj 2014-07-28 04:05:34 UTC (rev 1424)
@@ -549,6 +549,10 @@
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
+ <Folder Include="CoreTests\Performance\" />
+ <Folder Include="ResourceTests\" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj">
<Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
<Name>AgateLib.Platform.WindowsForms</Name>
@@ -558,10 +562,6 @@
<Name>AgateLib</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <Folder Include="CoreTests\Performance\" />
- <Folder Include="ResourceTests\" />
- </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
Modified: trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs
===================================================================
--- trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -9,9 +9,10 @@
namespace AgateLib.UnitTests.ApplicationModels
{
- public class ArgumentProcessing : AgateAppModel
+ public class ArgumentProcessing : AgateAppModel
{
- public ArgumentProcessing(ModelParameters param) : base(param)
+ public ArgumentProcessing(ModelParameters param)
+ : base(param)
{
}
@@ -27,6 +28,10 @@
protected override void Dispose()
{
}
+
+ public override void KeepAlive()
+ {
+ }
}
[TestClass]
Modified: trunk/UnitTests/Fakes/FakeDisplayDriver.cs
===================================================================
--- trunk/UnitTests/Fakes/FakeDisplayDriver.cs 2014-07-28 03:13:49 UTC (rev 1423)
+++ trunk/UnitTests/Fakes/FakeDisplayDriver.cs 2014-07-28 04:05:34 UTC (rev 1424)
@@ -142,11 +142,6 @@
throw new NotImplementedException();
}
- protected internal override void ProcessEvents()
- {
- throw new NotImplementedException();
- }
-
protected internal override void ShowCursor()
{
throw new NotImplementedException();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-07-28 04:12:25
|
Revision: 1425
http://sourceforge.net/p/agate/code/1425
Author: kanato
Date: 2014-07-28 04:12:11 +0000 (Mon, 28 Jul 2014)
Log Message:
-----------
Fix examples compiling.
Modified Paths:
--------------
trunk/Examples/ShootTheTraps/App.cs
trunk/Examples.sln
Modified: trunk/Examples/ShootTheTraps/App.cs
===================================================================
--- trunk/Examples/ShootTheTraps/App.cs 2014-07-28 04:05:34 UTC (rev 1424)
+++ trunk/Examples/ShootTheTraps/App.cs 2014-07-28 04:12:11 UTC (rev 1425)
@@ -8,6 +8,7 @@
using AgateLib.InputLib;
using AgateLib.Platform.WindowsForms.Resources;
using AgateLib.Platform;
+using AgateLib.Platform.WindowsForms.ApplicationModels;
namespace ShootTheTraps
{
@@ -19,7 +20,7 @@
[STAThread]
static void Main(string[] args)
{
- new App().Run(args);
+ new PassiveModel(args).Run(() => new App().Run(args));
}
// Game declarations
Modified: trunk/Examples.sln
===================================================================
--- trunk/Examples.sln 2014-07-28 04:05:34 UTC (rev 1424)
+++ trunk/Examples.sln 2014-07-28 04:12:11 UTC (rev 1425)
@@ -1,26 +1,22 @@
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("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BallBuster.Net", "Examples\BallBuster.Net\BallBuster.Net.csproj", "{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShootTheTraps", "Examples\ShootTheTraps\ShootTheTraps.csproj", "{50743D1B-A19E-42F1-842F-65FAD6D168C3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pong", "Examples\Pong\Pong.csproj", "{436641C4-846C-42D0-8E8F-95F70E211D22}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateDrawing", "Drivers\AgateDrawing\AgateDrawing.csproj", "{164A785D-924E-40FB-A517-D7E677F3B53A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateOTK", "Drivers\AgateOTK\AgateOTK.csproj", "{9E095F03-BA3F-4EAD-A905-2A2647CE4405}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib", "AgateLib\AgateLib.csproj", "{9490B719-829E-43A7-A5FE-8001F8A81759}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.WinForms", "Drivers\AgateLib.WinForms\AgateLib.WinForms.csproj", "{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleUnitTests", "Examples\ExampleUnitTests\ExampleUnitTests.csproj", "{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateSDL", "Drivers\AgateSDL\AgateSDL.csproj", "{00C7FA95-98F4-43D9-9B63-34122B1DB003}"
+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}") = "ExampleUnitTests", "Examples\ExampleUnitTests\ExampleUnitTests.csproj", "{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsForms", "AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj", "{4B12561E-D37B-48A1-B6DB-218E94906C22}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateSDX", "Drivers\AgateSDX\AgateSDX.csproj", "{EF993B30-D9A9-4962-80BB-6826D39B3465}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -81,86 +77,20 @@
{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
- {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}.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
- {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}.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
{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|x64.ActiveCfg = Debug|Any CPU
{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}.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|x64.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.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}.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
- {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}.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
{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
@@ -173,27 +103,36 @@
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x64.ActiveCfg = Release|Any CPU
{8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x86.ActiveCfg = Release|Any CPU
- {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}.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
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x64.ActiveCfg = Debug|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}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.Build.0 = Release|Any CPU
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Mixed Platforms.Build.0 = Release|x86
+ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.ActiveCfg = Release|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|Mixed Platforms.ActiveCfg = Debug|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x64.ActiveCfg = Debug|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}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Mixed Platforms.Build.0 = Release|x86
+ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.ActiveCfg = Release|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
EndGlobalSection
- GlobalSection(Performance) = preSolution
- HasPerformanceSessions = true
- EndGlobalSection
EndGlobal
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-07-28 04:35:51
|
Revision: 1426
http://sourceforge.net/p/agate/code/1426
Author: kanato
Date: 2014-07-28 04:35:48 +0000 (Mon, 28 Jul 2014)
Log Message:
-----------
Move database stuff to AgateLib.Platform.WindowsForms.
Modified Paths:
--------------
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
trunk/AgateLib.Platform.WindowsForms/Data/AgateDatabaseException.cs
trunk/AgateLib.Platform.WindowsForms/PixelBufferExtensions.cs
trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs
trunk/AgateLib.Platform.WindowsForms/WinForms/FormsInterop.cs
trunk/Tools/AgateDataLib/AgateDataLib.csproj
trunk/Tools/DatabaseEditor/DatabaseEditor.csproj
Added Paths:
-----------
trunk/AgateLib.Platform.WindowsForms/Data/
Removed Paths:
-------------
trunk/AgateLib/Data/
Modified: trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-07-28 04:12:11 UTC (rev 1425)
+++ trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-07-28 04:35:48 UTC (rev 1426)
@@ -75,6 +75,16 @@
<Compile Include="ApplicationModels\SceneModel.cs" />
<Compile Include="ApplicationModels\SerialModel.cs" />
<Compile Include="ApplicationModels\SerialModelParameters.cs" />
+ <Compile Include="Data\AgateColumn.cs" />
+ <Compile Include="Data\AgateColumnDictionary.cs" />
+ <Compile Include="Data\AgateDatabase.cs" />
+ <Compile Include="Data\AgateDatabaseException.cs" />
+ <Compile Include="Data\AgateDataHelper.cs" />
+ <Compile Include="Data\AgateRow.cs" />
+ <Compile Include="Data\AgateRowList.cs" />
+ <Compile Include="Data\AgateTable.cs" />
+ <Compile Include="Data\AgateTableDictionary.cs" />
+ <Compile Include="Data\FieldType.cs" />
<Compile Include="Diagnostics\AgateConsoleImpl.cs" />
<Compile Include="Diagnostics\AgateConsoleTraceListener.cs" />
<Compile Include="DisplayImplementation\frmFullScreen.cs">
Modified: trunk/AgateLib.Platform.WindowsForms/Data/AgateDatabaseException.cs
===================================================================
--- trunk/AgateLib/Data/AgateDatabaseException.cs 2014-07-28 02:55:51 UTC (rev 1422)
+++ trunk/AgateLib.Platform.WindowsForms/Data/AgateDatabaseException.cs 2014-07-28 04:35:48 UTC (rev 1426)
@@ -26,7 +26,6 @@
/// <summary>
/// Exception which is thrown if there is an error when working with the database.
/// </summary>
- [global::System.Serializable]
public class AgateDatabaseException : AgateException
{
//
Modified: trunk/AgateLib.Platform.WindowsForms/PixelBufferExtensions.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/PixelBufferExtensions.cs 2014-07-28 04:12:11 UTC (rev 1425)
+++ trunk/AgateLib.Platform.WindowsForms/PixelBufferExtensions.cs 2014-07-28 04:35:48 UTC (rev 1426)
@@ -1,4 +1,5 @@
using AgateLib.DisplayLib;
+using AgateLib.Platform.WindowsForms.WinForms;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,6 +12,33 @@
public static class PixelBufferExtensions
{
/// <summary>
+ /// Converts an AgateLib.DisplayLib.PixelBuffer object into a System.Drawing.Bitmap object.
+ /// </summary>
+ /// <param name="buffer">The PixelBuffer object containing the pixel data.</param>
+ /// <returns></returns>
+ public static System.Drawing.Bitmap ToBitmap(this PixelBuffer buffer)
+ {
+ System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(buffer.Width, buffer.Height);
+
+ System.Drawing.Imaging.BitmapData data = bmp.LockBits(
+ new System.Drawing.Rectangle(System.Drawing.Point.Empty, Interop.Convert(buffer.Size)),
+ System.Drawing.Imaging.ImageLockMode.WriteOnly,
+ System.Drawing.Imaging.PixelFormat.Format32bppArgb);
+
+ if (buffer.PixelFormat != PixelFormat.BGRA8888)
+ {
+ buffer = buffer.ConvertTo(PixelFormat.BGRA8888);
+ }
+
+ System.Runtime.InteropServices.Marshal.Copy(
+ buffer.Data, 0, data.Scan0, buffer.Data.Length);
+
+ bmp.UnlockBits(data);
+
+ return bmp;
+ }
+
+ /// <summary>
/// Copies the data from the unmanaged memory pointer passed in into the internal pixel
/// buffer array. Automatic conversion is performed if the format the data
/// is in (indicated by format parameter) differs from the format the
Modified: trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs 2014-07-28 04:12:11 UTC (rev 1425)
+++ trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs 2014-07-28 04:35:48 UTC (rev 1426)
@@ -179,7 +179,7 @@
/// <param name="format"></param>
public static void SavePixelBuffer(PixelBuffer buffer, string filename, ImageFileFormat format)
{
- Bitmap bmp = Interop.BitmapFromPixelBuffer(buffer);
+ Bitmap bmp = buffer.ToBitmap();
var dirname = Path.GetDirectoryName(filename);
if (string.IsNullOrEmpty(dirname) == false && Directory.Exists(dirname) == false)
Modified: trunk/AgateLib.Platform.WindowsForms/WinForms/FormsInterop.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/WinForms/FormsInterop.cs 2014-07-28 04:12:11 UTC (rev 1425)
+++ trunk/AgateLib.Platform.WindowsForms/WinForms/FormsInterop.cs 2014-07-28 04:35:48 UTC (rev 1426)
@@ -191,31 +191,5 @@
return new Draw.SizeF(sz.Width, sz.Height);
}
- /// <summary>
- /// Converts an AgateLib.DisplayLib.PixelBuffer object into a System.Drawing.Bitmap object.
- /// </summary>
- /// <param name="buffer">The PixelBuffer object containing the pixel data.</param>
- /// <returns></returns>
- public static System.Drawing.Bitmap BitmapFromPixelBuffer(PixelBuffer buffer)
- {
- System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(buffer.Width, buffer.Height);
-
- System.Drawing.Imaging.BitmapData data = bmp.LockBits(
- new Draw.Rectangle(Draw.Point.Empty, Interop.Convert(buffer.Size)),
- System.Drawing.Imaging.ImageLockMode.WriteOnly,
- System.Drawing.Imaging.PixelFormat.Format32bppArgb);
-
- if (buffer.PixelFormat != PixelFormat.BGRA8888)
- {
- buffer = buffer.ConvertTo(PixelFormat.BGRA8888);
- }
-
- System.Runtime.InteropServices.Marshal.Copy(
- buffer.Data, 0, data.Scan0, buffer.Data.Length);
-
- bmp.UnlockBits(data);
-
- return bmp;
- }
}
}
Modified: trunk/Tools/AgateDataLib/AgateDataLib.csproj
===================================================================
--- trunk/Tools/AgateDataLib/AgateDataLib.csproj 2014-07-28 04:12:11 UTC (rev 1425)
+++ trunk/Tools/AgateDataLib/AgateDataLib.csproj 2014-07-28 04:35:48 UTC (rev 1426)
@@ -99,6 +99,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj">
+ <Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
+ <Name>AgateLib.Platform.WindowsForms</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
<Name>AgateLib</Name>
Modified: trunk/Tools/DatabaseEditor/DatabaseEditor.csproj
===================================================================
--- trunk/Tools/DatabaseEditor/DatabaseEditor.csproj 2014-07-28 04:12:11 UTC (rev 1425)
+++ trunk/Tools/DatabaseEditor/DatabaseEditor.csproj 2014-07-28 04:35:48 UTC (rev 1426)
@@ -183,10 +183,18 @@
</Compile>
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj">
+ <Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project>
+ <Name>AgateLib.Platform.WindowsForms</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
<Name>AgateLib</Name>
</ProjectReference>
+ <ProjectReference Include="..\AgateDataLib\AgateDataLib.csproj">
+ <Project>{2f7a686b-2272-4803-9ef9-0b34ba7802dc}</Project>
+ <Name>AgateDataLib</Name>
+ </ProjectReference>
<ProjectReference Include="..\NotebookLib\NotebookLib\NotebookLib.csproj">
<Project>{91F57346-B574-4D52-9EB0-AA191B552C94}</Project>
<Name>NotebookLib</Name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-07-28 05:16:51
|
Revision: 1427
http://sourceforge.net/p/agate/code/1427
Author: kanato
Date: 2014-07-28 05:16:44 +0000 (Mon, 28 Jul 2014)
Log Message:
-----------
Make Initialize/Dispose methods of application models publically accessible.
Modified Paths:
--------------
trunk/AgateLib/ApplicationModels/AgateAppModel.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs
Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-28 04:35:48 UTC (rev 1426)
+++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-28 05:16:44 UTC (rev 1427)
@@ -7,7 +7,7 @@
namespace AgateLib.ApplicationModels
{
- public abstract class AgateAppModel
+ public abstract class AgateAppModel : IDisposable
{
#region --- Static Members ---
@@ -51,7 +51,19 @@
ProcessArguments();
}
+ public abstract void Initialize();
+ public void Dispose()
+ {
+ Dispose(true);
+
+ if (Instance == this)
+ Instance = null;
+ }
+ protected virtual void Dispose(bool disposing)
+ { }
+
+
public int Run(Action entry)
{
return RunImpl(entry);
@@ -205,9 +217,6 @@
return Display.Caps.NativeScreenResolution;
}
- protected abstract void Initialize();
- protected abstract void Dispose();
-
protected DisplayWindow AutoCreatedWindow { get { return window; } }
public ModelParameters Parameters { get; set; }
Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs 2014-07-28 04:35:48 UTC (rev 1426)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs 2014-07-28 05:16:44 UTC (rev 1427)
@@ -16,13 +16,12 @@
}
- protected override void Initialize()
+ public override void Initialize()
{
Configuration.Initialize();
}
- protected override void Dispose()
+ protected override void Dispose(bool disposing)
{
-
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-07-28 14:46:24
|
Revision: 1428
http://sourceforge.net/p/agate/code/1428
Author: kanato
Date: 2014-07-28 14:46:21 +0000 (Mon, 28 Jul 2014)
Log Message:
-----------
Modify initialization of AgateAppModel so it happens a little later, and fix associated unit test.
Modified Paths:
--------------
trunk/AgateLib/ApplicationModels/AgateAppModel.cs
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs
trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs
Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-28 05:16:44 UTC (rev 1427)
+++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-28 14:46:21 UTC (rev 1428)
@@ -48,11 +48,17 @@
throw new AgateException("Cannot create a new application model when an existing one is active.");
Instance = this;
+ }
+ public void Initialize()
+ {
+ ProcessArguments();
- ProcessArguments();
+ InitializeImpl();
}
- public abstract void Initialize();
+ protected virtual void InitializeImpl()
+ { }
+
public void Dispose()
{
Dispose(true);
Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs 2014-07-28 05:16:44 UTC (rev 1427)
+++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs 2014-07-28 14:46:21 UTC (rev 1428)
@@ -16,7 +16,7 @@
}
- public override void Initialize()
+ protected override void InitializeImpl()
{
Configuration.Initialize();
}
Modified: trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs
===================================================================
--- trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs 2014-07-28 05:16:44 UTC (rev 1427)
+++ trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs 2014-07-28 14:46:21 UTC (rev 1428)
@@ -11,6 +11,8 @@
{
public class ArgumentProcessing : AgateAppModel
{
+ List<string> expected = new List<string>();
+
public ArgumentProcessing(ModelParameters param)
: base(param)
{
@@ -21,16 +23,33 @@
return 0;
}
- protected override void Initialize()
+ public List<string> Expected { get { return expected; } }
+
+ protected override void InitializeImpl()
{
}
- protected override void Dispose()
+ public override void KeepAlive()
{
}
- public override void KeepAlive()
+ protected override void ProcessArgument(string arg, string parm)
{
+ if (Expected.Count > 0)
+ {
+ Assert.AreEqual(expected[0], arg);
+ Assert.IsTrue(arg.StartsWith("--"));
+
+ expected.RemoveAt(0);
+
+ if (parm != "")
+ {
+ Assert.AreEqual(expected[0], parm);
+ expected.RemoveAt(0);
+ }
+ }
+
+ base.ProcessArgument(arg, parm);
}
}
@@ -46,8 +65,32 @@
"--window 640x480".Split(' ')
});
+ p.Initialize();
+
Assert.IsFalse(p.Parameters.CreateFullScreenWindow);
Assert.AreEqual(new Size(640, 480), p.Parameters.DisplayWindowSize);
}
+
+ [TestMethod]
+ public void ExtraArguments()
+ {
+ ArgumentProcessing p = new ArgumentProcessing(new ModelParameters
+ {
+ Arguments =
+ "--window 640x480 --something --else 14 --nothing".Split(' ')
+ });
+
+ p.Expected.Add("--window");
+ p.Expected.Add("640x480");
+ p.Expected.Add("--something");
+ p.Expected.Add("--else");
+ p.Expected.Add("14");
+ p.Expected.Add("--nothing");
+
+ p.Initialize();
+
+ Assert.IsFalse(p.Parameters.CreateFullScreenWindow);
+ Assert.AreEqual(new Size(640, 480), p.Parameters.DisplayWindowSize);
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2014-08-02 00:49:50
|
Revision: 1429
http://sourceforge.net/p/agate/code/1429
Author: kanato
Date: 2014-08-02 00:49:42 +0000 (Sat, 02 Aug 2014)
Log Message:
-----------
Reorganize input into legacy namespace.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/ApplicationModels/AgateAppModel.cs
trunk/AgateLib/Diagnostics/AgateConsole.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
trunk/AgateLib/InputLib/Joystick.cs
trunk/AgateLib.GL/AgateLib.GL.csproj
trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs
trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs
trunk/Examples/BallBuster.Net/main.cs
trunk/Examples/Pong/Pong.cs
trunk/Examples/ShootTheTraps/App.cs
trunk/Tests/AudioTests/SoundbufferStopTester.cs
trunk/Tests/CoreTests/App.cs
trunk/Tests/DisplayTests/FullScreen.cs
trunk/Tests/DisplayTests/Interpolation.cs
trunk/Tests/DisplayTests/MultipleFramebufferTest.cs
trunk/Tests/DisplayTests/PixelBufferMask.cs
trunk/Tests/DisplayTests/PixelBufferTest/PixelBufferTest.cs
trunk/Tests/DisplayTests/RotatingSpriteTester.cs
trunk/Tests/DisplayTests/ScreenCapture.cs
trunk/Tests/Fonts/FontAlignment.cs
trunk/Tests/Fonts/FontLineTester.cs
trunk/Tests/Fonts/Fonts.cs
trunk/Tests/Fonts/Kerning.cs
trunk/Tests/InputTests/Input/frmInputTester.cs
trunk/Tests/Shaders/CoordinateSystem.cs
trunk/Tests/Shaders/Hlsl.cs
trunk/Tests/Shaders/Lighting3DTest.cs
trunk/Tests/Shaders/LightingTest/LightingTest.cs
trunk/UnitTests/Core/ConsoleTests.cs
Added Paths:
-----------
trunk/AgateLib/InputLib/AgateInputEventArgs.cs
trunk/AgateLib/InputLib/IInputHandler.cs
trunk/AgateLib/InputLib/Input.cs
trunk/AgateLib/InputLib/InputHandlerList.cs
trunk/AgateLib/InputLib/Legacy/
trunk/AgateLib/InputLib/Legacy/Delegates.cs
trunk/AgateLib/InputLib/Legacy/InputEventArgs.cs
trunk/AgateLib/InputLib/Legacy/Keyboard.cs
trunk/AgateLib/InputLib/Legacy/LegacyInputHandler.cs
trunk/AgateLib/InputLib/Legacy/Mouse.cs
trunk/AgateLib/InputLib/MouseButton.cs
trunk/Examples/ShootTheTraps/Resources/timecannonimages/
Removed Paths:
-------------
trunk/AgateLib/InputLib/Delegates.cs
trunk/AgateLib/InputLib/InputEventArgs.cs
trunk/AgateLib/InputLib/Keyboard.cs
trunk/AgateLib/InputLib/Mouse.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-07-28 14:46:21 UTC (rev 1428)
+++ trunk/AgateLib/AgateLib.csproj 2014-08-02 00:49:42 UTC (rev 1429)
@@ -112,11 +112,17 @@
<Compile Include="Extensions\Collections\Generic\ListSorting.cs" />
<Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" />
<Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" />
+ <Compile Include="InputLib\AgateInputEventArgs.cs" />
+ <Compile Include="InputLib\IInputHandler.cs" />
+ <Compile Include="InputLib\InputHandlerList.cs" />
+ <Compile Include="InputLib\Input.cs" />
+ <Compile Include="InputLib\Legacy\LegacyInputHandler.cs" />
+ <Compile Include="InputLib\MouseButton.cs" />
<Compile Include="IO\IFileProvider.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DisplayLib\ImplementationBase\FrameBufferImpl.cs" />
- <Compile Include="InputLib\Delegates.cs" />
+ <Compile Include="InputLib\Legacy\Delegates.cs" />
<Compile Include="InputLib\HatState.cs" />
<Compile Include="InputLib\JoystickEventArgs.cs" />
<Compile Include="IO\FileSystem.cs" />
@@ -353,7 +359,7 @@
<Compile Include="DisplayLib\ImplementationBase\VertexBufferImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="InputLib\InputEventArgs.cs">
+ <Compile Include="InputLib\Legacy\InputEventArgs.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="InputLib\Joystick.cs">
@@ -362,7 +368,7 @@
<Compile Include="InputLib\JoystickInput.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="InputLib\Keyboard.cs">
+ <Compile Include="InputLib\Legacy\Keyboard.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="InputLib\KeyCode.cs">
@@ -371,7 +377,7 @@
<Compile Include="InputLib\KeyModifiers.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="InputLib\Mouse.cs">
+ <Compile Include="InputLib\Legacy\Mouse.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Particles\Particle.cs">
Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-07-28 14:46:21 UTC (rev 1428)
+++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -1,5 +1,6 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
+using AgateLib.InputLib;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -227,6 +228,9 @@
public ModelParameters Parameters { get; set; }
- public abstract void KeepAlive();
+ public virtual void KeepAlive()
+ {
+ Input.DispatchEvents();
+ }
}
}
Modified: trunk/AgateLib/Diagnostics/AgateConsole.cs
===================================================================
--- trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-07-28 14:46:21 UTC (rev 1428)
+++ trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -3,6 +3,7 @@
using AgateLib.DisplayLib.Shaders;
using AgateLib.Geometry;
using AgateLib.InputLib;
+using AgateLib.InputLib.Legacy;
using System;
using System.Collections.Generic;
using System.Linq;
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-07-28 14:46:21 UTC (rev 1428)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -111,7 +111,7 @@
protected void SetInternalMousePosition(AgateLib.Geometry.Point pt)
{
- AgateLib.InputLib.Mouse.SetStoredPosition(pt);
+ AgateLib.InputLib.Legacy.Mouse.SetStoredPosition(pt);
}
/// <summary>
Added: trunk/AgateLib/InputLib/AgateInputEventArgs.cs
===================================================================
--- trunk/AgateLib/InputLib/AgateInputEventArgs.cs (rev 0)
+++ trunk/AgateLib/InputLib/AgateInputEventArgs.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -0,0 +1,62 @@
+using AgateLib.Geometry;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.InputLib
+{
+ public class AgateInputEventArgs : EventArgs
+ {
+ public object Sender { get; set; }
+ public bool Handled { get; set; }
+
+ public InputEventType InputEventType { get; set; }
+
+ public KeyCode KeyCode { get; set; }
+ public string KeyString { get; set; }
+ public KeyModifiers KeyModifiers { get; set; }
+
+ public Point MousePosition { get; set; }
+ public MouseButton MouseButton { get; set; }
+ public int MouseWheelDelta { get; set; }
+
+
+ internal static AgateInputEventArgs KeyDown(KeyCode code, KeyModifiers modifiers)
+ {
+ return new AgateInputEventArgs
+ {
+ InputEventType = InputEventType.KeyDown,
+ KeyCode = code,
+ KeyModifiers = modifiers,
+ };
+ }
+
+ internal static AgateInputEventArgs KeyUp(KeyCode code, KeyModifiers modifiers)
+ {
+ return new AgateInputEventArgs
+ {
+ InputEventType = InputEventType.KeyUp,
+ KeyCode = code,
+ KeyModifiers = modifiers,
+ };
+ }
+ }
+
+ public enum InputEventType
+ {
+ KeyDown,
+ KeyPress,
+ KeyUp,
+
+ MouseDown,
+ MouseMove,
+ MouseUp,
+
+ JoystickAxisChanged,
+ JoystickButton,
+ JoystickPovHat,
+ MouseWheel,
+
+ }
+}
Deleted: trunk/AgateLib/InputLib/Delegates.cs
===================================================================
--- trunk/AgateLib/InputLib/Delegates.cs 2014-07-28 14:46:21 UTC (rev 1428)
+++ trunk/AgateLib/InputLib/Delegates.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace AgateLib.InputLib
-{
- /// <summary>
- /// Input Event handler event type.
- /// </summary>
- /// <param name="e"></param>
- public delegate void InputEventHandler(InputEventArgs e);
-
- public delegate void JoystickEventHandler(object sender, JoystickEventArgs e);
-}
Added: trunk/AgateLib/InputLib/IInputHandler.cs
===================================================================
--- trunk/AgateLib/InputLib/IInputHandler.cs (rev 0)
+++ trunk/AgateLib/InputLib/IInputHandler.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.InputLib
+{
+ public interface IInputHandler
+ {
+ void ProcessEvent(AgateInputEventArgs args);
+
+ bool ForwardUnhandledEvents { get; }
+ }
+}
Added: trunk/AgateLib/InputLib/Input.cs
===================================================================
--- trunk/AgateLib/InputLib/Input.cs (rev 0)
+++ trunk/AgateLib/InputLib/Input.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.InputLib
+{
+ public static class Input
+ {
+ static List<AgateInputEventArgs> mEvents = new List<AgateInputEventArgs>();
+ static InputHandlerList mInputHandlers = new InputHandlerList();
+
+ public static void QueueInputEvent(AgateInputEventArgs args)
+ {
+ lock(mEvents)
+ {
+ mEvents.Add(args);
+ }
+ }
+
+ public static void DispatchEvents()
+ {
+ while (mEvents.Count > 0)
+ {
+ AgateInputEventArgs args;
+
+ lock(mEvents)
+ {
+ args = mEvents[0];
+ mEvents.RemoveAt(0);
+ }
+
+ DispatchEvents(args);
+ }
+ }
+
+ private static void DispatchEvents(AgateInputEventArgs args)
+ {
+ mInputHandlers.Dispatch(args);
+ }
+
+ public static InputHandlerList InputHandlers { get { return mInputHandlers; } }
+ }
+}
Deleted: trunk/AgateLib/InputLib/InputEventArgs.cs
===================================================================
--- trunk/AgateLib/InputLib/InputEventArgs.cs 2014-07-28 14:46:21 UTC (rev 1428)
+++ trunk/AgateLib/InputLib/InputEventArgs.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -1,125 +0,0 @@
-// The contents of this file are subject to the Mozilla Public License
-// Version 1.1 (the "License"); you may not use this file except in
-// compliance with the License. You may obtain a copy of the License at
-// http://www.mozilla.org/MPL/
-//
-// Software distributed under the License is distributed on an "AS IS"
-// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-// License for the specific language governing rights and limitations
-// under the License.
-//
-// The Original Code is AgateLib.
-//
-// The Initial Developer of the Original Code is Erik Ylvisaker.
-// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
-// All Rights Reserved.
-//
-// Contributor(s): Erik Ylvisaker
-//
-using System;
-using System.Collections.Generic;
-using System.Text;
-using AgateLib.Geometry;
-
-namespace AgateLib.InputLib
-{
- /// <summary>
- /// Class which describes details about an input event.
- /// </summary>
- public class InputEventArgs
- {
- KeyCode mKeyCode;
- KeyModifiers mModifiers;
- int mRepeatCount;
- string mKeyString;
- Point mMousePosition;
- Mouse.MouseButtons mButtons;
- int mWheelDelta;
-
- internal InputEventArgs()
- {
- Initialize();
- }
- internal InputEventArgs(KeyCode keyID, KeyModifiers mods)
- {
- mKeyCode = keyID;
- mKeyString = Keyboard.GetKeyString(keyID, mods);
- mModifiers = mods;
-
- Initialize();
- }
- internal InputEventArgs(KeyCode keyID, KeyModifiers mods, int repeatCount)
- : this(keyID, mods)
- {
- mRepeatCount = repeatCount;
- }
-
- internal InputEventArgs(Mouse.MouseButtons mouseButtons)
- {
- mButtons = mouseButtons;
-
- Initialize();
- }
- internal InputEventArgs(int wheelDelta)
- {
- mWheelDelta = wheelDelta;
-
- Initialize();
- }
-
- private void Initialize()
- {
- mMousePosition = Mouse.Position;
- }
-
- /// <summary>
- /// Gets which key was pressed.
- /// </summary>
- public KeyCode KeyCode
- {
- get { return mKeyCode; }
- internal set { mKeyCode = value; }
- }
- /// <summary>
- /// Gets the text created by the key which was pressed.
- /// </summary>
- public string KeyString
- {
- get { return mKeyString; }
- }
-
- /// <summary>
- /// The mouse position during this event
- /// </summary>
- public Point MousePosition
- {
- get { return mMousePosition; }
- }
-
- /// <summary>
- /// Gets how many times the keypress has been repeated.
- /// This is zero for the first time a key is pressed, and increases
- /// as the key is held down and KeyDown events are generated after that.
- /// </summary>
- public int RepeatCount
- {
- get { return mRepeatCount; }
- }
-
- /// <summary>
- /// Gets which mouse buttons were pressed.
- /// </summary>
- public Mouse.MouseButtons MouseButtons
- {
- get { return mButtons; }
- }
-
- /// <summary>
- /// Gets the amount the mouse wheel moved in this event.
- /// </summary>
- public int WheelDelta
- {
- get { return mWheelDelta; }
- }
- }
-}
Added: trunk/AgateLib/InputLib/InputHandlerList.cs
===================================================================
--- trunk/AgateLib/InputLib/InputHandlerList.cs (rev 0)
+++ trunk/AgateLib/InputLib/InputHandlerList.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.InputLib
+{
+ public class InputHandlerList
+ {
+ List<IInputHandler> mHandlers = new List<IInputHandler>();
+
+ public InputHandlerList()
+ {
+ Add(new AgateLib.InputLib.Legacy.LegacyInputHandler());
+ }
+ public void Add(IInputHandler handler)
+ {
+ if (mHandlers.Contains(handler))
+ throw new InvalidOperationException("Cannot add the same input handler twice.");
+
+ mHandlers.Add(handler);
+ }
+ public bool Remove(IInputHandler handler)
+ {
+ return mHandlers.Remove(handler);
+ }
+
+ public void Dispatch(AgateInputEventArgs args)
+ {
+ for (int i = mHandlers.Count - 1; i >= 0; i--)
+ {
+ var handler = mHandlers[i];
+
+ handler.ProcessEvent(args);
+
+ if (args.Handled)
+ break;
+
+ if (handler.ForwardUnhandledEvents == false)
+ break;
+ }
+ }
+ }
+}
Modified: trunk/AgateLib/InputLib/Joystick.cs
===================================================================
--- trunk/AgateLib/InputLib/Joystick.cs 2014-07-28 14:46:21 UTC (rev 1428)
+++ trunk/AgateLib/InputLib/Joystick.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -21,6 +21,7 @@
using System.Text;
using AgateLib.Geometry;
using AgateLib.InputLib.ImplementationBase;
+using AgateLib.InputLib.Legacy;
namespace AgateLib.InputLib
{
Deleted: trunk/AgateLib/InputLib/Keyboard.cs
===================================================================
--- trunk/AgateLib/InputLib/Keyboard.cs 2014-07-28 14:46:21 UTC (rev 1428)
+++ trunk/AgateLib/InputLib/Keyboard.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -1,466 +0,0 @@
-// The contents of this file are subject to the Mozilla Public License
-// Version 1.1 (the "License"); you may not use this file except in
-// compliance with the License. You may obtain a copy of the License at
-// http://www.mozilla.org/MPL/
-//
-// Software distributed under the License is distributed on an "AS IS"
-// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-// License for the specific language governing rights and limitations
-// under the License.
-//
-// The Original Code is AgateLib.
-//
-// The Initial Developer of the Original Code is Erik Ylvisaker.
-// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
-// All Rights Reserved.
-//
-// Contributor(s): Erik Ylvisaker
-//
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-using AgateLib.Geometry;
-using AgateLib.Diagnostics;
-
-namespace AgateLib.InputLib
-{
- /// <summary>
- /// Static class which represents Keyboard input.
- /// </summary>
- [CLSCompliant(true)]
- public static class Keyboard
- {
- static KeyState mKeyState = new KeyState();
-
- static Keyboard()
- {
- DisplayLib.Display.DisposeDisplay += new AgateLib.DisplayLib.Display.DisposeDisplayHandler(Display_DisposeDisplay);
- }
-
- static void Display_DisposeDisplay()
- {
- ClearEvents();
- }
-
-
- /// <summary>
- /// Class which represents the state of all keys on the keyboard.
- /// </summary>
- [CLSCompliant(true)]
- public class KeyState
- {
- private static int[] mKeyState;
- private static bool[] mWaitForKeyUp;
-
- internal KeyState()
- {
- mKeyState = new int[256];
- mWaitForKeyUp = new bool[256];
- }
-
- /// <summary>
- /// Gets or sets the state of the given key.
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public bool this[KeyCode id]
- {
- get
- {
- if (mKeyState[(int)id] > 0)
- return true;
- else
- return false;
- }
- set
- {
- int intID = (int)id;
-
- if (value == true)
- {
- if (mKeyState[intID] == 0 && mWaitForKeyUp[intID])
- return;
-
- mKeyState[intID]++;
- mWaitForKeyUp[intID] = true;
-
- //System.Diagnostics.Debug.WriteLine("Set key {0} to {1}, repeat count {2}.",
- // id, value, mKeyState[(int)id] - 1);
-
- Keyboard.OnKeyDown(id,
- new KeyModifiers(this[KeyCode.Alt], this[KeyCode.Control], this[KeyCode.Shift]),
- mKeyState[(int)id] - 1);
- }
- // value is false here:
- else if (mKeyState[(int)id] > 0)
- {
- ReleaseKey(id, false);
- }
- else
- {
- mWaitForKeyUp[intID] = false;
- }
- }
- }
-
- /// <summary>
- /// Clears the key-down status of a key, and generates a KeyUp event.
- /// If waitKeyUp is true, the key is marked so that KeydDown events will not be generated until
- /// it has been physically released by the user.
- /// </summary>
- /// <param name="id">KeyCode identifier of key to release.</param>
- /// <param name="waitKeyUp">Boolean flag indicating whether or not
- /// keydown events should be suppressed until the key is physically released.</param>
- internal void ReleaseKey(KeyCode id, bool waitKeyUp)
- {
- mKeyState[(int)id] = 0;
- mWaitForKeyUp[(int)id] = waitKeyUp;
- //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]));
- }
- internal bool AnyKeyPressed
- {
- get
- {
- for (int i = 0; i < mKeyState.Length; i++)
- if (mKeyState[i] > 0)
- return true;
-
- return false;
- }
- }
-
- /// <summary>
- /// Resets all keys to being in the up state (not pushed).
- /// Does generate KeyUp events.
- ///
- /// This also makes it so any keys which were depressed must be released
- /// before KeyDown events are raised again.
- /// </summary>
- internal void ReleaseAllKeys(bool waitForKeyUp)
- {
- for (int i = 0; i < mKeyState.Length; i++)
- {
- if (mKeyState[i] > 0)
- ReleaseKey((KeyCode)i, waitForKeyUp);
- }
- }
-
-
- }
-
- /// <summary>
- /// Gets an object representing the state of all keys on the keyboard.
- /// </summary>
- public static KeyState Keys
- {
- get { return mKeyState; }
- }
-
- /// <summary>
- /// Resets all keys to being in the up state (not pushed).
- /// Does generate KeyUp events.
- ///
- /// This also makes it so any keys which were depressed must be released
- /// before KeyDown events are raised again.
- /// </summary>
- public static void ReleaseAllKeys()
- {
- mKeyState.ReleaseAllKeys(true);
- }
- /// <summary>
- /// Resets all keys to being in the up state (not pushed).
- /// Does generate KeyUp events.
- /// <para>
- /// This can also make it so any keys which were depressed must be released
- /// before KeyDown events are raised again.
- /// </para>
- /// </summary>
- /// <param name="waitForKeyUp">If true, then keys currently depressed will
- /// not generate KeyDown events until they are released.</param>
- public static void ReleaseAllKeys(bool waitForKeyUp)
- {
- mKeyState.ReleaseAllKeys(waitForKeyUp);
- }
-
- /// <summary>
- /// Resets a particular key to being in the up state (not pushed).
- /// Generates a KeyUp event for that key.
- /// <para>
- /// This also makes it so that the key must be physically depressed by the user
- /// before it will register a KeyDown event again. If it is already depressed,
- /// it must be released first.
- /// </para>
- /// </summary>
- /// <param name="key"></param>
- public static void ReleaseKey(KeyCode key)
- {
- mKeyState.ReleaseKey(key, true);
- }
- /// <summary>
- /// Resets a particular key to being in the up state (not pushed).
- /// Generates a KeyUp event for that key.
- /// </summary>
- /// <param name="key">The key to be released.</param>
- /// <param name="waitForKeyUp">If true, then keys currently depressed will
- /// not generate KeyDown events until they are released.</param>
- public static void ReleaseKey(KeyCode key, bool waitForKeyUp)
- {
- mKeyState.ReleaseKey(key, waitForKeyUp);
- }
-
- /// <summary>
- /// Checks to see if the user pressed the "Any" key.
- /// </summary>
- public static bool AnyKeyPressed
- {
- get
- {
- return Keys.AnyKeyPressed;
- }
- }
- private static void OnKeyDown(KeyCode id, KeyModifiers mods, int repeatCount)
- {
- var eventArgs = new InputEventArgs(id, mods, repeatCount);
-
- if (AgateConsole.IsInitialized &&
- (AgateConsole.IsVisible || id == AgateConsole.VisibleToggleKey))
- {
- AgateConsole.Keyboard_KeyDown(eventArgs);
- }
- else if (KeyDown != null)
- KeyDown(eventArgs);
- }
- private static void OnKeyUp(KeyCode id, KeyModifiers mods)
- {
- var eventArgs = new InputEventArgs(id, mods);
-
- if (AgateConsole.IsVisible)
- {
- AgateConsole.Keyboard_KeyUp(eventArgs);
- }
- else if (KeyUp != null)
- KeyUp(eventArgs);
- }
-
- /// <summary>
- /// Creates a string from the specified KeyCode and KeyModifiers.
- /// Unfortunately this is tied to the US English keyboard, so it needs a better solution.
- /// </summary>
- /// <param name="keyID"></param>
- /// <param name="mods"></param>
- /// <returns></returns>
- public static string GetKeyString(KeyCode keyID, KeyModifiers mods)
- {
- if ((int)keyID >= 'A' && (int)keyID <= 'Z')
- {
- char result;
-
- if (mods.Shift)
- result = (char)keyID;
- else
- result = (char)((int)keyID + 'a' - 'A');
-
- return result.ToString();
- }
-
-
- switch (keyID)
- {
- case KeyCode.Tab:
- return "\t";
-
- case KeyCode.Return:
- //case KeyCode.Enter:
- return "\n";
-
- case KeyCode.Space:
- return " ";
-
- // I'd love a better way of doing this:
- // likely, this is not very friendly to non US keyboard layouts.
- case KeyCode.D0:
- if (mods.Shift)
- return ")";
- else
- return "0";
-
- case KeyCode.NumPad0:
- return "0";
-
- case KeyCode.D1:
- if (mods.Shift)
- return "!";
- else return "1";
-
-
- case KeyCode.NumPad1:
- return "1";
-
- case KeyCode.D2:
- if (mods.Shift)
- return "@";
- else return "2";
-
- case KeyCode.NumPad2:
- return "2";
-
- case KeyCode.D3:
- if (mods.Shift)
- return "#";
- else return "3";
-
- case KeyCode.NumPad3:
- return "3";
-
- case KeyCode.D4:
- if (mods.Shift)
- return "$";
- else return "4";
-
- case KeyCode.NumPad4:
- return "4";
-
- case KeyCode.D5:
- if (mods.Shift)
- return "%";
- else return "5";
-
- case KeyCode.NumPad5:
- return "5";
-
- case KeyCode.D6:
- if (mods.Shift)
- return "^";
- else return "6";
-
- case KeyCode.NumPad6:
- return "6";
-
- case KeyCode.D7:
- if (mods.Shift)
- return "&";
- else return "7";
-
- case KeyCode.NumPad7:
- return "7";
-
- case KeyCode.D8:
- if (mods.Shift)
- return "*";
- else return "8";
-
-
- case KeyCode.NumPad8:
- return "8";
-
- case KeyCode.D9:
- if (mods.Shift)
- return "(";
- else return "9";
-
- case KeyCode.NumPad9:
- return "9";
-
- case KeyCode.NumPadMinus:
- return "-";
- case KeyCode.NumPadMultiply:
- return "*";
- case KeyCode.NumPadPeriod:
- return ".";
- case KeyCode.NumPadPlus:
- return "+";
- case KeyCode.NumPadSlash:
- return "/";
-
- case KeyCode.Semicolon:
- if (mods.Shift)
- return ":";
- else
- return ";";
-
- case KeyCode.Plus:
- if (mods.Shift)
- return "+";
- else
- return "=";
-
- case KeyCode.Comma:
- if (mods.Shift)
- return "<";
- else
- return ",";
-
- case KeyCode.Minus:
- if (mods.Shift)
- return "_";
- else
- return "-";
-
- case KeyCode.Period:
- if (mods.Shift)
- return ">";
- else
- return ".";
-
- case KeyCode.Slash:
- if (mods.Shift)
- return "?";
- else
- return "/";
-
- case KeyCode.Tilde:
- if (mods.Shift)
- return "~";
- else
- return "`";
-
- case KeyCode.OpenBracket:
- if (mods.Shift)
- return "{";
- else
- return "[";
-
- case KeyCode.BackSlash:
- if (mods.Shift)
- return "|";
- else
- return @"\";
-
- case KeyCode.CloseBracket:
- if (mods.Shift)
- return "}";
- else
- return "]";
-
- case KeyCode.Quotes:
- if (mods.Shift)
- return "\"";
- else
- return "'";
-
- }
-
- return "";
- }
-
- /// <summary>
- /// Event which occurs when a key is pressed.
- /// </summary>
- public static event InputEventHandler KeyDown;
- /// <summary>
- /// Event which occurs when a key is released.
- /// </summary>
- public static event InputEventHandler KeyUp;
-
-
- private static void ClearEvents()
- {
- KeyDown = null;
- KeyUp = null;
- }
- }
-}
Copied: trunk/AgateLib/InputLib/Legacy/Delegates.cs (from rev 1422, trunk/AgateLib/InputLib/Delegates.cs)
===================================================================
--- trunk/AgateLib/InputLib/Legacy/Delegates.cs (rev 0)
+++ trunk/AgateLib/InputLib/Legacy/Delegates.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.InputLib.Legacy
+{
+ /// <summary>
+ /// Input Event handler event type.
+ /// </summary>
+ /// <param name="e"></param>
+ public delegate void InputEventHandler(InputEventArgs e);
+
+ public delegate void JoystickEventHandler(object sender, JoystickEventArgs e);
+}
Copied: trunk/AgateLib/InputLib/Legacy/InputEventArgs.cs (from rev 1422, trunk/AgateLib/InputLib/InputEventArgs.cs)
===================================================================
--- trunk/AgateLib/InputLib/Legacy/InputEventArgs.cs (rev 0)
+++ trunk/AgateLib/InputLib/Legacy/InputEventArgs.cs 2014-08-02 00:49:42 UTC (rev 1429)
@@ -0,0 +1,144 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.Text;
+using AgateLib.Geometry;
+
+namespace AgateLib.InputLib.Legacy
+{
+ /// <summary>
+ /// Class which describes details about an input event.
+ /// </summary>
+ [Obsolete("Use AgateInputEventArgs instead.")]
+ public class InputEventArgs
+ {
+ private AgateInputEventArgs args;
+ int mRepeatCount;
+
+ internal InputEventArgs(AgateInputEventArgs args)
+ {
+ this.args = args;
+ Initialize();
+ }
+ private void Initialize()
+ {
+ if (args == null)
+ args = new AgateInputEventArgs();
+
+ MousePosition = Mouse.Position;
+ }
+ internal InputEventArgs()
+ {
+ Initialize();
+ }
+ internal InputEventArgs(KeyCode keyID, KeyModifiers mods)
+ {
+ KeyCode = keyID;
+ KeyString = Keyboard.GetKeyString(keyID, mods);
+ Modifiers = mods;
+
+ Initialize();
+ }
+ [Obsolete("Don't use this one.", true)]
+ internal InputEventArgs(KeyCode keyID, KeyModifiers mods, int repeatCount)
+ : this(keyID, mods)
+ {
+ mRepeatCount = repeatCount;
+ }
+
+ internal InputEventArgs(MouseButton mouseButtons)
+ {
+ args = new AgateInputEventArgs();
+ MouseButtons = mouseButtons;
+
+ Initialize();
+ }
+ internal InputEventArgs(int wheelDelta)
+ {
+ args = new AgateInputEventArgs();
+ WheelDelta = wheelDelta;
+
+ Initialize();
+ }
+
+
+
+ /// <summary>
+ /// Gets which key was pressed.
+ /// </summary>
+ public KeyCode KeyCode
+ {
+ get { return args.KeyCode; }
+ internal set { args.KeyCode = value; }
+ }
+ ///...
[truncated message content] |
|
From: <ka...@us...> - 2014-08-02 23:49:17
|
Revision: 1432
http://sourceforge.net/p/agate/code/1432
Author: kanato
Date: 2014-08-02 23:49:08 +0000 (Sat, 02 Aug 2014)
Log Message:
-----------
Initial setup of SDL in new AgateLib architecture.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/ApplicationModels/AgateAppModel.cs
trunk/AgateLib/ApplicationModels/ModelParameters.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/Drivers/IPlatformFactory.cs
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/ImageResource.cs
trunk/AgateLib-Everything.sln
trunk/AgateLib.GL/Properties/AssemblyInfo.cs
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
trunk/AgateLib.Platform.WindowsForms/Configuration.cs
trunk/AgateLib.Platform.WindowsForms/Data/AgateDatabase.cs
trunk/AgateLib.Platform.WindowsForms/Data/AgateTableDictionary.cs
trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs
trunk/AgateLib.Platform.WindowsForms/Factories/SdlFactory.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FileProviderList.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FileSystemProvider.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/TgzFileProvider.cs
trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/ZipFileProvider.cs
trunk/AgateLib.SDL/Audio/SDL_Audio.cs
trunk/AgateLib.SDL/Audio/SDL_Music.cs
trunk/AgateLib.SDL/Audio/SDL_SoundBuffer.cs
trunk/AgateLib.SDL/Audio/SDL_SoundBufferSession.cs
trunk/AgateLib.SDL/Input/SDL_Input.cs
Added Paths:
-----------
trunk/AgateLib/IO/FileProvider.cs
trunk/AgateLib/IO/IReadFileProvider.cs
trunk/AgateLib/IO/IReadWriteFileProvider.cs
trunk/AgateLib/IO/IWriteFileProvider.cs
trunk/AgateLib.SDL/
trunk/AgateLib.SDL/AgateLib.SDL.csproj
trunk/AgateLib.SDL/AgateLib.SDL.dll.config
trunk/AgateLib.SDL/Audio/
trunk/AgateLib.SDL/Input/
trunk/AgateLib.SDL/Properties/
trunk/AgateLib.SDL/Properties/AssemblyInfo.cs
trunk/AgateLib.SDL/Sdl2/
trunk/AgateLib.SDL/Sdl2/ISDL.cs
trunk/AgateLib.SDL/Sdl2/ISDLMixer.cs
trunk/AgateLib.SDL/Sdl2/SDL32.cs
trunk/AgateLib.SDL/Sdl2/SDL64.cs
trunk/AgateLib.SDL/Sdl2/SDLConstants.cs
trunk/AgateLib.SDL/Sdl2/SdlFactory.cs
trunk/AgateLib.SDL/Sdl2/SixtyFour/
trunk/AgateLib.SDL/Sdl2/SixtyFour/LPUtf8StrMarshaler.cs
trunk/AgateLib.SDL/Sdl2/SixtyFour/SDL2.cs
trunk/AgateLib.SDL/Sdl2/SixtyFour/SDL2_image.cs
trunk/AgateLib.SDL/Sdl2/SixtyFour/SDL2_mixer.cs
trunk/AgateLib.SDL/Sdl2/SixtyFour/SDL2_ttf.cs
trunk/AgateLib.SDL/Sdl2/ThirtyTwo/
trunk/AgateLib.SDL/Sdl2/ThirtyTwo/LPUtf8StrMarshaler.cs
trunk/AgateLib.SDL/Sdl2/ThirtyTwo/SDL2.cs
trunk/AgateLib.SDL/Sdl2/ThirtyTwo/SDL2_image.cs
trunk/AgateLib.SDL/Sdl2/ThirtyTwo/SDL2_mixer.cs
trunk/AgateLib.SDL/Sdl2/ThirtyTwo/SDL2_ttf.cs
trunk/AgateLib.SDL/lib32/
trunk/AgateLib.SDL/lib32/LICENSE.FLAC.txt
trunk/AgateLib.SDL/lib32/LICENSE.mikmod.txt
trunk/AgateLib.SDL/lib32/LICENSE.modplug.txt
trunk/AgateLib.SDL/lib32/LICENSE.ogg-vorbis.txt
trunk/AgateLib.SDL/lib32/LICENSE.smpeg.txt
trunk/AgateLib.SDL/lib32/README-SDL.txt
trunk/AgateLib.SDL/lib32/README.txt
trunk/AgateLib.SDL/lib32/SDL2.dll
trunk/AgateLib.SDL/lib32/SDL2_mixer.dll
trunk/AgateLib.SDL/lib32/libFLAC-8.dll
trunk/AgateLib.SDL/lib32/libmikmod-2.dll
trunk/AgateLib.SDL/lib32/libmodplug-1.dll
trunk/AgateLib.SDL/lib32/libogg-0.dll
trunk/AgateLib.SDL/lib32/libvorbis-0.dll
trunk/AgateLib.SDL/lib32/libvorbisfile-3.dll
trunk/AgateLib.SDL/lib32/smpeg2.dll
trunk/AgateLib.SDL/lib64/
trunk/AgateLib.SDL/lib64/LICENSE.FLAC.txt
trunk/AgateLib.SDL/lib64/LICENSE.mikmod.txt
trunk/AgateLib.SDL/lib64/LICENSE.modplug.txt
trunk/AgateLib.SDL/lib64/LICENSE.ogg-vorbis.txt
trunk/AgateLib.SDL/lib64/LICENSE.smpeg.txt
trunk/AgateLib.SDL/lib64/README.txt
trunk/AgateLib.SDL/lib64/Readme-SDL.txt
trunk/AgateLib.SDL/lib64/SDL2.dll
trunk/AgateLib.SDL/lib64/SDL2_mixer.dll
trunk/AgateLib.SDL/lib64/libFLAC-8.dll
trunk/AgateLib.SDL/lib64/libmikmod-2.dll
trunk/AgateLib.SDL/lib64/libmodplug-1.dll
trunk/AgateLib.SDL/lib64/libogg-0.dll
trunk/AgateLib.SDL/lib64/libvorbis-0.dll
trunk/AgateLib.SDL/lib64/libvorbisfile-3.dll
trunk/AgateLib.SDL/lib64/smpeg2.dll
trunk/AgateLib.SDL/packages.config
Removed Paths:
-------------
trunk/AgateLib/IO/IFileProvider.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/AgateLib.csproj 2014-08-02 23:49:08 UTC (rev 1432)
@@ -118,7 +118,8 @@
<Compile Include="InputLib\Input.cs" />
<Compile Include="InputLib\Legacy\LegacyInputHandler.cs" />
<Compile Include="InputLib\MouseButton.cs" />
- <Compile Include="IO\IFileProvider.cs">
+ <Compile Include="IO\FileProvider.cs" />
+ <Compile Include="IO\IReadFileProvider.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DisplayLib\ImplementationBase\FrameBufferImpl.cs" />
@@ -129,6 +130,8 @@
<Compile Include="IO\IDirectory.cs" />
<Compile Include="IO\IFile.cs" />
<Compile Include="IO\IPath.cs" />
+ <Compile Include="IO\IReadWriteFileProvider.cs" />
+ <Compile Include="IO\IWriteFileProvider.cs" />
<Compile Include="Platform\IStopWatch.cs" />
<Compile Include="Platform\PlatformInfo.cs" />
<Compile Include="Platform\PlatformType.cs" />
Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -140,6 +140,10 @@
Parameters.DisplayWindowSize = Size.FromString(parm);
break;
+ case "--novsync":
+ Parameters.VerticalSync = false;
+ break;
+
default:
break;
}
@@ -157,6 +161,7 @@
{
Initialize();
AutoCreateDisplayWindow();
+ Display.RenderState.WaitForVerticalBlank = Parameters.VerticalSync;
int retval = BeginModel(entryPoint);
Modified: trunk/AgateLib/ApplicationModels/ModelParameters.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -16,6 +16,7 @@
AutoCreateDisplayWindow = true;
CreateFullScreenWindow = true;
ApplicationName = "AgateLib Application";
+ VerticalSync = true;
}
public ModelParameters(string[] args) : this()
{
@@ -28,6 +29,8 @@
public Size DisplayWindowSize { get; set; }
public bool CreateFullScreenWindow { get; set; }
+ public bool VerticalSync { get; set; }
+
public string[] Arguments { get; set; }
}
}
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/Core.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -329,7 +329,8 @@
FileSystem.File = factory.PlatformFactory.CreateFile();
FileSystem.Path = factory.PlatformFactory.CreatePath();
-
+ FileProvider.Initialize(factory.PlatformFactory);
+
Display.Initialize(factory.DisplayFactory.CreateDisplayImpl());
Audio.Initialize(factory.AudioFactory.CreateAudioImpl());
JoystickInput.Initialize(factory.InputFactory.CreateJoystickInputImpl());
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -139,7 +139,7 @@
/// <param name="provider"></param>
/// <param name="filename"></param>
/// <returns></returns>
- public virtual SurfaceImpl CreateSurface(IFileProvider provider, string filename)
+ public virtual SurfaceImpl CreateSurface(IReadFileProvider provider, string filename)
{
return CreateSurface(provider.OpenRead(filename));
}
Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs
===================================================================
--- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -19,5 +19,7 @@
IO.IPath CreatePath();
IEnumerable<System.Reflection.Assembly> GetSerializationSearchAssemblies(Type objectType);
+
+ IReadFileProvider CreateAssetFileProvider();
}
}
Added: trunk/AgateLib/IO/FileProvider.cs
===================================================================
--- trunk/AgateLib/IO/FileProvider.cs (rev 0)
+++ trunk/AgateLib/IO/FileProvider.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -0,0 +1,46 @@
+using AgateLib.Drivers;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.IO
+{
+ public static class FileProvider
+ {
+ static IReadFileProvider mSurfaceAssets;
+ static IReadFileProvider mResourceAssets;
+ static IReadFileProvider mMusicAssets;
+ static IReadFileProvider mSoundAssets;
+
+ internal static void Initialize(IPlatformFactory platformFactory)
+ {
+ Assets = platformFactory.CreateAssetFileProvider();
+ }
+
+ public static IReadFileProvider Assets { get; private set; }
+ public static IReadFileProvider SurfaceAssets
+ {
+ get { return mSurfaceAssets ?? Assets; }
+ set { mSurfaceAssets = Assets; }
+ }
+ public static IReadFileProvider ResourceAssets
+ {
+ get { return mResourceAssets ?? Assets; }
+ set { mResourceAssets = Assets; }
+ }
+ public static IReadFileProvider MusicAssets
+ {
+ get { return mMusicAssets ?? Assets; }
+ set { mMusicAssets = Assets; }
+ }
+ public static IReadFileProvider SoundAssets
+ {
+ get { return mSoundAssets ?? Assets; }
+ set { mSoundAssets = Assets; }
+ }
+
+ public static IReadWriteFileProvider UserFiles { get; private set; }
+
+ }
+}
Deleted: trunk/AgateLib/IO/IFileProvider.cs
===================================================================
--- trunk/AgateLib/IO/IFileProvider.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/IO/IFileProvider.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -1,82 +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.IO;
-using System.Text;
-
-namespace AgateLib
-{
- /// <summary>
- /// Public interface that should be implemented
- /// </summary>
- public interface IFileProvider
- {
- /// <summary>
- /// Opens the specified file returning a stream. Throws
- /// FileNotFoundException if the file does not exist.
- /// </summary>
- /// <param name="filename">The path and filename of the file to read from.</param>
- /// <returns></returns>
- Stream OpenRead(string filename);
- /// <summary>
- /// Checks to if the specified file exists in the file provider.
- /// </summary>
- /// <param name="filename"></param>
- /// <returns></returns>
- bool FileExists(string filename);
-
- /// <summary>
- /// Enumerates through all filenames in the file provider.
- /// </summary>
- /// <returns></returns>
- IEnumerable<string> GetAllFiles();
- /// <summary>
- /// Enumerates through all filenames which match the specified search pattern.
- /// </summary>
- /// <remarks>The search pattern is not regex style pattern matching, rather it should
- /// be bash pattern matching, so a searchPattern of "*" would match all files, and
- /// "*.*" would match all filenames with a period in them.</remarks>
- /// <param name="searchPattern"></param>
- /// <returns></returns>
- IEnumerable<string> GetAllFiles(string searchPattern);
- /// <summary>
- /// Returns a string containing the entire contents of the specified file.
- /// </summary>
- /// <param name="filename">The path and filename of the file to read from.</param>
- /// <returns></returns>
- string ReadAllText(string filename);
-
- /// <summary>
- /// Returns true if the specified filename points to an actual file on disk.
- /// If this method returns false, then ResolveFile will throw an exception
- /// for that file.
- /// </summary>
- /// <param name="filename"></param>
- /// <returns></returns>
- bool IsRealFile(string filename);
-
- /// <summary>
- /// Returns the full path of the given filename.
- /// </summary>
- /// <param name="filename"></param>
- /// <returns></returns>
- string ResolveFile(string filename);
- }
-}
Copied: trunk/AgateLib/IO/IReadFileProvider.cs (from rev 1429, trunk/AgateLib/IO/IFileProvider.cs)
===================================================================
--- trunk/AgateLib/IO/IReadFileProvider.cs (rev 0)
+++ trunk/AgateLib/IO/IReadFileProvider.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -0,0 +1,82 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace AgateLib
+{
+ /// <summary>
+ /// Public interface that should be implemented
+ /// </summary>
+ public interface IReadFileProvider
+ {
+ /// <summary>
+ /// Opens the specified file returning a stream. Throws
+ /// FileNotFoundException if the file does not exist.
+ /// </summary>
+ /// <param name="filename">The path and filename of the file to read from.</param>
+ /// <returns></returns>
+ Stream OpenRead(string filename);
+ /// <summary>
+ /// Checks to if the specified file exists in the file provider.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ bool FileExists(string filename);
+
+ /// <summary>
+ /// Enumerates through all existing filenames in the file provider.
+ /// </summary>
+ /// <returns></returns>
+ IEnumerable<string> GetAllFiles();
+ /// <summary>
+ /// Enumerates through all filenames which match the specified search pattern.
+ /// </summary>
+ /// <remarks>The search pattern is not regex style pattern matching, rather it should
+ /// be bash pattern matching, so a searchPattern of "*" would match all files, and
+ /// "*.*" would match all filenames with a period in them.</remarks>
+ /// <param name="searchPattern"></param>
+ /// <returns></returns>
+ IEnumerable<string> GetAllFiles(string searchPattern);
+ /// <summary>
+ /// Returns a string containing the entire contents of the specified file.
+ /// </summary>
+ /// <param name="filename">The path and filename of the file to read from.</param>
+ /// <returns></returns>
+ string ReadAllText(string filename);
+
+ /// <summary>
+ /// Returns true if the specified filename points to an actual file on disk.
+ /// If this method returns false, then ResolveFile will throw an exception
+ /// for that file.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ bool IsRealFile(string filename);
+
+ /// <summary>
+ /// Returns the full path of the given filename.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ string ResolveFile(string filename);
+ }
+}
Added: trunk/AgateLib/IO/IReadWriteFileProvider.cs
===================================================================
--- trunk/AgateLib/IO/IReadWriteFileProvider.cs (rev 0)
+++ trunk/AgateLib/IO/IReadWriteFileProvider.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.IO
+{
+ public interface IReadWriteFileProvider : IReadFileProvider, IWriteFileProvider
+ {
+ }
+}
Added: trunk/AgateLib/IO/IWriteFileProvider.cs
===================================================================
--- trunk/AgateLib/IO/IWriteFileProvider.cs (rev 0)
+++ trunk/AgateLib/IO/IWriteFileProvider.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.IO
+{
+ public interface IWriteFileProvider
+ {
+ }
+}
Modified: trunk/AgateLib/Resources/AgateResourceCollection.cs
===================================================================
--- trunk/AgateLib/Resources/AgateResourceCollection.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/Resources/AgateResourceCollection.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -43,7 +43,7 @@
const string mStringTableKey = "Strings";
bool mOwnFileProvider;
- IFileProvider mFileProvider;
+ IReadFileProvider mFileProvider;
SurfaceResourceList mSurfaceAccessor;
//GuiThemeResourceList mGuiThemeAccessor;
@@ -68,7 +68,7 @@
if (retval != null)
return retval;
}
-
+
throw new AgateResourceException("Could not find the surface resource {0}.", key);
}
}
@@ -78,36 +78,36 @@
get { return mResources.mImages.Count; }
}
}
-// public class GuiThemeResourceList
-// {
-// AgateResourceCollection mResources;
-//
-// internal GuiThemeResourceList(AgateResourceCollection resources)
-// {
-// mResources = resources;
-// }
-//
-// public GuiThemeResource this[string key]
-// {
-// get
-// {
-// var retval = mResources.mGuiThemes.FirstOrDefault(x => x.Name == key);
-//
-// if (retval == null)
-// throw new AgateResourceException("Could not find the gui theme resource {0}.", key);
-//
-// return retval;
-// }
-// }
-// public GuiThemeResource this[int index]
-// {
-// get { return mResources.mGuiThemes[index]; }
-// }
-// public int Count
-// {
-// get { return mResources.mGuiThemes.Count; }
-// }
-// }
+ // public class GuiThemeResourceList
+ // {
+ // AgateResourceCollection mResources;
+ //
+ // internal GuiThemeResourceList(AgateResourceCollection resources)
+ // {
+ // mResources = resources;
+ // }
+ //
+ // public GuiThemeResource this[string key]
+ // {
+ // get
+ // {
+ // var retval = mResources.mGuiThemes.FirstOrDefault(x => x.Name == key);
+ //
+ // if (retval == null)
+ // throw new AgateResourceException("Could not find the gui theme resource {0}.", key);
+ //
+ // return retval;
+ // }
+ // }
+ // public GuiThemeResource this[int index]
+ // {
+ // get { return mResources.mGuiThemes[index]; }
+ // }
+ // public int Count
+ // {
+ // get { return mResources.mGuiThemes.Count; }
+ // }
+ // }
/// <summary>
/// Constructs a new AgateResourceCollection object.
@@ -144,9 +144,15 @@
/// <summary>
/// Gets or sets the file provider used to laod resources.
/// </summary>
- public IFileProvider FileProvider
+ public IReadFileProvider FileProvider
{
- get { return mFileProvider; }
+ get
+ {
+ if (mFileProvider == null)
+ return AgateLib.IO.FileProvider.ResourceAssets;
+
+ return mFileProvider;
+ }
set { mFileProvider = value; }
}
@@ -186,10 +192,10 @@
/// <summary>
/// Gets the list of GuiThemeResource objects.
/// </summary>
-// public GuiThemeResourceList GuiThemes
-// {
-// get { return mGuiThemeAccessor; }
-// }
+ // public GuiThemeResourceList GuiThemes
+ // {
+ // get { return mGuiThemeAccessor; }
+ // }
/// <summary>
/// Enumerates through the DisplayWindowResources contained in this group of resources.
/// </summary>
@@ -234,10 +240,10 @@
mImages.Add(img);
}
-// else if (item is GuiThemeResource)
-// {
-// mGuiThemes.Add((GuiThemeResource)item);
-// }
+ // else if (item is GuiThemeResource)
+ // {
+ // mGuiThemes.Add((GuiThemeResource)item);
+ // }
else
mStore.Add(item.Name, item);
}
Modified: trunk/AgateLib/Resources/ImageResource.cs
===================================================================
--- trunk/AgateLib/Resources/ImageResource.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib/Resources/ImageResource.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -98,7 +98,7 @@
}
public string Filename { get; set; }
- public IFileProvider FileProvider { get; set; }
+ public IReadFileProvider FileProvider { get; set; }
public List<SurfaceResource> Surfaces { get { return mSurfaces; } }
Modified: trunk/AgateLib-Everything.sln
===================================================================
--- trunk/AgateLib-Everything.sln 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib-Everything.sln 2014-08-02 23:49:08 UTC (rev 1432)
@@ -35,6 +35,8 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsForms", "AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj", "{4B12561E-D37B-48A1-B6DB-218E94906C22}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.SDL", "AgateLib.SDL\AgateLib.SDL.csproj", "{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -408,6 +410,27 @@
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.ActiveCfg = Release|Any CPU
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.ActiveCfg = Release|x86
{4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.Build.0 = Release|x86
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Any CPU.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Any CPU.Build.0 = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Mixed Platforms.Build.0 = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Win32.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x64.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x86.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Win32.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.ActiveCfg = Release|Any CPU
+ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/AgateLib.GL/Properties/AssemblyInfo.cs
===================================================================
--- trunk/AgateLib.GL/Properties/AssemblyInfo.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib.GL/Properties/AssemblyInfo.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -5,15 +5,15 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("AgateLib.OpenGL")]
+[assembly: AssemblyTitle("AgateLib.GL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("AgateLib.OpenGL")]
+[assembly: AssemblyProduct("AgateLib.GL")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: InternalsVisibleTo("AgateLib.Desktop.Forms")]
+[assembly: InternalsVisibleTo("AgateLib.Platform.WindowsForms")]
// 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
Modified: trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-02 23:49:08 UTC (rev 1432)
@@ -143,6 +143,10 @@
<Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project>
<Name>AgateLib.GL</Name>
</ProjectReference>
+ <ProjectReference Include="..\AgateLib.SDL\AgateLib.SDL.csproj">
+ <Project>{935d67a0-931e-46de-9f6a-2d6dbc99aff3}</Project>
+ <Name>AgateLib.SDL</Name>
+ </ProjectReference>
<ProjectReference Include="..\AgateLib\AgateLib.csproj">
<Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
<Name>AgateLib</Name>
Modified: trunk/AgateLib.Platform.WindowsForms/Configuration.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Configuration.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib.Platform.WindowsForms/Configuration.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -13,8 +13,9 @@
{
public static class Configuration
{
+ static FileProviderList mAssetProvider = new FileProviderList();
static FileProviderList mResourceProvider = new FileProviderList();
- static FileProviderList mImageProvider = new FileProviderList();
+ static FileProviderList mSurfaceProvider = new FileProviderList();
static FileProviderList mSoundProvider = new FileProviderList();
static FileProviderList mMusicProvider = new FileProviderList();
@@ -29,7 +30,7 @@
}
public static FileProviderList Resources { get { return mResourceProvider; } }
- public static FileProviderList Images { get { return mImageProvider; } }
+ public static FileProviderList Images { get { return mSurfaceProvider; } }
public static FileProviderList Sounds { get { return mSoundProvider; } }
public static FileProviderList MusicProvider { get { return mMusicProvider; } }
}
Modified: trunk/AgateLib.Platform.WindowsForms/Data/AgateDatabase.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Data/AgateDatabase.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib.Platform.WindowsForms/Data/AgateDatabase.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -66,7 +66,7 @@
/// </summary>
/// <param name="provider"></param>
/// <returns></returns>
- public static AgateDatabase FromProvider(IFileProvider provider)
+ public static AgateDatabase FromProvider(IReadFileProvider provider)
{
return ReadDatabase(provider);
}
@@ -79,7 +79,7 @@
((IDisposable)mTables).Dispose();
}
- private static AgateDatabase ReadDatabase(IFileProvider provider)
+ private static AgateDatabase ReadDatabase(IReadFileProvider provider)
{
XleSerializer ser = new XleSerializer(typeof(AgateDatabase));
Modified: trunk/AgateLib.Platform.WindowsForms/Data/AgateTableDictionary.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Data/AgateTableDictionary.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib.Platform.WindowsForms/Data/AgateTableDictionary.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -57,7 +57,7 @@
}
}
- internal IFileProvider FileProvider { get; set; }
+ internal IReadFileProvider FileProvider { get; set; }
internal bool OwnFileProvider { get; set; }
/// <summary>
Modified: trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs 2014-08-02 01:04:50 UTC (rev 1431)
+++ trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs 2014-08-02 23:49:08 UTC (rev 1432)
@@ -2,8 +2,10 @@
using AgateLib.Drivers;
using AgateLib.IO;
using AgateLib.Platform.WindowsForms.PlatformImplementation;
+using AgateLib.Utility;
using System;
using System.Collections.Generic;
+using System.IO;
...
[truncated message content] |
|
From: <ka...@us...> - 2014-08-03 17:32:45
|
Revision: 1434
http://sourceforge.net/p/agate/code/1434
Author: kanato
Date: 2014-08-03 17:32:32 +0000 (Sun, 03 Aug 2014)
Log Message:
-----------
Make SDL work with 32/64 bit.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/ApplicationModels/AgateAppModel.cs
trunk/AgateLib/Drivers/NullDrivers/NullInputImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/InputImpl.cs
trunk/AgateLib/InputLib/JoystickInput.cs
trunk/AgateLib-Everything.sln
trunk/AgateLib.AgateSDL/Audio/SDL_Audio.cs
trunk/AgateLib.AgateSDL/Audio/SDL_Music.cs
trunk/AgateLib.AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/AgateLib.AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/AgateLib.AgateSDL/Input/SDL_Input.cs
trunk/AgateLib.AgateSDL/Sdl2/ISDL.cs
trunk/AgateLib.AgateSDL/Sdl2/ISDLMixer.cs
trunk/AgateLib.AgateSDL/Sdl2/SDL32.cs
trunk/AgateLib.AgateSDL/Sdl2/SDL64.cs
trunk/AgateLib.AgateSDL/Sdl2/SDLConstants.cs
trunk/AgateLib.AgateSDL/Sdl2/SdlFactory.cs
trunk/AgateLib.AgateSDL/Sdl2/ThirtyTwo/SDL2_mixer.cs
trunk/AgateLib.GL/AgateLib.GL.csproj
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
trunk/AgateLib.Platform.WindowsForms/Factories/SdlFactory.cs
Added Paths:
-----------
trunk/AgateLib.AgateSDL/
trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj
trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.dll.config
Removed Paths:
-------------
trunk/AgateLib.AgateSDL/AgateLib.SDL.csproj
trunk/AgateLib.AgateSDL/AgateLib.SDL.dll.config
trunk/AgateLib.SDL/
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib/AgateLib.csproj 2014-08-03 17:32:32 UTC (rev 1434)
@@ -20,7 +20,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -29,7 +29,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
+ <OutputPath>..\Binaries\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs
===================================================================
--- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-03 17:32:32 UTC (rev 1434)
@@ -161,7 +161,7 @@
{
Initialize();
AutoCreateDisplayWindow();
- Display.RenderState.WaitForVerticalBlank = Parameters.VerticalSync;
+ //Display.RenderState.WaitForVerticalBlank = Parameters.VerticalSync;
int retval = BeginModel(entryPoint);
Modified: trunk/AgateLib/Drivers/NullDrivers/NullInputImpl.cs
===================================================================
--- trunk/AgateLib/Drivers/NullDrivers/NullInputImpl.cs 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib/Drivers/NullDrivers/NullInputImpl.cs 2014-08-03 17:32:32 UTC (rev 1434)
@@ -46,5 +46,9 @@
{
return new List<JoystickImpl>();
}
+
+ public override void Poll()
+ {
+ }
}
}
Modified: trunk/AgateLib/InputLib/ImplementationBase/InputImpl.cs
===================================================================
--- trunk/AgateLib/InputLib/ImplementationBase/InputImpl.cs 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib/InputLib/ImplementationBase/InputImpl.cs 2014-08-03 17:32:32 UTC (rev 1434)
@@ -39,5 +39,7 @@
/// </summary>
/// <returns></returns>
public abstract IEnumerable<JoystickImpl> CreateJoysticks();
+
+ public abstract void Poll();
}
}
Modified: trunk/AgateLib/InputLib/JoystickInput.cs
===================================================================
--- trunk/AgateLib/InputLib/JoystickInput.cs 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib/InputLib/JoystickInput.cs 2014-08-03 17:32:32 UTC (rev 1434)
@@ -64,6 +64,8 @@
internal static void PollTimer()
{
+ sImpl.Poll();
+
for (int i = 0; i < mRawJoysticks.Count; i++)
mRawJoysticks[i].Poll();
}
Modified: trunk/AgateLib-Everything.sln
===================================================================
--- trunk/AgateLib-Everything.sln 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib-Everything.sln 2014-08-03 17:32:32 UTC (rev 1434)
@@ -35,7 +35,7 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsForms", "AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj", "{4B12561E-D37B-48A1-B6DB-218E94906C22}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.SDL", "AgateLib.SDL\AgateLib.SDL.csproj", "{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.AgateSDL", "AgateLib.AgateSDL\AgateLib.AgateSDL.csproj", "{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Copied: trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj (from rev 1433, trunk/AgateLib.SDL/AgateLib.SDL.csproj)
===================================================================
--- trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj (rev 0)
+++ trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj 2014-08-03 17:32:32 UTC (rev 1434)
@@ -0,0 +1,186 @@
+<?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>{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>AgateLib.AgateSDL</RootNamespace>
+ <AssemblyName>AgateLib.SDL</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\Binaries\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\Binaries\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <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="Audio\SDL_Audio.cs" />
+ <Compile Include="Audio\SDL_Music.cs" />
+ <Compile Include="Audio\SDL_SoundBuffer.cs" />
+ <Compile Include="Audio\SDL_SoundBufferSession.cs" />
+ <Compile Include="Input\SDL_Input.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Sdl2\ISDL.cs" />
+ <Compile Include="Sdl2\ISDLMixer.cs" />
+ <Compile Include="Sdl2\SDL32.cs" />
+ <Compile Include="Sdl2\SDL64.cs" />
+ <Compile Include="Sdl2\SDLConstants.cs" />
+ <Compile Include="Sdl2\SdlFactory.cs" />
+ <Compile Include="Sdl2\SixtyFour\LPUtf8StrMarshaler.cs" />
+ <Compile Include="Sdl2\SixtyFour\SDL2.cs" />
+ <Compile Include="Sdl2\SixtyFour\SDL2_image.cs" />
+ <Compile Include="Sdl2\SixtyFour\SDL2_mixer.cs" />
+ <Compile Include="Sdl2\SixtyFour\SDL2_ttf.cs" />
+ <Compile Include="Sdl2\ThirtyTwo\LPUtf8StrMarshaler.cs" />
+ <Compile Include="Sdl2\ThirtyTwo\SDL2.cs" />
+ <Compile Include="Sdl2\ThirtyTwo\SDL2_image.cs" />
+ <Compile Include="Sdl2\ThirtyTwo\SDL2_mixer.cs" />
+ <Compile Include="Sdl2\ThirtyTwo\SDL2_ttf.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="AgateLib.AgateSDL.dll.config" />
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="lib64\Readme-SDL.txt">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\AgateLib\AgateLib.csproj">
+ <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
+ <Name>AgateLib</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="lib32\libFLAC-8.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\libmikmod-2.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\libmodplug-1.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\libogg-0.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\libvorbis-0.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\libvorbisfile-3.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\LICENSE.FLAC.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\LICENSE.mikmod.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\LICENSE.modplug.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\LICENSE.ogg-vorbis.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\LICENSE.smpeg.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\README-SDL.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\README.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\SDL2.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\SDL2_mixer.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib32\smpeg2.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\libFLAC-8.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\libmikmod-2.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\libmodplug-1.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\libogg-0.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\libvorbis-0.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\libvorbisfile-3.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\LICENSE.FLAC.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\LICENSE.mikmod.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\LICENSE.modplug.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\LICENSE.ogg-vorbis.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\LICENSE.smpeg.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\README.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\SDL2.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\SDL2_mixer.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="lib64\smpeg2.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ <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.AgateSDL/AgateLib.AgateSDL.dll.config (from rev 1433, trunk/AgateLib.SDL/AgateLib.SDL.dll.config)
===================================================================
--- trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.dll.config (rev 0)
+++ trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.dll.config 2014-08-03 17:32:32 UTC (rev 1434)
@@ -0,0 +1,6 @@
+<configuration>
+ <dllmap os="linux" dll="SDL.dll" target="libSDL-1.2.so.0"/>
+ <dllmap os="linux" dll="SDL_mixer.dll" target="libSDL_mixer-1.2.so.0"/>
+ <dllmap os="osx" dll="SDL.dll" target="SDL.framework/SDL"/>
+ <dllmap os="osx" dll="SDL_mixer.dll" target="SDL_mixer.framework/SDL_mixer"/>
+</configuration>
Deleted: trunk/AgateLib.AgateSDL/AgateLib.SDL.csproj
===================================================================
--- trunk/AgateLib.SDL/AgateLib.SDL.csproj 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib.AgateSDL/AgateLib.SDL.csproj 2014-08-03 17:32:32 UTC (rev 1434)
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>AgateLib.SDL</RootNamespace>
- <AssemblyName>AgateLib.SDL</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </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>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </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>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <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="Audio\SDL_Audio.cs" />
- <Compile Include="Audio\SDL_Music.cs" />
- <Compile Include="Audio\SDL_SoundBuffer.cs" />
- <Compile Include="Audio\SDL_SoundBufferSession.cs" />
- <Compile Include="Input\SDL_Input.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Sdl2\ISDL.cs" />
- <Compile Include="Sdl2\ISDLMixer.cs" />
- <Compile Include="Sdl2\SDL32.cs" />
- <Compile Include="Sdl2\SDL64.cs" />
- <Compile Include="Sdl2\SDLConstants.cs" />
- <Compile Include="Sdl2\SdlFactory.cs" />
- <Compile Include="Sdl2\SixtyFour\LPUtf8StrMarshaler.cs" />
- <Compile Include="Sdl2\SixtyFour\SDL2.cs" />
- <Compile Include="Sdl2\SixtyFour\SDL2_image.cs" />
- <Compile Include="Sdl2\SixtyFour\SDL2_mixer.cs" />
- <Compile Include="Sdl2\SixtyFour\SDL2_ttf.cs" />
- <Compile Include="Sdl2\ThirtyTwo\LPUtf8StrMarshaler.cs" />
- <Compile Include="Sdl2\ThirtyTwo\SDL2.cs" />
- <Compile Include="Sdl2\ThirtyTwo\SDL2_image.cs" />
- <Compile Include="Sdl2\ThirtyTwo\SDL2_mixer.cs" />
- <Compile Include="Sdl2\ThirtyTwo\SDL2_ttf.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="AgateLib.SDL.dll.config">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup>
- <None Include="lib64\Readme-SDL.txt">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\AgateLib\AgateLib.csproj">
- <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project>
- <Name>AgateLib</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Content Include="lib32\libFLAC-8.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\libmikmod-2.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\libmodplug-1.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\libogg-0.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\libvorbis-0.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\libvorbisfile-3.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\LICENSE.FLAC.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\LICENSE.mikmod.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\LICENSE.modplug.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\LICENSE.ogg-vorbis.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\LICENSE.smpeg.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\README-SDL.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\README.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\SDL2.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\SDL2_mixer.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib32\smpeg2.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\libFLAC-8.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\libmikmod-2.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\libmodplug-1.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\libogg-0.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\libvorbis-0.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\libvorbisfile-3.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\LICENSE.FLAC.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\LICENSE.mikmod.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\LICENSE.modplug.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\LICENSE.ogg-vorbis.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\LICENSE.smpeg.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\README.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\SDL2.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\SDL2_mixer.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="lib64\smpeg2.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
- <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
Deleted: trunk/AgateLib.AgateSDL/AgateLib.SDL.dll.config
===================================================================
--- trunk/AgateLib.SDL/AgateLib.SDL.dll.config 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib.AgateSDL/AgateLib.SDL.dll.config 2014-08-03 17:32:32 UTC (rev 1434)
@@ -1,6 +0,0 @@
-<configuration>
- <dllmap os="linux" dll="SDL.dll" target="libSDL-1.2.so.0"/>
- <dllmap os="linux" dll="SDL_mixer.dll" target="libSDL_mixer-1.2.so.0"/>
- <dllmap os="osx" dll="SDL.dll" target="SDL.framework/SDL"/>
- <dllmap os="osx" dll="SDL_mixer.dll" target="SDL_mixer.framework/SDL_mixer"/>
-</configuration>
Modified: trunk/AgateLib.AgateSDL/Audio/SDL_Audio.cs
===================================================================
--- trunk/AgateLib.SDL/Audio/SDL_Audio.cs 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib.AgateSDL/Audio/SDL_Audio.cs 2014-08-03 17:32:32 UTC (rev 1434)
@@ -23,15 +23,15 @@
using AgateLib;
using AgateLib.AudioLib.ImplementationBase;
using SDL2;
-using AgateLib.SDL.Sdl2;
+using AgateLib.AgateSDL.Sdl2;
-namespace AgateLib.SDL.Audio
+namespace AgateLib.AgateSDL.Audio
{
public class SDL_Audio : AudioImpl
{
List<string> tempfiles = new List<string>();
Dictionary<int, SDL_SoundBufferSession> mChannels = new Dictionary<int, SDL_SoundBufferSession>();
- Func<int> mChannelFinishedDelegate;
+ Action<int> mChannelFinishedDelegate;
ISDL sdl;
public SDL_Audio()
@@ -117,7 +117,7 @@
}
if (sdl.Mixer.Mix_OpenAudio(
- sdl.Mixer.MIX_DEFAULT_FREQUENCY, SDLConstants.AUDIO_S16, 2, 512) != 0)
+ SDLConstants.MIX_DEFAULT_FREQUENCY, SDLConstants.AUDIO_S16, 2, 512) != 0)
{
throw new AgateLib.AgateException("Failed to initialize SDL_mixer.");
}
Modified: trunk/AgateLib.AgateSDL/Audio/SDL_Music.cs
===================================================================
--- trunk/AgateLib.SDL/Audio/SDL_Music.cs 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib.AgateSDL/Audio/SDL_Music.cs 2014-08-03 17:32:32 UTC (rev 1434)
@@ -23,11 +23,13 @@
using AgateLib;
using AgateLib.AudioLib.ImplementationBase;
using SDL2;
+using AgateLib.AgateSDL.Sdl2;
-namespace AgateLib.SDL.Audio
+namespace AgateLib.AgateSDL.Audio
{
public class SDL_Music : MusicImpl
{
+ ISDL sdl;
SDL_Audio audio;
IntPtr music;
string tempfile;
@@ -47,6 +49,8 @@
public SDL_Music(SDL_Audio audio, string filename)
{
+ sdl = SdlFactory.CreateSDL();
+
this.audio = audio;
LoadFromFile(filename);
@@ -65,7 +69,7 @@
private void Dispose(bool disposing)
{
- SDL_mixer.Mix_FreeMusic(music);
+ sdl.Mixer.Mix_FreeMusic(music);
//if (string.IsNullOrEmpty(tempfile) == false)
//{
@@ -76,7 +80,7 @@
private void LoadFromFile(string file)
{
- music = SDL_mixer.Mix_LoadMUS(file);
+ music = sdl.Mixer.Mix_LoadMUS(file);
if (music == IntPtr.Zero)
throw new AgateException("Could not load music file.");
@@ -86,10 +90,10 @@
{
get
{
- if (SDL_mixer.Mix_PlayingMusic() == 0)
+ if (sdl.Mixer.Mix_PlayingMusic() == 0)
return false;
- if (SDL_mixer.Mix_PausedMusic() != 0)
+ if (sdl.Mixer.Mix_PausedMusic() != 0)
return false;
return true;
@@ -98,7 +102,7 @@
protected override void OnSetLoop(bool value)
{
- SDL_mixer.Mix_PlayMusic(music, IsLooping ? -1 : 1);
+ sdl.Mixer.Mix_PlayMusic(music, IsLooping ? -1 : 1);
}
public override double Pan
@@ -115,13 +119,13 @@
public override void Play()
{
- SDL_mixer.Mix_PlayMusic(music, IsLooping ? -1 : 1);
- mVolume = SDL_mixer.Mix_VolumeMusic(-1) / (double)SDL_mixer.MIX_MAX_VOLUME;
+ sdl.Mixer.Mix_PlayMusic(music, IsLooping ? -1 : 1);
+ mVolume = sdl.Mixer.Mix_VolumeMusic(-1) / (double)SDLConstants.MIX_MAX_VOLUME;
}
public override void Stop()
{
- SDL_mixer.Mix_PauseMusic();
+ sdl.Mixer.Mix_PauseMusic();
}
public override double Volume
@@ -136,9 +140,9 @@
if (mVolume < 0) mVolume = 0;
if (mVolume > 1) mVolume = 1;
- int v = (int)(mVolume * SDL_mixer.MIX_MAX_VOLUME);
+ int v = (int)(mVolume * SDLConstants.MIX_MAX_VOLUME);
- SDL_mixer.Mix_VolumeMusic(v);
+ sdl.Mixer.Mix_VolumeMusic(v);
}
}
}
Modified: trunk/AgateLib.AgateSDL/Audio/SDL_SoundBuffer.cs
===================================================================
--- trunk/AgateLib.SDL/Audio/SDL_SoundBuffer.cs 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib.AgateSDL/Audio/SDL_SoundBuffer.cs 2014-08-03 17:32:32 UTC (rev 1434)
@@ -23,12 +23,13 @@
using System.Text;
using AgateLib;
using AgateLib.AudioLib.ImplementationBase;
-using SDL2;
+using AgateLib.AgateSDL.Sdl2;
-namespace AgateLib.SDL.Audio
+namespace AgateLib.AgateSDL.Audio
{
class SDL_SoundBuffer : SoundBufferImpl
{
+ ISDL sdl;
IntPtr sound;
string tempfile;
double mVolume = 1.0;
@@ -48,6 +49,8 @@
}
public SDL_SoundBuffer(string filename)
{
+ sdl = SdlFactory.CreateSDL();
+
this.filename = filename;
LoadFromFile(filename);
}
@@ -73,7 +76,7 @@
private void Dispose(bool disposing)
{
- SDL_mixer.Mix_FreeChunk(sound);
+ sdl.Mixer.Mix_FreeChunk(sound);
//if (string.IsNullOrEmpty(tempfile) == false)
//{
// File.Delete(tempfile);
@@ -82,7 +85,7 @@
}
private void LoadFromFile(string file)
{
- sound = SDL_mixer.Mix_LoadWAV(file);
+ sound = sdl.Mixer.Mix_LoadWAV(file);
if (sound == IntPtr.Zero)
throw new AgateException("Could not load audio file.");
Modified: trunk/AgateLib.AgateSDL/Audio/SDL_SoundBufferSession.cs
===================================================================
--- trunk/AgateLib.SDL/Audio/SDL_SoundBufferSession.cs 2014-08-03 00:09:08 UTC (rev 1433)
+++ trunk/AgateLib.AgateSDL/Audio/SDL_SoundBufferSession.cs 2014-08-03 17:32:32 UTC (rev 1434)
@@ -24,11 +24,13 @@
using AgateLib;
using AgateLib.AudioLib.ImplementationBase;
using SDL2;
+using AgateLib.AgateSDL.Sdl2;
-namespace AgateLib.SDL.Audio
+namespace AgateLib.AgateSDL.Audio
{
class SDL_SoundBufferSession : SoundBufferSessionImpl
{
+ ISDL sdl;
IntPtr sound;
int channel = -1;
double volume;
@@ -42,6 +44,8 @@
public SDL_SoundBufferSession(SDL_SoundBuffer buffer)
{
+ sdl = SdlFactory.CreateSDL();
+
this.buffer = buffer;
loop = buffer.Loop;
@@ -49,6 +53,8 @@
volume = buffer.Volume;
audio = (SDL_Audio)AgateLib.AudioLib.Audio.Impl;
+
+ Debug.Print("Playing " + buffer.Filename);
}
public override void Dispose()
{
@@ -67,7 +73,7 @@
if (channel == -1)
return false;
- return SDL_mixer.Mix_Playing(channel) != 0;
+ return sdl.Mixer.Mix_Playing(channel) != 0;
}
}
@@ -100,21 +106,21 @@
byte leftVol = (byte)(pan <= 0 ? 255 : (int)((1.0 - pan) * 255));
byte rightVol = (byte)(pan >= 0 ? 255 : (int)((pan + 1.0) * 255));
- SDL_mixer.Mix_SetPanning(channel, leftVol, rightVol);
+ sdl.Mixer.Mix_SetPanning(channel, leftVol, rightVol);
}
public override void Play()
{
if (IsPlaying == false)
{
- channel = SDL_mixer.Mix_PlayChannel(-1, sound, LoopCount);
+ channel = sdl.Mi...
[truncated message content] |
|
From: <ka...@us...> - 2014-08-04 05:33:07
|
Revision: 1436
http://sourceforge.net/p/agate/code/1436
Author: kanato
Date: 2014-08-04 05:33:00 +0000 (Mon, 04 Aug 2014)
Log Message:
-----------
Add subdirectory provider.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/IO/FileProvider.cs
trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj
trunk/AgateLib.AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/AgateLib.GL/AgateLib.GL.csproj
trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
Added Paths:
-----------
trunk/AgateLib/IO/SubDirectoryProvider.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2014-08-04 05:09:51 UTC (rev 1435)
+++ trunk/AgateLib/AgateLib.csproj 2014-08-04 05:33:00 UTC (rev 1436)
@@ -52,6 +52,24 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
</ItemGroup>
@@ -132,6 +150,7 @@
<Compile Include="IO\IPath.cs" />
<Compile Include="IO\IReadWriteFileProvider.cs" />
<Compile Include="IO\IWriteFileProvider.cs" />
+ <Compile Include="IO\SubDirectoryProvider.cs" />
<Compile Include="Platform\IStopWatch.cs" />
<Compile Include="Platform\PlatformInfo.cs" />
<Compile Include="Platform\PlatformType.cs" />
Modified: trunk/AgateLib/IO/FileProvider.cs
===================================================================
--- trunk/AgateLib/IO/FileProvider.cs 2014-08-04 05:09:51 UTC (rev 1435)
+++ trunk/AgateLib/IO/FileProvider.cs 2014-08-04 05:33:00 UTC (rev 1436)
@@ -42,5 +42,9 @@
public static IReadWriteFileProvider UserFiles { get; private set; }
+ public static IReadFileProvider NewProviderFromSubdirectory(IReadFileProvider parent, string subdir)
+ {
+ return new SubdirectoryProvider(parent, subdir);
+ }
}
}
Added: trunk/AgateLib/IO/SubDirectoryProvider.cs
===================================================================
--- trunk/AgateLib/IO/SubDirectoryProvider.cs (rev 0)
+++ trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-04 05:33:00 UTC (rev 1436)
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.IO
+{
+ public class SubdirectoryProvider : IReadFileProvider
+ {
+ private IReadFileProvider parent;
+ private string subdir;
+
+ public SubdirectoryProvider(IReadFileProvider parent, string subdir)
+ {
+ // TODO: Complete member initialization
+ this.parent = parent;
+ this.subdir = subdir.Replace('\\', '/');
+
+ if (this.subdir.EndsWith("/") == false)
+ this.subdir += "/";
+ }
+
+ public System.IO.Stream OpenRead(string filename)
+ {
+ return parent.OpenRead(subdir + filename);
+ }
+
+ public bool FileExists(string filename)
+ {
+ return parent.FileExists(subdir + filename);
+ }
+
+ public IEnumerable<string> GetAllFiles()
+ {
+ return parent.GetAllFiles(subdir + "**");
+ }
+
+ public IEnumerable<string> GetAllFiles(string searchPattern)
+ {
+ return parent.GetAllFiles(subdir + searchPattern);
+ }
+
+ public string ReadAllText(string filename)
+ {
+ return parent.ReadAllText(subdir + filename);
+ }
+
+ public bool IsRealFile(string filename)
+ {
+ return parent.IsRealFile(subdir + filename);
+ }
+
+ public string ResolveFile(string filename)
+ {
+ return parent.ResolveFile(subdir + filename);
+ }
+ }
+}
Modified: trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj
===================================================================
--- trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj 2014-08-04 05:09:51 UTC (rev 1435)
+++ trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj 2014-08-04 05:33:00 UTC (rev 1436)
@@ -31,6 +31,46 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <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>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Modified: trunk/AgateLib.AgateSDL/Audio/SDL_SoundBuffer.cs
===================================================================
--- trunk/AgateLib.AgateSDL/Audio/SDL_SoundBuffer.cs 2014-08-04 05:09:51 UTC (rev 1435)
+++ trunk/AgateLib.AgateSDL/Audio/SDL_SoundBuffer.cs 2014-08-04 05:33:00 UTC (rev 1436)
@@ -51,7 +51,7 @@
{
sdl = SdlFactory.CreateSDL();
- this.filename = filename;
+ this.filename = AgateLib.IO.FileProvider.SoundAssets.ResolveFile(filename);
LoadFromFile(filename);
}
Modified: trunk/AgateLib.GL/AgateLib.GL.csproj
===================================================================
--- trunk/AgateLib.GL/AgateLib.GL.csproj 2014-08-04 05:09:51 UTC (rev 1435)
+++ trunk/AgateLib.GL/AgateLib.GL.csproj 2014-08-04 05:33:00 UTC (rev 1436)
@@ -52,6 +52,26 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Modified: trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj
===================================================================
--- trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-04 05:09:51 UTC (rev 1435)
+++ trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-04 05:33:00 UTC (rev 1436)
@@ -52,6 +52,26 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|