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

Classes

struct  zelda3_message
 In-game text message data. More...
 

Typedefs

typedef struct zelda3_message zelda3_message
 In-game text message data.
 

Functions

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.
 

Detailed Description

Typedef Documentation

◆ zelda3_message

In-game text message data.

Represents a text message from the game, including both raw ROM data and parsed/decoded text content.

Function Documentation

◆ yaze_load_messages()

yaze_status yaze_load_messages ( const zelda3_rom rom,
zelda3_message **  messages,
int *  message_count 
)

Load all text messages from ROM.

Loads and parses all in-game text messages from the ROM.

Parameters
romThe ROM to load messages from
messagesPointer to store array of messages
message_countPointer to store number of messages loaded
Returns
YAZE_OK on success, error code on failure
Note
Caller must free the messages array when done
Todo:
Detect compression
Todo:
Detect encoding

Definition at line 234 of file yaze.cc.

References zelda3_rom::data, zelda3_message::id, zelda3_rom::impl, yaze::editor::ReadAllTextData(), YAZE_ERROR_INVALID_ARG, YAZE_ERROR_MEMORY, YAZE_ERROR_NOT_INITIALIZED, and YAZE_OK.

Here is the call graph for this function:

◆ yaze_get_message()

const zelda3_message * yaze_get_message ( const zelda3_rom rom,
int  message_id 
)

Get a specific message by ID.

Parameters
romROM to load from
message_idMessage ID to retrieve
Returns
Pointer to message data, or NULL if not found

◆ yaze_free_messages()

void yaze_free_messages ( zelda3_message messages,
int  message_count 
)

Free message data.

Parameters
messagesArray of messages to free
message_countNumber of messages in array