The Socrates Gameboy Advance Development Engine
The SGADE is a development library for the Nintendo Gameboy
Advance. It's free for all uses and is distributed without guarantees.
For more information visit
the SGADE page.
Files | |
| file | SoTileSet.c |
| file | SoTileSet.h |
Data Structures | |
| struct | SoTileSet |
| Tileset structure. More... | |
Defines | |
| #define | SoTileSetGetNumTiles(a_This) |
| Returns the number of tiles in the TileSet. | |
| #define | SoTileSetIs16Colors(a_This) |
| Tests whether the tileset is palettized or not (returns true if palettized). | |
| #define | SoTileSetGetData(a_This) |
| Returns the actual texture data of the tileset. | |
Functions | |
| u32 | SoTileSetGetSize (const SoTileSet *a_This) |
| To get the size of the entire tileset. | |
| void | SoTileSetBkgLoad (const SoTileSet *a_This, u32 a_CharBase, u32 a_BaseIdx) |
| Loads tile data into background VRAM. | |
| void | SoTileSetCopyFromLinearBuffer (u32 *source, u32 *dest, u32 width, u32 height) |
| Copy a linear buffer to sprite format, which is organised in a linear array of 8*8 blocks. | |
A tile is an 8x8 square of palettized pixels. Either referring to a 16 color palette, or a 256 color palette.
You can use the SoConverter tool to convert images to tilesets.
|
||||||||||||||||
|
Loads tile data into background VRAM.
|
|
||||||||||||||||||||
|
Copy a linear buffer to sprite format, which is organised in a linear array of 8*8 blocks.
For optimal performance, make sure the source buffer is in iwram If your destination buffer is in vram, make sure to only use this in vblank, since the accestimes to vram are undefined while refreshing the display This function takes ~ 2% cpu time for a 64*64 sprite |
|
|
To get the size of the entire tileset.
|