From a9310efa852d6114b3811e5b0ce1fff7f238d54f Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Tue, 20 Oct 2020 06:48:47 +0100 Subject: [PATCH] add MessageID constants --- include/common.h | 1 + include/messages.h | 65 ++++++++++++++++++++++++++++++ src/world/area_kmr/kmr_12/events.c | 5 +-- src/world/area_kmr/kmr_12/header.c | 2 +- 4 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 include/messages.h diff --git a/include/common.h b/include/common.h index 14ade322ef..0e3f4293aa 100644 --- a/include/common.h +++ b/include/common.h @@ -9,5 +9,6 @@ #include "macros.h" #include "enums.h" #include "si.h" +#include "messages.h" #endif diff --git a/include/messages.h b/include/messages.h new file mode 100644 index 0000000000..d119c08963 --- /dev/null +++ b/include/messages.h @@ -0,0 +1,65 @@ +#ifndef _MESSAGES_H_ +#define _MESSAGES_H_ + +#include "types.h" + +typedef s32 MessageID; + +#define MESSAGE_ID(section, index) ((section << 0x10) + index) + +// 00 Introduction +// 01 Postgame Celebration +// 02 Toad Town Gate Sector +// 03 Toad Town Castle Sector +// 04 Toad Town Bridge Sector +// 05 Toad Town Train Sector +// 06 Toad Town Warehouse Sector +// 07 Toad Town Docks Sector +// 08 Minigames +// 09 Castle Grounds +// 0A Shooting Star Summit +// 0B Chapter 0 +// 0C Chapter 1 +// 0D Chapter 2 +// 0E Chapter 3 +// 0F Chapter 4 +// 10 Chapter 5 +// 11 Chapter 6 +// 12 Chapter 7 +// 13 Bowser's Castle +// 14 Peach Segments +// 15 Koopa Koot Favors +// 16 Russ T Advice +// 17 News Bulletin +// 18 Gossip Bulletin + +// 19 Map Tattles +#define MessageID_TATTLE_KMR_12 MESSAGE_ID(0x19, 0x40) + +// 1A NPC Tattles +// 1B Entity Tattles +// 1C Enemy Tattles + +// 1D Menus I +#define MessageID_SIGN_MUSHROOM_GOOMBA_TRAP MESSAGE_ID(0x1D, 0x167) +#define MessageID_SIGN_GOOMBA_KINGS_FORTRESS_AHEAD MESSAGE_ID(0x1D, 0x168) + +// 1E Choices +// 1F Menus II +// 20 Party Letters + Luigi's Diary +// 21 Advice Fortunes +// 22 Treasure Fortunes +// 23 Item Descriptions I +// 24 Item Descriptions II +// 25 Item Descriptions III +// 26 Item Names +// 27 Shop Messages +// 28 Partner Descriptions +// 29 Enemy Names +// 2A Mario Moves +// 2B Partner Moves +// 2C Quiz Questions +// 2D Quiz Options +// 2E Credits + +#endif diff --git a/src/world/area_kmr/kmr_12/events.c b/src/world/area_kmr/kmr_12/events.c index 7e1aedbb82..1d53a26f17 100644 --- a/src/world/area_kmr/kmr_12/events.c +++ b/src/world/area_kmr/kmr_12/events.c @@ -68,7 +68,7 @@ static Script read_west_sign = { // "Eat a Mushroom to regain your energy!" SI_SUSPEND_GROUP(1), SI_CALL(DisablePlayerInput, TRUE), - SI_CALL(ShowMessageAtScreenPos, 0x1D0167, 160, 40), + SI_CALL(ShowMessageAtScreenPos, MessageID_SIGN_MUSHROOM_GOOMBA_TRAP, 160, 40), SI_RESUME_GROUP(1), SI_SET(SI_FLAG(0), FALSE), @@ -204,10 +204,9 @@ static Script read_east_sign = { SI_GROUP(0), - // "Goomba King's Fortress Ahead" SI_CALL(func_802D5830, 1), SI_CALL(DisablePlayerInput, 1), - SI_CALL(ShowMessageAtScreenPos, 0x1D0168, 160, 40), + SI_CALL(ShowMessageAtScreenPos, MessageID_SIGN_GOOMBA_KINGS_FORTRESS_AHEAD, 160, 40), SI_CALL(DisablePlayerInput, 0), SI_CALL(func_802D5830, 0), diff --git a/src/world/area_kmr/kmr_12/header.c b/src/world/area_kmr/kmr_12/header.c index 0f0b73a4ff..c86ce74962 100644 --- a/src/world/area_kmr/kmr_12/header.c +++ b/src/world/area_kmr/kmr_12/header.c @@ -10,7 +10,7 @@ MapHeader header = { .entryList = entryList, .entryCount = ENTRY_COUNT(entryList), .background = 0x80200000, - .tattle = 0x00190040, + .tattle = MessageID_TATTLE_KMR_12, }; Script kmr_12_play_music = {