Typedefs | |
typedef enum yaze_status | yaze_status |
Status codes returned by YAZE functions. | |
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. | |
typedef enum yaze_status yaze_status |
Status codes returned by YAZE functions.
All YAZE functions that can fail return a status code to indicate success or the type of error that occurred.
enum yaze_status |
Status codes returned by YAZE functions.
All YAZE functions that can fail return a status code to indicate success or the type of error that occurred.
const char * yaze_status_to_string | ( | yaze_status | status | ) |
Convert a status code to a human-readable string.
status | The status code to convert |
Definition at line 40 of file yaze.cc.
References YAZE_ERROR_CORRUPTION, YAZE_ERROR_FILE_NOT_FOUND, YAZE_ERROR_INVALID_ARG, YAZE_ERROR_IO, YAZE_ERROR_MEMORY, YAZE_ERROR_NOT_INITIALIZED, YAZE_ERROR_UNKNOWN, and YAZE_OK.
yaze_status yaze_library_init | ( | void | ) |
Initialize the YAZE library.
This function must be called before using any other YAZE functions. It initializes internal subsystems and prepares the library for use.
Definition at line 19 of file yaze.cc.
References YAZE_OK.
Referenced by yaze_init().
void yaze_library_shutdown | ( | void | ) |
Shutdown the YAZE library.
This function cleans up resources allocated by yaze_library_init(). After calling this function, no other YAZE functions should be called until yaze_library_init() is called again.
int yaze_app_main | ( | int | argc, |
char ** | argv | ||
) |
Main entry point for the YAZE application.
argc | Number of command line arguments |
argv | Array of command line argument strings |
bool yaze_check_version_compatibility | ( | const char * | expected_version | ) |
Check if the current YAZE version is compatible with the expected version.
expected_version | Expected version string (e.g., "0.3.2") |
Definition at line 71 of file yaze.cc.
References YAZE_VERSION_STRING.
const char * yaze_get_version_string | ( | void | ) |
Get the current YAZE version string.
Definition at line 63 of file yaze.cc.
References YAZE_VERSION_STRING.
int yaze_get_version_number | ( | void | ) |
Get the current YAZE version number.
Definition at line 67 of file yaze.cc.
References YAZE_VERSION_NUMBER.
yaze_status yaze_init | ( | yaze_editor_context * | context, |
const char * | rom_filename | ||
) |
Initialize a YAZE editor context.
Creates and initializes an editor context for working with ROM files. The context manages the ROM data and provides access to editing functions.
context | Pointer to context structure to initialize |
rom_filename | Path to the ROM file to load (can be NULL to create empty context) |
Definition at line 78 of file yaze.cc.
References yaze_editor_context::error_message, yaze_editor_context::rom, YAZE_ERROR_FILE_NOT_FOUND, YAZE_ERROR_INVALID_ARG, yaze_library_init(), yaze_load_rom(), and YAZE_OK.
yaze_status yaze_shutdown | ( | yaze_editor_context * | context | ) |
Shutdown and clean up a YAZE editor context.
Releases all resources associated with the context, including ROM data. After calling this function, the context should not be used.
context | Pointer to context to shutdown |
Definition at line 104 of file yaze.cc.
References yaze_editor_context::error_message, yaze_editor_context::rom, YAZE_ERROR_INVALID_ARG, YAZE_OK, and yaze_unload_rom().