From 2b8d49726e448e22b5055da5ba4395d043030984 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 1 Jan 2012 14:21:26 +0000 Subject: Moved sources to help in compilation for other platforms and isolated phone projects. --- Noddybox.Emulation.EightBit/Binary.cs | 63 ----------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 Noddybox.Emulation.EightBit/Binary.cs (limited to 'Noddybox.Emulation.EightBit/Binary.cs') diff --git a/Noddybox.Emulation.EightBit/Binary.cs b/Noddybox.Emulation.EightBit/Binary.cs deleted file mode 100644 index 0b1928b..0000000 --- a/Noddybox.Emulation.EightBit/Binary.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Shapes; - -namespace Noddybox.Emulation.EightBit -{ - /// - /// Provides helpers for shifting smaller values around without casts all over the shop. - /// - public static class Binary - { - /// - /// Shift 8-bits to the left. - /// - /// The byte. - /// How many bits to shift. - /// The shifted value. - public static byte ShiftLeft(byte b, int shift) - { - return (byte)((b << shift) & 0xff); - } - - /// - /// Shift 8-bits to the right. - /// - /// The byte. - /// How many bits to shift. - /// The shifted value. - public static byte ShiftRight(byte b, int shift) - { - return (byte)((b >> shift) & 0xff); - } - - /// - /// Shift 16-bits to the left. - /// - /// The word. - /// How many bits to shift. - /// The shifted value. - public static ushort ShiftLeft(ushort w, int shift) - { - return (ushort)((w << shift) & 0xffff); - } - - /// - /// Shift 16-bits to the right. - /// - /// The word. - /// How many bits to shift. - /// The shifted value. - public static ushort ShiftRight(ushort w, int shift) - { - return (ushort)((w >> shift) & 0xffff); - } - } -} -- cgit v1.3