mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Add an into_inner() function on infinite scrolled map (#575)
Adds a useful into_inner function which we need at the moment. Will add a changelog and documentation later - [x] Changelog updated
This commit is contained in:
commit
5bdc782e78
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Added
|
||||
- Added `.priority()`, `.set_priority()` and `.is_visible()` to `RegularMap`, `AffineMap` and `InfiniteScrolledMap`.
|
||||
- Replaced `.show()` and `.hide()` with `.set_visible()`in `RegularMap`, `AffineMap` and `InfiniteScrolledMap`.
|
||||
- Added `.into_inner()` to `InfiniteScrolledMap` to get the map back once you are done using it in the `InfiniteScrolledMap`.
|
||||
- Added `.hflip()`, `.vflip()`, `.priority()`, `.position()` to `ObjectUnmanaged` and `Object`.
|
||||
- An abstraction over hblank DMA to allow for cool effects like gradients and circular windows. See the dma_effect* examples.
|
||||
- Expermental and incomplete support for MIDI files with agb-tracker.
|
||||
|
|
|
@ -430,6 +430,12 @@ impl<'a> InfiniteScrolledMap<'a> {
|
|||
pub const fn background(&self) -> BackgroundID {
|
||||
self.map.background()
|
||||
}
|
||||
|
||||
/// Returns the underlying map back. The map will not be cleared.
|
||||
#[must_use]
|
||||
pub fn into_inner(self) -> MapLoan<'a, RegularMap> {
|
||||
self.map
|
||||
}
|
||||
}
|
||||
|
||||
fn div_floor(x: i32, y: i32) -> i32 {
|
||||
|
|
Loading…
Reference in a new issue