From 2f208af9d73039f20c44cd601e300e0df4f8e748 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Sun, 11 May 2003 00:13:41 +0000 Subject: [PATCH] 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 --- sc2/ChangeLog | 1 + sc2/content/lbm/activity.9.png | Bin 955 -> 1229 bytes sc2/src/sc2code/libs/sound/trackplayer.c | 8 ++++---- sc2/src/sc2code/oscill.c | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) 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 e122ed1f8bd43d57cf6a3003b2a132055ad56df2..6a415ccff158324aa363587f4d55100a48e7df75 100644 GIT binary patch delta 425 zcmdnZewK5BiXUfzM`SSr1Gg{;GcwGYBf-GHz>@Ch>&U>^HZ$+7TsV-gkn9oU%fOH~ zi-DnppMl}SHwK0_TLy*1?V zi-5CpTwI*|%L-8k21AoC6IsI;Sp;sHF#!oFMy8IOUIs>&ZSo+NG@R?!z@T)yA0z>m z1#zR59T+CQbq7hnxoZU#8b18`C?jVNG7V&8T<`Px4;d^R3Y&6)#0L5E6JNM5_@M>W z#guK+emK73#%czrZ3`dDMkWB=H8B^}bZa@7d){o}5^zYl%>g8yV_JSfFC3;2;t!zH s{E2n>iEkiFK{gv&tWn};V3A-@EI8$}bqe1vV3;#_y85}Sb4q9e05B1NxBvhE delta 149 zcmV;G0BZlu3A+c7Bn$&{LP=Bz2ngHZPvEg~4g-Av0d!JMQ~zz`H|qcZ09r{zK~#90 z?a{#r03ZwlKqu}f9j&7{gI_;UNvR?v5D=l1qs`5XY2ydUBsR(@ql|0CzWI%v%umKQcSH?#aBD8PE5}00000NkvXXu0mjf D@nk#3 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);