From 839f4e71e5247cf070c0f21abb3c6fa42167b369 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 13 Apr 2013 18:55:24 +0100 Subject: [PATCH] [Change] Modified plasma fractals a little. --- src/menu.c | 2 +- src/plasmaf.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/menu.c b/src/menu.c index 9f10fa0..bed2f5a 100644 --- a/src/menu.c +++ b/src/menu.c @@ -63,7 +63,7 @@ void menu_main(void) { unsigned int bwid, wid; glTexture* tex; - tex = pf_genFractal(gl_screen.w, gl_screen.h, 10.); + tex = pf_genFractal(gl_screen.w, gl_screen.h, 5.); // Create background image window. bwid = window_create("BG", -1, -1, gl_screen.w, gl_screen.h); diff --git a/src/plasmaf.c b/src/plasmaf.c index 7b6903e..2aea832 100644 --- a/src/plasmaf.c +++ b/src/plasmaf.c @@ -18,6 +18,7 @@ glTexture* pf_genFractal(const int w, const int h, double rug) { SDL_Surface* sur; uint32_t* pix; glTexture* tex; + double c; map = pf_genFractalMap(w, h, rug); @@ -27,9 +28,8 @@ glTexture* pf_genFractal(const int w, const int h, double rug) { // Convert from mapping to actual colours. SDL_LockSurface(sur); for(i = 0; i < h*w; i++) { - pix[i] = RMASK + BMASK + GMASK + (AMASK & (uint32_t)(AMASK*5000*map[i])); - //DEBUG("amask [%d]: %f [%u]", i, 1000*map[i], - //(AMASK & (uint32_t)(AMASK*1000*map[i]))); + c = map[i]; + pix[i] = RMASK + BMASK + GMASK + (AMASK & (uint32_t)(AMASK*c)); } SDL_UnlockSurface(sur);