mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +08:00
use Binary.RotByteL method where appropriate.
This commit is contained in:
parent
fd18f21b40
commit
2dae9872ef
@ -137,7 +137,7 @@ namespace GameRes.Formats.FC01
|
|||||||
while (length > 0)
|
while (length > 0)
|
||||||
{
|
{
|
||||||
var v = data[index];
|
var v = data[index];
|
||||||
data[index++] = (byte)((v << 1 | v >> 7) ^ key);
|
data[index++] = (byte)(Binary.RotByteL (v, 1) ^ key);
|
||||||
key += length--;
|
key += length--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ namespace GameRes.Formats.FC01
|
|||||||
byte c = m_input[m_src++];
|
byte c = m_input[m_src++];
|
||||||
if (0 != Key)
|
if (0 != Key)
|
||||||
{
|
{
|
||||||
c = (byte)(((c << 1) | (c >> 7)) ^ key);
|
c = (byte)(Binary.RotByteL (c, 1) ^ key);
|
||||||
key -= (byte)i;
|
key -= (byte)i;
|
||||||
}
|
}
|
||||||
word_10036650[i*2] = d;
|
word_10036650[i*2] = d;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user