Changed macro CLITERAL
This commit is contained in:
parent
9909c83012
commit
eed53a5b44
1 changed files with 27 additions and 28 deletions
55
src/raylib.h
55
src/raylib.h
|
@ -114,40 +114,39 @@
|
|||
// NOTE: MSC C++ compiler does not support compound literals (C99 feature)
|
||||
// Plain structures in C++ (without constructors) can be initialized from { } initializers.
|
||||
#if defined(__cplusplus)
|
||||
#define CLITERAL
|
||||
#define CLITERAL(type) type
|
||||
#else
|
||||
#define CLITERAL (Color)
|
||||
#define CLITERAL(type) (type)
|
||||
#endif
|
||||
|
||||
// Some Basic Colors
|
||||
// NOTE: Custom raylib color palette for amazing visuals on WHITE background
|
||||
#define LIGHTGRAY CLITERAL{ 200, 200, 200, 255 } // Light Gray
|
||||
#define GRAY CLITERAL{ 130, 130, 130, 255 } // Gray
|
||||
#define DARKGRAY CLITERAL{ 80, 80, 80, 255 } // Dark Gray
|
||||
#define YELLOW CLITERAL{ 253, 249, 0, 255 } // Yellow
|
||||
#define GOLD CLITERAL{ 255, 203, 0, 255 } // Gold
|
||||
#define ORANGE CLITERAL{ 255, 161, 0, 255 } // Orange
|
||||
#define PINK CLITERAL{ 255, 109, 194, 255 } // Pink
|
||||
#define RED CLITERAL{ 230, 41, 55, 255 } // Red
|
||||
#define MAROON CLITERAL{ 190, 33, 55, 255 } // Maroon
|
||||
#define GREEN CLITERAL{ 0, 228, 48, 255 } // Green
|
||||
#define LIME CLITERAL{ 0, 158, 47, 255 } // Lime
|
||||
#define DARKGREEN CLITERAL{ 0, 117, 44, 255 } // Dark Green
|
||||
#define SKYBLUE CLITERAL{ 102, 191, 255, 255 } // Sky Blue
|
||||
#define BLUE CLITERAL{ 0, 121, 241, 255 } // Blue
|
||||
#define DARKBLUE CLITERAL{ 0, 82, 172, 255 } // Dark Blue
|
||||
#define PURPLE CLITERAL{ 200, 122, 255, 255 } // Purple
|
||||
#define VIOLET CLITERAL{ 135, 60, 190, 255 } // Violet
|
||||
#define DARKPURPLE CLITERAL{ 112, 31, 126, 255 } // Dark Purple
|
||||
#define BEIGE CLITERAL{ 211, 176, 131, 255 } // Beige
|
||||
#define BROWN CLITERAL{ 127, 106, 79, 255 } // Brown
|
||||
#define DARKBROWN CLITERAL{ 76, 63, 47, 255 } // Dark Brown
|
||||
#define LIGHTGRAY CLITERAL(Color){ 200, 200, 200, 255 } // Light Gray
|
||||
#define GRAY CLITERAL(Color){ 130, 130, 130, 255 } // Gray
|
||||
#define DARKGRAY CLITERAL(Color){ 80, 80, 80, 255 } // Dark Gray
|
||||
#define YELLOW CLITERAL(Color){ 253, 249, 0, 255 } // Yellow
|
||||
#define GOLD CLITERAL(Color){ 255, 203, 0, 255 } // Gold
|
||||
#define ORANGE CLITERAL(Color){ 255, 161, 0, 255 } // Orange
|
||||
#define PINK CLITERAL(Color){ 255, 109, 194, 255 } // Pink
|
||||
#define RED CLITERAL(Color){ 230, 41, 55, 255 } // Red
|
||||
#define MAROON CLITERAL(Color){ 190, 33, 55, 255 } // Maroon
|
||||
#define GREEN CLITERAL(Color){ 0, 228, 48, 255 } // Green
|
||||
#define LIME CLITERAL(Color){ 0, 158, 47, 255 } // Lime
|
||||
#define DARKGREEN CLITERAL(Color){ 0, 117, 44, 255 } // Dark Green
|
||||
#define SKYBLUE CLITERAL(Color){ 102, 191, 255, 255 } // Sky Blue
|
||||
#define BLUE CLITERAL(Color){ 0, 121, 241, 255 } // Blue
|
||||
#define DARKBLUE CLITERAL(Color){ 0, 82, 172, 255 } // Dark Blue
|
||||
#define PURPLE CLITERAL(Color){ 200, 122, 255, 255 } // Purple
|
||||
#define VIOLET CLITERAL(Color){ 135, 60, 190, 255 } // Violet
|
||||
#define DARKPURPLE CLITERAL(Color){ 112, 31, 126, 255 } // Dark Purple
|
||||
#define BEIGE CLITERAL(Color){ 211, 176, 131, 255 } // Beige
|
||||
#define BROWN CLITERAL(Color){ 127, 106, 79, 255 } // Brown
|
||||
#define DARKBROWN CLITERAL(Color){ 76, 63, 47, 255 } // Dark Brown
|
||||
|
||||
#define WHITE CLITERAL{ 255, 255, 255, 255 } // White
|
||||
#define BLACK CLITERAL{ 0, 0, 0, 255 } // Black
|
||||
#define BLANK CLITERAL{ 0, 0, 0, 0 } // Blank (Transparent)
|
||||
#define MAGENTA CLITERAL{ 255, 0, 255, 255 } // Magenta
|
||||
#define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo)
|
||||
#define WHITE CLITERAL(Color){ 255, 255, 255, 255 } // White
|
||||
#define BLACK CLITERAL(Color){ 0, 0, 0, 255 } // Black
|
||||
#define BLANK CLITERAL(Color){ 0, 0, 0, 0 } // Blank (Transparent)
|
||||
#define MAGENTA CLITERAL(Color){ 255, 0, 255, 255 } // Magenta
|
||||
#define RAYWHITE CLITERAL(Color){ 245, 245, 245, 255 } // My own White (raylib logo)
|
||||
|
||||
// Temporal hack to avoid breaking old codebases using
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue