agb/template/src/main.rs

22 lines
422 B
Rust
Raw Normal View History

2021-05-23 06:24:00 +01:00
#![no_std]
#![no_main]
extern crate agb;
use agb::{display, syscall};
#[agb::entry]
2021-10-18 20:31:51 +01:00
fn main() -> ! {
2021-05-23 06:24:00 +01:00
let mut gba = agb::Gba::new();
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();
}
}