Update the purple night

This commit is contained in:
Gwilym Kuiper 2022-02-14 23:00:16 +00:00
parent 983b56975c
commit 2c01ed1690
2 changed files with 19 additions and 6 deletions

View file

@ -25,6 +25,7 @@ dependencies = [
"bare-metal",
"bitflags",
"hashbrown",
"rustc-hash",
]
[[package]]
@ -348,6 +349,12 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422"
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "serde"
version = "1.0.136"

View file

@ -45,9 +45,9 @@ impl<'a> Level<'a> {
mut clouds: InfiniteScrolledMap<'a>,
vram: &mut VRamManager,
) -> Self {
backdrop.init(vram, (8, 8).into());
foreground.init(vram, (8, 8).into());
clouds.init(vram, (2, 2).into());
backdrop.init(vram, (8, 8).into(), || {});
foreground.init(vram, (8, 8).into(), || {});
clouds.init(vram, (2, 2).into(), || {});
backdrop.commit();
foreground.commit();
@ -2156,7 +2156,9 @@ fn game_with_level(gba: &mut agb::Gba) {
(
tileset_ref,
TileSetting::from_raw(
tilemap::BACKGROUND_MAP[(pos.x + tilemap::WIDTH * pos.y) as usize],
*tilemap::BACKGROUND_MAP
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
.unwrap_or(&0),
),
)
}),
@ -2168,7 +2170,9 @@ fn game_with_level(gba: &mut agb::Gba) {
(
tileset_ref,
TileSetting::from_raw(
tilemap::FOREGROUND_MAP[(pos.x + tilemap::WIDTH * pos.y) as usize],
*tilemap::FOREGROUND_MAP
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
.unwrap_or(&0),
),
)
}),
@ -2180,7 +2184,9 @@ fn game_with_level(gba: &mut agb::Gba) {
(
tileset_ref,
TileSetting::from_raw(
tilemap::CLOUD_MAP[(pos.x + tilemap::WIDTH * pos.y) as usize],
*tilemap::CLOUD_MAP
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
.unwrap_or(&0),
),
)
}),