I can''t for the life of me figure out what''s wrong with this code, but I haven''t dealt with bitwise operations in a while so I''m probably a little rusty

.
void MenuMan::Menu(float cx, float cy, unsigned int t_color, unsigned int m_color, unsigned int s_color, char * stuff) {
...
t_r = (unsigned char) (t_color & 0xFF0000) >> 16;
t_g = (unsigned char) (t_color & 0x00FF00) >> 8;
t_b = (unsigned char) (t_color & 0x0000FF);
m_r = (unsigned char) (m_color & 0xFF0000) >> 16;
m_g = (unsigned char) (m_color & 0x00FF00) >> 8;
m_b = (unsigned char) (m_color & 0x0000FF);
s_r = (unsigned char) (s_color & 0xFF0000) >> 16;
s_g = (unsigned char) (s_color & 0x00FF00) >> 8;
s_b = (unsigned char) (s_color & 0x0000FF);
...
}
and in use...
Menu.Menu(0.0f, 0.0f, 0xFF0000, 0x00FF00, 0xFFFFFF, "New Game?\nOne Player\nTwo Player\nCancel");
I know the rest of the code works if I use constant values (which it would be anyway, but I like having the flexibility of using variable colors). Obviously t_x, m_x, and s_x are member variables of MenuMan. This code only seems to work if the color being used is white (causing it to only show the selected item on the menu). Hmmmmmmmmm...
_____________________________
And the Phoenix shall rise from the ashes...
--Thunder_Hawk -- ¦þ
______________________________