Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Вопрос Как сделать переливание цвета WallHack C++

C++:
Expand Collapse Copy
unsigned long long GetRainbowColor(float Speed, int Alpha = 255)
{
    unsigned long long Time = GetTickCount64();
    int Red = (int)(sinf(Speed * Time) * 127.0f + 128.0f);
    int Green = (int)(sinf(Speed * Time + (2.0f * IM_PI / 3.0f)) * 127.0f + 128.0f);
    int Blue = (int)(sinf(Speed * Time + (4.0f * IM_PI / 3.0f)) * 127.0f + 128.0f);
    return D3DCOLOR_ARGB(Alpha, Red, Green, Blue);
}

unsigned long long Color = GetRainbowColor(0.01f);
 
C++:
Expand Collapse Copy
unsigned long long GetRainbowColor(float Speed, int Alpha = 255)
{
    unsigned long long Time = GetTickCount64();
    int Red = (int)(sinf(Speed * Time) * 127.0f + 128.0f);
    int Green = (int)(sinf(Speed * Time + (2.0f * IM_PI / 3.0f)) * 127.0f + 128.0f);
    int Blue = (int)(sinf(Speed * Time + (4.0f * IM_PI / 3.0f)) * 127.0f + 128.0f);
    return D3DCOLOR_ARGB(Alpha, Red, Green, Blue);
}

unsigned long long Color = GetRainbowColor(0.01f);
спасибо
 
Назад
Сверху Снизу