Skip to content

Commit

Permalink
Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
Browse files Browse the repository at this point in the history
…elop3d
  • Loading branch information
Alexandre Zollinger Chohfi committed Nov 26, 2012
2 parents 8d2a871 + 7f0dd70 commit 7865199
Show file tree
Hide file tree
Showing 64 changed files with 1,654 additions and 411 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
Expand Down Expand Up @@ -141,6 +141,9 @@
<Compile Include="..\..\Tools\2MGFX\ParseTree.cs">
<Link>Processors\Effect\ParseTree.cs</Link>
</Compile>
<Compile Include="..\..\Tools\2MGFX\ParseTreeTools.cs">
<Link>Processors\Effect\ParseTreeTools.cs</Link>
</Compile>
<Compile Include="..\..\Tools\2MGFX\Scanner.cs">
<Link>Processors\Effect\Scanner.cs</Link>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@ protected override ExternalReference<TextureContent> BuildTexture(string textur

return context.BuildAsset<TextureContent, TextureContent>(texture, typeof(MGTextureProcessor).Name, processorParameters, null, null);
}

protected override ExternalReference<CompiledEffectContent> BuildEffect(ExternalReference<EffectContent> effect, ContentProcessorContext context)
{
return context.BuildAsset<EffectContent, CompiledEffectContent>(effect, typeof(MGEffectProcessor).Name);
}
}
}
11 changes: 6 additions & 5 deletions MonoGame.ContentPipeline/MonoGame.ContentPipeline.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


<Target Name="MonoGamePlatform" BeforeTargets="BuildContentProjects" Condition="'$(MonoGamePlatform)' != ''">
<Target Name="MonoGamePlatform" BeforeTargets="BuildContentProjects">

<!-- If the MonoGamePlatform property is unset then report an error. -->
<Error Text="The MonoGamePlatform property must be set to Windows, Windows8, iOS, Android, Linux, OSX, or PSS or left blank if not processing content for MonoGame."
Condition="'$(MonoGamePlatform)' != 'Windows' And
<Error Text="The MonoGamePlatform property must be set to Windows, Windows8, iOS, Android, Linux, OSX, or PSM or left blank if not processing content for MonoGame."
Condition="'$(MonoGamePlatform)' != '' And
'$(MonoGamePlatform)' != 'Windows' And
'$(MonoGamePlatform)' != 'Windows8' And
'$(MonoGamePlatform)' != 'iOS' And
'$(MonoGamePlatform)' != 'Android' And
'$(MonoGamePlatform)' != 'Linux' And
'$(MonoGamePlatform)' != 'OSX' And
'$(MonoGamePlatform)' != 'PSS'" />
'$(MonoGamePlatform)' != 'PSM'" />

<!-- Set a user level environment variable that the content processors can pick up. -->
<Message Importance="high" Text="MonoGame Platform $(MonoGamePlatform)"/>
<Message Importance="high" Text="MonoGame Platform $(MonoGamePlatform)" Condition="'$(MonoGamePlatform)' != ''"/>
<Exec Command='SETX MONOGAME_PLATFORM "$(MonoGamePlatform)" > NUL'/>

</Target>
Expand Down
3 changes: 2 additions & 1 deletion MonoGame.Framework/Content/ContentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ private ContentReader GetContentReaderFromXnb(string originalAssetName, ref Stre
memStream.Seek(0, SeekOrigin.Begin);
stream.Dispose();
stream = memStream;
pos = -14;
// Position is at the start of the MemoryStream as Stream.CopyTo copies from current position
pos = 0;
#endif

while (pos - startPos < compressedSize)
Expand Down
10 changes: 10 additions & 0 deletions MonoGame.Framework/GameUpdateRequiredException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;

namespace Microsoft.Xna.Framework
{
public class GameUpdateRequiredException : Exception
{

}
}

17 changes: 17 additions & 0 deletions MonoGame.Framework/GamerServices/LeaderboardEntry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

namespace Microsoft.Xna.Framework.GamerServices
{
public sealed class LeaderboardEntry
{

public long Rating {get; set;}
public PropertyDictionary Columns {get; internal set;}
public Gamer Gamer {get; internal set;}

public LeaderboardEntry ()
{
}
}
}

21 changes: 21 additions & 0 deletions MonoGame.Framework/GamerServices/LeaderboardIdentity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;

namespace Microsoft.Xna.Framework.GamerServices
{
public struct LeaderboardIdentity
{
public int GameMode {get; set;}
public LeaderboardKey Key {get; set;}

public static LeaderboardIdentity Create(LeaderboardKey aKey)
{
return new LeaderboardIdentity() { Key = aKey};
}

public static LeaderboardIdentity Create(LeaderboardKey aKey, int aGameMode)
{
return new LeaderboardIdentity() { Key = aKey, GameMode = aGameMode};
}
}
}

13 changes: 13 additions & 0 deletions MonoGame.Framework/GamerServices/LeaderboardKey.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;

namespace Microsoft.Xna.Framework.GamerServices
{
public enum LeaderboardKey
{
BestScoreLifeTime,
BestScoreRecent,
BestTimeLifeTime,
BestTimeRecent,
}
}

77 changes: 77 additions & 0 deletions MonoGame.Framework/GamerServices/LeaderboardReader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;

namespace Microsoft.Xna.Framework.GamerServices
{
public sealed class LeaderboardReader : IDisposable
{
public LeaderboardReader ()
{
}

public IAsyncResult BeginPageDown(AsyncCallback aAsyncCallback, object aAsyncState)
{
throw new NotImplementedException ();
}

public IAsyncResult BeginPageUp(AsyncCallback aAsyncCallback, object aAsyncState)
{
throw new NotImplementedException ();
}

public LeaderboardReader EndPageDown(IAsyncResult result)
{
throw new NotImplementedException ();
}

public LeaderboardReader EndPageUp(IAsyncResult result)
{
throw new NotImplementedException ();
}

public static void BeginRead (LeaderboardIdentity id, SignedInGamer gamer, int leaderboardPageSize, AsyncCallback leaderboardReadCallback, SignedInGamer gamer2)
{
throw new NotImplementedException ();
}

public static LeaderboardReader EndRead(IAsyncResult result)
{
throw new NotImplementedException ();
}

public void PageDown()
{
throw new NotImplementedException ();
}

public void PageUp()
{
throw new NotImplementedException ();
}

public bool CanPageDown {
get;
set;
}

public bool CanPageUp {
get;
set;
}

public IEnumerable<LeaderboardEntry> Entries {
get;
set;
}

#region IDisposable implementation

public void Dispose ()
{
throw new NotImplementedException ();
}

#endregion
}
}

26 changes: 26 additions & 0 deletions MonoGame.Framework/GamerServices/LeaderboardWriter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;

namespace Microsoft.Xna.Framework.GamerServices
{
public sealed class LeaderboardWriter : IDisposable
{
public LeaderboardWriter ()
{
}

public LeaderboardEntry GetLeaderboard(LeaderboardIdentity aLeaderboardIdentity)
{
throw new NotImplementedException ();
}

#region IDisposable implementation

void IDisposable.Dispose ()
{
throw new NotImplementedException ();
}

#endregion
}
}

33 changes: 33 additions & 0 deletions MonoGame.Framework/GamerServices/PropertyDictionary.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;

namespace Microsoft.Xna.Framework.GamerServices
{
public class PropertyDictionary
{
private Dictionary<string,object> PropDictionary = new Dictionary<string, object>();
public int GetValueInt32 (string aKey)
{
return (int)PropDictionary[aKey];
}

public DateTime GetValueDateTime (string aKey)
{
return (DateTime)PropDictionary[aKey];
}

public void SetValue(string aKey, DateTime aValue)
{
if(PropDictionary.ContainsKey(aKey))
{
PropDictionary[aKey] = aValue;
}
else
{
PropDictionary.Add(aKey,aValue);
}
}
}

}

Loading

0 comments on commit 7865199

Please sign in to comment.