mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Fix spelling errors in hyperspace-roll
This commit is contained in:
parent
6eeb1d3203
commit
f6b5bb69b0
|
@ -280,12 +280,12 @@ pub(crate) fn customise_screen(
|
|||
}
|
||||
}
|
||||
CustomiseState::Upgrade => {
|
||||
let old_updade = cursor.upgrade;
|
||||
let old_upgrade = cursor.upgrade;
|
||||
cursor.upgrade = (cursor.upgrade as isize + ud as isize)
|
||||
.rem_euclid(upgrades.len() as isize) as usize;
|
||||
|
||||
if (upgrades[cursor.upgrade] as u32) < 17 {
|
||||
if cursor.upgrade != old_updade {
|
||||
if cursor.upgrade != old_upgrade {
|
||||
load_description(
|
||||
upgrades[cursor.upgrade] as usize,
|
||||
descriptions_map,
|
||||
|
|
|
@ -37,8 +37,8 @@ impl FaceSprites {
|
|||
const S_MALFUNCTION: &Sprite = SPRITES.tags().get("malfunction").sprite(0);
|
||||
const S_HEAL: &Sprite = SPRITES.tags().get("player_heal").sprite(0);
|
||||
const S_BYPASS: &Sprite = SPRITES.tags().get("shield bypass").sprite(0);
|
||||
const S_DOUBLESHOT: &Sprite = SPRITES.tags().get("double shoot").sprite(0);
|
||||
const S_TRIPLESHOT: &Sprite = SPRITES.tags().get("triple shoot").sprite(0);
|
||||
const S_DOUBLE_SHOT: &Sprite = SPRITES.tags().get("double shoot").sprite(0);
|
||||
const S_TRIPLE_SHOT: &Sprite = SPRITES.tags().get("triple shoot").sprite(0);
|
||||
const S_BLANK: &Sprite = SPRITES.tags().get("blank").sprite(0);
|
||||
const S_DISRUPT: &Sprite = SPRITES.tags().get("disruption").sprite(0);
|
||||
const S_MALFUNCTION_SHOOT: &Sprite = SPRITES.tags().get("malfunction shot").sprite(0);
|
||||
|
@ -57,8 +57,8 @@ impl FaceSprites {
|
|||
S_MALFUNCTION,
|
||||
S_HEAL,
|
||||
S_BYPASS,
|
||||
S_DOUBLESHOT,
|
||||
S_TRIPLESHOT,
|
||||
S_DOUBLE_SHOT,
|
||||
S_TRIPLE_SHOT,
|
||||
S_BLANK,
|
||||
S_DISRUPT,
|
||||
S_MALFUNCTION_SHOOT,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use agb::Gba;
|
||||
use agb::save::Error;
|
||||
use agb::sync::Static;
|
||||
use agb::Gba;
|
||||
|
||||
static HIGHSCORE: Static<u32> = Static::new(0);
|
||||
static HIGH_SCORE: Static<u32> = Static::new(0);
|
||||
|
||||
pub fn init_save(gba: &mut Gba) -> Result<(), Error> {
|
||||
gba.save.init_sram();
|
||||
|
@ -22,9 +22,9 @@ pub fn init_save(gba: &mut Gba) -> Result<(), Error> {
|
|||
let high_score = u32::from_le_bytes(buffer);
|
||||
|
||||
if high_score > 100 {
|
||||
HIGHSCORE.write(0)
|
||||
HIGH_SCORE.write(0)
|
||||
} else {
|
||||
HIGHSCORE.write(high_score)
|
||||
HIGH_SCORE.write(high_score)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,11 +32,14 @@ pub fn init_save(gba: &mut Gba) -> Result<(), Error> {
|
|||
}
|
||||
|
||||
pub fn load_high_score() -> u32 {
|
||||
HIGHSCORE.read()
|
||||
HIGH_SCORE.read()
|
||||
}
|
||||
|
||||
pub fn save_high_score(gba: &mut Gba, score: u32) -> Result<(), Error> {
|
||||
gba.save.access()?.prepare_write(1..5)?.write(1, &score.to_le_bytes())?;
|
||||
HIGHSCORE.write(score);
|
||||
gba.save
|
||||
.access()?
|
||||
.prepare_write(1..5)?
|
||||
.write(1, &score.to_le_bytes())?;
|
||||
HIGH_SCORE.write(score);
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue