Move DarkenColor() to a proper source file.

This commit is contained in:
Bartosz Taudul 2022-07-24 01:29:06 +02:00
parent 27a98a3cc2
commit 755df94f45
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
3 changed files with 9 additions and 8 deletions

View File

@ -20,6 +20,14 @@ static tracy_force_inline uint32_t HighlightColor( uint32_t color )
( std::min<int>( 0xFF, ( ( ( color & 0x000000FF ) ) + V ) ) );
}
static tracy_force_inline uint32_t DarkenColor( uint32_t color )
{
return 0xFF000000 |
( ( ( ( color & 0x00FF0000 ) >> 16 ) * 2 / 3 ) << 16 ) |
( ( ( ( color & 0x0000FF00 ) >> 8 ) * 2 / 3 ) << 8 ) |
( ( ( ( color & 0x000000FF ) ) * 2 / 3 ) );
}
}
#endif

View File

@ -43,14 +43,6 @@ private:
bool m_active;
};
static tracy_force_inline uint32_t DarkenColor( uint32_t color )
{
return 0xFF000000 |
( ( ( ( color & 0x00FF0000 ) >> 16 ) * 2 / 3 ) << 16 ) |
( ( ( ( color & 0x0000FF00 ) >> 8 ) * 2 / 3 ) << 8 ) |
( ( ( ( color & 0x000000FF ) ) * 2 / 3 ) );
}
}
#endif

View File

@ -1,5 +1,6 @@
#include <inttypes.h>
#include "TracyColor.hpp"
#include "TracyFilesystem.hpp"
#include "TracyImGui.hpp"
#include "TracyMouse.hpp"