Skip to content

Commit

Permalink
Added System module and updated other modules/examples to match
Browse files Browse the repository at this point in the history
  • Loading branch information
zsbzsb committed Jun 5, 2014
1 parent 1862f70 commit 4b3208c
Show file tree
Hide file tree
Showing 39 changed files with 344 additions and 165 deletions.
10 changes: 10 additions & 0 deletions build/vc2008/SFML.net.sln
Expand Up @@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sound_capture", "..\..\exam
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "shader", "..\..\examples\shader\shader.csproj", "{9D4738F7-34EA-433A-A765-AF85A52A174D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sfml-system", "..\..\src\System\sfml-system.csproj", "{31D24303-F6A9-4D53-BB03-A73EDCB3186D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand Down Expand Up @@ -89,6 +91,14 @@ Global
{9D4738F7-34EA-433A-A765-AF85A52A174D}.Release|x64.Build.0 = Release|x64
{9D4738F7-34EA-433A-A765-AF85A52A174D}.Release|x86.ActiveCfg = Release|x86
{9D4738F7-34EA-433A-A765-AF85A52A174D}.Release|x86.Build.0 = Release|x86
{31D24303-F6A9-4D53-BB03-A73EDCB3186D}.Debug|x64.ActiveCfg = Debug|x64
{31D24303-F6A9-4D53-BB03-A73EDCB3186D}.Debug|x64.Build.0 = Debug|x64
{31D24303-F6A9-4D53-BB03-A73EDCB3186D}.Debug|x86.ActiveCfg = Debug|x86
{31D24303-F6A9-4D53-BB03-A73EDCB3186D}.Debug|x86.Build.0 = Debug|x86
{31D24303-F6A9-4D53-BB03-A73EDCB3186D}.Release|x64.ActiveCfg = Release|x64
{31D24303-F6A9-4D53-BB03-A73EDCB3186D}.Release|x64.Build.0 = Release|x64
{31D24303-F6A9-4D53-BB03-A73EDCB3186D}.Release|x86.ActiveCfg = Release|x86
{31D24303-F6A9-4D53-BB03-A73EDCB3186D}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 2 additions & 1 deletion examples/opengl/OpenGL.cs
Expand Up @@ -3,6 +3,7 @@
using SFML;
using SFML.Graphics;
using SFML.Window;
using SFML.System;
using Tao.OpenGl;

namespace opengl
Expand Down Expand Up @@ -132,7 +133,7 @@ static void Main()
int startTime = Environment.TickCount;

// Start game loop
while (window.IsOpen())
while (window.IsOpen)
{
// Process events
window.DispatchEvents();
Expand Down
4 changes: 4 additions & 0 deletions examples/opengl/opengl.csproj
Expand Up @@ -53,6 +53,10 @@
<Project>{46786269-57B9-48E7-AA4F-8F4D84609FE6}</Project>
<Name>sfml-graphics</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\System\sfml-system.csproj">
<Project>{31D24303-F6A9-4D53-BB03-A73EDCB3186D}</Project>
<Name>sfml-system</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Window\sfml-window.csproj">
<Project>{D17DE83D-A592-461F-8AF2-53F9E22E1D0F}</Project>
<Name>sfml-window</Name>
Expand Down
3 changes: 2 additions & 1 deletion examples/shader/Shader.cs
Expand Up @@ -3,6 +3,7 @@
using SFML;
using SFML.Graphics;
using SFML.Window;
using SFML.System;

namespace shader
{
Expand Down Expand Up @@ -299,7 +300,7 @@ static void Main()

// Start the game loop
int startTime = Environment.TickCount;
while (window.IsOpen())
while (window.IsOpen)
{
// Process events
window.DispatchEvents();
Expand Down
4 changes: 4 additions & 0 deletions examples/shader/shader.csproj
Expand Up @@ -53,6 +53,10 @@
<Project>{46786269-57B9-48E7-AA4F-8F4D84609FE6}</Project>
<Name>sfml-graphics</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\System\sfml-system.csproj">
<Project>{31D24303-F6A9-4D53-BB03-A73EDCB3186D}</Project>
<Name>sfml-system</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Window\sfml-window.csproj">
<Project>{D17DE83D-A592-461F-8AF2-53F9E22E1D0F}</Project>
<Name>sfml-window</Name>
Expand Down
4 changes: 4 additions & 0 deletions examples/sound/sound.csproj
Expand Up @@ -53,6 +53,10 @@
<Project>{0B202C4D-A457-47FE-84A3-031DD878C6BE}</Project>
<Name>sfml-audio</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\System\sfml-system.csproj">
<Project>{31D24303-F6A9-4D53-BB03-A73EDCB3186D}</Project>
<Name>sfml-system</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Window\sfml-window.csproj">
<Project>{D17DE83D-A592-461F-8AF2-53F9E22E1D0F}</Project>
<Name>sfml-window</Name>
Expand Down
4 changes: 4 additions & 0 deletions examples/sound_capture/sound_capture.csproj
Expand Up @@ -53,6 +53,10 @@
<Project>{0B202C4D-A457-47FE-84A3-031DD878C6BE}</Project>
<Name>sfml-audio</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\System\sfml-system.csproj">
<Project>{31D24303-F6A9-4D53-BB03-A73EDCB3186D}</Project>
<Name>sfml-system</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Window\sfml-window.csproj">
<Project>{D17DE83D-A592-461F-8AF2-53F9E22E1D0F}</Project>
<Name>sfml-window</Name>
Expand Down
3 changes: 2 additions & 1 deletion examples/window/Window.cs
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using SFML;
using SFML.Window;
using SFML.System;
using Tao.OpenGl;

namespace window
Expand Down Expand Up @@ -109,7 +110,7 @@ static void Main()
int startTime = Environment.TickCount;

// Start the game loop
while (window.IsOpen())
while (window.IsOpen)
{
// Process events
window.DispatchEvents();
Expand Down
4 changes: 4 additions & 0 deletions examples/window/window.csproj
Expand Up @@ -49,6 +49,10 @@
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\System\sfml-system.csproj">
<Project>{31D24303-F6A9-4D53-BB03-A73EDCB3186D}</Project>
<Name>sfml-system</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Window\sfml-window.csproj">
<Project>{D17DE83D-A592-461F-8AF2-53F9E22E1D0F}</Project>
<Name>sfml-window</Name>
Expand Down
1 change: 1 addition & 0 deletions src/Audio/Listener.cs
@@ -1,6 +1,7 @@
using System;
using System.Runtime.InteropServices;
using System.Security;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Audio/Music.cs
Expand Up @@ -3,6 +3,7 @@
using System.Security;
using System.IO;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Audio/Sound.cs
@@ -1,6 +1,7 @@
using System;
using System.Runtime.InteropServices;
using System.Security;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Audio/SoundStream.cs
@@ -1,6 +1,7 @@
using System;
using System.Runtime.InteropServices;
using System.Security;
using SFML.System;

namespace SFML
{
Expand Down
5 changes: 4 additions & 1 deletion src/Audio/sfml-audio.csproj
Expand Up @@ -75,9 +75,12 @@
<Compile Include="SoundBufferRecorder.cs" />
<Compile Include="SoundRecorder.cs" />
<Compile Include="SoundStream.cs" />
<Compile Include="Vector3.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\System\sfml-system.csproj">
<Project>{31D24303-F6A9-4D53-BB03-A73EDCB3186D}</Project>
<Name>sfml-system</Name>
</ProjectReference>
<ProjectReference Include="..\Window\sfml-window.csproj">
<Project>{D17DE83D-A592-461F-8AF2-53F9E22E1D0F}</Project>
<Name>sfml-window</Name>
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/CircleShape.cs
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using System.Security;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/ConvexShape.cs
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using System.Security;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/Image.cs
Expand Up @@ -4,6 +4,7 @@
using System.IO;
using System.Runtime.ConstrainedExecution;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/RectangleShape.cs
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using System.Security;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/RenderTarget.cs
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using System.Security;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/RenderTexture.cs
Expand Up @@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Security;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
6 changes: 4 additions & 2 deletions src/Graphics/RenderWindow.cs
Expand Up @@ -3,7 +3,9 @@
using System.Collections;
using System.Collections.Generic;
using System.Security;
using System.Text;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down Expand Up @@ -55,7 +57,7 @@ public class RenderWindow : SFML.Window.Window, RenderTarget
base(IntPtr.Zero, 0)
{
// Copy the string to a null-terminated UTF-32 byte array
byte[] titleAsUtf32 = System.Text.Encoding.UTF32.GetBytes(title + '\0');
byte[] titleAsUtf32 = Encoding.UTF32.GetBytes(title + '\0');

unsafe
{
Expand Down Expand Up @@ -167,7 +169,7 @@ public override Vector2u Size
public override void SetTitle(string title)
{
// Copy the title to a null-terminated UTF-32 byte array
byte[] titleAsUtf32 = System.Text.Encoding.UTF32.GetBytes(title + '\0');
byte[] titleAsUtf32 = Encoding.UTF32.GetBytes(title + '\0');

unsafe
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/Shader.cs
Expand Up @@ -4,6 +4,7 @@
using System.Security;
using System.Collections.Generic;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/Shape.cs
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using System.Security;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
6 changes: 4 additions & 2 deletions src/Graphics/Text.cs
@@ -1,7 +1,9 @@
using System;
using System.Security;
using System.Runtime.InteropServices;
using System.Text;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down Expand Up @@ -129,13 +131,13 @@ public string DisplayedString
Marshal.Copy(source, sourceBytes, 0, sourceBytes.Length);

// Convert it to a C# string
return System.Text.Encoding.UTF32.GetString(sourceBytes);
return Encoding.UTF32.GetString(sourceBytes);
}

set
{
// Copy the string to a null-terminated UTF-32 byte array
byte[] utf32 = System.Text.Encoding.UTF32.GetBytes(value + '\0');
byte[] utf32 = Encoding.UTF32.GetBytes(value + '\0');

// Pass it to the C API
unsafe
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/Texture.cs
Expand Up @@ -4,6 +4,7 @@
using System.IO;
using System.Runtime.ConstrainedExecution;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/Transform.cs
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using System.Security;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/Transformable.cs
@@ -1,5 +1,6 @@
using System;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/Vertex.cs
@@ -1,6 +1,7 @@
using System;
using System.Runtime.InteropServices;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/View.cs
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using System.Security;
using SFML.Window;
using SFML.System;

namespace SFML
{
Expand Down
4 changes: 4 additions & 0 deletions src/Graphics/sfml-graphics.csproj
Expand Up @@ -96,6 +96,10 @@
<Compile Include="View.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\System\sfml-system.csproj">
<Project>{31D24303-F6A9-4D53-BB03-A73EDCB3186D}</Project>
<Name>sfml-system</Name>
</ProjectReference>
<ProjectReference Include="..\Window\sfml-window.csproj">
<Project>{D17DE83D-A592-461F-8AF2-53F9E22E1D0F}</Project>
<Name>sfml-window</Name>
Expand Down
File renamed without changes.
33 changes: 33 additions & 0 deletions src/System/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Les informations générales relatives à un assembly dépendent de
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
// associées à un assembly.
[assembly: AssemblyTitle("sfml-system")]
[assembly: AssemblyDescription("System module of the SFML library")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SFML")]
[assembly: AssemblyCopyright("Copyright © Laurent Gomila")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
[assembly: ComVisible(true)]

// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
[assembly: Guid("f0cec342-7361-41cd-acb4-7ef2461af7f0")]

// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
//
// Version principale
// Version secondaire
// Numéro de build
// Révision
//
[assembly: AssemblyVersion("2.1.0")]
[assembly: AssemblyFileVersion("2.1.0")]

0 comments on commit 4b3208c

Please sign in to comment.