#define SINE_MAX_X (4) #define SINE_OMEGA_X (0.1386) #define SINE_PHI_X (0) #define SINE_MAX_Y (4) #define SINE_OMEGA_Y (0.1248) #define SINE_PHI_Y (0) void catcha_reverse_sine_transform(catcha* cat) { int x,y,shift; // transform in x-direction for(y=0; y 0) { for(x=0; ximage[x][y] = (x+shiftimage[x+shift][y]:0xFF; } else { for(x=CATCHA_W-1; x>=0; x--) cat->image[x][y] = (x+shift>=0)?cat->image[x+shift][y]:0xFF; } cat->image[(CATCHA_W-6)-shift][y] = 0x01; } // transform in y-direction for(x=0; x 0) { for(y=0; yimage[x][y] = (y+shiftimage[x][y+shift]:0xFF; } else { for(y=CATCHA_H-1; y>=0; y--) cat->image[x][y] = (y+shift>=0)?cat->image[x][y+shift]:0xFF; } cat->image[x][(CATCHA_H-4)-shift] = 0x01; } }