yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
ROM Manipulation

Functions

zelda3_romyaze_load_rom_file (const char *filename)
 Load a ROM file.
 
yaze_status yaze_validate_rom (const zelda3_rom *rom)
 Validate ROM integrity.
 
yaze_status yaze_get_rom_info (const zelda3_rom *rom, zelda3_version *version, uint64_t *size)
 Get ROM information.
 
snes_color yaze_get_color_from_paletteset (const zelda3_rom *rom, int palette_set, int palette, int color)
 Get a color from a palette set.
 

Detailed Description

Function Documentation

◆ yaze_load_rom_file()

zelda3_rom * yaze_load_rom_file ( const char *  filename)

Load a ROM file.

Loads a Zelda 3 ROM file and validates its format.

Parameters
filenamePath to ROM file (.sfc, .smc, etc.)
Returns
Pointer to ROM structure, or NULL on error
Note
Caller must call yaze_unload_rom() to free memory

◆ yaze_validate_rom()

yaze_status yaze_validate_rom ( const zelda3_rom rom)

Validate ROM integrity.

Checks if the ROM data is valid and uncorrupted.

Parameters
romROM to validate
Returns
YAZE_OK if valid, error code if corrupted

◆ yaze_get_rom_info()

yaze_status yaze_get_rom_info ( const zelda3_rom rom,
zelda3_version version,
uint64_t *  size 
)

Get ROM information.

Parameters
romROM to query
versionPointer to store detected ROM version
sizePointer to store ROM size in bytes
Returns
YAZE_OK on success, error code on failure

◆ yaze_get_color_from_paletteset()

snes_color yaze_get_color_from_paletteset ( const zelda3_rom rom,
int  palette_set,
int  palette,
int  color 
)

Get a color from a palette set.

Retrieves a specific color from a palette set in the ROM.

Parameters
romThe ROM to get the color from
palette_setThe palette set index (0-255)
paletteThe palette index within the set (0-15)
colorThe color index within the palette (0-15)
Returns
The color from the palette set

Definition at line 181 of file yaze.cc.

References snes_color::blue, snes_color::green, zelda3_rom::impl, yaze::gfx::kPaletteGroupAddressesKeys, yaze::Rom::palette_group(), and snes_color::red.

Here is the call graph for this function: