mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-22 23:26:33 +11:00
Fix spelling errors in save
This commit is contained in:
parent
51a8ec4d95
commit
da0ea524d9
2 changed files with 8 additions and 8 deletions
|
@ -61,14 +61,14 @@ impl BufferData {
|
||||||
|
|
||||||
/// Reads a number from the input buffer.
|
/// Reads a number from the input buffer.
|
||||||
fn read_num(&mut self, off: usize, count: usize) -> u32 {
|
fn read_num(&mut self, off: usize, count: usize) -> u32 {
|
||||||
let mut accum = 0;
|
let mut accumulator = 0;
|
||||||
unsafe {
|
unsafe {
|
||||||
for i in 0..count {
|
for i in 0..count {
|
||||||
accum <<= 1;
|
accumulator <<= 1;
|
||||||
accum |= self.data.bits[off + i] as u32;
|
accumulator |= self.data.bits[off + i] as u32;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
accum
|
accumulator
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Receives a number of words into the input buffer.
|
/// Receives a number of words into the input buffer.
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
//! [`SaveManager::access_with_timer`] methods to create a new [`SaveData`]
|
//! [`SaveManager::access_with_timer`] methods to create a new [`SaveData`]
|
||||||
//! object. Its methods are used to read or write save media.
|
//! object. Its methods are used to read or write save media.
|
||||||
//!
|
//!
|
||||||
//! Reading data from the savegame is simple. Use [`read`] to copy data from an
|
//! Reading data from the save media is simple. Use [`read`] to copy data from an
|
||||||
//! offset in the savegame into a buffer in memory.
|
//! offset in the save media into a buffer in memory.
|
||||||
//!
|
//!
|
||||||
//! Writing to save media requires you to prepare the area for writing by
|
//! Writing to save media requires you to prepare the area for writing by
|
||||||
//! calling the [`prepare_write`] method to return a [`SavePreparedBlock`],
|
//! calling the [`prepare_write`] method to return a [`SavePreparedBlock`],
|
||||||
|
@ -185,7 +185,7 @@ fn set_save_implementation(access_impl: &'static dyn RawSaveAccess) {
|
||||||
let mut access = CURRENT_SAVE_ACCESS.lock();
|
let mut access = CURRENT_SAVE_ACCESS.lock();
|
||||||
assert!(
|
assert!(
|
||||||
access.is_none(),
|
access.is_none(),
|
||||||
"Cannot initialize the savegame engine more than once."
|
"Cannot initialize the save media engine more than once."
|
||||||
);
|
);
|
||||||
*access = Some(access_impl);
|
*access = Some(access_impl);
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ pub struct SaveData {
|
||||||
timeout: utils::Timeout,
|
timeout: utils::Timeout,
|
||||||
}
|
}
|
||||||
impl SaveData {
|
impl SaveData {
|
||||||
/// Creates a new save accessor around the current save implementaiton.
|
/// Creates a new save accessor around the current save implementation.
|
||||||
fn new(timer: Option<Timer>) -> Result<SaveData, Error> {
|
fn new(timer: Option<Timer>) -> Result<SaveData, Error> {
|
||||||
match get_save_implementation() {
|
match get_save_implementation() {
|
||||||
Some(access) => Ok(SaveData {
|
Some(access) => Ok(SaveData {
|
||||||
|
|
Loading…
Add table
Reference in a new issue