2022-08-01 15:56:06 +10:00
# Changelog
2023-07-12 20:54:43 +10:00
2022-08-01 15:56:06 +10:00
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog ](https://keepachangelog.com/en/1.0.0/ ),
and this project adheres to [Semantic Versioning ](https://semver.org/spec/v2.0.0.html ).
## [Unreleased]
2024-07-10 05:59:30 +10:00
### Fixed
2024-07-10 22:29:07 +10:00
- There are no longer gaps between tiles in affine graphics modes.
2024-07-10 05:59:30 +10:00
2024-07-12 08:41:26 +10:00
### Added
- Added option to export imported background graphics from `include_background_gfx` as pub.
2024-06-19 02:49:56 +10:00
## [0.20.5] - 2024/06/18
2024-06-19 02:47:19 +10:00
### Fixed
- Resolved incompatibility with a dependency's update in `agb-tracker` . If you
are already using `agb-tracker` , then this won't yet cause an issue as your
lockfile will maintain the working version. However if start a new project, or
update dependencies, cargo will choose the later incompatible version.
2024-06-14 08:13:02 +10:00
## [0.20.4] - 2024/06/13
2024-06-14 07:49:39 +10:00
### Changed
- `manhattan_distance` and `magnitude_squared` no longer require the fixed point number.
2024-06-13 02:57:39 +10:00
## [0.20.3] - 2024/06/12
2024-05-25 20:14:06 +10:00
### Added
- Added `find_colour_index_16` and `find_colour_index_256` to the `VRamManager` to find where a colour is in a palette.
2024-06-13 02:18:36 +10:00
- Added `set_graphics_mode` to unmanaged sprites. This allows you to change to the blending and window modes.
2024-05-25 20:14:06 +10:00
2024-05-27 23:45:02 +10:00
### Fixed
- Affine background center position didn't work outside of the upper left quadrant of the gba's screen.
2024-06-05 06:19:29 +10:00
- Fixed backtrace pointing to the wrong line of code (being out by one).
2024-06-13 02:33:46 +10:00
- Fixes overflow caused by certain font characteristics on boundaries of sprites in the object text renderer.
2024-05-27 23:45:02 +10:00
2024-05-25 22:20:03 +10:00
## [0.20.2] - 2024/05/25
2024-05-25 21:10:35 +10:00
### Fixed
- Fixed the crash screen to show debug text even if the qr code fails to generate.
- Fixed the crash screen to prevent the qr code always failing to generate.
2024-05-18 08:09:16 +10:00
## [0.20.1] - 2024/05/17
2024-05-16 04:43:48 +10:00
### Added
- Added `dot` and `cross` product methods for `Vector2D` .
2024-05-16 06:38:57 +10:00
### Fixed
- Fixed an issue with agb tracker where XM files with linear frequencies were playing the wrong notes
2024-05-15 07:57:40 +10:00
## [0.20.0] - 2024/05/14
2024-03-27 20:32:34 +11:00
### Added
2024-04-10 05:09:52 +10:00
- Added a new crash screen which provides a mechanism for seeing a full stack trace of your program when it panics.
This requires a change to your `.cargo/config.toml` . You must add the rust flag `"-Cforce-frame-pointers=yes"` to
2024-04-21 05:42:38 +10:00
your rustflags field. This can also be disabled by removing the `backtrace` feature.
2024-03-27 20:32:34 +11:00
- Initial unicode support for font rendering.
2024-03-27 22:12:23 +11:00
- Kerning support for font rendering.
2024-05-01 05:41:01 +10:00
- Added `set_next` method to `OamIterator` to avoid repeated boilerplate when dealing with unmanaged objects.
2024-03-27 20:32:34 +11:00
2024-03-14 02:36:46 +11:00
### Fixed
- Export the `dma` module correctly so you can write the types from it and use it in more complex cases.
2024-03-30 01:43:36 +11:00
### Changed
- Many macros now emit statics rather than consts OR can be used as statics OR
2024-04-10 07:17:31 +10:00
have had examples changed to use statics. You should use statics where possible
2024-03-30 01:43:36 +11:00
for assets as consts can lead to them being included multiple times in the
ROM.
2024-04-10 05:33:26 +10:00
- Fixnums are now implemented with `num_traits` trait definitions.
2024-04-10 07:17:31 +10:00
- Rather than having our own sync with Statics, use the standard portable
atomics crate. These are reexported for convenience.
2024-04-20 09:12:36 +10:00
- `Mgba` no longer implements `Write` . You're unlikely to notice as
`agb::println!` is unchanged.
- Writes of long messages to mgba are split over multiple log messages if they
overflow mgba's buffer. On a panic, only the final message will be Fatal with
the preceding ones (if needed) being Info.
2024-03-30 01:43:36 +11:00
2024-03-07 06:11:47 +11:00
## [0.19.1] - 2024/03/06
2024-03-07 01:24:58 +11:00
### Added
- `.abs()` on `Vector2D` and `Rect`
### Fixed
- `InfiniteScrolledMap` can now scroll more than 1 tile in a single frame without corrupting.
2024-03-06 20:33:58 +11:00
## [0.19.0] - 2024/03/06
2024-02-16 21:15:38 +11:00
### Added
2024-03-07 01:24:58 +11:00
2024-02-16 21:15:38 +11:00
- Added `.priority()` , `.set_priority()` and `.is_visible()` to `RegularMap` , `AffineMap` and `InfiniteScrolledMap` .
- Replaced `.show()` and `.hide()` with `.set_visible()` in `RegularMap` , `AffineMap` and `InfiniteScrolledMap` .
2024-03-06 20:00:28 +11:00
- Added `.into_inner()` to `InfiniteScrolledMap` to get the map back once you are done using it in the `InfiniteScrolledMap` .
2024-02-18 02:26:05 +11:00
- Added `.hflip()` , `.vflip()` , `.priority()` , `.position()` to `ObjectUnmanaged` and `Object` .
2024-04-21 05:42:38 +10:00
- An abstraction over hblank DMA to allow for cool effects like gradients and circular windows. See the dma_effect\* examples.
2023-11-15 07:32:15 +11:00
- Expermental and incomplete support for MIDI files with agb-tracker.
2024-02-22 00:59:53 +11:00
- Fixnum now implements [`num::Num` ](https://docs.rs/num/0.4/num/trait.Num.html ) from the [`num` ](https://crates.io/crates/num ) crate.
2024-02-28 21:09:12 +11:00
- `Default` implementations for `RandomNumberGenerator` , `InitOnce` and `RawMutex` .
2024-02-16 21:15:38 +11:00
2024-03-06 20:26:47 +11:00
### Changed
2024-03-07 01:24:58 +11:00
2024-02-22 01:36:45 +11:00
- A few functions which previously accepted a `Vector<u16>` now accept an `impl Into<Vector2D<u16>>` instead.
2024-02-21 23:59:02 +11:00
2024-02-07 09:36:11 +11:00
## [0.18.1] - 2024/02/06
2024-02-03 23:41:27 +11:00
### Added
2024-03-07 01:24:58 +11:00
2024-02-03 23:41:27 +11:00
- You can now use include_aseprite and include_background_gfx to include files from the out directory using the `$OUT_DIR` token.
2024-02-04 08:10:27 +11:00
- Added `.pause()` and `.resume()` methods to `SoundChannels` to let you pause and resume from where you left off.
2024-02-03 23:41:27 +11:00
2023-11-01 07:35:14 +11:00
## [0.18.0] - 2023/10/31
2023-10-18 22:26:50 +11:00
### Added
2024-03-07 01:24:58 +11:00
2023-10-18 22:28:41 +11:00
- There is now a multiboot feature which you can use to easily make multiboot ROMs.
2023-10-17 15:25:11 +11:00
- Can now set palette on a TileSetting struct.
2023-10-18 22:26:50 +11:00
2023-10-18 10:30:52 +11:00
### Changed
2024-03-07 01:24:58 +11:00
2023-10-18 22:26:50 +11:00
- You no longer need the gba.ld or gba_mb.ld files in your repository. You should delete these when upgrading.
2023-10-18 10:30:52 +11:00
2023-10-09 01:04:57 +11:00
### Fixed
2023-10-18 10:30:52 +11:00
- Multiboot builds now work on mgba.
2023-10-09 01:04:57 +11:00
- Fixed inaccuracy in cosine implementation caused by accidentally multiplying correction term by zero.
2023-10-06 08:18:04 +11:00
## [0.17.1] - 2023/10/05
2023-10-06 08:14:25 +11:00
### Fixed
- Fixed the build on docs.rs.
2023-10-04 08:33:10 +11:00
## [0.17.0] - 2023/10/03
2023-07-26 05:18:21 +10:00
### Added
- New tracker for playing XM files (see the `agb-tracker` crate).
- You can now declare where looping sound channels should restart.
2023-08-07 05:27:09 +10:00
- Fixnums now have constructors from_f32 and from_f64. This is mainly useful if using agb-fixnum outside of the Game Boy Advance e.g. in build scripts or macros.
2023-08-30 01:19:15 +10:00
- New option when loading a background to automatically deduplicate tiles.
2023-08-30 01:21:28 +10:00
- Methods on tile_setting to toggle its hflip and vflip status.
2023-07-26 05:18:21 +10:00
### Changed
- Sound channel panning and volume options are now `Num<i16, 8>` rather than `Num<i16, 4>` for improved precision and sound quality.
2023-07-26 19:25:02 +10:00
- Due to dependency changes, agb-gbafix is now released under MPL rather than GPL.
2023-09-06 08:24:53 +10:00
- `include_background_gfx!` now produces tile sets and tile settings directly.
2023-07-26 05:18:21 +10:00
### Fixed
2023-08-30 01:19:15 +10:00
- 256-colour backgrounds are better supported.
2023-07-26 05:18:21 +10:00
- Mono looping samples will now correctly play to the end if it doesn't perfectly align with a buffer boundry and short samples now also loop correctly.
2023-09-29 07:31:21 +10:00
- Fixed a bug in bitmap4 that caused setting pixels to be always incorrect.
2023-07-26 05:18:21 +10:00
2023-07-19 03:55:12 +10:00
## [0.16.0] - 2023/07/18
2023-05-13 04:25:18 +10:00
### Added
2023-07-12 20:54:43 +10:00
2023-05-13 04:25:18 +10:00
- New `include_palette` macro for including every colour in an image as a `u16` slice.
2023-07-05 07:29:28 +10:00
- New object based text renderer.
2023-05-13 04:25:18 +10:00
2023-05-12 04:59:13 +10:00
### Changed
2023-07-12 20:54:43 +10:00
2023-05-13 04:25:18 +10:00
- Changed the default template game.
2023-07-05 07:29:28 +10:00
- `DynamicSprite` has a new API which changes the constructor and adds a `set_pixel` and `clear` methods.
2023-05-07 06:43:14 +10:00
- You no longer need to install arm-none-eabi-binutils. In order to write games using `agb` , you now only need to install rust nightly.
2023-06-19 01:43:00 +10:00
- 10% performance improvement with the software mixer.
2023-05-12 04:59:13 +10:00
2023-07-12 20:54:56 +10:00
### Fixed
- Compile error if you tried to import a larger sprite which uses more than 15 colours between frames.
2023-04-26 06:51:29 +10:00
## [0.15.0] - 2023/04/25
2023-04-14 07:35:33 +10:00
### Added
2023-07-12 20:54:43 +10:00
2023-04-14 07:35:33 +10:00
- You can now import aseprite files directly (in addition to the already supported png and bmp files) when importing background tiles.
2023-04-24 05:43:09 +10:00
- New additional unmanaged object API for interacting with a more straightforward manner with the underlying hardware.
2023-04-14 07:35:33 +10:00
### Changed
2023-07-12 20:54:43 +10:00
2023-04-14 07:35:33 +10:00
- Importing background tiles has been improved. You no longer need to use `include_gfx!` with the toml file. Instead, use `include_background_gfx` . See the documentation for usage.
2023-05-07 06:43:14 +10:00
- The hashmap implementation is now it its own crate, `agb-hashmap` . There is no change in API, but you can now use this for interop between non-agb code and agb code.
2023-04-24 05:43:09 +10:00
- Moved the existing object API to be the OamManaged API. The old names persist with deprecated notices on them.
2023-04-14 07:35:33 +10:00
2023-04-12 06:28:22 +10:00
## [0.14.0] - 2023/04/11
2023-04-12 05:09:05 +10:00
### Added
2023-07-12 20:54:43 +10:00
2023-04-12 05:09:05 +10:00
- Added custom `gbafix` implementation which can take the elf file produced by `cargo build` directly, removing the need for the objcopy step.
2023-01-30 06:06:00 +11:00
### Changed
2023-07-12 20:54:43 +10:00
2023-02-08 07:33:25 +11:00
- Made Vector2D::new a const function.
- The template now uses rust 2021 edition by default.
2023-02-24 08:20:51 +11:00
- All objects which should only be created once now have the correct lifetimes to only allow one to exist.
2023-04-06 02:07:50 +10:00
- Template now uses codegen-units=1 to workaround bug in nightly.
2023-04-07 06:53:18 +10:00
- Allocator is no longer interrupt safe.
2023-04-07 06:49:30 +10:00
- Soundness issues with interrupts resolved which makes them unsafe and require the closure to be static (breaking change).
2023-01-30 06:06:00 +11:00
2023-01-22 06:14:43 +11:00
### Fixed
2023-07-12 20:54:43 +10:00
2023-01-22 06:14:43 +11:00
- Alpha channel is now considered by `include_gfx!()` even when `transparent_colour` is absent.
2023-02-24 19:56:04 +11:00
- 256 colour backgrounds are now correctly rendered (breaking change).
2023-03-24 10:12:08 +11:00
- The `#[agb::entry]` macro now reports errors better.
2023-04-03 05:38:31 +10:00
- Added the shstrtab section to the linker to ensure that agb builds with lld.
2023-01-22 06:14:43 +11:00
2023-01-20 07:21:09 +11:00
## [0.13.0] - 2023/01/19
2023-01-09 22:29:01 +11:00
### Added
2023-07-12 20:54:43 +10:00
2023-01-09 22:29:01 +11:00
- Added missed implementations of `regular()` and `affine()` to `Tiled1` which made `Tiled1` impossible to use.
2022-11-22 10:06:04 +11:00
### Changed
2023-07-12 20:54:43 +10:00
2022-11-22 10:06:04 +11:00
- Text renderer can now be re-used which is useful for rpg style character/word at a time text boxes.
2022-12-10 10:10:44 +11:00
- Audio now automatically uses interrupts, so you can remove the `setup_interrupt_handler` or `after_vblank` calls to the mixer.
2023-01-13 08:24:28 +11:00
- If a vblank happens outside of `wait_for_vblank` , then next call will immediately return.
2022-11-22 10:06:04 +11:00
2023-01-13 08:55:25 +11:00
### Fixed
2023-07-12 20:54:43 +10:00
2023-01-13 08:55:25 +11:00
- Zero volume now plays no sound.
- Fixed issue where volume was incorrect for volumes which were powers of 2.
2022-11-22 10:06:04 +11:00
2022-10-22 22:59:20 +11:00
## [0.12.2] - 2022/10/22
2022-11-02 09:06:27 +11:00
This is a minor release to fix an alignment issue with background tiles.
### Fixed
2023-07-12 20:54:43 +10:00
2022-11-02 09:06:27 +11:00
- Corrected alignment of background tiles which was causing issues with rendering tiles in some cases.
2022-10-13 05:00:12 +11:00
## [0.12.1] - 2022/10/12
2022-10-13 03:32:01 +11:00
This is a minor release to fix the build of the docs on [docs.rs/agb ](https://docs.rs/agb ).
### Fixed
2023-07-12 20:54:43 +10:00
2022-10-13 03:32:01 +11:00
- Fixed the agb crate's docs.rs build
2022-10-12 09:34:13 +11:00
## [0.12.0] - 2022/10/11
2022-10-12 09:25:17 +11:00
This version of `agb` has some exciting new features we'd like to highlight and some brand new contributors!
1. Save support for multiple cartridge types (contributed by @Lymia )
2. Affine background support (contributed by @lifning )
We also had a contribution by @ijc8 . We can't thank you all enough!
2022-08-05 05:08:39 +10:00
### Added
2023-07-12 20:54:43 +10:00
2022-08-05 05:08:39 +10:00
- Custom allocator support using the `Allocator` trait for `HashMap` . This means the `HashMap` can be used with `InternalAllocator` to allocate to IWRAM or the `ExternalAllocator` to explicitly allocate to EWRAM.
2022-08-06 21:35:55 +10:00
- Support for using windows on the GBA. Windows are used to selectively enable rendering of certain layers or effects.
2022-08-07 06:19:12 +10:00
- Support for the blend mode of the GBA. Blending allows for alpha blending between layers and fading to black and white.
2022-08-17 23:12:28 +10:00
- Added a new agb::sync module that contains GBA-specific synchronization primitives.
2022-09-16 16:21:45 +10:00
- Added support for save files.
2022-10-03 04:55:57 +11:00
- Added implementation of `HashMap.retain()` .
2022-10-09 08:44:37 +11:00
- Added support for affine backgrounds (tiled modes 1 and 2) which allows for scaling, rotating etc of tiled backgrounds.
- Added support for 256 colour backgrounds (when working with affine ones).
2022-10-09 09:40:12 +11:00
- Added affine matrix module. This allows for manipulation of affine matricies for use in backgrounds and in the future objects.
2022-10-09 09:38:58 +11:00
- Added support for dynamic sprites generated at runtime, some parts of this may change significantly so breaking changes are expected here.
2022-08-05 05:08:39 +10:00
2022-10-12 09:25:17 +11:00
### Changed
2023-07-12 20:54:43 +10:00
2022-08-17 23:12:28 +10:00
- Many of the places that originally disabled IRQs now use the `sync` module, reducing the chance of missed interrupts.
2022-10-03 04:57:39 +11:00
- HashMap iterators now implement `size_hint` which should result in slightly better generation of code using those iterators.
2022-10-09 08:44:37 +11:00
- Transparency of backgrounds is now set once in the toml file rather than once for every image.
2022-10-09 09:02:54 +11:00
- Palette generation now takes into account every single background a toml definition rather than one at a time, you can now find it in the PALETTES constant rather than in every individual image.
2022-10-09 07:24:47 +11:00
- Sound frequency is no longer a crate feature, instead set when initialising the sound mixer.
2022-10-12 09:25:17 +11:00
- `testing` is now a default feature, so you no longer need to add a separate `dev-dependencies` line for `agb` in order to enable unit tests for your project.
2022-08-17 23:12:28 +10:00
### Fixed
2023-07-12 20:54:43 +10:00
2022-08-09 03:57:46 +10:00
- Fixed the fast magnitude function in agb_fixnum. This is also used in fast_normalise. Previously only worked for positive (x, y).
2022-09-11 04:37:42 +10:00
- Fixed formatting of fixed point numbers in the range (-1, 0), which previously appeared positive.
2022-08-09 03:57:46 +10:00
2022-08-03 08:49:46 +10:00
## [0.11.1] - 2022/08/02
2022-08-03 08:40:00 +10:00
2022-08-03 08:49:46 +10:00
Version 0.11.1 brings documentation for fixed point numbers. We recommend all users upgrade to this version since it also includes fixes to a few functions in fixnum. See changed section for breaking changes.
2022-08-03 08:40:00 +10:00
2022-08-02 02:54:32 +10:00
### Added
2023-07-12 20:54:43 +10:00
2022-08-02 02:54:32 +10:00
- Support for sprites that are not square.
2022-08-03 07:36:15 +10:00
- Docs for fixed point numbers.
### Changed
2023-07-12 20:54:43 +10:00
2022-08-03 08:40:00 +10:00
- `Rect::contains_point` now considers points on the boundary to be part of the rectangle.
- Signature of `Rect::overlapping_rect` changed to return an Option. Returns None if rectangles don't overlap.
2022-08-03 07:36:15 +10:00
### Fixed
2023-07-12 20:54:43 +10:00
2022-08-03 07:36:15 +10:00
- Fixed point sine calculates the sine correctly.
2022-08-02 02:54:32 +10:00
2022-08-01 15:56:06 +10:00
## [0.10.0] - 2022/07/31
Version 0.10.0 brings about many new features. As with most `agb` upgrades, you will need to update your `gba.ld` and `gba_mb.ld` files which you can find in the [template repo ](https://github.com/agbrs/template ). We would also recommend copying the `[profile.dev]` and `[profile.release]` sections from `Cargo.toml` if you don't have these values already.
### Added
2023-07-12 20:54:43 +10:00
2022-08-01 15:58:31 +10:00
- [Hyperspace roll ](https://lostimmortal.itch.io/hyperspace-roll ), a new game built for the GMTK Game Jam 2022 using `agb` . The source code can be found in the `examples` directory.
- Started using GitHub discussions as a forum
- Many functions previously undocumented are now documented
- Z-Ordering of sprites - you can now change the render order of sprites rather than it just being defined by the order in which they appear in object memory
2022-08-01 15:56:06 +10:00
- 32kHz audio. Probably the best sound quality you'll get out of the hardware, but uses a lot of ROM space
2022-08-01 15:58:31 +10:00
- Transparent sprite support with aseprite
2022-08-01 15:56:06 +10:00
- You can now write tests for projects depending on agb
2022-08-01 15:58:31 +10:00
- Very basic font rendering - looking for feedback, this API is far from stable
- Faster implementation of memcpy and memset thanks to the agbabi crate which provide a big performance boost for any project using agb
2022-08-01 15:56:06 +10:00
- If you wish, you can now optionally do dynamic memory allocation to IWRAM instead of only EWRAM
- You can now use 64x64px sprites
- You can now configure the background size for tiled backgrounds
- It is possible to create 'dynamic tiles' for backgrounds. These are tiles which are defined at runtime
2022-08-01 15:58:31 +10:00
- Random number generator in agb::rng
2022-08-01 15:56:06 +10:00
### Changed
2023-07-12 20:54:43 +10:00
2022-08-01 15:56:06 +10:00
- Audio system optimisations - reduced CPU usage by more than 50%
2022-08-01 15:58:31 +10:00
- Background tiles are now removed from Video RAM during `commit()` if they are no longer used rather than immediately reducing flickering
2022-08-01 15:56:06 +10:00
- Improved the README for both the main agb crate and the template
- The template now builds with optimisations in debug mode and debug symbols in release mode
- Added `#[must_use]` to many of the places it is needed
- All subcrates get released at once, so versions are kept in lockstep
- A few methods accepting `Num<..>` have been changed to accept `impl Into<Num<..>>` to make them easier to use
### Removed
2023-07-12 20:54:43 +10:00
2022-08-01 15:56:06 +10:00
- The ability to use timer0 and timer1 through the `timer` module. This was done in order to fully support 32kHz audio
### Fixed
2023-07-12 20:54:43 +10:00
2022-08-01 15:56:06 +10:00
- Sprite data is now correctly aligned so fast copies will always work
- A few methods which should really be internal have had `pub` removed
2022-09-11 04:37:42 +10:00
- The crate now compiles (but does not run) doctests in CI which pointed out a large number of non-compiling examples