Expand description
Sprites and objects
There are two implementations of objects depending on how you want to make
your game. There is the Managed and Unmanaged systems, given by
OamManaged and OamUnmanaged respectively. The managed Oam is easier to
use and has built in support for setting the z
coordinate. The unmanaged
Oam is simpler and more efficient with the tradeoff that it is slightly
harder to integrate into your games depending on how they are architectured.
Macros
Structs
- An affine matrix that can be used on objects. It is just in time copied to vram, so you can have as many as you like of these but you can only use up to 16 in one frame. They are reference counted (Cloning is cheap) and immutable, if you want to change a matrix you must make a new one and set it on all your objects.
- Changes the palette to use to draw characters.
- Sprite data that can be used to create sprites in vram.
- Stores sprite and tag data returned by include_aseprite.
- The iterator over the OAM slots. Dropping this will finalise the frame. To use, iterate over and write to each slot.
- OAM that manages z ordering and commit all visible objects in one call. This is simpler to use than the
OamUnmanaged
, but is less performant depending on how objects are stored. - A slot in Oam that you can write to. Note that you must call OamSlot::set or else it is a bug and will panic when dropped.
- This handles the unmanaged oam system which gives more control to the OAM slots. This is utilised by calling the iter function and writing objects to those slots.
- A managed object used with the
OamManaged
interface. - The object text renderer. Uses objects to render and layout text. It’s use is non trivial. Changes the palette to use to draw characters.
- An object to be used by the
OamUnmanaged
system. Changes made here are reflected when set to an OamSlot usingOamSlot::set
. - A palette in vram, this is reference counted so it is cheap to Clone.
- Sprite data. Refers to the palette, pixel data, and the size of the sprite.
- This holds loading of static sprites and palettes.
- A sprite that is currently loaded into vram.
- A sequence of sprites from aseprite.
- Stores aseprite tags. Can be used to refer to animation sequences by name.
Enums
- The affine mode
- The sizes of sprite supported by the GBA.
- The text alignment of the layout
Type Aliases
- ObjectControllerDeprecatedThe old name for
OamManaged
kept around for easier migration. This will be removed in a future release.