diff --git a/examples/bitmap3.rs b/examples/bitmap3.rs index ddb15439..aa31aedf 100644 --- a/examples/bitmap3.rs +++ b/examples/bitmap3.rs @@ -1,9 +1,9 @@ #![no_std] #![feature(start)] -extern crate gba; +extern crate agb; -use gba::display; +use agb::display; struct Vector2D { x: i32, @@ -12,11 +12,11 @@ struct Vector2D { #[start] fn main(_argc: isize, _argv: *const *const u8) -> isize { - let mut gba = gba::Gba::new(); + let mut gba = agb::Gba::new(); let mut bitmap = gba.display.video.bitmap3(); let vblank = gba.display.vblank.get(); - let mut input = gba::input::ButtonController::new(); + let mut input = agb::input::ButtonController::new(); let mut pos = Vector2D { x: display::WIDTH / 2, y: display::HEIGHT / 2, diff --git a/examples/bitmap4.rs b/examples/bitmap4.rs index d06ced02..d04251ec 100644 --- a/examples/bitmap4.rs +++ b/examples/bitmap4.rs @@ -1,13 +1,13 @@ #![no_std] #![feature(start)] -extern crate gba; +extern crate agb; -use gba::display; +use agb::display; #[start] fn main(_argc: isize, _argv: *const *const u8) -> isize { - let mut gba = gba::Gba::new(); + let mut gba = agb::Gba::new(); let mut bitmap = gba.display.video.bitmap4(); let vblank = gba.display.vblank.get(); diff --git a/examples/chicken.rs b/examples/chicken.rs index d290dd44..f7c194ec 100644 --- a/examples/chicken.rs +++ b/examples/chicken.rs @@ -1,12 +1,12 @@ #![no_std] #![feature(start)] -extern crate gba; -use core::convert::TryInto; -use gba::{ +extern crate agb; +use agb::{ display::{object::ObjectStandard, tiled0, HEIGHT, WIDTH}, input::Button, }; +use core::convert::TryInto; #[derive(PartialEq, Eq)] enum State { @@ -43,10 +43,10 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize { .unwrap() }; - let mut gba = gba::Gba::new(); + let mut gba = agb::Gba::new(); let mut gfx = gba.display.video.tiled0(); let vblank = gba.display.vblank.get(); - let mut input = gba::input::ButtonController::new(); + let mut input = agb::input::ButtonController::new(); gfx.set_sprite_palette(&CHICKEN_PALETTE); gfx.set_sprite_tilemap(&CHICKEN_TILES); diff --git a/examples/multiple_video.rs b/examples/multiple_video.rs index 7321e384..b34da5b9 100644 --- a/examples/multiple_video.rs +++ b/examples/multiple_video.rs @@ -1,9 +1,9 @@ #![no_std] #![feature(start)] -extern crate gba; +extern crate agb; -use gba::display; +use agb::display; struct Vector2D { x: i32, @@ -12,9 +12,9 @@ struct Vector2D { #[start] fn main(_argc: isize, _argv: *const *const u8) -> isize { - let mut gba = gba::Gba::new(); + let mut gba = agb::Gba::new(); let mut vblank = gba.display.vblank.get(); - let mut input = gba::input::ButtonController::new(); + let mut input = agb::input::ButtonController::new(); loop { bitmap3_mode(&mut gba.display.video.bitmap3(), &mut vblank, &mut input); @@ -25,7 +25,7 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize { fn bitmap3_mode( bitmap: &mut display::bitmap3::Bitmap3, vblank: &mut display::vblank::VBlank, - input: &mut gba::input::ButtonController, + input: &mut agb::input::ButtonController, ) { let mut pos = Vector2D { x: display::WIDTH / 2, @@ -36,7 +36,7 @@ fn bitmap3_mode( vblank.wait_for_VBlank(); input.update(); - if input.is_just_pressed(gba::input::Button::B) { + if input.is_just_pressed(agb::input::Button::B) { break; } @@ -52,7 +52,7 @@ fn bitmap3_mode( fn bitmap4_mode( bitmap: &mut display::bitmap4::Bitmap4, vblank: &mut display::vblank::VBlank, - input: &mut gba::input::ButtonController, + input: &mut agb::input::ButtonController, ) { bitmap.set_palette_entry(1, 0x001F); bitmap.set_palette_entry(2, 0x03E0); @@ -75,7 +75,7 @@ fn bitmap4_mode( vblank.wait_for_VBlank(); input.update(); - if input.is_just_pressed(gba::input::Button::B) { + if input.is_just_pressed(agb::input::Button::B) { break; } diff --git a/examples/output.rs b/examples/output.rs index e0c6bf1c..24d18ff3 100644 --- a/examples/output.rs +++ b/examples/output.rs @@ -1,11 +1,11 @@ #![no_std] #![feature(start)] -extern crate gba; +extern crate agb; #[start] fn main(_argc: isize, _argv: *const *const u8) -> isize { - let mut gba = gba::Gba::new(); - let mut mgba = gba::mgba::Mgba::new().unwrap(); + let mut gba = agb::Gba::new(); + let mut mgba = agb::mgba::Mgba::new().unwrap(); let vblank = gba.display.vblank.get(); @@ -15,7 +15,7 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize { mgba.print( format_args!("Hello, world, frame = {}", count), - gba::mgba::DebugLevel::Info, + agb::mgba::DebugLevel::Info, ) .unwrap(); diff --git a/examples/panic.rs b/examples/panic.rs index 9dec5f41..5437e0aa 100644 --- a/examples/panic.rs +++ b/examples/panic.rs @@ -1,24 +1,24 @@ #![no_std] #![feature(start)] -extern crate gba; +extern crate agb; -use gba::display; +use agb::display; #[start] fn main(_argc: isize, _argv: *const *const u8) -> isize { - let mut gba = gba::Gba::new(); + let mut gba = agb::Gba::new(); let mut bitmap = gba.display.video.bitmap3(); - let mut input = gba::input::ButtonController::new(); + let mut input = agb::input::ButtonController::new(); loop { input.update(); // if A is pressed, draw out of range - if input.is_just_pressed(gba::input::Button::A) { + if input.is_just_pressed(agb::input::Button::A) { bitmap.draw_point(display::WIDTH, 0, 0x05); } - if input.is_just_pressed(gba::input::Button::B) { + if input.is_just_pressed(agb::input::Button::B) { #[allow(arithmetic_overflow)] let _p = core::i32::MAX + 1; } diff --git a/examples/syscall.rs b/examples/syscall.rs index ddec6530..65767b17 100644 --- a/examples/syscall.rs +++ b/examples/syscall.rs @@ -1,12 +1,12 @@ #![no_std] #![feature(start)] -extern crate gba; -use gba::{display, syscall}; +extern crate agb; +use agb::{display, syscall}; #[start] fn main(_argc: isize, _argv: *const *const u8) -> isize { - let mut gba = gba::Gba::new(); + let mut gba = agb::Gba::new(); let mut bitmap = gba.display.video.bitmap3(); for x in 0..display::WIDTH {