yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze.h File Reference

Yet Another Zelda3 Editor (YAZE) - Public C API. More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "zelda.h"
Include dependency graph for yaze.h:

Go to the source code of this file.

Classes

struct  yaze_editor_context
 
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
 
struct  yaze_extension
 Extension interface for YAZE. More...
 

Macros

#define YAZE_VERSION_STRING   "0.3.2"
 
#define YAZE_VERSION_NUMBER   302
 
#define YAZE_EXT_CAP_ROM_EDITING   (1 << 0)
 
#define YAZE_EXT_CAP_GRAPHICS   (1 << 1)
 
#define YAZE_EXT_CAP_AUDIO   (1 << 2)
 
#define YAZE_EXT_CAP_SCRIPTING   (1 << 3)
 
#define YAZE_EXT_CAP_IMPORT_EXPORT   (1 << 4)
 

Typedefs

typedef struct yaze_editor_context yaze_editor_context
 
typedef enum yaze_status yaze_status
 Status codes returned by YAZE functions.
 
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
 
typedef void(* yaze_initialize_func) (yaze_editor_context *context)
 Function pointer to initialize the extension.
 
typedef void(* yaze_cleanup_func) (void)
 
typedef struct yaze_extension yaze_extension
 Extension interface for YAZE.
 

Enumerations

enum  yaze_status {
  YAZE_OK = 0 , YAZE_ERROR_UNKNOWN = -1 , YAZE_ERROR_INVALID_ARG = 1 , YAZE_ERROR_FILE_NOT_FOUND = 2 ,
  YAZE_ERROR_MEMORY = 3 , YAZE_ERROR_IO = 4 , YAZE_ERROR_CORRUPTION = 5 , YAZE_ERROR_NOT_INITIALIZED = 6
}
 Status codes returned by YAZE functions. More...
 

Functions

const char * yaze_status_to_string (yaze_status status)
 Convert a status code to a human-readable string.
 
yaze_status yaze_library_init (void)
 Initialize the YAZE library.
 
void yaze_library_shutdown (void)
 Shutdown the YAZE library.
 
int yaze_app_main (int argc, char **argv)
 Main entry point for the YAZE application.
 
bool yaze_check_version_compatibility (const char *expected_version)
 Check if the current YAZE version is compatible with the expected version.
 
const char * yaze_get_version_string (void)
 Get the current YAZE version string.
 
int yaze_get_version_number (void)
 Get the current YAZE version number.
 
yaze_status yaze_init (yaze_editor_context *context, const char *rom_filename)
 Initialize a YAZE editor context.
 
yaze_status yaze_shutdown (yaze_editor_context *context)
 Shutdown and clean up a YAZE editor context.
 
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_paletteyaze_create_palette (uint16_t id, uint16_t size)
 Create an empty palette.
 
void yaze_free_palette (snes_palette *palette)
 Free palette memory.
 
snes_paletteyaze_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.
 
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.
 
zelda3_overworldyaze_load_overworld (const zelda3_rom *rom)
 Load the overworld from ROM.
 
void yaze_free_overworld (zelda3_overworld *overworld)
 Free overworld data.
 
const zelda3_overworld_mapyaze_get_overworld_map (const zelda3_overworld *overworld, int map_index)
 Get overworld map by index.
 
int yaze_get_overworld_map_count (const zelda3_overworld *overworld)
 Get total number of overworld maps.
 
zelda3_dungeon_roomyaze_load_all_rooms (const zelda3_rom *rom, int *room_count)
 Load all dungeon rooms from ROM.
 
const zelda3_dungeon_roomyaze_load_room (const zelda3_rom *rom, int room_id)
 Load a specific dungeon room.
 
void yaze_free_rooms (zelda3_dungeon_room *rooms, int room_count)
 Free dungeon room data.
 
yaze_status yaze_load_messages (const zelda3_rom *rom, zelda3_message **messages, int *message_count)
 Load all text messages from ROM.
 
const zelda3_messageyaze_get_message (const zelda3_rom *rom, int message_id)
 Get a specific message by ID.
 
void yaze_free_messages (zelda3_message *messages, int message_count)
 Free message data.
 
yaze_status yaze_register_extension (const yaze_extension *extension)
 Register an extension with YAZE.
 
yaze_status yaze_unregister_extension (const char *name)
 Unregister an extension.
 

Detailed Description

Yet Another Zelda3 Editor (YAZE) - Public C API.

This header provides the main C API for YAZE, a modern ROM editor for The Legend of Zelda: A Link to the Past. This API allows external applications to interact with YAZE's functionality.

Version
0.3.2
Author
YAZE Team

Definition in file yaze.h.

Typedef Documentation

◆ yaze_editor_context

◆ yaze_initialize_func

typedef void(* yaze_initialize_func) (yaze_editor_context *context)

Function pointer to initialize the extension.

Parameters
contextThe editor context.

Definition at line 502 of file yaze.h.

◆ yaze_cleanup_func

typedef void(* yaze_cleanup_func) (void)

Definition at line 503 of file yaze.h.