Lens and similar effects, color quantification
@eZine
Published in
AbeDemoschool
· 7 Dec 2022
... make the code smaller. There are already 4 files involved: abedemo5.c This is the main program. mklens.c Calculates the tfm array. viewtga.c Used to show the background image. lens.asm Routines for steps 1, 2 and 3 in the algorithm above. Abedemo5.c #includes mklens.c and viewtga.c. Compile everything with: bcc -1 abedemo5.c lens.asm If you change the tfm array, the entire effect changes. Here are some cool transformations (D is both width and height): Invert area (flip in both x- and y-directions): for( ...