Skip to content

Instantly share code, notes, and snippets.

View MnemonicWME's full-sized avatar

Jan Nedoma MnemonicWME

View GitHub Profile
#region File Description
//-----------------------------------------------------------------------------
// GraphicsDeviceControl.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion
#region Using Statements
<?xml version="1.0" encoding="UTF-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CoreCompileDependsOn>CompileEffect;$(CoreCompileDependsOn)</CoreCompileDependsOn>
<UseHostCompilerIfAvailable>false</UseHostCompilerIfAvailable>
</PropertyGroup>
<Target Name="CompileEffect" Inputs="@(FxCompile)" Outputs="@(FxCompile->'%(RelativeDir)%(Filename).mgfxo')">
<Exec Command="&quot;$(MSBuildProgramFiles32)\MSBuild\MonoGame\v3.0\Tools\2MGFX.exe&quot; &quot;%(FxCompile.Identity)&quot; &quot;@(FxCompile->'%(RelativeDir)%(Filename).mgfxo')&quot; /Profile:DirectX_11" />
//////////////////////////////////////////////////////////////////////////
public static System.Drawing.Image TextureToImage(SmartTexture texture)
{
// SaveAsPng is buggy in monogame (it's actually a compression bug in ZlibStream)
//Image img;
//using (MemoryStream ms = new MemoryStream())
//{
// texture.SaveAsPng(ms, texture.Width, texture.Height);
// ms.Seek(0, SeekOrigin.Begin);
using System;
namespace DeadCode.Slate.World2D
{
public class WorldTime : IEquatable<WorldTime>
{
private int m_TotalDays;
//////////////////////////////////////////////////////////////////////////
public int TotalDays