Functions for creating and replacing new messages. More...
Functions | |
void | EZTR_Basic_AddCustomBuffer (EZTR_CustomMsgHandle handle, EZTR_MsgBuffer *buf, EZTR_MsgCallback callback) |
Declare a brand new (i.e: custom) message by copying from a buffer defined by the user. | |
void | EZTR_Basic_AddCustomText (EZTR_CustomMsgHandle handle, u8 text_box_type, u8 text_box_y_pos, u8 display_icon, u16 next_message_id, u16 first_item_rupees, u16 second_item_rupees, bool pipe_escape_bytes, char *content, EZTR_MsgCallback callback,...) |
Declare a brand new (i.e: custom) message by defining the header attributes and message content. | |
void | EZTR_Basic_AddCustomTextEmpty (EZTR_CustomMsgHandle handle, EZTR_MsgCallback callback) |
Declare a brand new (i.e: custom) message, where the replacement message is empty. | |
void | EZTR_Basic_ReplaceCustomBuffer (EZTR_CustomMsgHandle handle, EZTR_MsgBuffer *buf, EZTR_MsgCallback callback) |
Declare a replacement for a custom message by copying from a buffer defined by the user. | |
void | EZTR_Basic_ReplaceCustomText (EZTR_CustomMsgHandle handle, u8 text_box_type, u8 text_box_y_pos, u8 display_icon, u16 next_message_id, u16 first_item_rupees, u16 second_item_rupees, bool pipe_escape_bytes, char *content, EZTR_MsgCallback callback,...) |
Declare a replacement of a custom message by defining the header attributes and message content. | |
void | EZTR_Basic_ReplaceCustomTextEmpty (EZTR_CustomMsgHandle handle, EZTR_MsgCallback callback) |
Declare a replacement of a custom message, where the replacement message is empty. | |
Functions for creating and replacing new messages.
void EZTR_Basic_AddCustomBuffer | ( | EZTR_CustomMsgHandle | handle, |
EZTR_MsgBuffer * | buf, | ||
EZTR_MsgCallback | callback ) |
Declare a brand new (i.e: custom) message by copying from a buffer defined by the user.
If you've defined a message using the MsgBuffer/MsgSContent functions, you can use this to set it (or, rather, a copy of it) as the new message.
To avoid potential ID conflicts between mods, the u16 textId for this message will be assigned by EZTR and will be accessable via the handle. See EZTR_CustomMsgHandle
for more information on how custom message handles work.
handle | The handle for the new message. |
buf | The message buffer to copy from. |
callback | A function pointer to call right before this text is displayed. Useful for dynamic text. Set as NULL if you don't want to use a callback. See EZTR_MsgCallback for more information. |
void EZTR_Basic_AddCustomText | ( | EZTR_CustomMsgHandle | handle, |
u8 | text_box_type, | ||
u8 | text_box_y_pos, | ||
u8 | display_icon, | ||
u16 | next_message_id, | ||
u16 | first_item_rupees, | ||
u16 | second_item_rupees, | ||
bool | pipe_escape_bytes, | ||
char * | content, | ||
EZTR_MsgCallback | callback, | ||
... ) |
Declare a brand new (i.e: custom) message by defining the header attributes and message content.
This is probably the easiest method to declare new messages.
The content
argument uses EZTR's printf formatting arguments, specified after callback
. See EZTR Printf Functions for more information on EZTR's custom printf behavior.
To avoid potential ID conflicts between mods, the u16 textId for this message will be assigned by EZTR and will be accessable via the handle. See EZTR_CustomMsgHandle
for more information on how custom message handles work.
handle | The handle for the new message. |
text_box_type | The style of textbox to display. Use the EZTR_TextBoxType enum for more readable values. |
text_box_y_pos | The vertical position of the textbox on-screen. |
display_icon | Displays an icon in the textbox. Use the EZTR_TextBoxIcon enum for more readable values. Use EZTR_ICON_NO_ICON for no icon. |
next_message_id | The next message to display. If there is no next message, or the next message is determined by code, use 0xFFFF or EZTR_NO_VALUE . |
first_item_rupees | The price of the first item being offered for sale, if one exists. If there is no item, use 0xFFFF or EZTR_NO_VALUE . |
second_item_rupees | The price of the second item being offered for sale, if one exists. If there is no item, use 0xFFFF or EZTR_NO_VALUE . |
pipe_escape_bytes | If true, content is passed through EZTR_MsgBuffer_Sprintf("%m", content) . If false, then content is copied directly into storage. |
content | The new text content to display. If you want empty content (for use with dynamic messages), use "\xBF". |
callback | A function pointer to call right before this text is displayed. Useful for dynamic messages. Set as NULL if you don't want to use a callback. See EZTR_MsgCallback for more information. |
... | variable arguments, using EZTR's printf implementation. |
void EZTR_Basic_AddCustomTextEmpty | ( | EZTR_CustomMsgHandle | handle, |
EZTR_MsgCallback | callback ) |
Declare a brand new (i.e: custom) message, where the replacement message is empty.
This is primarily used if you want the message to be completely dynamically generated.
To avoid potential ID conflicts between mods, the u16 textId for this message will be assigned by EZTR and will be accessable via the handle. See EZTR_CustomMsgHandle
for more information on how custom message handles work.
handle | The handle for the new message. |
callback | A function pointer to call right before this text is displayed, in which you will construct the complete message buffer dynamically. See EZTR_MsgCallback for more information. |
void EZTR_Basic_ReplaceCustomBuffer | ( | EZTR_CustomMsgHandle | handle, |
EZTR_MsgBuffer * | buf, | ||
EZTR_MsgCallback | callback ) |
Declare a replacement for a custom message by copying from a buffer defined by the user.
If you've defined a message using the MsgBuffer/MsgSContent functions, you can use this to set it (or, rather, a copy of it) as the new message.
handle | The handle for the message being replaced. |
buf | The message buffer to copy from. |
callback | A function pointer to call right before this text is displayed. Useful for dynamic text. Set as NULL if you don't want to use a callback. See EZTR_MsgCallback for more information. |
void EZTR_Basic_ReplaceCustomText | ( | EZTR_CustomMsgHandle | handle, |
u8 | text_box_type, | ||
u8 | text_box_y_pos, | ||
u8 | display_icon, | ||
u16 | next_message_id, | ||
u16 | first_item_rupees, | ||
u16 | second_item_rupees, | ||
bool | pipe_escape_bytes, | ||
char * | content, | ||
EZTR_MsgCallback | callback, | ||
... ) |
Declare a replacement of a custom message by defining the header attributes and message content.
This is probably the easiest method to replace custom messages, even those defined by other mods.
The content
argument uses EZTR's printf formatting arguments, specified after callback
. See EZTR Printf Functions for more information on EZTR's custom printf behavior.
handle | The handle for the message being replaced. |
text_box_type | The style of textbox to display. Use the EZTR_TextBoxType enum for more readable values. |
text_box_y_pos | The vertical position of the textbox on-screen. |
display_icon | Displays an icon in the textbox. Use the EZTR_TextBoxIcon enum for more readable values. Use EZTR_ICON_NO_ICON for no icon. |
next_message_id | The next message to display. If there is no next message, or the next message is determined by code, use 0xFFFF or EZTR_NO_VALUE . |
first_item_rupees | The price of the first item being offered for sale, if one exists. If there is no item, use 0xFFFF or EZTR_NO_VALUE . |
second_item_rupees | The price of the second item being offered for sale, if one exists. If there is no item, use 0xFFFF or EZTR_NO_VALUE . |
pipe_escape_bytes | If true, content is passed through EZTR_MsgBuffer_Sprintf("%m", content) . If false, then content is copied directly into storage. |
content | The new text content to display. If you want empty content (for use with dynamic messages), use "\xBF". |
callback | A function pointer to call right before this text is displayed. Useful for dynamic messages. Set as NULL if you don't want to use a callback. See EZTR_MsgCallback for more information. |
... | variable arguments, using EZTR's printf implementation. |
void EZTR_Basic_ReplaceCustomTextEmpty | ( | EZTR_CustomMsgHandle | handle, |
EZTR_MsgCallback | callback ) |
Declare a replacement of a custom message, where the replacement message is empty.
This is primarily used if you want the message to be completely dynamically generated.
handle | The handle for the message being replaced. |
callback | A function pointer to call right before this text is displayed, in which you will construct the complete message buffer dynamically. See EZTR_MsgCallback for more information. |