Large bundle of OS X tweaks by Eric P. (basis of the 10.9-compatible
pre-release made in Dec. 2013): * Fix OS X 10.9 issue of current directory set by Finder to something else than folder where app bundle resides. * Some Mac OS X build / project changes & updates. * Adjustments to Mac OS X fontconfig config file, to avoid warnings and make things more robust. * Updates to some #include's to catch up with newer library revisions. * Tweaks to pixel read/write on Apple. * Introduction of 'intprt_t' casting to avoid warnings on x64. * Some additional debugging output. * Logging stderr & stdout to /tmp/tuxpaint.log Untested (I don't have a Mac!)
This commit is contained in:
parent
e5b2182c0a
commit
e990b48de7
14 changed files with 982 additions and 817 deletions
|
|
@ -140,11 +140,16 @@ static void do_alien_pixel(void * ptr, int which ATTRIBUTE_UNUSED,
|
|||
double temp2[3];
|
||||
int k;
|
||||
|
||||
SDL_GetRGB(api->getpixel(canvas,x, y), canvas->format, &temp[0], &temp[1], &temp[2]);
|
||||
SDL_GetRGB(api->getpixel(canvas,x, y), canvas->format, &temp[0], &temp[1], &temp[2]);
|
||||
for (k =0;k<3;k++){
|
||||
temp2[k] = clamp(0,127.5 * (1.0 + sin (((temp[k] / 127.5 - 1.0) * alien_FREQUENCY[k] + alien_ANGLE[k] / 180.0) * M_PI)),255);
|
||||
//EP temp2[k] = clamp(0,127.5 * (1.0 + sin (((temp[k] / 127.5 - 1.0) * alien_FREQUENCY[k] + alien_ANGLE[k] / 180.0) * M_PI)),255);
|
||||
temp2[k] = clamp(0.0,
|
||||
127.5 * (
|
||||
1.0 + sin (((temp[k] / 127.5 - 1.0) * alien_FREQUENCY[k] + alien_ANGLE[k] / 180.0) * M_PI)
|
||||
),
|
||||
255.0);
|
||||
}
|
||||
api->putpixel(canvas, x, y, SDL_MapRGB(canvas->format, temp2[0], temp2[1], temp2[2]));
|
||||
api->putpixel(canvas, x, y, SDL_MapRGB(canvas->format, temp2[0], temp2[1], temp2[2]));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue