mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-05 22:51:34 +11:00
20 lines
386 B
Rust
20 lines
386 B
Rust
#![no_std]
|
|
#![no_main]
|
|
|
|
use agb::{display, syscall};
|
|
|
|
#[agb::entry]
|
|
fn main(mut gba: agb::Gba) -> ! {
|
|
let mut bitmap = gba.display.video.bitmap3();
|
|
|
|
for x in 0..display::WIDTH {
|
|
let y = syscall::sqrt(x << 6);
|
|
let y = (display::HEIGHT - y).clamp(0, display::HEIGHT - 1);
|
|
bitmap.draw_point(x, y, 0x001F);
|
|
}
|
|
|
|
loop {
|
|
syscall::halt();
|
|
}
|
|
}
|