Merge pull request #2927 from karl-zylinski/raylib-color-fixed-array

Raylib: use fixed array instead of struct for rl.Color
This commit is contained in:
gingerBill
2023-11-07 10:47:28 +00:00
committed by GitHub
+3 -6
View File
@@ -245,12 +245,9 @@ when USE_LINALG {
}
// Color, 4 components, R8G8B8A8 (32bit)
Color :: struct {
r: u8, // Color red value
g: u8, // Color green value
b: u8, // Color blue value
a: u8, // Color alpha value
}
//
// Note: In Raylib this is a struct. But here we use a fixed array, so that .rgba swizzling etc work.
Color :: distinct [4]u8
// Rectangle type
Rectangle :: struct {