From ee82bc5705df1547dc3d5216c5866012c49b779d Mon Sep 17 00:00:00 2001 From: koniifer Date: Sat, 16 Nov 2024 09:30:43 +0000 Subject: [PATCH] minor changes --- Cargo.lock | 10 +++++----- sysdata/libraries/stn/src/memory.hb | 4 ++-- sysdata/programs/render_example/src/examples/orbit.hb | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17a86d6..1e7ac8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -228,12 +228,12 @@ dependencies = [ [[package]] name = "hbbytecode" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#7058efe75c7ad245db80986e77a97d426b9be8a4" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#baa70d3f1272c2cbb208ca17115dc54b7d31af5c" [[package]] name = "hblang" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#7058efe75c7ad245db80986e77a97d426b9be8a4" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#baa70d3f1272c2cbb208ca17115dc54b7d31af5c" dependencies = [ "hashbrown 0.15.1", "hbbytecode", @@ -245,7 +245,7 @@ dependencies = [ [[package]] name = "hbvm" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#7058efe75c7ad245db80986e77a97d426b9be8a4" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#baa70d3f1272c2cbb208ca17115dc54b7d31af5c" dependencies = [ "hbbytecode", ] @@ -428,9 +428,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.162" +version = "0.2.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" +checksum = "1fdaeca4cf44ed4ac623e86ef41f056e848dbeab7ec043ecb7326ba300b36fd0" [[package]] name = "limine" diff --git a/sysdata/libraries/stn/src/memory.hb b/sysdata/libraries/stn/src/memory.hb index 03a6cfe..609104c 100644 --- a/sysdata/libraries/stn/src/memory.hb +++ b/sysdata/libraries/stn/src/memory.hb @@ -6,7 +6,7 @@ $uninit := fn($Expr: type): ?Expr { return null } -dangling := fn($Expr: type): ^Expr { +$dangling := fn($Expr: type): ^Expr { return @bitcast(@alignof(Expr)) } @@ -23,7 +23,7 @@ alloc := fn($Expr: type, num: uint): ^Expr { ptr := request_page(MAX_ALLOC) remaining := pages - MAX_ALLOC loop if remaining < MAX_ALLOC break else { - _ = request_page(@intcast(MAX_ALLOC)) + _ = request_page(MAX_ALLOC) remaining -= MAX_ALLOC } _ = request_page(@intcast(remaining)) diff --git a/sysdata/programs/render_example/src/examples/orbit.hb b/sysdata/programs/render_example/src/examples/orbit.hb index 84b47e3..b83d1d4 100644 --- a/sysdata/programs/render_example/src/examples/orbit.hb +++ b/sysdata/programs/render_example/src/examples/orbit.hb @@ -25,7 +25,6 @@ example := fn(): void { render.clear(screen, render.black) render.put_filled_circle(screen, .(screen.width / 2, screen.height / 2), 128, render.light_yellow) render.put_circle(screen, .(screen.width / 2, screen.height / 2), 256, render.light_blue) - // Precision issues? render.put_textured_circle(screen, able, .(able.width / 2, able.height / 2), .(screen.width / 2 + @intcast(@fti(sin(angle) * 256)), screen.height / 2 + @intcast(@fti(cos(angle) * 256))), able.width / 2 - 1) render.put_textured_circle(screen, mini, .(mini.width / 2, mini.height / 2), .(screen.width / 2 + @intcast(@fti(sin(angle + PI) * 256)), screen.height / 2 + @intcast(@fti(cos(angle + PI) * 256))), mini.width / 2 - 1) render.sync(screen)