Merge pull request #27 from corwinkuiper/entry-point

change entrypoint signature of all examples
This commit is contained in:
Corwin 2021-05-22 21:23:05 +01:00 committed by GitHub
commit fcc6328004
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 27 additions and 27 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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