fix PBS gfx clear syscall binding
This commit is contained in:
parent
e32c31a9d3
commit
06f92f808d
@ -28,10 +28,6 @@ declare host LowGfx {
|
||||
[Host(module = "gfx", name = "draw_text", version = 1)]
|
||||
[Capability(name = "gfx")]
|
||||
fn draw_text(x: int, y: int, message: str, color: Color) -> void;
|
||||
|
||||
[Host(module = "gfx", name = "clear_565", version = 1)]
|
||||
[Capability(name = "gfx")]
|
||||
fn clear_565(color_565: int) -> void;
|
||||
}
|
||||
|
||||
declare service Gfx
|
||||
@ -70,9 +66,4 @@ declare service Gfx
|
||||
{
|
||||
LowGfx.draw_text(x, y, message, color);
|
||||
}
|
||||
|
||||
fn clear_565(color_565: int) -> void
|
||||
{
|
||||
LowGfx.clear_565(color_565);
|
||||
}
|
||||
}
|
||||
|
||||
@ -977,12 +977,13 @@ class PBSFrontendPhaseServiceTest {
|
||||
final var sourceFile = modulePath.resolve("source.pbs");
|
||||
final var modBarrel = modulePath.resolve("mod.barrel");
|
||||
Files.writeString(sourceFile, """
|
||||
import { Color } from @core:color;
|
||||
import { Gfx } from @sdk:gfx;
|
||||
|
||||
[Frame]
|
||||
fn frame() -> void
|
||||
{
|
||||
Gfx.clear_565(6577);
|
||||
Gfx.clear(new Color(6577));
|
||||
}
|
||||
""");
|
||||
Files.writeString(modBarrel, "pub fn frame() -> void;");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user