mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Merge pull request #176 from gwilymk/fix-clippy-lints-in-hat-chooses-wizard
Fix clippy lints for hat-chooses-wizard
This commit is contained in:
commit
60977b7d2d
|
@ -174,14 +174,14 @@ mod tiled_export {
|
||||||
|
|
||||||
pub const fn get_level() -> Level {{
|
pub const fn get_level() -> Level {{
|
||||||
Level {{
|
Level {{
|
||||||
background: &TILEMAP,
|
background: TILEMAP,
|
||||||
foreground: &BACKGROUND,
|
foreground: BACKGROUND,
|
||||||
dimensions: Vector2D {{x: WIDTH, y: HEIGHT}},
|
dimensions: Vector2D {{x: WIDTH, y: HEIGHT}},
|
||||||
collision: &crate::map_tiles::tilemap::TILE_DATA,
|
collision: crate::map_tiles::tilemap::TILE_DATA,
|
||||||
|
|
||||||
enemy_stops: &ENEMY_STOPS,
|
enemy_stops: ENEMY_STOPS,
|
||||||
slimes: &SLIMES,
|
slimes: SLIMES,
|
||||||
snails: &SNAILS,
|
snails: SNAILS,
|
||||||
start_pos: START_POS,
|
start_pos: START_POS,
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -19,7 +19,7 @@ pub struct Level {
|
||||||
}
|
}
|
||||||
|
|
||||||
mod object_tiles {
|
mod object_tiles {
|
||||||
pub const WIZARD_TILE_START: u16 = 0 * 4;
|
pub const WIZARD_TILE_START: u16 = 0;
|
||||||
pub const WIZARD_JUMP: u16 = 4 * 4;
|
pub const WIZARD_JUMP: u16 = 4 * 4;
|
||||||
pub const WIZARD_FALL_START: u16 = 5 * 4;
|
pub const WIZARD_FALL_START: u16 = 5 * 4;
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@ impl<'a> Player<'a> {
|
||||||
let hat_base_tile = match self.num_recalls {
|
let hat_base_tile = match self.num_recalls {
|
||||||
0 => object_tiles::HAT_TILE_START,
|
0 => object_tiles::HAT_TILE_START,
|
||||||
1 => object_tiles::HAT_TILE_START_SECOND,
|
1 => object_tiles::HAT_TILE_START_SECOND,
|
||||||
2 | _ => object_tiles::HAT_TILE_START_THIRD,
|
_ => object_tiles::HAT_TILE_START_THIRD,
|
||||||
};
|
};
|
||||||
|
|
||||||
match self.facing {
|
match self.facing {
|
||||||
|
@ -540,7 +540,7 @@ impl<'a> Player<'a> {
|
||||||
let hat_sprite_divider = match self.num_recalls {
|
let hat_sprite_divider = match self.num_recalls {
|
||||||
0 => 1,
|
0 => 1,
|
||||||
1 => 2,
|
1 => 2,
|
||||||
2 | _ => 4,
|
_ => 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
let hat_sprite_offset = timer / hat_sprite_divider % 10;
|
let hat_sprite_offset = timer / hat_sprite_divider % 10;
|
||||||
|
|
Loading…
Reference in a new issue