Re: Simple fader
Eduardo Uemura Okada wrote:
> This is a simple "fader" in/out screen I did.
> This uses the technique of turn palette colors to do impression of fading.
> I know it is simple basic, but if anyone can give a hand "turning off"
> that horrible red in the corners, without turn color 16 in palette (this
> makes the routine slower and ugly!), I'll like it.
> Enjoy!
> Comments and sugestions to
To get rid of the red, just change color 16 to black in the palette of
the bitmap using your paint program. If you are using paintbrush and are
serious about wanting to make your stuff how you want it to be then find
something that supports 256 color palettes.
here is my code for fading palette:
--code start
include graphics.e
include image.e
object junk
sequence pal,image
junk=read_bitmap("picture.bmp")
pal=junk[1]
image=junk[2]
junk=graphics_mode(19)
all_palette(pal*0) --this makes all colors black
display_image({0,0},image)
for i = 0 to 1 by .01 do
all_palette( (pal/4) * i )
end for
for i = 1 to 0 by -.01 do
all_palette( (pal/4) * i )
end for
--end of code.
--just tested it and it works fine.
--Augorian;
|
Not Categorized, Please Help
|
|