Post

 Resources 

Console


RE: Taking out Red, Green, and Blue from RGB Rag on a Stick (7 replies, 0 views) (2000-Sep-3)
-
Ok, I often get this wrong, but here goes Dim R as Integer Dim G as Integer Dim B as Integer Colour = Whatever R = Colour Mod 256 G = (Colour / 256) Mod 256 B = ((Colour / 256) / 256) Mod 256 Um, that could be optimised a lot, but for simplicity, it is that way, so suffer =) Yeah, some sort of bitshift would be quite appropriate here. Also, I think there are some DDraw functions, such as GetRed, GetGreen and GetBlue which might do it also, although I've never used them. hth


-
Up One Level | Back to Forum

Bitshifting? Almar Joling (6 replies) (2000-Sep-4)
Yep... Rag on a Stick (5 replies) (2000-Sep-5)
RE: Yep... Corre (4 replies) (2000-Sep-5)
RE: Yep... Almar Joling (3 replies) (2000-Sep-5)
RE: Yep... Corre (2 replies) (2000-Sep-5)
RE: Yep... Jay Wheeler (1 reply) (2000-Sep-5)
RE: Yep... Corre (0 replies) (2000-Sep-6)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 230 visitors within the last 20 minutes
RSS News Feed