axiosengine 

axiosengine Commit Details


Date:2014-11-30 11:50:21 (10 years 21 days ago)
Author:Natalie Adams
Branch:master
Commit:ba49c70a91180d0f93d428ec3adbbcf195a0e690
Parents: 00bc0f4fa4b87a7b4edb997ce134c5fcc58b65d4
Message:Adding mono project adding game services static class to make it easier to access graphics device adding axiosengine factory with extension to create texture from list of textures

Changes:

File differences

Game.Services.License.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Original GameServices class written by Roy Triesscheijn
http://roy-t.nl/index.php/about-2/
http://roy-t.nl/index.php/2010/08/25/xna-accessing-contentmanager-and-graphicsdevice-anywhere-anytime-the-gameservicecontainer/
This license governs use of the accompanying software. If you use the software, you
accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the
same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
README
6969
7070
7171
72
72
73
74
75
76
77
Portions of this product are (C) 2009-2011 JRTwine Software, LLC
Prompt Factory - By Blaze Phoenix
http://stackoverflow.com/a/17260476/195722
http://stackoverflow.com/a/17260476/195722
Game Services - See Game.Services.License.txt
http://roy-t.nl/index.php/2010/08/25/xna-accessing-contentmanager-and-graphicsdevice-anywhere-anytime-the-gameservicecontainer/
axios/Axios_Windows.csproj.user
11
22
33
4
4
55
66
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
axios/Axios_Windows_mono.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{A622337F-9AE6-492A-85D6-01CCE0D7F9B4}</ProjectGuid>
<ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Axios</RootNamespace>
<AssemblyName>Axios.Windows.Mono</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
<XnaPlatform>Windows</XnaPlatform>
<XnaProfile>HiDef</XnaProfile>
<XnaCrossPlatformGroupID>cd94d25d-3fe9-470c-b921-7a5abdd2494c</XnaCrossPlatformGroupID>
<XnaOutputType>Library</XnaOutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>false</XnaCompressContent>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x86\Release</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>true</XnaCompressContent>
</PropertyGroup>
<ItemGroup>
<Reference Include="Lidgren.Network, Version=2011.3.12.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>c:\Program Files (x86)\MonoGame\v3.0\Assemblies\WindowsGL\Lidgren.Network.dll</HintPath>
</Reference>
<Reference Include="MonoGame.Framework, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>c:\Program Files (x86)\MonoGame\v3.0\Assemblies\WindowsGL\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="mscorlib">
<Private>False</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>c:\Program Files (x86)\MonoGame\v3.0\Assemblies\WindowsGL\OpenTK.dll</HintPath>
</Reference>
<Reference Include="System">
<Private>False</Private>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml">
<Private>False</Private>
</Reference>
<Reference Include="System.Core">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
<Private>False</Private>
</Reference>
<Reference Include="System.Net">
<Private>False</Private>
</Reference>
<Reference Include="Tao.Sdl, Version=1.2.13.0, Culture=neutral, PublicKeyToken=9c7a200e36c0094e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>c:\Program Files (x86)\MonoGame\v3.0\Assemblies\WindowsGL\Tao.Sdl.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Engine\AxiosBreakableGameObject.cs" />
<Compile Include="Engine\AxiosCommandConsole.cs" />
<Compile Include="Engine\AxiosEvents.cs" />
<Compile Include="Axios_settings.cs" />
<Compile Include="Collision\Collision.cs" />
<Compile Include="Collision\Distance.cs" />
<Compile Include="Collision\DynamicTree.cs" />
<Compile Include="Collision\DynamicTreeBroadPhase.cs" />
<Compile Include="Collision\IBroadPhase.cs" />
<Compile Include="Collision\QuadTree.cs" />
<Compile Include="Collision\QuadTreeBroadPhase.cs" />
<Compile Include="Collision\Shapes\CircleShape.cs" />
<Compile Include="Collision\Shapes\EdgeShape.cs" />
<Compile Include="Collision\Shapes\LoopShape.cs" />
<Compile Include="Collision\Shapes\PolygonShape.cs" />
<Compile Include="Collision\Shapes\Shape.cs" />
<Compile Include="Collision\TimeOfImpact.cs" />
<Compile Include="Common\ConvexHull\ChainHull.cs" />
<Compile Include="Common\ConvexHull\GiftWrap.cs" />
<Compile Include="Common\ConvexHull\Melkman.cs" />
<Compile Include="Common\Decomposition\BayazitDecomposer.cs" />
<Compile Include="Common\Decomposition\CDTDecomposer.cs" />
<Compile Include="Common\Decomposition\CDT\Delaunay\DelaunayTriangle.cs" />
<Compile Include="Common\Decomposition\CDT\Delaunay\Sweep\AdvancingFront.cs" />
<Compile Include="Common\Decomposition\CDT\Delaunay\Sweep\AdvancingFrontNode.cs" />
<Compile Include="Common\Decomposition\CDT\Delaunay\Sweep\DTSweep.cs" />
<Compile Include="Common\Decomposition\CDT\Delaunay\Sweep\DTSweepConstraint.cs" />
<Compile Include="Common\Decomposition\CDT\Delaunay\Sweep\DTSweepContext.cs" />
<Compile Include="Common\Decomposition\CDT\Delaunay\Sweep\DTSweepPointComparator.cs" />
<Compile Include="Common\Decomposition\CDT\Delaunay\Sweep\PointOnEdgeException.cs" />
<Compile Include="Common\Decomposition\CDT\ITriangulatable.cs" />
<Compile Include="Common\Decomposition\CDT\Orientation.cs" />
<Compile Include="Common\Decomposition\CDT\Polygon\Polygon.cs" />
<Compile Include="Common\Decomposition\CDT\Polygon\PolygonPoint.cs" />
<Compile Include="Common\Decomposition\CDT\Polygon\PolygonSet.cs" />
<Compile Include="Common\Decomposition\CDT\Sets\ConstrainedPointSet.cs" />
<Compile Include="Common\Decomposition\CDT\Sets\PointSet.cs" />
<Compile Include="Common\Decomposition\CDT\TriangulationConstraint.cs" />
<Compile Include="Common\Decomposition\CDT\TriangulationContext.cs" />
<Compile Include="Common\Decomposition\CDT\TriangulationMode.cs" />
<Compile Include="Common\Decomposition\CDT\TriangulationPoint.cs" />
<Compile Include="Common\Decomposition\CDT\TriangulationUtil.cs" />
<Compile Include="Common\Decomposition\CDT\Util\FixedArray3.cs" />
<Compile Include="Common\Decomposition\CDT\Util\FixedBitArray3.cs" />
<Compile Include="Common\Decomposition\CDT\Util\PointGenerator.cs" />
<Compile Include="Common\Decomposition\CDT\Util\PolygonGenerator.cs" />
<Compile Include="Common\Decomposition\EarclipDecomposer.cs" />
<Compile Include="Common\Decomposition\FlipcodeDecomposer.cs" />
<Compile Include="Common\Decomposition\SeidelDecomposer.cs" />
<Compile Include="Common\FixedArray.cs" />
<Compile Include="Common\HashSet.cs" />
<Compile Include="Common\LineTools.cs" />
<Compile Include="Common\Math.cs" />
<Compile Include="Common\Path.cs" />
<Compile Include="Common\PathManager.cs" />
<Compile Include="Common\PhysicsLogic\Explosion.cs" />
<Compile Include="Common\PhysicsLogic\PhysicsLogic.cs" />
<Compile Include="Common\PolygonManipulation\CuttingTools.cs" />
<Compile Include="Common\PolygonManipulation\SimplifyTools.cs" />
<Compile Include="Common\PolygonManipulation\YuPengClipper.cs" />
<Compile Include="Common\PolygonTools.cs" />
<Compile Include="Common\Serialization.cs" />
<Compile Include="Common\TextureTools\MarchingSquares.cs" />
<Compile Include="Common\TextureTools\MSTerrain.cs" />
<Compile Include="Common\TextureTools\TextureConverter.cs" />
<Compile Include="Common\Vertices.cs" />
<Compile Include="Controllers\AbstractForceController.cs" />
<Compile Include="Controllers\BuoyancyController.cs" />
<Compile Include="Controllers\Controller.cs" />
<Compile Include="Controllers\GravityController.cs" />
<Compile Include="Controllers\SimpleWindForce.cs" />
<Compile Include="Controllers\VelocityLimitController.cs" />
<Compile Include="DebugView.cs" />
<Compile Include="DebugViewXNA.cs" />
<Compile Include="DrawingSystem\AssetCreator.cs" />
<Compile Include="DrawingSystem\LineBatch.cs" />
<Compile Include="DrawingSystem\Sprite.cs" />
<Compile Include="Dynamics\Body.cs" />
<Compile Include="Dynamics\BreakableBody.cs" />
<Compile Include="Dynamics\ContactManager.cs" />
<Compile Include="Dynamics\Contacts\Contact.cs" />
<Compile Include="Dynamics\Contacts\ContactSolver.cs" />
<Compile Include="Dynamics\Fixture.cs" />
<Compile Include="Dynamics\Island.cs" />
<Compile Include="Dynamics\Joints\AngleJoint.cs" />
<Compile Include="Dynamics\Joints\DistanceJoint.cs" />
<Compile Include="Dynamics\Joints\FixedAngleJoint.cs" />
<Compile Include="Dynamics\Joints\FixedDistanceJoint.cs" />
<Compile Include="Dynamics\Joints\FixedFrictionJoint.cs" />
<Compile Include="Dynamics\Joints\FixedLineJoint.cs" />
<Compile Include="Dynamics\Joints\FixedMouseJoint.cs" />
<Compile Include="Dynamics\Joints\FixedPrismaticJoint.cs" />
<Compile Include="Dynamics\Joints\FixedRevoluteJoint.cs" />
<Compile Include="Dynamics\Joints\FrictionJoint.cs" />
<Compile Include="Dynamics\Joints\GearJoint.cs" />
<Compile Include="Dynamics\Joints\Joint.cs" />
<Compile Include="Dynamics\Joints\LineJoint.cs" />
<Compile Include="Dynamics\Joints\PrismaticJoint.cs" />
<Compile Include="Dynamics\Joints\PulleyJoint.cs" />
<Compile Include="Dynamics\Joints\RevoluteJoint.cs" />
<Compile Include="Dynamics\Joints\RopeJoint.cs" />
<Compile Include="Dynamics\Joints\SliderJoint.cs" />
<Compile Include="Dynamics\Joints\WeldJoint.cs" />
<Compile Include="Dynamics\TimeStep.cs" />
<Compile Include="Dynamics\World.cs" />
<Compile Include="Dynamics\WorldCallbacks.cs" />
<Compile Include="Engine\AxiosGameObject.cs" />
<Compile Include="Engine\ComplexAxiosGameObject.cs" />
<Compile Include="Engine\Data\AxiosCSV.cs" />
<Compile Include="Engine\Data\AxiosDataTable.cs" />
<Compile Include="Engine\Data\DataEvents.cs" />
<Compile Include="Engine\DrawableAxiosGameObject.cs" />
<Compile Include="Engine\DrawableBreakableAxiosGameObject.cs" />
<Compile Include="Engine\Extensions\Bitmap.cs" />
<Compile Include="Engine\Extensions\Contact.cs" />
<Compile Include="Engine\Extensions\InputState.cs" />
<Compile Include="Engine\Extensions\Double.cs" />
<Compile Include="Engine\Extensions\MouseState.cs" />
<Compile Include="Engine\Extensions\String.cs" />
<Compile Include="Engine\Extensions\Texture2D.cs" />
<Compile Include="Engine\File\AxiosFile.cs" />
<Compile Include="Engine\File\AxiosIsolatedFile.cs" />
<Compile Include="Engine\File\AxiosRegularFile.cs" />
<Compile Include="Engine\File\AxiosTitleFile.cs" />
<Compile Include="Engine\Gleed2D\Camera.cs" />
<Compile Include="Engine\Gleed2D\CircleItem.cs" />
<Compile Include="Engine\Gleed2D\CustomProperty.cs" />
<Compile Include="Engine\Gleed2D\Item.cs" />
<Compile Include="Engine\Gleed2D\Layer.cs" />
<Compile Include="Engine\Gleed2D\Level.cs" />
<Compile Include="Engine\Gleed2D\PathItem.cs" />
<Compile Include="Engine\Gleed2D\RectangleItem.cs" />
<Compile Include="Engine\Gleed2D\TextureItem.cs" />
<Compile Include="Engine\Interfaces\IAxiosFile.cs" />
<Compile Include="Engine\Interfaces\IAxiosGameObject.cs" />
<Compile Include="Engine\Interfaces\IDrawableAxiosGameObject.cs" />
<Compile Include="Engine\Log\AxiosLog.cs" />
<Compile Include="Engine\Structures\AxiosPoint.cs" />
<Compile Include="Engine\Structures\AxiosRectangle.cs" />
<Compile Include="Engine\SimpleAxiosGameObject.cs" />
<Compile Include="Engine\SimpleDrawableAxiosGameObject.cs" />
<Compile Include="Engine\AxiosTimer.cs" />
<Compile Include="Engine\Singleton.cs" />
<Compile Include="Engine\UI\AxiosButton.cs" />
<Compile Include="Engine\UI\AxiosUIObject.cs" />
<Compile Include="Factories\BodyFactory.cs" />
<Compile Include="Factories\FixtureFactory.cs" />
<Compile Include="Factories\JointFactory.cs" />
<Compile Include="Factories\LinkFactory.cs" />
<Compile Include="PrimitiveBatch.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScreenSystem\BackgroundScreen.cs" />
<Compile Include="ScreenSystem\Button.cs" />
<Compile Include="ScreenSystem\Camera2D.cs" />
<Compile Include="ScreenSystem\ConvertUnits.cs" />
<Compile Include="ScreenSystem\FramerateCounterComponent.cs" />
<Compile Include="ScreenSystem\GameplayScreen.cs" />
<Compile Include="ScreenSystem\GameScreen.cs" />
<Compile Include="ScreenSystem\IDemoScreen.cs" />
<Compile Include="ScreenSystem\InputAction.cs" />
<Compile Include="Engine\AxiosGameScreen.cs" />
<Compile Include="ScreenSystem\InputState.cs" />
<Compile Include="ScreenSystem\IScreenFactory.cs" />
<Compile Include="ScreenSystem\LoadingScreen.cs" />
<Compile Include="ScreenSystem\LogoScreen.cs" />
<Compile Include="ScreenSystem\MainMenuScreen.cs" />
<Compile Include="ScreenSystem\MenuButton.cs" />
<Compile Include="ScreenSystem\MenuEntry.cs" />
<Compile Include="ScreenSystem\MenuScreen.cs" />
<Compile Include="ScreenSystem\MessageBoxScreen.cs" />
<Compile Include="ScreenSystem\OptionsMenuScreen.cs" />
<Compile Include="ScreenSystem\PauseMenuScreen.cs" />
<Compile Include="ScreenSystem\PhoneMainMenuScreen.cs" />
<Compile Include="ScreenSystem\PhoneMenuScreen.cs" />
<Compile Include="ScreenSystem\PhonePauseScreen.cs" />
<Compile Include="ScreenSystem\PhysicsGameScreen.cs" />
<Compile Include="ScreenSystem\PlayerIndexEventArgs.cs" />
<Compile Include="ScreenSystem\ScreenManager.cs" />
<Compile Include="ScreenSystem\ScreenManagerComponent.cs" />
<Compile Include="ScreenSystem\SpriteFonts.cs" />
<Compile Include="ScreenSystem\VirtualButton.cs" />
<Compile Include="ScreenSystem\VirtualStick.cs" />
<Compile Include="Settings.cs" />
<Compile Include="XNACC\CommandConsoleBase.cs" />
<Compile Include="XNACC\CommandConsoleBaseSharedTypes.cs" />
</ItemGroup>
<ItemGroup>
<None Include="AxiosEngine.cd" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="MonoGame_RemoveXnaAssemblies" AfterTargets="ImplicitlyExpandTargetFramework">
<Message Text="MonoGame - Removing XNA Assembly references!" Importance="normal" />
<ItemGroup>
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.dll'" />
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.GamerServices.dll'" />
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.GamerServicesExtensions.dll'" />
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.Input.Touch.dll'" />
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.MediaLibraryExtensions.dll'" />
</ItemGroup>
</Target>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(TargeDir)"..\..\Combined mkdir "$(TargetDir)"..\..\Combined
copy "$(TargetPath)" ..\..\Combined</PostBuildEvent>
</PropertyGroup>
<!--
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>
axios/Axios_settings.cs
129129
130130
131131
132
133
134
132135
133136
134137
* - Adding prompt factory class to generate a Final Fantasy type text prompt
* - Updating Gleed2D support to work with latest version of Gleed2D
*
* 1.0.1.11 -
* - Adding game services static class
*
*/
#endregion
axios/Engine/AxiosEngineFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Collections.Generic;
namespace Axios.Engine.Factories
{
public class Texture2DFactory
{
public static Texture2D CreateFromList(List<Texture2D> textures, int width, int height)
{
if (textures.Count <= 0)
return (Texture2D)null;
Texture2D texture2D1 = new Texture2D(textures[0].GraphicsDevice, width, height);
Color[] data1 = new Color[width * height];
texture2D1.GetData<Color>(data1);
Rectangle rectangle = new Rectangle(0, 0, textures[0].Width, textures[0].Height);
foreach (Texture2D texture2D2 in textures)
{
Color[] data2 = new Color[texture2D2.Width * texture2D2.Height];
texture2D2.GetData<Color>(data2);
texture2D1.SetData<Color>(0, new Rectangle?(rectangle), data2, 0, texture2D2.Width * texture2D2.Height);
rectangle.X += texture2D2.Width;
if (rectangle.X >= width)
{
rectangle.X = 0;
rectangle.Y += texture2D2.Height;
}
}
return texture2D1;
}
}
}
axios/Engine/AxiosGameScreen.cs
7878
7979
8080
81
81
82
8283
8384
8485
this._uiobjects = new List<AxiosUIObject>();
prevuiobj = null;
prevuifocusobj = null;
GameServices.AddService<GraphicsDevice>(this.ScreenManager.GraphicsDevice);
GameServices.AddService<ContentManager>(this.ScreenManager.Game.Content);
}
public void LoadLevelFromStream(Stream s)
axios/Engine/GameServices.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using Microsoft.Xna.Framework;
namespace Axios.Engine
{
public static class GameServices
{
private static GameServiceContainer container;
private static object lockobj;
public static GameServiceContainer Instance
{
get
{
lock (GameServices.lockobj)
{
if (container == null)
{
container = new GameServiceContainer();
}
}
return container;
}
}
public static T GetService<T>()
{
return (T)Instance.GetService(typeof(T));
}
public static void AddService<T>(T service)
{
Instance.AddService(typeof(T), service);
}
public static void RemoveService<T>()
{
Instance.RemoveService(typeof(T));
}
}
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.09514s using 14 queries.