diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-09 13:45:34 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-09 13:45:34 -0500 |
commit | 40a90147420614d7d593b478fcf93b9be542c5b0 (patch) | |
tree | 4719a5c5d7a6fc6813ba32dac3e54af4b623de03 /src/StardewModdingAPI.AssemblyRewriters/Wrappers | |
parent | 036595cc712d20e7c0fb9a9a9444d5206a25ad7e (diff) | |
download | SMAPI-40a90147420614d7d593b478fcf93b9be542c5b0.tar.gz SMAPI-40a90147420614d7d593b478fcf93b9be542c5b0.tar.bz2 SMAPI-40a90147420614d7d593b478fcf93b9be542c5b0.zip |
generalise CIL rewriters for reuse (#231)
Diffstat (limited to 'src/StardewModdingAPI.AssemblyRewriters/Wrappers')
-rw-r--r-- | src/StardewModdingAPI.AssemblyRewriters/Wrappers/CompatibleSpriteBatch.cs | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/StardewModdingAPI.AssemblyRewriters/Wrappers/CompatibleSpriteBatch.cs b/src/StardewModdingAPI.AssemblyRewriters/Wrappers/CompatibleSpriteBatch.cs deleted file mode 100644 index e28d1a68..00000000 --- a/src/StardewModdingAPI.AssemblyRewriters/Wrappers/CompatibleSpriteBatch.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; - -#pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required -namespace StardewModdingAPI.AssemblyRewriters.Wrappers -{ - /// <summary>Wraps <see cref="SpriteBatch"/> methods that are incompatible when converting compiled code between MonoGame and XNA.</summary> - public class CompatibleSpriteBatch : SpriteBatch - { - /********* - ** Public methods - *********/ - /// <summary>Construct an instance.</summary> - public CompatibleSpriteBatch(GraphicsDevice graphicsDevice) : base(graphicsDevice) { } - - /**** - ** MonoGame signatures - ****/ - public new void Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix? matrix) - { - base.Begin(sortMode, blendState, samplerState, depthStencilState, rasterizerState, effect, matrix ?? Matrix.Identity); - } - - /**** - ** XNA signatures - ****/ - public new void Begin() - { - base.Begin(); - } - - public new void Begin(SpriteSortMode sortMode, BlendState blendState) - { - base.Begin(sortMode, blendState); - } - - public new void Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState) - { - base.Begin(sortMode, blendState, samplerState, depthStencilState, rasterizerState); - } - - public new void Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect) - { - base.Begin(sortMode, blendState, samplerState, depthStencilState, rasterizerState, effect); - } - - public new void Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformMatrix) - { - base.Begin(sortMode, blendState, samplerState, depthStencilState, rasterizerState, effect, transformMatrix); - } - } -}
\ No newline at end of file |