X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fscr%2Fbump.c;h=a595ba6824e518de78eca4a33b267d79d6244695;hp=b82594ba536a0e46b6a20395b2b7662bd182c0d4;hb=637ca39c29b03bd3a2beb99521753e83c043283f;hpb=b9ebecd3c02d5a5570d9b64190d76da78edb2d64 diff --git a/src/scr/bump.c b/src/scr/bump.c index b82594b..a595ba6 100644 --- a/src/scr/bump.c +++ b/src/scr/bump.c @@ -1,4 +1,4 @@ -// Bump effect (not moving yet of course, I have many ideas on this to commit before it's ready) +/* Bump effect (not moving yet of course, I have many ideas on this to commit before it's ready) */ #include #include @@ -64,8 +64,9 @@ static int init(void) const int particleLightSize = PARTICLE_LIGHT_WIDTH * PARTICLE_LIGHT_HEIGHT; const int fb_size = fb_width * fb_height; - // Just some parameters to temporary test the colors of 3 lights - // if every light uses it's own channel bits, it's better + /* Just some parameters to temporary test the colors of 3 lights + * if every light uses it's own channel bits, it's better + */ const float rgbMul[9] = { 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}; @@ -83,16 +84,16 @@ static int init(void) memset(bumpOffset, 0, sizeof(*bumpOffset) * fb_size); memset(particlePoint, 0, sizeof(*particlePoint) * NUM_PARTICLES); - // Create random junk + /* Create random junk */ for (i = 0; i < fb_size; i++) heightmap[i] = rand() & 255; - // Blur to smooth + /* Blur to smooth */ for (j = 0; j < numBlurs; j++) for (i = 0; i < fb_size; i++) heightmap[i] = (heightmap[abs((i - 1) % fb_size)] + heightmap[abs((i + 1) % fb_size)] + heightmap[abs((i - fb_width) % fb_size)] + heightmap[abs((i + fb_width) % fb_size)]) >> 2; - // Inclination precalculation + /* Inclination precalculation */ i = 0; for (y = 0; y < fb_height; y++) { @@ -116,7 +117,7 @@ static int init(void) } } - // Generate three lights + /* Generate three lights */ i = 0; for (y = 0; y < BIG_LIGHT_HEIGHT; y++) { @@ -315,7 +316,7 @@ static void draw(void) { memset(lightmap, 0, fb_width * fb_height * sizeof(*lightmap)); - //eraseLights(); + /*eraseLights();*/ animateLights(); renderLights();