Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Commit a6b9f49

Browse files
committed
separate fna and xna compilation
1 parent 78db613 commit a6b9f49

6 files changed

Lines changed: 57 additions & 11 deletions

ProjectStarlight.Interchange.csproj

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,50 @@
2020
<DebugSymbols>true</DebugSymbols>
2121
<DebugType>full</DebugType>
2222
<Optimize>false</Optimize>
23-
<OutputPath>bin\Debug\</OutputPath>
24-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<OutputPath>bin\XNA\Debug\</OutputPath>
24+
<DefineConstants>TRACE;DEBUG</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugFNA|AnyCPU' ">
29+
<DebugSymbols>true</DebugSymbols>
30+
<DebugType>full</DebugType>
31+
<Optimize>false</Optimize>
32+
<OutputPath>bin\FNA\Debug\</OutputPath>
33+
<DefineConstants>TRACE;DEBUG;FNA</DefineConstants>
2534
<ErrorReport>prompt</ErrorReport>
2635
<WarningLevel>4</WarningLevel>
2736
</PropertyGroup>
2837
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2938
<DebugType>pdbonly</DebugType>
3039
<Optimize>true</Optimize>
31-
<OutputPath>bin\Release\</OutputPath>
40+
<OutputPath>bin\XNA\Release\</OutputPath>
3241
<DefineConstants>TRACE</DefineConstants>
3342
<ErrorReport>prompt</ErrorReport>
3443
<WarningLevel>4</WarningLevel>
3544
<DocumentationFile>bin\Release\ProjectStarlight.Interchange.xml</DocumentationFile>
3645
</PropertyGroup>
46+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseFNA|AnyCPU' ">
47+
<DebugType>pdbonly</DebugType>
48+
<Optimize>true</Optimize>
49+
<OutputPath>bin\FNA\Release\</OutputPath>
50+
<DefineConstants>TRACE;FNA</DefineConstants>
51+
<ErrorReport>prompt</ErrorReport>
52+
<WarningLevel>4</WarningLevel>
53+
<DocumentationFile>bin\Release\ProjectStarlight.Interchange.xml</DocumentationFile>
54+
</PropertyGroup>
3755
<PropertyGroup>
3856
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
3957
</PropertyGroup>
4058
<ItemGroup>
41-
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
42-
<SpecificVersion>False</SpecificVersion>
43-
<HintPath>..\..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.dll</HintPath>
59+
<Reference Include="FNA" Condition="$(DefineConstants.Contains('FNA'))">
60+
<HintPath>lib\FNA.dll</HintPath>
61+
</Reference>
62+
<Reference Include="Microsoft.Xna.Framework" Condition="!$(DefineConstants.Contains('FNA'))">
63+
<HintPath>lib\Microsoft.XNA.Framework.dll</HintPath>
4464
</Reference>
45-
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
46-
<SpecificVersion>False</SpecificVersion>
47-
<HintPath>..\..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework.Graphics\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Graphics.dll</HintPath>
65+
<Reference Include="Microsoft.Xna.Framework.Graphics" Condition="!$(DefineConstants.Contains('FNA'))">
66+
<HintPath>lib\Microsoft.XNA.Framework.Graphics.dll</HintPath>
4867
</Reference>
4968
<Reference Include="System" />
5069
<Reference Include="System.Core" />

ProjectStarlight.Interchange.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
11+
DebugFNA|Any CPU = DebugFNA|Any CPU
1112
Release|Any CPU = Release|Any CPU
13+
ReleaseFNA|Any CPU = ReleaseFNA|Any CPU
1214
EndGlobalSection
1315
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1416
{584B450A-B781-4FF0-93C8-4888585C109C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1517
{584B450A-B781-4FF0-93C8-4888585C109C}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{584B450A-B781-4FF0-93C8-4888585C109C}.DebugFNA|Any CPU.ActiveCfg = DebugFNA|Any CPU
19+
{584B450A-B781-4FF0-93C8-4888585C109C}.DebugFNA|Any CPU.Build.0 = DebugFNA|Any CPU
1620
{584B450A-B781-4FF0-93C8-4888585C109C}.Release|Any CPU.ActiveCfg = Release|Any CPU
1721
{584B450A-B781-4FF0-93C8-4888585C109C}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{584B450A-B781-4FF0-93C8-4888585C109C}.ReleaseFNA|Any CPU.ActiveCfg = ReleaseFNA|Any CPU
23+
{584B450A-B781-4FF0-93C8-4888585C109C}.ReleaseFNA|Any CPU.Build.0 = ReleaseFNA|Any CPU
1824
EndGlobalSection
1925
GlobalSection(SolutionProperties) = preSolution
2026
HideSolutionNode = FALSE

TextureGIF.cs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ internal TextureGIF(Texture2D[] frames, int ticksPerFrame)
7373
Frames = frames;
7474
}
7575

76-
// ReSharper disable once InvalidXmlDocComment
76+
7777
/// <summary>
78-
/// Restarts (or officially starts, if not started previously) the GIF. Render the GIF with <see cref="Draw"/>.
78+
/// Restarts (or officially starts, if not started previously) the GIF. Render the GIF with <seealso cref="Draw(SpriteBatch, Vector2, Color)"/> or one of its overloads.
7979
/// </summary>
8080
public void Play()
8181
{
@@ -128,28 +128,49 @@ public void SwitchPauseState() =>
128128
// TODO: Find out if there's anything that needs to be done when pausing and unpausing.
129129
IsPaused = !IsPaused;
130130

131+
/// <summary>
132+
/// Draws the current GIF frame.
133+
/// </summary>
131134
public void Draw(SpriteBatch spriteBatch, Vector2 position, Color color) =>
132135
spriteBatch.Draw(CurrentFrame, position, color);
133136

137+
/// <summary>
138+
/// Draws the current GIF frame.
139+
/// </summary>
134140
public void Draw(SpriteBatch spriteBatch, Vector2 position, Rectangle? sourceRectangle, Color color) =>
135141
spriteBatch.Draw(CurrentFrame, position, sourceRectangle, color);
136142

143+
/// <summary>
144+
/// Draws the current GIF frame.
145+
/// </summary>
137146
public void Draw(SpriteBatch spriteBatch, Vector2 position, Rectangle? sourceRectangle, Color color,
138147
float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth) =>
139148
spriteBatch.Draw(CurrentFrame, position, sourceRectangle, color, rotation, origin, scale, effects,
140149
layerDepth);
141150

151+
/// <summary>
152+
/// Draws the current GIF frame.
153+
/// </summary>
142154
public void Draw(SpriteBatch spriteBatch, Vector2 position, Rectangle? sourceRectangle, Color color,
143155
float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth) =>
144156
spriteBatch.Draw(CurrentFrame, position, sourceRectangle, color, rotation, origin, scale, effects,
145157
layerDepth);
146158

159+
/// <summary>
160+
/// Draws the current GIF frame.
161+
/// </summary>
147162
public void Draw(SpriteBatch spriteBatch, Rectangle destinationRectangle, Color color) =>
148163
spriteBatch.Draw(CurrentFrame, destinationRectangle, color);
149164

165+
/// <summary>
166+
/// Draws the current GIF frame.
167+
/// </summary>
150168
public void Draw(SpriteBatch spriteBatch, Rectangle destinationRectangle, Rectangle? sourceRectangle,
151169
Color color) => spriteBatch.Draw(CurrentFrame, destinationRectangle, sourceRectangle, color);
152170

171+
/// <summary>
172+
/// Draws the current GIF frame.
173+
/// </summary>
153174
public void Draw(SpriteBatch spriteBatch, Rectangle destinationRectangle, Rectangle? sourceRectangle,
154175
Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth) =>
155176
spriteBatch.Draw(CurrentFrame, destinationRectangle, sourceRectangle, color, rotation, origin, effects,

lib/FNA.dll

853 KB
Binary file not shown.
418 KB
Binary file not shown.

lib/Microsoft.Xna.Framework.dll

664 KB
Binary file not shown.

0 commit comments

Comments
 (0)