functions for replacing vanilla messages. More...
Functions | |
void | EZTR_Basic_ReplaceBuffer (u16 textId, EZTR_MsgBuffer *buf, EZTR_MsgCallback callback) |
Declare a replacement of a vanilla message by copying from a buffer defined by the user. | |
void | EZTR_Basic_ReplaceText (u16 textId, 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 vanilla message by defining the header attributes and message content. | |
void | EZTR_Basic_ReplaceTextEmpty (u16 textId, EZTR_MsgCallback callback) |
Declare a replacement of a vanilla message, where the replacement message is empty. | |
functions for replacing vanilla messages.
These functions are currently your primary means of declaring replacements, using Majora's Mask's built-in dialog handling.
void EZTR_Basic_ReplaceBuffer | ( | u16 | textId, |
EZTR_MsgBuffer * | buf, | ||
EZTR_MsgCallback | callback ) |
Declare a replacement of a vanilla 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 a replacement for a vanilla message.
Note that this function is meant for replacing vanilla messages only. It will not allow you to use a textId greater than 0x354C, as that is the highest textId value found in the vanilla game. If you wish to create/modify a custom message, see EZTR_Basic_AddCustomBuffer()
and EZTR_Basic_ReplaceCustomBuffer()`
textId | The id of the vanilla message you wish to replace. |
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_ReplaceText | ( | u16 | textId, |
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 vanilla message by defining the header attributes and message content.
This is probably the easiest method to declare replacement text.
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.
Note that this function is meant for replacing vanilla messages only. It will not allow you to use a textId greater than 0x354C, as that is the highest textId value found in the vanilla game. If you wish to create/modify a custom message, see EZTR_Basic_AddCustomText()
and EZTR_Basic_ReplaceCustomText()`
textId | The id of the vanilla message you wish to replace. |
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. Accepts valid EZTR printf type specifiers. 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_ReplaceTextEmpty | ( | u16 | textId, |
EZTR_MsgCallback | callback ) |
Declare a replacement of a vanilla message, where the replacement message is empty.
This is primarily used if you want the message to be completely dynamically generated.
Note that this function is meant for replacing vanilla messages only. It will not allow you to use a textId greater than 0x354C, as that is the highest textId value found in the vanilla game. If you wish to create/modify a custom message, see EZTR_Basic_AddCustomTextEmpty()
and EZTR_Basic_ReplaceCustomTextEmpty()`
textId | The id of the vanilla message you wish to replace. |
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. |