Commit graph

3496 commits

Author SHA1 Message Date
Gwilym Inzani edb628d0b2 Extract method for checking palette invariants 2024-09-25 11:44:16 +01:00
Gwilym Inzani c834e2907d Ensure that transparent colours always come first 2024-09-25 11:40:54 +01:00
Gwilym Inzani 7b6556b381 Use a better optimisation method 2024-09-25 11:33:51 +01:00
Gwilym Inzani db908bb2da Explain why this works 2024-09-25 10:53:25 +01:00
Gwilym Inzani fb186809a9 Add a really basic quickcheck 2024-09-25 10:47:17 +01:00
Gwilym Inzani d6bc6f49b4
Upgrade xmrs which gives us s3m and mod file support (#767)
Closes #742

Turns out XMRS will do the conversion for us, which means we can 'just
support' s3m and mod file formats for free which is nice.

- [x] Changelog updated / no changelog update needed
2024-09-25 10:33:37 +01:00
Gwilym Inzani 282e070216 Use version 0.7.2 2024-09-24 21:04:51 +01:00
Gwilym Inzani 89eb11d5ef Add changelog entry for s3m and mod format 2024-09-24 21:03:09 +01:00
Gwilym Inzani 40fd424205 Export the include_s3m and include_mod macros 2024-09-24 21:02:37 +01:00
Gwilym Inzani a7e7455c57 Add macros for include_s3m and include_mod 2024-09-24 21:02:37 +01:00
Gwilym Inzani 2d69b2a7a4 Make agb_xm_core generic on parsing 2024-09-24 21:02:37 +01:00
Gwilym Inzani 5b9332556d Add s3m and mod support to the desktop player 2024-09-24 21:02:36 +01:00
renovate[bot] 05b5b3e882 Update Rust crate xmrs to v0.7.2 2024-09-24 21:02:05 +01:00
Corwin d07970a7c0
Release v0.21.0 2024-09-24 20:38:33 +01:00
Corwin dd5ab9b475
Fix release script (#766)
Causes the release script to update build-dependencies and the desktop
tracker

- [x] no changelog update needed
2024-09-24 20:37:12 +01:00
Corwin 1f6c7157be
also update build-dependencies 2024-09-24 20:27:15 +01:00
Corwin 49ad674d93
Update dependency @types/react to v18.3.9 (#765) 2024-09-24 19:56:54 +01:00
renovate[bot] 6f01435498
Update dependency @types/react to v18.3.9 2024-09-24 15:27:08 +00:00
Corwin cfe31db934
Update Javascript packages (non-major) (#760) 2024-09-23 22:36:40 +01:00
renovate[bot] 51d3814539
Update Javascript packages (non-major) 2024-09-23 21:26:43 +00:00
Corwin 1f6766e286
Fix the CI issues with static mut access (#763)
- [x] no changelog update needed
2024-09-23 22:25:26 +01:00
Corwin bd27e80daa
allow improper ctypes 2024-09-22 18:29:05 +01:00
Corwin 3da5c21813
use SyncUnsafeCell rather than static muts 2024-09-22 16:22:08 +01:00
Corwin 051d9ab85d
use export name 2024-09-22 16:20:18 +01:00
Corwin 56e3de3c62
add SyncUnsafeCell implementation 2024-09-22 16:19:00 +01:00
Gwilym Inzani 18572658cb
Mark the generated entry as doc(hidden) (#761)
Should hopefully fix the currently failing build

- [x] no changelog update needed
2024-09-18 18:32:25 +01:00
Gwilym Inzani ab46121934
Mark the generated entry as doc(hidden) 2024-09-18 18:24:23 +01:00
Gwilym Inzani 7a2ef4338c
Update Javascript packages (non-major) (#758)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/node](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node))
| [`20.16.2` ->
`20.16.4`](https://renovatebot.com/diffs/npm/@types%2fnode/20.16.2/20.16.4)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.16.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.16.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.16.2/20.16.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.16.2/20.16.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@types/react](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react))
| [`18.3.4` ->
`18.3.5`](https://renovatebot.com/diffs/npm/@types%2freact/18.3.4/18.3.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.3.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.3.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.3.4/18.3.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.3.4/18.3.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [styled-components](https://styled-components.com)
([source](https://redirect.github.com/styled-components/styled-components))
| [`6.1.12` ->
`6.1.13`](https://renovatebot.com/diffs/npm/styled-components/6.1.12/6.1.13)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/styled-components/6.1.13?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/styled-components/6.1.13?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/styled-components/6.1.12/6.1.13?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/styled-components/6.1.12/6.1.13?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>styled-components/styled-components
(styled-components)</summary>

###
[`v6.1.13`](https://redirect.github.com/styled-components/styled-components/compare/v6.1.12...99c02f52d69e8e509c0bf012cadee7f8e819a6dd)

[Compare
Source](https://redirect.github.com/styled-components/styled-components/compare/v6.1.12...v6.1.13)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/agbrs/agb).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2024-09-04 16:29:22 +01:00
renovate[bot] 69fe5a3c32
Update Javascript packages (non-major) 2024-09-04 01:34:42 +00:00
Gwilym Inzani 9cbf29ed98
Even more tracker commands (#757)
Adds support for some of `Retrigger` and `Sample Offset`

- [x] Changelog updated
2024-09-01 13:33:50 +01:00
Gwilym Inzani d4a2d9357f Change out the examples 2024-08-28 17:46:35 +01:00
Gwilym Inzani fee2575cb7 Retrigger with volume 2024-08-28 17:38:24 +01:00
Gwilym Inzani 48f7020f2c Should track previous retriggers for retrigger of 0 2024-08-28 17:00:19 +01:00
Gwilym Inzani 5f76fcc316 May as well support 0xE8 2024-08-28 16:48:28 +01:00
Gwilym Inzani 9fa171b712 E9 is the same as R0x 2024-08-28 16:46:08 +01:00
Gwilym Inzani 54a31934b2 Add support for retrigger command 2024-08-28 16:43:59 +01:00
Gwilym Inzani 559367f607 Add sample offset command support 2024-08-28 16:32:28 +01:00
Gwilym Inzani ea792f4768 Print the actual effect character 2024-08-28 16:10:26 +01:00
Gwilym Inzani 6c4e83197d
Add a method to stop the tracker (#756)
I've done some horrible hacks for this in our jam games. Better to have
a first-party solution to stopping channels in the tracker.

- [x] Changelog updated
2024-08-28 15:58:02 +01:00
Gwilym Inzani 040d3d5604 Changelog entry about stopping the tracker 2024-08-28 15:49:38 +01:00
Gwilym Inzani 8cec568a5b Add a method to stop the tracker 2024-08-28 15:48:43 +01:00
Gwilym Inzani 84a3c0b6a0
Allowing imported graphics to be exposed as pub mod (#738)
- [X] Changelog updated

This PR adds the possibility for graphics imported through
`include_background_gfx!` to be used as public modules, e.g.:
```rust
/// graphics.rs
agb::include_background_gfx!(pub background, "d77bba", tiles256 => 256 "map.aseprite");

/// main.rs
#![no_std]
#![no_main]

use agb::display::Priority;
use agb::display::tiled::RegularBackgroundSize::Background64x64;
use agb::display::tiled::{TiledMap, TileFormat};

mod graphics;


#[agb::entry]
fn main(mut gba: agb::Gba) -> ! {
    let (tiled, mut vram) = gba.display.video.tiled1();
    let vblank = agb::interrupt::VBlank::get();
    let tileset = &graphics::background::tiles256.tiles;

    vram.set_background_palettes(graphics::background::PALETTES);

    let mut bg = tiled.regular(Priority::P2, Background64x64, TileFormat::EightBpp);

    for y in 0..64u16 {
        for x in 0..64u16 {
            bg.set_tile(&mut vram, (x, y), tileset, graphics::background::tiles256.tile_settings[1]);
        }
    }
    bg.set_visible(true);
    bg.commit(&mut vram);

    loop {
        vblank.wait_for_vblank();
    }
}
```
2024-08-28 15:02:41 +01:00
Gwilym Inzani f25fe7f707 Add docs for pub exports of backgrounds 2024-08-28 14:55:12 +01:00
Gwilym Inzani a0d5a2c269
Update Javascript packages (non-major) (#746)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node))
| [`20.14.12` ->
`20.16.2`](https://renovatebot.com/diffs/npm/@types%2fnode/20.14.12/20.16.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.14.12/20.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.14.12/20.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react))
| [`18.3.3` ->
`18.3.4`](https://renovatebot.com/diffs/npm/@types%2freact/18.3.3/18.3.4)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.3.3/18.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.3.3/18.3.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[eslint-config-next](https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config)
([source](https://togithub.com/vercel/next.js/tree/HEAD/packages/eslint-config-next))
| [`14.2.5` ->
`14.2.7`](https://renovatebot.com/diffs/npm/eslint-config-next/14.2.5/14.2.7)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-config-next/14.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-config-next/14.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-config-next/14.2.5/14.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-config-next/14.2.5/14.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [next](https://nextjs.org)
([source](https://togithub.com/vercel/next.js)) | [`14.2.5` ->
`14.2.7`](https://renovatebot.com/diffs/npm/next/14.2.5/14.2.7) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/next/14.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/next/14.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/next/14.2.5/14.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/next/14.2.5/14.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [sharp](https://sharp.pixelplumbing.com)
([source](https://togithub.com/lovell/sharp),
[changelog](https://togithub.com/lovell/sharp/blob/main/docs/changelog.md))
| [`0.33.4` ->
`0.33.5`](https://renovatebot.com/diffs/npm/sharp/0.33.4/0.33.5) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/sharp/0.33.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/sharp/0.33.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/sharp/0.33.4/0.33.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/sharp/0.33.4/0.33.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vercel/next.js (eslint-config-next)</summary>

###
[`v14.2.7`](https://togithub.com/vercel/next.js/compare/v14.2.6...v14.2.7)

[Compare
Source](https://togithub.com/vercel/next.js/compare/v14.2.6...v14.2.7)

###
[`v14.2.6`](https://togithub.com/vercel/next.js/compare/v14.2.5...v14.2.6)

[Compare
Source](https://togithub.com/vercel/next.js/compare/v14.2.5...v14.2.6)

</details>

<details>
<summary>vercel/next.js (next)</summary>

###
[`v14.2.7`](https://togithub.com/vercel/next.js/compare/v14.2.6...v14.2.7)

[Compare
Source](https://togithub.com/vercel/next.js/compare/v14.2.6...v14.2.7)

###
[`v14.2.6`](https://togithub.com/vercel/next.js/compare/v14.2.5...v14.2.6)

[Compare
Source](https://togithub.com/vercel/next.js/compare/v14.2.5...v14.2.6)

</details>

<details>
<summary>lovell/sharp (sharp)</summary>

###
[`v0.33.5`](https://togithub.com/lovell/sharp/compare/v0.33.4...v0.33.5)

[Compare
Source](https://togithub.com/lovell/sharp/compare/v0.33.4...v0.33.5)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/agbrs/agb).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM4LjU2LjAiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOltdfQ==-->
2024-08-28 14:52:41 +01:00
Gwilym Inzani 6212ce0baf
Update Rust crate bindgen to 0.70 (#750)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [bindgen](https://rust-lang.github.io/rust-bindgen/)
([source](https://togithub.com/rust-lang/rust-bindgen)) |
build-dependencies | minor | `0.69` -> `0.70` |

---

### Release Notes

<details>
<summary>rust-lang/rust-bindgen (bindgen)</summary>

###
[`v0.70.1`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0701-2024-08-20)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.70.0...v0.70.1)

#### Added

#### Changed

#### Removed

#### Fixed

- Fix regression where the `const` layout tests were triggering the
`unnecessary_operation` and `identity_op` clippy warnings.

#### Security

###
[`v0.70.0`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0700-2024-08-16)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.69.4...v0.70.0)

#### Added

-   Add target mappings for riscv64imac and riscv32imafc.
- Add a complex macro fallback API
([#&#8203;2779](https://togithub.com/rust-lang/rust-bindgen/issues/2779)).
- Add option to use DST structs for flexible arrays (--flexarray-dst,
[#&#8203;2772](https://togithub.com/rust-lang/rust-bindgen/issues/2772)).
- Add option to dynamically load variables
([#&#8203;2812](https://togithub.com/rust-lang/rust-bindgen/issues/2812)).
- Add option in CLI to use rustified non-exhaustive enums
(--rustified-non-exhaustive-enum,
[#&#8203;2847](https://togithub.com/rust-lang/rust-bindgen/issues/2847)).

#### Changed

- Remove which and lazy-static dependencies
([#&#8203;2809](https://togithub.com/rust-lang/rust-bindgen/issues/2809),
[#&#8203;2817](https://togithub.com/rust-lang/rust-bindgen/issues/2817)).
- Generate compile-time layout tests
([#&#8203;2787](https://togithub.com/rust-lang/rust-bindgen/issues/2787)).
- Print `bindgen-cli` errors to stderr instead of stdout
([#&#8203;2840](https://togithub.com/rust-lang/rust-bindgen/issues/2840))

#### Removed

#### Fixed

- Fix `--formatter=prettyplease` not working in `bindgen-cli` by adding
`prettyplease` feature and
enabling it by default for `bindgen-cli`
([#&#8203;2789](https://togithub.com/rust-lang/rust-bindgen/issues/2789))
.
- Fix `--allowlist-item` so anonymous enums are no longer ignored
([#&#8203;2827](https://togithub.com/rust-lang/rust-bindgen/issues/2827)).
- Use clang_getFileLocation instead of clang_getSpellingLocation to fix
clang-trunk
([#&#8203;2824](https://togithub.com/rust-lang/rust-bindgen/issues/2824)).
- Fix generated constants: `f64::INFINITY`, `f64::NEG_ INFINITY`,
`f64::NAN`
([#&#8203;2854](https://togithub.com/rust-lang/rust-bindgen/issues/2854)).

#### Security

- Update `tempfile` and `rustix` due to
[GHSA-c827-hfw6-qwvm](https://togithub.com/advisories/GHSA-c827-hfw6-qwvm).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/agbrs/agb).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2024-08-28 12:51:49 +01:00
Gwilym Inzani 605173bf65
It doesn't appear to be an error to have an invalid instrument index (#755)
I've seen an xm file that plays fine in milkytracker and other places,
but has instrument indexes which are too high. They are just treated as
non-existent :)

- [x] no changelog update needed
2024-08-28 12:34:55 +01:00
Gwilym Inzani d617bd10d0
Jam 2024 changes (#752)
- [ ] Changelog updated / no changelog update needed
2024-08-28 12:34:20 +01:00
renovate[bot] 0d9bcc61cd
Update Rust crate bindgen to 0.70 2024-08-28 11:28:32 +00:00
renovate[bot] adb70ddc82
Update Javascript packages (non-major) 2024-08-28 11:28:27 +00:00
Gwilym Inzani 7d0ad0d497 State that this is text 2024-08-28 12:27:27 +01:00