Skip to content

Commit

Permalink
Fix wave 6
Browse files Browse the repository at this point in the history
  • Loading branch information
lekernel committed Feb 17, 2010
1 parent 5cbaf2a commit 2ce0eb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions software/demo/rpipe.c
Expand Up @@ -364,11 +364,12 @@ static int wave_mode_6(struct wave_vertex *vertices)
// TODO: rotate/scale by wave_mystery

inc = (float)renderer_texsize/(float)nvertices;
offset = (float)renderer_texsize*bh_frame->wave_x;
offset = (float)renderer_texsize*(1.0-bh_frame->wave_x);
for(i=0;i<nvertices;i++) {
s = bh_frame->samples[8*i]/32768.0;
vertices[i].x = s*20.0*bh_frame->wave_scale+offset;
vertices[i].y = i*inc;
// nb: x and y reversed to simulate default rotation from wave_mystery
vertices[i].y = s*20.0*bh_frame->wave_scale+offset;
vertices[i].x = i*inc;
}

return nvertices;
Expand Down
8 changes: 4 additions & 4 deletions software/demo/ui.h
@@ -1,16 +1,16 @@
/*
* Milkymist VJ SoC (Software)
* Copyright (C) 2007, 2008, 2009 Sebastien Bourdeauducq
*
* Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
Expand Down

0 comments on commit 2ce0eb6

Please sign in to comment.