mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-22 15:16:40 +11:00
Use agb::fixnum rather than agb::number
This commit is contained in:
parent
fc6c575b88
commit
19f071fd5a
16 changed files with 37 additions and 13 deletions
|
@ -1,8 +1,8 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use agb::fixnum::Num;
|
||||
use agb::input::{Button, ButtonController, Tri};
|
||||
use agb::number::Num;
|
||||
use agb::sound::mixer::SoundChannel;
|
||||
use agb::{include_wav, Gba};
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
use agb::{
|
||||
display::example_logo,
|
||||
fixnum::FixedNum,
|
||||
interrupt::{Interrupt, Mutex},
|
||||
number::FixedNum,
|
||||
};
|
||||
|
||||
struct BackCosines {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use core::ops::Index;
|
||||
|
||||
use crate::{
|
||||
fixnum::{Rect, Vector2D},
|
||||
memory_mapped::{MemoryMapped, MemoryMapped1DArray},
|
||||
number::{Rect, Vector2D},
|
||||
};
|
||||
|
||||
use super::{
|
||||
|
|
|
@ -2,8 +2,8 @@ use core::cell::RefCell;
|
|||
|
||||
use super::{palette16, Priority, DISPLAY_CONTROL};
|
||||
use crate::bitarray::Bitarray;
|
||||
use crate::fixnum::Vector2D;
|
||||
use crate::memory_mapped::MemoryMapped1DArray;
|
||||
use crate::number::Vector2D;
|
||||
|
||||
type AffineLoan<'a> = crate::arena::Loan<'a, 32>;
|
||||
type AffineArena = crate::arena::Arena<32>;
|
||||
|
|
|
@ -152,7 +152,7 @@ mod memory_mapped;
|
|||
/// Implements logging to the mgba emulator.
|
||||
pub mod mgba;
|
||||
/// Implementation of fixnums for working with non-integer values.
|
||||
pub use agb_fixnum as number;
|
||||
pub use agb_fixnum as fixnum;
|
||||
mod single;
|
||||
/// Implements sound output.
|
||||
pub mod sound;
|
||||
|
|
|
@ -4,7 +4,7 @@ mod sw_mixer;
|
|||
pub use sw_mixer::ChannelId;
|
||||
pub use sw_mixer::Mixer;
|
||||
|
||||
use crate::number::Num;
|
||||
use crate::fixnum::Num;
|
||||
use crate::timer::Timer;
|
||||
|
||||
#[non_exhaustive]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use super::hw;
|
||||
use super::hw::LeftOrRight;
|
||||
use super::{SoundChannel, SoundPriority};
|
||||
use crate::number::Num;
|
||||
use crate::fixnum::Num;
|
||||
use crate::timer::Timer;
|
||||
|
||||
// Defined in mixer.s
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use core::arch::asm;
|
||||
|
||||
use crate::display::object::AffineMatrixAttributes;
|
||||
use crate::number::Num;
|
||||
use crate::fixnum::Num;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
|
||||
|
|
8
book/games/pong/Cargo.lock
generated
8
book/games/pong/Cargo.lock
generated
|
@ -12,12 +12,20 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
|
|||
name = "agb"
|
||||
version = "0.8.0"
|
||||
dependencies = [
|
||||
"agb_fixnum",
|
||||
"agb_image_converter",
|
||||
"agb_macros",
|
||||
"agb_sound_converter",
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "agb_fixnum"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"agb_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "agb_image_converter"
|
||||
version = "0.6.0"
|
||||
|
|
8
examples/the-hat-chooses-the-wizard/Cargo.lock
generated
8
examples/the-hat-chooses-the-wizard/Cargo.lock
generated
|
@ -12,12 +12,20 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
|
|||
name = "agb"
|
||||
version = "0.8.0"
|
||||
dependencies = [
|
||||
"agb_fixnum",
|
||||
"agb_image_converter",
|
||||
"agb_macros",
|
||||
"agb_sound_converter",
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "agb_fixnum"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"agb_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "agb_image_converter"
|
||||
version = "0.6.0"
|
||||
|
|
|
@ -170,7 +170,7 @@ mod tiled_export {
|
|||
&mut writer,
|
||||
r#"
|
||||
use crate::Level;
|
||||
use agb::number::Vector2D;
|
||||
use agb::fixnum::Vector2D;
|
||||
|
||||
pub const fn get_level() -> Level {{
|
||||
Level {{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use super::{object_tiles, sfx::SfxPlayer, Entity, FixedNumberType, HatState, Level};
|
||||
use agb::{
|
||||
display::object::{ObjectControl, Size},
|
||||
number::Vector2D,
|
||||
fixnum::Vector2D,
|
||||
};
|
||||
|
||||
enum UpdateState {
|
||||
|
|
|
@ -109,8 +109,8 @@ use agb::{
|
|||
object::{ObjectControl, ObjectStandard, Size},
|
||||
Priority, HEIGHT, WIDTH,
|
||||
},
|
||||
fixnum::{FixedNum, Vector2D},
|
||||
input::{self, Button, ButtonController},
|
||||
number::{FixedNum, Vector2D},
|
||||
};
|
||||
|
||||
type FixedNumberType = FixedNum<10>;
|
||||
|
|
8
examples/the-purple-night/Cargo.lock
generated
8
examples/the-purple-night/Cargo.lock
generated
|
@ -12,12 +12,20 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
|
|||
name = "agb"
|
||||
version = "0.8.0"
|
||||
dependencies = [
|
||||
"agb_fixnum",
|
||||
"agb_image_converter",
|
||||
"agb_macros",
|
||||
"agb_sound_converter",
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "agb_fixnum"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"agb_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "agb_image_converter"
|
||||
version = "0.6.0"
|
||||
|
|
|
@ -16,8 +16,8 @@ use agb::{
|
|||
object::{ObjectControl, ObjectStandard},
|
||||
Priority, HEIGHT, WIDTH,
|
||||
},
|
||||
fixnum::{FixedNum, Rect, Vector2D},
|
||||
input::{Button, ButtonController, Tri},
|
||||
number::{FixedNum, Rect, Vector2D},
|
||||
};
|
||||
use generational_arena::Arena;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use super::rng::get_random;
|
||||
use agb::number::Num;
|
||||
use agb::fixnum::Num;
|
||||
use agb::sound::mixer::{ChannelId, Mixer, SoundChannel};
|
||||
|
||||
const BAT_DEATH: &[u8] = agb::include_wav!("sfx/BatDeath.wav");
|
||||
|
|
Loading…
Add table
Reference in a new issue