Commit 169c6807 authored by Jesse Freeman's avatar Jesse Freeman

Refactored SDK namespaces to make it easier to include in other C# projects....

Refactored SDK namespaces to make it easier to include in other C# projects. There is now a root namespace of PixelVisionSDK. Inside of that are 2 main namespaces: Chips and Utils. All data classes are now part of the root namespace and the folder structure for the SDK has been cleaned up to reflect some of these changes. These changes address issue #3.
parent 06da0ee3
......@@ -11,14 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using PixelVisionSDK.Engine.Chips;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Chips.Graphics.Sprites;
using PixelVisionSDK.Engine.Chips.IO.Controller;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Chips;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK
{
......
......@@ -11,13 +11,14 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Text;
namespace PixelVisionSDK.Engine.Chips
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,13 +11,13 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Audio
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,13 +11,13 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Audio
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,16 +11,15 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVisionSDK.Engine.Chips.Game;
using PixelVisionSDK.Engine.Chips.IO.File;
namespace PixelVisionSDK.Engine.Chips
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,16 +11,17 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
//using UnityEngine;
namespace PixelVisionSDK.Engine.Chips.Game
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,11 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System.Collections.Generic;
namespace PixelVisionSDK.Engine.Chips.Game
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,9 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
namespace PixelVisionSDK.Engine.Chips.Game
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,15 +11,15 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Text;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Graphics.Colors
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,12 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using PixelVisionSDK.Engine.Chips.Data;
namespace PixelVisionSDK.Engine.Chips.Graphics.Colors
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,15 +11,15 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Text;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Graphics.Display
namespace PixelVisionSDK.Chips
{
public class DisplayChip : AbstractChip, IDraw
......
......@@ -11,15 +11,15 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVisionSDK.Engine.Chips.Data;
namespace PixelVisionSDK.Engine.Chips.Graphics.Sprites
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,11 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine.Chips.Data;
namespace PixelVisionSDK.Engine.Chips.Graphics.Colors
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,14 +11,14 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System.Collections.Generic;
using System.Text;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Graphics.Display
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,16 +11,16 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Graphics.Sprites
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,16 +11,16 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Graphics.Sprites
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,11 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine.Chips.IO.File;
namespace PixelVisionSDK.Engine.Chips
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,9 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
namespace PixelVisionSDK.Engine.Chips
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,16 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine.Chips.Audio;
using PixelVisionSDK.Engine.Chips.Game;
using PixelVisionSDK.Engine.Chips.Graphics.Colors;
using PixelVisionSDK.Engine.Chips.Graphics.Display;
using PixelVisionSDK.Engine.Chips.Graphics.Sprites;
using PixelVisionSDK.Engine.Chips.IO.Controller;
namespace PixelVisionSDK.Engine.Chips
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,9 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
namespace PixelVisionSDK.Engine.Chips
namespace PixelVisionSDK.Chips
{
/// <summary>
......
......@@ -11,9 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
namespace PixelVisionSDK.Engine.Chips.IO.Controller
namespace PixelVisionSDK
{
public class ButtonState : IButtonState
......
......@@ -11,12 +11,13 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Chips;
namespace PixelVisionSDK.Engine.Chips.IO.Controller
namespace PixelVisionSDK
{
public enum Buttons
......
......@@ -11,13 +11,13 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System.Collections.Generic;
using System.Text;
using PixelVisionSDK.Engine.Chips.IO.File;
namespace PixelVisionSDK.Engine.Chips.IO.Controller
namespace PixelVisionSDK
{
public class ControllerInput : ISave, ILoad
......
......@@ -11,9 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
namespace PixelVisionSDK.Engine.Chips.IO.Controller
namespace PixelVisionSDK
{
public interface IButtonState
......
......@@ -11,12 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine.Chips.Data;
using PixelVisionSDK.Engine.Chips.IO.File;
using PixelVisionSDK.Chips;
namespace PixelVisionSDK.Engine.Chips.IO.Controller
namespace PixelVisionSDK
{
public interface IControllerChip : ISave, ILoad, IUpdate
......
......@@ -11,9 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
namespace PixelVisionSDK.Engine.Chips.IO.Controller
namespace PixelVisionSDK
{
public interface IKeyInput
......
......@@ -11,11 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine.Chips.Data;
namespace PixelVisionSDK.Engine.Chips.IO.Controller
namespace PixelVisionSDK
{
public interface IMouseInput
......
......@@ -11,13 +11,13 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System.Collections.Generic;
using System.Text;
using PixelVisionSDK.Engine.Chips.IO.File;
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
/// <summary>
......@@ -26,7 +26,7 @@ namespace PixelVisionSDK.Engine.Chips.Data
/// IInvalidate interfaces and provides as standard API for serializing
/// the data it contains via the CustomSerializeData() method.
/// </summary>
public class AbstractData : ISave, ILoad, IInvalidate
public abstract class AbstractData : ISave, ILoad, IInvalidate
{
protected bool _invalid;
......
......@@ -11,13 +11,14 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Globalization;
using System.Text.RegularExpressions;
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,9 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
public interface IInvalidate
......
......@@ -11,11 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System.Collections.Generic;
namespace PixelVisionSDK.Engine.Chips.IO.File
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,11 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System.Text;
namespace PixelVisionSDK.Engine.Chips.IO.File
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,11 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine.Chips.IO.File;
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,11 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,14 +11,15 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Text;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,14 +11,15 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Linq;
using System.Text;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
/// <summary>
......@@ -229,7 +230,7 @@ namespace PixelVisionSDK.Engine.Chips.Data
return;
}
var index = (x % width) + (width * y);
var index = x % width + width * y;
if (index < 0)
return;
......@@ -401,7 +402,7 @@ namespace PixelVisionSDK.Engine.Chips.Data
sb.Append(Convert.ToInt32(wrapMode));
sb.Append(",");
sb.Append("\"spriteIDs\":[" + string.Join(",", pixels.Select (x => x.ToString()).ToArray()) + "]");
sb.Append("\"spriteIDs\":[" + string.Join(",", pixels.Select(x => x.ToString()).ToArray()) + "]");
}
......
......@@ -11,15 +11,16 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVisionSDK.Engine.Utils;
using PixelVisionSDK.Utils;
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,9 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
namespace PixelVisionSDK.Engine.Chips.Data
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,10 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine;
using PixelVisionSDK.Engine.Chips;
using PixelVisionSDK.Chips;
namespace PixelVisionSDK
{
......
......@@ -11,13 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine.Chips;
using PixelVisionSDK.Engine.Chips.Game;
using PixelVisionSDK.Engine.Chips.IO.File;
using PixelVisionSDK.Chips;
namespace PixelVisionSDK.Engine
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,11 +11,10 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using PixelVisionSDK.Engine.Chips.IO.Controller;
namespace PixelVisionSDK.Engine
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,20 +11,15 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
using System.Collections.Generic;
using System.Text;
using PixelVisionSDK.Engine.Chips;
using PixelVisionSDK.Engine.Chips.Audio;
using PixelVisionSDK.Engine.Chips.Game;
using PixelVisionSDK.Engine.Chips.Graphics.Colors;
using PixelVisionSDK.Engine.Chips.Graphics.Display;
using PixelVisionSDK.Engine.Chips.Graphics.Sprites;
using PixelVisionSDK.Engine.Chips.IO.Controller;
namespace PixelVisionSDK.Engine
using PixelVisionSDK.Chips;
namespace PixelVisionSDK
{
/// <summary>
......
......@@ -11,11 +11,12 @@
// Jesse Freeman - @JesseFreeman
// Christer Kaitila - @McFunkypants
// Pedro Medeiros - @saint11
// Shawn Rakowski - @shwany
//
using System;
namespace PixelVisionSDK.Engine.Utils
namespace PixelVisionSDK.Utils
{
public static class MathUtil
......