2024-10-12 15:39:09 -05:00
|
|
|
.{Vec2, Image} := @use("lib.hb")
|
2024-09-14 05:26:32 -05:00
|
|
|
// .{pci, memory, string, log} := @use("../../stn/src/lib.hb");
|
2024-09-13 16:41:31 -05:00
|
|
|
|
|
|
|
Color := struct {b: u8, g: u8, r: u8, a: u8}
|
|
|
|
white := Color.(255, 255, 255, 255)
|
|
|
|
black := Color.(0, 0, 0, 255)
|
|
|
|
gray := Color.(127, 127, 127, 255)
|
|
|
|
red := Color.(0, 0, 205, 255)
|
|
|
|
green := Color.(0, 205, 0, 255)
|
|
|
|
yellow := Color.(0, 205, 205, 255)
|
|
|
|
blue := Color.(205, 0, 0, 255)
|
|
|
|
magenta := Color.(205, 0, 205, 255)
|
|
|
|
cyan := Color.(205, 205, 0, 255)
|
|
|
|
light_gray := Color.(229, 229, 229, 255)
|
|
|
|
light_red := Color.(0, 0, 255, 255)
|
|
|
|
light_green := Color.(0, 255, 0, 255)
|
|
|
|
light_yellow := Color.(0, 255, 255, 255)
|
|
|
|
light_blue := Color.(255, 0, 0, 255)
|
|
|
|
light_magenta := Color.(255, 0, 255, 255)
|
|
|
|
light_cyan := Color.(255, 255, 0, 255)
|
|
|
|
|
|
|
|
clear := fn(color: Color): void {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
width := fn(): int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
height := fn(): int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2024-10-12 15:39:09 -05:00
|
|
|
dimensions := fn(): Vec2(int) {
|
2024-09-13 16:41:31 -05:00
|
|
|
return .(0, 0)
|
|
|
|
}
|
|
|
|
|
2024-10-12 15:39:09 -05:00
|
|
|
put_pixel := fn(position: Vec2(int), color: Color): void {
|
2024-09-13 16:41:31 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-10-12 15:39:09 -05:00
|
|
|
put_filled_rect := fn(pos: Vec2(int), tr: Vec2(int), color: Color): void {
|
2024-09-13 16:41:31 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-10-12 15:39:09 -05:00
|
|
|
put_rect := fn(pos: Vec2(int), tr: Vec2(int), color: Color): void {
|
2024-09-13 16:41:31 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-10-12 15:39:09 -05:00
|
|
|
put_line_low := fn(p0: Vec2(int), p1: Vec2(int), color: Color): void {
|
2024-09-13 16:41:31 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
// do not use, use line() instead
|
2024-10-12 15:39:09 -05:00
|
|
|
put_line_high := fn(p0: Vec2(int), p1: Vec2(int), color: Color): void {
|
2024-09-13 16:41:31 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-10-12 15:39:09 -05:00
|
|
|
put_line := fn(p0: Vec2(int), p1: Vec2(int), color: Color): void {
|
2024-09-13 16:41:31 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
set_height := fn(new: int): void {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
set_width := fn(new: int): void {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-10-12 15:39:09 -05:00
|
|
|
set_dimensions := fn(new: Vec2(int)): void {
|
2024-09-13 16:41:31 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
sync := fn(): void {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
init := fn(): void {
|
|
|
|
return
|
2024-10-12 15:39:09 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
put_img := fn(img: Image, pos: Vec2(int)): void {
|
|
|
|
return
|
2024-09-13 16:41:31 -05:00
|
|
|
}
|