mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-12 04:49:32 +08:00
(Binary): added RotR and RotL methods.
This commit is contained in:
parent
95e861c5b1
commit
1ee96fc3e9
@ -104,6 +104,18 @@ namespace GameRes.Utility
|
|||||||
{
|
{
|
||||||
return GetCString (data, index, length_limit, Encodings.cp932);
|
return GetCString (data, index, length_limit, Encodings.cp932);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static uint RotR (uint v, int count)
|
||||||
|
{
|
||||||
|
count &= 0x1F;
|
||||||
|
return v >> count | v << (32-count);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static uint RotL (uint v, int count)
|
||||||
|
{
|
||||||
|
count &= 0x1F;
|
||||||
|
return v << count | v >> (32-count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class BigEndian
|
public static class BigEndian
|
||||||
|
Loading…
x
Reference in New Issue
Block a user