Classes | |
| struct | yaze_bitmap |
| Bitmap data structure. More... | |
| struct | snes_color |
| SNES color in 15-bit RGB format (BGR555) More... | |
| struct | snes_palette |
| SNES color palette. More... | |
| struct | snes_tile8 |
| 8x8 SNES tile data More... | |
| struct | snes_tile_info |
| struct | snes_tile16 |
| struct | snes_tile32 |
Typedefs | |
| typedef struct yaze_bitmap | yaze_bitmap |
| Bitmap data structure. | |
| typedef struct snes_color | snes_color |
| SNES color in 15-bit RGB format (BGR555) | |
| typedef struct snes_palette | snes_palette |
| SNES color palette. | |
| typedef struct snes_tile8 | snes_tile8 |
| 8x8 SNES tile data | |
| typedef struct snes_tile_info | snes_tile_info |
| typedef struct snes_tile16 | snes_tile16 |
| typedef struct snes_tile32 | snes_tile32 |
Functions | |
| yaze_bitmap | yaze_load_bitmap (const char *filename) |
| Load a bitmap from file. | |
| void | yaze_free_bitmap (yaze_bitmap *bitmap) |
| Free bitmap data. | |
| yaze_bitmap | yaze_create_bitmap (int width, int height, uint8_t bpp) |
| Create an empty bitmap. | |
| snes_color | yaze_rgb_to_snes_color (uint8_t r, uint8_t g, uint8_t b) |
| Convert RGB888 color to SNES color. | |
| void | yaze_snes_color_to_rgb (snes_color color, uint8_t *r, uint8_t *g, uint8_t *b) |
| Convert SNES color to RGB888. | |
| snes_palette * | yaze_create_palette (uint16_t id, uint16_t size) |
| Create an empty palette. | |
| void | yaze_free_palette (snes_palette *palette) |
| Free palette memory. | |
| snes_palette * | yaze_load_palette_from_rom (const zelda3_rom *rom, uint16_t palette_id) |
| Load palette from ROM. | |
| snes_tile8 | yaze_load_tile_from_rom (const zelda3_rom *rom, uint32_t tile_id, uint8_t bpp) |
| Load tile data from ROM. | |
| snes_tile8 | yaze_convert_tile_bpp (const snes_tile8 *tile, uint8_t from_bpp, uint8_t to_bpp) |
| Convert tile data between different bit depths. | |
| typedef struct yaze_bitmap yaze_bitmap |
Bitmap data structure.
Represents a bitmap image with pixel data and metadata.
| typedef struct snes_color snes_color |
SNES color in 15-bit RGB format (BGR555)
Represents a color in the SNES native format. Colors are stored as 8-bit values but only the lower 5 bits are used by the SNES.
| typedef struct snes_palette snes_palette |
SNES color palette.
Represents a color palette used by the SNES. Each palette contains up to 256 colors, though most modes use fewer colors per palette.
| typedef struct snes_tile8 snes_tile8 |
8x8 SNES tile data
Represents an 8x8 pixel tile with indexed color data. Each pixel value is an index into a palette.
| typedef struct snes_tile_info snes_tile_info |
| typedef struct snes_tile16 snes_tile16 |
| typedef struct snes_tile32 snes_tile32 |
| yaze_bitmap yaze_load_bitmap | ( | const char * | filename | ) |
Load a bitmap from file.
Loads a bitmap image from the specified file. Supports common image formats and SNES-specific formats.
| filename | Path to the image file |
Definition at line 172 of file yaze.cc.
References yaze_bitmap::bpp, yaze_bitmap::data, yaze_bitmap::height, and yaze_bitmap::width.
| void yaze_free_bitmap | ( | yaze_bitmap * | bitmap | ) |
Free bitmap data.
Releases memory allocated for bitmap pixel data.
| bitmap | Pointer to bitmap structure to free |
Definition at line 280 of file yaze.cc.
References yaze_bitmap::bpp, yaze_bitmap::data, yaze_bitmap::height, and yaze_bitmap::width.
| yaze_bitmap yaze_create_bitmap | ( | int | width, |
| int | height, | ||
| uint8_t | bpp | ||
| ) |
Create an empty bitmap.
Allocates a new bitmap with the specified dimensions.
| width | Width in pixels |
| height | Height in pixels |
| bpp | Bits per pixel |
Definition at line 290 of file yaze.cc.
References yaze_bitmap::bpp, yaze_bitmap::data, yaze_bitmap::height, and yaze_bitmap::width.
| snes_color yaze_rgb_to_snes_color | ( | uint8_t | r, |
| uint8_t | g, | ||
| uint8_t | b | ||
| ) |
Convert RGB888 color to SNES color.
| r | Red component (0-255) |
| g | Green component (0-255) |
| b | Blue component (0-255) |
Definition at line 306 of file yaze.cc.
References snes_color::blue, snes_color::green, and snes_color::red.
| void yaze_snes_color_to_rgb | ( | snes_color | color, |
| uint8_t * | r, | ||
| uint8_t * | g, | ||
| uint8_t * | b | ||
| ) |
Convert SNES color to RGB888.
| color | SNES color to convert |
| r | Pointer to store red component (0-255) |
| g | Pointer to store green component (0-255) |
| b | Pointer to store blue component (0-255) |
Definition at line 314 of file yaze.cc.
References snes_color::blue, snes_color::green, and snes_color::red.
| snes_palette * yaze_create_palette | ( | uint16_t | id, |
| uint16_t | size | ||
| ) |
Create an empty palette.
| id | Palette ID |
| size | Number of colors to allocate |
| void yaze_free_palette | ( | snes_palette * | palette | ) |
Free palette memory.
| palette | Pointer to palette to free |
| snes_palette * yaze_load_palette_from_rom | ( | const zelda3_rom * | rom, |
| uint16_t | palette_id | ||
| ) |
Load palette from ROM.
| rom | ROM to load palette from |
| palette_id | ID of palette to load |
| snes_tile8 yaze_load_tile_from_rom | ( | const zelda3_rom * | rom, |
| uint32_t | tile_id, | ||
| uint8_t | bpp | ||
| ) |
Load tile data from ROM.
| rom | ROM to load from |
| tile_id | ID of tile to load |
| bpp | Bits per pixel (1, 2, 4, 8) |
| snes_tile8 yaze_convert_tile_bpp | ( | const snes_tile8 * | tile, |
| uint8_t | from_bpp, | ||
| uint8_t | to_bpp | ||
| ) |
Convert tile data between different bit depths.
| tile | Source tile data |
| from_bpp | Source bits per pixel |
| to_bpp | Target bits per pixel |