Przeglądaj źródła

Removing old MonoGameSamples folder

Simon (darkside) Jackson 5 lat temu
rodzic
commit
5d46b34996
100 zmienionych plików z 0 dodań i 7056 usunięć
  1. 0 60
      MonoGameSamples/LocalizationSample/Content/BasicSpriteFont.spritefont
  2. 0 137
      MonoGameSamples/LocalizationSample/Content/Content.mgcb
  3. BIN
      MonoGameSamples/LocalizationSample/Content/Flag.da.png
  4. BIN
      MonoGameSamples/LocalizationSample/Content/Flag.en-GB.png
  5. BIN
      MonoGameSamples/LocalizationSample/Content/Flag.en-US.png
  6. BIN
      MonoGameSamples/LocalizationSample/Content/Flag.fr.png
  7. BIN
      MonoGameSamples/LocalizationSample/Content/Flag.ja.png
  8. BIN
      MonoGameSamples/LocalizationSample/Content/Flag.ko.png
  9. BIN
      MonoGameSamples/LocalizationSample/Content/Flag.png
  10. 0 58
      MonoGameSamples/LocalizationSample/Content/LocalizedFont.spritefont
  11. 0 90
      MonoGameSamples/LocalizationSample/Content/Strings.Designer.cs
  12. 0 129
      MonoGameSamples/LocalizationSample/Content/Strings.da.resx
  13. 0 130
      MonoGameSamples/LocalizationSample/Content/Strings.fr.resx
  14. 0 129
      MonoGameSamples/LocalizationSample/Content/Strings.ja.resx
  15. 0 129
      MonoGameSamples/LocalizationSample/Content/Strings.ko.resx
  16. 0 129
      MonoGameSamples/LocalizationSample/Content/Strings.resx
  17. 0 58
      MonoGameSamples/LocalizationSample/Content/WPFFont.spritefont
  18. BIN
      MonoGameSamples/LocalizationSample/Content/XANO-mincho-U32.ttf
  19. BIN
      MonoGameSamples/LocalizationSample/Content/kochi-mincho-subst.ttf
  20. BIN
      MonoGameSamples/LocalizationSample/Content/meiryo Font Download.ttc
  21. BIN
      MonoGameSamples/LocalizationSample/LocalizationLinux/Icon.ico
  22. 0 103
      MonoGameSamples/LocalizationSample/LocalizationLinux/LocalizationLinux.csproj
  23. 0 25
      MonoGameSamples/LocalizationSample/LocalizationLinux/OpenTK.dll.config
  24. 0 21
      MonoGameSamples/LocalizationSample/LocalizationLinux/Program.cs
  25. 0 39
      MonoGameSamples/LocalizationSample/LocalizationLinux/Properties/AssemblyInfo.cs
  26. 0 59
      MonoGameSamples/LocalizationSample/LocalizationPipeline/LocalizationPipeline.csproj
  27. 0 53
      MonoGameSamples/LocalizationSample/LocalizationPipeline/LocalizedFontDescription.cs
  28. 0 83
      MonoGameSamples/LocalizationSample/LocalizationPipeline/LocalizedFontProcessor.cs
  29. 0 35
      MonoGameSamples/LocalizationSample/LocalizationPipeline/Properties/AssemblyInfo.cs
  30. 0 91
      MonoGameSamples/LocalizationSample/LocalizationSample.md
  31. 0 55
      MonoGameSamples/LocalizationSample/LocalizationSample.sln
  32. BIN
      MonoGameSamples/LocalizationSample/LocalizationWindows/Icon.ico
  33. BIN
      MonoGameSamples/LocalizationSample/LocalizationWindows/Localization.png
  34. 0 97
      MonoGameSamples/LocalizationSample/LocalizationWindows/LocalizationWindows.csproj
  35. 0 23
      MonoGameSamples/LocalizationSample/LocalizationWindows/Program.cs
  36. 0 38
      MonoGameSamples/LocalizationSample/LocalizationWindows/Properties/AssemblyInfo.cs
  37. 0 175
      MonoGameSamples/LocalizationSample/SampleCode/Game1.cs
  38. 0 254
      MonoGameSamples/LocalizationSample/WpfFontPipeline/BoxLayouter.cs
  39. 0 178
      MonoGameSamples/LocalizationSample/WpfFontPipeline/JisCode.cs
  40. 0 42
      MonoGameSamples/LocalizationSample/WpfFontPipeline/LocalizedFontDescription.cs
  41. 0 35
      MonoGameSamples/LocalizationSample/WpfFontPipeline/Properties/AssemblyInfo.cs
  42. 0 137
      MonoGameSamples/LocalizationSample/WpfFontPipeline/SingleColorDxtCompressor.cs
  43. 0 920
      MonoGameSamples/LocalizationSample/WpfFontPipeline/WpfFontDescriptionProcessor.cs
  44. 0 65
      MonoGameSamples/LocalizationSample/WpfFontPipeline/WpfFontPipeline.csproj
  45. 0 125
      MonoGameSamples/LocalizationSample/WpfFontPipeline/WpfSpriteFontContent.cs
  46. 0 124
      MonoGameSamples/Riemers/Series_0_Shooters/Content/Content.mgcb
  47. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/background.jpg
  48. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/cannon.png
  49. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/carriage.png
  50. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/explosion.png
  51. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/foreground.png
  52. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/ground.jpg
  53. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/hitcannon.wav
  54. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/hitterrain.wav
  55. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/launch.wav
  56. 0 60
      MonoGameSamples/Riemers/Series_0_Shooters/Content/myFont.spritefont
  57. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/rocket.png
  58. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Content/smoke.png
  59. 0 697
      MonoGameSamples/Riemers/Series_0_Shooters/Game1.cs
  60. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Icon.bmp
  61. BIN
      MonoGameSamples/Riemers/Series_0_Shooters/Icon.ico
  62. 0 14
      MonoGameSamples/Riemers/Series_0_Shooters/Program.cs
  63. 0 30
      MonoGameSamples/Riemers/Series_0_Shooters/Series_0_Shooters.csproj
  64. 0 43
      MonoGameSamples/Riemers/Series_0_Shooters/app.manifest
  65. 0 33
      MonoGameSamples/Riemers/Series_1_Terrain/Content/Content.mgcb
  66. 0 282
      MonoGameSamples/Riemers/Series_1_Terrain/Content/effects.fx
  67. BIN
      MonoGameSamples/Riemers/Series_1_Terrain/Content/heightmap.bmp
  68. 0 253
      MonoGameSamples/Riemers/Series_1_Terrain/Game1.cs
  69. BIN
      MonoGameSamples/Riemers/Series_1_Terrain/Icon.bmp
  70. BIN
      MonoGameSamples/Riemers/Series_1_Terrain/Icon.ico
  71. 0 14
      MonoGameSamples/Riemers/Series_1_Terrain/Program.cs
  72. 0 30
      MonoGameSamples/Riemers/Series_1_Terrain/Series_1_Terrain.csproj
  73. 0 43
      MonoGameSamples/Riemers/Series_1_Terrain/app.manifest
  74. 0 174
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/Content.mgcb
  75. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/bullet.jpg
  76. 0 282
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/effects.fx
  77. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/riemerstexture.bmp
  78. 0 433
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox.x
  79. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_back.JPG
  80. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_bottom.JPG
  81. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_front.JPG
  82. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_left.JPG
  83. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_right.JPG
  84. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_top.JPG
  85. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/target.x
  86. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/texturemap.jpg
  87. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Content/xwing.x
  88. 0 601
      MonoGameSamples/Riemers/Series_2_Flightsim/Game1.cs
  89. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Icon.bmp
  90. BIN
      MonoGameSamples/Riemers/Series_2_Flightsim/Icon.ico
  91. 0 14
      MonoGameSamples/Riemers/Series_2_Flightsim/Program.cs
  92. 0 30
      MonoGameSamples/Riemers/Series_2_Flightsim/Series_2_Flightsim.csproj
  93. 0 43
      MonoGameSamples/Riemers/Series_2_Flightsim/app.manifest
  94. 0 15
      MonoGameSamples/Riemers/Series_3_HLSL/Content/Content.mgcb
  95. 0 52
      MonoGameSamples/Riemers/Series_3_HLSL/Game1.cs
  96. BIN
      MonoGameSamples/Riemers/Series_3_HLSL/Icon.bmp
  97. BIN
      MonoGameSamples/Riemers/Series_3_HLSL/Icon.ico
  98. 0 14
      MonoGameSamples/Riemers/Series_3_HLSL/Program.cs
  99. 0 30
      MonoGameSamples/Riemers/Series_3_HLSL/Series_3_HLSL.csproj
  100. 0 43
      MonoGameSamples/Riemers/Series_3_HLSL/app.manifest

+ 0 - 60
MonoGameSamples/LocalizationSample/Content/BasicSpriteFont.spritefont

@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-This file contains an xml description of a font, and will be read by the XNA
-Framework Content Pipeline. Follow the comments to customize the appearance
-of the font in your game, and to change the characters which are available to draw
-with.
--->
-<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
-  <Asset Type="Graphics:FontDescription">
-
-    <!--
-    Modify this string to change the font that will be imported.
-    -->
-    <FontName>Arial</FontName>
-
-    <!--
-    Size is a float value, measured in points. Modify this value to change
-    the size of the font.
-    -->
-    <Size>12</Size>
-
-    <!--
-    Spacing is a float value, measured in pixels. Modify this value to change
-    the amount of spacing in between characters.
-    -->
-    <Spacing>0</Spacing>
-
-    <!--
-    UseKerning controls the layout of the font. If this value is true, kerning information
-    will be used when placing characters.
-    -->
-    <UseKerning>true</UseKerning>
-
-    <!--
-    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
-    and "Bold, Italic", and are case sensitive.
-    -->
-    <Style>Regular</Style>
-
-    <!--
-    If you uncomment this line, the default character will be substituted if you draw
-    or measure text that contains characters which were not included in the font.
-    -->
-    <!-- <DefaultCharacter>*</DefaultCharacter> -->
-
-    <!--
-    CharacterRegions control what letters are available in the font. Every
-    character from Start to End will be built and made available for drawing. The
-    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
-    character set. The characters are ordered according to the Unicode standard.
-    See the documentation for more information.
-    -->
-    <CharacterRegions>
-      <CharacterRegion>
-        <Start>&#32;</Start>
-        <End>&#126;</End>
-      </CharacterRegion>
-    </CharacterRegions>
-  </Asset>
-</XnaContent>

+ 0 - 137
MonoGameSamples/LocalizationSample/Content/Content.mgcb

@@ -1,137 +0,0 @@
-
-#----------------------------- Global Properties ----------------------------#
-
-/outputDir:bin/$(Platform)
-/intermediateDir:obj/$(Platform)
-/platform:DesktopGL
-/config:
-/profile:Reach
-/compress:False
-
-#-------------------------------- References --------------------------------#
-
-/reference:..\LocalizationPipeline\bin\Release\LocalizationPipeline.dll
-/reference:..\WpfFontPipeline\bin\Release\WpfFontPipeline.dll
-
-#---------------------------------- Content ---------------------------------#
-
-#begin Flag.fr.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:Flag.fr.png
-
-#begin Flag.ja.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:Flag.ja.png
-
-#begin Flag.ko.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:Flag.ko.png
-
-#begin Flag.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:Flag.png
-
-#begin Flag.da.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:Flag.da.png
-
-#begin Flag.en-GB.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:Flag.en-GB.png
-
-#begin Flag.en-US.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:Flag.en-US.png
-
-#begin LocalizedFont.spritefont
-/importer:FontDescriptionImporter
-/processor:LocalizedFontProcessor
-/build:LocalizedFont.spritefont
-
-#begin WPFFont.spritefont
-/importer:FontDescriptionImporter
-/processor:WpfFontDescriptionProcessor
-/processorParam:HasAsciiCharacters=True
-/processorParam:HasZenkakuLatinLetters=False
-/processorParam:HasSpecialCharacters=False
-/processorParam:HasHiragana=False
-/processorParam:HasKatakana=False
-/processorParam:HasJisKanjiLevel1=False
-/processorParam:HasJisKanjiLevel2=False
-/processorParam:HasGreekLetters=False
-/processorParam:HasCyrillicLetters=False
-/processorParam:HasBoxCharacters=False
-/processorParam:OutlineThickness=0
-/processorParam:OutlineColor=64,64,64,255
-/processorParam:OutlineShape=Miter
-/processorParam:OutlineStroke=StrokeOverFill
-/processorParam:FontColor=255,255,255,255
-/processorParam:UseGradient=False
-/processorParam:GradientBeginColor=64,128,255,255
-/processorParam:GradientEndColor=0,0,128,255
-/processorParam:GradientAngle=90
-/processorParam:TextureFormat=Auto
-/build:WPFFont.spritefont
-
-#begin BasicSpriteFont.spritefont
-/importer:FontDescriptionImporter
-/processor:FontDescriptionProcessor
-/processorParam:TextureFormat=Compressed
-/build:BasicSpriteFont.spritefont
-

BIN
MonoGameSamples/LocalizationSample/Content/Flag.da.png


BIN
MonoGameSamples/LocalizationSample/Content/Flag.en-GB.png


BIN
MonoGameSamples/LocalizationSample/Content/Flag.en-US.png


BIN
MonoGameSamples/LocalizationSample/Content/Flag.fr.png


BIN
MonoGameSamples/LocalizationSample/Content/Flag.ja.png


BIN
MonoGameSamples/LocalizationSample/Content/Flag.ko.png


BIN
MonoGameSamples/LocalizationSample/Content/Flag.png


+ 0 - 58
MonoGameSamples/LocalizationSample/Content/LocalizedFont.spritefont

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<XnaContent>
-  <Asset Type="LocalizationPipeline.LocalizedFontDescription">
-
-    <!--
-    Define which font we want to build.
-    -->
-    <FontName>Segoe UI Mono</FontName>
-    <Size>12</Size>
-    <Spacing>0</Spacing>
-    <UseKerning>true</UseKerning>
-    <Style>Regular</Style>
-
-    
-    <!--
-    This default character is substituted if the game tries to draw
-    characters that were not included in the font. If you do not set
-    a default, trying to draw such text will throw an exception instead.
-    -->
-    <DefaultCharacter>?</DefaultCharacter>
-
-    
-    <!--
-    Specify which characters should be included in the font. This version just
-    requests the standard ASCII character range (also known as Unicode Basic
-    Latin), but you can add any other regions or even individual characters
-    in here. See http://unicode.org/charts/ for a complete list.
-    -->
-    <CharacterRegions>
-      <CharacterRegion>
-        <Start>&#32;</Start>
-        <End>&#126;</End>
-      </CharacterRegion>
-    </CharacterRegions>
-
-    
-    <!--
-    This information is not part of a normal .spritefont file, but was added by our
-    custom LocalizedFontDescription class, and used by the LocalizedFontProcessor.
-    Rather than having to manually specify hundreds of different character regions,
-    we can simply tell the processor what .resx files our game is going to load text
-    from. The processor will scan these resources, see what characters they use, and
-    automatically add the necessary characters to the font. This is especially useful
-    for languages such as Japanese and Korean, which have potentially thousands of
-    different characters, although games typically only use a small fraction of these.
-    Building only the characters we need is far more efficient than if we tried to
-    include the entire CJK character region.
-    -->
-    <ResourceFiles>
-      <Resx>Strings.resx</Resx>
-      <Resx>Strings.da.resx</Resx>
-      <Resx>Strings.fr.resx</Resx>
-      <Resx>Strings.ja.resx</Resx>
-      <Resx>Strings.ko.resx</Resx>
-    </ResourceFiles>
-    
-  </Asset>
-</XnaContent>

+ 0 - 90
MonoGameSamples/LocalizationSample/Content/Strings.Designer.cs

@@ -1,90 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace LocalizationSample {
-    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 Strings {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Strings() {
-        }
-        
-        /// <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("LocalizationSample.Strings", typeof(Strings).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Current culture: {0}.
-        /// </summary>
-        internal static string CurrentLocale {
-            get {
-                return ResourceManager.GetString("CurrentLocale", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to To change this, alter your system settings, then restart the sample.
-        /// </summary>
-        internal static string HowToChange {
-            get {
-                return ResourceManager.GetString("HowToChange", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Welcome to the localization sample!.
-        /// </summary>
-        internal static string Welcome {
-            get {
-                return ResourceManager.GetString("Welcome", resourceCulture);
-            }
-        }
-    }
-}

+ 0 - 129
MonoGameSamples/LocalizationSample/Content/Strings.da.resx

@@ -1,129 +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>
-  <data name="CurrentLocale" xml:space="preserve">
-    <value>Nuværende kultur: {0}</value>
-  </data>
-  <data name="HowToChange" xml:space="preserve">
-    <value>For at ændre denne, skift system instillinger og genstart eksemplet</value>
-  </data>
-  <data name="Welcome" xml:space="preserve">
-    <value>Velkommen til lokaliserings eksemplet!</value>
-  </data>
-</root>

+ 0 - 130
MonoGameSamples/LocalizationSample/Content/Strings.fr.resx

@@ -1,130 +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>
-  <data name="CurrentLocale" xml:space="preserve">
-    <value>Localisé en: {0}</value>
-  </data>
-  <data name="HowToChange" xml:space="preserve">
-    <value>Pour changer cette valeur modifiez vos paramètres
-système puis redémarrez cet exemple</value>
-  </data>
-  <data name="Welcome" xml:space="preserve">
-    <value>Bienvenue dans l'exemple de localisation!</value>
-  </data>
-</root>

+ 0 - 129
MonoGameSamples/LocalizationSample/Content/Strings.ja.resx

@@ -1,129 +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>
-  <data name="CurrentLocale" xml:space="preserve">
-    <value>現在のローケル: {0}</value>
-  </data>
-  <data name="HowToChange" xml:space="preserve">
-    <value>この設定を変更するにはシステム設定を変更し、サンプルを再実行してください。</value>
-  </data>
-  <data name="Welcome" xml:space="preserve">
-    <value>ローカライズサンプルへようこそ!</value>
-  </data>
-</root>

+ 0 - 129
MonoGameSamples/LocalizationSample/Content/Strings.ko.resx

@@ -1,129 +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>
-  <data name="CurrentLocale" xml:space="preserve">
-    <value>현재 언어: {0}</value>
-  </data>
-  <data name="HowToChange" xml:space="preserve">
-    <value>변경을 위해서는, 시스템 설정을 바꿔야 합니다, 그리고 샘플을 재시동하십시오</value>
-  </data>
-  <data name="Welcome" xml:space="preserve">
-    <value>번역 샘플을 환영합니다!</value>
-  </data>
-</root>

+ 0 - 129
MonoGameSamples/LocalizationSample/Content/Strings.resx

@@ -1,129 +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>
-  <data name="CurrentLocale" xml:space="preserve">
-    <value>Current culture: {0}</value>
-  </data>
-  <data name="HowToChange" xml:space="preserve">
-    <value>To change this, alter your system settings, then restart the sample</value>
-  </data>
-  <data name="Welcome" xml:space="preserve">
-    <value>Welcome to the localization sample!</value>
-  </data>
-</root>

+ 0 - 58
MonoGameSamples/LocalizationSample/Content/WPFFont.spritefont

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<XnaContent>
-  <Asset Type="WpfFontPipeline.LocalizedFontDescription">
-
-    <!--
-    Define which font we want to build.
-    -->
-    <FontName>Segoe UI Mono</FontName>
-    <Size>12</Size>
-    <Spacing>0</Spacing>
-    <UseKerning>true</UseKerning>
-    <Style>Regular</Style>
-
-    
-    <!--
-    This default character is substituted if the game tries to draw
-    characters that were not included in the font. If you do not set
-    a default, trying to draw such text will throw an exception instead.
-    -->
-    <DefaultCharacter>?</DefaultCharacter>
-
-    
-    <!--
-    Specify which characters should be included in the font. This version just
-    requests the standard ASCII character range (also known as Unicode Basic
-    Latin), but you can add any other regions or even individual characters
-    in here. See http://unicode.org/charts/ for a complete list.
-    -->
-    <CharacterRegions>
-      <CharacterRegion>
-        <Start>&#32;</Start>
-        <End>&#126;</End>
-      </CharacterRegion>
-    </CharacterRegions>
-
-    
-    <!--
-    This information is not part of a normal .spritefont file, but was added by our
-    custom LocalizedFontDescription class, and used by the LocalizedFontProcessor.
-    Rather than having to manually specify hundreds of different character regions,
-    we can simply tell the processor what .resx files our game is going to load text
-    from. The processor will scan these resources, see what characters they use, and
-    automatically add the necessary characters to the font. This is especially useful
-    for languages such as Japanese and Korean, which have potentially thousands of
-    different characters, although games typically only use a small fraction of these.
-    Building only the characters we need is far more efficient than if we tried to
-    include the entire CJK character region.
-    -->
-    <ResourceFiles>
-      <Resx>Strings.resx</Resx>
-      <Resx>Strings.da.resx</Resx>
-      <Resx>Strings.fr.resx</Resx>
-      <Resx>Strings.ja.resx</Resx>
-      <Resx>Strings.ko.resx</Resx>
-    </ResourceFiles>
-    
-  </Asset>
-</XnaContent>

BIN
MonoGameSamples/LocalizationSample/Content/XANO-mincho-U32.ttf


BIN
MonoGameSamples/LocalizationSample/Content/kochi-mincho-subst.ttf


BIN
MonoGameSamples/LocalizationSample/Content/meiryo Font Download.ttc


BIN
MonoGameSamples/LocalizationSample/LocalizationLinux/Icon.ico


+ 0 - 103
MonoGameSamples/LocalizationSample/LocalizationLinux/LocalizationLinux.csproj

@@ -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">
-  <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
-    <ProductVersion>8.0.30703</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{46AA79C4-86AB-4A40-9C25-AF8DCC2F4D7B}</ProjectGuid>
-    <OutputType>WinExe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>LocalizationSample</RootNamespace>
-    <AssemblyName>LocalizationSample</AssemblyName>
-    <FileAlignment>512</FileAlignment>
-    <MonoGamePlatform>DesktopGL</MonoGamePlatform>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <PlatformTarget>x86</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
-    <DefineConstants>DEBUG;TRACE;LINUX</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\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
-    <DefineConstants>TRACE;LINUX</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup>
-    <ApplicationIcon>Icon.ico</ApplicationIcon>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="..\Content\Strings.Designer.cs">
-      <Link>Strings.Designer.cs</Link>
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Strings.resx</DependentUpon>
-    </Compile>
-    <Compile Include="..\SampleCode\Game1.cs">
-      <Link>Game1.cs</Link>
-    </Compile>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Reference Include="OpenTK">
-      <HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\OpenTK.dll</HintPath>
-    </Reference>
-    <Reference Include="NVorbis">
-      <HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\NVorbis.dll</HintPath>
-    </Reference>
-    <Reference Include="MonoGame.Framework">
-      <HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\MonoGame.Framework.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="..\Content\Strings.da.resx">
-      <Link>Strings.da.resx</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Content\Strings.fr.resx">
-      <Link>Strings.fr.resx</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Content\Strings.ja.resx">
-      <Link>Strings.ja.resx</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Content\Strings.ko.resx">
-      <Link>Strings.ko.resx</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Content\Strings.resx">
-      <Link>Strings.resx</Link>
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Strings.Designer.cs</LastGenOutput>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Icon.ico" />
-    <Content Include="OpenTK.dll.config">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-  </ItemGroup>
-  <ItemGroup>
-    <MonoGameContentReference Include="..\Content\Content.mgcb">
-      <Link>Content\Content.mgcb</Link>
-    </MonoGameContentReference>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.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>

+ 0 - 25
MonoGameSamples/LocalizationSample/LocalizationLinux/OpenTK.dll.config

@@ -1,25 +0,0 @@
-<configuration>
-  <dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
-  <dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
-  <dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
-  <dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
-  <dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
-  <dllmap os="linux" dll="libX11" target="libX11.so.6"/>
-  <dllmap os="linux" dll="libXi" target="libXi.so.6"/>
-  <dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0.disabled"/>
-  <dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
-  <dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
-  <dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
-  <dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
-  <dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
-  <dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
-  <dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
-  <dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
-  <!-- XQuartz compatibility (X11 on Mac) -->
-  <dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
-  <dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
-  <dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
-  <dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
-  <dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
-  <dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
-</configuration>

+ 0 - 21
MonoGameSamples/LocalizationSample/LocalizationLinux/Program.cs

@@ -1,21 +0,0 @@
-using LocalizationSample;
-using System;
-
-namespace LocalizationSampleLinux
-{
-    /// <summary>
-    /// The main class.
-    /// </summary>
-    public static class Program
-    {
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main()
-        {
-            using (var game = new LocalizationGame())
-                game.Run();
-        }
-    }
-}

+ 0 - 39
MonoGameSamples/LocalizationSample/LocalizationLinux/Properties/AssemblyInfo.cs

@@ -1,39 +0,0 @@
-using System.Resources;
-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("LocalizationLinux")]
-[assembly: AssemblyProduct("LocalizationLinux")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyCopyright("Copyright ©  2016")]
-[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("a1ea1e8f-bad6-4dcc-872b-6fa67bd34455")]
-
-// 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")]
-[assembly: NeutralResourcesLanguage("")]
-

+ 0 - 59
MonoGameSamples/LocalizationSample/LocalizationPipeline/LocalizationPipeline.csproj

@@ -1,59 +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)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.30703</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{35DB61B4-EA24-47AC-86B0-2901FD993BDB}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>LocalizationPipeline</RootNamespace>
-    <AssemblyName>LocalizationPipeline</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="MonoGame.Framework">
-      <HintPath>$(MSBuildExtensionsPath)\MonoGame\v3.0\Tools\MonoGame.Framework.dll</HintPath>
-    </Reference>
-    <Reference Include="MonoGame.Framework.Content.Pipeline">
-      <HintPath>$(MSBuildExtensionsPath)\MonoGame\v3.0\Tools\MonoGame.Framework.Content.Pipeline.dll</HintPath>
-    </Reference>
-    <Reference Include="System.XML" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="LocalizedFontDescription.cs" />
-    <Compile Include="LocalizedFontProcessor.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </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>

+ 0 - 53
MonoGameSamples/LocalizationSample/LocalizationPipeline/LocalizedFontDescription.cs

@@ -1,53 +0,0 @@
-#region File Description
-//-----------------------------------------------------------------------------
-// LocalizedFontDescription.cs
-//
-// Microsoft XNA Community Game Platform
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//-----------------------------------------------------------------------------
-#endregion
-
-#region Using Statements
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
-using System.Collections.Generic;
-#endregion
-
-namespace LocalizationPipeline
-{
-    /// <summary>
-    /// Normally, when you add a .spritefont file to your project, this data is
-    /// deserialized into a FontDescription object, which is then built into a
-    /// SpriteFontContent by the FontDescriptionProcessor. But to localize the
-    /// font, we want to add some additional data, so our custom processor can
-    /// know what .resx files it needs to scan. We do this by defining our own
-    /// custom font description class, deriving from the built in FontDescription
-    /// type, and adding a new property to store the resource filenames.
-    /// </summary>
-    class LocalizedFontDescription : FontDescription
-    {
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        public LocalizedFontDescription()
-            : base("Arial", 14, 0)
-        {
-        }
-
-
-        /// <summary>
-        /// Add a new property to our font description, which will allow us to
-        /// include a ResourceFiles element in the .spritefont XML. We use the
-        /// ContentSerializer attribute to mark this as optional, so existing
-        /// .spritefont files that do not include this ResourceFiles element
-        /// can be imported as well.
-        /// </summary>
-        [ContentSerializer(Optional = true, CollectionItemName = "Resx")]
-        public List<string> ResourceFiles
-        {
-            get { return resourceFiles; }
-        }
-
-        List<string> resourceFiles = new List<string>();
-    }
-}

+ 0 - 83
MonoGameSamples/LocalizationSample/LocalizationPipeline/LocalizedFontProcessor.cs

@@ -1,83 +0,0 @@
-#region File Description
-//-----------------------------------------------------------------------------
-// LocalizedFontProcessor.cs
-//
-// Microsoft XNA Community Game Platform
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//-----------------------------------------------------------------------------
-#endregion
-
-#region Using Statements
-using Microsoft.Xna.Framework.Content.Pipeline;
-using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
-using System.IO;
-using System.Xml;
-#endregion
-
-namespace LocalizationPipeline
-{
-    /// <summary>
-    /// Custom processor extends the SpriteFont build process to scan over the resource
-    /// strings used by the game, automatically adding whatever characters it finds in
-    /// them to the font. This makes sure the game will always have all the characters
-    /// it needs, no matter what languages it is localized into, while still producing
-    /// an efficient font that does not waste space on unnecessary characters. This is
-    /// especially useful for languages such as Japanese and Korean, which have
-    /// potentially thousands of different characters, although games typically only
-    /// use a small fraction of these. Building only the characters we need is far more
-    /// efficient than if we tried to include the entire CJK character region.
-    /// </summary>
-    [ContentProcessor]
-    class LocalizedFontProcessor : ContentProcessor<LocalizedFontDescription,
-                                                    SpriteFontContent>
-    {
-        /// <summary>
-        /// Converts a font description into SpriteFont format.
-        /// </summary>
-        public override SpriteFontContent Process(LocalizedFontDescription input,
-                                                  ContentProcessorContext context)
-        {
-            GetLocalisedResX(input, context);
-
-            // After adding the necessary characters, we can use the built in
-            // FontDescriptionProcessor to do the hard work of building the font for us.
-            return context.Convert<FontDescription,
-                                   SpriteFontContent>(input, "FontDescriptionProcessor");
-        }
-
-        private static void GetLocalisedResX(LocalizedFontDescription input, ContentProcessorContext context)
-        {
-            // Scan each .resx file in turn.
-            foreach (string resourceFile in input.ResourceFiles)
-            {
-                string absolutePath = Path.GetFullPath(resourceFile);
-
-                // Make sure the .resx file really does exist.
-                if (!File.Exists(absolutePath))
-                {
-                    throw new InvalidContentException("Can't find " + absolutePath);
-                }
-
-                // Load the .resx data.
-                XmlDocument xmlDocument = new XmlDocument();
-
-                xmlDocument.Load(absolutePath);
-
-                // Scan each string from the .resx file.
-                foreach (XmlNode xmlNode in xmlDocument.SelectNodes("root/data/value"))
-                {
-                    string resourceString = xmlNode.InnerText;
-
-                    // Scan each character of the string.
-                    foreach (char usedCharacter in resourceString)
-                    {
-                        input.Characters.Add(usedCharacter);
-                    }
-                }
-
-                // Mark that this font should be rebuilt if the resource file changes.
-                context.AddDependency(absolutePath);
-            }
-        }
-    }
-}

+ 0 - 35
MonoGameSamples/LocalizationSample/LocalizationPipeline/Properties/AssemblyInfo.cs

@@ -1,35 +0,0 @@
-using System.Reflection;
-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("LocalizationPipeline")]
-[assembly: AssemblyProduct("LocalizationPipeline")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyCopyright("Copyright ©  2016")]
-[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("097f7312-4085-4e9c-b7ab-e4bb7d8e2c04")]
-
-// 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")]

+ 0 - 91
MonoGameSamples/LocalizationSample/LocalizationSample.md

@@ -1,91 +0,0 @@
-
-#Localization Sample
-
-This sample shows how to localize an XNA Framework game into multiple languages.
-
-##Sample Overview
-
-This sample demonstrates three aspects of game localization:
-
-* Loading text strings from .resx resource files, and providing different versions for each language.
-* Building fonts that include the Unicode characters needed to display different languages, including East Asian languages such as Japanese and Korean.
-* Localizing other game assets such as textures, models, and sound effects.
-
-The sample is localized into Danish, French, Japanese, and Korean, and also includes a default English configuration (can you guess what countries people on the XNA team come from? :-). It chooses what language to display based on your current system settings.
-
-##To change the language setting on Windows
-
-1. In Control Panel, click Clock, Language, and Region.
-2. In the Region and Language dialog box, click the Formats tab, and then click the Format box and select the lanuage.
-3. Click OK.
-
-##To change the language setting on Xbox 360
-
-1. Press the Guide button. The system UI is displayed.
-2. Scroll right through the blades and select System Settings, and then Console Settings.
-3. Change the language option, and then restart the sample to ensure the new language is in effect.
-
-#Sample Controls
-
-This sample uses the following keyboard and gamepad controls.
-
-Action | Keyboard control |Gamepad control
-|---|---|---|
-Exit | ESC or ALT+F4 | BACK
-
-#How the Sample Works
-
-##Translating Text
-
-The first step in translating your game text is to make sure all your strings are defined in a resource file (.resx). To create a resource file, right-click on your project in Solution Explorer, choose Add, and then choose New Item, and then select the Resources File template. You can call this anything you like—the one in this sample is named Strings.resx. Double-clicking the .resx file opens a designer where you can enter your game strings, giving each one a name and then entering its text value. If you need to include line breaks within a string, press SHIFT+ENTER.
-
-You will notice that when you added the Strings.resx file, Visual Studio also created a Strings.Designer.cs file, which is normally collapsed under the main .resx entry (click the plus sign (+) next to your .resx file to show it). This file contains a generated C# wrapper class that makes it easy to access your text strings. In your game code, you can now just look up Strings.NameOfString (or if you chose some other name than Strings.resx, this would be MyResxName.NameOfString ), instead of hard coding the actual string constant.
-
-Once all your text is defined in the .resx file, and your game code is accessing it through the generated wrapper class, it is trivial to add translations for different languages. You just add a second .resx file, using a simple naming convention. If the default resource file was called Strings.resx, a French translation would be called Strings.fr.resx, and a Japanese one would be Strings.ja.resx. You can also add translations for specific countries as well as languages. A file called Strings.en-GB.resx, for example, would be used for English in Great Britain, but not the United States (see the [Language and Country Codes](file:///C:/Development/GitHub/XNAGameStudio/MonoGameSamples/LocalizationSample/Localization.htm#lang_country_codes) section for more detail on this).
-
-If you add these secondary resource files correctly, you will only create a .resx file. There should not be a plus sign (+) next to this because these files should not generate a C# wrapper class. You must be careful when adding these secondary resources. Type the full name in the Add dialog box, including the .resx extension. It will not work if you leave that off. If you add a file with the wrong name, delete it and add a new one because renaming an existing resource may not hook up everything correctly.
-
-Once your secondary resources are in place, you can add translated strings to them. It is not necessary to include all your strings in every resource. If you leave some out, those will be taken from the default resource file instead. You are free to translate just the things that you want to translate, while leaving other strings in your original language.
-
-The final step is to tell the resource manager what language to use. This is done by setting *Strings.Culture = CultureInfo.CurrentCulture* in your game constructor.
-
-##Unicode Fonts
-
-Once you have text in more than one language, you will probably notice that some languages use more characters than are included by the default .spritefont template. By default, trying to draw these characters will throw an exception. If you set the <DefaultCharacter> element in your .spritefont XML, that will be automatically substituted in place of any missing characters, but just replacing all your Japanese text with question marks or spaces probably isn't the best long-term solution!
-
-You can control what characters are included in the font by altering the *<CharacterRegions>* section of the *.spritefont XML*. You can add as many character regions as you like to include different portions of the [Unicode character](http://unicode.org/charts/) set lists where each character can be found. This is a good solution for languages such as French or German that require only a few accented letters in addition to the standard ASCII character range.
-
-For other languages, however, especially East Asian ones such as Japanese, manually specifying character regions is not such a good solution. The Japanese character set is huge, and trying to include it all would produce a ridiculously large font. Fortunately, however, most games use only a small fraction of the available characters, so we can optimize our fonts by bothering to include only those characters we really need.
-
-This process is implemented by the build time classes in the *LocalizationPipeline* project. If you look at the *Font.spritefont* file used in this sample, you will notice that the Asset Type in the XML header has been changed from the normal *SpriteFontDescription* class to specify a custom *LocalizationPipeline.LocalizedFontDescription* instead. This type inherits from SpriteFontDescription, and adds a new property to specify what resource files contain our game text. The processor setting for *Font.spritefont* has been changed from the standard *FontDescriptionProcessor* to instead use the custom *LocalizedFontProcessor*, which reads all these *.resx* files, scans over them to find what characters they contain, and automatically adds the necessary characters to the font.
-
-To see this in action, set your system to Japanese, then remove the *Strings.ja.resx* reference from the *Font.spritefont* file. The Japanese characters will no longer be included in the font, so when you run the sample, you will now see question marks instead of Japanese text.
-
-##Localizing Other Assets
-
-Text strings and fonts are by far the most important aspect of localizing a game, but you may occasionally want to localize other assets such as textures, models, or sound effects.
-
-The LoadLocalizedAsset function in this sample implements a simple naming convention that can be used to localize any kind of XNB data. The sample contains a texture called Flag.png, plus a number of specialized versions for specific cultures (Flag.fr.png for France, Flag.en-GB.png for Great Britain, and so on). Instead of just calling:
-
-```
-        currentFlag = Content.Load<Texture2D>("Flag")
-```      
-
-Instead the sample does this:
-
-```
-        currentFlag = LoadLocalizedAsset<Texture2D>("Flag")
-```      
-
-This will check for a suitable localized version of the asset exists, loading the appropriate version for the current culture, or falling back to the default version of Flag.png if it cannot find a localized one.
-
-##Language and Country Codes
-
-When creating localized .resx files, or different versions of an asset for use with the GetLocalizedAssetName function, there are two ways you can specify the language and/or country.
-
-Most often, you will just use a two-letter language code from [ISO 639-1](http://www.loc.gov/standards/iso639-2/php/English_list.php). The sample uses this convention for the Strings.fr.resx file or the Flag.ja.png file.
-
-Other times you may wish to differentiate by country as well as language. To accomplish this, you can add a two-letter country code from [ISO 3166](http://www.iso.org/iso/english_country_names_and_code_elements) after the language code. The sample uses this convention for the Flag.en-US.png and Flag.en-GB.png files. Both flags are for English-speaking countries, but this specialization allows us to differentiate between the United States and United Kingdom. If you set your system to some other English-speaking country—for example, New Zealand—neither of these flags will match, so the default flag will be displayed instead. Because the sample does not specify any particular French-speaking country for its French flag texture, that will be displayed even if you set your system to French (Canada) or French (Belgium).
-
-##The WPF Font processor
-Need text here :D

+ 0 - 55
MonoGameSamples/LocalizationSample/LocalizationSample.sln

@@ -1,55 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LocalizationWindows", "LocalizationWindows\LocalizationWindows.csproj", "{E127B47C-2948-4379-A394-A78C32F2E747}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LocalizationPipeline", "LocalizationPipeline\LocalizationPipeline.csproj", "{35DB61B4-EA24-47AC-86B0-2901FD993BDB}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfFontPipeline", "WpfFontPipeline\WpfFontPipeline.csproj", "{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LocalizationLinux", "LocalizationLinux\LocalizationLinux.csproj", "{46AA79C4-86AB-4A40-9C25-AF8DCC2F4D7B}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Debug|x86 = Debug|x86
-		Release|Any CPU = Release|Any CPU
-		Release|x86 = Release|x86
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{E127B47C-2948-4379-A394-A78C32F2E747}.Debug|Any CPU.ActiveCfg = Debug|x86
-		{E127B47C-2948-4379-A394-A78C32F2E747}.Debug|Any CPU.Build.0 = Debug|x86
-		{E127B47C-2948-4379-A394-A78C32F2E747}.Debug|x86.ActiveCfg = Debug|x86
-		{E127B47C-2948-4379-A394-A78C32F2E747}.Debug|x86.Build.0 = Debug|x86
-		{E127B47C-2948-4379-A394-A78C32F2E747}.Release|Any CPU.ActiveCfg = Release|x86
-		{E127B47C-2948-4379-A394-A78C32F2E747}.Release|x86.ActiveCfg = Release|x86
-		{E127B47C-2948-4379-A394-A78C32F2E747}.Release|x86.Build.0 = Release|x86
-		{35DB61B4-EA24-47AC-86B0-2901FD993BDB}.Debug|Any CPU.ActiveCfg = Release|Any CPU
-		{35DB61B4-EA24-47AC-86B0-2901FD993BDB}.Debug|Any CPU.Build.0 = Release|Any CPU
-		{35DB61B4-EA24-47AC-86B0-2901FD993BDB}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{35DB61B4-EA24-47AC-86B0-2901FD993BDB}.Debug|x86.Build.0 = Debug|Any CPU
-		{35DB61B4-EA24-47AC-86B0-2901FD993BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{35DB61B4-EA24-47AC-86B0-2901FD993BDB}.Release|Any CPU.Build.0 = Release|Any CPU
-		{35DB61B4-EA24-47AC-86B0-2901FD993BDB}.Release|x86.ActiveCfg = Release|Any CPU
-		{35DB61B4-EA24-47AC-86B0-2901FD993BDB}.Release|x86.Build.0 = Release|Any CPU
-		{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}.Debug|Any CPU.ActiveCfg = Release|Any CPU
-		{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}.Debug|Any CPU.Build.0 = Release|Any CPU
-		{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}.Debug|x86.Build.0 = Debug|Any CPU
-		{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}.Release|Any CPU.Build.0 = Release|Any CPU
-		{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}.Release|x86.ActiveCfg = Release|Any CPU
-		{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}.Release|x86.Build.0 = Release|Any CPU
-		{46AA79C4-86AB-4A40-9C25-AF8DCC2F4D7B}.Debug|Any CPU.ActiveCfg = Debug|x86
-		{46AA79C4-86AB-4A40-9C25-AF8DCC2F4D7B}.Debug|x86.ActiveCfg = Debug|x86
-		{46AA79C4-86AB-4A40-9C25-AF8DCC2F4D7B}.Debug|x86.Build.0 = Debug|x86
-		{46AA79C4-86AB-4A40-9C25-AF8DCC2F4D7B}.Release|Any CPU.ActiveCfg = Release|x86
-		{46AA79C4-86AB-4A40-9C25-AF8DCC2F4D7B}.Release|x86.ActiveCfg = Release|x86
-		{46AA79C4-86AB-4A40-9C25-AF8DCC2F4D7B}.Release|x86.Build.0 = Release|x86
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

BIN
MonoGameSamples/LocalizationSample/LocalizationWindows/Icon.ico


BIN
MonoGameSamples/LocalizationSample/LocalizationWindows/Localization.png


+ 0 - 97
MonoGameSamples/LocalizationSample/LocalizationWindows/LocalizationWindows.csproj

@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
-    <ProductVersion>8.0.30703</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{E127B47C-2948-4379-A394-A78C32F2E747}</ProjectGuid>
-    <OutputType>WinExe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>LocalizationSample</RootNamespace>
-    <AssemblyName>LocalizationSample</AssemblyName>
-    <FileAlignment>512</FileAlignment>
-    <MonoGamePlatform>Windows</MonoGamePlatform>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <PlatformTarget>x86</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
-    <DefineConstants>DEBUG;TRACE;WINDOWS</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\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
-    <DefineConstants>TRACE;WINDOWS</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup>
-    <ApplicationIcon>Icon.ico</ApplicationIcon>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="..\Content\Strings.Designer.cs">
-      <Link>Strings.Designer.cs</Link>
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Strings.resx</DependentUpon>
-    </Compile>
-    <Compile Include="..\SampleCode\Game1.cs">
-      <Link>Game1.cs</Link>
-    </Compile>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Reference Include="MonoGame.Framework">
-      <HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="Icon.ico" />
-    <Content Include="Localization.png" />
-  </ItemGroup>
-  <ItemGroup>
-    <MonoGameContentReference Include="..\Content\Content.mgcb">
-      <Link>Content\Content.mgcb</Link>
-    </MonoGameContentReference>
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="..\Content\Strings.da.resx">
-      <Link>Strings.da.resx</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Content\Strings.fr.resx">
-      <Link>Strings.fr.resx</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Content\Strings.ja.resx">
-      <Link>Strings.ja.resx</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Content\Strings.ko.resx">
-      <Link>Strings.ko.resx</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Content\Strings.resx">
-      <Link>Strings.resx</Link>
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Strings.Designer.cs</LastGenOutput>
-    </EmbeddedResource>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.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>

+ 0 - 23
MonoGameSamples/LocalizationSample/LocalizationWindows/Program.cs

@@ -1,23 +0,0 @@
-using LocalizationSample;
-using System;
-
-namespace LocalizationSampleWindows
-{
-#if WINDOWS || LINUX
-    /// <summary>
-    /// The main class.
-    /// </summary>
-    public static class Program
-    {
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main()
-        {
-            using (var game = new LocalizationGame())
-                game.Run();
-        }
-    }
-#endif
-}

+ 0 - 38
MonoGameSamples/LocalizationSample/LocalizationWindows/Properties/AssemblyInfo.cs

@@ -1,38 +0,0 @@
-using System.Resources;
-using System.Reflection;
-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("LocalizationSample")]
-[assembly: AssemblyProduct("LocalizationSample")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyCopyright("Copyright ©  2016")]
-[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("bc0a270f-cc94-4a22-93d6-f808c115fe58")]
-
-// 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")]
-[assembly: NeutralResourcesLanguage("en")]
-

+ 0 - 175
MonoGameSamples/LocalizationSample/SampleCode/Game1.cs

@@ -1,175 +0,0 @@
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-using System.Globalization;
-
-namespace LocalizationSample
-{
-    /// <summary>
-    /// This is the main type for your game.
-    /// </summary>
-    public class LocalizationGame : Game
-    {
-        #region Fields
-
-        GraphicsDeviceManager graphics;
-        SpriteBatch spriteBatch;
-        SpriteFont MyFont;
-        SpriteFont LocalizedFont;
-        SpriteFont WPFFont;
-        Texture2D currentFlag;
-
-        #endregion
-
-        #region Initialization
-
-
-        public LocalizationGame()
-        {
-            Content.RootDirectory = "Content";
-
-            graphics = new GraphicsDeviceManager(this);
-
-            // Tell the resource manager what language to use when loading strings.
-            Strings.Culture = CultureInfo.CurrentCulture;
-        }
-
-
-        /// <summary>
-        /// Load your graphics content.
-        /// </summary>
-        protected override void LoadContent()
-        {
-            spriteBatch = new SpriteBatch(GraphicsDevice);
-
-            MyFont = Content.Load<SpriteFont>("BasicSpriteFont");
-
-            LocalizedFont = Content.Load<SpriteFont>("LocalizedFont");
-            WPFFont = Content.Load<SpriteFont>("WPFFont");
-
-            currentFlag = LoadLocalizedAsset<Texture2D>("Flag");
-        }
-
-
-        /// <summary>
-        /// Helper for loading a .xnb asset which can have multiple localized
-        /// versions for different countries. This allows you localize data such
-        /// as textures, models, and sound effects.
-        /// 
-        /// This uses a simple naming convention. If you have a default asset named
-        /// "Foo", you can provide a specialized French version by calling it
-        /// "Foo.fr", and a Japanese version called "Foo.ja". You can specialize even
-        /// further by country as well as language, so if you wanted different assets
-        /// for the United States vs. United Kingdom, you would add "Foo.en-US" and
-        /// "Foo.en-GB".
-        /// 
-        /// This function looks first for the most specialized version of the asset,
-        /// which includes both language and country. If that does not exist, it looks
-        /// for a version that only specifies the language. If that still does not
-        /// exist, it falls back to the original non-localized asset name.
-        /// </summary>
-        T LoadLocalizedAsset<T>(string assetName)
-        {
-            string[] cultureNames =
-            {
-                CultureInfo.CurrentCulture.Name,                        // eg. "en-US"
-                CultureInfo.CurrentCulture.TwoLetterISOLanguageName     // eg. "en"
-            };
-
-            // Look first for a specialized language-country version of the asset,
-            // then if that fails, loop back around to see if we can find one that
-            // specifies just the language without the country part.
-            foreach (string cultureName in cultureNames)
-            {
-                string localizedAssetName = assetName + '.' + cultureName;
-
-                try
-                {
-                    return Content.Load<T>(localizedAssetName);
-                }
-                catch (ContentLoadException) { }
-            }
-
-            // If we didn't find any localized asset, fall back to the default name.
-            return Content.Load<T>(assetName);
-        }
-
-
-        #endregion
-
-        #region Update and Draw
-
-
-        /// <summary>
-        /// Allows the game to run logic.
-        /// </summary>
-        protected override void Update(GameTime gameTime)
-        {
-            HandleInput();
-
-            base.Update(gameTime);
-        }
-
-
-        /// <summary>
-        /// This is called when the game should draw itself.
-        /// </summary>
-        protected override void Draw(GameTime gameTime)
-        {
-            string string1 = Strings.Welcome;
-
-            string string2 = string.Format(Strings.CurrentLocale,
-                                           CultureInfo.CurrentCulture.EnglishName,
-                                           CultureInfo.CurrentCulture);
-
-            string string3 = Strings.HowToChange;
-
-            GraphicsDevice.Clear(Color.CornflowerBlue);
-
-            spriteBatch.Begin();
-            spriteBatch.DrawString(MyFont, "Welcome to the localization sample!",Vector2.One,Color.White);
-
-            spriteBatch.DrawString(LocalizedFont, "Default font Drawing", new Vector2(100, 70), Color.White);
-            spriteBatch.DrawString(LocalizedFont, string1, new Vector2(100, 100), Color.White);
-            spriteBatch.DrawString(LocalizedFont, string2, new Vector2(100, 130), Color.White);
-            spriteBatch.DrawString(LocalizedFont, string3, new Vector2(100, 160), Color.White);
-
-            spriteBatch.Draw(currentFlag, new Vector2(100, 210), Color.White);
-
-            spriteBatch.DrawString(WPFFont, "WPF font Drawing", new Vector2(100, 330), Color.White);
-            spriteBatch.DrawString(WPFFont, string1, new Vector2(100, 360), Color.White);
-            spriteBatch.DrawString(WPFFont, string2, new Vector2(100, 390), Color.White);
-            spriteBatch.DrawString(WPFFont, string3, new Vector2(100, 420), Color.White);
-
-            spriteBatch.End();
-
-            base.Draw(gameTime);
-        }
-
-
-        #endregion
-
-        #region Handle Input
-
-
-        /// <summary>
-        /// Handles input for quitting the game.
-        /// </summary>
-        private void HandleInput()
-        {
-            KeyboardState currentKeyboardState = Keyboard.GetState();
-            GamePadState currentGamePadState = GamePad.GetState(PlayerIndex.One);
-
-            // Check for exit.
-            if (currentKeyboardState.IsKeyDown(Keys.Escape) ||
-                currentGamePadState.IsButtonDown(Buttons.Back))
-            {
-                Exit();
-            }
-        }
-
-
-        #endregion
-    }
-}

+ 0 - 254
MonoGameSamples/LocalizationSample/WpfFontPipeline/BoxLayouter.cs

@@ -1,254 +0,0 @@
-#region Using ステートメント
-
-using Microsoft.Xna.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-#endregion
-
-namespace WpfFontPipeline
-{
-    /// <summary>
-    /// レイアウト対象になる矩形情報
-    /// </summary>
-    class BoxLayoutItem
-    {
-        /// <summary>
-        /// 矩形情報
-        /// </summary>
-        public Rectangle Bounds { get; set; }
-
-        /// <summary>
-        /// タグ
-        /// </summary>
-        public object Tag { get; set; }
-
-        /// <summary>
-        /// 配置済みか?
-        /// </summary>
-        public bool Placed { get; set; }
-    }
-
-    /// <summary>
-    /// 複数矩形を1つのテクスチャにまとめるヘルパークラス
-    /// </summary>
-    /// <remarks>
-    /// 高速化の為に処理する矩形の多くが同じ高さであるという前提のアルゴリズムを使用
-    /// </remarks>
-    class BoxLayouter
-    {
-        #region 定数
-
-        /// <summary>
-        /// 矩形間の空きスペース
-        /// </summary>
-        readonly int PadSize = 1;
-
-        #endregion
-
-        #region プロパティ
-
-        /// <summary>
-        /// 登録された矩形要素の取得と設定
-        /// </summary>
-        public List<BoxLayoutItem> Items {get; set; }
-
-        #endregion
-
-        #region パブリックメソッド
-
-        /// <summary>
-        /// コンストラクタ
-        /// </summary>
-        public BoxLayouter()
-        {
-            Items = new List<BoxLayoutItem>();
-        }
-
-        /// <summary>
-        /// 矩形の追加
-        /// </summary>
-        /// <param name="item">追加する矩形情報</param>
-        public void Add(BoxLayoutItem item)
-        {
-            // 矩形の高さ毎に分類、格納する
-            List<BoxLayoutItem> itemBacket;
-            if (!itemBackets.TryGetValue(item.Bounds.Height, out itemBacket))
-            {
-                itemBacket = new List<BoxLayoutItem>();
-                itemBackets.Add(item.Bounds.Height, itemBacket);
-            }
-
-            itemBacket.Add(item);
-
-            // 必要な矩形面積を追加
-            int w = item.Bounds.Width + PadSize;
-            int h = item.Bounds.Height + PadSize;
-            totalAreaSize += (w * h);
-
-            Items.Add(item);
-        }
-
-        /// <summary>
-        /// レイアウトの実行
-        /// </summary>
-        /// <param name="outWidth">レイアウトに必要な横幅</param>
-        /// <param name="outHeight">レイアウトに必要な高さ</param>
-        public void Layout(out int outWidth, out int outHeight)
-        {
-            // 総面積から必要となるサイズを概算
-            int size = (int)Math.Sqrt(totalAreaSize);
-            int h = (int)(Math.Pow(2, (int)(Math.Log(size, 2) - 0.5)));
-            int w = (int)(Math.Pow(2, (int)(Math.Log(size, 2) + 0.5)));
-
-            while ((long)w * (long)h < totalAreaSize)
-            {
-                if (w <= h)
-                    w *= 2;
-                else
-                    h *= 2;
-            }
-
-            // 高さ、幅の順に並び替える
-            var keys = from key in itemBackets.Keys orderby key descending select key;
-            sortedKeys = keys.ToList();
-
-            foreach (int key in sortedKeys)
-            {
-                var items = from item in itemBackets[key]
-                            orderby item.Bounds.Width descending
-                            select item;
-
-                itemBackets[key] = items.ToList();
-            }
-
-            // 現在のサイズで配置してみる
-            while (TryLayout(w, h) == false)
-            {
-                // 全部配置しきれなかったので、サイズを大きくして再試行
-                ClearPlacedInfo();
-
-                if (w <= h)
-                    w *= 2;
-                else
-                    h *= 2;
-            }
-
-            outWidth = w;
-            outHeight = h;
-        }
-
-        #endregion
-
-        #region プライベートメソッド
-
-        /// <summary>
-        /// 配置処理
-        /// </summary>
-        bool TryLayout(int width, int height)
-        {
-            // 配置位置
-            int x = PadSize;
-            int y = PadSize;
-
-            // 列の高さ
-            int lineHeight = sortedKeys[0];
-
-            // 高さの順に配置
-            foreach (int key in sortedKeys)
-            {
-                var itemBacket = itemBackets[key];
-
-                for (int i = 0; i < itemBacket.Count; ++i)
-                {
-                    var item = itemBacket[i];
-
-                    // 既に配置済みか?
-                    if (item.Placed)
-                        continue;
-
-                    // 現在の列に配置できるか?
-                    if (x + item.Bounds.Width + PadSize < width)
-                    {
-                        // 現在の列の右端に追加
-                        var bounds = item.Bounds;
-                        bounds.X = x;
-                        bounds.Y = y;
-                        item.Bounds = bounds;
-                        item.Placed = true;
-
-                        x += item.Bounds.Width + PadSize;
-                    }
-                    else
-                    {
-                        // 右端の空きスペースに配置できるか試す
-                        // 幅の狭いものから試す
-                        for (int j = itemBacket.Count - 1; i < j; --j)
-                        {
-                            var narrowItem = itemBacket[j];
-
-                            // 配置済みのものは無視
-                            if (narrowItem.Placed)
-                                continue;
-
-                            // この列に、これ以上配置できない
-                            if (x + narrowItem.Bounds.Width + PadSize >= width)
-                                break;
-
-                            var bounds = narrowItem.Bounds;
-                            bounds.X = x;
-                            bounds.Y = y;
-                            narrowItem.Bounds = bounds;
-                            narrowItem.Placed = true;
-
-                            x += narrowItem.Bounds.Width + PadSize;
-                        }
-
-                        // 次の行へ移動
-                        y += lineHeight + PadSize;
-
-                        // おっと、サイズ足らずで配置しきれなかった
-                        if (y + lineHeight > height)
-                            return false;
-
-                        lineHeight = key;
-                        x = PadSize;
-                        --i;
-                    }
-                }
-            }
-
-            return true;
-        }
-
-        /// <summary>
-        /// 配置情報の初期化
-        /// </summary>
-        void ClearPlacedInfo()
-        {
-            foreach (var itemBacket in itemBackets.Values)
-            {
-                foreach (var item in itemBacket)
-                    item.Placed = false;
-            }
-        }
-
-        #endregion
-
-        #region プライベートフィールド
-
-        // 現在の行情報をDictionary<height:int, BoxLayoutItem[]>として格納
-        Dictionary<int, List<BoxLayoutItem>> itemBackets =
-                                        new Dictionary<int, List<BoxLayoutItem>>();
-
-        // 追加された矩形の総面積
-        long totalAreaSize;
-
-        // 高さ毎に並び替える為のソートキー
-        List<int> sortedKeys;
-
-        #endregion
-
-    }
-}

+ 0 - 178
MonoGameSamples/LocalizationSample/WpfFontPipeline/JisCode.cs

@@ -1,178 +0,0 @@
-#region Using ステートメント
-
-using System.Collections.Generic;
-using System.Text;
-
-#endregion
-
-namespace WpfFontPipeline
-{
-    /// <summary>
-    /// JISコードで定義されている文字を取得する為のヘルパークラス
-    /// ここではJIS基本漢字(JIS X 0208)で定義されている文字を返す
-    /// http://www.asahi-net.or.jp/~ax2s-kmtn/ref/jisx0208.html
-    /// </summary>
-    static class JisCode
-    {
-        #region パブリックメソッド
-
-        /// <summary>
-        /// 記号、特殊記号、148字の取得
-        /// </summary>
-        public static IEnumerable<char> GetSpecialCharacters()
-        {
-            var list = new List<char>(148);
-            AddRow(1, list);
-            AddJisCodes(0x2220, 0x222e, list);
-            AddJisCodes(0x223a, 0x2241, list);
-            AddJisCodes(0x224a, 0x2250, list);
-            AddJisCodes(0x225c, 0x226a, list);
-            AddJisCodes(0x2272, 0x2279, list);
-            AddJisCodes(0x227e, 0x227e, list);
-            return list;
-        }
-
-        /// <summary>
-        /// 全角英数字、62字の取得
-        /// </summary>
-        public static IEnumerable<char> GetLatinLetters()
-        {
-            var list = new List<char>(62);
-            AddJisCodes(0x2330, 0x2339, list);
-            AddJisCodes(0x2341, 0x235a, list);
-            AddJisCodes(0x2361, 0x237a, list);
-            return list;
-        }
-
-        /// <summary>
-        /// ひらがな、83字の取得
-        /// </summary>
-        public static IEnumerable<char> GetHiragana()
-        {
-            var list = new List<char>(83);
-            AddJisCodes(0x2421, 0x2473, list);
-            return list;
-        }
-
-        /// <summary>
-        /// カタカナ、86字の取得
-        /// </summary>
-        public static IEnumerable<char> GetKatakana()
-        {
-            var list = new List<char>(86);
-            AddJisCodes(0x2521, 0x2576, list);
-            return list;
-        }
-
-        /// <summary>
-        /// ギリシャ文字、48字の取得
-        /// </summary>
-        public static IEnumerable<char> GetGreekLetters()
-        {
-            var list = new List<char>(48);
-            AddJisCodes(0x2621, 0x2638, list);
-            AddJisCodes(0x2641, 0x2658, list);
-            return list;
-        }
-
-        /// <summary>
-        /// キリル文字、66字の取得
-        /// </summary>
-        public static IEnumerable<char> GetCyrillicLetters()
-        {
-            var list = new List<char>(66);
-            AddJisCodes(0x2721, 0x2741, list);
-            AddJisCodes(0x2751, 0x2771, list);
-            return list;
-
-        }
-
-        /// <summary>
-        /// 罫線文字、32字の取得
-        /// </summary>
-        public static IEnumerable<char> GetBoxDrawingCharacters()
-        {
-            var list = new List<char>(32);
-            AddJisCodes(0x2821, 0x2840, list);
-            return list;
-        }
-
-        /// <summary>
-        /// 第1水準漢字、2,965字の取得
-        /// </summary>
-        public static IEnumerable<char> GetKanjiLevel1()
-        {
-            var list = new List<char>(2965);
-            for (int row = 16; row <= 46; ++row)
-            {
-                AddRow(row, list);
-            }
-            AddJisCodes(0x4f21, 0x4f53, list);
-            return list;
-        }
-
-        /// <summary>
-        /// 第2水準漢字、3,990字の取得
-        /// </summary>
-        public static IEnumerable<char> GetKanjiLevel2()
-        {
-            var list = new List<char>(3390);
-            for (int row = 48; row <= 83; ++row)
-            {
-                AddRow(row, list);
-            }
-            AddJisCodes(0x7421, 0x7426, list);
-            return list;
-        }
-
-        #endregion
-
-        #region プライベートメソッド
-
-        /// <summary>
-        /// 指定した区の文字取得
-        /// </summary>
-        /// <param name="row">区番号</param>
-        /// <param name="list">出力先</param>
-        private static void AddRow(int row, List<char> list)
-        {
-            int offset = 0x2000 + row * 0x100;
-            AddJisCodes(offset + 0x21, offset + 0x7e, list);
-        }
-
-        /// <summary>
-        /// 指定されたJISコード領域の文字取得
-        /// </summary>
-        /// <param name="start">開始JISコード</param>
-        /// <param name="end">終了JISコード</param>
-        /// <param name="list">出力先</param>
-        private static void AddJisCodes(int start, int end, List<char> list)
-        {
-            int idx = 0;
-            buffer[idx++] = 0x1b;   // 2バイト文字コードへのエスケープシーケンス
-            buffer[idx++] = 0x24;
-            buffer[idx++] = 0x42;
-            for (int jisCode = start; jisCode <= end; ++jisCode)
-            {
-                buffer[idx++] = (byte)((jisCode >> 8) & 0xff);
-                buffer[idx++] = (byte)(jisCode & 0xff);
-            }
-
-            list.AddRange(encoding.GetChars(buffer, 0, idx));
-        }
-
-        #endregion
-
-        #region プライベートフィールド
-
-        // JISコードからUnicode変換用のEncoding
-        static Encoding encoding = Encoding.GetEncoding("iso-2022-jp");
-
-        // JISコード格納用バッファ、
-        // ひとつの区内の96文字+エスケープシーケンス分のサイズ
-        static byte[] buffer = new byte[16 * 6 * 2 + 3];
-
-        #endregion
-
-    }
-}

+ 0 - 42
MonoGameSamples/LocalizationSample/WpfFontPipeline/LocalizedFontDescription.cs

@@ -1,42 +0,0 @@
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
-using System.Collections.Generic;
-
-namespace WpfFontPipeline
-{
-    /// <summary>
-    /// Normally, when you add a .spritefont file to your project, this data is
-    /// deserialized into a FontDescription object, which is then built into a
-    /// SpriteFontContent by the FontDescriptionProcessor. But to localize the
-    /// font, we want to add some additional data, so our custom processor can
-    /// know what .resx files it needs to scan. We do this by defining our own
-    /// custom font description class, deriving from the built in FontDescription
-    /// type, and adding a new property to store the resource filenames.
-    /// </summary>
-    public class LocalizedFontDescription : FontDescription
-    {
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        public LocalizedFontDescription()
-            : base("Arial", 14, 0)
-        {
-        }
-
-
-        /// <summary>
-        /// Add a new property to our font description, which will allow us to
-        /// include a ResourceFiles element in the .spritefont XML. We use the
-        /// ContentSerializer attribute to mark this as optional, so existing
-        /// .spritefont files that do not include this ResourceFiles element
-        /// can be imported as well.
-        /// </summary>
-        [ContentSerializer(Optional = true, CollectionItemName = "Resx")]
-        public List<string> ResourceFiles
-        {
-            get { return resourceFiles; }
-        }
-
-        List<string> resourceFiles = new List<string>();
-    }
-}

+ 0 - 35
MonoGameSamples/LocalizationSample/WpfFontPipeline/Properties/AssemblyInfo.cs

@@ -1,35 +0,0 @@
-using System.Reflection;
-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("WpfFontPipeline")]
-[assembly: AssemblyProduct("WpfFontPipeline")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyCopyright("Copyright ©  2016")]
-[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("0188a46f-e76e-48e7-8782-14b3bb21fc2d")]
-
-// 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")]

+ 0 - 137
MonoGameSamples/LocalizationSample/WpfFontPipeline/SingleColorDxtCompressor.cs

@@ -1,137 +0,0 @@
-#region Using ステートメント
-
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
-using Microsoft.Xna.Framework.Graphics.PackedVector;
-
-#endregion
-
-namespace WpfFontPipeline
-{
-    /// <summary>
-    /// 単色テクスチャイメージに特化したDXT3テクスチャ圧縮クラス
-    /// </summary>
-    /// <remarks>
-    /// フォントなどの高周波成分を含んだ画像はDXT圧縮するべきではないが、
-    /// 乗算済みアルファの単色画像であればDXT圧縮ブロックを直接生成することで
-    /// 劣化が少なく、かつテクスチャメモリ使用量を1/4にすることができる。
-    /// </remarks>
-    public static class SingleColorDxtCompressor
-    {
-        /// <summary>
-        /// 指定された単色ビットマップ画像をDXT3テクスチャへ変換する
-        /// </summary>
-        /// <param name="source">変換元画像</param>
-        /// <param name="color0">単色カラー</param>
-        /// <returns>DXT3圧縮された画像</returns>
-        public static Dxt3BitmapContent Compress(PixelBitmapContent<Color> source,
-                                                    Color color0)
-        {
-            // DXT3ブロックデータを格納するためのバッファを確保
-            byte[] outputData = new byte[source.Width * source.Height];
-
-            // 単色カラーをBGR565に変換する
-            ushort packedColor = new Bgr565(color0.ToVector3()).PackedValue;
-
-            // 指定された画像を圧縮ブロック単位に処理をする
-            int outputIndex = 0;
-            for (int blockY = 0; blockY < source.Height; blockY += 4)
-            {
-                for (int blockX = 0; blockX < source.Width; blockX += 4)
-                {
-                    CompressDxt3Block(source, blockX, blockY, packedColor,
-                                        outputData, outputIndex);
-                    outputIndex += 16;
-                }
-            }
-
-            // DXT3テクスチャの生成と圧縮したブロックデータの設定
-            var result = new Dxt3BitmapContent(source.Width, source.Height);
-            result.SetPixelData(outputData);
-
-            return result;
-        }
-
-        /// <summary>
-        /// 圧縮ブロックの処理
-        /// </summary>
-        /// <param name="source">元画像</param>
-        /// <param name="blockX">Xブロック位置</param>
-        /// <param name="blockY">Yブロック位置</param>
-        /// <param name="color0">単色カラー</param>
-        /// <param name="outputData">出力先</param>
-        /// <param name="outputIndex">出力オフセット</param>
-        private static void CompressDxt3Block(PixelBitmapContent<Color> source,
-            int blockX, int blockY, ushort color0, byte[] outputData, int outputIndex)
-        {
-            long alphaBits = 0;
-            int rgbBits = 0;
-            int pixelCount = 0;
-
-            // 4x4ブロック内の処理
-            for (int y = 0; y < 4; ++y)
-            {
-                for (int x = 0; x < 4; ++x)
-                {
-                    // 元のアルファ値の取得
-                    int value = source.GetPixel(blockX + x, blockY + y).A;
-                    int alpha = 0;
-                    int rgb = 0;
-
-                    // アルファ値によって、出力値を決定。
-                    // ここでは単純にアルファ値領域を4分割するのではなく、6分割にして
-                    // 1/6、1/2、5/6の非線形の閾値を使っている
-                    if (value < 256 / 6)
-                    {
-                        alpha = 0;
-                        rgb = 1;    // c1色 = 0
-                    }
-                    else if (value < 256 * 3 / 6)
-                    {
-                        alpha = 5;
-                        rgb = 3;    // c3色 = 1/3(c0) + 2/3(c1) = 85
-                    }
-                    else if (value < 256 * 5 / 6)
-                    {
-                        alpha = 10;
-                        rgb = 2;    // c2色 = 1/2(c0) + 1/2(c1) = 127
-                    }
-                    else
-                    {
-                        alpha = 15;
-                        rgb = 0;    // c0色 = 255
-                    }
-
-                    // 計算結果ビットを格納
-                    alphaBits |= (long)alpha << (pixelCount * 4);
-                    rgbBits |= rgb << (pixelCount * 2);
-
-                    pixelCount++;
-                }
-            }
-
-            // DXT3ブロック情報の出力
-
-            // アルファ 8バイト
-            for (int i = 0; i < 8; ++i)
-            {
-                outputData[outputIndex + i] = (byte)(alphaBits >> (i * 8));
-            }
-
-            // カラー値(c0, c1) 4バイト
-            // c0
-            outputData[outputIndex + 8] = (byte)(color0 & 0xff);
-            outputData[outputIndex + 9] = (byte)((color0 >> 8) & 0xff);
-            // c1
-            outputData[outputIndex + 10] = 0x00;
-            outputData[outputIndex + 11] = 0x00;
-
-            // RGB情報 4バイト
-            for (int i = 0; i < 4; ++i)
-            {
-                outputData[outputIndex + 12 + i] = (byte)(rgbBits >> (i * 8));
-            }
-        }
-
-    }
-}

+ 0 - 920
MonoGameSamples/LocalizationSample/WpfFontPipeline/WpfFontDescriptionProcessor.cs

@@ -1,920 +0,0 @@
-#region Using ステートメント
-
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Content.Pipeline;
-using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
-using Microsoft.Xna.Framework.Graphics.PackedVector;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Xml;
-using Color = Microsoft.Xna.Framework.Color;
-
-#endregion
-
-namespace WpfFontPipeline
-{
-    /// <summary>
-    /// WPFフォントプロセッサーで使用するテクスチャフォーマット
-    /// </summary>
-    public enum WpfTextureFormat
-    {
-        Auto,       // 自動:単色の場合にはDXT3、アウトライン使用でBgra444、
-                    // グラデーション使用でColorとフォーマットを切り替える
-        Color,
-        Bgra4444
-    }
-
-    /// <summary>
-    /// アウトライン描画方法
-    /// </summary>
-    public enum OutlineStroke
-    {
-        StrokeOverFill, // 文字本体描画の後にアウトラインを描画する
-        FillOverStroke, // アウトラインを描画した後に文字本体描画する
-        StrokeOnly      // アウトラインのみを描画する
-    }
-
-    /// <summary>
-    /// WPF文字描画を使ったフォントプロセッサー
-    /// </summary>
-    [ContentProcessor(DisplayName = "WPF フォントプロセッサー")]
-    public class WpfFontDescriptionProcessor :
-            ContentProcessor<LocalizedFontDescription, WpfSpriteFontContent>
-    {
-        #region プロパティ
-
-        /// <summary>
-        /// 半角英数時を生成文字として追加するか
-        /// </summary>
-        [DisplayName("追加文字 ASCII")]
-        [Description("フォント生成時に半角英数字、記号を追加します。")]
-        [DefaultValue(true)]
-        public bool HasAsciiCharacters { get; set; }
-
-        /// <summary>
-        /// 全角英数時を生成文字として追加するか
-        /// </summary>
-        [DisplayName("追加文字 全角英数字")]
-        [Description("フォント生成時に全角英数字を追加します。")]
-        [DefaultValue(false)]
-        public bool HasZenkakuLatinLetters { get; set; }
-
-        /// <summary>
-        /// 特殊記号文字を追加するか
-        /// </summary>
-        [DisplayName("追加文字 記号")]
-        [Description("フォント生成時に\"「」…、\"等の記号を追加します。")]
-        [DefaultValue(false)]
-        public bool HasSpecialCharacters { get; set; }
-
-        /// <summary>
-        /// ひらがな文字を追加するか
-        /// </summary>
-        [DisplayName("追加文字 ひらがな")]
-        [Description("フォント生成時にひらがな文字を追加します。")]
-        [DefaultValue(false)]
-        public bool HasHiragana { get; set; }
-
-        /// <summary>
-        /// カタカナ文字を追加するか
-        /// </summary>
-        [DisplayName("追加文字 カタカナ")]
-        [Description("フォント生成時にカタカナ文字を追加します。")]
-        [DefaultValue(false)]
-        public bool HasKatakana { get; set; }
-
-        /// <summary>
-        /// JIS第1水準漢字を追加するか
-        /// </summary>
-        [DisplayName("追加文字 第1水準漢字")]
-        [Description("フォント生成時にJIS第1水準漢字2,965文字を追加します。")]
-        [DefaultValue(false)]
-        public bool HasJisKanjiLevel1 { get; set; }
-
-        /// <summary>
-        /// JIS第2水準漢字を追加するか
-        /// </summary>
-        [DisplayName("追加文字 第2水準漢字")]
-        [Description("フォント生成時にJIS第2水準漢字3,390文字を追加します。")]
-        [DefaultValue(false)]
-        public bool HasJisKanjiLevel2 { get; set; }
-
-        /// <summary>
-        /// ギリシャ文字
-        /// </summary>
-        [DisplayName("追加文字 ギリシャ文字")]
-        [Description("フォント生成時にギリシャ文字を追加します。")]
-        [DefaultValue(false)]
-        public bool HasGreekLetters { get; set; }
-
-        /// <summary>
-        /// ギリシャ文字
-        /// </summary>
-        [DisplayName("追加文字 キリル文字")]
-        [Description("フォント生成時にキリル文字を追加します。")]
-        [DefaultValue(false)]
-        public bool HasCyrillicLetters { get; set; }
-
-        /// <summary>
-        /// ギリシャ文字
-        /// </summary>
-        [DisplayName("追加文字 罫線")]
-        [Description("フォント生成時に\"└┏┫\"等の罫線文字を追加します。")]
-        [DefaultValue(false)]
-        public bool HasBoxCharacters { get; set; }
-
-        /// <summary>
-        /// 追加文字の指定
-        /// </summary>
-        [DisplayName("追加文字 テキスト")]
-        [Description("フォント生成時に追加する文字列を指定できます(重複化)")]
-        public string Text { get; set; }
-
-        /// <summary>
-        /// 読み込むメッセージファイル名
-        /// </summary>
-        [DisplayName("追加文字 テキストファイル名")]
-        [Description("メッセージテキストが含まれているテキストファイル名を指定します。"
-                        +"セミコロン(;)で区切って複数ファイル指定可能です。")]
-        public string MessageFilenames { get; set; }
-
-        /// <summary>
-        /// アウトラインの太さ
-        /// </summary>
-        [DisplayName("文字装飾 アウトライン")]
-        [Description("文字生成時のアウトラインの太さ(ピクセル単位)を指定します。"
-                    +"小数点以下の数字を指定することができます。")]
-        [DefaultValue(0)]
-        public float OutlineThickness { get; set; }
-
-        /// <summary>
-        /// アウトラインの色
-        /// </summary>
-        [DisplayName("文字装飾 アウトライン色")]
-        [Description("文字のアウトライン色を指定します。")]
-        [DefaultValue(typeof(Color), "64, 64, 64, 255")]
-        public Color OutlineColor { get; set; }
-
-        /// <summary>
-        /// アウトライン形状
-        /// </summary>
-        [DisplayName("文字装飾 アウトライン形状")]
-        [Description("文字生成時のアウトラインの形状を指定します。"
-                    + "Miter(鋭角)、Bevel(ベベル)、Round(丸形)から指定します。")]
-        [DefaultValue(PenLineJoin.Miter)]
-        public PenLineJoin OutlineShape { get; set; }
-
-        /// <summary>
-        /// アウトライン描画方法
-        /// </summary>
-        [DisplayName("文字装飾 アウトライン描画方法")]
-        [Description("文字生成時のアウトライン描画方法を指定します。"
-                    + "StrokeOverFill: アウトラインを文字に重ねる、"
-                    + "FillOverStroke: 文字をアウトラインに重ねる、"
-                    + "StrokeOnly: アウトラインのみ描画から指定します。")]
-        [DefaultValue(OutlineStroke.StrokeOverFill)]
-        public OutlineStroke OutlineStroke { get; set; }
-
-        /// <summary>
-        /// 文字色
-        /// </summary>
-        [DisplayName("文字装飾 文字色")]
-        [Description("文字色を指定します。グラデーション使用時には無視されます。")]
-        [DefaultValue(typeof(Color), "255, 255, 255, 255")]
-        public Color FontColor { get; set; }
-
-        /// <summary>
-        /// グラデーション開始色
-        /// </summary>
-        [DisplayName("文字装飾 グラデーション使用")]
-        [Description("文字描画時にグラデーションを使用するかを指定します。")]
-        [DefaultValue(false)]
-        public bool UseGradient { get; set; }
-
-        /// <summary>
-        /// グラデーション開始色
-        /// </summary>
-        [DisplayName("文字装飾 グラデーション開始色")]
-        [Description("グラデーション開始色")]
-        [DefaultValue(typeof(Color), "64, 128, 255, 255")]
-        public Color GradientBeginColor { get; set; }
-
-        /// <summary>
-        /// グラデーション終端色
-        /// </summary>
-        [DisplayName("文字装飾 グラデーション終端色")]
-        [Description("グラデーション終端色")]
-        [DefaultValue(typeof(Color), "0, 0, 128, 255")]
-        public Color GradientEndColor { get; set; }
-
-        /// <summary>
-        /// グラデーション角度
-        /// </summary>
-        [DisplayName("文字装飾 グラデーション角度")]
-        [Description("グラデーション角度")]
-        [DefaultValue(90)]
-        public int GradientAngle { get; set; }
-
-        /// <summary>
-        /// 文字テクスチャフォーマット
-        /// </summary>
-        [DisplayName("文字テクスチャフォーマット")]
-        [Description("使用する文字テクスチャフォーマットを指定します。Autoを設定すると、"
-            +"単色フォントではDXT3、アウトライン文字ではBgra4444、グラデーション文字では"
-            +"Colorを自動的に使用します。")]
-        [DefaultValue(WpfTextureFormat.Auto)]
-        public WpfTextureFormat TextureFormat { get; set; }
-
-        #endregion
-
-        #region 初期化
-
-        /// <summary>
-        /// コンストラクタ
-        /// </summary>
-        public WpfFontDescriptionProcessor()
-        {
-            // 既定値の設定
-            HasAsciiCharacters = true;
-            OutlineColor = new Color(64, 64, 64, 255);
-            OutlineShape = PenLineJoin.Miter;
-            OutlineStroke = OutlineStroke.StrokeOverFill;
-            FontColor = new Color(255, 255, 255, 255);
-            GradientBeginColor = new Color(64, 128, 255, 255);
-            GradientEndColor = new Color(0, 0, 128, 255);
-            GradientAngle = 90;
-        }
-
-        #endregion
-
-        #region コンテント・パイプライン処理
-
-        /// <summary>
-        /// FontDescriptionを処理する
-        /// </summary>
-        public override WpfSpriteFontContent Process(LocalizedFontDescription input,
-                                                        ContentProcessorContext context)
-        {
-            this.input = input;
-
-            // 出力先のFontContentの生成
-            fontContent = new WpfSpriteFontContent();
-
-            GetLocalisedResX(input, context);
-
-            // 文字の追加
-            AddExtraCharacters(context);
-
-            // WPFフォントの生成
-            CreateWpfFont(context);
-
-            // 文字グリフの処理
-            ProcessGlyphs(context);
-
-            context.Logger.LogImportantMessage("処理文字数 {0}", input.Characters.Count);
-
-            // その他の情報の設定
-            fontContent.LineSpacing = (int)(glyphTypeface.Height * fontSize);
-            fontContent.Spacing = input.Spacing;
-            fontContent.DefaultCharacter = input.DefaultCharacter;
-
-            return fontContent;
-        }
-
-        private static void GetLocalisedResX(LocalizedFontDescription input, ContentProcessorContext context)
-        {
-            // Scan each .resx file in turn.
-            foreach (string resourceFile in input.ResourceFiles)
-            {
-                string absolutePath = Path.GetFullPath(resourceFile);
-
-                // Make sure the .resx file really does exist.
-                if (!File.Exists(absolutePath))
-                {
-                    throw new InvalidContentException("Can't find " + absolutePath);
-                }
-
-                // Load the .resx data.
-                XmlDocument xmlDocument = new XmlDocument();
-
-                xmlDocument.Load(absolutePath);
-
-                // Scan each string from the .resx file.
-                foreach (XmlNode xmlNode in xmlDocument.SelectNodes("root/data/value"))
-                {
-                    string resourceString = xmlNode.InnerText;
-
-                    // Scan each character of the string.
-                    foreach (char usedCharacter in resourceString)
-                    {
-                        input.Characters.Add(usedCharacter);
-                    }
-                }
-
-                // Mark that this font should be rebuilt if the resource file changes.
-                context.AddDependency(absolutePath);
-            }
-        }
-
-
-        #endregion
-
-        #region 文字追加処理
-
-        /// <summary>
-        /// プロセッサーパラメーターで指定された文字をinput.Chractersへ追加する
-        /// </summary>
-        void AddExtraCharacters(ContentProcessorContext context)
-        {
-            // ASCII文字の追加
-            if (HasAsciiCharacters)
-            {
-                for (char c = '\u0020'; c <= '\u007e'; ++c)
-                    input.Characters.Add(c);
-            }
-
-            // JISコード文字の追加
-            if (HasZenkakuLatinLetters) AddCharacters(JisCode.GetLatinLetters());
-            if (HasSpecialCharacters)   AddCharacters(JisCode.GetSpecialCharacters());
-            if (HasHiragana)            AddCharacters(JisCode.GetHiragana());
-            if (HasKatakana)            AddCharacters(JisCode.GetKatakana());
-            if (HasJisKanjiLevel1)      AddCharacters(JisCode.GetKanjiLevel1());
-            if (HasJisKanjiLevel2)      AddCharacters(JisCode.GetKanjiLevel2());
-            if (HasCyrillicLetters)     AddCharacters(JisCode.GetCyrillicLetters());
-            if (HasGreekLetters)        AddCharacters(JisCode.GetGreekLetters());
-            if (HasBoxCharacters)       AddCharacters(JisCode.GetBoxDrawingCharacters());
-
-            // 指定されたテキストファイル内の文字列を追加
-            if (!String.IsNullOrEmpty(Text))
-                AddCharacters(Text);
-
-            if (!String.IsNullOrEmpty(MessageFilenames))
-            {
-                foreach (var token in MessageFilenames.Split(new char[] { ';' }))
-                {
-                    // 文字列両端の余分な余白と'"'を取り除く
-                    var filename = token.Trim();
-                    filename = filename.Trim(new char[] { '"' });
-                    filename = filename.Trim(); // '"'内の余分な余白も取り除く
-
-                    AddCharacters(filename, context);
-                }
-            }
-
-            // DefaultCharacterも忘れずに
-            if (input.DefaultCharacter.HasValue)
-                input.Characters.Add(input.DefaultCharacter.Value);
-        }
-
-        /// <summary>
-        /// 指定されたテキストファイル内の文字を追加する
-        /// </summary>
-        /// <param name="filename">テキストファイル名</param>
-        void AddCharacters(string filename, ContentProcessorContext context)
-        {
-            // 指定されたファイルから文字列を読み込む
-            // FontDescription.Charctarsに追加する
-            try
-            {
-                if (!File.Exists(filename))
-                {
-                    throw new FileNotFoundException(String.Format(
-                        "MessageFilenamesで指定されたファイル[{0}]が存在しません",
-                        Path.GetFullPath(filename)));
-                }
-
-                foreach (var line in File.ReadLines(filename, Encoding.Default))
-                {
-                    AddCharacters(line);
-                }
-
-                // CPにファイル依存していることを教える
-                context.AddDependency(Path.GetFullPath(filename));
-            }
-            catch (Exception e)
-            {
-                // 予期しない例外が発生
-                context.Logger.LogImportantMessage("例外発生!! {0}", e.Message);
-                throw e;
-            }
-        }
-
-        /// <summary>
-        /// 指定された文字コレクションを追加する
-        /// </summary>
-        void AddCharacters(IEnumerable<char> addingCharacters)
-        {
-            foreach (var c in addingCharacters)
-            {
-                input.Characters.Add(c);
-            }
-        }
-
-        #endregion
-
-        #region WPFフォント生成
-
-        /// <summary>
-        /// FontDescriptionからWPFフォントを生成する
-        /// </summary>
-        void CreateWpfFont(ContentProcessorContext context)
-        {
-            // FontDescriptionでのフォントサイズは72DPIで指定されているので
-            // WPFのDIU(Device Independent Unit)に変換する
-            fontSize = (float)(input.Size * (WpfDiu / 72.0));
-
-            // フォントスタイルの変換
-            var fontWeight = ((input.Style & FontDescriptionStyle.Bold) ==
-                FontDescriptionStyle.Bold) ? FontWeights.Bold : FontWeights.Regular;
-            var fontStyle = ((input.Style & FontDescriptionStyle.Italic) ==
-                FontDescriptionStyle.Italic) ? FontStyles.Italic : FontStyles.Normal;
-
-            // Typefaceの生成
-            typeface = new Typeface(new FontFamily(input.FontName),
-                                    fontStyle, fontWeight, FontStretches.Normal);
-
-            if (typeface == null)
-            {
-                throw new InvalidOperationException(
-                    "フォント\"{0}\"の生成に失敗しました。" +
-                    "指定されたフォントがインストールされているか確認してください。");
-            }
-
-            // GlyphTypefaceの取得
-            if (typeface.TryGetGlyphTypeface(out glyphTypeface) == false)
-            {
-                throw new InvalidOperationException(
-                    "フォント\"{0}\"のGlyphTypeface生成に失敗しました。");
-            }
-        }
-
-        #endregion
-
-        #region グリフ処理
-
-        void ProcessGlyphs(ContentProcessorContext context)
-        {
-            // 文字描画に必要な情報設定
-            if (UseGradient)
-            {
-                textBrush = new LinearGradientBrush(
-                    ToWpfColor(this.GradientBeginColor),
-                    ToWpfColor(this.GradientEndColor),
-                    GradientAngle);
-            }
-            else
-            {
-                textBrush = new SolidColorBrush(ToWpfColor(FontColor));
-            }
-
-            if (OutlineThickness > 0)
-            {
-                outlinePen = new Pen(new SolidColorBrush(ToWpfColor(OutlineColor)),
-                                    OutlineThickness);
-                outlinePen.LineJoin = OutlineShape;
-            }
-            else
-            {
-                outlinePen = null;
-            }
-
-            renderTarget = null;
-            drawingVisual = new DrawingVisual();
-
-
-            // 登録文字をUnicode順に並び替える、これはXNAが実行時に文字グリフを
-            // バイナリ検索しているので重要なステップ
-            var characters = from c in input.Characters orderby c select c;
-
-            var layouter = new BoxLayouter();
-
-            // 一文字ずつつ描画し、グリフ情報を生成する
-            foreach (char c in characters)
-            {
-                // 文字描画
-                var glyphBounds = RenderCharacter(c);
-
-                // ピクセル情報の取得
-                int stride = renderTarget.PixelWidth;
-                uint[] pixels = new uint[stride * renderTarget.PixelHeight];
-                renderTarget.CopyPixels(pixels, stride * sizeof(uint), 0);
-
-                // Black-Boxを取得し、必要な領域の画像イメージを取得
-                glyphBounds = NarrowerGlyph(pixels, stride, glyphBounds);
-                var blackBox = GetBlackBox(pixels, stride, glyphBounds);
-                pixels = new uint[blackBox.Width * blackBox.Height];
-                renderTarget.CopyPixels(
-                    ToInt32Rect(blackBox), pixels, blackBox.Width * sizeof(uint), 0);
-
-                // カーニング情報の取得
-                var kerning = GetKerning(c, blackBox);
-
-                // FontContentへの設定
-                fontContent.CharacterMap.Add(c);
-                fontContent.Kerning.Add(kerning);
-                fontContent.Glyphs.Add(new Rectangle(
-                    0, 0, blackBox.Width, blackBox.Height));
-                fontContent.Cropping.Add(new Rectangle(
-                    blackBox.X - glyphBounds.X,
-                    blackBox.Y - glyphBounds.Y,
-                    glyphBounds.Width, glyphBounds.Height));
-
-                // レイアウト用アイテムとして追加
-                layouter.Add(new BoxLayoutItem{Bounds = blackBox, Tag = pixels});
-            }
-
-            // テクスチャ処理
-            ProcessTexture(layouter);
-        }
-
-        /// <summary>
-        /// 文字グリフからテクスチャを生成する
-        /// </summary>
-        /// <param name="layouter"></param>
-        void ProcessTexture(BoxLayouter layouter)
-        {
-            // レイアウト、複数の矩形を1つの矩形内に並べる
-            int width, height;
-            layouter.Layout(out width, out height);
-
-            // 配置後のグリフを画像へ書き込む
-            var bitmap = new PixelBitmapContent<Color>(width, height);
-            for (int i = 0; i < layouter.Items.Count; ++i)
-            {
-                // グリフ位置情報の追加
-                var rc = fontContent.Glyphs[i];
-                rc.X = layouter.Items[i].Bounds.X;
-                rc.Y = layouter.Items[i].Bounds.Y;
-                fontContent.Glyphs[i] = rc;
-
-                // 個々のグリフ画像をひとつの画像へ追加する
-                var pixels = layouter.Items[i].Tag as uint[];
-                int idx = 0;
-                for (int y = 0; y < rc.Height; ++y)
-                {
-                    for(int x = 0; x < rc.Width; ++x)
-                    {
-                        int r = (int)((pixels[idx] & 0x00ff0000) >> 16);
-                        int g = (int)((pixels[idx] & 0x0000ff00) >>  8);
-                        int b = (int)((pixels[idx] & 0x000000ff) >>  0);
-                        int a = (int)((pixels[idx] & 0xff000000) >> 24);
-                        bitmap.SetPixel(rc.X + x, rc.Y + y, new Color(r, g, b, a));
-                        ++idx;
-                    }
-                }
-            }
-
-            // 文字画像をまとめた画像をテクスチャへ変換する
-            fontContent.Texture = new Texture2DContent();
-            switch(TextureFormat)
-            {
-                case WpfTextureFormat.Auto:
-                    if (UseGradient)
-                    {
-                        // グラデーション使用していればColorフォーマット
-                        fontContent.Texture.Mipmaps = bitmap;
-                    }
-                    else if (OutlineThickness > 0)
-                    {
-                        // アウトラインのみ使用していればBgra4444フォーマット
-                        fontContent.Texture.Mipmaps = bitmap;
-                        fontContent.Texture.ConvertBitmapType(
-                                    typeof(PixelBitmapContent<Bgra4444>));
-                    }
-                    else
-                    {
-                        // それ以外の単色フォントであれば単色に特化したDXT3圧縮をする
-                        fontContent.Texture.Mipmaps =
-                            SingleColorDxtCompressor.Compress(bitmap, FontColor);
-                    }
-                    break;
-                case WpfTextureFormat.Bgra4444:
-                    fontContent.Texture.Mipmaps = bitmap;
-                    fontContent.Texture.ConvertBitmapType(
-                                typeof(PixelBitmapContent<Bgra4444>));
-                    break;
-                case WpfTextureFormat.Color:
-                    fontContent.Texture.Mipmaps = bitmap;
-                    break;
-            }
-
-        }
-
-        /// <summary>
-        /// カーニング情報の取得
-        /// </summary>
-        protected Vector3 GetKerning(char character, Rectangle blackBox)
-        {
-            // Left/RightBearing情報が取得できれば、その情報を、
-            // できなければBlack-box値をカーニング情報として使用する
-            Vector3 kerning = Vector3.Zero;
-            ushort glyphIdx;
-            if (glyphTypeface.CharacterToGlyphMap.TryGetValue(character, out glyphIdx))
-            {
-                var leftSideBearing = glyphTypeface.LeftSideBearings[glyphIdx];
-                var rightSideBearing = glyphTypeface.RightSideBearings[glyphIdx];
-                kerning.X = SnapPixel(leftSideBearing * fontSize);
-                kerning.Z = SnapPixel(rightSideBearing * fontSize);
-            }
-
-            kerning.Y = blackBox.Width;
-
-            return kerning;
-        }
-
-        /// <summary>
-        /// ピクセル単位のカーニング値取得
-        /// </summary>
-        static float SnapPixel(double value)
-        {
-            // WPFの描画結果に合わせる為のバイアス(トライ&エラーの産物)
-            var bias = 0.0937456;
-
-            if (value > 0)
-                return (float)Math.Floor(value + bias);
-
-            return (float)Math.Ceiling(value - bias);
-        }
-
-        #endregion
-
-        #region 文字描画
-
-        /// <summary>
-        /// 文字描画に必要なサイズのレンダーターゲットを用意する
-        /// </summary>
-        /// <param name="width">横幅</param>
-        /// <param name="height">高さ</param>
-        void EnsureRenderTargetSize(int width, int height)
-        {
-            if (renderTarget == null ||
-                renderTarget.Width < width || renderTarget.Height < height)
-            {
-                // 32ピクセル単位で生成する
-                renderTarget = new RenderTargetBitmap(
-                    width + (width % 32), height + (height % 32),
-                    WpfDiu, WpfDiu, PixelFormats.Pbgra32);
-            }
-        }
-
-        /// <summary>
-        /// 一文字描画
-        /// </summary>
-        /// <param name="character"></param>
-        /// <remarks>
-        /// 独自の文字描画を使用する時はこのメソッドをオーバーライドする
-        /// </remarks>
-        protected virtual Rectangle RenderCharacter(char character)
-        {
-            // フォントサイズの取得
-            var formattedText = new FormattedText(
-                    new String(character, 1), CultureInfo.CurrentCulture,
-                    FlowDirection.LeftToRight, typeface, fontSize, textBrush);
-
-            // 描画領域の計算。余裕を持って1.5倍のサイズにする
-            var width = Math.Max((int)Math.Ceiling(
-                                    formattedText.Width * 1.5 + OutlineThickness), 1);
-            var height = Math.Max((int)Math.Ceiling(
-                                    formattedText.Height * 1.5 + OutlineThickness), 1);
-
-            // レンダーターゲットサイズの確保
-            EnsureRenderTargetSize(width, height);
-
-            // 暫定的なグリフ位置の取得
-            int fontWidth = Math.Max((int)Math.Ceiling(formattedText.Width), 1);
-            int fontHeight = Math.Max((int)Math.Ceiling(formattedText.Height), 1);
-            Rectangle rc = new Rectangle(
-                (renderTarget.PixelWidth - fontWidth) / 2,
-                (renderTarget.PixelHeight - fontHeight) / 2,
-                fontWidth, fontHeight);
-
-            // レンダーターゲットへの文字描画
-            using (DrawingContext dc = drawingVisual.RenderOpen())
-            {
-                var pos = new System.Windows.Point(rc.X, rc.Y);
-                if (outlinePen != null)
-                {
-                    var geometry = formattedText.BuildGeometry(pos);
-
-                    switch(OutlineStroke)
-                    {
-                        case OutlineStroke.StrokeOverFill:
-                            dc.DrawGeometry(textBrush, outlinePen, geometry);
-                            break;
-                        case OutlineStroke.FillOverStroke:
-                            dc.DrawGeometry(null, outlinePen, geometry);
-                            dc.DrawGeometry(textBrush, null, geometry);
-                            break;
-                        case OutlineStroke.StrokeOnly:
-                            dc.DrawGeometry(null, outlinePen, geometry);
-                            break;
-                    }
-                }
-                else
-                {
-                    dc.DrawText(formattedText, pos);
-                }
-            }
-            renderTarget.Clear();
-            renderTarget.Render(drawingVisual);
-
-            return rc;
-        }
-
-        #endregion
-
-        #region グリフ処理の為のヘルパーメソッド
-
-        /// <summary>
-        /// 実際の文字グリフ幅を画像から取得する
-        /// </summary>
-        /// <remarks>
-        /// WPF文字描画時では実際の文字グリフ(Black-Box)の周りにBearing値の分だけ
-        /// 左右に空き領域ができる場合があるので、ここでは画像データから
-        /// Black-Box領域部分を取得している。
-        /// また、アウトライン描画等のGeometryを使った文字描画をすると
-        /// 文字のBlack-Box領域より大きくなる場合があるので、その場合にも対処している
-        /// </remarks>
-        Rectangle NarrowerGlyph(uint[] pixels, int stride, Rectangle bounds)
-        {
-            int left = bounds.X;
-            int right = bounds.Right - 1;
-            int width = renderTarget.PixelWidth;
-            int height = renderTarget.PixelHeight;
-
-            // ピクセルデータがある左端を走査
-            while (left > 0 && !IsEmptyColumn(pixels, stride, left, 0, height))
-                left--;
-
-            while ((left < right) && IsEmptyColumn(pixels, stride, left, 0, height))
-                left++;
-
-            // ピクセルデータがある右端を走査
-            while ((right < width) && !IsEmptyColumn(pixels, stride, right, 0, height))
-                right++;
-
-            right = Math.Min(right, width - 1);
-
-            while ((left <= right) && IsEmptyColumn(pixels, stride, right, 0, height))
-                right--;
-
-            // スペースキャラクターだった(全てが透明色の文字)
-            if (right < left)
-            {
-                left = right = 0;
-            }
-
-            // グリフサイズ調整
-            bounds.X = left;
-            bounds.Width = right - left + 1;
-
-            return bounds;
-        }
-
-        /// <summary>
-        /// Black-Box領域を取得する
-        /// </summary>
-        /// <remarks>
-        /// NarrowerGlyphを読んだ後に呼ぶこと
-        /// NarroerGlyphメソッドでBlack-Boxの左右値は既に求められているので
-        /// ここではBlack-Boxの上下端を割り出している
-        /// </remarks>
-        Rectangle GetBlackBox(uint[] pixels, int stride, Rectangle bounds)
-        {
-            int x1 = bounds.X;
-            int x2 = bounds.Right;
-            int top = bounds.Y;
-            int bottom = bounds.Bottom - 1;
-            int height = renderTarget.PixelHeight;
-
-            // ピクセルデータがある上端を走査
-            while ((0 < top) && !IsEmptyLine(pixels, stride, top, x1, x2))
-                top--;
-
-            while ((top < bottom) && IsEmptyLine(pixels, stride, top, x1, x2))
-                top++;
-
-            // ピクセルデータがある下端を走査
-            while ((bottom < height) && !IsEmptyLine(pixels, stride, bottom, x1, x2))
-                bottom++;
-
-            bottom = Math.Min(bottom, height- 1);
-
-            while ((top <= bottom) && IsEmptyLine(pixels, stride, bottom, x1, x2))
-                bottom--;
-
-            // スペースキャラクターだった(全てが透明色の文字)
-            if (bottom < top)
-            {
-                top = bottom = 0;
-            }
-
-            // グリフサイズ調整
-            bounds.Y = top;
-            bounds.Height = bottom - top + 1;
-
-            return bounds;
-        }
-
-        /// <summary>
-        /// 画像の指定された列に透明色以外のピクセルが存在するか?
-        /// </summary>
-        static bool IsEmptyColumn(uint[] pixels, int stride, int x, int y1, int y2)
-        {
-            var idx = y1 * stride + x;
-            for (int y = y1; y < y2; ++y, idx += stride)
-            {
-                if (pixels[idx] != TransparentPixel)
-                    return false;
-            }
-
-            return true;
-        }
-
-        /// <summary>
-        /// 画像の指定された行に透明色以外のピクセルが存在するか?
-        /// </summary>
-        static bool IsEmptyLine(uint[] pixels, int stride, int y, int x1, int x2)
-        {
-            var idx = y * stride + x1;
-            for (int x = x1; x < x2; ++x, ++idx)
-            {
-                if (pixels[idx] != TransparentPixel)
-                    return false;
-            }
-
-            return true;
-        }
-
-        #endregion
-
-        #region その他のヘルパーメソッド
-
-        /// <summary>
-        /// XNAのColor構造体からWPFのColorへ変換する
-        /// </summary>
-        static System.Windows.Media.Color ToWpfColor(Color color)
-        {
-            return
-                System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B);
-        }
-
-        /// <summary>
-        /// XNAのRectangle構造体からInt32Rectへ変換する
-        /// </summary>
-        static Int32Rect ToInt32Rect(Rectangle rc)
-        {
-            return new Int32Rect(rc.X, rc.Y, rc.Width, rc.Height);
-        }
-
-        #endregion
-
-        #region 定数
-
-        // WPFのDIU(Device Independent Unit)
-        const double WpfDiu = 96;
-
-        // 透明色
-        const uint TransparentPixel = 0;
-
-        #endregion
-
-        #region プライベートフィールド
-
-        // 処理中のFontDescription
-        FontDescription input;
-
-        // 出力先
-        WpfSpriteFontContent fontContent;
-
-        // フォントサイズ(DIU)
-        float fontSize;
-
-        // WPFフォント情報
-        Typeface typeface;
-        GlyphTypeface glyphTypeface;
-
-        // テキスト描画用ブラシ
-        Brush textBrush;
-
-        // アウトライン描画用ペン
-        Pen outlinePen;
-
-        // 一文字を描画するためのレンダーターゲット
-        RenderTargetBitmap renderTarget;
-
-        // 文字描画用のDrawingVisual
-        DrawingVisual drawingVisual;
-
-        #endregion
-
-    }
-}

+ 0 - 65
MonoGameSamples/LocalizationSample/WpfFontPipeline/WpfFontPipeline.csproj

@@ -1,65 +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)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.30703</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{A940913D-A0B6-4ED7-A3B8-4C2CE2221779}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>WpfFontPipeline</RootNamespace>
-    <AssemblyName>WpfFontPipeline</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="PresentationCore" />
-    <Reference Include="System" />
-    <Reference Include="MonoGame.Framework">
-      <HintPath>$(MSBuildExtensionsPath)\MonoGame\v3.0\Tools\MonoGame.Framework.dll</HintPath>
-    </Reference>
-    <Reference Include="MonoGame.Framework.Content.Pipeline">
-      <HintPath>$(MSBuildExtensionsPath)\MonoGame\v3.0\Tools\MonoGame.Framework.Content.Pipeline.dll</HintPath>
-    </Reference>
-    <Reference Include="System.XML" />
-    <Reference Include="WindowsBase" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="BoxLayouter.cs" />
-    <Compile Include="JisCode.cs" />
-    <Compile Include="LocalizedFontDescription.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="SingleColorDxtCompressor.cs" />
-    <Compile Include="WpfFontDescriptionProcessor.cs" />
-    <Compile Include="WpfSpriteFontContent.cs" />
-  </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>

+ 0 - 125
MonoGameSamples/LocalizationSample/WpfFontPipeline/WpfSpriteFontContent.cs

@@ -1,125 +0,0 @@
-#region Using ステートメント
-
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.Content.Pipeline;
-using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
-using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
-using System.Collections.Generic;
-
-#endregion
-
-namespace WpfFontPipeline
-{
-    /// <summary>
-    /// WPFスプライトコンテント
-    /// </summary>
-    /// <remarks>
-    /// XNBファイルフォーマットドキュメントに書かれているSpriteFontと同じ物だが、
-    /// SpriteFontContentのフィールドは全て非公開フィールドなので、同じものを宣言している
-    /// http://create.msdn.com/en-US/sample/xnb_format
-    /// </remarks>
-    public class WpfSpriteFontContent
-    {
-        #region プロパティ
-
-        /// <summary>
-        /// テクスチャの取得/設定
-        /// </summary>
-        public Texture2DContent Texture { get; set; }
-
-        /// <summary>
-        /// 文字グリフ領域の取得/設定
-        /// </summary>
-        public List<Rectangle> Glyphs { get; set; }
-
-        /// <summary>
-        /// 文字グリフクリップ領域の取得/設定
-        /// </summary>
-        public List<Rectangle> Cropping { get; set; }
-
-        /// <summary>
-        /// 文字マップの取得/設定
-        /// </summary>
-        public List<char> CharacterMap { get; set; }
-
-        /// <summary>
-        /// 行間スペースの取得/設定
-        /// </summary>
-        public int LineSpacing { get; set; }
-
-        /// <summary>
-        /// 文字間スペースの取得/設定
-        /// </summary>
-        public float Spacing { get; set; }
-
-        /// <summary>
-        /// カーニングの取得/設定
-        /// </summary>
-        public List<Vector3> Kerning { get; set; }
-
-        /// <summary>
-        /// デフォルト文字の取得/設定
-        /// </summary>
-        [ContentSerializer(AllowNull = true)]
-        public char? DefaultCharacter { get; set; }
-
-        #endregion
-
-        #region 初期化
-
-        public WpfSpriteFontContent()
-        {
-            Texture = new Texture2DContent();
-            Glyphs = new List<Rectangle>();
-            Cropping = new List<Rectangle>();
-            CharacterMap = new List<char>();
-            Kerning = new List<Vector3>();
-        }
-
-        #endregion
-    }
-
-    /// <summary>
-    /// WpfSpriteFontContentをXNBファイルへ出力するContentWriter
-    /// </summary>
-    [ContentTypeWriter]
-    class WpfSpriteFontWriter : ContentTypeWriter<WpfSpriteFontContent>
-    {
-        /// <summary>
-        /// XNBファイルへ出力する
-        /// </summary>
-        protected override void Write(ContentWriter output,
-            WpfSpriteFontContent value)
-        {
-            output.WriteObject(value.Texture);
-            output.WriteObject(value.Glyphs);
-            output.WriteObject(value.Cropping);
-            output.WriteObject(value.CharacterMap);
-            output.Write(value.LineSpacing);
-            output.Write(value.Spacing);
-            output.WriteObject(value.Kerning);
-            output.Write(value.DefaultCharacter.HasValue);
-
-            if (value.DefaultCharacter.HasValue)
-            {
-                output.Write(value.DefaultCharacter.Value);
-            }
-        }
-
-        /// <summary>
-        /// ランタイム・リーダーの指定
-        /// </summary>
-        /// <returns></returns>
-        public override string GetRuntimeReader(TargetPlatform targetPlatform)
-        {
-            // XNA標準のSpriteFontReaderの型名をフルネームで指定する事で
-            // 実行時にはSpriteFontとして使えるようになっている。
-            // XNAのバージョンによってPublickKeyTokenの値が変わることに注意
-            return  "Microsoft.Xna.Framework.Content.SpriteFontReader, " +
-                    "Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, " +
-                    "Culture=neutral, PublicKeyToken=842cf8be1de50553";
-        }
-    }
-
-}

+ 0 - 124
MonoGameSamples/Riemers/Series_0_Shooters/Content/Content.mgcb

@@ -1,124 +0,0 @@
-
-#----------------------------- Global Properties ----------------------------#
-
-/outputDir:bin/$(Platform)
-/intermediateDir:obj/$(Platform)
-/platform:DesktopGL
-/config:
-/profile:Reach
-/compress:False
-
-#-------------------------------- References --------------------------------#
-
-
-#---------------------------------- Content ---------------------------------#
-
-#begin background.jpg
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:background.jpg
-
-#begin cannon.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:cannon.png
-
-#begin carriage.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:carriage.png
-
-#begin explosion.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:explosion.png
-
-#begin ground.jpg
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:ground.jpg
-
-#begin hitcannon.wav
-/importer:WavImporter
-/processor:SoundEffectProcessor
-/processorParam:Quality=Best
-/build:hitcannon.wav
-
-#begin hitterrain.wav
-/importer:WavImporter
-/processor:SoundEffectProcessor
-/processorParam:Quality=Best
-/build:hitterrain.wav
-
-#begin launch.wav
-/importer:WavImporter
-/processor:SoundEffectProcessor
-/processorParam:Quality=Best
-/build:launch.wav
-
-#begin myFont.spritefont
-/importer:FontDescriptionImporter
-/processor:FontDescriptionProcessor
-/processorParam:PremultiplyAlpha=True
-/processorParam:TextureFormat=Compressed
-/build:myFont.spritefont
-
-#begin rocket.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:rocket.png
-
-#begin smoke.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:smoke.png
-

BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/background.jpg


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/cannon.png


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/carriage.png


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/explosion.png


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/foreground.png


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/ground.jpg


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/hitcannon.wav


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/hitterrain.wav


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/launch.wav


+ 0 - 60
MonoGameSamples/Riemers/Series_0_Shooters/Content/myFont.spritefont

@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-This file contains an xml description of a font, and will be read by the XNA
-Framework Content Pipeline. Follow the comments to customize the appearance
-of the font in your game, and to change the characters which are available to draw
-with.
--->
-<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
-  <Asset Type="Graphics:FontDescription">
-
-    <!--
-    Modify this string to change the font that will be imported.
-    -->
-    <FontName>Arial</FontName>
-
-    <!--
-    Size is a float value, measured in points. Modify this value to change
-    the size of the font.
-    -->
-    <Size>12</Size>
-
-    <!--
-    Spacing is a float value, measured in pixels. Modify this value to change
-    the amount of spacing in between characters.
-    -->
-    <Spacing>0</Spacing>
-
-    <!--
-    UseKerning controls the layout of the font. If this value is true, kerning information
-    will be used when placing characters.
-    -->
-    <UseKerning>true</UseKerning>
-
-    <!--
-    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
-    and "Bold, Italic", and are case sensitive.
-    -->
-    <Style>Regular</Style>
-
-    <!--
-    If you uncomment this line, the default character will be substituted if you draw
-    or measure text that contains characters which were not included in the font.
-    -->
-    <!-- <DefaultCharacter>*</DefaultCharacter> -->
-
-    <!--
-    CharacterRegions control what letters are available in the font. Every
-    character from Start to End will be built and made available for drawing. The
-    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
-    character set. The characters are ordered according to the Unicode standard.
-    See the documentation for more information.
-    -->
-    <CharacterRegions>
-      <CharacterRegion>
-        <Start>&#32;</Start>
-        <End>&#126;</End>
-      </CharacterRegion>
-    </CharacterRegions>
-  </Asset>
-</XnaContent>

BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/rocket.png


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Content/smoke.png


+ 0 - 697
MonoGameSamples/Riemers/Series_0_Shooters/Game1.cs

@@ -1,697 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Audio;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-
-namespace Series2D1
-{
-    public struct PlayerData
-    {
-        public Vector2 Position;
-        public bool IsAlive;
-        public Color Color;
-        public float Angle;
-        public float Power;
-    }
-
-    public struct ParticleData
-    {
-        public float BirthTime;
-        public float MaxAge;
-        public Vector2 OriginalPosition;
-        public Vector2 Acceleration;
-        public Vector2 Direction;
-        public Vector2 Position;
-        public float Scaling;
-        public Color ModColor;
-    }
-
-    public class Game1 : Game
-    {
-        //Properties
-        private GraphicsDeviceManager _graphics;
-        private SpriteBatch _spriteBatch;
-        private GraphicsDevice _device;
-        private Texture2D _backgroundTexture;
-        private Texture2D _foregroundTexture;
-        private Texture2D _carriageTexture;
-        private Texture2D _cannonTexture;
-        private Texture2D _rocketTexture;
-        private Texture2D _smokeTexture;
-        private Texture2D _groundTexture;
-        private Texture2D _explosionTexture;
-        private Color[,] _explosionColorArray;
-        private SpriteFont _font;
-        private SoundEffect _hitCannon;
-        private SoundEffect _hitTerrain;
-        private SoundEffect _launch;
-        private int _screenWidth;
-        private int _screenHeight;
-        private PlayerData[] _players;
-        private int _numberOfPlayers = 4;
-        private float _playerScaling;
-        private int _currentPlayer = 0;
-        private bool _rocketFlying = false;
-        private Vector2 _rocketPosition;
-        private Vector2 _rocketDirection;
-        private float _rocketAngle;
-        private float _rocketScaling = 0.1f;
-        private Color[] _playerColors = new Color[10]
-        {
-            Color.Red,
-            Color.Green,
-            Color.Blue,
-            Color.Purple,
-            Color.Orange,
-            Color.Indigo,
-            Color.Yellow,
-            Color.SaddleBrown,
-            Color.Tomato,
-            Color.Turquoise
-        };
-        private List<Vector2> _smokeList = new List<Vector2>();
-        private Random _randomizer = new Random();
-        private int[] _terrainContour;
-        private Color[,] _rocketColorArray;
-        private Color[,] _foregroundColorArray;
-        private Color[,] _carriageColorArray;
-        private Color[,] _cannonColorArray;
-        List<ParticleData> _particleList = new List<ParticleData>();
-        private const bool _resolutionIndependent = false;
-        private Vector2 _baseScreenSize = new Vector2(800, 600);
-
-        public Game1()
-        {
-            _graphics = new GraphicsDeviceManager(this);
-            Content.RootDirectory = "Content";
-        }
-
-        protected override void Initialize()
-        {
-            // TODO: Add your initialization logic here
-            _graphics.PreferredBackBufferWidth = 500;
-            _graphics.PreferredBackBufferHeight = 500;
-            _graphics.IsFullScreen = false;
-            _graphics.ApplyChanges();
-            Window.Title = "Riemer's 2D MonoGame Tutorial";
-
-            base.Initialize();
-        }
-
-        private void SetUpPlayers()
-        {
-            _players = new PlayerData[_numberOfPlayers];
-            for (int i = 0; i < _numberOfPlayers; i++)
-            {
-                _players[i].IsAlive = true;
-                _players[i].Color = _playerColors[i];
-                _players[i].Angle = MathHelper.ToRadians(90);
-                _players[i].Power = 100;
-                _players[i].Position = new Vector2();
-                _players[i].Position.X = _screenWidth / (_numberOfPlayers + 1) * (i + 1);
-                _players[i].Position.Y = _terrainContour[(int)_players[i].Position.X];
-            }
-        }
-
-        private void GenerateTerrainContour()
-        {
-            _terrainContour = new int[_screenWidth];
-
-            double rand1 = _randomizer.NextDouble() + 1;
-            double rand2 = _randomizer.NextDouble() + 2;
-            double rand3 = _randomizer.NextDouble() + 3;
-
-            float offset = _screenHeight / 2;
-            float peakheight = 100;
-            float flatness = 70;
-
-            for (int x = 0; x < _screenWidth; x++)
-            {
-                double height = peakheight / rand1 * Math.Sin((float)x / flatness * rand1 + rand1);
-                height += peakheight / rand2 * Math.Sin((float)x / flatness * rand2 + rand2);
-                height += peakheight / rand3 * Math.Sin((float)x / flatness * rand3 + rand3);
-                height += offset;
-                _terrainContour[x] = (int)height;
-            }
-        }
-
-        private void CreateForeground()
-        {
-            Color[,] groundColors = TextureTo2DArray(_groundTexture);
-            Color[] foregroundColors = new Color[_screenWidth * _screenHeight];
-
-            for (int x = 0; x < _screenWidth; x++)
-            {
-                for (int y = 0; y < _screenHeight; y++)
-                {
-                    if (y > _terrainContour[x])
-                    {
-                        foregroundColors[x + y * _screenWidth] = groundColors[x % _groundTexture.Width, y % _groundTexture.Height];
-                    }
-                    else
-                    {
-                        foregroundColors[x + y * _screenWidth] = Color.Transparent;
-                    }
-                }
-            }
-
-            _foregroundTexture = new Texture2D(_device, _screenWidth, _screenHeight, false, SurfaceFormat.Color);
-            _foregroundTexture.SetData(foregroundColors);
-
-            _foregroundColorArray = TextureTo2DArray(_foregroundTexture);
-        }
-
-        private void FlattenTerrainBelowPlayers()
-        {
-            foreach (PlayerData player in _players)
-            {
-                if (player.IsAlive)
-                {
-                    for (int x = 0; x < 40; x++)
-                    {
-                        _terrainContour[(int)player.Position.X + x] = _terrainContour[(int)player.Position.X];
-                    }
-                }
-            }
-        }
-
-        private Color[,] TextureTo2DArray(Texture2D texture)
-        {
-            Color[] colors1D = new Color[texture.Width * texture.Height];
-            texture.GetData(colors1D);
-
-            Color[,] colors2D = new Color[texture.Width, texture.Height];
-            for (int x = 0; x < texture.Width; x++)
-            {
-                for (int y = 0; y < texture.Height; y++)
-                {
-                    colors2D[x, y] = colors1D[x + y * texture.Width];
-                }
-            }
-
-            return colors2D;
-
-        }
-
-        protected override void LoadContent()
-        {
-            _spriteBatch = new SpriteBatch(GraphicsDevice);
-            _device = _graphics.GraphicsDevice;
-
-            // TODO: use this.Content to load your game content here
-            _backgroundTexture = Content.Load<Texture2D>("background");
-            _carriageTexture = Content.Load<Texture2D>("carriage");
-            _cannonTexture = Content.Load<Texture2D>("cannon");
-            _rocketTexture = Content.Load<Texture2D>("rocket");
-            _smokeTexture = Content.Load<Texture2D>("smoke");
-            _groundTexture = Content.Load<Texture2D>("ground");
-            _explosionTexture = Content.Load<Texture2D>("explosion");
-            _font = Content.Load<SpriteFont>("myFont");
-
-            _hitCannon = Content.Load<SoundEffect>("hitcannon");
-            _hitTerrain = Content.Load<SoundEffect>("hitterrain");
-            _launch = Content.Load<SoundEffect>("launch");
-
-            if (_resolutionIndependent)
-            {
-                _screenWidth = (int)_baseScreenSize.X;
-                _screenHeight = (int)_baseScreenSize.Y;
-            }
-            else
-            {
-                _screenWidth = _device.PresentationParameters.BackBufferWidth;
-                _screenHeight = _device.PresentationParameters.BackBufferHeight;
-            }
-
-            _playerScaling = 40.0f / (float)_carriageTexture.Width;
-
-            GenerateTerrainContour();
-            SetUpPlayers();
-            FlattenTerrainBelowPlayers();
-            CreateForeground();
-
-            _rocketColorArray = TextureTo2DArray(_rocketTexture);
-            _carriageColorArray = TextureTo2DArray(_carriageTexture);
-            _cannonColorArray = TextureTo2DArray(_cannonTexture);
-            _explosionColorArray = TextureTo2DArray(_explosionTexture);
-        }
-
-        private void ProcessKeyboard()
-        {
-            KeyboardState keybState = Keyboard.GetState();
-
-            if (keybState.IsKeyDown(Keys.Left))
-            {
-                _players[_currentPlayer].Angle -= 0.01f;
-            }
-            if (keybState.IsKeyDown(Keys.Right))
-            {
-                _players[_currentPlayer].Angle += 0.01f;
-            }
-
-            if (_players[_currentPlayer].Angle > MathHelper.PiOver2)
-            {
-                _players[_currentPlayer].Angle = -MathHelper.PiOver2;
-            }
-            if (_players[_currentPlayer].Angle < -MathHelper.PiOver2)
-            {
-                _players[_currentPlayer].Angle = MathHelper.PiOver2;
-            }
-
-            if (keybState.IsKeyDown(Keys.Down))
-            {
-                _players[_currentPlayer].Power -= 1;
-            }
-            if (keybState.IsKeyDown(Keys.Up))
-            {
-                _players[_currentPlayer].Power += 1;
-            }
-            if (keybState.IsKeyDown(Keys.PageDown))
-            {
-                _players[_currentPlayer].Power -= 20;
-            }
-            if (keybState.IsKeyDown(Keys.PageUp))
-            {
-                _players[_currentPlayer].Power += 20;
-            }
-
-            if (_players[_currentPlayer].Power > 1000)
-            {
-                _players[_currentPlayer].Power = 1000;
-            }
-            if (_players[_currentPlayer].Power < 0)
-            {
-                _players[_currentPlayer].Power = 0;
-            }
-
-            if (keybState.IsKeyDown(Keys.Enter) || keybState.IsKeyDown(Keys.Space))
-            {
-                _rocketFlying = true;
-                _rocketPosition = _players[_currentPlayer].Position;
-                _rocketPosition.X += 20;
-                _rocketPosition.Y -= 10;
-                _rocketAngle = _players[_currentPlayer].Angle;
-                Vector2 up = new Vector2(0, -1);
-                Matrix rotMatrix = Matrix.CreateRotationZ(_rocketAngle);
-                _rocketDirection = Vector2.Transform(up, rotMatrix);
-                _rocketDirection *= _players[_currentPlayer].Power / 50.0f;
-
-                _launch.Play();
-            }
-        }
-
-        private void UpdateRocket()
-        {
-            if (_rocketFlying)
-            {
-                Vector2 gravity = new Vector2(0, 1);
-                _rocketDirection += gravity / 10.0f;
-                _rocketPosition += _rocketDirection;
-                _rocketAngle = (float)Math.Atan2(_rocketDirection.X, -_rocketDirection.Y);
-
-                for (int i = 0; i < 5; i++)
-                {
-                    Vector2 smokePos = _rocketPosition;
-                    smokePos.X += _randomizer.Next(10) - 5;
-                    smokePos.Y += _randomizer.Next(10) - 5;
-                    _smokeList.Add(smokePos);
-                }
-            }
-        }
-
-        private Vector2 TexturesCollide(Color[,] tex1, Matrix mat1, Color[,] tex2, Matrix mat2)
-        {
-            Matrix mat1to2 = mat1 * Matrix.Invert(mat2);
-            int width1 = tex1.GetLength(0);
-            int height1 = tex1.GetLength(1);
-            int width2 = tex2.GetLength(0);
-            int height2 = tex2.GetLength(1);
-
-            for (int x1 = 0; x1 < width1; x1++)
-            {
-                for (int y1 = 0; y1 < height1; y1++)
-                {
-                    Vector2 pos1 = new Vector2(x1, y1);
-                    Vector2 pos2 = Vector2.Transform(pos1, mat1to2);
-
-                    int x2 = (int)pos2.X;
-                    int y2 = (int)pos2.Y;
-                    if ((x2 >= 0) && (x2 < width2))
-                    {
-                        if ((y2 >= 0) && (y2 < height2))
-                        {
-                            if (tex1[x1, y1].A > 0)
-                            {
-                                if (tex2[x2, y2].A > 0)
-                                {
-                                    return Vector2.Transform(pos1, mat1);
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-
-            return new Vector2(-1, -1);
-        }
-
-        private Vector2 CheckTerrainCollision()
-        {
-            Matrix rocketMat = Matrix.CreateTranslation(-42, -240, 0) *
-                            Matrix.CreateRotationZ(_rocketAngle) *
-                            Matrix.CreateScale(_rocketScaling) *
-                            Matrix.CreateTranslation(_rocketPosition.X, _rocketPosition.Y, 0);
-            Matrix terrainMat = Matrix.Identity;
-            Vector2 terrainCollisionPoint = TexturesCollide(_rocketColorArray, rocketMat, _foregroundColorArray, terrainMat);
-            return terrainCollisionPoint;
-        }
-
-        private Vector2 CheckPlayersCollision()
-        {
-            Matrix rocketMat = Matrix.CreateTranslation(-42, -240, 0) *
-                               Matrix.CreateRotationZ(_rocketAngle) *
-                               Matrix.CreateScale(_rocketScaling) *
-                               Matrix.CreateTranslation(_rocketPosition.X, _rocketPosition.Y, 0);
-
-            for (int i = 0; i < _numberOfPlayers; i++)
-            {
-                PlayerData player = _players[i];
-                if (player.IsAlive)
-                {
-                    if (i != _currentPlayer)
-                    {
-                        int xPos = (int)player.Position.X;
-                        int yPos = (int)player.Position.Y;
-
-                        Matrix carriageMat = Matrix.CreateTranslation(0, -_carriageTexture.Height, 0) *
-                                             Matrix.CreateScale(_playerScaling) *
-                                             Matrix.CreateTranslation(xPos, yPos, 0);
-                        Vector2 carriageCollisionPoint = TexturesCollide(_carriageColorArray, carriageMat, _rocketColorArray, rocketMat);
-
-                        if (carriageCollisionPoint.X > -1)
-                        {
-                            _players[i].IsAlive = false;
-                            return carriageCollisionPoint;
-                        }
-
-                        Matrix cannonMat = Matrix.CreateTranslation(-11, -50, 0) *
-                                           Matrix.CreateRotationZ(player.Angle) *
-                                           Matrix.CreateScale(_playerScaling) *
-                                           Matrix.CreateTranslation(xPos + 20, yPos - 10, 0);
-
-                        Vector2 cannonCollisionPoint = TexturesCollide(_cannonColorArray, cannonMat, _rocketColorArray, rocketMat);
-                        if (cannonCollisionPoint.X > -1)
-                        {
-                            _players[i].IsAlive = false;
-                            return cannonCollisionPoint;
-                        }
-                    }
-                }
-            }
-            return new Vector2(-1, -1);
-        }
-
-        private bool CheckOutOfScreen()
-        {
-            bool rocketOutOfScreen = _rocketPosition.Y > _screenHeight;
-            rocketOutOfScreen |= _rocketPosition.X < 0;
-            rocketOutOfScreen |= _rocketPosition.X > _screenWidth;
-
-            return rocketOutOfScreen;
-        }
-
-        private void CheckCollisions(GameTime gameTime)
-        {
-            Vector2 terrainCollisionPoint = CheckTerrainCollision();
-            Vector2 playerCollisionPoint = CheckPlayersCollision();
-            bool rocketOutOfScreen = CheckOutOfScreen();
-
-            if (playerCollisionPoint.X > -1)
-            {
-                _hitCannon.Play();
-
-                _rocketFlying = false;
-
-                _smokeList = new List<Vector2>();
-                AddExplosion(playerCollisionPoint, 10, 80.0f, 2000.0f, gameTime);
-                NextPlayer();
-            }
-
-            if (terrainCollisionPoint.X > -1)
-            {
-                _hitTerrain.Play();
-
-                _rocketFlying = false;
-
-                _smokeList = new List<Vector2>();
-                AddExplosion(terrainCollisionPoint, 4, 30.0f, 1000.0f, gameTime);
-                NextPlayer();
-            }
-
-            if (rocketOutOfScreen)
-            {
-                _rocketFlying = false;
-
-                _smokeList = new List<Vector2>();
-                NextPlayer();
-            }
-        }
-
-        private void NextPlayer()
-        {
-            _currentPlayer = _currentPlayer + 1;
-            _currentPlayer = _currentPlayer % _numberOfPlayers;
-            while (!_players[_currentPlayer].IsAlive)
-            {
-                _currentPlayer = ++_currentPlayer % _numberOfPlayers;
-            }
-        }
-
-        private void AddExplosion(Vector2 explosionPos, int numberOfParticles, float size, float maxAge, GameTime gameTime)
-        {
-            for (int i = 0; i < numberOfParticles; i++)
-            {
-                AddExplosionParticle(explosionPos, size, maxAge, gameTime);
-            }
-
-            float rotation = (float)_randomizer.Next(10);
-            Matrix mat = Matrix.CreateTranslation(-_explosionTexture.Width / 2, -_explosionTexture.Height / 2, 0) *
-                                                  Matrix.CreateRotationZ(rotation) *
-                                                  Matrix.CreateScale(size / (float)_explosionTexture.Width * 2.0f) *
-                                                  Matrix.CreateTranslation(explosionPos.X, explosionPos.Y, 0);
-
-            AddCrater(_explosionColorArray, mat);
-
-            for (int i = 0; i < _players.Length; i++)
-            {
-                _players[i].Position.Y = _terrainContour[(int)_players[i].Position.X];
-            }
-            FlattenTerrainBelowPlayers();
-            CreateForeground();
-        }
-
-        private void AddExplosionParticle(Vector2 explosionPos, float explosionSize, float maxAge, GameTime gameTime)
-        {
-            ParticleData particle = new ParticleData();
-
-            particle.OriginalPosition = explosionPos;
-            particle.Position = particle.OriginalPosition;
-
-            particle.BirthTime = (float)gameTime.TotalGameTime.TotalMilliseconds;
-            particle.MaxAge = maxAge;
-            particle.Scaling = 0.25f;
-            particle.ModColor = Color.White;
-
-            float particleDistance = (float)_randomizer.NextDouble() * explosionSize;
-            Vector2 displacement = new Vector2(particleDistance, 0);
-            float angle = MathHelper.ToRadians(_randomizer.Next(360));
-            displacement = Vector2.Transform(displacement, Matrix.CreateRotationZ(angle));
-
-            particle.Direction = displacement * 2.0f;
-            particle.Acceleration = -particle.Direction;
-
-            _particleList.Add(particle);
-        }
-
-        private void UpdateParticles(GameTime gameTime)
-        {
-            float now = (float)gameTime.TotalGameTime.TotalMilliseconds;
-            for (int i = _particleList.Count - 1; i >= 0; i--)
-            {
-                ParticleData particle = _particleList[i];
-                float timeAlive = now - particle.BirthTime;
-
-                if (timeAlive > particle.MaxAge)
-                {
-                    _particleList.RemoveAt(i);
-                }
-                else
-                {
-                    //update current particle
-                    float relAge = timeAlive / particle.MaxAge;
-                    particle.Position = 0.5f * particle.Acceleration * relAge * relAge + particle.Direction * relAge + particle.OriginalPosition;
-
-                    float invAge = 1.0f - relAge;
-                    particle.ModColor = new Color(new Vector4(invAge, invAge, invAge, invAge));
-
-                    Vector2 positionFromCenter = particle.Position - particle.OriginalPosition;
-                    float distance = positionFromCenter.Length();
-                    particle.Scaling = (50.0f + distance) / 200.0f;
-
-                    _particleList[i] = particle;
-                }
-            }
-        }
-
-        private void AddCrater(Color[,] tex, Matrix mat)
-        {
-            int width = tex.GetLength(0);
-            int height = tex.GetLength(1);
-
-            for (int x = 0; x < width; x++)
-            {
-                for (int y = 0; y < height; y++)
-                {
-                    if (tex[x, y].R > 10)
-                    {
-                        Vector2 imagePos = new Vector2(x, y);
-                        Vector2 screenPos = Vector2.Transform(imagePos, mat);
-
-                        int screenX = (int)screenPos.X;
-                        int screenY = (int)screenPos.Y;
-
-                        if ((screenX) > 0 && (screenX < _screenWidth))
-                        {
-                            if (_terrainContour[screenX] < screenY)
-                            {
-                                _terrainContour[screenX] = screenY;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        protected override void Update(GameTime gameTime)
-        {
-            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
-                Keyboard.GetState().IsKeyDown(Keys.Escape))
-            {
-                Exit();
-            }
-
-            // TODO: Add your update logic here
-
-            if (_rocketFlying)
-            {
-                UpdateRocket();
-                CheckCollisions(gameTime);
-            }
-
-            if (_particleList.Count > 0)
-            {
-                UpdateParticles(gameTime);
-            }
-
-            if (!_rocketFlying && _particleList.Count == 0)
-            {
-                ProcessKeyboard();
-            }
-
-            base.Update(gameTime);
-        }
-
-        protected override void Draw(GameTime gameTime)
-        {
-            GraphicsDevice.Clear(Color.CornflowerBlue);
-
-            // TODO: Add your drawing code here
-
-            Vector3 screenScalingFactor;
-            if (_resolutionIndependent)
-            {
-                float horScaling = (float)_device.PresentationParameters.BackBufferWidth / _baseScreenSize.X;
-                float verScaling = (float)_device.PresentationParameters.BackBufferHeight / _baseScreenSize.Y;
-                screenScalingFactor = new Vector3(horScaling, verScaling, 1);
-            }
-            else
-            {
-                screenScalingFactor = new Vector3(1, 1, 1);
-            }
-
-            Matrix globalTransformation = Matrix.CreateScale(screenScalingFactor);
-
-            _spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, globalTransformation);
-            DrawScenery();
-            DrawPlayers();
-            DrawText();
-            DrawRocket();
-            DrawSmoke();
-            _spriteBatch.End();
-
-            _spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, null, null, null, null, globalTransformation);
-            DrawExplosion();
-            _spriteBatch.End();
-
-            base.Draw(gameTime);
-        }
-
-        private void DrawScenery()
-        {
-            Rectangle screenRectangle = new Rectangle(0, 0, _screenWidth, _screenHeight);
-            _spriteBatch.Draw(_backgroundTexture, screenRectangle, Color.White);
-            _spriteBatch.Draw(_foregroundTexture, screenRectangle, Color.White);
-        }
-
-        private void DrawPlayers()
-        {
-            for (int i = 0; i < _players.Length; i++)
-            {
-                if (_players[i].IsAlive)
-                {
-                    int xPos = (int)_players[i].Position.X;
-                    int yPos = (int)_players[i].Position.Y;
-                    Vector2 cannonOrigin = new Vector2(11, 50);
-
-                    _spriteBatch.Draw(_carriageTexture, _players[i].Position, null, _players[i].Color, 0, new Vector2(0, _carriageTexture.Height), _playerScaling, SpriteEffects.None, 0);
-                    _spriteBatch.Draw(_cannonTexture, new Vector2(xPos + 20, yPos - 10), null, _players[i].Color, _players[i].Angle, cannonOrigin, _playerScaling, SpriteEffects.None, 1);
-                }
-            }
-        }
-
-        private void DrawText()
-        {
-            PlayerData player = _players[_currentPlayer];
-            int currentAngle = (int)MathHelper.ToDegrees(player.Angle);
-            _spriteBatch.DrawString(_font, "Cannon angle: " + currentAngle.ToString(), new Vector2(20, 20), player.Color);
-            _spriteBatch.DrawString(_font, "Cannon power: " + player.Power.ToString(), new Vector2(20, 45), player.Color);
-        }
-
-        private void DrawRocket()
-        {
-            if (_rocketFlying)
-            {
-                _spriteBatch.Draw(_rocketTexture, _rocketPosition, null, _players[_currentPlayer].Color, _rocketAngle, new Vector2(42, 240), _rocketScaling, SpriteEffects.None, 1);
-            }
-        }
-
-        private void DrawSmoke()
-        {
-            for (int i = 0; i < _smokeList.Count; i++)
-            {
-                _spriteBatch.Draw(_smokeTexture, _smokeList[i], null, Color.White, 0, new Vector2(40, 35), 0.2f, SpriteEffects.None, 1);
-            }
-        }
-
-        private void DrawExplosion()
-        {
-            for (int i = 0; i < _particleList.Count; i++)
-            {
-                ParticleData particle = _particleList[i];
-                _spriteBatch.Draw(_explosionTexture, particle.Position, null, particle.ModColor, i, new Vector2(256, 256), particle.Scaling, SpriteEffects.None, 1);
-            }
-        }
-    }
-}

BIN
MonoGameSamples/Riemers/Series_0_Shooters/Icon.bmp


BIN
MonoGameSamples/Riemers/Series_0_Shooters/Icon.ico


+ 0 - 14
MonoGameSamples/Riemers/Series_0_Shooters/Program.cs

@@ -1,14 +0,0 @@
-using System;
-
-namespace XNATutorial
-{
-    public static class Program
-    {
-        [STAThread]
-        static void Main()
-        {
-            using (var game = new Game1())
-                game.Run();
-        }
-    }
-}

+ 0 - 30
MonoGameSamples/Riemers/Series_0_Shooters/Series_0_Shooters.csproj

@@ -1,30 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>WinExe</OutputType>
-    <TargetFramework>netcoreapp3.1</TargetFramework>
-    <PublishReadyToRun>false</PublishReadyToRun>
-    <TieredCompilation>false</TieredCompilation>
-  </PropertyGroup>
-  <PropertyGroup>
-    <ApplicationManifest>app.manifest</ApplicationManifest>
-    <ApplicationIcon>Icon.ico</ApplicationIcon>
-  </PropertyGroup>
-  <ItemGroup>
-    <None Remove="Icon.ico" />
-    <None Remove="Icon.bmp" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Icon.ico" />
-    <EmbeddedResource Include="Icon.bmp" />
-  </ItemGroup>
-  <ItemGroup>
-    <MonoGameContentReference Include="Content\Content.mgcb" />
-  </ItemGroup>
-  <ItemGroup>
-    <TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
-  </ItemGroup>
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
-    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
-  </ItemGroup>
-</Project>

+ 0 - 43
MonoGameSamples/Riemers/Series_0_Shooters/app.manifest

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
-  <assemblyIdentity version="1.0.0.0" name="Series_0_Shooters"/>
-  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
-    <security>
-      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
-        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
-      </requestedPrivileges>
-    </security>
-  </trustInfo>
-
-  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
-    <application>
-      <!-- A list of the Windows versions that this application has been tested on and is
-           is designed to work with. Uncomment the appropriate elements and Windows will 
-           automatically selected the most compatible environment. -->
-
-      <!-- Windows Vista -->
-      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
-
-      <!-- Windows 7 -->
-      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
-
-      <!-- Windows 8 -->
-      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
-
-      <!-- Windows 8.1 -->
-      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
-
-      <!-- Windows 10 -->
-      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
-
-    </application>
-  </compatibility>
-
-  <application xmlns="urn:schemas-microsoft-com:asm.v3">
-    <windowsSettings>
-      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
-      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
-    </windowsSettings>
-  </application>
-
-</assembly>

+ 0 - 33
MonoGameSamples/Riemers/Series_1_Terrain/Content/Content.mgcb

@@ -1,33 +0,0 @@
-
-#----------------------------- Global Properties ----------------------------#
-
-/outputDir:bin/$(Platform)
-/intermediateDir:obj/$(Platform)
-/platform:DesktopGL
-/config:
-/profile:Reach
-/compress:False
-
-#-------------------------------- References --------------------------------#
-
-
-#---------------------------------- Content ---------------------------------#
-
-#begin effects.fx
-/importer:EffectImporter
-/processor:EffectProcessor
-/processorParam:DebugMode=Auto
-/build:effects.fx
-
-#begin heightmap.bmp
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:heightmap.bmp
-

+ 0 - 282
MonoGameSamples/Riemers/Series_1_Terrain/Content/effects.fx

@@ -1,282 +0,0 @@
-//------------------------------------------------------
-//--                                                  --
-//--		   www.riemers.net                    --
-//--   		    Basic shaders                     --
-//--		Use/modify as you like                --
-//--                                                  --
-//------------------------------------------------------
-
-struct VertexToPixel
-{
-    float4 Position   	: POSITION;    
-    float4 Color		: COLOR0;
-    float LightingFactor: TEXCOORD0;
-    float2 TextureCoords: TEXCOORD1;
-};
-
-struct PixelToFrame
-{
-    float4 Color : COLOR0;
-};
-
-//------- Constants --------
-float4x4 xView;
-float4x4 xProjection;
-float4x4 xWorld;
-float3 xLightDirection;
-float xAmbient;
-bool xEnableLighting;
-bool xShowNormals;
-float3 xCamPos;
-float3 xCamUp;
-float xPointSpriteSize;
-
-//------- Texture Samplers --------
-
-Texture xTexture;
-sampler TextureSampler = sampler_state { texture = <xTexture>; magfilter = LINEAR; minfilter = LINEAR; mipfilter=LINEAR; AddressU = mirror; AddressV = mirror;};
-
-//------- Technique: Pretransformed --------
-
-VertexToPixel PretransformedVS( float4 inPos : POSITION, float4 inColor: COLOR)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	
-	Output.Position = inPos;
-	Output.Color = inColor;
-    
-	return Output;    
-}
-
-PixelToFrame PretransformedPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-	
-	Output.Color = PSIn.Color;
-
-	return Output;
-}
-
-technique Pretransformed
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 PretransformedVS();
-		PixelShader  = compile ps_4_0_level_9_3 PretransformedPS();
-#else
-		VertexShader = compile vs_1_1 PretransformedVS();
-		PixelShader  = compile ps_2_0 PretransformedPS();
-#endif				
-	}
-}
-
-//------- Technique: Colored --------
-
-VertexToPixel ColoredVS( float4 inPos : POSITION, float3 inNormal: NORMAL, float4 inColor: COLOR)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	float4x4 preViewProjection = mul (xView, xProjection);
-	float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
-    
-	Output.Position = mul(inPos, preWorldViewProjection);
-	Output.Color = inColor;
-	
-	float3 Normal = normalize(mul(normalize(inNormal), (float3x3)xWorld));	
-	Output.LightingFactor = 1;
-	if (xEnableLighting)
-		Output.LightingFactor = dot(Normal, -xLightDirection);
-    
-	return Output;    
-}
-
-PixelToFrame ColoredPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-    
-	Output.Color = PSIn.Color;
-	Output.Color.rgb *= saturate(PSIn.LightingFactor) + xAmbient;
-
-	return Output;
-}
-
-technique Colored
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 ColoredVS();
-		PixelShader  = compile ps_4_0_level_9_3 ColoredPS();
-#else
-		VertexShader = compile vs_1_1 ColoredVS();
-		PixelShader  = compile ps_2_0 ColoredPS();
-#endif				
-	}
-}
-
-//------- Technique: ColoredNoShading --------
-
-VertexToPixel ColoredNoShadingVS( float4 inPos : POSITION, float4 inColor: COLOR)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	float4x4 preViewProjection = mul (xView, xProjection);
-	float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
-    
-	Output.Position = mul(inPos, preWorldViewProjection);
-	Output.Color = inColor;
-    
-	return Output;    
-}
-
-PixelToFrame ColoredNoShadingPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-    
-	Output.Color = PSIn.Color;
-
-	return Output;
-}
-
-technique ColoredNoShading
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 ColoredNoShadingVS();
-		PixelShader  = compile ps_4_0_level_9_3 ColoredNoShadingPS();
-#else
-		VertexShader = compile vs_1_1 ColoredNoShadingVS();
-		PixelShader  = compile ps_2_0 ColoredNoShadingPS();
-#endif				
-	}
-}
-
-
-//------- Technique: Textured --------
-
-VertexToPixel TexturedVS( float4 inPos : POSITION, float3 inNormal: NORMAL, float2 inTexCoords: TEXCOORD0)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	float4x4 preViewProjection = mul (xView, xProjection);
-	float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
-    
-	Output.Position = mul(inPos, preWorldViewProjection);	
-	Output.TextureCoords = inTexCoords;
-	
-	float3 Normal = normalize(mul(normalize(inNormal), (float3x3)xWorld));	
-	Output.LightingFactor = 1;
-	if (xEnableLighting)
-		Output.LightingFactor = dot(Normal, -xLightDirection);
-    
-	return Output;    
-}
-
-PixelToFrame TexturedPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-	
-	Output.Color = tex2D(TextureSampler, PSIn.TextureCoords);
-	Output.Color.rgb *= saturate(PSIn.LightingFactor) + xAmbient;
-
-	return Output;
-}
-
-technique Textured
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 TexturedVS();
-		PixelShader  = compile ps_4_0_level_9_3 TexturedPS();
-#else
-		VertexShader = compile vs_1_1 TexturedVS();
-		PixelShader  = compile ps_2_0 TexturedPS();
-#endif				
-	}
-}
-
-//------- Technique: TexturedNoShading --------
-
-VertexToPixel TexturedNoShadingVS( float4 inPos : POSITION, float3 inNormal: NORMAL, float2 inTexCoords: TEXCOORD0)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	float4x4 preViewProjection = mul (xView, xProjection);
-	float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
-    
-	Output.Position = mul(inPos, preWorldViewProjection);	
-	Output.TextureCoords = inTexCoords;
-    
-	return Output;    
-}
-
-PixelToFrame TexturedNoShadingPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-	
-	Output.Color = tex2D(TextureSampler, PSIn.TextureCoords);
-
-	return Output;
-}
-
-technique TexturedNoShading
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 TexturedNoShadingVS();
-		PixelShader  = compile ps_4_0_level_9_3 TexturedNoShadingPS();
-#else
-		VertexShader = compile vs_1_1 TexturedNoShadingVS();
-		PixelShader  = compile ps_2_0 TexturedNoShadingPS();
-#endif		
-	}
-}
-
-//------- Technique: PointSprites --------
-
-VertexToPixel PointSpriteVS(float3 inPos: POSITION0, float2 inTexCoord: TEXCOORD0)
-{
-    VertexToPixel Output = (VertexToPixel)0;
-
-    float3 center = mul(inPos, (float3x3)xWorld);
-    float3 eyeVector = center - xCamPos;
-
-    float3 sideVector = cross(eyeVector,xCamUp);
-    sideVector = normalize(sideVector);
-    float3 upVector = cross(sideVector,eyeVector);
-    upVector = normalize(upVector);
-
-    float3 finalPosition = center;
-    finalPosition += (inTexCoord.x-0.5f)*sideVector*0.5f*xPointSpriteSize;
-    finalPosition += (0.5f-inTexCoord.y)*upVector*0.5f*xPointSpriteSize;
-
-    float4 finalPosition4 = float4(finalPosition, 1);
-
-    float4x4 preViewProjection = mul (xView, xProjection);
-    Output.Position = mul(finalPosition4, preViewProjection);
-
-    Output.TextureCoords = inTexCoord;
-
-    return Output;
-}
-
-PixelToFrame PointSpritePS(VertexToPixel PSIn)
-{
-    PixelToFrame Output = (PixelToFrame)0;
-    Output.Color = tex2D(TextureSampler, PSIn.TextureCoords);
-    return Output;
-}
-
-technique PointSprites
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 PointSpriteVS();
-		PixelShader  = compile ps_4_0_level_9_3 PointSpritePS();
-#else
-		VertexShader = compile vs_1_1 PointSpriteVS();
-		PixelShader  = compile ps_2_0 PointSpritePS();
-#endif
-	}
-}

BIN
MonoGameSamples/Riemers/Series_1_Terrain/Content/heightmap.bmp


+ 0 - 253
MonoGameSamples/Riemers/Series_1_Terrain/Game1.cs

@@ -1,253 +0,0 @@
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-
-namespace Series3D1
-{
-    public class Game1 : Game
-    {
-        public struct VertexPositionColorNormal
-        {
-            public Vector3 Position;
-            public Color Color;
-            public Vector3 Normal;
-
-            public readonly static VertexDeclaration VertexDeclaration = new VertexDeclaration
-            (
-                new VertexElement(0, VertexElementFormat.Vector3, VertexElementUsage.Position, 0),
-                new VertexElement(sizeof(float) * 3, VertexElementFormat.Color, VertexElementUsage.Color, 0),
-                new VertexElement(sizeof(float) * 3 + 4, VertexElementFormat.Vector3, VertexElementUsage.Normal, 0)
-            );
-        }
-
-        //Properties
-        private GraphicsDeviceManager _graphics;
-        private GraphicsDevice _device;
-        private Effect _effect;
-        private VertexPositionColorNormal[] _vertices;
-        private Matrix _viewMatrix;
-        private Matrix _projectionMatrix;
-        private float _angle = 0f;
-        private short[] _indices;
-        private int _terrainWidth = 4;
-        private int _terrainHeight = 3;
-        private float[,] _heightData;
-        private VertexBuffer _myVertexBuffer;
-        private IndexBuffer _myIndexBuffer;
-
-        public Game1()
-        {
-            _graphics = new GraphicsDeviceManager(this);
-            Content.RootDirectory = "Content";
-            IsMouseVisible = true;
-        }
-
-        protected override void Initialize()
-        {
-            // TODO: Add your initialization logic here
-            _graphics.PreferredBackBufferWidth = 500;
-            _graphics.PreferredBackBufferHeight = 500;
-            _graphics.IsFullScreen = false;
-            _graphics.ApplyChanges();
-            Window.Title = "Riemer's MonoGame Tutorials -- 3D Series 1";
-
-            base.Initialize();
-        }
-
-        private void SetUpVertices()
-        {
-            float minHeight = float.MaxValue;
-            float maxHeight = float.MinValue;
-            for (int x = 0; x < _terrainWidth; x++)
-            {
-                for (int y = 0; y < _terrainHeight; y++)
-                {
-                    if (_heightData[x, y] < minHeight)
-                        minHeight = _heightData[x, y];
-                    if (_heightData[x, y] > maxHeight)
-                        maxHeight = _heightData[x, y];
-                }
-            }
-
-            _vertices = new VertexPositionColorNormal[_terrainWidth * _terrainHeight];
-            for (int x = 0; x < _terrainWidth; x++)
-            {
-                for (int y = 0; y < _terrainHeight; y++)
-                {
-                    _vertices[x + y * _terrainWidth].Position = new Vector3(x, _heightData[x, y], -y);
-                    _vertices[x + y * _terrainWidth].Position = new Vector3(x, _heightData[x, y], -y);
-
-                    if (_heightData[x, y] < minHeight + (maxHeight - minHeight) / 4)
-                    {
-                        _vertices[x + y * _terrainWidth].Color = Color.Blue;
-                    }
-                    else if (_heightData[x, y] < minHeight + (maxHeight - minHeight) * 2 / 4)
-                    {
-                        _vertices[x + y * _terrainWidth].Color = Color.Green;
-                    }
-                    else if (_heightData[x, y] < minHeight + (maxHeight - minHeight) * 3 / 4)
-                    {
-                        _vertices[x + y * _terrainWidth].Color = Color.Brown;
-                    }
-                    else
-                    {
-                        _vertices[x + y * _terrainWidth].Color = Color.White;
-                    }
-                }
-            }
-        }
-
-        private void SetUpIndices()
-        {
-            _indices = new short[(_terrainWidth - 1) * (_terrainHeight - 1) * 6];
-            int counter = 0;
-            for (short y = 0; y < _terrainHeight - 1; y++)
-            {
-                for (short x = 0; x < _terrainWidth - 1; x++)
-                {
-                    short lowerLeft = (short)(x + y * _terrainWidth);
-                    short lowerRight = (short)((x + 1) + y * _terrainWidth);
-                    short topLeft = (short)(x + (y + 1) * _terrainWidth);
-                    short topRight = (short)((x + 1) + (y + 1) * _terrainWidth);
-
-                    _indices[counter++] = topLeft;
-                    _indices[counter++] = lowerRight;
-                    _indices[counter++] = lowerLeft;
-
-                    _indices[counter++] = topLeft;
-                    _indices[counter++] = topRight;
-                    _indices[counter++] = lowerRight;
-                }
-            }
-        }
-
-        private void CalculateNormals()
-        {
-            for (int i = 0; i < _vertices.Length; i++)
-            {
-                _vertices[i].Normal = new Vector3(0, 0, 0);
-            }
-
-            for (int i = 0; i < _indices.Length / 3; i++)
-            {
-                int index1 = _indices[i * 3];
-                int index2 = _indices[i * 3 + 1];
-                int index3 = _indices[i * 3 + 2];
-
-                Vector3 side1 = _vertices[index1].Position - _vertices[index3].Position;
-                Vector3 side2 = _vertices[index1].Position - _vertices[index2].Position;
-                Vector3 normal = Vector3.Cross(side1, side2);
-
-                _vertices[index1].Normal += normal;
-                _vertices[index2].Normal += normal;
-                _vertices[index3].Normal += normal;
-            }
-            for (int i = 0; i < _vertices.Length; i++)
-            {
-                _vertices[i].Normal.Normalize();
-            }
-        }
-
-        private void CopyToBuffers()
-        {
-            _myVertexBuffer = new VertexBuffer(_device, VertexPositionColorNormal.VertexDeclaration, _vertices.Length, BufferUsage.WriteOnly);
-            _myVertexBuffer.SetData(_vertices);
-
-            _myIndexBuffer = new IndexBuffer(_device, typeof(short), _indices.Length, BufferUsage.WriteOnly);
-            _myIndexBuffer.SetData(_indices);
-        }
-
-        private void SetUpCamera()
-        {
-            _viewMatrix = Matrix.CreateLookAt(new Vector3(60, 80, -80), new Vector3(0, 0, 0), new Vector3(0, 1, 0));
-            _projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, _device.Viewport.AspectRatio, 1.0f, 300.0f);
-        }
-
-        private void LoadHeightData(Texture2D heightMap)
-        {
-            _terrainWidth = heightMap.Width;
-            _terrainHeight = heightMap.Height;
-
-            Color[] heightMapColors = new Color[_terrainWidth * _terrainHeight];
-            heightMap.GetData(heightMapColors);
-
-            _heightData = new float[_terrainWidth, _terrainHeight];
-            for (int x = 0; x < _terrainWidth; x++)
-            {
-                for (int y = 0; y < _terrainHeight; y++)
-                {
-                    _heightData[x, y] = heightMapColors[x + y * _terrainWidth].R / 5.0f;
-                }
-            }
-        }
-
-        protected override void LoadContent()
-        {
-            // TODO: use this.Content to load your game content here
-            _device = _graphics.GraphicsDevice;
-
-            _effect = Content.Load<Effect>("effects");
-
-            SetUpCamera();
-
-            Texture2D heightMap = Content.Load<Texture2D>("heightmap");
-            LoadHeightData(heightMap);
-            SetUpVertices();
-            SetUpIndices();
-            CalculateNormals();
-            CopyToBuffers();
-        }
-
-        protected override void Update(GameTime gameTime)
-        {
-            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
-                Exit();
-
-            // TODO: Add your update logic here
-            KeyboardState keyState = Keyboard.GetState();
-            if (keyState.IsKeyDown(Keys.Left))
-            {
-                _angle += 0.05f;
-            }
-            if (keyState.IsKeyDown(Keys.Right))
-            {
-                _angle -= 0.05f;
-            }
-
-            base.Update(gameTime);
-        }
-
-        protected override void Draw(GameTime gameTime)
-        {
-            _device.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Black, 1.0f, 0);
-
-            RasterizerState rs = new RasterizerState();
-            rs.CullMode = CullMode.None;
-            rs.FillMode = FillMode.Solid;
-            _device.RasterizerState = rs;
-
-            // TODO: Add your drawing code here
-            Matrix worldMatrix = Matrix.CreateTranslation(-_terrainWidth / 2.0f, 0, _terrainHeight / 2.0f) * Matrix.CreateRotationY(_angle);
-            _effect.CurrentTechnique = _effect.Techniques["Colored"];
-            _effect.Parameters["xView"].SetValue(_viewMatrix);
-            _effect.Parameters["xProjection"].SetValue(_projectionMatrix);
-            _effect.Parameters["xWorld"].SetValue(worldMatrix);
-
-            Vector3 lightDirection = new Vector3(1.0f, -1.0f, -1.0f);
-            lightDirection.Normalize();
-            _effect.Parameters["xLightDirection"].SetValue(lightDirection);
-            _effect.Parameters["xAmbient"].SetValue(0.1f);
-            _effect.Parameters["xEnableLighting"].SetValue(true);
-
-            foreach (EffectPass pass in _effect.CurrentTechnique.Passes)
-            {
-                pass.Apply();
-                _device.Indices = _myIndexBuffer;
-                _device.SetVertexBuffer(_myVertexBuffer);
-                _device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, _indices.Length / 3);
-            }
-
-            base.Draw(gameTime);
-        }
-    }
-}

BIN
MonoGameSamples/Riemers/Series_1_Terrain/Icon.bmp


BIN
MonoGameSamples/Riemers/Series_1_Terrain/Icon.ico


+ 0 - 14
MonoGameSamples/Riemers/Series_1_Terrain/Program.cs

@@ -1,14 +0,0 @@
-using System;
-
-namespace Series3D1
-{
-    public static class Program
-    {
-        [STAThread]
-        static void Main()
-        {
-            using (var game = new Game1())
-                game.Run();
-        }
-    }
-}

+ 0 - 30
MonoGameSamples/Riemers/Series_1_Terrain/Series_1_Terrain.csproj

@@ -1,30 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>WinExe</OutputType>
-    <TargetFramework>netcoreapp3.1</TargetFramework>
-    <PublishReadyToRun>false</PublishReadyToRun>
-    <TieredCompilation>false</TieredCompilation>
-  </PropertyGroup>
-  <PropertyGroup>
-    <ApplicationManifest>app.manifest</ApplicationManifest>
-    <ApplicationIcon>Icon.ico</ApplicationIcon>
-  </PropertyGroup>
-  <ItemGroup>
-    <None Remove="Icon.ico" />
-    <None Remove="Icon.bmp" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Icon.ico" />
-    <EmbeddedResource Include="Icon.bmp" />
-  </ItemGroup>
-  <ItemGroup>
-    <MonoGameContentReference Include="Content\Content.mgcb" />
-  </ItemGroup>
-  <ItemGroup>
-    <TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
-  </ItemGroup>
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
-    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
-  </ItemGroup>
-</Project>

+ 0 - 43
MonoGameSamples/Riemers/Series_1_Terrain/app.manifest

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
-  <assemblyIdentity version="1.0.0.0" name="Series_1_Terrain"/>
-  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
-    <security>
-      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
-        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
-      </requestedPrivileges>
-    </security>
-  </trustInfo>
-
-  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
-    <application>
-      <!-- A list of the Windows versions that this application has been tested on and is
-           is designed to work with. Uncomment the appropriate elements and Windows will 
-           automatically selected the most compatible environment. -->
-
-      <!-- Windows Vista -->
-      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
-
-      <!-- Windows 7 -->
-      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
-
-      <!-- Windows 8 -->
-      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
-
-      <!-- Windows 8.1 -->
-      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
-
-      <!-- Windows 10 -->
-      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
-
-    </application>
-  </compatibility>
-
-  <application xmlns="urn:schemas-microsoft-com:asm.v3">
-    <windowsSettings>
-      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
-      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
-    </windowsSettings>
-  </application>
-
-</assembly>

+ 0 - 174
MonoGameSamples/Riemers/Series_2_Flightsim/Content/Content.mgcb

@@ -1,174 +0,0 @@
-
-#----------------------------- Global Properties ----------------------------#
-
-/outputDir:bin/$(Platform)
-/intermediateDir:obj/$(Platform)
-/platform:DesktopGL
-/config:
-/profile:Reach
-/compress:False
-
-#-------------------------------- References --------------------------------#
-
-
-#---------------------------------- Content ---------------------------------#
-
-#begin bullet.jpg
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:bullet.jpg
-
-#begin effects.fx
-/importer:EffectImporter
-/processor:EffectProcessor
-/processorParam:DebugMode=Auto
-/build:effects.fx
-
-#begin skybox.x
-/importer:XImporter
-/processor:ModelProcessor
-/processorParam:ColorKeyColor=0,0,0,0
-/processorParam:ColorKeyEnabled=True
-/processorParam:DefaultEffect=BasicEffect
-/processorParam:GenerateMipmaps=True
-/processorParam:GenerateTangentFrames=False
-/processorParam:PremultiplyTextureAlpha=True
-/processorParam:PremultiplyVertexColors=True
-/processorParam:ResizeTexturesToPowerOfTwo=False
-/processorParam:RotationX=0
-/processorParam:RotationY=0
-/processorParam:RotationZ=0
-/processorParam:Scale=1
-/processorParam:SwapWindingOrder=False
-/processorParam:TextureFormat=Compressed
-/build:skybox.x
-
-#begin skybox_back.JPG
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:skybox_back.JPG
-
-#begin skybox_bottom.JPG
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:skybox_bottom.JPG
-
-#begin skybox_front.JPG
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:skybox_front.JPG
-
-#begin skybox_left.JPG
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:skybox_left.JPG
-
-#begin skybox_right.JPG
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:skybox_right.JPG
-
-#begin skybox_top.JPG
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:skybox_top.JPG
-
-#begin target.x
-/importer:XImporter
-/processor:ModelProcessor
-/processorParam:ColorKeyColor=0,0,0,0
-/processorParam:ColorKeyEnabled=True
-/processorParam:DefaultEffect=BasicEffect
-/processorParam:GenerateMipmaps=True
-/processorParam:GenerateTangentFrames=False
-/processorParam:PremultiplyTextureAlpha=True
-/processorParam:PremultiplyVertexColors=True
-/processorParam:ResizeTexturesToPowerOfTwo=False
-/processorParam:RotationX=0
-/processorParam:RotationY=0
-/processorParam:RotationZ=0
-/processorParam:Scale=1
-/processorParam:SwapWindingOrder=False
-/processorParam:TextureFormat=Compressed
-/build:target.x
-
-#begin texturemap.jpg
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:texturemap.jpg
-
-#begin xwing.x
-/importer:XImporter
-/processor:ModelProcessor
-/processorParam:ColorKeyColor=0,0,0,0
-/processorParam:ColorKeyEnabled=True
-/processorParam:DefaultEffect=BasicEffect
-/processorParam:GenerateMipmaps=True
-/processorParam:GenerateTangentFrames=False
-/processorParam:PremultiplyTextureAlpha=True
-/processorParam:PremultiplyVertexColors=True
-/processorParam:ResizeTexturesToPowerOfTwo=False
-/processorParam:RotationX=0
-/processorParam:RotationY=0
-/processorParam:RotationZ=0
-/processorParam:Scale=1
-/processorParam:SwapWindingOrder=False
-/processorParam:TextureFormat=Compressed
-/build:xwing.x
-

BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/bullet.jpg


+ 0 - 282
MonoGameSamples/Riemers/Series_2_Flightsim/Content/effects.fx

@@ -1,282 +0,0 @@
-//------------------------------------------------------
-//--                                                  --
-//--		   www.riemers.net                    --
-//--   		    Basic shaders                     --
-//--		Use/modify as you like                --
-//--                                                  --
-//------------------------------------------------------
-
-struct VertexToPixel
-{
-    float4 Position   	: POSITION;    
-    float4 Color		: COLOR0;
-    float LightingFactor: TEXCOORD0;
-    float2 TextureCoords: TEXCOORD1;
-};
-
-struct PixelToFrame
-{
-    float4 Color : COLOR0;
-};
-
-//------- Constants --------
-float4x4 xView;
-float4x4 xProjection;
-float4x4 xWorld;
-float3 xLightDirection;
-float xAmbient;
-bool xEnableLighting;
-bool xShowNormals;
-float3 xCamPos;
-float3 xCamUp;
-float xPointSpriteSize;
-
-//------- Texture Samplers --------
-
-Texture xTexture;
-sampler TextureSampler = sampler_state { texture = <xTexture>; magfilter = LINEAR; minfilter = LINEAR; mipfilter=LINEAR; AddressU = mirror; AddressV = mirror;};
-
-//------- Technique: Pretransformed --------
-
-VertexToPixel PretransformedVS( float4 inPos : POSITION, float4 inColor: COLOR)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	
-	Output.Position = inPos;
-	Output.Color = inColor;
-    
-	return Output;    
-}
-
-PixelToFrame PretransformedPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-	
-	Output.Color = PSIn.Color;
-
-	return Output;
-}
-
-technique Pretransformed
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 PretransformedVS();
-		PixelShader  = compile ps_4_0_level_9_3 PretransformedPS();
-#else
-		VertexShader = compile vs_1_1 PretransformedVS();
-		PixelShader  = compile ps_2_0 PretransformedPS();
-#endif			
-	}
-}
-
-//------- Technique: Colored --------
-
-VertexToPixel ColoredVS( float4 inPos : POSITION, float3 inNormal: NORMAL, float4 inColor: COLOR)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	float4x4 preViewProjection = mul (xView, xProjection);
-	float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
-    
-	Output.Position = mul(inPos, preWorldViewProjection);
-	Output.Color = inColor;
-	
-	float3 Normal = normalize(mul(normalize(inNormal), (float3x3)xWorld));	
-	Output.LightingFactor = 1;
-	if (xEnableLighting)
-		Output.LightingFactor = dot(Normal, -xLightDirection);
-    
-	return Output;    
-}
-
-PixelToFrame ColoredPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-    
-	Output.Color = PSIn.Color;
-	Output.Color.rgb *= saturate(PSIn.LightingFactor) + xAmbient;
-
-	return Output;
-}
-
-technique Colored
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 ColoredVS();
-		PixelShader  = compile ps_4_0_level_9_3 ColoredPS();
-#else
-		VertexShader = compile vs_1_1 ColoredVS();
-		PixelShader  = compile ps_2_0 ColoredPS();
-#endif			
-	}
-}
-
-//------- Technique: ColoredNoShading --------
-
-VertexToPixel ColoredNoShadingVS( float4 inPos : POSITION, float4 inColor: COLOR)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	float4x4 preViewProjection = mul (xView, xProjection);
-	float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
-    
-	Output.Position = mul(inPos, preWorldViewProjection);
-	Output.Color = inColor;
-    
-	return Output;    
-}
-
-PixelToFrame ColoredNoShadingPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-    
-	Output.Color = PSIn.Color;
-
-	return Output;
-}
-
-technique ColoredNoShading
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 ColoredNoShadingVS();
-		PixelShader  = compile ps_4_0_level_9_3 ColoredNoShadingPS();
-#else
-		VertexShader = compile vs_1_1 ColoredNoShadingVS();
-		PixelShader  = compile ps_2_0 ColoredNoShadingPS();
-#endif				
-	}
-}
-
-
-//------- Technique: Textured --------
-
-VertexToPixel TexturedVS( float4 inPos : POSITION, float3 inNormal: NORMAL, float2 inTexCoords: TEXCOORD0)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	float4x4 preViewProjection = mul (xView, xProjection);
-	float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
-    
-	Output.Position = mul(inPos, preWorldViewProjection);	
-	Output.TextureCoords = inTexCoords;
-	
-	float3 Normal = normalize(mul(normalize(inNormal), (float3x3)xWorld));	
-	Output.LightingFactor = 1;
-	if (xEnableLighting)
-		Output.LightingFactor = dot(Normal, -xLightDirection);
-    
-	return Output;    
-}
-
-PixelToFrame TexturedPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-	
-	Output.Color = tex2D(TextureSampler, PSIn.TextureCoords);
-	Output.Color.rgb *= saturate(PSIn.LightingFactor) + xAmbient;
-
-	return Output;
-}
-
-technique Textured
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 TexturedVS();
-		PixelShader  = compile ps_4_0_level_9_3 TexturedPS();
-#else
-		VertexShader = compile vs_1_1 TexturedVS();
-		PixelShader  = compile ps_2_0 TexturedPS();
-#endif				
-	}
-}
-
-//------- Technique: TexturedNoShading --------
-
-VertexToPixel TexturedNoShadingVS( float4 inPos : POSITION, float3 inNormal: NORMAL, float2 inTexCoords: TEXCOORD0)
-{	
-	VertexToPixel Output = (VertexToPixel)0;
-	float4x4 preViewProjection = mul (xView, xProjection);
-	float4x4 preWorldViewProjection = mul (xWorld, preViewProjection);
-    
-	Output.Position = mul(inPos, preWorldViewProjection);	
-	Output.TextureCoords = inTexCoords;
-    
-	return Output;    
-}
-
-PixelToFrame TexturedNoShadingPS(VertexToPixel PSIn) 
-{
-	PixelToFrame Output = (PixelToFrame)0;		
-	
-	Output.Color = tex2D(TextureSampler, PSIn.TextureCoords);
-
-	return Output;
-}
-
-technique TexturedNoShading
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 TexturedNoShadingVS();
-		PixelShader  = compile ps_4_0_level_9_3 TexturedNoShadingPS();
-#else
-		VertexShader = compile vs_1_1 TexturedNoShadingVS();
-		PixelShader  = compile ps_2_0 TexturedNoShadingPS();
-#endif			
-	}
-}
-
-//------- Technique: PointSprites --------
-
-VertexToPixel PointSpriteVS(float3 inPos: POSITION0, float2 inTexCoord: TEXCOORD0)
-{
-    VertexToPixel Output = (VertexToPixel)0;
-
-    float3 center = mul(inPos, (float3x3)xWorld);
-    float3 eyeVector = center - xCamPos;
-
-    float3 sideVector = cross(eyeVector,xCamUp);
-    sideVector = normalize(sideVector);
-    float3 upVector = cross(sideVector,eyeVector);
-    upVector = normalize(upVector);
-
-    float3 finalPosition = center;
-    finalPosition += (inTexCoord.x-0.5f)*sideVector*0.5f*xPointSpriteSize;
-    finalPosition += (0.5f-inTexCoord.y)*upVector*0.5f*xPointSpriteSize;
-
-    float4 finalPosition4 = float4(finalPosition, 1);
-
-    float4x4 preViewProjection = mul (xView, xProjection);
-    Output.Position = mul(finalPosition4, preViewProjection);
-
-    Output.TextureCoords = inTexCoord;
-
-    return Output;
-}
-
-PixelToFrame PointSpritePS(VertexToPixel PSIn)
-{
-    PixelToFrame Output = (PixelToFrame)0;
-    Output.Color = tex2D(TextureSampler, PSIn.TextureCoords);
-    return Output;
-}
-
-technique PointSprites
-{
-	pass Pass0
-	{   
-#if SM4
-		VertexShader = compile vs_4_0_level_9_3 PointSpriteVS();
-		PixelShader  = compile ps_4_0_level_9_3 PointSpritePS();
-#else
-		VertexShader = compile vs_1_1 PointSpriteVS();
-		PixelShader  = compile ps_2_0 PointSpritePS();
-#endif		
-	}
-}

BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/riemerstexture.bmp


+ 0 - 433
MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox.x

@@ -1,433 +0,0 @@
-xof 0302txt 0064
-template Header {
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>
- WORD major;
- WORD minor;
- DWORD flags;
-}
-
-template Vector {
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
- FLOAT x;
- FLOAT y;
- FLOAT z;
-}
-
-template Coords2d {
- <F6F23F44-7686-11cf-8F52-0040333594A3>
- FLOAT u;
- FLOAT v;
-}
-
-template Matrix4x4 {
- <F6F23F45-7686-11cf-8F52-0040333594A3>
- array FLOAT matrix[16];
-}
-
-template ColorRGBA {
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>
- FLOAT red;
- FLOAT green;
- FLOAT blue;
- FLOAT alpha;
-}
-
-template ColorRGB {
- <D3E16E81-7835-11cf-8F52-0040333594A3>
- FLOAT red;
- FLOAT green;
- FLOAT blue;
-}
-
-template IndexedColor {
- <1630B820-7842-11cf-8F52-0040333594A3>
- DWORD index;
- ColorRGBA indexColor;
-}
-
-template Boolean {
- <4885AE61-78E8-11cf-8F52-0040333594A3>
- WORD truefalse;
-}
-
-template Boolean2d {
- <4885AE63-78E8-11cf-8F52-0040333594A3>
- Boolean u;
- Boolean v;
-}
-
-template MaterialWrap {
- <4885AE60-78E8-11cf-8F52-0040333594A3>
- Boolean u;
- Boolean v;
-}
-
-template TextureFilename {
- <A42790E1-7810-11cf-8F52-0040333594A3>
- STRING filename;
-}
-
-template Material {
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
- ColorRGBA faceColor;
- FLOAT power;
- ColorRGB specularColor;
- ColorRGB emissiveColor;
- [...]
-}
-
-template MeshFace {
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
- DWORD nFaceVertexIndices;
- array DWORD faceVertexIndices[nFaceVertexIndices];
-}
-
-template MeshFaceWraps {
- <4885AE62-78E8-11cf-8F52-0040333594A3>
- DWORD nFaceWrapValues;
- Boolean2d faceWrapValues;
-}
-
-template MeshTextureCoords {
- <F6F23F40-7686-11cf-8F52-0040333594A3>
- DWORD nTextureCoords;
- array Coords2d textureCoords[nTextureCoords];
-}
-
-template MeshMaterialList {
- <F6F23F42-7686-11cf-8F52-0040333594A3>
- DWORD nMaterials;
- DWORD nFaceIndexes;
- array DWORD faceIndexes[nFaceIndexes];
- [Material]
-}
-
-template MeshNormals {
- <F6F23F43-7686-11cf-8F52-0040333594A3>
- DWORD nNormals;
- array Vector normals[nNormals];
- DWORD nFaceNormals;
- array MeshFace faceNormals[nFaceNormals];
-}
-
-template MeshVertexColors {
- <1630B821-7842-11cf-8F52-0040333594A3>
- DWORD nVertexColors;
- array IndexedColor vertexColors[nVertexColors];
-}
-
-template Mesh {
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>
- DWORD nVertices;
- array Vector vertices[nVertices];
- DWORD nFaces;
- array MeshFace faces[nFaces];
- [...]
-}
-
-template FrameTransformMatrix {
- <F6F23F41-7686-11cf-8F52-0040333594A3>
- Matrix4x4 frameMatrix;
-}
-
-template Frame {
- <3D82AB46-62DA-11cf-AB39-0020AF71E433>
- [...]
-}
-
-Header {
- 1;
- 0;
- 1;
-}
-
-Frame CUBE_Root {
- FrameTransformMatrix {
-  3.000000, 0.000000, 0.000000, 0.000000,
-  0.000000, 3.000000, 0.000000, 0.000000,
-  0.000000, 0.000000, 3.000000, 0.000000,
-  0.000000, 0.000000, 0.000000, 1.000000;;
- }
-
-Mesh Unnamed_0 {
- 4;
- 10.000000;10.000000;-10.000000;,    // 0
- -10.000000;10.000000;-10.000000;,   // 1
- -10.000000;10.000000;10.000000;,    // 2
- 10.000000;10.000000;10.000000;;     // 3
-
- 2;
- 3;0,2,1;,
- 3;0,3,2;;
-
-  MeshMaterialList {
-      1;
-  2;
-  0,
-  0;
-     Material {
-     1.000000;1.000000;1.000000;1.000000;;
-     0.000000;
-     1.000000;1.000000;1.000000;;
-       0.000000;0.000000;0.000000;;
-          TextureFilename {
-      "SkyBox_Top.jpg";
-     }
-     }
- }
-  MeshNormals {
- 4;
- 0.000000;1.000000;0.000000;,
- 0.000000;1.000000;0.000000;,
- 0.000000;1.000000;0.000000;,
- 0.000000;1.000000;0.000000;;
-
- 2;
- 3;0,1,2;,
- 3;0,2,3;;
- }
-  MeshTextureCoords {
-    4;
-    1.000000;0.000000;;
-    0.000000;0.000000;,
-    0.000000;1.000000;,
-    1.000000;1.000000;,
- }
-}
-
-Mesh Unnamed_1 {
- 4;
- 10.000000;10.000000;-10.000000;,    // 0
- 10.000000;10.000000;10.000000;,     // 3
- 10.000000;-10.000000;10.000000;,    // 7
- 10.000000;-10.000000;-10.000000;,   // 4
-
- 2;
- 3;0,2,1;,
- 3;0,3,2;;
-
-  MeshMaterialList {
-      1;
-  2;
-  0,
-  0;
-     Material {
-     1.000000;1.000000;1.000000;1.000000;;
-     0.000000;
-     1.000000;1.000000;1.000000;;
-       0.000000;0.000000;0.000000;;
-          TextureFilename {
-      "SkyBox_Right.jpg";
-     }
-     }
- }
-  MeshNormals {
- 4;
- 1.000000;0.000000;0.000000;,
- 1.000000;0.000000;0.000000;,
- 1.000000;0.000000;0.000000;,
- 1.000000;0.000000;0.000000;,
-
-
- 2;
- 3;0,1,2;,
- 3;0,2,3;;
- }
-  MeshTextureCoords {
-    4;
-    1.000000;0.000000;;
-    0.000000;0.000000;,
-    0.000000;1.000000;,
-    1.000000;1.000000;,
- }
-}
-
-Mesh Unnamed_2 {
- 4;
- -10.000000;10.000000;-10.000000;,   // 1
- -10.000000;-10.000000;-10.000000;,  // 5
- -10.000000;-10.000000;10.000000;,   // 6
- -10.000000;10.000000;10.000000;,    // 2
-
- 2;
- 3;0,2,1;,
- 3;0,3,2;;
-
-  MeshMaterialList {
-      1;
-  2;
-  0,
-  0;
-     Material {
-     1.000000;1.000000;1.000000;1.000000;;
-     0.000000;
-     1.000000;1.000000;1.000000;;
-       0.000000;0.000000;0.000000;;
-          TextureFilename {
-      "SkyBox_Left.jpg";
-     }
-     }
- }
-  MeshNormals {
- 4;
- -1.000000;0.000000;0.000000;,
- -1.000000;0.000000;0.000000;,
- -1.000000;0.000000;0.000000;,
- -1.000000;0.000000;0.000000;,
-
-
- 2;
- 3;0,1,2;,
- 3;0,2,3;;
- }
-  MeshTextureCoords {
-    4;
-    0.000000;0.000000;,
-    0.000000;1.000000;,
-    1.000000;1.000000;,
-    1.000000;0.000000;;
- }
-}
-
-Mesh Unnamed_3 {
- 4;
- 10.000000;10.000000;10.000000;,     // 3
- -10.000000;10.000000;10.000000;,    // 2
- -10.000000;-10.000000;10.000000;,   // 6
- 10.000000;-10.000000;10.000000;,    // 7
-
- 2;
- 3;0,2,1;,
- 3;0,3,2;;
-
-  MeshMaterialList {
-      1;
-  2;
-  0,
-  0;
-     Material {
-     1.000000;1.000000;1.000000;1.000000;;
-     0.000000;
-     1.000000;1.000000;1.000000;;
-       0.000000;0.000000;0.000000;;
-          TextureFilename {
-      "SkyBox_Front.jpg";
-     }
-     }
- }
-  MeshNormals {
- 4;
- 0.000000;0.000000;1.000000;,
- 0.000000;0.000000;1.000000;,
- 0.000000;0.000000;1.000000;,
- 0.000000;0.000000;1.000000;,
-
-
- 2;
- 3;0,1,2;,
- 3;0,2,3;;
- }
-  MeshTextureCoords {
-    4;
-    1.000000;0.000000;;
-    0.000000;0.000000;,
-    0.000000;1.000000;,
-    1.000000;1.000000;,
- }
-}
-
-Mesh Unnamed_4 {
- 4;
- 10.000000;10.000000;-10.000000;,    // 0
- 10.000000;-10.000000;-10.000000;,   // 4
- -10.000000;-10.000000;-10.000000;,  // 5
- -10.000000;10.000000;-10.000000;,   // 1
-
- 2;
- 3;0,2,1;,
- 3;0,3,2;;
-
-  MeshMaterialList {
-      1;
-  2;
-  0,
-  0;
-     Material {
-     1.000000;1.000000;1.000000;1.000000;;
-     0.000000;
-     1.000000;1.000000;1.000000;;
-       0.000000;0.000000;0.000000;;
-          TextureFilename {
-      "SkyBox_Back.jpg";
-     }
-     }
- }
-  MeshNormals {
- 4;
- 0.000000;0.000000;-1.000000;,
- 0.000000;0.000000;-1.000000;,
- 0.000000;0.000000;-1.000000;,
- 0.000000;0.000000;-1.000000;,
-
-
- 2;
- 3;0,1,2;,
- 3;0,2,3;;
- }
-  MeshTextureCoords {
-    4;
-    0.000000;0.000000;,
-    0.000000;1.000000;,
-    1.000000;1.000000;,
-    1.000000;0.000000;;
- }
-}
-
-Mesh Unnamed_5 {
- 4;
- 10.000000;-10.000000;-10.000000;,   // 4
- 10.000000;-10.000000;10.000000;,    // 7
- -10.000000;-10.000000;10.000000;,   // 6
- -10.000000;-10.000000;-10.000000;;  // 5
-
- 2;
- 3;0,2,1;,
- 3;0,3,2;;
-
-  MeshMaterialList {
-      1;
-  2;
-  0,
-  0;
-     Material {
-     1.000000;1.000000;1.000000;1.000000;;
-     0.000000;
-     1.000000;1.000000;1.000000;;
-       0.000000;0.000000;0.000000;;
-          TextureFilename {
-      "SkyBox_Bottom.jpg";
-     }
-     }
- }
-  MeshNormals {
- 4;
- 0.000000;-1.000000;0.000000;,
- 0.000000;-1.000000;0.000000;,
- 0.000000;-1.000000;0.000000;,
- 0.000000;-1.000000;0.000000;;
-
-
- 2;
- 3;0,1,2;,
- 3;0,2,3;;
- }
-  MeshTextureCoords {
-    4;
-    1.000000;0.000000;;
-    0.000000;0.000000;,
-    0.000000;1.000000;,
-    1.000000;1.000000;,
- }
-}
-
-}

BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_back.JPG


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_bottom.JPG


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_front.JPG


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_left.JPG


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_right.JPG


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/skybox_top.JPG


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/target.x


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/texturemap.jpg


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Content/xwing.x


+ 0 - 601
MonoGameSamples/Riemers/Series_2_Flightsim/Game1.cs

@@ -1,601 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-
-namespace Series3D2
-{
-    public class Game1 : Game
-    {
-        public enum CollisionType { None, Building, Boundary, Target }
-
-        public struct Bullet
-        {
-            public Vector3 position;
-            public Quaternion rotation;
-        }
-
-        //Properties
-        private GraphicsDeviceManager _graphics;
-        private SpriteBatch _spriteBatch;
-        private GraphicsDevice _device;
-        private Effect _effect;
-
-        private Matrix _viewMatrix;
-        private Matrix _projectionMatrix;
-        private Texture2D _sceneryTexture;
-        private int[,] _floorPlan;
-        private VertexBuffer _cityVertexBuffer;
-        private int[] _buildingHeights = new int[] { 0, 2, 2, 6, 5, 4 };
-        private Model _xwingModel;
-        private Vector3 _lightDirection = new Vector3(3, -2, 5);
-        private Vector3 _xwingPosition = new Vector3(8, 1, -3);
-        private Quaternion _xwingRotation = Quaternion.Identity;
-        private float _gameSpeed = 1.0f;
-        private BoundingBox[] _buildingBoundingBoxes;
-        private BoundingBox _completeCityBox;
-        private Model _targetModel;
-        private const int _maxTargets = 50;
-        private List<Bullet> _bulletList = new List<Bullet>();
-        private double _lastBulletTime = 0;
-        private Texture2D _bulletTexture;
-
-        private List<BoundingSphere> _targetList = new List<BoundingSphere>();
-        private Vector3 _cameraPosition;
-        private Vector3 _cameraUpDirection;
-        private Texture2D[] _skyboxTextures;
-        private Model _skyboxModel;
-        private Quaternion _cameraRotation = Quaternion.Identity;
-
-        public Game1()
-        {
-            _graphics = new GraphicsDeviceManager(this);
-            Content.RootDirectory = "Content";
-            IsMouseVisible = true;
-        }
-
-        protected override void Initialize()
-        {
-            // TODO: Add your initialization logic here
-            _graphics.PreferredBackBufferWidth = 500;
-            _graphics.PreferredBackBufferHeight = 500;
-            _graphics.IsFullScreen = false;
-            _graphics.ApplyChanges();
-            Window.Title = "Riemer's MonoGame Tutorials -- 3D Series 2";
-
-            LoadFloorPlan();
-
-            _lightDirection.Normalize();
-
-            base.Initialize();
-        }
-
-        private void SetUpCamera()
-        {
-            _viewMatrix = Matrix.CreateLookAt(new Vector3(20, 13, -5), new Vector3(8, 0, -7), new Vector3(0, 1, 0));
-            _projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, _device.Viewport.AspectRatio, 0.2f, 500.0f);
-        }
-
-        private void SetUpVertices()
-        {
-            int differentBuildings = _buildingHeights.Length - 1;
-            float imagesInTexture = 1 + differentBuildings * 2;
-
-            int cityWidth = _floorPlan.GetLength(0);
-            int cityLength = _floorPlan.GetLength(1);
-
-            List<VertexPositionNormalTexture> verticesList = new List<VertexPositionNormalTexture>();
-            for (int x = 0; x < cityWidth; x++)
-            {
-                for (int z = 0; z < cityLength; z++)
-                {
-                    int currentBuilding = _floorPlan[x, z];
-
-                    //floor or ceiling
-                    verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z), new Vector3(0, 1, 0), new Vector2(currentBuilding * 2 / imagesInTexture, 1)));
-                    verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z - 1), new Vector3(0, 1, 0), new Vector2((currentBuilding * 2) / imagesInTexture, 0)));
-                    verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, _buildingHeights[currentBuilding], -z), new Vector3(0, 1, 0), new Vector2((currentBuilding * 2 + 1) / imagesInTexture, 1)));
-
-                    verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z - 1), new Vector3(0, 1, 0), new Vector2((currentBuilding * 2) / imagesInTexture, 0)));
-                    verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, _buildingHeights[currentBuilding], -z - 1), new Vector3(0, 1, 0), new Vector2((currentBuilding * 2 + 1) / imagesInTexture, 0)));
-                    verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, _buildingHeights[currentBuilding], -z), new Vector3(0, 1, 0), new Vector2((currentBuilding * 2 + 1) / imagesInTexture, 1)));
-
-                    if (currentBuilding != 0)
-                    {
-                        //front wall
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, 0, -z - 1), new Vector3(0, 0, -1), new Vector2((currentBuilding * 2) / imagesInTexture, 1)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z - 1), new Vector3(0, 0, -1), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 0)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, 0, -z - 1), new Vector3(0, 0, -1), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 1)));
-
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z - 1), new Vector3(0, 0, -1), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 0)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, 0, -z - 1), new Vector3(0, 0, -1), new Vector2((currentBuilding * 2) / imagesInTexture, 1)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, _buildingHeights[currentBuilding], -z - 1), new Vector3(0, 0, -1), new Vector2((currentBuilding * 2) / imagesInTexture, 0)));
-
-                        //back wall
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, 0, -z), new Vector3(0, 0, 1), new Vector2((currentBuilding * 2) / imagesInTexture, 1)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, 0, -z), new Vector3(0, 0, 1), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 1)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z), new Vector3(0, 0, 1), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 0)));
-
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z), new Vector3(0, 0, 1), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 0)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, _buildingHeights[currentBuilding], -z), new Vector3(0, 0, 1), new Vector2((currentBuilding * 2) / imagesInTexture, 0)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, 0, -z), new Vector3(0, 0, 1), new Vector2((currentBuilding * 2) / imagesInTexture, 1)));
-
-                        //left wall
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, 0, -z), new Vector3(-1, 0, 0), new Vector2((currentBuilding * 2) / imagesInTexture, 1)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, 0, -z - 1), new Vector3(-1, 0, 0), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 1)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z - 1), new Vector3(-1, 0, 0), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 0)));
-
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z - 1), new Vector3(-1, 0, 0), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 0)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, _buildingHeights[currentBuilding], -z), new Vector3(-1, 0, 0), new Vector2((currentBuilding * 2) / imagesInTexture, 0)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x, 0, -z), new Vector3(-1, 0, 0), new Vector2((currentBuilding * 2) / imagesInTexture, 1)));
-
-                        //right wall
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, 0, -z), new Vector3(1, 0, 0), new Vector2((currentBuilding * 2) / imagesInTexture, 1)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, _buildingHeights[currentBuilding], -z - 1), new Vector3(1, 0, 0), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 0)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, 0, -z - 1), new Vector3(1, 0, 0), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 1)));
-
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, _buildingHeights[currentBuilding], -z - 1), new Vector3(1, 0, 0), new Vector2((currentBuilding * 2 - 1) / imagesInTexture, 0)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, 0, -z), new Vector3(1, 0, 0), new Vector2((currentBuilding * 2) / imagesInTexture, 1)));
-                        verticesList.Add(new VertexPositionNormalTexture(new Vector3(x + 1, _buildingHeights[currentBuilding], -z), new Vector3(1, 0, 0), new Vector2((currentBuilding * 2) / imagesInTexture, 0)));
-                    }
-                }
-            }
-
-            _cityVertexBuffer = new VertexBuffer(_device, VertexPositionNormalTexture.VertexDeclaration, verticesList.Count, BufferUsage.WriteOnly);
-            _cityVertexBuffer.SetData<VertexPositionNormalTexture>(verticesList.ToArray());
-        }
-
-        private void LoadFloorPlan()
-        {
-            _floorPlan = new int[,]
-            {
-                {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
-                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
-                {1,0,0,1,1,0,0,0,1,1,0,0,1,0,1},
-                {1,0,0,1,1,0,0,0,1,0,0,0,1,0,1},
-                {1,0,0,0,1,1,0,1,1,0,0,0,0,0,1},
-                {1,0,0,0,0,0,0,0,0,0,0,1,0,0,1},
-                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
-                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
-                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
-                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
-                {1,0,1,1,0,0,0,1,0,0,0,0,0,0,1},
-                {1,0,1,0,0,0,0,0,0,0,0,0,0,0,1},
-                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
-                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
-                {1,0,0,0,0,1,0,0,0,0,0,0,0,0,1},
-                {1,0,0,0,0,1,0,0,0,1,0,0,0,0,1},
-                {1,0,1,0,0,0,0,0,0,1,0,0,0,0,1},
-                {1,0,1,1,0,0,0,0,1,1,0,0,0,1,1},
-                {1,0,0,0,0,0,0,0,1,1,0,0,0,1,1},
-                {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
-            };
-
-            Random random = new Random();
-            int differentBuildings = _buildingHeights.Length - 1;
-            for (int x = 0; x < _floorPlan.GetLength(0); x++)
-            {
-                for (int y = 0; y < _floorPlan.GetLength(1); y++)
-                {
-                    if (_floorPlan[x, y] == 1)
-                    {
-                        _floorPlan[x, y] = random.Next(differentBuildings) + 1;
-                    }
-                }
-            }
-        }
-
-        private Model LoadModel(string assetName)
-        {
-            Model newModel = Content.Load<Model>(assetName);
-            foreach (ModelMesh mesh in newModel.Meshes)
-            {
-                foreach (ModelMeshPart meshPart in mesh.MeshParts)
-                {
-                    meshPart.Effect = _effect.Clone();
-                }
-            }
-            return newModel;
-        }
-
-        private Model LoadModel(string assetName, out Texture2D[] textures)
-        {
-            Model newModel = Content.Load<Model>(assetName);
-            List<Texture2D> modelTextures = new List<Texture2D>();
-
-            foreach (ModelMesh mesh in newModel.Meshes)
-            {
-                foreach (BasicEffect currentEffect in mesh.Effects)
-                {
-                    modelTextures.Add(currentEffect.Texture);
-                }
-
-                foreach (ModelMeshPart meshPart in mesh.MeshParts)
-                {
-                    meshPart.Effect = _effect.Clone();
-                }
-            }
-
-            textures = modelTextures.ToArray();
-            return newModel;
-        }
-
-        private void SetUpBoundingBoxes()
-        {
-            int cityWidth = _floorPlan.GetLength(0);
-            int cityLength = _floorPlan.GetLength(1);
-
-            List<BoundingBox> bbList = new List<BoundingBox>();
-            for (int x = 0; x < cityWidth; x++)
-            {
-                for (int z = 0; z < cityLength; z++)
-                {
-                    int buildingType = _floorPlan[x, z];
-                    if (buildingType != 0)
-                    {
-                        int buildingHeight = _buildingHeights[buildingType];
-                        Vector3[] buildingPoints = new Vector3[2];
-                        buildingPoints[0] = new Vector3(x, 0, -z);
-                        buildingPoints[1] = new Vector3(x + 1, buildingHeight, -z - 1);
-                        BoundingBox buildingBox = BoundingBox.CreateFromPoints(buildingPoints);
-                        bbList.Add(buildingBox);
-                    }
-                }
-            }
-            _buildingBoundingBoxes = bbList.ToArray();
-
-            Vector3[] boundaryPoints = new Vector3[2];
-            boundaryPoints[0] = new Vector3(0, 0, 0);
-            boundaryPoints[1] = new Vector3(cityWidth, 20, -cityLength);
-            _completeCityBox = BoundingBox.CreateFromPoints(boundaryPoints);
-        }
-
-        private void AddTargets()
-        {
-            int cityWidth = _floorPlan.GetLength(0);
-            int cityLength = _floorPlan.GetLength(1);
-
-            Random random = new Random();
-
-            while (_targetList.Count < _maxTargets)
-            {
-                int x = random.Next(cityWidth);
-                int z = -random.Next(cityLength);
-                float y = (float)random.Next(2000) / 1000f + 1;
-                float radius = (float)random.Next(1000) / 1000f * 0.2f + 0.01f;
-
-                BoundingSphere newTarget = new BoundingSphere(new Vector3(x, y, z), radius);
-
-                if (CheckCollision(newTarget) == CollisionType.None)
-                {
-                    _targetList.Add(newTarget);
-                }
-            }
-        }
-
-        protected override void LoadContent()
-        {
-            _spriteBatch = new SpriteBatch(GraphicsDevice);
-
-            // TODO: use this.Content to load your game content here
-            _device = _graphics.GraphicsDevice;
-            _effect = Content.Load<Effect>("effects");
-            _sceneryTexture = Content.Load<Texture2D>("texturemap");
-            _bulletTexture = Content.Load<Texture2D>("bullet");
-
-            _xwingModel = LoadModel("xwing");
-            _targetModel = LoadModel("target");
-            _skyboxModel = LoadModel("skybox", out _skyboxTextures);
-
-            SetUpCamera();
-            SetUpVertices();
-            SetUpBoundingBoxes();
-            AddTargets();
-        }
-
-        private void UpdateCamera()
-        {
-            _cameraRotation = Quaternion.Lerp(_cameraRotation, _xwingRotation, 0.1f);
-
-            Vector3 cameraPosition = new Vector3(0, 0.1f, 0.6f);
-            cameraPosition = Vector3.Transform(cameraPosition, Matrix.CreateFromQuaternion(_cameraRotation));
-            cameraPosition += _xwingPosition;
-
-            Vector3 cameraUpDirection = new Vector3(0, 1, 0);
-            cameraUpDirection = Vector3.Transform(cameraUpDirection, Matrix.CreateFromQuaternion(_cameraRotation));
-
-            _viewMatrix = Matrix.CreateLookAt(cameraPosition, _xwingPosition, cameraUpDirection);
-            _projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, _device.Viewport.AspectRatio, 0.2f, 500.0f);
-
-            _cameraPosition = cameraPosition;
-            _cameraUpDirection = cameraUpDirection;
-        }
-
-        private void ProcessKeyboard(GameTime gameTime)
-        {
-            float leftRightRotation = 0;
-            float upDownRotation = 0;
-
-            float turningSpeed = (float)gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0f;
-            turningSpeed *= 1.6f * _gameSpeed;
-
-            KeyboardState keys = Keyboard.GetState();
-
-            if (keys.IsKeyDown(Keys.Right))
-            {
-                leftRightRotation += turningSpeed;
-            }
-            if (keys.IsKeyDown(Keys.Left))
-            {
-                leftRightRotation -= turningSpeed;
-            }
-            if (keys.IsKeyDown(Keys.Down))
-            {
-                upDownRotation += turningSpeed;
-            }
-            if (keys.IsKeyDown(Keys.Up))
-            {
-                upDownRotation -= turningSpeed;
-            }
-
-            Quaternion additionalRotation = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, -1), leftRightRotation) * Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), upDownRotation);
-            _xwingRotation *= additionalRotation;
-
-            if (keys.IsKeyDown(Keys.Space))
-            {
-                double currentTime = gameTime.TotalGameTime.TotalMilliseconds;
-                if (currentTime - _lastBulletTime > 100)
-                {
-                    Bullet newBullet = new Bullet();
-                    newBullet.position = _xwingPosition;
-                    newBullet.rotation = _xwingRotation;
-                    _bulletList.Add(newBullet);
-
-                    _lastBulletTime = currentTime;
-                }
-            }
-        }
-
-        private void MoveForward(ref Vector3 position, Quaternion rotationQuat, float speed)
-        {
-            Vector3 addVector = Vector3.Transform(new Vector3(0, 0, -1), rotationQuat);
-            position += addVector * speed;
-        }
-
-        private CollisionType CheckCollision(BoundingSphere sphere)
-        {
-            for (int i = 0; i < _buildingBoundingBoxes.Length; i++)
-            {
-                if (_buildingBoundingBoxes[i].Contains(sphere) != ContainmentType.Disjoint)
-                {
-                    return CollisionType.Building;
-                }
-            }
-
-            if (_completeCityBox.Contains(sphere) != ContainmentType.Contains)
-            {
-                return CollisionType.Boundary;
-            }
-
-            for (int i = 0; i < _targetList.Count; i++)
-            {
-                if (_targetList[i].Contains(sphere) != ContainmentType.Disjoint)
-                {
-                    _targetList.RemoveAt(i);
-                    i--;
-                    AddTargets();
-
-                    return CollisionType.Target;
-                }
-            }
-
-            return CollisionType.None;
-        }
-
-        private void UpdateBulletPositions(float moveSpeed)
-        {
-            for (int i = 0; i < _bulletList.Count; i++)
-            {
-                Bullet currentBullet = _bulletList[i];
-                MoveForward(ref currentBullet.position, currentBullet.rotation, moveSpeed * 2.0f);
-                _bulletList[i] = currentBullet;
-
-                BoundingSphere bulletSphere = new BoundingSphere(currentBullet.position, 0.05f);
-                CollisionType colType = CheckCollision(bulletSphere);
-                if (colType != CollisionType.None)
-                {
-                    _bulletList.RemoveAt(i);
-                    i--;
-
-                    if (colType == CollisionType.Target)
-                        _gameSpeed *= 1.05f;
-                }
-            }
-        }
-
-        protected override void Update(GameTime gameTime)
-        {
-            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
-                Keyboard.GetState().IsKeyDown(Keys.Escape))
-                Exit();
-
-            // TODO: Add your update logic here
-            UpdateCamera();
-            ProcessKeyboard(gameTime);
-
-            float moveSpeed = gameTime.ElapsedGameTime.Milliseconds / 500.0f * _gameSpeed;
-            MoveForward(ref _xwingPosition, _xwingRotation, moveSpeed);
-
-            BoundingSphere xwingSpere = new BoundingSphere(_xwingPosition, 0.04f);
-            if (CheckCollision(xwingSpere) != CollisionType.None)
-            {
-                _xwingPosition = new Vector3(8, 1, -3);
-                _xwingRotation = Quaternion.Identity;
-                _gameSpeed /= 1.1f;
-            }
-
-            UpdateBulletPositions(moveSpeed);
-
-            base.Update(gameTime);
-        }
-
-        private void DrawCity()
-        {
-            _effect.CurrentTechnique = _effect.Techniques["Textured"];
-            _effect.Parameters["xWorld"].SetValue(Matrix.Identity);
-            _effect.Parameters["xView"].SetValue(_viewMatrix);
-            _effect.Parameters["xProjection"].SetValue(_projectionMatrix);
-            _effect.Parameters["xTexture"].SetValue(_sceneryTexture);
-            _effect.Parameters["xEnableLighting"].SetValue(true);
-            _effect.Parameters["xLightDirection"].SetValue(_lightDirection);
-            _effect.Parameters["xAmbient"].SetValue(0.5f);
-
-            foreach (EffectPass pass in _effect.CurrentTechnique.Passes)
-            {
-                pass.Apply();
-                _device.SetVertexBuffer(_cityVertexBuffer);
-                _device.DrawPrimitives(PrimitiveType.TriangleList, 0, _cityVertexBuffer.VertexCount / 3);
-            }
-        }
-
-        private void DrawModel()
-        {
-            Matrix worldMatrix = Matrix.CreateScale(0.0005f, 0.0005f, 0.0005f) *
-                                 Matrix.CreateRotationY(MathHelper.Pi) *
-                                 Matrix.CreateFromQuaternion(_xwingRotation) *
-                                 Matrix.CreateTranslation(_xwingPosition);
-
-            Matrix[] xwingTransforms = new Matrix[_xwingModel.Bones.Count];
-            _xwingModel.CopyAbsoluteBoneTransformsTo(xwingTransforms);
-
-            foreach (ModelMesh mesh in _xwingModel.Meshes)
-            {
-                foreach (Effect currentEffect in mesh.Effects)
-                {
-                    currentEffect.CurrentTechnique = currentEffect.Techniques["Colored"];
-                    currentEffect.Parameters["xWorld"].SetValue(xwingTransforms[mesh.ParentBone.Index] * worldMatrix);
-                    currentEffect.Parameters["xView"].SetValue(_viewMatrix);
-                    currentEffect.Parameters["xProjection"].SetValue(_projectionMatrix);
-                    currentEffect.Parameters["xEnableLighting"].SetValue(true);
-                    currentEffect.Parameters["xLightDirection"].SetValue(_lightDirection);
-                    currentEffect.Parameters["xAmbient"].SetValue(0.5f);
-                }
-                mesh.Draw();
-            }
-        }
-
-        private void DrawTargets()
-        {
-            for (int i = 0; i < _targetList.Count; i++)
-            {
-                Matrix worldMatrix = Matrix.CreateScale(_targetList[i].Radius) * Matrix.CreateTranslation(_targetList[i].Center);
-
-                Matrix[] targetTransforms = new Matrix[_targetModel.Bones.Count];
-                _targetModel.CopyAbsoluteBoneTransformsTo(targetTransforms);
-                foreach (ModelMesh modelMesh in _targetModel.Meshes)
-                {
-                    foreach (Effect currentEffect in modelMesh.Effects)
-                    {
-                        currentEffect.CurrentTechnique = currentEffect.Techniques["Colored"];
-                        currentEffect.Parameters["xWorld"].SetValue(targetTransforms[modelMesh.ParentBone.Index] * worldMatrix);
-                        currentEffect.Parameters["xView"].SetValue(_viewMatrix);
-                        currentEffect.Parameters["xProjection"].SetValue(_projectionMatrix);
-                        currentEffect.Parameters["xEnableLighting"].SetValue(true);
-                        currentEffect.Parameters["xLightDirection"].SetValue(_lightDirection);
-                        currentEffect.Parameters["xAmbient"].SetValue(0.5f);
-                    }
-
-                    modelMesh.Draw();
-                }
-            }
-        }
-
-        private void DrawBullets()
-        {
-            if (_bulletList.Count > 0)
-            {
-                VertexPositionTexture[] bulletVertices = new VertexPositionTexture[_bulletList.Count * 6];
-                int i = 0;
-
-                foreach (Bullet currentBullet in _bulletList)
-                {
-                    Vector3 center = currentBullet.position;
-
-                    bulletVertices[i++] = new VertexPositionTexture(center, new Vector2(1, 1));
-                    bulletVertices[i++] = new VertexPositionTexture(center, new Vector2(0, 0));
-                    bulletVertices[i++] = new VertexPositionTexture(center, new Vector2(1, 0));
-
-                    bulletVertices[i++] = new VertexPositionTexture(center, new Vector2(1, 1));
-                    bulletVertices[i++] = new VertexPositionTexture(center, new Vector2(0, 1));
-                    bulletVertices[i++] = new VertexPositionTexture(center, new Vector2(0, 0));
-                }
-
-                _effect.CurrentTechnique = _effect.Techniques["PointSprites"];
-                _effect.Parameters["xWorld"].SetValue(Matrix.Identity);
-                _effect.Parameters["xProjection"].SetValue(_projectionMatrix);
-                _effect.Parameters["xView"].SetValue(_viewMatrix);
-                _effect.Parameters["xCamPos"].SetValue(_cameraPosition);
-                _effect.Parameters["xTexture"].SetValue(_bulletTexture);
-                _effect.Parameters["xCamUp"].SetValue(_cameraUpDirection);
-                _effect.Parameters["xPointSpriteSize"].SetValue(0.1f);
-
-                _device.BlendState = BlendState.Additive;
-
-                foreach (EffectPass pass in _effect.CurrentTechnique.Passes)
-                {
-                    pass.Apply();
-                    _device.DrawUserPrimitives(PrimitiveType.TriangleList, bulletVertices, 0, _bulletList.Count * 2);
-                }
-                _device.BlendState = BlendState.Opaque;
-
-            }
-
-        }
-
-        private void DrawSkybox()
-        {
-            SamplerState ss = new SamplerState();
-            ss.AddressU = TextureAddressMode.Clamp;
-            ss.AddressV = TextureAddressMode.Clamp;
-            _device.SamplerStates[0] = ss;
-
-            DepthStencilState dss = new DepthStencilState();
-            dss.DepthBufferEnable = false;
-            _device.DepthStencilState = dss;
-
-            Matrix[] skyboxTransforms = new Matrix[_skyboxModel.Bones.Count];
-            _skyboxModel.CopyAbsoluteBoneTransformsTo(skyboxTransforms);
-            int i = 0;
-            foreach (ModelMesh mesh in _skyboxModel.Meshes)
-            {
-                foreach (Effect currentEffect in mesh.Effects)
-                {
-                    Matrix worldMatrix = skyboxTransforms[mesh.ParentBone.Index] * Matrix.CreateTranslation(_xwingPosition);
-                    currentEffect.CurrentTechnique = currentEffect.Techniques["Textured"];
-                    currentEffect.Parameters["xWorld"].SetValue(worldMatrix);
-                    currentEffect.Parameters["xView"].SetValue(_viewMatrix);
-                    currentEffect.Parameters["xProjection"].SetValue(_projectionMatrix);
-                    currentEffect.Parameters["xTexture"].SetValue(_skyboxTextures[i++]);
-                }
-                mesh.Draw();
-            }
-
-            dss = new DepthStencilState();
-            dss.DepthBufferEnable = true;
-            _device.DepthStencilState = dss;
-        }
-        protected override void Draw(GameTime gameTime)
-        {
-            _device.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.DarkSlateBlue, 1.0f, 0);
-
-            DrawSkybox();
-            DrawCity();
-            DrawModel();
-            DrawTargets();
-            DrawBullets();
-
-            base.Draw(gameTime);
-        }
-    }
-}

BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Icon.bmp


BIN
MonoGameSamples/Riemers/Series_2_Flightsim/Icon.ico


+ 0 - 14
MonoGameSamples/Riemers/Series_2_Flightsim/Program.cs

@@ -1,14 +0,0 @@
-using System;
-
-namespace Series3D2
-{
-    public static class Program
-    {
-        [STAThread]
-        static void Main()
-        {
-            using (var game = new Game1())
-                game.Run();
-        }
-    }
-}

+ 0 - 30
MonoGameSamples/Riemers/Series_2_Flightsim/Series_2_Flightsim.csproj

@@ -1,30 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>WinExe</OutputType>
-    <TargetFramework>netcoreapp3.1</TargetFramework>
-    <PublishReadyToRun>false</PublishReadyToRun>
-    <TieredCompilation>false</TieredCompilation>
-  </PropertyGroup>
-  <PropertyGroup>
-    <ApplicationManifest>app.manifest</ApplicationManifest>
-    <ApplicationIcon>Icon.ico</ApplicationIcon>
-  </PropertyGroup>
-  <ItemGroup>
-    <None Remove="Icon.ico" />
-    <None Remove="Icon.bmp" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Icon.ico" />
-    <EmbeddedResource Include="Icon.bmp" />
-  </ItemGroup>
-  <ItemGroup>
-    <MonoGameContentReference Include="Content\Content.mgcb" />
-  </ItemGroup>
-  <ItemGroup>
-    <TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
-  </ItemGroup>
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
-    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
-  </ItemGroup>
-</Project>

+ 0 - 43
MonoGameSamples/Riemers/Series_2_Flightsim/app.manifest

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
-  <assemblyIdentity version="1.0.0.0" name="Series_2_Flightsim"/>
-  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
-    <security>
-      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
-        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
-      </requestedPrivileges>
-    </security>
-  </trustInfo>
-
-  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
-    <application>
-      <!-- A list of the Windows versions that this application has been tested on and is
-           is designed to work with. Uncomment the appropriate elements and Windows will 
-           automatically selected the most compatible environment. -->
-
-      <!-- Windows Vista -->
-      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
-
-      <!-- Windows 7 -->
-      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
-
-      <!-- Windows 8 -->
-      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
-
-      <!-- Windows 8.1 -->
-      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
-
-      <!-- Windows 10 -->
-      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
-
-    </application>
-  </compatibility>
-
-  <application xmlns="urn:schemas-microsoft-com:asm.v3">
-    <windowsSettings>
-      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
-      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
-    </windowsSettings>
-  </application>
-
-</assembly>

+ 0 - 15
MonoGameSamples/Riemers/Series_3_HLSL/Content/Content.mgcb

@@ -1,15 +0,0 @@
-
-#----------------------------- Global Properties ----------------------------#
-
-/outputDir:bin/$(Platform)
-/intermediateDir:obj/$(Platform)
-/platform:DesktopGL
-/config:
-/profile:Reach
-/compress:False
-
-#-------------------------------- References --------------------------------#
-
-
-#---------------------------------- Content ---------------------------------#
-

+ 0 - 52
MonoGameSamples/Riemers/Series_3_HLSL/Game1.cs

@@ -1,52 +0,0 @@
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-
-namespace Series_3_HLSL
-{
-    public class Game1 : Game
-    {
-        private GraphicsDeviceManager _graphics;
-        private SpriteBatch _spriteBatch;
-
-        public Game1()
-        {
-            _graphics = new GraphicsDeviceManager(this);
-            Content.RootDirectory = "Content";
-            IsMouseVisible = true;
-        }
-
-        protected override void Initialize()
-        {
-            // TODO: Add your initialization logic here
-
-            base.Initialize();
-        }
-
-        protected override void LoadContent()
-        {
-            _spriteBatch = new SpriteBatch(GraphicsDevice);
-
-            // TODO: use this.Content to load your game content here
-        }
-
-        protected override void Update(GameTime gameTime)
-        {
-            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
-                Exit();
-
-            // TODO: Add your update logic here
-
-            base.Update(gameTime);
-        }
-
-        protected override void Draw(GameTime gameTime)
-        {
-            GraphicsDevice.Clear(Color.CornflowerBlue);
-
-            // TODO: Add your drawing code here
-
-            base.Draw(gameTime);
-        }
-    }
-}

BIN
MonoGameSamples/Riemers/Series_3_HLSL/Icon.bmp


BIN
MonoGameSamples/Riemers/Series_3_HLSL/Icon.ico


+ 0 - 14
MonoGameSamples/Riemers/Series_3_HLSL/Program.cs

@@ -1,14 +0,0 @@
-using System;
-
-namespace Series_3_HLSL
-{
-    public static class Program
-    {
-        [STAThread]
-        static void Main()
-        {
-            using (var game = new Game1())
-                game.Run();
-        }
-    }
-}

+ 0 - 30
MonoGameSamples/Riemers/Series_3_HLSL/Series_3_HLSL.csproj

@@ -1,30 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>WinExe</OutputType>
-    <TargetFramework>netcoreapp3.1</TargetFramework>
-    <PublishReadyToRun>false</PublishReadyToRun>
-    <TieredCompilation>false</TieredCompilation>
-  </PropertyGroup>
-  <PropertyGroup>
-    <ApplicationManifest>app.manifest</ApplicationManifest>
-    <ApplicationIcon>Icon.ico</ApplicationIcon>
-  </PropertyGroup>
-  <ItemGroup>
-    <None Remove="Icon.ico" />
-    <None Remove="Icon.bmp" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Icon.ico" />
-    <EmbeddedResource Include="Icon.bmp" />
-  </ItemGroup>
-  <ItemGroup>
-    <MonoGameContentReference Include="Content\Content.mgcb" />
-  </ItemGroup>
-  <ItemGroup>
-    <TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
-  </ItemGroup>
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
-    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
-  </ItemGroup>
-</Project>

+ 0 - 43
MonoGameSamples/Riemers/Series_3_HLSL/app.manifest

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
-  <assemblyIdentity version="1.0.0.0" name="Series_3_HLSL"/>
-  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
-    <security>
-      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
-        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
-      </requestedPrivileges>
-    </security>
-  </trustInfo>
-
-  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
-    <application>
-      <!-- A list of the Windows versions that this application has been tested on and is
-           is designed to work with. Uncomment the appropriate elements and Windows will 
-           automatically selected the most compatible environment. -->
-
-      <!-- Windows Vista -->
-      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
-
-      <!-- Windows 7 -->
-      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
-
-      <!-- Windows 8 -->
-      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
-
-      <!-- Windows 8.1 -->
-      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
-
-      <!-- Windows 10 -->
-      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
-
-    </application>
-  </compatibility>
-
-  <application xmlns="urn:schemas-microsoft-com:asm.v3">
-    <windowsSettings>
-      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
-      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
-    </windowsSettings>
-  </application>
-
-</assembly>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików