forked from tTh/FloatImg
oups...
This commit is contained in:
parent
db05907447
commit
ce96b51ca4
|
@ -100,7 +100,7 @@ int random_blocks(FloatImg *picture, int percent)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
if ( (picture->width%16) || (picture->height%8) )
|
if ( (picture->width%16) || (picture->height%16) )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: %d%d bad dims\n", __func__,
|
fprintf(stderr, "%s: %d%d bad dims\n", __func__,
|
||||||
picture->width, picture->height);
|
picture->width, picture->height);
|
||||||
|
@ -173,9 +173,7 @@ h = picz->height; w = picz->width;
|
||||||
for (y=BB; y<h-BB; y++) {
|
for (y=BB; y<h-BB; y++) {
|
||||||
|
|
||||||
dy = (float)y * omega; /* normalize vertical position */
|
dy = (float)y * omega; /* normalize vertical position */
|
||||||
|
|
||||||
x = xpos + x_delta(dy, phi); /* add sinus deviation */
|
x = xpos + x_delta(dy, phi); /* add sinus deviation */
|
||||||
|
|
||||||
/* compute bounding box */
|
/* compute bounding box */
|
||||||
if ( (x>BB) && (x<w-BB) ) {
|
if ( (x>BB) && (x<w-BB) ) {
|
||||||
/* an make the glitch */
|
/* an make the glitch */
|
||||||
|
@ -184,7 +182,6 @@ for (y=BB; y<h-BB; y++) {
|
||||||
if (rand() & 8)
|
if (rand() & 8)
|
||||||
fimg_plot_rgb(picz, x-1, y, fv, fv, fv);
|
fimg_plot_rgb(picz, x-1, y, fv, fv, fv);
|
||||||
if (rand() & 8)
|
if (rand() & 8)
|
||||||
// XXX else
|
|
||||||
fimg_plot_rgb(picz, x+1, y, fv, fv, fv);
|
fimg_plot_rgb(picz, x+1, y, fv, fv, fv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue