Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 12th, 2012  |  syntax: C#  |  size: 0.51 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. byte[] Calculate(int eCave, int JumpFrom, int eLength)
  2.                 {
  3.                         if (eLength < 5) return null;
  4.                         byte[] Temp = BitConverter.GetBytes(eCave - JumpFrom - 5);
  5.                         byte[] Ret = new byte[eLength];
  6.                         Ret[0] = 0xE9;
  7.                         for (int i = 1; i < eLength; i++)
  8.                                 Ret[i] = (i - 1) <= (Temp.Length - 1) ? Temp[i - 1] : (byte)0x90;
  9.                         return Ret;
  10.                 }