N64FlashcartMenu
Loading...
Searching...
No Matches
boxart.c File Reference

Implementation of the boxart UI component. More...

Macros

#define OLD_BOXART_DIRECTORY   "menu/boxart"
 
#define METADATA_BASE_DIRECTORY   "menu/metadata"
 
#define HOMEBREW_ID_SUBDIRECTORY   "homebrew"
 

Functions

component_boxart_tui_components_boxart_init (const char *storage_prefix, const char *game_code, const char *rom_title, file_image_type_t current_image_view)
 Initialize and load the boxart component for a game.
 
void ui_components_boxart_free (component_boxart_t *b)
 Free the boxart component and its resources.
 
void ui_components_boxart_draw (component_boxart_t *b)
 Draw the boxart image or a loading placeholder.
 

Detailed Description

Implementation of the boxart UI component.

Function Documentation

◆ ui_components_boxart_init()

component_boxart_t * ui_components_boxart_init ( const char * storage_prefix,
const char * game_code,
const char * rom_title,
file_image_type_t current_image_view )

Initialize and load the boxart component for a game.

Initialize the box art component.

Attempts to locate and load the appropriate boxart image for the given game code and ROM title.

Parameters
storage_prefixThe storage prefix (e.g., SD card root).
game_codeThe 4-character game code.
rom_titleTitle of the ROM (may be NULL). If used, it is sanitized for filesystem safety.
current_image_viewThe current image view type (front, back, etc.).
Returns
Pointer to the initialized boxart component, or NULL on failure.

◆ ui_components_boxart_free()

void ui_components_boxart_free ( component_boxart_t * b)

Free the boxart component and its resources.

Free the box art component resources.

Parameters
bPointer to the boxart component.

◆ ui_components_boxart_draw()

void ui_components_boxart_draw ( component_boxart_t * b)

Draw the boxart image or a loading placeholder.

Draw the box art component.

Draws the loaded boxart image at the appropriate position, or a placeholder if not loaded.

Parameters
bPointer to the boxart component.