forked from AbleOS/ableos
I am good at this/s
This commit is contained in:
parent
9e0a508a6f
commit
d19f15aa5c
14
Cargo.lock
generated
14
Cargo.lock
generated
|
@ -34,9 +34,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.91"
|
||||
version = "1.0.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8"
|
||||
checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13"
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
|
@ -253,12 +253,12 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "hbbytecode"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#da7cd5926c81c3ff34bab0bb5d31f029efee4ebb"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#38a00cbaa09434324d209fc5f59480d2b6743fb3"
|
||||
|
||||
[[package]]
|
||||
name = "hblang"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#da7cd5926c81c3ff34bab0bb5d31f029efee4ebb"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#38a00cbaa09434324d209fc5f59480d2b6743fb3"
|
||||
dependencies = [
|
||||
"hashbrown 0.15.0",
|
||||
"hbbytecode",
|
||||
|
@ -270,7 +270,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "hbvm"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#da7cd5926c81c3ff34bab0bb5d31f029efee4ebb"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#38a00cbaa09434324d209fc5f59480d2b6743fb3"
|
||||
dependencies = [
|
||||
"hbbytecode",
|
||||
]
|
||||
|
@ -677,9 +677,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.85"
|
||||
version = "2.0.86"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
|
||||
checksum = "e89275301d38033efb81a6e60e3497e734dfcc62571f2854bf4b16690398824c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
@ -75,7 +75,6 @@ impl Package {
|
|||
&path,
|
||||
Options {
|
||||
fmt: true,
|
||||
optimize: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut bytes,
|
||||
|
@ -84,7 +83,6 @@ impl Package {
|
|||
hblang::run_compiler(
|
||||
&path,
|
||||
Options {
|
||||
optimize: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut bytes,
|
||||
|
@ -101,7 +99,6 @@ impl Package {
|
|||
&path,
|
||||
Options {
|
||||
dump_asm: true,
|
||||
optimize: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut bytes,
|
||||
|
|
5
sysdata/libraries/mouse/src/mouse.hb
Normal file
5
sysdata/libraries/mouse/src/mouse.hb
Normal file
|
@ -0,0 +1,5 @@
|
|||
.{Vec2} := @
|
||||
|
||||
get_pos := fn(): Vec2(uint) {
|
||||
|
||||
}
|
|
@ -36,7 +36,7 @@ free_surface := fn(surface: Surface): void {
|
|||
return @inline(memory.free, Color, surface.buf, @intcast(surface.width * surface.height), false)
|
||||
}
|
||||
|
||||
framebuffer := @as(^Color, idk)
|
||||
framebuffer := @as(^Color, null)
|
||||
|
||||
init := fn(doublebuffer: bool): Surface {
|
||||
framebuffer = dt.get(^Color, "framebuffer/fb0/ptr\0")
|
||||
|
@ -162,7 +162,7 @@ put_line_high := fn(surface: Surface, p0: Vec2(uint), p1: Vec2(uint), color: Col
|
|||
}
|
||||
|
||||
put_line := fn(surface: Surface, p0: Vec2(uint), p1: Vec2(uint), color: Color): void {
|
||||
if math.abs(uint, p1.y - p0.y) < math.abs(uint, p1.x - p0.x) {
|
||||
if math.abs(uint, @intcast(@as(int, @intcast(p1.y)) - @as(int, @intcast(p0.y)))) < math.abs(uint, @intcast(@as(int, @intcast(p1.x)) - @as(int, @intcast(p0.x)))) {
|
||||
if p0.x > p1.x {
|
||||
@inline(put_line_low, surface, p1, p0, color)
|
||||
} else {
|
||||
|
@ -331,9 +331,9 @@ put_hline := fn(surface: Surface, y: uint, x0: uint, x1: uint, color: Color): vo
|
|||
}
|
||||
|
||||
put_tri := fn(surface: Surface, p0: Vec2(uint), p1: Vec2(uint), p2: Vec2(uint), color: Color): void {
|
||||
put_line(surface, p0, p1, color)
|
||||
put_line(surface, p1, p2, color)
|
||||
put_line(surface, p2, p0, color)
|
||||
@inline(put_line, surface, p0, p1, color)
|
||||
@inline(put_line, surface, p1, p2, color)
|
||||
@inline(put_line, surface, p2, p0, color)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ send_command := fn(command: u8): void {
|
|||
@inline(send_info, 0xD4)
|
||||
@inline(wait_for, 1)
|
||||
memory.outb(0x60, command)
|
||||
return
|
||||
}
|
||||
|
||||
get_response := fn(): u8 {
|
||||
|
@ -35,10 +34,10 @@ main := fn(): int {
|
|||
log.info("Aux mouse device enabled.\0")
|
||||
|
||||
send_command(0xF6)
|
||||
get_response()
|
||||
_ := get_response()
|
||||
|
||||
send_command(0xF4)
|
||||
get_response()
|
||||
_ = get_response()
|
||||
|
||||
loop {
|
||||
loop if (memory.inb(0x64) & 0x20) == 0x20 break
|
||||
|
|
|
@ -13,7 +13,7 @@ Vec3 := struct {x: int, y: int, z: int}
|
|||
vertecies := [Vec3].(.(-1, -1, -1), .(1, -1, -1), .(1, 1, -1), .(-1, 1, -1), .(-1, -1, 1), .(1, -1, 1), .(1, 1, 1), .(-1, 1, 1))
|
||||
projected := @as([Vec3; 8], idk)
|
||||
|
||||
faces := [Face].(Face.(0, 1, 2, WIREFRAME, .(255, 0, 0, 255), @as(^Surface, idk)))
|
||||
faces := [Face].(Face.(0, 1, 2, WIREFRAME, .(255, 0, 0, 255), null))
|
||||
|
||||
d := @as(int, 1)
|
||||
|
||||
|
@ -55,11 +55,15 @@ example := fn(): void {
|
|||
c := projected[face.c]
|
||||
|
||||
if face.mode == WIREFRAME {
|
||||
render.put_tri(screen, .(@intcast(0), @intcast(0)), .(@intcast(512), @intcast(128)), .(@intcast(256), @intcast(256)), face.color)
|
||||
//render.put_tri(screen, .(@intcast(0), @intcast(0)), .(@intcast(512), @intcast(128)), .(@intcast(256), @intcast(256)), .(255, 0, 0, 255))
|
||||
//face.color)
|
||||
}
|
||||
|
||||
index += 1
|
||||
}
|
||||
//render.put_line(screen, .(1, 1), .(512, 128), .(255, 0, 0, 255))
|
||||
//render.put_line(screen, .(256, 256), .(512, 128), .(255, 0, 0, 255))
|
||||
render.put_tri(screen, .(1, 1), .(512, 128), .(256, 256), .(255, 0, 0, 255))
|
||||
|
||||
//render.put_filled_tri(screen, .(128, 256), .(512, 512), .(10, 10), .(255, 255, 255, 255))
|
||||
render.sync(screen)
|
||||
|
|
|
@ -26,8 +26,8 @@ resolution = "1600x900x24"
|
|||
# [boot.limine.ableos.modules.diskio_driver]
|
||||
# path = "boot:///diskio_driver.hbf"
|
||||
|
||||
[boot.limine.ableos.modules.render_example]
|
||||
path = "boot:///render_example.hbf"
|
||||
# [boot.limine.ableos.modules.render_example]
|
||||
# path = "boot:///render_example.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.serial_driver]
|
||||
# path = "boot:///serial_driver.hbf"
|
||||
|
@ -56,8 +56,8 @@ path = "boot:///render_example.hbf"
|
|||
# [boot.limine.ableos.modules.pumpkin_print]
|
||||
# path = "boot:///pumpkin_print.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.mouse_driver]
|
||||
# path = "boot:///mouse_driver.hbf"
|
||||
[boot.limine.ableos.modules.mouse_driver]
|
||||
path = "boot:///mouse_driver.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.mouse_test]
|
||||
# path = "boot:///mouse_test.hbf"
|
||||
|
|
Loading…
Reference in a new issue