mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
22 lines
465 B
Rust
22 lines
465 B
Rust
#![no_std]
|
|
#![feature(start)]
|
|
|
|
extern crate gba;
|
|
use gba::{display, syscall};
|
|
|
|
#[start]
|
|
fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
|
let mut gba = gba::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();
|
|
}
|
|
}
|