Browse Source

cosmetic

master
tonton th 2 years ago
parent
commit
7f4ac3b39b
  1. 7
      Fonderie/sfx.c
  2. 3
      Fonderie/singlepass.c

7
Fonderie/sfx.c

@ -48,11 +48,12 @@ return -1; @@ -48,11 +48,12 @@ return -1;
/* nouveau du premier dimanche de 2020 'nextgen' */
static int pixel_trinitron(FloatImg *pimg, int pos[4], float *fvals)
{
int x, y, off;
int x, y, pline, off;
for (y=pos[1]; y<pos[1]+pos[3]; y++) {
for (x=pos[0]+1; x<pos[0]+pos[2]-1; x++) {
off = (y*pimg->width) + x;
pline = y*pimg->width;
for (x=pos[0]+2; x<pos[0]+pos[2]-2; x++) {
off = pline + x;
pimg->R[off] = fvals[0];
pimg->G[off] = fvals[1];
pimg->B[off] = fvals[2];

3
Fonderie/singlepass.c

@ -104,7 +104,8 @@ fimg_destroy(&image); @@ -104,7 +104,8 @@ fimg_destroy(&image);
single_print_state("end of run :)", 0);
elapsed = fimg_timer_get(0);
fprintf(stderr, " %d frames, elapsed %.3f s, %.3f fps\n",
fprintf(stderr, "%s: %d frames, elapsed %.3f s, %.3f fps\n",
__func__,
globbuf.gl_pathc, elapsed,
(double)globbuf.gl_pathc/elapsed);

Loading…
Cancel
Save