[shcode=cpp]
void Visuals:
rawRainbowHUD ( void )
{
// 'rainbow' is our hue
static float rainbow = 0.f;
rainbow += 0.003f;
if ( rainbow >= 1.f )
rainbow = 0.f;
// get the rainbow color from HSB
D3DCOLOR dwRainbowColor = g_pCore->GetGraphics ()->GetColorFromHSB ( rainbow, 1.f, 1.f );
// Loop through CHudColours and change each component
for ( int i = 0; i < 16; ++i )
{
*reinterpret_cast< DWORD* >( 0xBAB22C + ( sizeof ( DWORD ) * i ) ) = dwRainbowColor;
}
}
[/shcode]