mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
add amplitude to combo rom
This commit is contained in:
parent
d44461610d
commit
4ea75bc064
8
examples/combo/Cargo.lock
generated
8
examples/combo/Cargo.lock
generated
|
@ -85,6 +85,13 @@ dependencies = [
|
||||||
"version_check",
|
"version_check",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "amplitude"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"agb",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asefile"
|
name = "asefile"
|
||||||
version = "0.3.5"
|
version = "0.3.5"
|
||||||
|
@ -167,6 +174,7 @@ name = "combo"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"agb",
|
"agb",
|
||||||
|
"amplitude",
|
||||||
"hyperspace-roll",
|
"hyperspace-roll",
|
||||||
"the-hat-chooses-the-wizard",
|
"the-hat-chooses-the-wizard",
|
||||||
"the-purple-night",
|
"the-purple-night",
|
||||||
|
|
|
@ -10,6 +10,7 @@ agb = { version = "0.14.0", path = "../../agb" }
|
||||||
the-purple-night = { path = "../the-purple-night" }
|
the-purple-night = { path = "../the-purple-night" }
|
||||||
the-hat-chooses-the-wizard = { path = "../the-hat-chooses-the-wizard" }
|
the-hat-chooses-the-wizard = { path = "../the-hat-chooses-the-wizard" }
|
||||||
hyperspace-roll = { path = "../hyperspace-roll" }
|
hyperspace-roll = { path = "../hyperspace-roll" }
|
||||||
|
amplitude = { path = "../amplitude" }
|
||||||
|
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
|
BIN
examples/combo/gfx/amplitude.png
Normal file
BIN
examples/combo/gfx/amplitude.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -21,6 +21,7 @@ pub enum Game {
|
||||||
TheHatChoosesTheWizard,
|
TheHatChoosesTheWizard,
|
||||||
ThePurpleNight,
|
ThePurpleNight,
|
||||||
HyperspaceRoll,
|
HyperspaceRoll,
|
||||||
|
Amplitude,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Game {
|
impl Game {
|
||||||
|
@ -29,6 +30,7 @@ impl Game {
|
||||||
Game::TheHatChoosesTheWizard => the_hat_chooses_the_wizard::main(gba),
|
Game::TheHatChoosesTheWizard => the_hat_chooses_the_wizard::main(gba),
|
||||||
Game::ThePurpleNight => the_purple_night::main(gba),
|
Game::ThePurpleNight => the_purple_night::main(gba),
|
||||||
Game::HyperspaceRoll => hyperspace_roll::main(gba),
|
Game::HyperspaceRoll => hyperspace_roll::main(gba),
|
||||||
|
Game::Amplitude => amplitude::main(gba),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +39,7 @@ impl Game {
|
||||||
0 => Game::TheHatChoosesTheWizard,
|
0 => Game::TheHatChoosesTheWizard,
|
||||||
1 => Game::ThePurpleNight,
|
1 => Game::ThePurpleNight,
|
||||||
2 => Game::HyperspaceRoll,
|
2 => Game::HyperspaceRoll,
|
||||||
|
3 => Game::Amplitude,
|
||||||
_ => unreachable!("game out of index in an unreachable manner"),
|
_ => unreachable!("game out of index in an unreachable manner"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +49,8 @@ include_background_gfx!(
|
||||||
games, "121105",
|
games, "121105",
|
||||||
hat => "gfx/hat.png",
|
hat => "gfx/hat.png",
|
||||||
purple => "gfx/purple.png",
|
purple => "gfx/purple.png",
|
||||||
hyperspace => "gfx/hyperspace.png"
|
hyperspace => "gfx/hyperspace.png",
|
||||||
|
amplitude => "gfx/amplitude.png"
|
||||||
);
|
);
|
||||||
|
|
||||||
fn get_game(gba: &mut agb::Gba) -> Game {
|
fn get_game(gba: &mut agb::Gba) -> Game {
|
||||||
|
@ -58,13 +62,15 @@ fn get_game(gba: &mut agb::Gba) -> Game {
|
||||||
let hat = TileSet::new(games::hat.tiles, TileFormat::FourBpp);
|
let hat = TileSet::new(games::hat.tiles, TileFormat::FourBpp);
|
||||||
let purple = TileSet::new(games::purple.tiles, TileFormat::FourBpp);
|
let purple = TileSet::new(games::purple.tiles, TileFormat::FourBpp);
|
||||||
let hyperspace = TileSet::new(games::hyperspace.tiles, TileFormat::FourBpp);
|
let hyperspace = TileSet::new(games::hyperspace.tiles, TileFormat::FourBpp);
|
||||||
|
let amplitude = TileSet::new(games::amplitude.tiles, TileFormat::FourBpp);
|
||||||
|
|
||||||
let tiles = [hat, purple, hyperspace];
|
let tiles = [hat, purple, hyperspace, amplitude];
|
||||||
|
|
||||||
let palette_assignments = &[
|
let palette_assignments = &[
|
||||||
games::hat.palette_assignments,
|
games::hat.palette_assignments,
|
||||||
games::purple.palette_assignments,
|
games::purple.palette_assignments,
|
||||||
games::hyperspace.palette_assignments,
|
games::hyperspace.palette_assignments,
|
||||||
|
games::amplitude.palette_assignments,
|
||||||
];
|
];
|
||||||
|
|
||||||
vram.set_background_palettes(games::PALETTES);
|
vram.set_background_palettes(games::PALETTES);
|
||||||
|
@ -79,7 +85,7 @@ fn get_game(gba: &mut agb::Gba) -> Game {
|
||||||
let y = pos.y.rem_euclid(20);
|
let y = pos.y.rem_euclid(20);
|
||||||
let x = pos.x.rem_euclid(30);
|
let x = pos.x.rem_euclid(30);
|
||||||
|
|
||||||
let game = (pos.x).rem_euclid(90) as usize / 30;
|
let game = (pos.x).rem_euclid(tiles.len() as i32 * 30) as usize / 30;
|
||||||
let tile_id = (y * 30 + x) as usize;
|
let tile_id = (y * 30 + x) as usize;
|
||||||
(
|
(
|
||||||
&tiles[game],
|
&tiles[game],
|
||||||
|
|
Loading…
Reference in a new issue