diff --git a/sc2/ChangeLog b/sc2/ChangeLog index bef91c18e..99781d1ac 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -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 diff --git a/sc2/content/lbm/activity.9.png b/sc2/content/lbm/activity.9.png index e122ed1f8..6a415ccff 100644 Binary files a/sc2/content/lbm/activity.9.png and b/sc2/content/lbm/activity.9.png differ diff --git a/sc2/src/sc2code/libs/sound/trackplayer.c b/sc2/src/sc2code/libs/sound/trackplayer.c index be24028be..1c83e88de 100644 --- a/sc2/src/sc2code/libs/sound/trackplayer.c +++ b/sc2/src/sc2code/libs/sound/trackplayer.c @@ -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) diff --git a/sc2/src/sc2code/oscill.c b/sc2/src/sc2code/oscill.c index d52e76f02..c5b37f2ee 100644 --- a/sc2/src/sc2code/oscill.c +++ b/sc2/src/sc2code/oscill.c @@ -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);