fix PBS gfx clear syscall binding

This commit is contained in:
bQUARKz 2026-05-24 09:24:48 +01:00
parent e32c31a9d3
commit 06f92f808d
Signed by: bquarkz
SSH Key Fingerprint: SHA256:Z7dgqoglWwoK6j6u4QC87OveEq74WOhFN+gitsxtkf8
2 changed files with 2 additions and 10 deletions

View File

@ -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);
}
}

View File

@ -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;");