mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(Binary): added RotR and RotL methods.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user