Added rgb function
This commit is contained in:
@ -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{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user