From 6dd569540385ba9ea814a5d534404a41987aed84 Mon Sep 17 00:00:00 2001 From: Eugene8388608 Date: Wed, 24 Nov 2021 00:29:42 +0300 Subject: [PATCH] Add files via upload --- colorchord2/main.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/colorchord2/main.c b/colorchord2/main.c index ec7a997..af1244f 100644 --- a/colorchord2/main.c +++ b/colorchord2/main.c @@ -516,18 +516,15 @@ int main( int argc, char **argv ) CNFGColor( LINE_COLOR ); // Let's draw the o-scope. - int thissoundhead = soundhead; - thissoundhead = ( thissoundhead - 1 + SOUNDCBSIZE ) % SOUNDCBSIZE; - int lasty = sound[ thissoundhead ] * 128 + 128; - thissoundhead = ( thissoundhead - 1 + SOUNDCBSIZE ) % SOUNDCBSIZE; - int thisy = sound[ thissoundhead ] * 128 + 128; - thissoundhead = ( thissoundhead - 1 + SOUNDCBSIZE ) % SOUNDCBSIZE; - for ( int i = 0; i < screenx; i++ ) + int thissoundhead = ( soundhead - 1 + SOUNDCBSIZE ) % SOUNDCBSIZE; + int lasty; + int thisy = sound[ thissoundhead ] * -128 + 128; + for ( int i = screenx - 1; i > 0; i-- ) { - CNFGTackSegment( i, lasty, i + 1, thisy ); lasty = thisy; - thisy = sound[ thissoundhead ] * 128 + 128; + thisy = sound[ thissoundhead ] * -128 + 128; thissoundhead = ( thissoundhead - 1 + SOUNDCBSIZE ) % SOUNDCBSIZE; + CNFGTackSegment( i, lasty, i - 1, thisy ); } }