ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Main.cs
(Generate patch)

Comparing trunk/RomCheater/Main.cs (file contents):
Revision 259 by william, Sun Jun 3 14:50:09 2012 UTC vs.
Revision 260 by william, Sun Jun 3 19:15:41 2012 UTC

--- trunk/RomCheater/Main.cs	2012/06/03 17:34:52	259
+++ trunk/RomCheater/Main.cs	2012/06/03 19:15:41	260
@@ -318,6 +318,38 @@ namespace RomCheater
         {
             ShowMemorySearch();
         }
+
+        private void mnuItemDateShift_Click(object sender, EventArgs e)
+        {
+            DateTime t = DateTime.Now;
+            int year = Convert.ToInt32(t.ToString("yy"));
+            int y = year << 9;
+            int m = t.Month << 5;
+            int d = t.Day;
+
+            ushort v1 = (ushort)(y | m | d);
+
+            t = t.AddDays(1);
+            year = Convert.ToInt32(t.ToString("yy"));
+            y = year << 9;
+            m = t.Month << 5;
+            d = t.Day;
+            ushort v2 = (ushort)(y | m | d);
+
+            t = t.AddDays(1);
+            year = Convert.ToInt32(t.ToString("yy"));
+            y = year << 9;
+            m = t.Month << 5;
+            d = t.Day;
+            ushort v3 = (ushort)(y | m | d);
+
+            t = new DateTime(9999,12,31);
+            year = Convert.ToInt32(t.ToString("yy"));
+            y = year << 9;
+            m = t.Month << 5;
+            d = t.Day;
+            ushort v4 = (ushort)(y | m | d);
+        }
         
     }
 }