mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
sys/windows: change macro and add comment
This commit is contained in:
@@ -67,6 +67,8 @@ foreign gdi32 {
|
|||||||
PatBlt :: proc(hdc: HDC, x, y, w, h: c_int, rop: DWORD) -> BOOL ---
|
PatBlt :: proc(hdc: HDC, x, y, w, h: c_int, rop: DWORD) -> BOOL ---
|
||||||
}
|
}
|
||||||
|
|
||||||
RGB :: proc(r, g, b: u8) -> COLORREF {
|
// Windows colors are packed as ABGR
|
||||||
return COLORREF(COLORREF(r) | COLORREF(g) << 8 | COLORREF(b) << 16)
|
RGB :: #force_inline proc "contextless" (r, g, b: u8) -> COLORREF {
|
||||||
|
res: [4]u8 = {0, rgb.b, rgb.g, rgb.r}
|
||||||
|
return transmute(COLORREF)res
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user