123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|732|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> colour fading?

Mon, 14 May 2007, 05:42
spinal
I'm attempting to fade a palette to black (and later back again) but I seem to be doing something wrong. Can someone take a look and tell me?

If I set num_fade_frames to anything other than 60 it looks crap, perhaps i'm not calculating the step properly?



-=-=-
Check out my excellent homepage!
Mon, 14 May 2007, 05:58
Blitz3Dman
I'm looking at the code now and noticed you spelled close wrong in a comment for a delay command

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Mon, 14 May 2007, 06:03
spinal
The 'L' key on my laptop has been a bit of a pain lately, I usually notice when that happens.

-=-=-
Check out my excellent homepage!
Mon, 14 May 2007, 06:05
Blitz3Dman



I found the problem.

Many of your color values are less than num_fade_frames so that color does not fade. Here I replaced 120 with 51 and it works nicely. Although, I also had to change in your loop where you had For s=0 to num_fade_frames+1. The loop does the fading 2 more times than it should. It needs to be For s=1 to num_fade_frames.

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Mon, 14 May 2007, 06:12
spinal
Many of your color values are less than num_fade_frames so that color does not fade.


Any ideas on fixing that? besides changing the number of frames? This will be used on images etc, so I will have very little say in what the palette will be.

-=-=-
Check out my excellent homepage!
Mon, 14 May 2007, 06:25
Blitz3Dman
You'd have to go through the pallet and find the lowest value and use it probably

BTW
I found that you need to have instead of For s=1 to num_fade_frames you need to plop a -1 right at the end.

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Mon, 14 May 2007, 08:37
Jayenkai
Easiest way to solve it, is changing all the dimmed values to floats, instead. That way your maths works a little better.

Otherwise, try playing about with this.




-=-=-
''Load, Next List!''
Mon, 14 May 2007, 16:48
spinal
I thought of that while I was at work. I realized some of the smaller values would have steps of less than 1. Perhaps I should think more about work though, while I'm there.

-=-=-
Check out my excellent homepage!
Mon, 14 May 2007, 16:52
Jayenkai
Nah.. No point doing that.. You'd never get your fading working if you did that!

-=-=-
''Load, Next List!''
Mon, 14 May 2007, 17:20
spinal
It seems palib has a bitghtness setting for specific palettes, I might not need to learn anything after all. (I usually run ideas through blitz as I know basic a better than I know C, also its a bit quicker to see results). Anyway, I off to bed, it's tomorrow already.

-=-=-
Check out my excellent homepage!