StyleCop clean AudLoader

This commit is contained in:
Matthias Mailänder
2013-08-04 08:32:01 +02:00
parent 0cfe7e2a06
commit 6436ccd431

View File

@@ -44,8 +44,8 @@ namespace OpenRA.FileFormats
public static class AudLoader public static class AudLoader
{ {
static int[] IndexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 }; static int[] indexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
static int[] StepTable = { static int[] stepTable = {
7, 8, 9, 10, 11, 12, 13, 14, 16, 7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, 21, 23, 25, 28, 31, 34, 37, 17, 19, 21, 23, 25, 28, 31, 34, 37,
41, 45, 50, 55, 60, 66, 73, 80, 88, 41, 45, 50, 55, 60, 66, 73, 80, 88,
@@ -62,14 +62,14 @@ namespace OpenRA.FileFormats
var sb = (b & 8) != 0; var sb = (b & 8) != 0;
b &= 7; b &= 7;
var delta = (StepTable[index] * b) / 4 + StepTable[index] / 8; var delta = (stepTable[index] * b) / 4 + stepTable[index] / 8;
if (sb) delta = -delta; if (sb) delta = -delta;
current += delta; current += delta;
if (current > short.MaxValue) current = short.MaxValue; if (current > short.MaxValue) current = short.MaxValue;
if (current < short.MinValue) current = short.MinValue; if (current < short.MinValue) current = short.MinValue;
index += IndexAdjust[b]; index += indexAdjust[b];
if (index < 0) index = 0; if (index < 0) index = 0;
if (index > 88) index = 88; if (index > 88) index = 88;