change entrypoint signature of all examples

This commit is contained in:
Corwin Kuiper 2021-05-22 21:22:44 +01:00
parent 5d4565b81e
commit c14dd2cd33
9 changed files with 27 additions and 27 deletions

View file

@ -1,12 +1,12 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
use agb::sound;
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let gba = agb::Gba::new();
gba.sound.enable();

View file

@ -1,5 +1,5 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
@ -10,8 +10,8 @@ struct Vector2D {
y: i32,
}
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let mut gba = agb::Gba::new();
let mut bitmap = gba.display.video.bitmap3();
let vblank = gba.display.vblank.get();

View file

@ -1,12 +1,12 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
use agb::display;
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let mut gba = agb::Gba::new();
let mut bitmap = gba.display.video.bitmap4();
let vblank = gba.display.vblank.get();

View file

@ -1,5 +1,5 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
use agb::{
@ -35,8 +35,8 @@ fn frame_ranger(count: u32, start: u32, end: u32, delay: u32) -> u32 {
((count / delay) % (end + 1 - start)) + start
}
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let map_as_grid: &[[u16; 32]; 32] = unsafe {
(&MAP_MAP as *const [u16; 1024] as *const [[u16; 32]; 32])
.as_ref()

View file

@ -1,5 +1,5 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
@ -10,8 +10,8 @@ struct Vector2D {
y: i32,
}
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let mut gba = agb::Gba::new();
let mut vblank = gba.display.vblank.get();
let mut input = agb::input::ButtonController::new();

View file

@ -1,9 +1,9 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let mut gba = agb::Gba::new();
let mut mgba = agb::mgba::Mgba::new().unwrap();

View file

@ -1,12 +1,12 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
use agb::display;
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let mut gba = agb::Gba::new();
let mut bitmap = gba.display.video.bitmap3();

View file

@ -1,11 +1,11 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
use agb::{display, syscall};
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let mut gba = agb::Gba::new();
let mut bitmap = gba.display.video.bitmap3();

View file

@ -1,12 +1,12 @@
#![no_std]
#![feature(start)]
#![no_main]
extern crate agb;
use agb::display::example_logo;
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub fn main() -> ! {
let mut gba = agb::Gba::new();
let mut gfx = gba.display.video.tiled0();