EZ Text Replacer for Zelda64Recompiled 2.2.0
 
Loading...
Searching...
No Matches
eztr_api.h
Go to the documentation of this file.
1#ifndef __EZTR_API__
2#define __EZTR_API__
3
8
9#include "modding.h"
10#include "global.h"
11
12#ifdef DOXYGEN
13#define EZTR_IMPORT(func) func
14#define EZTR_PACK_STRUCT
15
16#else
17
18#define EZTR_IMPORT(func) RECOMP_IMPORT(EZTR_MOD_ID_STR, func)
19#define EZTR_PACK_STRUCT __attribute__((packed))
20
21typedef struct {
22 u16 new_id;
23 u8 out_success;
24} _EZTR_CustomMsgHandleSetter;
25
26#define __EZTR_CUSTOM_MSG_HANDLE_BODY(name) { \
27 static u16 id; static u8 is_set = 0; if (setter != NULL) { if (is_set) { _EZTR_ReportErrorMessage( \
28 "The textId of EZTR_CustomMsgHandle '" #name "' has already been set and will not be updated." \
29 ); setter->out_success = 0;} else { id = setter->new_id; is_set = 1; setter->out_success = 1;}} return id; }
30
31#endif
32
40
41
48#define EZTR_MOD_ID_STR "MM_EZ_Text_Replacer_API"
49
50#ifndef DOXYGEN
51EZTR_IMPORT( void _EXTR_ReportErrorMessage(char* error_msg));
52EZTR_IMPORT( void _EZTR_ReportErrorMessage(char* error_msg));
53#endif
54
55#define EZTR_MSG_HIGHEST_ID 0x354C
61#define EZTR_MSG_BUFFER_SIZE 1280
62
68#define EZTR_MSG_BUFFER_WIDE_SIZE 640
69
76#define EZTR_MSG_HEADER_SIZE 11
77
83 #define EZTR_MSG_CONTENT_SIZE 1269 // MESSAGE_BUFFER_SIZE - MESSAGE_HEADER_SIZE
84
85#define EZTR_MSG_ENDING_CHAR '\xBF'
86#define EZTR_PIPE_CHAR '|'
87
89
119
124#ifdef EZTR_NO_HANDLE_PREFIX
125#define EZTR_CUSTOM_MSG_HANDLE_NAME(name) name
126#else
127#define EZTR_CUSTOM_MSG_HANDLE_NAME(name_suffix) EZTR_CustomMsgHandle_##name_suffix
128#endif
136#define EZTR_DEFINE_CUSTOM_MSG_HANDLE_NO_EXPORT(name) \
137u16 EZTR_CUSTOM_MSG_HANDLE_NAME(name)(_EZTR_CustomMsgHandleSetter* setter) \
138__EZTR_CUSTOM_MSG_HANDLE_BODY(name)
139
150#define EZTR_DEFINE_CUSTOM_MSG_HANDLE(name) RECOMP_EXPORT \
151u16 EZTR_CUSTOM_MSG_HANDLE_NAME(name)(_EZTR_CustomMsgHandleSetter* setter) \
152__EZTR_CUSTOM_MSG_HANDLE_BODY(name)
153
160#define EZTR_DECLARE_CUSTOM_MSG_HANDLE(name) u16 EZTR_CUSTOM_MSG_HANDLE_NAME(name)(_EZTR_CustomMsgHandleSetter* setter)
161
168#define EZTR_EXTERN_CUSTOM_MSG_HANDLE(name) EZTR_DECLARE_CUSTOM_MSG_HANDLE(name)
169
170
176#define EZTR_IMPORT_CUSTOM_MSG_HANDLE(mod_str, name_suffix) RECOMP_IMPORT(mod_str, u16 EZTR_CustomMsgHandle_##name_suffix(_EZTR_CustomMsgHandleSetter* setter))
177
183#define EZTR_IMPORT_CUSTOM_MSG_HANDLE_NO_PREFIX(mod_str, name) RECOMP_IMPORT(mod_str, u16 name(_EZTR_CustomMsgHandleSetter* setter))
184
191#define EZTR_GET_CUSTOM_MSG_ID(handle) handle(NULL)
192
193// Shorthand:
200#define EZTR_HNAME(name_suffix) EZTR_CUSTOM_MSG_HANDLE_NAME(name_suffix)
201
210#define EZTR_GET_ID(handle) EZTR_GET_CUSTOM_MSG_ID(handle)
211
212
221#define EZTR_GET_ID_H(handle) EZTR_GET_CUSTOM_MSG_ID(EZTR_CUSTOM_MSG_HANDLE_NAME(handle))
222
243#define EZTR_MSG_CALLBACK(fname) void fname(EZTR_MsgBuffer* buf, u16 textId, PlayState* play)
244
258#define EZTR_ON_INIT RECOMP_CALLBACK("MM_EZ_Text_Replacer_API", EZTR_OnInit)
259
274#define EZTR_ON_DUMP_BUFFER(func_name) \
275 RECOMP_CALLBACK("MM_EZ_Text_Replacer_API", EZTR_OnDumpBuffer) void func_name(const char* category, u16 textId, s32 len, EZTR_MsgBuffer* buf)
276
291#define EZTR_ON_DUMP_BUFFER_FULL(func_name) \
292 RECOMP_CALLBACK("MM_EZ_Text_Replacer_API", EZTR_OnDumpBufferFull) void func_name(const char* category, u16 textId, s32 len, EZTR_MsgBuffer* buf)
293
304#define EZTR_NO_VALUE 0xffff
305
313
320typedef union {
321 char schar[EZTR_MSG_BUFFER_SIZE]; // msgBuf
322 u16 wchar[EZTR_MSG_BUFFER_WIDE_SIZE]; // msgBufWide
323 u64 force_structure_alignment_msg;
325
326
333typedef struct {
334 char header[EZTR_MSG_HEADER_SIZE];
335 char content[EZTR_MSG_CONTENT_SIZE];
337
338
350typedef struct EZTR_PACK_STRUCT {
351 u8 text_box_type;
352 u8 text_box_y_pos;
353 u8 display_icon;
354 u16 next_message_id;
355 u16 first_item_rupees;
356 u16 second_item_rupees;
357 u16 padding;
358 char content[EZTR_MSG_CONTENT_SIZE];
360
373typedef union {
375 EZTR_MsgBuffer_Partition partitions;
378
388typedef u16 (*EZTR_CustomMsgHandle)(_EZTR_CustomMsgHandleSetter* setter);
389
396typedef void (*EZTR_MsgCallback)(EZTR_MsgBuffer* buf, u16 textId, PlayState* play);
397
405typedef enum {
406 EZTR_STANDARD_TEXT_BOX_I = 0X00,
407 EZTR_WOODEN_SIGN_BACKGROUND = 0X01,
408 EZTR_TRANSLUSCENT_BLUE_TEXT_BOX = 0X02,
409 EZTR_OCARINA_STAFF = 0X03,
410 EZTR_INVISIBLE_TEXT_BOX_I = 0X04,
411 EZTR_INVISIBLE_TEXT_BOX_II = 0X05,
412 EZTR_STANDARD_TEXT_BOX_II = 0X06,
413 EZTR_INVISIBLE_TEXT_BOX = 0X07,
414 EZTR_BLUE_TEXT_BOX = 0X08,
415 EZTR_RED_TEXT_BOX_I = 0X09,
416 EZTR_INVISIBLE_TEXT_BOX_III = 0X0A,
417 EZTR_INVISIBLE_TEXT_BOX_IV = 0X0B,
418 EZTR_INVISIBLE_TEXT_BOX_V = 0X0C,
419 EZTR_BOMBERS_NOTEBOOK = 0X0D,
420 EZTR_INVISIBLE_TEXT_BOX_VI = 0X0E,
421 EZTR_RED_TEXT_BOX_II = 0X0F
423
434typedef enum {
435 EZTR_ICON_NOTHING = 0x00,
436 EZTR_ICON_GREEN_RUPEE = 0x01,
437 EZTR_ICON_BLUE_RUPEE = 0x02,
438 EZTR_ICON_WHITE_RUPEE = 0x03,
439 EZTR_ICON_RED_RUPEE = 0x04,
440 EZTR_ICON_PURPLE_RUPEE = 0x05,
441 EZTR_ICON_WHITE_RUPEE_1 = 0x06,
442 EZTR_ICON_ORANGE_RUPEE = 0x07,
443 EZTR_ICON_ADULT_WALLET = 0x08,
444 EZTR_ICON_GIANTS_WALLET = 0x09,
445 EZTR_ICON_RECOVERY_HEART = 0x0A,
446 EZTR_ICON_RECOVERY_HEART_1 = 0x0B,
447 EZTR_ICON_PIECE_OF_HEART = 0x0C,
448 EZTR_ICON_HEART_CONTAINER = 0x0D,
449 EZTR_ICON_SMALL_MAGIC_JAR = 0x0E,
450 EZTR_ICON_LARGE_MAGIC_JAR = 0x0F,
451 EZTR_ICON_RECOVERY_HEART_2 = 0x10,
452 EZTR_ICON_STRAY_FAIRY = 0x11,
453 EZTR_ICON_RECOVERY_HEART_3 = 0x12,
454 EZTR_ICON_RECOVERY_HEART_4 = 0x13,
455 EZTR_ICON_BOMB = 0x14,
456 EZTR_ICON_BOMB_1 = 0x15,
457 EZTR_ICON_BOMB_2 = 0x16,
458 EZTR_ICON_BOMB_3 = 0x17,
459 EZTR_ICON_BOMB_4 = 0x18,
460 EZTR_ICON_DEKU_STICK = 0x19,
461 EZTR_ICON_BOMBCHU = 0x1A,
462 EZTR_ICON_BOMB_BAG = 0x1B,
463 EZTR_ICON_BIG_BOMB_BAG = 0x1C,
464 EZTR_ICON_BIGGER_BOMB_BAG = 0x1D,
465 EZTR_ICON_HEROS_BOW = 0x1E,
466 EZTR_ICON_HEROS_BOW_1 = 0x1F,
467 EZTR_ICON_HEROS_BOW_2 = 0x20,
468 EZTR_ICON_HEROS_BOW_3 = 0x21,
469 EZTR_ICON_QUIVER = 0x22,
470 EZTR_ICON_BIG_QUIVER = 0x23,
471 EZTR_ICON_BIGGEST_QUIVER = 0x24,
472 EZTR_ICON_FIRE_ARROW = 0x25,
473 EZTR_ICON_ICE_ARROW = 0x26,
474 EZTR_ICON_LIGHT_ARROW = 0x27,
475 EZTR_ICON_DEKU_NUT = 0x28,
476 EZTR_ICON_DEKU_NUT_1 = 0x29,
477 EZTR_ICON_DEKU_NUT_2 = 0x2A,
478 EZTR_ICON_NOTHING_1 = 0x2B,
479 EZTR_ICON_NOTHING_2 = 0x2C,
480 EZTR_ICON_NOTHING_3 = 0x2D,
481 EZTR_ICON_NOTHING_4 = 0x2E,
482 EZTR_ICON_NOTHING_5 = 0x2F,
483 EZTR_ICON_NOTHING_6 = 0x30,
484 EZTR_ICON_NOTHING_7 = 0x31,
485 EZTR_ICON_HEROS_SHIELD = 0x32,
486 EZTR_ICON_MIRROR_SHIELD = 0x33,
487 EZTR_ICON_POWDER_KEG = 0x34,
488 EZTR_ICON_MAGIC_BEAN = 0x35,
489 EZTR_ICON_PICTOGRAPH_BOX = 0x36,
490 EZTR_ICON_KOKIRI_SWORD = 0x37,
491 EZTR_ICON_RAZOR_SWORD = 0x38,
492 EZTR_ICON_GILDED_SWORD = 0x39,
493 EZTR_ICON_FIERCE_DEITYS_SWORD = 0x3A,
494 EZTR_ICON_GREAT_FAIRYS_SWORD = 0x3B,
495 EZTR_ICON_SMALL_KEY = 0x3C,
496 EZTR_ICON_BOSS_KEY = 0x3D,
497 EZTR_ICON_DUNGEON_MAP = 0x3E,
498 EZTR_ICON_COMPASS = 0x3F,
499 EZTR_ICON_POWDER_KEG_1 = 0x40,
500 EZTR_ICON_HOOKSHOT = 0x41,
501 EZTR_ICON_LENS_OF_TRUTH = 0x42,
502 EZTR_ICON_PICTOGRAPH_BOX_1 = 0x43,
503 EZTR_ICON_FISHING_ROD = 0x44,
504 EZTR_ICON_NOTHING_8 = 0x45,
505 EZTR_ICON_NOTHING_9 = 0x46,
506 EZTR_ICON_NOTHING_10 = 0x47,
507 EZTR_ICON_NOTHING_11 = 0x48,
508 EZTR_ICON_NOTHING_12 = 0x49,
509 EZTR_ICON_NOTHING_13 = 0x4A,
510 EZTR_ICON_NOTHING_14 = 0x4B,
511 EZTR_ICON_OCARINA_OF_TIME = 0x4C,
512 EZTR_ICON_NOTHING_15 = 0x4D,
513 EZTR_ICON_NOTHING_16 = 0x4E,
514 EZTR_ICON_NOTHING_17 = 0x4F,
515 EZTR_ICON_BOMBERS_NOTEBOOK = 0x50,
516 EZTR_ICON_NOTHING_18 = 0x51,
517 EZTR_ICON_GOLD_SKULLTULA_TOKEN = 0x52,
518 EZTR_ICON_NOTHING_19 = 0x53,
519 EZTR_ICON_NOTHING_20 = 0x54,
520 EZTR_ICON_ODOLWAS_REMAINS = 0x55,
521 EZTR_ICON_GOHTS_REMAINS = 0x56,
522 EZTR_ICON_GYORGS_REMAINS = 0x57,
523 EZTR_ICON_TWINMOLDS_REMAINS = 0x58,
524 EZTR_ICON_RED_POTION = 0x59,
525 EZTR_ICON_EMPTY_BOTTLE = 0x5A,
526 EZTR_ICON_RED_POTION_1 = 0x5B,
527 EZTR_ICON_GREEN_POTION = 0x5C,
528 EZTR_ICON_BLUE_POTION = 0x5D,
529 EZTR_ICON_FAIRYS_SPIRIT = 0x5E,
530 EZTR_ICON_DEKU_PRINCESS = 0x5F,
531 EZTR_ICON_MILK = 0x60,
532 EZTR_ICON_MILK_HALF = 0x61,
533 EZTR_ICON_FISH = 0x62,
534 EZTR_ICON_BUG = 0x63,
535 EZTR_ICON_BLUE_FIRE = 0x64,
536 EZTR_ICON_POE = 0x65,
537 EZTR_ICON_BIG_POE = 0x66,
538 EZTR_ICON_SPRING_WATER = 0x67,
539 EZTR_ICON_HOT_SPRING_WATER = 0x68,
540 EZTR_ICON_ZORA_EGG = 0x69,
541 EZTR_ICON_GOLD_DUST = 0x6A,
542 EZTR_ICON_MUSHROOM = 0x6B,
543 EZTR_ICON_NOTHING_21 = 0x6C,
544 EZTR_ICON_NOTHING_22 = 0x6D,
545 EZTR_ICON_SEAHORSE = 0x6E,
546 EZTR_ICON_CHATEAU_ROMANI = 0x6F,
547 EZTR_ICON_HYLIAN_LOACH = 0x70,
548 EZTR_ICON_NOTHING_23 = 0x71,
549 EZTR_ICON_NOTHING_24 = 0x72,
550 EZTR_ICON_NOTHING_25 = 0x73,
551 EZTR_ICON_NOTHING_26 = 0x74,
552 EZTR_ICON_NOTHING_27 = 0x75,
553 EZTR_ICON_NOTHING_28 = 0x76,
554 EZTR_ICON_NOTHING_29 = 0x77,
555 EZTR_ICON_DEKU_MASK = 0x78,
556 EZTR_ICON_GORON_MASK = 0x79,
557 EZTR_ICON_ZORA_MASK = 0x7A,
558 EZTR_ICON_FIERCE_DEITY_MASK = 0x7B,
559 EZTR_ICON_MASK_OF_TRUTH = 0x7C,
560 EZTR_ICON_KAFEIS_MASK = 0x7D,
561 EZTR_ICON_ALL_NIGHT_MASK = 0x7E,
562 EZTR_ICON_BUNNY_HOOD = 0x7F,
563 EZTR_ICON_KEATON_MASK = 0x80,
564 EZTR_ICON_GARO_MASK = 0x81,
565 EZTR_ICON_ROMANI_MASK = 0x82,
566 EZTR_ICON_CIRCUS_LEADERS_MASK = 0x83,
567 EZTR_ICON_POSTMANS_HAT = 0x84,
568 EZTR_ICON_COUPLES_MASK = 0x85,
569 EZTR_ICON_GREAT_FAIRYS_MASK = 0x86,
570 EZTR_ICON_GIBDO_MASK = 0x87,
571 EZTR_ICON_DON_GEROS_MASK = 0x88,
572 EZTR_ICON_KAMAROS_MASK = 0x89,
573 EZTR_ICON_CAPTAINS_HAT = 0x8A,
574 EZTR_ICON_STONE_MASK = 0x8B,
575 EZTR_ICON_BREMEN_MASK = 0x8C,
576 EZTR_ICON_BLAST_MASK = 0x8D,
577 EZTR_ICON_MASK_OF_SCENTS = 0x8E,
578 EZTR_ICON_GIANTS_MASK = 0x8F,
579 EZTR_ICON_NOTHING_30 = 0x90,
580 EZTR_ICON_CHATEAU_ROMANI_1 = 0x91,
581 EZTR_ICON_MILK_1 = 0x92,
582 EZTR_ICON_GOLD_DUST_1 = 0x93,
583 EZTR_ICON_HYLIAN_LOACH_1 = 0x94,
584 EZTR_ICON_SEAHORSE_1 = 0x95,
585 EZTR_ICON_MOONS_TEAR = 0x96,
586 EZTR_ICON_TOWN_TITLE_DEED = 0x97,
587 EZTR_ICON_SWAMP_TITLE_DEED = 0x98,
588 EZTR_ICON_MOUNTAIN_TITLE_DEED = 0x99,
589 EZTR_ICON_OCEAN_TITLE_DEED = 0x9A,
590 EZTR_ICON_NOTHING_31 = 0x9B,
591 EZTR_ICON_NOTHING_32 = 0x9C,
592 EZTR_ICON_NOTHING_33 = 0x9D,
593 EZTR_ICON_NOTHING_34 = 0x9E,
594 EZTR_ICON_NOTHING_35 = 0x9F,
595 EZTR_ICON_ROOM_KEY = 0xA0,
596 EZTR_ICON_SPECIAL_DELIVERY_TO_MAMA = 0xA1,
597 EZTR_ICON_NOTHING_36 = 0xA2,
598 EZTR_ICON_NOTHING_37 = 0xA3,
599 EZTR_ICON_NOTHING_38 = 0xA4,
600 EZTR_ICON_NOTHING_39 = 0xA5,
601 EZTR_ICON_NOTHING_40 = 0xA6,
602 EZTR_ICON_NOTHING_41 = 0xA7,
603 EZTR_ICON_NOTHING_42 = 0xA8,
604 EZTR_ICON_NOTHING_43 = 0xA9,
605 EZTR_ICON_LETTER_TO_KAFEI = 0xAA,
606 EZTR_ICON_PENDANT_OF_MEMORIES = 0xAB,
607 EZTR_ICON_NOTHING_44 = 0xAC,
608 EZTR_ICON_NOTHING_45 = 0xAD,
609 EZTR_ICON_NOTHING_46 = 0xAE,
610 EZTR_ICON_NOTHING_47 = 0xAF,
611 EZTR_ICON_NOTHING_48 = 0xB0,
612 EZTR_ICON_NOTHING_49 = 0xB1,
613 EZTR_ICON_NOTHING_50 = 0xB2,
614 EZTR_ICON_TINGLES_MAP = 0xB3,
615 EZTR_ICON_TINGLES_MAP_1 = 0xB4,
616 EZTR_ICON_TINGLES_MAP_2 = 0xB5,
617 EZTR_ICON_TINGLES_MAP_3 = 0xB6,
618 EZTR_ICON_TINGLES_MAP_4 = 0xB7,
619 EZTR_ICON_TINGLES_MAP_5 = 0xB8,
620 EZTR_ICON_TINGLES_MAP_6 = 0xB9,
621 EZTR_ICON_NOTHING_51 = 0xBA,
622 EZTR_ICON_NOTHING_52 = 0xBB,
623 EZTR_ICON_NOTHING_53 = 0xBC,
624 EZTR_ICON_NOTHING_54 = 0xBD,
625 EZTR_ICON_NOTHING_55 = 0xBE,
626 EZTR_ICON_NOTHING_56 = 0xBF,
627 EZTR_ICON_NOTHING_57 = 0xC0,
628 EZTR_ICON_NOTHING_58 = 0xC1,
629 EZTR_ICON_NOTHING_59 = 0xC2,
630 EZTR_ICON_NOTHING_60 = 0xC3,
631 EZTR_ICON_NOTHING_61 = 0xC4,
632 EZTR_ICON_NOTHING_62 = 0xC5,
633 EZTR_ICON_NOTHING_63 = 0xC6,
634 EZTR_ICON_NOTHING_64 = 0xC7,
635 EZTR_ICON_NOTHING_65 = 0xC8,
636 EZTR_ICON_NOTHING_66 = 0xC9,
637 EZTR_ICON_NOTHING_67 = 0xCA,
638 EZTR_ICON_NOTHING_68 = 0xCB,
639 EZTR_ICON_NOTHING_69 = 0xCC,
640 EZTR_ICON_NOTHING_70 = 0xCD,
641 EZTR_ICON_NOTHING_71 = 0xCE,
642 EZTR_ICON_NOTHING_72 = 0xCF,
643 EZTR_ICON_NOTHING_73 = 0xD0,
644 EZTR_ICON_NOTHING_74 = 0xD1,
645 EZTR_ICON_NOTHING_75 = 0xD2,
646 EZTR_ICON_NOTHING_76 = 0xD3,
647 EZTR_ICON_NOTHING_77 = 0xD4,
648 EZTR_ICON_NOTHING_78 = 0xD5,
649 EZTR_ICON_NOTHING_79 = 0xD6,
650 EZTR_ICON_NOTHING_80 = 0xD7,
651 EZTR_ICON_SMALL_BLACK_LINE = 0xD8,
652 EZTR_ICON_SMALL_BLACK_LINE_1 = 0xD9,
653 EZTR_ICON_SMALL_BLACK_LINE_2 = 0xDA,
654 EZTR_ICON_SMALL_BLACK_LINE_3 = 0xDB,
655 EZTR_ICON_ANJU = 0xDC,
656 EZTR_ICON_KAFEI = 0xDD,
657 EZTR_ICON_CURIOSITY_SHOP_OWNER = 0xDE,
658 EZTR_ICON_BOMB_SHOP_OWNERS_MOTHER = 0xDF,
659 EZTR_ICON_ROMANI = 0xE0,
660 EZTR_ICON_CREMIA = 0xE1,
661 EZTR_ICON_MAYOR_DOTOUR = 0xE2,
662 EZTR_ICON_MADAME_AROMA = 0xE3,
663 EZTR_ICON_TOTO = 0xE4,
664 EZTR_ICON_GORMAN = 0xE5,
665 EZTR_ICON_POSTMAN = 0xE6,
666 EZTR_ICON_ROSA_SISTERS = 0xE7,
667 EZTR_ICON_TOILET_HAND = 0xE8,
668 EZTR_ICON_GRANNY = 0xE9,
669 EZTR_ICON_KAMARO = 0xEA,
670 EZTR_ICON_GROG = 0xEB,
671 EZTR_ICON_GORMAN_BROTHERS = 0xEC,
672 EZTR_ICON_SHIRO = 0xED,
673 EZTR_ICON_GURU_GURU = 0xEE,
674 EZTR_ICON_BOMBERS = 0xEF,
675 EZTR_ICON_EXCLAMATION_MARK = 0xF0,
676 EZTR_ICON_NOTHING_81 = 0xF1,
677 EZTR_ICON_NOTHING_82 = 0xF2,
678 EZTR_ICON_NOTHING_83 = 0xF3,
679 EZTR_ICON_NOTHING_84 = 0xF4,
680 EZTR_ICON_NOTHING_85 = 0xF5,
681 EZTR_ICON_NOTHING_86 = 0xF6,
682 EZTR_ICON_NOTHING_87 = 0xF7,
683 EZTR_ICON_NOTHING_88 = 0xF8,
684 EZTR_ICON_NOTHING_89 = 0xF9,
685 EZTR_ICON_NOTHING_90 = 0xFA,
686 EZTR_ICON_NOTHING_91 = 0xFB,
687 EZTR_ICON_NOTHING_92 = 0xFC,
688 EZTR_ICON_NOTHING_93 = 0xFD,
689 EZTR_ICON_NO_ICON = 0xFE,
690 EZTR_ICON_MAX = 0xFE
692
694
695
710#define EZTR_CC_COLOR_DEFAULT "\x00"
711
715#define EZTR_CC_COLOR_RED "\x01"
716
720#define EZTR_CC_COLOR_GREEN "\x02"
721
725#define EZTR_CC_COLOR_BLUE "\x03"
726
730#define EZTR_CC_COLOR_YELLOW "\x04"
731
735#define EZTR_CC_COLOR_LIGHTBLUE "\x05"
736
740#define EZTR_CC_COLOR_PINK "\x06"
741
745#define EZTR_CC_COLOR_SILVER "\x07"
746
750#define EZTR_CC_COLOR_ORANGE "\x08"
751
758#define EZTR_CC_TEXT_SPEED "\x0a"
759
763#define EZTR_CC_HS_BOAT_ARCHERY "\x0b"
764
769#define EZTR_CC_STRAY_FAIRIES "\x0c"
770
774#define EZTR_CC_TOKENS "\x0d"
775
779#define EZTR_CC_POINTS_TENS "\x0e"
780
784#define EZTR_CC_POINTS_THOUSANDS "\x0f"
785
792#define EZTR_CC_BOX_BREAK "\x10"
793
797#define EZTR_CC_NEWLINE "\x11"
798
805#define EZTR_CC_BOX_BREAK2 "\x12"
806
813#define EZTR_CC_CARRIAGE_RETURN "\x13"
814
821#define EZTR_CC_SHIFT "\x14"
822
831#define EZTR_CC_SHIFT_ARGC "\x14%c"
832
839#define EZTR_CC_CONTINUE "\x15"
840
844#define EZTR_CC_NAME "\x16"
845
849#define EZTR_CC_QUICKTEXT_ENABLE "\x17"
850
854#define EZTR_CC_QUICKTEXT_DISABLE "\x18"
855
862#define EZTR_CC_EVENT "\x19"
863
870#define EZTR_CC_PERSISTENT "\x1a"
871
878#define EZTR_CC_BOX_BREAK_DELAYED "\x1b"
879
888#define EZTR_CC_BOX_BREAK_DELAYED_ARGW "\x1b%w"
889
890
899#define EZTR_CC_FADE "\x1c"
900
912#define EZTR_CC_FADE_ARGW "\x1c%w"
913
920#define EZTR_CC_FADE_SKIPPABLE "\x1d"
921
930#define EZTR_CC_FADE_SKIPPABLE_ARGW "\x1d%w"
931
938#define EZTR_CC_SFX "\x1e"
939
948#define EZTR_CC_SFX_ARGW "\x1e%w"
949
956#define EZTR_CC_DELAY "\x1f"
957
966#define EZTR_CC_DELAY_ARGW "\x1f%w"
967
971#define EZTR_CC_BTN_A "\xb0"
972
976#define EZTR_CC_BTN_B "\xb1"
977
981#define EZTR_CC_BTN_C "\xb2"
982
986#define EZTR_CC_BTN_L "\xb3"
987
991#define EZTR_CC_BTN_R "\xb4"
992
996#define EZTR_CC_BTN_Z "\xb5"
997
1001#define EZTR_CC_BTN_CUP "\xb6"
1002
1006#define EZTR_CC_BTN_CDOWN "\xb7"
1007
1011#define EZTR_CC_BTN_CLEFT "\xb8"
1012
1016#define EZTR_CC_BTN_CRIGHT "\xb9"
1017
1021#define EZTR_CC_Z_TARGET "\xba"
1022
1026#define EZTR_CC_CONTROL_PAD "\xbb"
1027
1034#define EZTR_CC_END "\xbf"
1035
1042#define EZTR_CC_BACKGROUND "\xc1"
1043
1047#define EZTR_CC_TWO_CHOICE "\xc2"
1048
1052#define EZTR_CC_THREE_CHOICE "\xc3"
1053
1057#define EZTR_CC_TIMER_POSTMAN "\xc4"
1058
1062#define EZTR_CC_TIMER_MINIGAME_1 "\xc5"
1063
1067#define EZTR_CC_TIMER_2 "\xc6"
1068
1072#define EZTR_CC_TIMER_MOON_CRASH "\xc7"
1073
1077#define EZTR_CC_TIMER_MINIGAME_2 "\xc8"
1078
1082#define EZTR_CC_TIMER_ENV_HAZARD "\xc9"
1083
1087#define EZTR_CC_TIME "\xca"
1088
1092#define EZTR_CC_CHEST_FLAGS "\xcb"
1093
1097#define EZTR_CC_INPUT_BANK "\xcc"
1098
1102#define EZTR_CC_RUPEES_SELECTED "\xcd"
1103
1107#define EZTR_CC_RUPEES_TOTAL "\xce"
1108
1112#define EZTR_CC_TIME_UNTIL_MOON_CRASH "\xcf"
1113
1117#define EZTR_CC_INPUT_DOGGY_RACETRACK_BET "\xd0"
1118
1122#define EZTR_CC_INPUT_BOMBER_CODE "\xd1"
1123
1130#define EZTR_CC_PAUSE_MENU "\xd2"
1131
1135#define EZTR_CC_TIME_SPEED "\xd3"
1136
1140#define EZTR_CC_OWL_WARP "\xd4"
1141
1145#define EZTR_CC_INPUT_LOTTERY_CODE "\xd5"
1146
1153#define EZTR_CC_SPIDER_HOUSE_MASK_CODE "\xd6"
1154
1158#define EZTR_CC_STRAY_FAIRIES_LEFT_WOODFALL "\xd7"
1159
1163#define EZTR_CC_STRAY_FAIRIES_LEFT_SNOWHEAD "\xd8"
1164
1168#define EZTR_CC_STRAY_FAIRIES_LEFT_GREAT_BAY "\xd9"
1169
1173#define EZTR_CC_STRAY_FAIRIES_LEFT_STONE_TOWER "\xda"
1174
1178#define EZTR_CC_POINTS_BOAT_ARCHERY "\xdb"
1179
1183#define EZTR_CC_LOTTERY_CODE "\xdc"
1184
1188#define EZTR_CC_LOTTERY_CODE_GUESS "\xdd"
1189
1196#define EZTR_CC_HELD_ITEM_PRICE "\xde"
1197
1201#define EZTR_CC_BOMBER_CODE "\xdf"
1202
1209#define EZTR_CC_EVENT2 "\xe0"
1210
1214#define EZTR_CC_SPIDER_HOUSE_MASK_CODE_1 "\xe1"
1215
1219#define EZTR_CC_SPIDER_HOUSE_MASK_CODE_2 "\xe2"
1220
1224#define EZTR_CC_SPIDER_HOUSE_MASK_CODE_3 "\xe3"
1225
1229#define EZTR_CC_SPIDER_HOUSE_MASK_CODE_4 "\xe4"
1230
1234#define EZTR_CC_SPIDER_HOUSE_MASK_CODE_5 "\xe5"
1235
1239#define EZTR_CC_SPIDER_HOUSE_MASK_CODE_6 "\xe6"
1240
1244#define EZTR_CC_HOURS_UNTIL_MOON_CRASH "\xe7"
1245
1249#define EZTR_CC_TIME_UNTIL_NEW_DAY "\xe8"
1250
1254#define EZTR_CC_HS_POINTS_BANK_RUPEES "\xf0"
1255
1259#define EZTR_CC_HS_POINTS_UNK_1 "\xf1"
1260
1264#define EZTR_CC_HS_POINTS_FISHING "\xf2"
1265
1269#define EZTR_CC_HS_TIME_BOAT_ARCHERY "\xf3"
1270
1274#define EZTR_CC_HS_TIME_HORSE_BACK_BALLOON "\xf4"
1275
1282#define EZTR_CC_HS_TIME_LOTTERY_GUESS "\xf5"
1283
1287#define EZTR_CC_HS_TOWN_SHOOTING_GALLERY "\xf6"
1288
1292#define EZTR_CC_HS_UNK_1 "\xf7"
1293
1297#define EZTR_CC_HS_UNK_3_LOWER "\xf8"
1298
1302#define EZTR_CC_HS_HORSE_BACK_BALLOON "\xf9"
1303
1307#define EZTR_CC_HS_DEKU_PLAYGROUND_DAY_1 "\xfa"
1308
1312#define EZTR_CC_HS_DEKU_PLAYGROUND_DAY_2 "\xfb"
1313
1317#define EZTR_CC_HS_DEKU_PLAYGROUND_DAY_3 "\xfc"
1318
1322#define EZTR_CC_DEKU_PLAYGROUND_NAME_DAY_1 "\xfd"
1323
1327#define EZTR_CC_DEKU_PLAYGROUND_NAME_DAY_2 "\xfe"
1328
1332#define EZTR_CC_DEKU_PLAYGROUND_NAME_DAY_3 "\xff"
1333
1335
1344
1345
1361EZTR_IMPORT(void EZTR_Basic_ReplaceBuffer(u16 textId, EZTR_MsgBuffer* buf, EZTR_MsgCallback callback));
1362
1393EZTR_IMPORT(void EZTR_Basic_ReplaceText(
1394 u16 textId,
1395 u8 text_box_type,
1396 u8 text_box_y_pos,
1397 u8 display_icon,
1398 u16 next_message_id,
1399 u16 first_item_rupees,
1400 u16 second_item_rupees,
1401 bool pipe_escape_bytes,
1402 char* content,
1403 EZTR_MsgCallback callback,
1404 ...
1406
1420EZTR_IMPORT(void EZTR_Basic_ReplaceTextEmpty(u16 textId, EZTR_MsgCallback callback));
1422
1429
1445
1475EZTR_IMPORT(void EZTR_Basic_AddCustomText(EZTR_CustomMsgHandle handle, u8 text_box_type, u8 text_box_y_pos, u8 display_icon,
1476 u16 next_message_id, u16 first_item_rupees, u16 second_item_rupees, bool pipe_escape_bytes, char* content, EZTR_MsgCallback callback, ...));
1477
1491
1504
1531EZTR_IMPORT(void EZTR_Basic_ReplaceCustomText(EZTR_CustomMsgHandle handle, u8 text_box_type, u8 text_box_y_pos, u8 display_icon,
1532 u16 next_message_id, u16 first_item_rupees, u16 second_item_rupees, bool pipe_escape_bytes, char* content, EZTR_MsgCallback callback, ...));
1533
1544
1546
1552
1553
1564
1577
1590EZTR_IMPORT(EZTR_MsgBuffer* EZTR_MsgBuffer_CreateFromStrN(char* src, size_t len));
1591
1601
1602// Copy:
1616EZTR_IMPORT(u32 EZTR_MsgBuffer_Copy(EZTR_MsgBuffer* dst, char* src));
1617
1630EZTR_IMPORT(u32 EZTR_MsgBuffer_NCopy(EZTR_MsgBuffer* dst, char* src, size_t len));
1631
1640EZTR_IMPORT(u32 EZTR_MsgBuffer_Len(EZTR_MsgBuffer* buf));
1641
1652
1668
1684EZTR_IMPORT(void EZTR_MsgBuffer_WriteHeader(EZTR_MsgBuffer* buf, u8 text_box_type, u8 text_box_y_pos, u8 display_icon,
1685 u16 next_message_id, u16 first_item_rupees, u16 second_item_rupees));
1686
1698
1709EZTR_IMPORT(void EZTR_MsgBuffer_SetTextBoxType(EZTR_MsgBuffer* buf, u8 type));
1710
1722
1733EZTR_IMPORT(void EZTR_MsgBuffer_SetTextBoxYPos(EZTR_MsgBuffer* buf, u8 pos));
1734
1746
1758
1770
1781EZTR_IMPORT(void EZTR_MsgBuffer_SetNextMsg(EZTR_MsgBuffer* buf, u16 textId));
1782
1794
1805EZTR_IMPORT(void EZTR_MsgBuffer_SetFirstItemRupees(EZTR_MsgBuffer* buf, u16 val));
1806
1818
1830
1838EZTR_IMPORT(void EZTR_MsgBuffer_Print(EZTR_MsgBuffer* buf));
1839
1848
1857
1866
1876
1878
1879
1885
1886
1895EZTR_IMPORT(void EZTR_MsgSContent_SetEmpty(char* cont));
1896
1908EZTR_IMPORT(u32 EZTR_MsgSContent_Len(char* cont));
1909
1921EZTR_IMPORT(u32 EZTR_MsgSContent_NCopy(char* dst, char* src, size_t len));
1922
1935EZTR_IMPORT(u32 EZTR_MsgSContent_Copy(char* dst, char* src));
1936
1951EZTR_IMPORT(char* EZTR_MsgSContent_NCat(char* dst, char* src, size_t len));
1952
1966EZTR_IMPORT(char* EZTR_MsgSContent_Cat(char* dst, char* src));
1967
1986EZTR_IMPORT(s32 EZTR_MsgSContent_NCmp(char* str1, char* str2, size_t len));
1987
2008EZTR_IMPORT(s32 EZTR_MsgSContent_Cmp(char* str1, char* str2));
2009
2020EZTR_IMPORT(int EZTR_MsgSContent_Printf(const char* format, ...));
2021
2032EZTR_IMPORT(int EZTR_MsgSContent_PrintfLine(const char* format, ...));
2033
2048EZTR_IMPORT(int EZTR_MsgSContent_Sprintf(char* buffer, const char* format, ...));
2049
2062EZTR_IMPORT(int EZTR_MsgSContent_Snprintf(char* buffer, size_t count, const char* format, ...));
2063
2076EZTR_IMPORT(int EZTR_MsgSContent_Vsnprintf(char* buffer, size_t count, const char* format, va_list va));
2077
2088EZTR_IMPORT(int EZTR_MsgSContent_Vprintf(const char* format, va_list va));
2089
2101EZTR_IMPORT(int EZTR_MsgSContent_Fctprintf(void (*out)(char character, void* arg), void* arg, const char* format, ...));
2102
2114EZTR_IMPORT(int EZTR_MsgSContent_NoPipe_Printf(const char* format, ...));
2115
2127EZTR_IMPORT(int EZTR_MsgSContent_NoPipe_PrintfLine(const char* format, ...));
2128
2144EZTR_IMPORT(int EZTR_MsgSContent_NoPipe_Sprintf(char* buffer, const char* format, ...));
2145
2159EZTR_IMPORT(int EZTR_MsgSContent_NoPipe_Snprintf(char* buffer, size_t count, const char* format, ...));
2160
2174EZTR_IMPORT(int EZTR_MsgSContent_NoPipe_Vsnprintf(char* buffer, size_t count, const char* format, va_list va));
2175
2187EZTR_IMPORT(int EZTR_MsgSContent_NoPipe_Vprintf(const char* format, va_list va));
2188
2202EZTR_IMPORT(int EZTR_MsgSContent_NoPipe_Fctprintf(void (*out)(char character, void* arg), void* arg, const char* format, ...));
2203
2205
2206#endif
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_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_ReplaceCustomTextEmpty(EZTR_CustomMsgHandle handle, EZTR_MsgCallback callback)
Declare a replacement of a custom message, where the replacement message is empty.
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_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_AddCustomTextEmpty(EZTR_CustomMsgHandle handle, EZTR_MsgCallback callback)
Declare a brand new (i.e: custom) message, where the replacement message is empty.
void EZTR_Basic_ReplaceTextEmpty(u16 textId, EZTR_MsgCallback callback)
Declare a replacement of a vanilla message, where the replacement message is empty.
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.
#define EZTR_MSG_HEADER_SIZE
The size of the message buffer's header region, in bytes.
Definition eztr_api.h:76
#define EZTR_MSG_BUFFER_SIZE
The the full size of message buffer, in bytes.
Definition eztr_api.h:61
#define EZTR_MSG_BUFFER_WIDE_SIZE
The maximum length of buffer in two-byte characters (wchar).
Definition eztr_api.h:68
#define EZTR_MSG_CONTENT_SIZE
The size of the message buffer's content region, in bytes.
Definition eztr_api.h:83
u16 EZTR_MsgBuffer_GetNextMsg(EZTR_MsgBuffer *buf)
Retrieves the next_message_id from a message buffer's header.
u32 EZTR_MsgBuffer_Copy(EZTR_MsgBuffer *dst, char *src)
Copies data from src into the message buffer dst.
EZTR_MsgBuffer * EZTR_MsgBuffer_CreateFromStr(char *src)
Creates a new message buffer object on the heap, and copies src into it.
char * EZTR_MsgBuffer_GetContentPtr(EZTR_MsgBuffer *buf)
Gets a pointer to the beginning of the content region for a desired message buffer.
void EZTR_MsgBuffer_Destroy(EZTR_MsgBuffer *buf)
Frees/destroys a message buffer.
EZTR_MsgBuffer * EZTR_MsgBuffer_Create()
Creates a new message buffer object on the heap.
u32 EZTR_MsgBuffer_ContentLen(EZTR_MsgBuffer *buf)
Gets the size of the message buffer's content region, in bytes.
void EZTR_MsgBuffer_SetNextMsg(EZTR_MsgBuffer *buf, u16 textId)
Sets the next_message_id of the message buffer's header.
u8 EZTR_MsgBuffer_GetTextBoxDisplayIcon(EZTR_MsgBuffer *buf)
Retrieves the display_icon from a message buffer's header.
void EZTR_MsgBuffer_PrintCCode(EZTR_MsgBuffer *buf)
Prints the contents of a message buffer to the console, formatted as a EZTR_Basic_ReplaceText call.
void EZTR_MsgBuffer_SetTextBoxType(EZTR_MsgBuffer *buf, u8 type)
Sets the text_box_type of the message buffer's header.
void EZTR_MsgBuffer_WriteHeader(EZTR_MsgBuffer *buf, u8 text_box_type, u8 text_box_y_pos, u8 display_icon, u16 next_message_id, u16 first_item_rupees, u16 second_item_rupees)
void EZTR_MsgBuffer_PrintFull(EZTR_MsgBuffer *buf)
Prints the contents of a message buffer to the console.
u8 EZTR_MsgBuffer_GetTextBoxType(EZTR_MsgBuffer *buf)
Retrieves the text_box_type from a message buffer's header.
void EZTR_MsgBuffer_SetSecondItemRupees(EZTR_MsgBuffer *buf, u16 val)
Sets the second_item_rupees of the message buffer's header.
void EZTR_MsgBuffer_SetFirstItemRupees(EZTR_MsgBuffer *buf, u16 val)
Sets the first_item_rupees of the message buffer's header.
u32 EZTR_MsgBuffer_Len(EZTR_MsgBuffer *buf)
Gets the size of the message buffer's stored data, in bytes.
EZTR_MsgBuffer * EZTR_MsgBuffer_CreateFromStrN(char *src, size_t len)
Creates a new message buffer object on the heap, and copies src into it for up to len bytes.
u16 EZTR_MsgBuffer_GetSecondItemRupees(EZTR_MsgBuffer *buf)
Retrieves the second_item_rupees from a message buffer's header.
u32 EZTR_MsgBuffer_NCopy(EZTR_MsgBuffer *dst, char *src, size_t len)
Copies data from src into the message buffer dst, up to len bytes.
void EZTR_MsgBuffer_PrintFullCCode(EZTR_MsgBuffer *buf)
Prints the contents of a message buffer to the console, formatted as a EZTR_Basic_ReplaceText call.
void EZTR_MsgBuffer_SetTextBoxYPos(EZTR_MsgBuffer *buf, u8 pos)
Sets the text_box_y_pos of the message buffer's header.
u8 EZTR_MsgBuffer_GetTextBoxYPos(EZTR_MsgBuffer *buf)
Retrieves the text_box_y_pos from a message buffer's header.
void EZTR_MsgBuffer_SetTextBoxDisplayIcon(EZTR_MsgBuffer *buf, u8 icon)
Sets the display_icon of the message buffer's header.
void EZTR_MsgBuffer_WriteDefaultHeader(EZTR_MsgBuffer *buf)
Sets a message buffer's header to default values.
u16 EZTR_MsgBuffer_GetFirstItemRupees(EZTR_MsgBuffer *buf)
Retrieves the first_item_rupees from a message buffer's header.
void EZTR_MsgBuffer_Print(EZTR_MsgBuffer *buf)
Prints the contents of a message buffer to the console.
int EZTR_MsgSContent_NoPipe_Snprintf(char *buffer, size_t count, const char *format,...)
A modified version of printf, specially designed to handle message content. This version does not use...
int EZTR_MsgSContent_NoPipe_Vsnprintf(char *buffer, size_t count, const char *format, va_list va)
A modified version of printf, specially designed to handle message content. This version does not use...
int EZTR_MsgSContent_Fctprintf(void(*out)(char character, void *arg), void *arg, const char *format,...)
A modified version of printf, specially designed to handle message content.
int EZTR_MsgSContent_Printf(const char *format,...)
A modified version of printf, specially designed to handle message content. This version uses pipe-es...
int EZTR_MsgSContent_NoPipe_Printf(const char *format,...)
A modified version of printf, specially designed to handle message content. This version does not use...
u32 EZTR_MsgSContent_Copy(char *dst, char *src)
Copies message content from src into the dst.
char * EZTR_MsgSContent_Cat(char *dst, char *src)
Copies the message content of src onto the end of dst.
s32 EZTR_MsgSContent_NCmp(char *str1, char *str2, size_t len)
Compares up to len bytes of two message content strings.
int EZTR_MsgSContent_Vsnprintf(char *buffer, size_t count, const char *format, va_list va)
A modified version of printf, specially designed to handle message content. This version uses pipe-es...
u32 EZTR_MsgSContent_NCopy(char *dst, char *src, size_t len)
Copies message content from src into the dst, up to len bytes.
void EZTR_MsgSContent_SetEmpty(char *cont)
Sets the message message content as empty.
int EZTR_MsgSContent_Vprintf(const char *format, va_list va)
A modified version of printf, specially designed to handle message content. This version uses pipe-es...
char * EZTR_MsgSContent_NCat(char *dst, char *src, size_t len)
Copies the message content of src onto the end of dst, up to len bytes from src.
int EZTR_MsgSContent_NoPipe_Vprintf(const char *format, va_list va)
A modified version of printf, specially designed to handle message content. This version does not use...
int EZTR_MsgSContent_NoPipe_Fctprintf(void(*out)(char character, void *arg), void *arg, const char *format,...)
A modified version of printf, specially designed to handle message content. This version does not use...
int EZTR_MsgSContent_Snprintf(char *buffer, size_t count, const char *format,...)
A modified version of printf, specially designed to handle message content. This version uses pipe-es...
int EZTR_MsgSContent_PrintfLine(const char *format,...)
A modified version of printf, specially designed to handle message content. This version uses pipe-es...
int EZTR_MsgSContent_NoPipe_Sprintf(char *buffer, const char *format,...)
A modified version of printf, specially designed to handle message content. This version does not use...
int EZTR_MsgSContent_NoPipe_PrintfLine(const char *format,...)
A modified version of printf, specially designed to handle message content. This version does not use...
s32 EZTR_MsgSContent_Cmp(char *str1, char *str2)
Compares two message content strings.
int EZTR_MsgSContent_Sprintf(char *buffer, const char *format,...)
A modified version of printf, specially designed to handle message content. This version uses pipe-es...
u32 EZTR_MsgSContent_Len(char *cont)
Gets the length of the a message content string in bytes, not counting the '\xBF' termination charact...
EZTR_TextBoxIcon
Used in the message header to indicate a display icon for the message.
Definition eztr_api.h:434
EZTR_TextBoxType
Used in the message header to indicate the style of textbox used for the message.
Definition eztr_api.h:405
void(* EZTR_MsgCallback)(EZTR_MsgBuffer *buf, u16 textId, PlayState *play)
The function pointer type for message callbacks.
Definition eztr_api.h:396
u16(* EZTR_CustomMsgHandle)(_EZTR_CustomMsgHandleSetter *setter)
The type declaration for custom message handle.
Definition eztr_api.h:388
The message buffer, with the header represented as its individual members.
Definition eztr_api.h:350
The message buffer, but with the header and content regions defined as seperate arrays.
Definition eztr_api.h:333
The message buffers type as defined in the Majora's Mask decompilation.
Definition eztr_api.h:320
A union of the three MsgBuffer structs, and the primary type for interacting with message data.
Definition eztr_api.h:373