mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Remove unsafe from examples
This commit is contained in:
parent
e9ce8cd2ad
commit
c4719a5ce0
|
@ -37,12 +37,10 @@ fn main(mut gba: agb::Gba) -> ! {
|
|||
.expect("Should contain colour 0x732b");
|
||||
|
||||
loop {
|
||||
let _background_color_transfer = unsafe {
|
||||
dma.hblank_transfer(
|
||||
let _background_color_transfer = dma.hblank_transfer(
|
||||
&vram.background_palette_colour_dma(0, background_colour_index),
|
||||
&colours,
|
||||
)
|
||||
};
|
||||
);
|
||||
|
||||
vblank.wait_for_vblank();
|
||||
}
|
||||
|
|
|
@ -34,8 +34,7 @@ fn main(mut gba: agb::Gba) -> ! {
|
|||
let mut frame = 0;
|
||||
|
||||
loop {
|
||||
let _x_scroll_transfer =
|
||||
unsafe { dma.hblank_transfer(&map.x_scroll_dma(), &offsets[frame..]) };
|
||||
let _x_scroll_transfer = dma.hblank_transfer(&map.x_scroll_dma(), &offsets[frame..]);
|
||||
|
||||
vblank.wait_for_vblank();
|
||||
frame += 1;
|
||||
|
|
|
@ -90,7 +90,7 @@ fn main(mut gba: agb::Gba) -> ! {
|
|||
window.commit();
|
||||
|
||||
let dma_controllable = window.win_in(WinIn::Win0).horizontal_position_dma();
|
||||
let _transfer = unsafe { dmas.dma0.hblank_transfer(&dma_controllable, &circle_poses) };
|
||||
let _transfer = dmas.dma0.hblank_transfer(&dma_controllable, &circle_poses);
|
||||
|
||||
vblank.wait_for_vblank();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue