yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze.h File Reference
#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
 
struct  snes_color
 Primitive of 16-bit RGB SNES color. More...
 
struct  snes_palette
 Primitive of a SNES color palette. More...
 
struct  snes_tile8
 
struct  snes_tile_info
 
struct  snes_tile16
 
struct  snes_tile32
 
struct  yaze_extension
 Extension interface for Yaze. More...
 

Typedefs

typedef struct yaze_editor_context yaze_editor_context
 
typedef enum yaze_status yaze_status
 
typedef struct yaze_bitmap yaze_bitmap
 
typedef struct snes_color snes_color
 Primitive of 16-bit RGB SNES color.
 
typedef struct snes_palette snes_palette
 Primitive of a SNES color palette.
 
typedef struct snes_tile8 snes_tile8
 
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_UNKNOWN = -1 , YAZE_OK = 0 , YAZE_ERROR = 1 }
 

Functions

int yaze_app_main (int argc, char **argv)
 
void yaze_check_version (const char *version)
 
yaze_status yaze_init (yaze_editor_context *, char *rom_filename)
 
yaze_status yaze_shutdown (yaze_editor_context *)
 
yaze_bitmap yaze_load_bitmap (const char *filename)
 
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 the ROM.
 
zelda3_dungeon_roomyaze_load_all_rooms (const zelda3_rom *rom)
 Load all rooms from the ROM.
 
yaze_status yaze_load_messages (zelda3_rom *rom, zelda3_message **messages)
 Load all messages from the ROM.
 

Typedef Documentation

◆ yaze_editor_context

typedef struct yaze_editor_context yaze_editor_context

◆ yaze_status

typedef enum yaze_status yaze_status

◆ yaze_bitmap

typedef struct yaze_bitmap yaze_bitmap

◆ snes_color

typedef struct snes_color snes_color

Primitive of 16-bit RGB SNES color.

◆ snes_palette

typedef struct snes_palette snes_palette

Primitive of a SNES color palette.

◆ snes_tile8

typedef struct snes_tile8 snes_tile8

◆ snes_tile_info

typedef struct snes_tile_info snes_tile_info

◆ snes_tile16

typedef struct snes_tile16 snes_tile16

◆ snes_tile32

typedef struct snes_tile32 snes_tile32

◆ 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 138 of file yaze.h.

◆ yaze_cleanup_func

typedef void(* yaze_cleanup_func) (void)

Definition at line 139 of file yaze.h.

◆ yaze_extension

typedef struct yaze_extension yaze_extension

Extension interface for Yaze.

Yaze extensions can be written in C or Python.

Enumeration Type Documentation

◆ yaze_status

Enumerator
YAZE_UNKNOWN 
YAZE_OK 
YAZE_ERROR 

Definition at line 19 of file yaze.h.

Function Documentation

◆ yaze_app_main()

int yaze_app_main ( int argc,
char ** argv )

Definition at line 19 of file yaze.cc.

References EXIT_IF_ERROR, yaze::util::global_flag_registry(), yaze::util::FlagParser::Parse(), and RETURN_IF_EXCEPTION.

Here is the call graph for this function:

◆ yaze_check_version()

void yaze_check_version ( const char * version)

Definition at line 45 of file yaze.cc.

◆ yaze_init()

yaze_status yaze_init ( yaze_editor_context * yaze_ctx,
char * rom_filename )

Definition at line 59 of file yaze.cc.

References yaze_editor_context::error_message, yaze_editor_context::rom, and yaze_load_rom().

Here is the call graph for this function:

◆ yaze_shutdown()

yaze_status yaze_shutdown ( yaze_editor_context * yaze_ctx)

Definition at line 69 of file yaze.cc.

References yaze_editor_context::rom, and yaze_unload_rom().

Here is the call graph for this function:

◆ yaze_load_bitmap()

yaze_bitmap yaze_load_bitmap ( const char * filename)

Definition at line 113 of file yaze.cc.

References yaze_bitmap::bpp, yaze_bitmap::data, yaze_bitmap::height, and yaze_bitmap::width.

◆ 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.

This function gets a color from a palette set and returns it as a snes_color object.

Parameters
romThe ROM to get the color from.
palette_setThe palette set to get the color from.
paletteThe palette to get the color from.
colorThe color to get from the palette.
Returns
The color from the palette set.

Definition at line 122 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:

◆ yaze_load_overworld()

zelda3_overworld * yaze_load_overworld ( const zelda3_rom * rom)

Load the overworld from the ROM.

Parameters
romThe ROM to load the overworld from.
Returns
The status of the operation. If the operation is successful, the overworld object will be populated with the overworld from the ROM.

Definition at line 144 of file yaze.cc.

References zelda3_overworld_map::id, zelda3_overworld::impl, zelda3_rom::impl, and zelda3_overworld::maps.

◆ yaze_load_all_rooms()

zelda3_dungeon_room * yaze_load_all_rooms ( const zelda3_rom * rom)

Load all rooms from the ROM.

This function loads all rooms from the ROM and returns them as an array of rooms.

Parameters
romThe ROM to load rooms from.
Returns
The status of the operation. If the operation is successful, the rooms array will be populated with the rooms from the ROM.

Definition at line 166 of file yaze.cc.

References zelda3_rom::impl.

◆ yaze_load_messages()

yaze_status yaze_load_messages ( zelda3_rom * rom,
zelda3_message ** messages )

Load all messages from the ROM.

This function loads all messages from the ROM and returns them as an array of messages.

Parameters
romThe ROM to load messages from.
messagesPointer to an array of messages.
Returns
The status of the operation. If the operation is successful, the messages array will be populated with the messages from the ROM.

Definition at line 175 of file yaze.cc.

References zelda3_message::address, zelda3_message::contents_parsed, zelda3_message::data, zelda3_rom::data, zelda3_message::data_parsed, zelda3_message::id, zelda3_rom::impl, zelda3_message::raw_string, and yaze::editor::ReadAllTextData().

Here is the call graph for this function: