123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|416|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Art and Sound -> color differences?

Sat, 21 Aug 2010, 15:34
spinal
I'm struggling to get my head around this, maybe because Im tired but...

I have 3 colour values, one is my background pixel, one is my main colour the other is I guess best described as an alpha value. I'm trying to draw an image in my main colour using my alpha image as the mask.

but my brain isn't working right now.
I'm doing this on the DS, so the colour values are 0-31, my alpha values are currently 0-255.

so if I have a bg pixel of 31,0,12, a main colour of say 0,0,0 and an alpha value of 127. I know in my head its going to result in a value of about 15,0,6, I can see that, but how to I work it out?

-=-=-
Check out my excellent homepage!
Sat, 21 Aug 2010, 15:39
JL235
There are much faster ways of mixing values, however this should mix two values together:

Usage...

Sat, 21 Aug 2010, 16:11
Jayenkai
As DD says, but go up first, then divide down.. The ARM on the DS is a bit naff at low floating-point numbers, and things get a little quirky.

-=-=-
''Load, Next List!''
Sun, 29 Aug 2010, 07:26
spinal
OK, I'm going to paste this code here, because, as some of you know, I have a terrible habit of losing stuff and just plain forgetting how to do it.



That way, one day in the future, I can come back and remember what I did today.

-=-=-
Check out my excellent homepage!
Sun, 29 Aug 2010, 07:50
Jayenkai
You'll never find it
Sun, 29 Aug 2010, 08:00
CodersRule
socoder.com/index.php?notepad=0
"This is your own personal Notepad.
Use it for storing any kind of text/code/links that you might need at a later date."
Not like you'll ever find that again.