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

# Line 318 | Line 318 | namespace RomCheater
318          {
319              ShowMemorySearch();
320          }
321 +
322 +        private void mnuItemDateShift_Click(object sender, EventArgs e)
323 +        {
324 +            DateTime t = DateTime.Now;
325 +            int year = Convert.ToInt32(t.ToString("yy"));
326 +            int y = year << 9;
327 +            int m = t.Month << 5;
328 +            int d = t.Day;
329 +
330 +            ushort v1 = (ushort)(y | m | d);
331 +
332 +            t = t.AddDays(1);
333 +            year = Convert.ToInt32(t.ToString("yy"));
334 +            y = year << 9;
335 +            m = t.Month << 5;
336 +            d = t.Day;
337 +            ushort v2 = (ushort)(y | m | d);
338 +
339 +            t = t.AddDays(1);
340 +            year = Convert.ToInt32(t.ToString("yy"));
341 +            y = year << 9;
342 +            m = t.Month << 5;
343 +            d = t.Day;
344 +            ushort v3 = (ushort)(y | m | d);
345 +
346 +            t = new DateTime(9999,12,31);
347 +            year = Convert.ToInt32(t.ToString("yy"));
348 +            y = year << 9;
349 +            m = t.Month << 5;
350 +            d = t.Day;
351 +            ushort v4 = (ushort)(y | m | d);
352 +        }
353          
354      }
355   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines