mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-26 00:56:38 +11:00
Update the purple night
This commit is contained in:
parent
983b56975c
commit
2c01ed1690
2 changed files with 19 additions and 6 deletions
7
examples/the-purple-night/Cargo.lock
generated
7
examples/the-purple-night/Cargo.lock
generated
|
@ -25,6 +25,7 @@ dependencies = [
|
||||||
"bare-metal",
|
"bare-metal",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
|
"rustc-hash",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -348,6 +349,12 @@ version = "1.0.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422"
|
checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustc-hash"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.136"
|
version = "1.0.136"
|
||||||
|
|
|
@ -45,9 +45,9 @@ impl<'a> Level<'a> {
|
||||||
mut clouds: InfiniteScrolledMap<'a>,
|
mut clouds: InfiniteScrolledMap<'a>,
|
||||||
vram: &mut VRamManager,
|
vram: &mut VRamManager,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
backdrop.init(vram, (8, 8).into());
|
backdrop.init(vram, (8, 8).into(), || {});
|
||||||
foreground.init(vram, (8, 8).into());
|
foreground.init(vram, (8, 8).into(), || {});
|
||||||
clouds.init(vram, (2, 2).into());
|
clouds.init(vram, (2, 2).into(), || {});
|
||||||
|
|
||||||
backdrop.commit();
|
backdrop.commit();
|
||||||
foreground.commit();
|
foreground.commit();
|
||||||
|
@ -2156,7 +2156,9 @@ fn game_with_level(gba: &mut agb::Gba) {
|
||||||
(
|
(
|
||||||
tileset_ref,
|
tileset_ref,
|
||||||
TileSetting::from_raw(
|
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,
|
tileset_ref,
|
||||||
TileSetting::from_raw(
|
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,
|
tileset_ref,
|
||||||
TileSetting::from_raw(
|
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),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Add table
Reference in a new issue