diff --git a/GameRes/Utility.cs b/GameRes/Utility.cs index f7c53052..c0ffc262 100644 --- a/GameRes/Utility.cs +++ b/GameRes/Utility.cs @@ -116,6 +116,18 @@ namespace GameRes.Utility count &= 0x1F; return v << count | v >> (32-count); } + + public static byte RotByteR (byte v, int count) + { + count &= 7; + return (byte)(v >> count | v << (8-count)); + } + + public static byte RotByteL (byte v, int count) + { + count &= 7; + return (byte)(v << count | v >> (8-count)); + } } public static class BigEndian