Killed EntityEditor, GlyphSizeTest, Balltest, DecalShaderTest, MapEditor, and ViewOcclusionTest

This commit is contained in:
volundr-
2015-01-20 14:13:41 -05:00
parent 4ad27b10ec
commit 33958838d7
68 changed files with 0 additions and 5067 deletions
-8
View File
@@ -1,8 +0,0 @@
<Application x:Class="EntityEditor.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
-16
View File
@@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace EntityEditor
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
-118
View File
@@ -1,118 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F5690746-73FD-46E5-8213-56F5853A843C}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EntityEditor</RootNamespace>
<AssemblyName>EntityEditor</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugMessaging|x86'">
<OutputPath>bin\x86\DebugMessaging\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\EntityEditor.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</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>
-8
View File
@@ -1,8 +0,0 @@
<Window x:Class="EntityEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>
-27
View File
@@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace EntityEditor
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}
-55
View File
@@ -1,55 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 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("EntityEditor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EntityEditor")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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")]
-71
View File
@@ -1,71 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace EntityEditor.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EntityEditor.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
-117
View File
@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-30
View File
@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace EntityEditor.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
Binary file not shown.
-149
View File
@@ -1,149 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{78D63370-CB64-4B1E-A522-EE06F80CE722}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GorgonLibrary.Example</RootNamespace>
<AssemblyName>Initializing</AssemblyName>
<ApplicationIcon>GorIcon.ico</ApplicationIcon>
<StartupObject>GorgonLibrary.Example.Program</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<SignAssembly>false</SignAssembly>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</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>
<CodeAnalysisLogFile>..\Bin\Debug\Initializing.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisLogFile>..\Bin\Release\Initializing.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<ItemGroup>
<Reference Include="DialogHelper">
<HintPath>..\References\Release\DialogHelper.dll</HintPath>
</Reference>
<Reference Include="Gorgon">
<HintPath>..\References\Release\Gorgon.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainForm.resx">
<SubType>Designer</SubType>
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="GorIcon.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="CALIBRI.TTF">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

-79
View File
@@ -1,79 +0,0 @@
#region MIT.
//
// Examples.
// Copyright (C) 2008 Michael Winsor
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// Created: Thursday, October 02, 2008 10:46:02 PM
//
#endregion
namespace GorgonLibrary.Example
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.SuspendLayout();
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(312, 213);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Example - Initialization";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown);
this.Load += new System.EventHandler(this.MainForm_Load);
this.ResumeLayout(false);
}
#endregion
}
}
-212
View File
@@ -1,212 +0,0 @@
#region MIT.
//
// Examples.
// Copyright (C) 2008 Michael Winsor
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// Created: Thursday, October 02, 2008 10:46:02 PM
//
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Security.AccessControl;
using System.Text;
using System.Windows.Forms;
using Dialogs;
using GorgonLibrary;
using GorgonLibrary.Graphics;
using Font = GorgonLibrary.Graphics.Font;
namespace GorgonLibrary.Example
{
/// <summary>
/// Main application form.
/// </summary>
public partial class MainForm
: Form
{
private TextSprite txtspr;
private Font font;
#region Methods.
/// <summary>
/// Handles the KeyDown event of the MainForm control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Windows.Forms.KeyEventArgs"/> instance containing the event data.</param>
private void MainForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
Close();
if (e.KeyCode == Keys.S)
Gorgon.FrameStatsVisible = !Gorgon.FrameStatsVisible;
if (e.KeyCode == Keys.Z)
{
txtspr.Text = "Foobar!................asdffdeas";
TextStatus();
}
if (e.KeyCode == Keys.X)
{
txtspr.Text = "Test";
TextStatus();
}
}
/// <summary>
/// Handles the OnFrameBegin event of the Screen control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="FrameEventArgs"/> instance containing the event data.</param>
private void Screen_OnFrameBegin(object sender, FrameEventArgs e)
{
// Clear the screen.
Gorgon.Screen.Clear();
txtspr.Draw();
Gorgon.Screen.Rectangle(0,0, txtspr.Size.X, txtspr.Size.Y, Color.Brown);
}
/// <summary>
/// Handles the FormClosing event of the MainForm control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Windows.Forms.FormClosingEventArgs"/> instance containing the event data.</param>
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
// Perform clean up.
Gorgon.Terminate();
}
/// <summary>
/// Handles the Load event of the MainForm control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
private void MainForm_Load(object sender, EventArgs e)
{
try
{
// Initialize the library.
Gorgon.Initialize();
// Display the logo and frame stats.
Gorgon.LogoVisible = false;
Gorgon.FrameStatsVisible = false;
// Set the video mode to match the form client area.
Gorgon.SetMode(this);
// Assign rendering event handler.
Gorgon.Idle += new FrameEventHandler(Screen_OnFrameBegin);
// Set the clear color to something ugly.
Gorgon.Screen.BackgroundColor = Color.FromArgb(250, 245, 220);
LoadFont();
txtspr = new TextSprite("txtspr", "Test", font, Color.Black);
txtspr.SetPosition(1.0f,1.0f);
TextStatus();
RunMeasureLineTests();
// Begin execution.
Gorgon.Go();
}
catch (Exception ex)
{
UI.ErrorBox(this, "An unhandled error occured during execution, the program will now close.", ex.Message + "\n\n" + ex.StackTrace);
Application.Exit();
}
}
#endregion
private void TextStatus()
{
var FontSize = txtspr.Size;
Console.WriteLine("Size Method: Width: " + FontSize.X + "px Height: " + FontSize.Y + "px");
var s = txtspr.MeasureLine(txtspr.Text);
Console.WriteLine("MeasureLine Method: Width: " + s + "px");
s = txtspr.MeasureLine("Foo Bar is a Bar Foo... ! I hate Foo Bars!");
Console.WriteLine("MeasureLine Method: Width: " + s + "px");
}
private void RunMeasureLineTests()
{
Console.WriteLine("Running Tests...");
TestMeasureLine("");
TestMeasureLine(".");
TestMeasureLine("..");
TestMeasureLine("...");
TestMeasureLine("....");
TestMeasureLine(".....");
TestMeasureLine("......");
TestMeasureLine(".......");
TestMeasureLine("........");
TestMeasureLine(".........");
TestMeasureLine("..........");
TestMeasureLine("...........");
TestMeasureLine("!");
TestMeasureLine("!!");
TestMeasureLine("!!!");
TestMeasureLine("!!!!");
TestMeasureLine("a.");
TestMeasureLine("a!");
TestMeasureLine("a");
Console.WriteLine("Tests Complete.");
}
private void TestMeasureLine(string line)
{
var str = txtspr.Text;
var w = txtspr.MeasureLine(line);
txtspr.Text = line;
var s = txtspr.Size;
Console.WriteLine("SWidth: " + s.X + "px MWidth: " + w + "px Line: '" + line + "'");
txtspr.Text = str;
}
private void LoadFont()
{
FileStream fs = new FileStream("CALIBRI.TTF", FileMode.Open);
Font loadedFont = Graphics.Font.FromStream("calibri", fs, (int)fs.Length, 10, false);
fs.Close();
font = loadedFont;
}
#region Constructor/Destructor.
/// <summary>
/// Constructor.
/// </summary>
public MainForm()
{
InitializeComponent();
}
#endregion
}
}
-418
View File
@@ -1,418 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAQAEBAAAAEAIABoBAAARgAAABgYAAABACAAiAkAAK4EAAAgIAAAAQAgAKgQAAA2DgAAMDAAAAEA
IACoJQAA3h4AACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAD///8A////ADA7
LgAwOy4ALzotACw3KgBEV05bm7azpsHU1afG2dmFXXhpCio+MAAmNDAAJzUxAP///wD///8A////AP//
/wAzSToAM0k6ADhQQQAjLyhFKz0y9o6tqP+yysv/qsPD/1FsXZ4sQTMKJjQwACc1MQD///8A////AP//
/wD///8ANVBBADZSQgA4VUUTHjAmzCo+M/9lf37/l7a2/5aytv9LZVX/ITUmmiUzMAUnNTEA////AP//
/wD///8A////ADZQQQA2UUELL0o2oCEyJP8yRED/jqin/7zU0/9sioX/Ijcu/xksG/4wQDVKJzQuAP//
/wD///8A////AP///wBKZFkALkA2Xh40IP82TUb/e5qe/2mDhv9/lJn/haCX/z9ZTP8lPin/IC4iqio1
LwP///8A////AP///wD///8AV3NpAEReUaESIRP/QFtQ/4impf8+U1b/RVti/6jAxP+Rrq7/HTIk/xck
GNk7TD8b////AP///wD///8A////ADREPQAkNCykHzEg/0BcUP+Ao6X/aIeG/4Sio/+rxsj/h6ir/yk+
Of8iOCX1P1JEVv///wD///8A////AP///wA9UT8RDx0Svg8fEf87V0n/WXp5/0xlZv+Ao6T/lbi7/3aT
lP8gNin/JT8p/Sw+M3H///8A////AP///wD///8AOlA/ahstHfwjPCf/KT8u/yg5Mv9JX13/Z4aF/01m
X/82S0X/HTYh/ydCK+s5V0E4////AP///wD///8A////ADBBM3UdMSH/HDIg/ypDM/9MZGX/kKyt/3uX
mf9WbnD/N0tG/ytIMP8iNyXuOU48QP///wD///8A////AP///wAwRDpOFyca9BsxHv8wTTn/gaOj/6zJ
zP+1z9H/lrO3/zdPRf8pRS3/HS4gmT9OQSn///8A////AP///wD///8AOFBJIiQ3KeEqRS7/K0Qw/2yL
gP+0z9L/v9jb/2qCf/8xTTf/Gy8e/wsXDlk1RDcA////AP///wD///8A////ACw3MAArPjCmKEIt/yQ7
KP88VUP/WnNr/0NVUv8jOij/Lkky/yE4JuAgOScoIzwqAP///wD///8A////AP///wBCST8AOkk/NB4x
I+gcLB//LUYy/xIiFP8AAAD/Fysa/ydALew1UDlWM003ADJMNgD///8A////AP///wD///8AN0I5ADE/
OQAlNCxJLUMx6CtGMP8fNCT/Giod/x80I/8wTDegQWFGAEJgRgBCYEYA////AP///wD///8A////ACY2
MAAlMy4ANUc9AElgT00sPy+9OVM/6y5HM+46UEDTTWZXS1F2WABQdFgAUHRYAP///wD///8A/B////gP
///wB///4Af//+AD///gA///4AP//8AD///AA///wAP//8AD///AB///4Af//+AP///wH///+B///ygA
AAAYAAAAMAAAAAEAIAAAAAAAYAkAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wBNbmcATW5nAE1u
ZwBPcWoAQFpTACw5LAA4ST8VhqCdda/GxYHE1tZ+zt7egs7f30lzjIEAOVVBACw+NQAfLi4AIDAvACAw
LwD///8A////AP///wD///8A////AP///wBNbmcATW5nAE1uZwBPcWoAQFpTADA8LxgeKh+sXXht/5Kw
rf+mvr7/uM7P/7LKyetngHVUOlZDACw+NQAfLi4AIDAvACAwLwD///8A////AP///wD///8A////AP//
/wBOcGkATnBpAE5waQBQcmwAQ11WABwkHn8UIRf/Z4R4/6TAv/+wyMf/scnL/6C6u/9QaV7uN1M9VC5A
NwAfLi4AIDAvACAwLwD///8A////AP///wD///8A////AP///wBHZl4AR2ZeAEdnXgBMbWMAOFJKQxQh
GewwSTn/WnV0/3WTkP+Zt7f/n7y+/6O9v/9WbmH/M1A26io7MlMeLS0AHS4tAB4uLQD///8A////AP//
/wD///8A////AP///wAzSz0AM0s9ADROPgA5V0MVHC8iuik+Lf8VIhf/Kjs4/2J7eP+TsbH/iqmq/3aV
mf9OZV//HTMf/xMhGOEnNTEiMD86AC8+OQD///8A////AP///wD///8A////AP///wA0TT8ANEw/ADVP
QBc1Uj2rJzsp/yY3Kv8oODf/cY6L/7fR0P/Q4+P/pby4/1BvZP8sQD7/Dx0S/yM6Jv88TT6AQE5EAD5M
QwD///8A////AP///wD///8A////AP///wArOzMALTw0ACEuJnIpQi3/JTso/zdMSv95mZ3/kbK0/3WT
lv+QqKz/pr69/2eGdP8rRDT/JDwq/y9LM/8cKx/ZKDUuGS89NQD///8A////AP///wD///8A////AP//
/wBGX1UASWNYDyQ0K7QVKBf/HzQk/0ZiXf+EpKX/VGpr/yAvNP80R1H/aX+E/7HIyP+RsKz/PFJI/x0z
Hv8PGhD0LTkxUURTSQD///8A////AP///wD///8A////AP///wBaeGwAXnxwJUlmVeQTIBX/Fyga/0pp
XP+Ytrf/bIeF/0NYXf9LYmn/b4aK/7PMzv+iwcX/UWpk/xElE/8PGhH/O1E9gEBTRQD///8A////AP//
/wD///8A////AP///wA1Rz8ALTw4Iy1BNuAvRDL/GSga/05uZP+MrbL/gaCe/2iIiP99np//psDB/6/K
y/+PsbT/X399/xosIv8WJhj/OlM+rj5OQxz///8A////AP///wD///8A////AP///wBBVEMAGSQdHQQK
Bt4cLiD/ITcl/0prXv9ulJf/UW1u/1t3dv98nZ//i6mp/5y6vP+Qs7X/TWZo/x0uJf8uSzP/Mkc33jxJ
P07///8A////AP///wD///8A////AP///wBHW0gCLUYyWw8fEvQPHhP/EiIU/0NhUv9tkJD/OE9Q/1dx
cv+KrK7/ep+h/5m8v/+SsLP/LkQ7/yE6Jf8iOyb/ITYn0CY5MD////8A////AP///wD///8A////AP//
/wA3Szs/KD0s0hAeEv8mQir/KEMt/yo9Lv87T0X/HS0o/09mZf92mJr/Um5n/2N+eP9LYWH/HTMk/x41
If8kPij/NVI7rT1aRhn///8A////AP///wD///8A////AP///wBFXUxLK0Ew2xsuHv8dMiH/MU42/x0w
Iv8qPTf/NEdD/3eSkP90k5X/NUtD/zpMQv8rPTr/HTMh/y9MNP8pRS3/ITYjikhoTwP///8A////AP//
/wD///8A////AP///wArOSxKIzUn2h80I/8WKRr/JD0p/zFLPf9QanD/fpue/6jGx/+WsrX/XXmA/3KN
lP9Ta2z/HjMj/zpbQf8eMSH/IzEktEJWRCP///8A////AP///wD///8A////AP///wAyQzsqHzAlvw4d
Ef8bMB7/HTQh/ztaRv91mJj/m7q+/6fDxf+vysv/o7/A/46tsP85Tkz/KEEs/zNROP8XKBrFL0EzckNS
RCj///8A////AP///wD///8A////AP///wBDYFcOKDsuoR0vIP8rRjD/Ijkm/zFNOP9rjoX/nbu+/63I
yf+2zs//vdfX/3yWmP8uRTj/NlQ6/yI5Jv8NGQ57KzotAEVVRgD///8A////AP///wD///8A////AP//
/wAuQD4AJTMvdSxDMv8oQy3/Mk84/yk+Lv9YdmT/kLCu/7vU1//E293/lq+x/z9WUP84VD7/LUkx/w8d
Ev8LFg2HEh4UADhIOQD///8A////AP///wD///8A////AP///wApNzMAIS4oLSU6KO0iOSj/Izwo/ypB
Lv8+Wkb/W3pq/3CKh/9mfH7/M0o+/ypEL/8yTDb/J0Er/xYpG+4lPyxKJD8rACdBLQD///8A////AP//
/wD///8A////AP///wA8RjwAPkc9DDdLPKMxTDb/JDko/x8yI/8fMSP/NE05/xsuIP8DCQb/FSgX/xgs
HP8pQy7/NFA6/y9KNH4pRzAAKUYwAClGMAD///8A////AP///wD///8A////AP///wBJUksAS1NMADRF
PyEYJx7VFiQY/yIzJv8zTjn/Lkkz/wwYDv8AAAD/Dx0R/yI7J/8lPCr3K0UypDpVPRMqRzEAKUYwAClG
MAD///8A////AP///wD///8A////AP///wBHUEkASVFKAC8+OgAjMiwvGykc1CE0JfkxTjf/Gi8f/xor
Hf8RHBP/EiAU/xgrHP8hOCXENVY8MTteQwA6XUIAOl1CADpdQgD///8A////AP///wD///8A////AP//
/wBHUEkASVFKAC8+OgAoNzEBSmBNRUZhTM0pQiz/LUMw/zlXQP8nQS3/OFQ8/y9JNP9EXEzBT3JWGUFs
SgBDbEwAQ2xMAENsTAD///8A////AP///wD///8A////AP///wBHUEkASVFKAC8+OgAmNS8AVWxZAEVX
TEYkNCiNOE094DtWQfImPCrtM0g48zxSQbhNXVlFWHZgAD9qSABCa0sAQmtLAEJrSwD///8A////AP//
/wD/gf///wD///8Af//+AD///AAf//gAH//4AA//8AAP//AAD//wAAf/8AAH/+AAB//gAAf/4AAH/+AA
B//gAAf/4AAf//AAH//wAB//8AA///gAP//8AH///AB///8A//8oAAAAIAAAAEAAAAABACAAAAAAAIAQ
AAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AEBQQABAUEAAQFBAAEBQQABAUEAAQFBAAEJS
QgAuOy0ALj82AIOdmDmPqadfwNTTW8PW1lvQ399cz9/fXM7e3h99lowAOlRDADtWQgAqOjIAHy4vACAw
MAAgMDAAIDAwAP///wD///8A////AP///wD///8A////AP///wD///8AQFBAAEBQQABAUEAAQFBAAEBQ
QABAUEAAQlJCADA9MAAhMCZJWnBn4nmWkP+ivbz/pr29/8XX1/+2zc3/xtnYt36XjB46VEMAO1ZCACo6
MgAfLi8AIDAwACAwMAAgMDAA////AP///wD///8A////AP///wD///8A////AP///wA/Tj4AP04+AD9O
PgA/Tj4AP04+AD9OPgBDU0IANEEzSAsSC+I0Sjr/d5aN/5SwsP+Rra3/wtXV/5+8vv+qwsL/X3pxtjxW
Rh87VkMAKjoyAB8uLwAgMDAAIDAwACAwMAD///8A////AP///wD///8A////AP///wD///8A////AEVg
VgBFYFYARWBWAEVgVgBFYFYARmFXADNFPQcWHBivEh0U/0RfUf+PqqX/qsTE/6vFw//B1dX/nLm7/6i/
v/9Vb2b/L0k1tjxZRB4rOzMAHy4uACAwMAAgMDAAIDAwAP///wD///8A////AP///wD///8A////AP//
/wD///8ASmxkAEpsZABKbGQASmtkAElrZABNbmcCKz85gA0WEfgwSjf/TWlk/3yamf+GpaH/oL2+/6/J
yv+bubv/rMTE/110av8wTTT/P1xFtig2MB8fLy8AIDAwACAwMAAgMDAA////AP///wD///8A////AP//
/wD///8A////AP///wA9UkoAPVJKAD1SSgA6VUkAQGFQADFLPSwXJx3mK0Ev/ylALf8lNjT/PlZT/0Vf
XP96m53/j7Cw/4Kjpf+Pra//X3Zw/yhCLP8nPSr/FiEdsSAwLwshMTEAITExACExMQD///8A////AP//
/wD///8A////AP///wD///8A////ADdGPgA3Rj4AN0Y+ADJKPAA9XkkfITgntBssHv80TDn/CQ8J/xci
Hv9YcGr/kqmn/6zExf+mwcD/d5WV/157fv9Ramn/GCkd/xovHv8PHBL1MDszTUFIQAA/Rz8AP0c/AP//
/wD///8A////AP///wD///8A////AP///wD///8APE1EADxNRAA9TUQANE0/IDlaRLcmPCv/MEUy/yMy
J/8rPDz/YYB+/5q5uf+/1tb/yt3c/8nb2v+CnZP/S2pb/zpSUP8OFxT/GCoa/ytEL/88UD6vPkxDCD1L
QwA9S0MA////AP///wD///8A////AP///wD///8A////AP///wAgKCQAICgkACEpJQAiLyiTL0o0/yE4
Jf8tRDH/NkpK/3CQlP+Wt7n/j7Cy/4CgoP+VsbP/tc3N/4qmnv9LbFX/JDwq/xcqHf8xTjf/MU82/x4v
IfgoNS5NKDUtACg1LQD///8A////AP///wD///8A////AP///wD///8A////ADdMQQA5T0MAL0A3Bw4U
ELIlPSj/GS0d/ytBNP9GYWP/fJyd/4SipP9LYmX/M0hO/0NYYf9vh4z/obm8/6O8t/9ykYf/Smdb/yA1
JP8mPin/ChML/xMcFm0oNS0AKTYuAP///wD///8A////AP///wD///8A////AP///wD///8AXoFzAF+D
dABcfXFQKj4y+BMlFf8RIRT/MUs4/0dkXv+EoqL/dZGS/x8rKf8mNDr/OUpV/zRGTP91i5D/utHS/6fF
x/95lJP/GSgd/yhEK/8SIBP/JS4n0z9ORBg+TUQA////AP///wD///8A////AP///wD///8A////AP//
/wBYcmUAWHJlAFdzZlxIZlL/Gise/wcPCf8rRjH/Smlg/5y4uv+RsK7/XHZ2/05mbf9Vbnb/YHd6/5qz
tf+zzM3/mLi6/3yamf8pPzH/EiUW/wcQCf8sPi/kSGNIGUZhRgD///8A////AP///wD///8A////AP//
/wD///8A////ADZGQAA2RkAANEZAWzBGOP87VT//Eh0U/yU7Kf9YenL/iaqu/5a0tP91lZL/b5CQ/3+h
ov+Ztrb/sMrK/63Hyf+RsrT/d5qb/0FfVf8WJhr/DRkP/zFMNfA9UUNNOktCDv///wD///8A////AP//
/wD///8A////AP///wD///8AFyAcABcgHQAYIh5ZCREN/ypALv8oPi3/Izcm/1h7cv9xlZn/c5SW/0tk
Yv9dfHz/dJaY/4KfoP+owsP/ob7A/4+wsv92mJv/PFJW/xwtJf8mPir/MUw3/zpKPaQ/TkE6////AP//
/wD///8A////AP///wD///8A////AP///wAVGxUAEhoTAAcOCFsFDQf/DhsQ/x0yI/8hOCX/UXRm/2uQ
kv9YeHr/PlVX/2yJiP+Kqqz/eJua/4ipqv+Ss7X/lba4/2qKif8ZJyL/JDkp/zRUO/8pQy7/MkE3pzZF
PDr///8A////AP///wD///8A////AP///wD///8A////AEVXRgE9V0IfIDomthQlFv8VJhn/CRUM/x0v
Hv9HZVj/cZOU/1Rycv8kNjb/ZYKD/46wsf92m5z/gqap/5u7vf+evb7/TGNh/xkvHv8tSjP/HDIg/xku
Hf8hNSqQIjctMP///wD///8A////AP///wD///8A////AP///wD///8AN0s5MzVLOJUdMSD/DxwR/yxK
MP8iPCb/KEAt/y9DNf9BVUv/P1dT/xEdGP9lf3//gaSn/1t6ev9oiIH/dpSU/2yHiP8kNS7/Iz4o/xww
H/8hOSX/L0w09TtXQ145VEEX////AP///wD///8A////AP///wD///8A////AP///wA0Sj06MUY5pxUm
Gf8PHBL/HTQh/zRUOv80Ujn/EyAU/x0sH/8rPTX/GSUf/3SPjP93mJr/Nk1F/y4+K/8qOiz/HzAu/xQl
Gv8jPCj/ITol/zFQNf8iPCbwP1xESkxsUw7///8A////AP///wD///8A////AP///wD///8A////AE5n
UzlCWkekIzon/yxGMP8ZLB3/GSsd/zRROf8cLiX/PVZX/0ljYv9feXf/mri4/4moq/9QbG//R2Bf/1tx
bf9SaGj/HDAk/ypFLv87XEL/K0Yw/xMiFeAiMyMaJzcnAP///wD///8A////AP///wD///8A////AP//
/wD///8AHigdOx8sIKgdMCH/GS0e/xktHf8aLx//MU43/zJMP/9NZmz/b4uQ/5a1uP+pxsf/or6//26L
kf9bdX3/epae/2aChP8YJh7/L0o1/zpaQf8eMSH/GScb/ztNPXpCUkMk////AP///wD///8A////AP//
/wD///8A////AP///wAyQDgiKjkxdRUjGPwPHxP/Fysb/x42I/8iOSb/RGNO/3GTk/+RsrT/n72//6bC
xP+wysv/qsXH/5Owsv+IqKv/RFtc/xstH/82VT3/MlA3/xYnGd8eMCKrPk5AbkFRQij///8A////AP//
/wD///8A////AP///wD///8A////AD9bUxo5U0hiFCIW9xcmGv8oPyv/IDcl/x81I/89Xkb/ZYqD/46v
s/+evL7/qMXG/6/Jyv+yzM3/sc3N/4ikpf8tQDz/Mkw2/zNROf8pRC7/FSIWox8yJABDVEQAR1ZGAP//
/wD///8A////AP///wD///8A////AP///wD///8AQFpRADhOQjEbKR3qLkYz/ytHMf8vSzT/JDso/zJL
OP9fgG//jq6t/6nFx/+zy8z/t8/Q/7/V1v+rxMb/U2ts/y9JOP86Vz7/Lkky/xYlGP8MFwykFCAUACs4
KwAuOy4A////AP///wD///8A////AP///wD///8A////AP///wAoNzYAKTg3FiMyLNIyTTj/Ijsn/zFQ
N/8zTjj/IjQn/1JvWv9zlIv/pMHC/7vT1f++1db/scnL/2V9fv8wRj3/QFtG/zBMNP8lPin/CBIK/w8a
EaoTGxMAEBgQABAYEAD///8A////AP///wD///8A////AP///wD///8A////ABkrJQAZKSQAFSMZbSpC
Lf8gNCX/GTAe/zdVPf8wSDT/Ql5L/1t8aP9kgXf/hJ+f/4Ganv9PZ2P/JTws/zVROv82UDr/LEgw/x4z
If8TJBf7JkEtdDFROAAwTzcAME83AP///wD///8A////AP///wD///8A////AP///wD///8AMj0xADI9
MQAxPDBOKz8v+TdUPf8fMyP/FCQY/xosHv8fNST/PVZD/0FdSf8jNyz/Ex0d/xUlGf8nQiv/HjIi/yI7
J/8tSDL/MUw2/yE5JY8pRjADMlI6ADFROQAxUTkA////AP///wD///8A////AP///wD///8A////AP//
/wBFTEQARUtDAEdQSQc7UkN/KkIv/i5GMv8vRjP/KT4u/yAwI/8jNib/LUgy/xAeEv8AAQD/DRoP/xIi
Ff8UJRj/LUkz/zVQPP8zUTnhO1U9NUBYQAA/WEAAP1hAAD9YQAD///8A////AP///wD///8A////AP//
/wD///8A////ACo4NQAqODUAKzo3ACo7NxoVIBvGDBgP+hMfFv8jNSf/N1Q+/zxaQv8mPyv/CBEK/wAA
AP8GDgf/IDck/ytIMf8lOyn1Ijkozi9LNkk+Vz8AQVdAAEBXQABAV0AAQFdAAP///wD///8A////AP//
/wD///8A////AP///wD///8AHi8vAB4vLwAeLy8AHi4vACEwLRklNievCREL/x8wI/4yTzn/JD0p/xQk
GP8WJxj/CxMM/w0WDv8NGQ//FCQX/xMkFdAsSTJpOFlACD5cQQBAXUIAQF1CAEBdQgBAXUIA////AP//
/wD///8A////AP///wD///8A////AP///wAgMDAAIDAwACAwMAAeLi8ALDw2AEJTQks1TjqyQmBI1jJP
Nv8WKRr/KD0s/zVUPf8eNiT/K0Yw/yk/LP8pRDD/PltH1kRnSltCa0sHQmpKAEJqSgBCakoAQmpKAEJq
SgD///8A////AP///wD///8A////AP///wD///8A////ACAwMAAgMDAAIDAwAB4uLwAqOTQARlpIAFx3
ZTpAVUbTJTwo/zNLN/9CXEf/O1lB/yQ9Kv81Tzj/R2RL/y1GMf87TEPUZnttKWeAbwBmf24AZn9uAGZ/
bgBmf24AZn9uAP///wD///8A////AP///wD///8A////AP///wD///8AIDAwACAwMAAgMDAAHi4vACo6
NABGWkgAWXJhADxKQzobKR9dOk1AvSw+MPpAXUj0Jz8s9B8vIvU8UkT1PVI/lUNVVDVlem4AaYJxAGiA
cABogHAAaIBwAGiAcABogHAA////AP///wD///8A////AP/4D///8Af//+AD///AAf//gAD//4AAf/8A
AH/+AAA//gAAP/wAAD/8AAAf/AAAH/wAAA/8AAAP/AAAD/AAAA/wAAAP8AAAD/AAAB/wAAAP8AAAD/AA
AH/4AAB/+AAAf/wAAH/8AAB//AAA//4AAf//AAH//4AB///AA///4Af/KAAAADAAAABgAAAAAQAgAAAA
AACAJQAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj6+nIICXlyCnv78gz9/fILfP
zyDP398gz9/fIM/f3yDP398gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABccGxAiqOev4Ca
lt+kvrnfv9TS37TJyd/I2djfzd3d38bY19/K29q/y9vbQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABws
IEApODC/YHhr/158dP+PrKr/ory8/46pqP+7zs7/xdfX/6nDxP+1zc3/x9rYv4+nn0AAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAALDgsQBAZD78THRX/S2ZT/15+c/+VsbH/kK2s/3yam/+3zM3/xNfW/5y5u/+lwML/ssfF/2SA
db9MaFhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAABAUEAgKzcsvwwSDf8VIxr/TWlX/3CMg/+pwcD/l7Ox/42rqv+90tH/w9fW/5u5
u/+durv/r8TF/1pzcP9AW0+/OFBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUHBxADRIO3wwVDv8wSDj/Um9i/32alf+wyMf/o7++/6bC
wf+/1NT/vdLS/5u4uv+YtLX/ssfF/2B7c/8wSzn/LEUxvzxYREAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADRMREAYICC/DBQP/yY7LP9FYVL/T2hp/3uZ
mf+XtLH/kbCv/6PAwf+0zM3/ssrM/568vv+Ytrf/tcrI/2yGfP8sQzH/OVc9/0hoTb84UEBAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASGhgIDNMQL8RGxb/IDIj/zlX
P/8zTTz/Q15e/2WFhf9aeG//YH95/4Okpf+curz/oLy+/5m3uf+Orq//rcTE/3eQi/8pPy//OFg+/ztV
Pv8hMCe/JDAsQAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHDAgQBUl
Gd8WJBj/PFdC/ypCL/8QGxT/JTU1/zxRUf8vQjz/SmFk/2+Okv+HqKn/iaur/4Olp/90lpj/i6mq/3aR
jv8iNCj/K0Yx/ytFL/8PGBL/GSQhvyAwMCAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAA4WERAHTEjvw8aEf8sRTL/OFM+/w8YEf8EBwT/FyMe/z9XT/9lfnf/i6Sk/565uv+ivr7/lLKx/3WW
l/9Wdnb/Yn+D/2yKiv8gMin/HDEg/ypGL/8PHBH/EB0T3yQwKEAAAAAAAAAAAAAAAAAAAAAA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAA
AAAAAAAAAAAAADxcSEBAYEu/Gi4e/x8wIf9CXEf/ITAj/wsQDf8gLyf/Q1pW/3qXlP+qwsH/wNTU/8bY
2P/G2dj/wtXU/563tf9lgHn/UWpq/1h1dv8lMzL/DRgQ/xksHP8UJRf/HS0g/zdEO79ASEAgAAAAAAAA
AAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAAAAAAAAAAAAAAAAAMEw8QDFPOb89XUb/GCgb/zJGNP81Sjf/GCMe/y0+Qf9be3v/dJaW/5Sz
tP+qxcb/t87P/7/U1P/E19f/wdTS/4ynn/9Wd2L/TWxc/0RiW/8gLzD/CxUQ/xcpGv8lPSn/NFA4/zhR
O988UEBAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wAAAAAAAAAAAAAAAAA4SEAgKDkxvyxFMv8zUTj/FicZ/zZQOv8mOSz/Ok1R/117
f/+Iqav/j7Cx/5W1t/+QsLH/kbCx/6G8vv+xysr/uc/O/4umn/9Qclz/OVhA/yhBL/8SIBf/FCQY/yxH
Mv85WD//NVQ6/yI3Jv8tOzG/OEhAIAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAgEBgT3y5FMP8qRS7/FCQY/zZR
PP8sQDj/Um5y/2uMjv+Xtbb/ja2v/3+eoP9gf37/Um9x/2J9hP+BnqD/o7y+/6vExP+QrKj/bYl6/0Zl
T/8tRzb/MEw4/y9NNf8sSjH/JDwo/wkRCv8QGhPfEBgQIAAAAAAAAAAA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAsPDRABgsH3yZA
Kv8fNyP/EyMW/y9IN/8uQUD/VHF0/2iIiP+Vs7P/bYyP/0VaXv8uQUX/LD1G/zNET/9JX2f/Zn+F/5Cq
rf+2zc7/q8PB/4uqpf9vkIz/Tmpe/xckGv8dMyD/Lkcx/w0WDv8HDgjfICwkQAAAAAAAAAAA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAFh4
aCBIY1m/FSIZ/x40If8VJxf/EiEV/zRPOf83TkT/UW9q/2yLiv+Vs7T/X3p8/yAqKv8fLCz/NUVO/z1O
WP9BU1v/PU1P/1xxd/+qwML/tMzN/6TBwf+auLn/bIiE/xcjHf8bMB7/M1I3/xcoGP8LEg3/MTw1vzhI
QCAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAAAAAAFh4cCBQb2HfLUUz/xUnGf8IEgr/DRoQ/zNROf81UUH/T25p/4ejpP+gvb3/c5GQ/z1O
Sv8jMy//MEFJ/0BUXv89UFn/PE5U/2iAiP+uxcf/ssrL/5u6u/+XtLb/d5CN/yM0Kf8aMB7/JUAq/xIh
FP8LEAz/N0M530BQQCAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wAAAAAAAAAAAFhwYCBSb2DfSWZQ/yo/L/8IEQr/CA8K/ypEMP8yUDv/U3Jv/5ez
tP+nw8P/iKin/3OSkv9deH3/XHeB/155gv9bdHn/d5CQ/6C6uv+1zc7/r8jK/5a2uP+LrK7/dpWT/zFJ
Pv8WKhv/EB8T/wYOCP8OGRD/OlM/30hoSCAAAAAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wAAAAAAAAAAADhIQCA2S0LfM0w5/0RfSv8iNCb/CA4J/yI3
Jv8/YEn/X39//4amqP+fvb3/kbCv/3mamP93l5b/epud/4enqP+SsLD/oLy8/6nFxP+wysr/q8bH/5W1
tv+Fp6n/c5WU/0VkWf8lPC3/DhwR/wYOCP8bLh7/OVg+30BUREAAAAAA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAACg4OCAgMC3fEh4W/zZP
Ov88WEL/Ex4V/xwsHf9FZVD/YIKC/2+Tlf+GqKr/iaio/199dv9XdW//Wnt6/22Qkf96m5z/kq2u/6rE
xf+xysv/psLE/5Oztf+Fp6n/cZSV/0tpZ/83T0j/HC8i/xIhFf8qRDD/Lkk0/zhIPb84SEAg////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAABgg
GCARHRXfBQoG/xgoG/85VkD/Izgo/xgpG/9AYEr/Xn97/2yPkv9xlZf/aYmL/0NbWP9IX2L/a4yN/32f
of9ujZH/haCf/6S/wP+lwcL/mri6/5Gxs/+Gqav/bpCT/z5TWP8lNDj/Fygd/yQ7KP83VD3/K0Uw/zpJ
Pd9AUEAg////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAAAAAAAAAACAFCgffBw4I/w0aD/8gNST/Jj4s/xcqG/88XET/WXx1/2yQkv9miov/Wnl9/0Vd
Yf9IX2D/e5qa/46usP90l5j/fp+e/4usrf+Pr7H/krK0/5Oztf+Iqqz/Y4WE/yExK/8TIBj/JTwq/zRT
Ov80Uzv/KUMu/zhIPd9AUEAg////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wAAAAAAAAAAABwwIEAKFg3fDRoP/woUDf8LFQ3/Figa/xQkF/84VT7/TW5m/2yQ
kP9khoX/S2lq/zlOUf8+VVL/e5uZ/5Kxs/9+oKD/dpqb/3qeoP+Jq63/lrW3/5u6u/+Lq6v/UGtm/xQi
Gf8fNST/OFY//yxHMv8mQiz/Gi0e/yY1Lt8gMDAg////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wAAAAAANFA8QClHML8XKxr/FyoZ/x80Iv8SIhX/CRQM/xEf
E/86VT//RmBa/3CPkP92l5j/SGRk/x4uK/8vQUT/epqd/46vsf95nJ3/c5iZ/3+jpP+QsLL/mrm6/6C+
vv9+mpr/MENB/xcqHf8vTjX/KEMu/xQlF/8ZLh3/Fikb/yM4Kb8oQDAg////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wBAUEAgN005vydAK/8NGRD/FCYY/y5N
M/8pRy7/Fysa/xksHf8+WkT/Kz41/z9UTf9ad3D/P1lY/xUjHP8rOzn/fZye/4usrv9tkJP/ZIeH/3GV
k/97nJr/hqWo/4mnp/9XcWv/GSkg/yQ/Kf8uSzP/FScZ/xovHv8pRy7/KUUw3zhVQGAAAAAA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAoQDAgLUMy3x0y
If8IEAr/CxcN/yA4I/80VTn/NFQ5/ytFMP82UTz/FiMY/yAtHf84TD3/Kzw7/wsTDv8pODD/gZ+e/4Gi
pP9RbnD/PVRN/0tlVP9HX0//SWJf/0RdX/8nOTn/ER8W/ydDLf8dMiD/GCwb/y5KNP80VTn/ME01/0po
UJ9QcFgg////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wA4SEAgMkU53xUlGf8OGxH/EiAV/xcrGv8jPCj/NVY7/zhZPv8jOif/CREL/xQiGP8rQDP/LUA6/xUf
Gv9BVU//jKmq/4Gio/9Na2n/Kz0y/yo5J/8mMh//JDEj/x8uJ/8RHxj/FCYY/yxIMf8bMB//KEQs/zVW
Ov8hOiX/GjAd3zRQOEAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wBQcFggQVtH3yM7J/8uSjP/NVI7/yE4Jf8MGA//IDYk/z1bQ/8fNCL/GSkh/zxX
VP9Rbm7/TGdi/0ZcWP92kpD/nLm6/5Gwsv9pio3/UG1s/0VeXf8+U03/RltV/1Jsbf8pPDr/GjAg/yhG
Lf8uTDT/OVw//zlaPv8VJhj/GCgY3xgoGCAAAAAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wBAUEAgNkc43yA0JP8ZKx3/HTEh/yQ9Kv8MFw7/GS0d/zlW
P/8tSTT/Jzs3/0BZXf9JYWj/VW5z/3mXmf+ZuLn/psPD/5+7vf9tiZD/UWty/1p2ff91kpX/jaiq/4ej
pf87T0r/Fica/yc/K/9BX0f/OFY//zJNNv8PGhH/HS8f3zBENEAAAAAA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wAIEAggGSYb3xgsHP8hOCf/EyQX/x82
I/8WKRn/Iz0o/ytFMf82Vj3/MEg+/0pkaP9kgof/gJ+i/5i3uf+fvb//qMXF/63Iyf+UsrX/bo2R/1Vt
df9Yb3f/bIiQ/2uKjv8wQz7/ER0V/y5JNP87W0H/MlI4/yQ9KP8NFg7/ITQk/ztLPb9AUEAg////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wA4SEAgKDMtvxQg
Fv8YKx3/Dh4S/xQnGP8YLBr/JT8q/xksHf87WUD/R2RU/2+Pjv+Epqj/kbKz/5y6vP+gvb//qMTF/63I
yf+uyMr/pMHC/5Kvsf+Eo6b/g6On/199f/8dLSb/Giwe/zpYQf8xTTb/NFI5/xksHf8VIRXfIzgn3ztJ
Pb9AUEAg////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAMkg9YBYmGN8KEgv/Dx4T/yM7J/8cMiD/Izwp/xUmGP80UTj/RGZP/2SIhP+Ep6n/kbGz/527
vf+iv8H/qcXG/67Jyv+xysv/r8nK/6jExP+jwMD/j6us/0dbXv8WJBv/Mk83/zdYPf8wUDb/MU82/xUm
GN8UIBRAIDgoIEBQQCAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wBAYFggOlNKnx0xIf8LFw7/Izgn/zFKNP8cMB//KUQu/xwxH/8rRjH/RGZP/1R3
bP9+oKH/jq+x/5u5u/+jwMH/qsbH/67Jyv+vysv/scvM/6/Jyv+kwMD/c46P/y9DQf8oPi//QF1G/ypD
L/8zUzn/ITYk/xUlF98YIBggAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wAAAAAAMEQ0QBspGt8SHhP/NlI8/y9LNf8dMyH/NlM7/yY+
Kv8gOCX/Q2JL/1Z3Y/97nJf/l7a4/6K/wP+rxsf/ssvM/7XNzv+3z9D/utHS/7XNzv+QrK7/TWRl/yg/
Mv8/XUX/OlU9/ypDLv8xTTX/DxkQ/xAdEN8YKBggAAAAAAAAAAAAAAAA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAOEhAICs6Mt8fMyX/P19H/ylG
L/8lQCr/Olk//zBLNv8XKBv/Mkg6/1h1YP9oiHj/kbCv/6fExP+yy8z/uM/Q/7nP0P+70dL/vtPU/6S8
vv9ie33/L0RB/zVQPf9CYEn/K0Qu/zFNNf8hNiT/BQsG/woTCt8IEAggAAAAAAAAAAAAAAAA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAIDAwICQz
L78eMyT/PFpD/x0yIf8iPCf/MVE3/zxbQv8jOSj/HjAj/09pVf9cfGr/cJKN/5i2tv+uyMr/ts7P/7fO
z/+1zM7/oLm6/2V+gf8wRED/MUY4/0pkT/81UTv/KkUu/y5JMv8RIBT/Bg4I/xMiFt8YIBggAAAAAAAA
AAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAAAAAABgkIEAYKRrfNFA5/x4xIf8VJxn/JEAp/ztcQf9CXkn/Jjsq/zpVQv9jgnD/V3lm/2mI
fv+Oqaj/oLu8/5y3uf+GoqP/WXRs/ylAM/8nPiz/PlpE/z1WQP8tRzD/MEs0/yA1I/8SIxX/EB8T/yM8
Kb8wUDggAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wAAAAAAAAAAABgoGCAfLh/fKkMv/zVQOv8ZKhz/EiMV/x0zIP8wSjb/MEo1/y1J
M/9KZ1P/V3Rf/0VhUP88Vkr/R19f/0NXXP8tPUD/HC0j/yI5Jf81Ujv/LUgz/ydBLP8uTDP/KUQu/yY+
Kv8iPCb/HDEgvyRALEAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAEBIQCAxPTS/Jzss/z1aQ/8zTTf/Gy0f/xAe
Ev8OGRD/FCQX/xwxIf8fNCT/QVtH/09rV/8uSDT/FiYc/wsTEP8KEQ3/HTIg/yxJMf8iOSf/FCQX/yI6
KP8lPyr/LUYy/zlWPv8pQy7fHDQgQAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAABEVExANU9Avy9K
Nv81UTn/OlY//zNLN/8nPSz/Gywf/xQhF/8NFw//Gise/y1HNP8kPin/Dx0S/wMHBP8GDgj/FCYX/xEg
FP8KEwz/DhwR/yM7J/8yTjn/PFdD/zdWPf80UTi/QFhAIAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAA
AAAAAAAANEw8QB4wIt8PGhH/Gywe/yc9LP83UT3/QVxH/0BcR/87VkL/OVU+/y1KM/8aLx7/Bw8J/wEC
Af8CBQP/ChYN/xIjFv8fNCP/KUUv/zhWPf80UDr/Jz8t/ylFML84VDxAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAAAAAAAAAAAAAAAAAIDAwIB0pJ78JEAvfESAU/wgPCf8LEw3/GSsd/yxGM/81Ujz/OVQ9/ytF
Mf8WKBn/Bg0H/wABAP8CBAL/DBkP/yI6Jv8wTzb/K0cx/yE2Jf8aLR7fJDwrvzBMOEAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAACAwMCAYKBxAJTsp3wcOCf8HDwn/Gy0g/y5K
Nf8zUjn/KUQu/xcnGv8RIRX/EB4S/wQJBf8FCQb/BgsH/wkRCv8PHBH/Dx0S/w0YD98QIBNgOFhAQAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAUEAgM0M0vxgl
Gv8mOirfR2NN/zhUPf8lPyr/ESAU/w4aEf8oQC7/JkAr/xYoGv8dMyH/HzQj/xIfFP8UJRf/IDYk/ylD
L/8tTTG/O19An0BoSCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAARFhIQDhTPZ9GZE6AO1pB3y9LM/8qRi//FSYY/yg9Lf8/XUX/NFM8/yI6KP8fNSP/N1U8/zVM
N/8tSDL/Mk86/0JfTd9QalhgQGhIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFh0YEBfd2efNU07/y1EL/8nPyv/LEIw/0hiTf9AXET/PlxE/yU+
Kv8fNiL/Olg+/0JcRf88WkH/KEAs/ys+M/9Yal2faIBwIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABUaFxALzw0vx4vId8rQzHfSmFP/zxS
Pv8tRjH/QF5G/yZALP8nPyz/N046/0ZhTf9EYEf/Kzsp3zNEQb9YaGRAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOEhAIBAY
ECAwRDhAN0c+3xwqIP85UkL/SWdR/yY9Kv8dMiH/Ex4X/yw7Nv9KZ1XfPEw4QEBYWCAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP//
8Af////////gA////////8AB////////gAD///////8AAH///////wAAP//////+AAAf//////wAAA//
/////AAAB//////4AAAH//////AAAAP/////4AAAA//////AAAAB/////8AAAAH/////wAAAAf////+A
AAAA/////4AAAAD/////gAAAAP////+AAAAA/////4AAAAB/////gAAAAH////+AAAAAf////4AAAAB/
////AAAAAH////4AAAAA/////gAAAAB////+AAAAAP////4AAAAA/////gAAAAD////+AAAAAH////4A
AAAAf////wAAAAD////+AAAAA/////8AAAAD/////wAAAAP/////AAAAA/////+AAAAD/////4AAAAf/
////gAAAD//////AAAAP/////+AAAB//////4AAAP//////wAAB///////gAAD///////AAAf//////+
AAB///////8AAP///////4AB/////w==
</value>
</data>
</root>
-49
View File
@@ -1,49 +0,0 @@
#region MIT.
//
// Examples.
// Copyright (C) 2008 Michael Winsor
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// Created: Thursday, October 02, 2008 10:46:02 PM
//
#endregion
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace GorgonLibrary.Example
{
/// <summary>
/// Main application.
/// </summary>
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}
-91
View File
@@ -1,91 +0,0 @@
#region MIT.
//
// Gorgon.
// Copyright (C) 2008 Michael Winsor
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// Created: TOBEREPLACED
//
#endregion
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
//
// 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("Initializing")]
[assembly: AssemblyDescription("Example showing how to initialize Gorgon.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Michael Winsor")]
[assembly: AssemblyProduct("Gorgon Example.")]
[assembly: AssemblyCopyright("Copyright © Michael Winsor")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: FileIOPermission(SecurityAction.RequestMinimum, AllFiles = FileIOPermissionAccess.AllAccess)]
[assembly: ReflectionPermission(SecurityAction.RequestMinimum, Flags = ReflectionPermissionFlag.MemberAccess)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, UnmanagedCode = true)]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
[assembly: AssemblyFileVersion("1.1.4529.31450")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
-63
View File
@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.261
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GorgonLibrary.Example.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GorgonLibrary.Example.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
-117
View File
@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-48
View File
@@ -1,48 +0,0 @@
namespace Balltest
{
partial class Balltest
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// Balltest
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(683, 632);
this.Name = "Balltest";
this.Text = "Me Balls are a\'Flyin";
this.Load += new System.EventHandler(this.Form1_Load_1);
this.ResumeLayout(false);
}
#endregion
}
}
-142
View File
@@ -1,142 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GorgonLibrary;
using GorgonLibrary.Graphics;
using System.IO;
namespace Balltest
{
public partial class Balltest : Form
{
string mediadir;
public Sprite bouncesprite;
BounceySprite[] bounceysprites;
Vector2D position = new Vector2D(20,20);
Vector2D direction = new Vector2D(1, 1);
public Random random = new Random(DateTime.Now.Millisecond);
public RenderImage baseTarget;
public Sprite baseTargetSprite;
public RenderImage screenTarget;
public Balltest()
{
InitializeComponent();
}
private void SetupGorgon()
{
Gorgon.Initialize(true, false);
Gorgon.SetMode(this);
//Gorgon.AllowBackgroundRendering = true;
//Gorgon.Screen.BackgroundColor = Color.FromArgb(50, 50, 50);
//Gorgon.CurrentClippingViewport = new Viewport(0, 20, Gorgon.Screen.Width, Gorgon.Screen.Height - 20);
//PreciseTimer preciseTimer = new PreciseTimer();
//Gorgon.MinimumFrameTime = PreciseTimer.FpsToMilliseconds(66);
Gorgon.Idle += new FrameEventHandler(Gorgon_Idle);
Gorgon.FrameStatsVisible = true;
Gorgon.DeviceReset += MainWindowResizeEnd;
bouncesprite = new Sprite("flyingball", GorgonLibrary.Graphics.Image.FromFile(mediadir + @"flyingball.png"));
//bouncesprite.SetScale(3, 3);
baseTarget = new RenderImage("baseTarget", 32, 32, ImageBufferFormats.BufferRGB888A8);
baseTargetSprite = new Sprite("baseTargetSprite", baseTarget);
screenTarget = new RenderImage("screenTarget", Gorgon.CurrentClippingViewport.Width, Gorgon.CurrentClippingViewport.Height, ImageBufferFormats.BufferRGB888A8);
bounceysprites = new BounceySprite[10];
for (int i = 0; i < 10; i++)
{
bounceysprites[i] = new BounceySprite(bouncesprite, new Vector2D(random.Next(0, Gorgon.CurrentClippingViewport.Width), random.Next(0, Gorgon.CurrentClippingViewport.Height)),
new Vector2D((float)random.Next(-100000,100000) / 100000, (float)random.Next(-100000,100000) / 100000)
, this);
}
}
private void MainWindowResizeEnd(object sender, EventArgs e)
{
//_input.Mouse.SetPositionRange(0, 0, Gorgon.CurrentClippingViewport.Width, Gorgon.CurrentClippingViewport.Height);
//_stateManager.CurrentState.FormResize();
screenTarget.Width = Gorgon.CurrentClippingViewport.Width;
screenTarget.Height = Gorgon.CurrentClippingViewport.Height;
}
private void Gorgon_Idle(object sender, FrameEventArgs e)
{
Gorgon.Screen.Clear(Color.Black);
screenTarget.Clear(Color.Black);
Gorgon.CurrentRenderTarget = screenTarget;
foreach (BounceySprite spr in bounceysprites)
{
spr.Draw();
}
Gorgon.CurrentRenderTarget = null;
screenTarget.Image.Blit(0,0);
}
private void Form1_Load_1(object sender, EventArgs e)
{
SetupGorgon();
Gorgon.Go();
}
}
public class BounceySprite
{
Vector2D direction;
Vector2D position;
private Sprite sprite;
Balltest form1;
private Color color;
public BounceySprite(Sprite _sprite, Vector2D _position, Vector2D _direction, Balltest _form1)
{
position = _position;
direction = _direction;
form1 = _form1;
sprite = _sprite;
color = randomColor();
}
private Color randomColor()
{
return Color.FromArgb(form1.random.Next(0, 255), form1.random.Next(0, 255), form1.random.Next(0, 255),
form1.random.Next(0, 255));
}
public void Draw()
{
position += direction * 2;
form1.bouncesprite.SetPosition(position.X, position.Y);
form1.bouncesprite.Color = color;
//sprite.SetPosition(0,0);
if (sprite.AABB.Right > Gorgon.Screen.Width)
direction.X = -1 * Math.Abs(direction.X);
if (sprite.AABB.Left < 0)
direction.X = Math.Abs(direction.X);
if (sprite.AABB.Top < 0)
direction.Y = Math.Abs(direction.Y);
if (sprite.AABB.Bottom > Gorgon.Screen.Height)
direction.Y = -1 * Math.Abs(direction.Y);
//form1.baseTarget.Width = (int)sprite.Width;
//form1.baseTarget.Height = (int)sprite.Height;
//Gorgon.CurrentRenderTarget = form1.baseTarget;
form1.bouncesprite.Draw(true);
//Gorgon.CurrentRenderTarget = null;
//form1.baseTargetSprite.SetPosition(position.X, position.Y);
//form1.baseTargetSprite.Draw();
}
}
}
-154
View File
@@ -1,154 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{06F24A69-F66B-42AD-8EA3-632E83010B38}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Balltest</RootNamespace>
<AssemblyName>Balltest</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugMessaging|x86'">
<OutputPath>bin\x86\DebugMessaging\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\Balltest.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
</PropertyGroup>
<ItemGroup>
<Reference Include="Gorgon, Version=1.1.4119.34319, Culture=neutral, PublicKeyToken=c001d94e9acbbee7, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\References\Release\Gorgon.dll</HintPath>
</Reference>
<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.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Balltest.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Balltest.Designer.cs">
<DependentUpon>Balltest.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Balltest.resx">
<DependentUpon>Balltest.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="flyingball.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</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>
-120
View File
@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-21
View File
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Balltest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Balltest());
}
}
}
-36
View File
@@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("Balltest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Balltest")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("db57b986-ba4a-4737-a1e2-26656bb4d855")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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")]
-63
View File
@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Balltest.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Balltest.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
-117
View File
@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-26
View File
@@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Balltest.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
</configuration>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

-149
View File
@@ -1,149 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2A99B768-083D-4709-AEB8-791D4D4C6696}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Decalshadertest</RootNamespace>
<AssemblyName>Decalshadertest</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugMessaging|x86'">
<OutputPath>bin\x86\DebugMessaging\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\Decalshadertest.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
</PropertyGroup>
<ItemGroup>
<Reference Include="Gorgon, Version=1.1.4119.34319, Culture=neutral, PublicKeyToken=c001d94e9acbbee7, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\References\Release\Gorgon.dll</HintPath>
</Reference>
<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.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</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>
-48
View File
@@ -1,48 +0,0 @@
namespace Decalshadertest
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(683, 632);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load_1);
this.ResumeLayout(false);
}
#endregion
}
}
-178
View File
@@ -1,178 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GorgonLibrary;
using GorgonLibrary.Graphics;
using System.IO;
namespace Decalshadertest
{
public partial class Form1 : Form
{
string mediadir;
public Sprite bouncesprite;
Sprite decalsprite;
BounceySprite[] bounceysprites;
Vector2D position = new Vector2D(20,20);
Vector2D direction = new Vector2D(1, 1);
Random random = new Random(DateTime.Now.Millisecond);
public FXShader decalShader;
public RenderImage baseTarget;
public Sprite baseTargetSprite;
public Form1()
{
InitializeComponent();
mediadir = Directory.GetCurrentDirectory() + @"\..\..\..\..\Media";
}
private void SetupGorgon()
{
Gorgon.Initialize(true, false);
Gorgon.SetMode(this);
//Gorgon.AllowBackgroundRendering = true;
//Gorgon.Screen.BackgroundColor = Color.FromArgb(50, 50, 50);
//Gorgon.CurrentClippingViewport = new Viewport(0, 20, Gorgon.Screen.Width, Gorgon.Screen.Height - 20);
//PreciseTimer preciseTimer = new PreciseTimer();
//Gorgon.MinimumFrameTime = PreciseTimer.FpsToMilliseconds(66);
Gorgon.Idle += new FrameEventHandler(Gorgon_Idle);
Gorgon.FrameStatsVisible = true;
bouncesprite = new Sprite("bouncey", GorgonLibrary.Graphics.Image.FromFile(mediadir + @"\textures\0_Items.png"), new Vector2D(0,0), new Vector2D(22,20));
bouncesprite.SetScale(3, 3);
decalsprite = new Sprite("decal", GorgonLibrary.Graphics.Image.FromFile(mediadir + @"\textures\0_Decals.png"), new Vector2D(56,0), new Vector2D(103,29));
decalsprite.SetScale(1, 1);
decalShader = FXShader.FromFile(mediadir + @"\shaders\decalshader.fx", ShaderCompileOptions.Debug);
decalShader.Parameters["tex1"].SetValue(decalsprite.Image);
baseTarget = new RenderImage("baseTarget", 32, 32, ImageBufferFormats.BufferRGB888A8);
baseTargetSprite = new Sprite("baseTargetSprite", baseTarget);
bounceysprites = new BounceySprite[10];
for (int i = 0; i < 10; i++)
{
bounceysprites[i] = new BounceySprite(bouncesprite, new Vector2D(random.Next(0, Gorgon.Screen.Width), random.Next(0, Gorgon.Screen.Height)),
new Vector2D((float)random.Next(-100000,100000) / 100000, (float)random.Next(-100000,100000) / 100000),
decalsprite, new Vector2D(random.Next(-10,15), random.Next(-10,15)), decalShader, this);
}
//Calculate decal texcoord offsets
/*Vector2D decalBToffset = new Vector2D(10,5);
float BTXDTL_x = decalBToffset.X / bouncesprite.Image.Width;
float BTXDTL_y = decalBToffset.Y / bouncesprite.Image.Height;
float BTXDBR_x = (decalBToffset.X + decalsprite.Width)/bouncesprite.Image.Width;
float BTXDBR_y = (decalBToffset.Y + decalsprite.Height)/bouncesprite.Image.Height;
float CFx = (float)decalsprite.Image.Width/(float)bouncesprite.Image.Width;
float CFy = (float)decalsprite.Image.Height / (float)bouncesprite.Image.Height;
float DOtc_xtl = (float)decalsprite.ImageOffset.X / (float)decalsprite.Image.Width;
float DOtc_ytl = (float)decalsprite.ImageOffset.Y / (float)decalsprite.Image.Height;
Vector4D decalParms1 = new Vector4D(BTXDTL_x, BTXDTL_y, BTXDBR_x, BTXDBR_y);
Vector4D decalParms2 = new Vector4D(CFx, CFy, DOtc_xtl, DOtc_ytl);*/
}
private void Gorgon_Idle(object sender, FrameEventArgs e)
{
Gorgon.Screen.Clear(System.Drawing.Color.Black);
//Gorgon.CurrentShader = decalShader.Techniques["drawWithDecal"];
Gorgon.CurrentShader = decalShader.Techniques["drawWithDecal"];
foreach (BounceySprite spr in bounceysprites)
{
spr.Draw();
}
Gorgon.CurrentShader = null;
//Gorgon.CurrentShader = null;
}
private void Form1_Load_1(object sender, EventArgs e)
{
SetupGorgon();
Gorgon.Go();
}
}
public class BounceySprite
{
Vector2D direction;
Vector2D position;
Sprite decalsprite;
Vector2D decalspritepos;
//FXShader decalShader;
Vector4D[] decalParams1;
Vector4D[] decalParams2;
Form1 form1;
public BounceySprite(Sprite _sprite, Vector2D _position, Vector2D _direction, Sprite _decal, Vector2D _decalpos, FXShader _decalShader, Form1 _form1)
{
position = _position;
direction = _direction;
decalsprite = _decal;
decalspritepos = _decalpos;
//decalShader = _decalShader;
form1 = _form1;
Vector4D decpar1 = decalParms1(decalspritepos, new Vector2D(form1.bouncesprite.Image.Width, form1.bouncesprite.Image.Height), decalsprite.Size);
Vector4D decpar2 = decalParms2(new Vector2D(decalsprite.Image.Width, decalsprite.Image.Height), new Vector2D(form1.bouncesprite.Image.Width, form1.bouncesprite.Image.Height), decalsprite.ImageOffset);
decalParams1 = new Vector4D[] { decpar1, decpar1, decpar1, decpar1, decpar1 };
decalParams2 = new Vector4D[] { decpar2, decpar2, decpar2, decpar2, decpar2 };
}
public void Draw()
{
//position += direction * 2;
form1.bouncesprite.SetPosition(position.X, position.Y);
//sprite.SetPosition(0,0);
/*if (sprite.AABB.Right > Gorgon.Screen.Width)
direction.X = -1 * Math.Abs(direction.X);
if (sprite.AABB.Left < 0)
direction.X = Math.Abs(direction.X);
if (sprite.AABB.Top < 0)
direction.Y = Math.Abs(direction.Y);
if (sprite.AABB.Bottom > Gorgon.Screen.Height)
direction.Y = -1 * Math.Abs(direction.Y);
*/
form1.decalShader.Techniques["drawWithDecal"].Parameters["decalParms1"].SetValue(decalParams1);
form1.decalShader.Techniques["drawWithDecal"].Parameters["decalParms2"].SetValue(decalParams2);
//form1.baseTarget.Width = (int)sprite.Width;
//form1.baseTarget.Height = (int)sprite.Height;
//Gorgon.CurrentRenderTarget = form1.baseTarget;
form1.bouncesprite.Draw(true);
//Gorgon.CurrentRenderTarget = null;
//form1.baseTargetSprite.SetPosition(position.X, position.Y);
//form1.baseTargetSprite.Draw();
}
private Vector4D decalParms1(Vector2D decalBToffset, Vector2D baseTexAtlasSize, Vector2D decalSize)
{
float BTXDTL_x = decalBToffset.X / baseTexAtlasSize.X;
float BTXDTL_y = decalBToffset.Y / baseTexAtlasSize.Y;
float BTXDBR_x = (decalBToffset.X + decalSize.X) / baseTexAtlasSize.X;
float BTXDBR_y = (decalBToffset.Y + decalSize.Y) / baseTexAtlasSize.Y;
return new Vector4D(BTXDTL_x, BTXDTL_y, BTXDBR_x, BTXDBR_y);
}
private Vector4D decalParms2(Vector2D decalAtlasSize, Vector2D baseTexAtlasSize, Vector2D decalAtlasOffset)
{
float CFx = (float)decalAtlasSize.X / (float)baseTexAtlasSize.X;
float CFy = (float)decalAtlasSize.Y / (float)baseTexAtlasSize.Y;
float DOtc_xtl = (float)decalAtlasOffset.X / (float)decalAtlasSize.X;
float DOtc_ytl = (float)decalAtlasOffset.Y / (float)decalAtlasSize.Y;
return new Vector4D(CFx, CFy, DOtc_xtl, DOtc_ytl);
}
}
}
-120
View File
@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-21
View File
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Decalshadertest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
@@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("Decalshadertest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Decalshadertest")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("db57b986-ba4a-4737-a1e2-26656bb4d855")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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")]
-63
View File
@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Decalshadertest.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Decalshadertest.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-26
View File
@@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Decalshadertest.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
</configuration>
-20
View File
@@ -1,20 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapEditor", "MapEditor\MapEditor.csproj", "{D4A6C1EE-2590-4E93-A5D2-6AAE2A468235}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D4A6C1EE-2590-4E93-A5D2-6AAE2A468235}.Debug|x86.ActiveCfg = Debug|x86
{D4A6C1EE-2590-4E93-A5D2-6AAE2A468235}.Debug|x86.Build.0 = Debug|x86
{D4A6C1EE-2590-4E93-A5D2-6AAE2A468235}.Release|x86.ActiveCfg = Release|x86
{D4A6C1EE-2590-4E93-A5D2-6AAE2A468235}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file not shown.
-8
View File
@@ -1,8 +0,0 @@
<Application x:Class="MapEditor.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
-16
View File
@@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace MapEditor
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
-22
View File
@@ -1,22 +0,0 @@
<Window x:Class="MapEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="800" Width="800">
<Grid>
<Button Content="Load Map" Height="31" HorizontalAlignment="Left" Margin="12,12,0,0" Name="loadmap_Button" VerticalAlignment="Top" Width="106" Click="loadmap_Button_Click" />
<Button Content="Save Map" Height="31" HorizontalAlignment="Left" Margin="124,12,0,0" Name="savemap_Button" VerticalAlignment="Top" Width="106" Click="savemap_Button_Click" />
<Canvas Name="canvas" Margin="12,60,0,0">
<Rectangle Height="12" HorizontalAlignment="Left" Margin="0,0,0,0" Name="rectangle1" Stroke="Black" VerticalAlignment="Top" Width="12" />
<TextBlock Height="17" HorizontalAlignment="Left" Margin="2,-1,0,0" Name="textBlock1" Text="F" VerticalAlignment="Top" Width="14" Foreground="White" />
</Canvas>
<Rectangle Height="21" HorizontalAlignment="Left" Margin="280,8,0,0" Name="Palette_floor" Stroke="Black" VerticalAlignment="Top" Width="22" Fill="LightGray" MouseDown="Palette_floor_MouseDown"/>
<Rectangle Height="21" HorizontalAlignment="Left" Margin="280,35,0,0" Name="Palette_none" Stroke="Black" VerticalAlignment="Top" Width="22" Fill="LightSteelBlue" MouseDown="Palette_none_MouseDown"/>
<Rectangle Height="21" HorizontalAlignment="Left" Margin="436,8,0,0" Name="Palette_space" Stroke="Black" VerticalAlignment="Top" Width="22" Fill="Black" MouseDown="Palette_space_MouseDown"/>
<Rectangle Height="21" HorizontalAlignment="Left" Margin="436,35,0,0" Name="Palette_wall" Stroke="Black" VerticalAlignment="Top" Width="22" Fill="Brown" MouseDown="Palette_wall_MouseDown"/>
<TextBlock Height="21" HorizontalAlignment="Left" Margin="311,9,0,0" Name="textBlock2" Text="Floor" VerticalAlignment="Top" Width="90" />
<TextBlock Height="21" HorizontalAlignment="Left" Margin="311,35,0,0" Name="textBlock3" Text="None" VerticalAlignment="Top" Width="90" />
<TextBlock Height="21" HorizontalAlignment="Left" Margin="464,9,0,0" Name="textBlock4" Text="Space" VerticalAlignment="Top" Width="90" />
<TextBlock Height="21" HorizontalAlignment="Left" Margin="464,35,0,0" Name="textBlock5" Text="Wall" VerticalAlignment="Top" Width="90" />
<Button Content="Area Select" Height="21" HorizontalAlignment="Left" Margin="524,4,0,0" Name="areaSelectButton" VerticalAlignment="Top" Width="76" Click="areaSelectButton_Click" />
</Grid>
</Window>
-264
View File
@@ -1,264 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.IO;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Win32;
namespace MapEditor
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private string[,] tileStrings;
private Rectangle[,] rectangles;
private TextBlock[,] textBlocks;
int xTopLeft = 12;
int yTopLeft = 60;
int tileSize = 14;
string brush = "Floor";
bool mapLoaded = false;
bool wideSelect = false;
bool topLeftCornerSelected = false;
int topLeftCornerx;
int topLeftCornery;
int xMax;
int yMax;
public MainWindow()
{
InitializeComponent();
MouseDown += new MouseButtonEventHandler(MainWindow_MouseDown);
}
void MainWindow_MouseDown(object sender, MouseButtonEventArgs e)
{
if (mapLoaded)
{
var pos = e.GetPosition(this);
if (pos.X > xTopLeft && pos.X < xTopLeft + (tileSize * xMax) + tileSize
&& pos.Y > yTopLeft && pos.Y < yTopLeft + (tileSize * yMax) + tileSize) //If its inside the canvas bounds
{
//Translate to array position.
int arrx = (int)Math.Floor((pos.X - xTopLeft) / tileSize);
int arry = (int)Math.Floor((pos.Y - yTopLeft) / tileSize);
if (!wideSelect)
{
tileStrings[arrx, arry] = brush;
updateTile(arrx, arry);
}
else if (wideSelect & !topLeftCornerSelected)
{
topLeftCornerSelected = true;
topLeftCornerx = arrx;
topLeftCornery = arry;
areaSelectButton.Content = "Bottom Right";
}
else if (wideSelect & topLeftCornerSelected)
{
wideSelect = false;
topLeftCornerSelected = false;
areaSelectButton.Content = "Area Select";
for (int i = topLeftCornerx; i <= arrx; i++)
{
for (int j = topLeftCornery; j <= arry; j++)
{
tileStrings[i, j] = brush;
updateTile(i, j);
}
}
}
}
}
}
private void loadmap_Button_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog loadDialog = new OpenFileDialog();
loadDialog.DefaultExt = "*.*";
loadDialog.Filter = "All Files(*.*)|*.*";
Nullable<bool> result = loadDialog.ShowDialog();
if (result == true)
{
loadFile(loadDialog.FileName);
drawMap();
mapLoaded = true;
}
}
private void loadFile(string filename)
{
var f = File.ReadAllLines(filename).GetEnumerator();
f.MoveNext();
xMax = Convert.ToInt32(f.Current);
f.MoveNext();
yMax = Convert.ToInt32(f.Current);
f.MoveNext();
tileStrings = new string[xMax,yMax];
for (int i = 0; i < xMax; i++)
{
for (int j = 0; j < yMax; j++)
{
tileStrings[j, i] = f.Current.ToString();
f.MoveNext();
}
}
return;
}
private void savemap_Button_Click(object sender, RoutedEventArgs e)
{
SaveFileDialog saveDialog = new SaveFileDialog();
//saveDialog.DefaultExt = "*.*";
//saveDialog.Filter = "All Files(*.*)|*.*";
//saveDialog.ValidateNames = false;
Nullable<bool> result = saveDialog.ShowDialog();
if (result == true)
{
saveFile(saveDialog.FileName);
}
}
private void saveFile(string filename)
{
var f = new StreamWriter(filename);
f.WriteLine(xMax.ToString());
f.WriteLine(yMax.ToString());
for (int i = 0; i < xMax; i++)
{
for (int j = 0; j < yMax; j++)
{
f.WriteLine(tileStrings[j, i]);
}
}
f.Close();
}
private void drawMap()
{
canvas.Children.Clear();
rectangles = new Rectangle[xMax, yMax];
textBlocks = new TextBlock[xMax, yMax];
for (int i = 0; i < xMax; i++)
{
for (int j = 0; j < yMax; j++)
{
Rectangle r = new Rectangle();
r.Height = tileSize;
r.Width = tileSize;
r.Stroke = Brushes.Black;
canvas.Children.Add(r);
Canvas.SetZIndex(r, 0);
Canvas.SetTop(r,j * tileSize);
Canvas.SetLeft(r,i * tileSize);
TextBlock t = new TextBlock();
t.FontSize = 13;
canvas.Children.Add(t);
Canvas.SetZIndex(t, 10);
Canvas.SetTop(t, (j * tileSize) - 1);
Canvas.SetLeft(t, (i * tileSize) + 2);
rectangles[i, j] = r;
textBlocks[i, j] = t;
updateTile(i, j);
}
}
}
private void updateTile(int x, int y)
{
TextBlock t = textBlocks[x, y];
Rectangle r = rectangles[x, y];
switch (tileStrings[x, y])
{
case "Floor":
t.Text = "F";
t.Foreground = Brushes.Black;
r.Fill = Brushes.LightGray;
break;
case "Space":
t.Text = "S";
t.Foreground = Brushes.White;
r.Fill = Brushes.Black;
break;
case "Wall":
t.Text = "W";
t.Foreground = Brushes.White;
r.Fill = Brushes.Brown;
break;
case "None":
t.Text = "";
r.Fill = Brushes.LightSteelBlue;
break;
}
}
public enum TileType
{
Floor,
Wall,
Space,
None
}
private void Palette_floor_MouseDown(object sender, MouseButtonEventArgs e)
{
brush = "Floor";
}
private void Palette_none_MouseDown(object sender, MouseButtonEventArgs e)
{
brush = "Space";
}
private void Palette_space_MouseDown(object sender, MouseButtonEventArgs e)
{
brush = "Space";
}
private void Palette_wall_MouseDown(object sender, MouseButtonEventArgs e)
{
brush = "Wall";
}
private void areaSelectButton_Click(object sender, RoutedEventArgs e)
{
if (!wideSelect)
{
areaSelectButton.Content = "Top Left";
wideSelect = true;
}
else // Turn off wide select
{
wideSelect = false;
topLeftCornerSelected = false;
areaSelectButton.Content = "Area Select";
}
}
}
}
-103
View File
@@ -1,103 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D4A6C1EE-2590-4E93-A5D2-6AAE2A468235}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MapEditor</RootNamespace>
<AssemblyName>MapEditor</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</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>
@@ -1,55 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 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("MapEditor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MapEditor")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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")]
@@ -1,71 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MapEditor.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MapEditor.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-30
View File
@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MapEditor.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
@@ -1,20 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ViewOcclusionTest", "ViewOcclusionTest\ViewOcclusionTest.csproj", "{0DAB21AA-EAD8-4FCB-BFAC-82DC931CA0CC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0DAB21AA-EAD8-4FCB-BFAC-82DC931CA0CC}.Debug|x86.ActiveCfg = Debug|x86
{0DAB21AA-EAD8-4FCB-BFAC-82DC931CA0CC}.Debug|x86.Build.0 = Debug|x86
{0DAB21AA-EAD8-4FCB-BFAC-82DC931CA0CC}.Release|x86.ActiveCfg = Release|x86
{0DAB21AA-EAD8-4FCB-BFAC-82DC931CA0CC}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
@@ -1,8 +0,0 @@
<Application x:Class="ViewOcclusionTest.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
@@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace ViewOcclusionTest
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
@@ -1,253 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ViewOcclusionTest
{
public class Face
{
public int x;
public int y;
public Face next; //Next face counter-clockwise
public Face over = null; //Overlapping face from adjacent tile
public Line line;
public Line startLine;
public Line endLine;
public Canvas canvas;
public MainWindow mainWindow;
public Face(MainWindow _mainWindow)
{
mainWindow = _mainWindow;
canvas = mainWindow.canvas;
}
public bool IsFacing(Point p)
{
double prod = perp_dot(x, y, next.x, next.y, p.X, p.Y);
if (prod > 0)
return true;
return false;
}
//Negative if test vector is to the left, positive if to the right.
public double perp_dot(double originx, double originy, double endx, double endy, double testx, double testy)
{
double v1x = endx - originx;
double v1y = endy - originy;
double v2x = testx - originx;
double v2y = testy - originy;
return (v1x * v2y - v1y * v2x);
}
public void DrawViewLine(ViewLines viewlines)
{
double slope;
double intercept;
switch (viewlines)
{
case ViewLines.origin:
if (y - mainWindow.viewPoint.Y == 0)
slope = 0;
else if (x - mainWindow.viewPoint.X == 0)
slope = -1 * Math.Sign(y - mainWindow.viewPoint.Y) * 10000;
else //Calculate y slope
slope = (y - mainWindow.viewPoint.Y) / (x - mainWindow.viewPoint.X);
//Generate line
startLine = new Line();
startLine.X1 = x;
startLine.Y1 = y; //Start point
intercept = startLine.Y1 - startLine.X1 * slope;
if (x > mainWindow.viewPoint.X)
startLine.X2 = mainWindow.WindowBottomRight.X;
else
startLine.X2 = mainWindow.WindowTopLeft.X;
startLine.Y2 = slope * startLine.X2 + intercept; // y = mx + b ololol
//Check if the y value is outside the window bounds. if it is, set y value to window bounds and calculate x from it instead.
if (startLine.Y2 > mainWindow.WindowBottomRight.Y)
{
startLine.Y2 = mainWindow.WindowBottomRight.Y;
startLine.X2 = (startLine.Y2 - intercept) / slope;
}
else if (startLine.Y2 < mainWindow.WindowTopLeft.Y)
{
startLine.Y2 = mainWindow.WindowTopLeft.Y;
startLine.X2 = (startLine.Y2 - intercept) / slope;
}
break;
case ViewLines.endpoint:
if (next.y - mainWindow.viewPoint.Y == 0)
slope = 0;
else if (next.x - mainWindow.viewPoint.X == 0)
slope = -1 * Math.Sign(next.y - mainWindow.viewPoint.Y) * 1000000;
else //Calculate y slope
slope = (next.y - mainWindow.viewPoint.Y) / (next.x - mainWindow.viewPoint.X);
//Generate line
endLine = new Line();
endLine.X1 = next.x;
endLine.Y1 = next.y;
intercept = endLine.Y1 - endLine.X1 * slope;
if (next.x > mainWindow.viewPoint.X)
endLine.X2 = mainWindow.WindowBottomRight.X;
else
endLine.X2 = mainWindow.WindowTopLeft.X;
endLine.Y2 = slope * endLine.X2 + intercept;
//Check if the y value is outside the window bounds. if it is, set y value to window bounds and calculate x from it instead.
if (endLine.Y2 > mainWindow.WindowBottomRight.Y)
{
endLine.Y2 = mainWindow.WindowBottomRight.Y;
endLine.X2 = (endLine.Y2 - intercept) / slope;
}
else if (endLine.Y2 < mainWindow.WindowTopLeft.Y)
{
endLine.Y2 = mainWindow.WindowTopLeft.Y;
endLine.X2 = (endLine.Y2 - intercept) / slope;
}
break;
case ViewLines.both:
DrawViewLine(ViewLines.origin);
DrawViewLine(ViewLines.endpoint);
break;
}
}
public void RemoveLines()
{
line = null;
startLine = null;
endLine = null;
}
public enum ViewLines
{
origin,
endpoint,
both
}
//Get the same face on the adjacent tile in either the direction of the origin or the endpoint.
public Face GetAdjacentFace(bool origin)
{
if (origin && next.next.next.over != null)
return next.next.next.over.next.next.next; //I know, this is fucking kludgy.
else if (!origin && next.over != null)
return next.over.next;
else
return null;
}
public Polygon GetOcclusionPoly()
{
Polygon p = new Polygon();
PointCollection polygonPoints = new PointCollection();
Face checkFace = this;
polygonPoints.Add(new Point(x,y)); //Add start point
int i = 0;
//Loop through faces starting at the start line until end line is found.
while (checkFace.endLine == null && i < 20)
{
if (checkFace.GetAdjacentFace(false) == null) // There's no adjacent face, so we'll curve around the corner to find the endline
{
checkFace = checkFace.next;
polygonPoints.Add(new Point(checkFace.next.next.x, checkFace.next.next.y)); // add the opposite face so that we can show the wall but not what's behind it.
}
else if (checkFace.GetAdjacentFace(false) != null && checkFace.GetAdjacentFace(false).over != null) // If we're in a concave corner, curve around that
{
//Add a fuckton of points to include the wall we're occluding from
polygonPoints.Add(new Point(checkFace.next.next.next.x, checkFace.next.next.next.y));
polygonPoints.Add(new Point(checkFace.GetAdjacentFace(false).next.next.next.x, checkFace.GetAdjacentFace(false).next.next.next.y));
polygonPoints.Add(new Point(checkFace.GetAdjacentFace(false).next.next.x, checkFace.GetAdjacentFace(false).next.next.y));
polygonPoints.Add(new Point(checkFace.GetAdjacentFace(false).next.x, checkFace.GetAdjacentFace(false).next.y));
checkFace = checkFace.GetAdjacentFace(false).over.next;
///polygonPoints.Add(new Point(checkFace.x, checkFace.y));
}
else
{
polygonPoints.Add(new Point(checkFace.next.next.next.x, checkFace.next.next.next.y));
polygonPoints.Add(new Point(checkFace.next.next.x, checkFace.next.next.y));
checkFace = checkFace.GetAdjacentFace(false);
polygonPoints.Add(new Point(checkFace.next.next.x, checkFace.next.next.y));
}
i++;
}
if (i == 0 && checkFace.endLine != null) // If the endline is on the same face as the start line add the backfaces to the occlusion poly
{
polygonPoints.Add(new Point(checkFace.next.next.next.x, checkFace.next.next.next.y));
polygonPoints.Add(new Point(checkFace.next.next.x, checkFace.next.next.y));
}
if (checkFace.endLine != null)
{
polygonPoints.Add(new Point(checkFace.endLine.X1, checkFace.endLine.Y1));
polygonPoints.Add(new Point(checkFace.endLine.X2, checkFace.endLine.Y2));
}
else
return null;
//ARTIFACT CORRECTION
//Do we need a corner point?
if (startLine.X2 == mainWindow.WindowTopLeft.X && checkFace.endLine.Y2 == mainWindow.WindowTopLeft.Y)
polygonPoints.Add(mainWindow.WindowTopLeft);
else if (checkFace.endLine.X2 == mainWindow.WindowBottomRight.X && startLine.Y2 == mainWindow.WindowTopLeft.Y)
polygonPoints.Add(new Point(mainWindow.WindowBottomRight.X, mainWindow.WindowTopLeft.Y));
else if (startLine.X2 == mainWindow.WindowBottomRight.X && checkFace.endLine.Y2 == mainWindow.WindowBottomRight.Y)
polygonPoints.Add(mainWindow.WindowBottomRight);
else if (checkFace.endLine.X2 == mainWindow.WindowTopLeft.X && startLine.Y2 == mainWindow.WindowBottomRight.Y)
polygonPoints.Add(new Point(mainWindow.WindowTopLeft.X, mainWindow.WindowBottomRight.Y));
//Do we need 2 corner points?
if (checkFace.endLine.X2 == mainWindow.WindowTopLeft.X && startLine.X2 == mainWindow.WindowBottomRight.X)
{
polygonPoints.Add(new Point(mainWindow.WindowTopLeft.X, mainWindow.WindowBottomRight.Y));
polygonPoints.Add(mainWindow.WindowBottomRight);
}
if (startLine.X2 == mainWindow.WindowTopLeft.X && checkFace.endLine.X2 == mainWindow.WindowBottomRight.X)
{
polygonPoints.Add(new Point(mainWindow.WindowBottomRight.X, mainWindow.WindowTopLeft.Y));
polygonPoints.Add(mainWindow.WindowTopLeft);
}
if (startLine.Y2 == mainWindow.WindowTopLeft.Y && checkFace.endLine.Y2 == mainWindow.WindowBottomRight.Y)
{
polygonPoints.Add(mainWindow.WindowBottomRight);
polygonPoints.Add(new Point(mainWindow.WindowBottomRight.X, mainWindow.WindowTopLeft.Y));
}
if (checkFace.endLine.Y2 == mainWindow.WindowTopLeft.Y && startLine.Y2 == mainWindow.WindowBottomRight.Y)
{
polygonPoints.Add(mainWindow.WindowTopLeft);
polygonPoints.Add(new Point(mainWindow.WindowTopLeft.X, mainWindow.WindowBottomRight.Y));
}
//And the last point to bring 'er home.
polygonPoints.Add(new Point(startLine.X2, startLine.Y2));
p.Points = polygonPoints;
p.Stroke = Brushes.Black;
p.Fill = Brushes.Black;
p.Opacity = 0.4;
return p;
}
}
}
@@ -1,7 +0,0 @@
<Window x:Class="ViewOcclusionTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="660" Width="660">
<Canvas Name="canvas">
</Canvas>
</Window>
@@ -1,213 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ViewOcclusionTest
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public int TileSize = 15;
public DateTime lastUpdate;
public DateTime lastDraw;
public DateTime lastDataUpdate;
public Tile[,] tileArray;
public Point arrayDims;
public Point viewPoint;
public Ellipse viewer;
public Point WindowTopLeft;
public Point WindowBottomRight;
public List<Polygon> occlusionPolys;
public MainWindow()
{
arrayDims = new Point(60, 60);
tileArray = new Tile[60, 60];
InitializeComponent();
Initialize();
CompositionTarget.Rendering += Update;
MouseDown += MouseDownEventHandler;
}
public void Initialize()
{
//Set up viewpoint dot
viewer = new Ellipse();
viewer.Width = 5;
viewer.Height = 5;
viewer.Stroke = Brushes.Red;
viewer.Fill = Brushes.Red;
canvas.Children.Add(viewer);
Canvas.SetZIndex(viewer, 10);
setViewPoint(new Point(300, 300), true);
occlusionPolys = new List<Polygon>();
lastUpdate = DateTime.Now;
lastDraw = DateTime.Now;
lastDataUpdate = DateTime.Now;
Rectangle r;
for (int i = 0; i < arrayDims.X; i++)
{
for (int j = 0; j < arrayDims.Y; j++)
{
r = new Rectangle();
r.Width = TileSize;
r.Height = TileSize;
canvas.Children.Add(r);
Canvas.SetLeft(r, (double)i * TileSize);
Canvas.SetTop(r, (double)j * TileSize);
Canvas.SetZIndex(r, 1);
tileArray[i, j] = new Tile(i,j,r,this);
tileArray[i, j].IsSolid = false;
}
}
Random rand = new Random();
for (int i = 0; i < 400; i++)
{
tileArray[rand.Next(0, (int)arrayDims.X), rand.Next(0, (int)arrayDims.Y)].IsSolid = true;
}
CullViewFrustum();
}
private void MouseDownEventHandler(object sender, MouseEventArgs e)
{
Point p = e.GetPosition(this);
if (e.LeftButton == MouseButtonState.Pressed)
setViewPoint(p);
if (e.RightButton == MouseButtonState.Pressed)
DebugTile(e.GetPosition(this));
}
public void Update(object sender, EventArgs e)
{
if (Keyboard.IsKeyDown(Key.A) && viewPoint.X >= 1)
setViewPoint(new Point(viewPoint.X - 3, viewPoint.Y));
if (Keyboard.IsKeyDown(Key.D) && viewPoint.X <= 650)
setViewPoint(new Point(viewPoint.X + 3, viewPoint.Y));
if (Keyboard.IsKeyDown(Key.W) && viewPoint.Y >= 1)
setViewPoint(new Point(viewPoint.X, viewPoint.Y - 3));
if (Keyboard.IsKeyDown(Key.S) && viewPoint.Y <= 650)
setViewPoint(new Point(viewPoint.X, viewPoint.Y + 3));
}
public void CullViewFrustum()
{
//Populate faces
for (int i = 0; i < arrayDims.X; i++)
{
for (int j = 0; j < arrayDims.Y; j++)
{
tileArray[i, j].PopulateOverlapFaces();
}
}
for (int i = 0; i < arrayDims.X; i++)
{
for (int j = 0; j < arrayDims.Y; j++)
{
tileArray[i, j].IsInWindow = false;
tileArray[i, j].RemoveLines();
}
}
foreach (Polygon p in occlusionPolys)
{
canvas.Children.Remove(p);
}
occlusionPolys = new List<Polygon>();
/*for (int i = 0; i < arrayDims.X; i++)
{
for (int j = 0; j < arrayDims.Y; j++)
{*/
var solidsInWindow = from Tile t in tileArray
where t.x * TileSize < WindowBottomRight.X
&& t.x * TileSize > WindowTopLeft.X
&& t.y * TileSize < WindowBottomRight.Y
&& t.y * TileSize > WindowTopLeft.Y
orderby Math.Sqrt(Math.Pow(viewPoint.X - t.x * TileSize, 2) + Math.Pow(viewPoint.Y - t.y * TileSize, 2)) ascending
select t;
foreach (var tile in solidsInWindow)
{
tile.IsInWindow = true;
tile.DrawLines();
}
foreach (var tile in solidsInWindow)
{
bool occluded = false;
foreach (Polygon poly in occlusionPolys)
{
if (tile.isInPolygon(poly.Points))
{
occluded = true;
continue;
}
}
if (occluded)
tile.IsInWindow = false;
if (!occluded)
{
Polygon p = tile.GetOcclusionPoly();
if (p != null)
occlusionPolys.Add(p);
}
}
/*}
}
*/
foreach (Polygon p in occlusionPolys)
{
canvas.Children.Add(p);
Canvas.SetZIndex(p, 40);
}
}
public void setViewPoint(Point p, bool initial = false)
{
viewPoint = p;
Canvas.SetLeft(viewer, p.X);
Canvas.SetTop(viewer, p.Y);
//Set window
WindowTopLeft = new Point(p.X - 200, p.Y - 200);
WindowBottomRight = new Point(p.X + 160, p.Y + 160);
if(!initial)
CullViewFrustum();
}
public void DebugTile(Point p)
{
int x = (int)Math.Round(p.X / TileSize, 0);
int y = (int)Math.Round(p.Y / TileSize, 0);
Tile t = tileArray[x, y];
Polygon poly = t.GetOcclusionPoly();
int i = 1;
}
}
}
@@ -1,55 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 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("ViewOcclusionTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ViewOcclusionTest")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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")]
@@ -1,71 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ViewOcclusionTest.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ViewOcclusionTest.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ViewOcclusionTest.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
@@ -1,306 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ViewOcclusionTest
{
public class Tile
{
public int x;
public int y;
public Rectangle rect;
public Tile[,] tileArray;
public int tileSize;
private bool solid;
public MainWindow mainWindow;
public Polygon poly;
Canvas canvas;
//FACES
Face faceN = null;
Face faceE = null;
Face faceS = null;
Face faceW = null;
public bool IsSolid
{
get { return solid; }
set
{
solid = value;
if (solid)
{
GenerateFaces();
PopulateOverlapFaces();
}
else
{
//Clear faces
if (faceN != null && faceN.over != null)
faceN.over.over = null;
faceN = null;
if (faceS != null && faceS.over != null)
faceS.over.over = null;
faceS = null;
if (faceE != null && faceE.over != null)
faceE.over.over = null;
faceE = null;
if (faceW != null && faceW.over != null)
faceW.over.over = null;
faceW = null;
}
if(!inwindow)
return;
}
}
private bool inwindow = true;
public bool IsInWindow
{
get { return inwindow; }
set
{
inwindow = value;
if (inwindow)
{
SetSolidDisplay(solid);
}
else
{
rect.Fill = Brushes.White;
rect.Stroke = Brushes.White;
}
}
}
public void SetSolidDisplay(bool display)
{
if(display)
{
rect.Fill = Brushes.Black;
rect.Stroke = Brushes.White;
}
else
{
rect.Fill = Brushes.White;
rect.Stroke = Brushes.White;
}
}
public Tile(int _x, int _y, Rectangle _rect, MainWindow _mainWindow)
{
x = _x; // These are the array coords
y = _y;
rect = _rect;
mainWindow = _mainWindow;
tileArray = mainWindow.tileArray;
tileSize = mainWindow.TileSize;
canvas = mainWindow.canvas;
}
public void GenerateFaces()
{
//Faces are defined as the start point and the next adjoining face. We're only dealing with squares so no need to do lots of general poly shite.
//The point defined per face is the right vertex of the face as if you were inside the square.
faceW = new Face(mainWindow);
faceW.x = x * tileSize;
faceW.y = y * tileSize;
faceS = new Face(mainWindow);
faceS.x = x * tileSize;
faceS.y = (y + 1) * tileSize;
faceE = new Face(mainWindow);
faceE.x = (x + 1) * tileSize;
faceE.y = (y + 1) * tileSize;
faceN = new Face(mainWindow);
faceN.x = (x + 1) * tileSize;
faceN.y = y * tileSize;
faceW.next = faceS;
faceS.next = faceE;
faceE.next = faceN;
faceN.next = faceW;
}
/// <summary>
/// Populate overlapping faces
/// </summary>
public void PopulateOverlapFaces()
{
//North
if (y > 0 && faceN != null)
faceN.over = tileArray[x, y - 1].faceS;
//South
if (y < mainWindow.arrayDims.Y - 1 && faceS != null)
faceS.over = tileArray[x, y + 1].faceN;
//East
if (x < mainWindow.arrayDims.X - 1 && faceE != null)
faceE.over = tileArray[x + 1, y].faceW;
//West
if (x > 0 && faceW != null)
faceW.over = tileArray[x - 1, y].faceE;
}
public void DrawLines()
{
if (!IsSolid)
return;
if (IsInWindow)
{
DrawViewLines();
}
else
{
RemoveLines();
}
}
public void DrawViewLines()
{
if(!IsSolid)
return;
Point vp = mainWindow.viewPoint;
//Draw endpoints.
if (faceW.IsFacing(vp) && !faceW.next.IsFacing(vp) && faceW.over == null && faceW.GetAdjacentFace(false) == null)
faceW.DrawViewLine(Face.ViewLines.endpoint);
if (faceS.IsFacing(vp) && !faceS.next.IsFacing(vp) && faceS.over == null && faceS.GetAdjacentFace(false) == null)
faceS.DrawViewLine(Face.ViewLines.endpoint);
if (faceE.IsFacing(vp) && !faceE.next.IsFacing(vp) && faceE.over == null && faceE.GetAdjacentFace(false) == null)
faceE.DrawViewLine(Face.ViewLines.endpoint);
if (faceN.IsFacing(vp) && !faceN.next.IsFacing(vp) && faceN.over == null && faceN.GetAdjacentFace(false) == null)
faceN.DrawViewLine(Face.ViewLines.endpoint);
//Draw startpoints.
if (faceW.IsFacing(vp) && !faceW.next.next.next.IsFacing(vp) && faceW.over == null && faceW.GetAdjacentFace(true) == null)
faceW.DrawViewLine(Face.ViewLines.origin);
if (faceS.IsFacing(vp) && !faceS.next.next.next.IsFacing(vp) && faceS.over == null && faceS.GetAdjacentFace(true) == null)
faceS.DrawViewLine(Face.ViewLines.origin);
if (faceE.IsFacing(vp) && !faceE.next.next.next.IsFacing(vp) && faceE.over == null && faceE.GetAdjacentFace(true) == null)
faceE.DrawViewLine(Face.ViewLines.origin);
if (faceN.IsFacing(vp) && !faceN.next.next.next.IsFacing(vp) && faceN.over == null && faceN.GetAdjacentFace(true) == null)
faceN.DrawViewLine(Face.ViewLines.origin);
}
public void RemoveOcclusionPoly()
{
if (poly != null)
{
canvas.Children.Remove(poly);
poly = null;
}
}
public Polygon GetOcclusionPoly()
{
if (!IsSolid || !IsInWindow)
return null;
RemoveOcclusionPoly();
if (faceW.startLine != null)
poly = faceW.GetOcclusionPoly();
if (faceS.startLine != null)
poly = faceS.GetOcclusionPoly();
if (faceE.startLine != null)
poly = faceE.GetOcclusionPoly();
if (faceN.startLine != null)
poly = faceN.GetOcclusionPoly();
if (poly != null)
{
//canvas.Children.Add(poly);
return poly;
//Canvas.SetZIndex(poly, 40);
}
return null;
}
public void RemoveLines()
{
if (!IsSolid)
return;
faceW.RemoveLines();
faceS.RemoveLines();
faceE.RemoveLines();
faceN.RemoveLines();
}
public enum Faces
{
west,
south,
east,
north
}
public bool isInPolygon(PointCollection points)
{
return (pointsInPolygon(x * mainWindow.TileSize, y * mainWindow.TileSize, points)
&& pointsInPolygon((x + 1) * mainWindow.TileSize, (y + 1) * mainWindow.TileSize, points)
&& pointsInPolygon((x + 1) * mainWindow.TileSize, (y) * mainWindow.TileSize, points)
&& pointsInPolygon((x) * mainWindow.TileSize, (y + 1) * mainWindow.TileSize, points));
}
// Globals which should be set before calling this function:
//
// int polySides = how many corners the polygon has
// float polyX[] = horizontal coordinates of corners
// float polyY[] = vertical coordinates of corners
// float x, y = point to be tested
//
// (Globals are used in this example for purposes of speed. Change as
// desired.)
//
// The function will return YES if the point x,y is inside the polygon, or
// NO if it is not. If the point is exactly on the edge of the polygon,
// then the function may return YES or NO.
//
// Note that division by zero is avoided because the division is protected
// by the "if" clause which surrounds it.
public bool pointsInPolygon(double X, double Y, PointCollection points)
{
int polySides = points.Count;
//double Y = y * mainWindow.TileSize;
//double X = x * mainWindow.TileSize;
int i, j = polySides - 1;
bool oddNodes = false;
for (i = 0; i < polySides; i++)
{
if ((points[i].Y < Y && points[j].Y >= Y
|| points[j].Y < Y && points[i].Y >= Y)
&& (points[i].X <= X || points[j].X <= X))
{
if (points[i].X + (Y - points[i].Y) / (points[j].Y - points[i].Y) * (points[j].X - points[i].X) < X)
{
oddNodes = !oddNodes;
}
}
j = i;
}
return oddNodes;
}
}
}
@@ -1,105 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0DAB21AA-EAD8-4FCB-BFAC-82DC931CA0CC}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ViewOcclusionTest</RootNamespace>
<AssemblyName>ViewOcclusionTest</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Face.cs" />
<Compile Include="Tile.cs" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</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>