implements PR026
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
[BuiltinType(name = "Color", version = 1)]
|
||||
declare builtin type Color(
|
||||
[Slot(index = 0)] pub r: int,
|
||||
[Slot(index = 1)] pub g: int,
|
||||
[Slot(index = 2)] pub b: int,
|
||||
[Slot(index = 3)] pub a: int
|
||||
) {
|
||||
[IntrinsicCall(name = "core.color.pack", version = 1)]
|
||||
fn pack() -> int;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
pub struct Color;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { Color } from @core:color;
|
||||
|
||||
declare host Gfx {
|
||||
[Host(module = "gfx", name = "draw_pixel", version = 1)]
|
||||
fn draw_pixel(x: int, y: int, color: Color) -> void;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
pub host Gfx;
|
||||
Reference in New Issue
Block a user