Added rgb function

This commit is contained in:
2021-11-24 10:41:04 -07:00
parent 6120807f92
commit 149cf2a9b4
2 changed files with 14 additions and 6 deletions

View File

@ -5,6 +5,10 @@ const minifb_c = @cImport({
});
const testing = std.testing;
pub fn rgb(r: u8, g: u8, b: u8) u32 {
return @intCast(u32, r) << 16 | @intCast(u32, g) << 8 | b;
}
pub const Window = struct{
cwin: *minifb_c.mfb_window,
@ -41,5 +45,5 @@ pub const Window = struct{
}
}
};