2021-03-07 04:58:59 +11:00
|
|
|
#![no_std]
|
|
|
|
#![feature(start)]
|
|
|
|
|
2021-04-16 07:10:00 +10:00
|
|
|
extern crate agb;
|
|
|
|
use agb::{display, syscall};
|
2021-03-07 04:58:59 +11:00
|
|
|
|
|
|
|
#[start]
|
|
|
|
fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
2021-04-16 07:10:00 +10:00
|
|
|
let mut gba = agb::Gba::new();
|
2021-03-08 12:59:54 +11:00
|
|
|
let mut bitmap = gba.display.video.bitmap3();
|
2021-03-07 04:58:59 +11:00
|
|
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|