mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Give purple night the deduplication treatment
This commit is contained in:
parent
54237c0fce
commit
6422ed63f1
|
@ -15,10 +15,7 @@ use alloc::{boxed::Box, vec::Vec};
|
||||||
use agb::{
|
use agb::{
|
||||||
display::{
|
display::{
|
||||||
object::{Graphics, OamManaged, Object, Sprite, Tag, TagMap},
|
object::{Graphics, OamManaged, Object, Sprite, Tag, TagMap},
|
||||||
tiled::{
|
tiled::{InfiniteScrolledMap, RegularBackgroundSize, TileFormat, TileSet, VRamManager},
|
||||||
InfiniteScrolledMap, RegularBackgroundSize, TileFormat, TileSet, TileSetting,
|
|
||||||
VRamManager,
|
|
||||||
},
|
|
||||||
Priority, HEIGHT, WIDTH,
|
Priority, HEIGHT, WIDTH,
|
||||||
},
|
},
|
||||||
fixnum::{num, FixedNum, Rect, Vector2D},
|
fixnum::{num, FixedNum, Rect, Vector2D},
|
||||||
|
@ -57,7 +54,7 @@ const SWORDLESS_JUMP: &Tag = TAG_MAP.get("jump swordless");
|
||||||
const SWORDLESS_ATTACK: &Tag = KNIFE_ATTACK;
|
const SWORDLESS_ATTACK: &Tag = KNIFE_ATTACK;
|
||||||
const SWORDLESS_JUMP_ATTACK: &Tag = KNIFE_JUMP_ATTACK;
|
const SWORDLESS_JUMP_ATTACK: &Tag = KNIFE_JUMP_ATTACK;
|
||||||
|
|
||||||
agb::include_background_gfx!(background, "53269a", background => "gfx/background.aseprite");
|
agb::include_background_gfx!(background, "53269a", background => deduplicate "gfx/background.aseprite");
|
||||||
|
|
||||||
type Number = FixedNum<8>;
|
type Number = FixedNum<8>;
|
||||||
|
|
||||||
|
@ -2207,11 +2204,10 @@ fn game_with_level(gba: &mut agb::Gba) {
|
||||||
Box::new(|pos| {
|
Box::new(|pos| {
|
||||||
(
|
(
|
||||||
&tileset,
|
&tileset,
|
||||||
TileSetting::from_raw(
|
background::background.tile_settings[*tilemap::BACKGROUND_MAP
|
||||||
*tilemap::BACKGROUND_MAP
|
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
|
||||||
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
|
.unwrap_or(&0)
|
||||||
.unwrap_or(&0),
|
as usize],
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -2225,11 +2221,10 @@ fn game_with_level(gba: &mut agb::Gba) {
|
||||||
Box::new(|pos| {
|
Box::new(|pos| {
|
||||||
(
|
(
|
||||||
&tileset,
|
&tileset,
|
||||||
TileSetting::from_raw(
|
background::background.tile_settings[*tilemap::FOREGROUND_MAP
|
||||||
*tilemap::FOREGROUND_MAP
|
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
|
||||||
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
|
.unwrap_or(&0)
|
||||||
.unwrap_or(&0),
|
as usize],
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -2243,11 +2238,10 @@ fn game_with_level(gba: &mut agb::Gba) {
|
||||||
Box::new(|pos| {
|
Box::new(|pos| {
|
||||||
(
|
(
|
||||||
&tileset,
|
&tileset,
|
||||||
TileSetting::from_raw(
|
background::background.tile_settings[*tilemap::CLOUD_MAP
|
||||||
*tilemap::CLOUD_MAP
|
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
|
||||||
.get((pos.x + tilemap::WIDTH * pos.y) as usize)
|
.unwrap_or(&0)
|
||||||
.unwrap_or(&0),
|
as usize],
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue