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:
Gwilym Inzani 2024-03-06 09:11:08 +00:00 committed by GitHub
commit 5bdc782e78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -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.

View file

@ -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 {