diff --git a/sysdata/programs/horizon/src/main.hb b/sysdata/programs/horizon/src/main.hb index 3c7c6317..ada7eeda 100644 --- a/sysdata/programs/horizon/src/main.hb +++ b/sysdata/programs/horizon/src/main.hb @@ -3,9 +3,37 @@ stn := @use("../../../libraries/stn/src/lib.hb"); horizon_api := @use("../../../libraries/horizon_api/src/lib.hb") +render := @use("../../../libraries/render/src/lib.hb"); +.{Vec2} := @use("../../../libraries/stn/src/lib.hb").math + +Window := struct { + // TODO: Replace this with widgets + // implicit_framebuffer: + width: int, + height: int, + x: int, + y: int, +} + main := fn(): int { a := buffer.create("XHorizon\0") + screen := render.init(true) + + image := render.new_surface(screen.width / 3, screen.height / 3) + + pos := Vec2(int).(100, 100) + loop { + // Clear the screen + render.clear(screen, render.black) + + // TODO: Get windows out of the hashmap + render.clear(image, render.white) + + // Apply the image to the screen + render.put_surface(screen, image, pos) + // Sync the screen + render.sync(screen) } return 0 diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index e5deef95..835b3fda 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -31,17 +31,17 @@ resolution = "1024x768x24" # [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_test] # path = "boot:///serial_driver_test.hbf" -# [boot.limine.ableos.modules.horizon] -# path = "boot:///horizon.hbf" +[boot.limine.ableos.modules.horizon] +path = "boot:///horizon.hbf" -# [boot.limine.ableos.modules.horizon_testing_program] -# path = "boot:///horizon_testing_program.hbf" +[boot.limine.ableos.modules.horizon_testing_program] +path = "boot:///horizon_testing_program.hbf" # [boot.limine.ableos.modules.dt_buffer_test] # path = "boot:///dt_buffer_test.hbf"