Oscilloscope now has borders (bug #307 part 4) -Mika

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@951 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2003-05-11 00:13:41 +00:00
parent 059c8b56c0
commit 2f208af9d7
4 changed files with 8 additions and 7 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.3:
- Oscilloscope now has borders (bug #307 part 4) -Mika
- Flashing rects are no longer constrained to even-numbered pixels on the
y axis; fixes bug #255, from Nic
- Fixed minor glitches in main window borders (bug #307 parts 1,2,3) -Mika
Binary file not shown.

Before

Width:  |  Height:  |  Size: 955 B

After

Width:  |  Height:  |  Size: 1.2 KiB

+4 -4
View File
@@ -713,7 +713,7 @@ GetSoundData (void *data)
assert (pos >= 0);
for (i = 0; i < RADAR_WIDTH; ++i)
for (i = 0; i < RADAR_WIDTH - 2; ++i)
{
SDWORD s;
@@ -726,7 +726,7 @@ GetSoundData (void *data)
}
s = *(SWORD*) (&sbuffer[pos]);
s = (s / 1260) + (RADAR_HEIGHT >> 1);
s = (s / 1360) + (RADAR_HEIGHT >> 1);
if (s < 0)
s = 0;
else if (s >= RADAR_HEIGHT)
@@ -785,7 +785,7 @@ GetSoundData (void *data)
assert (pos >= 0);
for (i = 0; i < RADAR_WIDTH; ++i)
for (i = 0; i < RADAR_WIDTH - 2; ++i)
{
SDWORD s;
@@ -799,7 +799,7 @@ GetSoundData (void *data)
s = (*(SWORD*)(&sbuffer[pos])) + (*(SWORD*)(&sbuffer[pos + 2]));
s = (s / 1260) + (RADAR_HEIGHT >> 1);
s = (s / 1800) + (RADAR_HEIGHT >> 1);
if (s < 0)
s = 0;
else if (s >= RADAR_HEIGHT)
+3 -3
View File
@@ -24,7 +24,7 @@ static FRAMEPTR scope_frame;
static int scope_init = 0;
static TFB_Image *scope_bg = NULL;
static TFB_Image *scope_surf = NULL;
static UBYTE scope_data[RADAR_WIDTH];
static UBYTE scope_data[RADAR_WIDTH - 2];
void
InitOscilloscope (DWORD x, DWORD y, DWORD width, DWORD height, FRAME_DESC *f)
@@ -77,8 +77,8 @@ Oscilloscope (DWORD grab_data)
r = scope_surf->Palette[238].r;
g = scope_surf->Palette[238].g;
b = scope_surf->Palette[238].b;
for (i = 0; i < RADAR_WIDTH - 1; ++i)
TFB_DrawImage_Line (i, scope_data[i], i + 1, scope_data[i + 1], r, g, b, scope_surf);
for (i = 0; i < RADAR_WIDTH - 3; ++i)
TFB_DrawImage_Line (i + 1, scope_data[i], i + 2, scope_data[i + 1], r, g, b, scope_surf);
}
TFB_DrawImage_Image (scope_surf, 0, 0, 0, NULL, scope_frame->image);