Crate agb

Source
Expand description

§agb

agb is a library for making games on the Game Boy Advance using rust.

The library’s main focus is to provide an abstraction that allows you to develop games which take advantage of the GBA’s capabilities without needing to have extensive knowledge of its low-level implementation.

agb provides the following features:

  • Simple build process with minimal dependencies
  • Built in importing of sprites, backgrounds, music and sound effects
  • High performance audio mixer
  • Easy to use sprite and tiled background usage
  • A global allocator allowing for use of both core and alloc

A more detailed walkthrough can be found in the book, or you can play with the interactive examples to get a better feel of what’s possible.

Modules§

display
Implements everything relating to things which are displayed on the screen.
dma
Provides access to the GBA’s direct memory access (DMA) for advanced graphical effects.
external
Re-exports of situationally useful crates for GBA development
fixnum
Fixed point number implementation for representing non integers efficiently.
hash_map
A hash map implementation optimised for the Game Boy Advance.
input
Button inputs to the system.
interrupt
Interacting with the GBA interrupts.
rng
Simple random number generator.
save
Module for reading and writing to save media.
sound
Implements sound output.
test_runner
Unstable support for running tests using agb.
timer
Interactions with the internal timers.

Macros§

eprintln
Works like std::eprintln.
include_aseprite
Includes sprites found in the referenced aseprite files.
include_aseprite_256
Includes sprites found in the referenced aseprite files.
include_background_gfx
Include background tiles from a png, bmp or aseprite file.
include_colours
Includes the colours of an image in the order that they appear as an array of Rgb15.
include_font
Includes a ttf font to be usable by dynamic font rendering.
include_wav
Include a wav file to be used for sound effects or music.
println
Works like std::println.

Structs§

ExternalAllocator
This is the allocator for External Working RAM.
Gba
Controls access to the Game Boy Advance’s hardware.
InternalAllocator
This is the allocator for Internal Working RAM.

Functions§

halt
Halts the CPU until an interrupt occurs.
no_game
The no game screen is what is displayed if there isn’t a game made yet.

Attribute Macros§

doctest
This macro can be used to write a doc test
entry
This macro declares the entry point to your game written using agb.