fixed invariants to conform oscilloscope border
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@954 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -727,10 +727,10 @@ GetSoundData (void *data)
|
|||||||
|
|
||||||
s = *(SWORD*) (&sbuffer[pos]);
|
s = *(SWORD*) (&sbuffer[pos]);
|
||||||
s = (s / 1360) + (RADAR_HEIGHT >> 1);
|
s = (s / 1360) + (RADAR_HEIGHT >> 1);
|
||||||
if (s < 0)
|
if (s < 1)
|
||||||
s = 0;
|
s = 1;
|
||||||
else if (s >= RADAR_HEIGHT)
|
else if (s > RADAR_HEIGHT - 2)
|
||||||
s = RADAR_HEIGHT - 1;
|
s = RADAR_HEIGHT - 2;
|
||||||
scopedata[i] = (UBYTE) s;
|
scopedata[i] = (UBYTE) s;
|
||||||
|
|
||||||
pos += 2;
|
pos += 2;
|
||||||
@@ -800,10 +800,10 @@ GetSoundData (void *data)
|
|||||||
s = (*(SWORD*)(&sbuffer[pos])) + (*(SWORD*)(&sbuffer[pos + 2]));
|
s = (*(SWORD*)(&sbuffer[pos])) + (*(SWORD*)(&sbuffer[pos + 2]));
|
||||||
|
|
||||||
s = (s / 1800) + (RADAR_HEIGHT >> 1);
|
s = (s / 1800) + (RADAR_HEIGHT >> 1);
|
||||||
if (s < 0)
|
if (s < 1)
|
||||||
s = 0;
|
s = 1;
|
||||||
else if (s >= RADAR_HEIGHT)
|
else if (s > RADAR_HEIGHT - 2)
|
||||||
s = RADAR_HEIGHT - 1;
|
s = RADAR_HEIGHT - 2;
|
||||||
scopedata[i] = (UBYTE) s;
|
scopedata[i] = (UBYTE) s;
|
||||||
|
|
||||||
pos += step;
|
pos += step;
|
||||||
|
|||||||
Reference in New Issue
Block a user