mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Merge pull request #27 from corwinkuiper/entry-point
change entrypoint signature of all examples
This commit is contained in:
commit
fcc6328004
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue