Text Extraction + some Message Docs (#1530)

* Some Decoder WIPs

* Improvements

* POC

* Fix bss

* another newline

* Staff OK

* Cleanup + fix progress script

* script cleanup

* Some docs

* makefile

* Extract text from extract_assets.py

* More docs

* Even more docs

* Other message assets

* Small cleanups

* Clean up decoders/encoders

* Message_SetupLoadItemIcon -> Message_DecodeHeader

* Some more docs

* Remove mkdmadata

* Fade Skippable

* More cmd docs

* 1 left

* Last notes

* HS_TIMER -> HS_TIME

* More general docs

* Format

* Note the charmap conversion for buttons in message_data_fmt_nes.h

* Remove trailing whitespace

* Small fixes

* PR
This commit is contained in:
Derek Hensley 2024-01-19 16:16:57 -08:00 committed by GitHub
parent e32e44ff40
commit fe6494187e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
147 changed files with 2338 additions and 2480 deletions

View File

@ -172,7 +172,7 @@ SRC_DIRS := $(shell find src -type d)
ASM_DIRS := $(shell find asm -type d -not -path "asm/non_matchings*") $(shell find data -type d)
## Assets binaries (PNGs, JPGs, etc)
ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/c/*" -not -name "c")
ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/c/*" -not -name "c" -not -path "assets/text")
# Prevents building C files that will be #include'd
ASSET_BIN_DIRS_C_FILES := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/code*" -not -path "assets/overlays*")
@ -302,6 +302,7 @@ clean:
assetclean:
$(RM) -rf $(ASSET_BIN_DIRS)
$(RM) -rf assets/text/*.h
$(RM) -rf build/assets
$(RM) -rf .extracted-assets.json
@ -373,6 +374,16 @@ build/baserom/%.o: baserom/%
build/data/%.o: data/%.s
$(AS) $(ASFLAGS) $< -o $@
build/assets/text/message_data.enc.h: assets/text/message_data.h
python3 tools/msg/nes/msgencNES.py -o $@ $<
build/assets/text/staff_message_data.enc.h: assets/text/staff_message_data.h
python3 tools/msg/staff/msgencStaff.py -o $@ $<
build/assets/text/message_data_static.o: build/assets/text/message_data.enc.h
build/assets/text/staff_message_data_static.o: build/assets/text/staff_message_data.enc.h
build/src/code/z_message.o: build/assets/text/message_data.enc.h build/assets/text/staff_message_data.enc.h
build/src/overlays/%.o: src/overlays/%.c
$(CC_CHECK) $<
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<

View File

@ -0,0 +1,10 @@
#define MESSAGE_DATA_STATIC
#include "message_data_fmt_nes.h"
#define DEFINE_MESSAGE(textId, typePos, msg) \
const char _message_##textId[sizeof(msg)] = { msg CMD_END };
#include "assets/text/message_data.enc.h"
#undef DEFINE_MESSAGE

View File

@ -0,0 +1,10 @@
#define MESSAGE_DATA_STATIC
#include "message_data_fmt_staff.h"
#define DEFINE_MESSAGE(textId, typePos, msg) \
const char _message_##textId##_staff[sizeof(msg)] = { msg CMD_END };
#include "assets/text/staff_message_data.enc.h"
#undef DEFINE_MESSAGE

View File

@ -0,0 +1,12 @@
<Root>
<File Name="message_static" Segment="7">
<Texture Name="gMessageDefaultBackgroundTex" OutName="message_default_background" Format="ia4" Width="128" Height="64" Offset="0x0"/>
<Texture Name="gMessageSignBackgroundTex" OutName="message_sign_background" Format="ia4" Width="128" Height="64" Offset="0x1000"/>
<Texture Name="gMessageNoteStaffBackgroundTex" OutName="message_note_staff_background" Format="ia4" Width="128" Height="64" Offset="0x2000"/>
<Texture Name="gMessageFadingBackgroundTex" OutName="message_fading_background" Format="i4" Width="128" Height="64" Offset="0x3000"/>
<Texture Name="gMessageNotebookBackgroundTex" OutName="message_notebook_background" Format="i4" Width="128" Height="64" Offset="0x4000"/>
<Texture Name="gMessageContinueTriangleTex" OutName="message_continue_triangle" Format="i4" Width="16" Height="16" Offset="0x5000"/>
<Texture Name="gMessageEndSquareTex" OutName="message_end_square" Format="i4" Width="16" Height="16" Offset="0x5080"/>
<Texture Name="gMessageArrowTex" OutName="message_arrow" Format="i4" Width="16" Height="16" Offset="0x5100"/>
</File>
</Root>

View File

@ -0,0 +1,6 @@
<Root>
<File Name="message_texture_static" Segment="9">
<Texture Name="gMessageXLeftTex" OutName="message_x_left" Format="i4" Width="96" Height="48" Offset="0x0"/>
<Texture Name="gMessageXRightTex" OutName="message_x_right" Format="i4" Width="96" Height="48" Offset="0x900"/>
</File>
</Root>

View File

@ -111,23 +111,46 @@ def main():
signal.signal(signal.SIGINT, SignalHandler)
extractedAssetsTracker = manager.dict()
if os.path.exists(EXTRACTED_ASSETS_NAMEFILE) and not args.force:
if not args.force and os.path.exists(EXTRACTED_ASSETS_NAMEFILE):
with open(EXTRACTED_ASSETS_NAMEFILE, encoding='utf-8') as f:
extractedAssetsTracker.update(json.load(f, object_hook=manager.dict))
extract_text_path = "assets/text/message_data.h"
extract_staff_text_path = "assets/text/staff_message_data.h"
asset_path = args.single
if asset_path is not None:
fullPath = os.path.join("assets", "xml", asset_path + ".xml")
if not os.path.exists(fullPath):
print(f"Error. File {fullPath} does not exist.", file=os.sys.stderr)
exit(1)
if "text/" in asset_path:
from tools.msg.nes import msgdisNES
print("Extracting message_data")
msgdisNES.main(extract_text_path)
initializeWorker(mainAbort, args.unaccounted, extractedAssetsTracker, manager)
# Always extract if -s is used.
if fullPath in extractedAssetsTracker:
del extractedAssetsTracker[fullPath]
ExtractFunc(fullPath)
from tools.msg.staff import msgdisStaff
print("Extracting staff_message_data")
msgdisStaff.main(extract_staff_text_path)
else:
fullPath = os.path.join("assets", "xml", asset_path + ".xml")
if not os.path.exists(fullPath):
print(f"Error. File {fullPath} does not exist.", file=os.sys.stderr)
exit(1)
initializeWorker(mainAbort, args.unaccounted, extractedAssetsTracker, manager)
# Always extract if -s is used.
if fullPath in extractedAssetsTracker:
del extractedAssetsTracker[fullPath]
ExtractFunc(fullPath)
else:
# Only extract text if the header does not already exist, or if --force was passed
if args.force or not os.path.isfile(extract_text_path):
from tools.msg.nes import msgdisNES
print("Extracting message_data")
msgdisNES.main(extract_text_path)
if args.force or not os.path.isfile(extract_staff_text_path):
from tools.msg.staff import msgdisStaff
print("Extracting staff_message_data")
msgdisStaff.main(extract_staff_text_path)
xmlFiles = []
for currentPath, _, files in os.walk(os.path.join("assets", "xml")):
for file in files:

View File

@ -0,0 +1,340 @@
#ifndef MESSAGE_DATA_FMT_NES_H
#define MESSAGE_DATA_FMT_NES_H
/*
* Macros to create both a constant and a string literal from a magic value
* The constants are used in code files when parsing text for various purposes
* The strings are used in the message_data_static files themselves, as you can only concat strings with other strings
*/
#ifndef GLUE
#define GLUE(a, b) a##b
#endif
#define STRINGIFY(s) #s
#define EXPAND_AND_STRINGIFY(s) STRINGIFY(s)
#define HEX(N) GLUE(0x, N)
#define STR(N) EXPAND_AND_STRINGIFY(GLUE(\x, N))
/*
* Text control characters
*/
// Control character magic values, in 2-digit hex without prefix
#define CTRL_COLOR_DEFAULT 00
#define CTRL_COLOR_RED 01
#define CTRL_COLOR_GREEN 02
#define CTRL_COLOR_BLUE 03
#define CTRL_COLOR_YELLOW 04
#define CTRL_COLOR_LIGHTBLUE 05
#define CTRL_COLOR_PINK 06
#define CTRL_COLOR_SILVER 07
#define CTRL_COLOR_ORANGE 08
#define CTRL_TEXT_SPEED 0A // Note this should take an arg 0 to 6, but always just sets next decode char as 0
#define CTRL_HS_BOAT_ARCHERY 0B
#define CTRL_STRAY_FAIRIES 0C
#define CTRL_TOKENS 0D
#define CTRL_POINTS_TENS 0E
#define CTRL_POINTS_THOUSANDS 0F
#define CTRL_BOX_BREAK 10
#define CTRL_NEWLINE 11
#define CTRL_BOX_BREAK2 12
#define CTRL_CARRIAGE_RETURN 13
#define CTRL_SHIFT 14
#define CTRL_CONTINUE 15
#define CTRL_NAME 16
#define CTRL_QUICKTEXT_ENABLE 17
#define CTRL_QUICKTEXT_DISABLE 18
#define CTRL_EVENT 19
#define CTRL_PERSISTENT 1A
#define CTRL_BOX_BREAK_DELAYED 1B
#define CTRL_FADE 1C
#define CTRL_FADE_SKIPPABLE 1D
#define CTRL_SFX 1E
#define CTRL_DELAY 1F
#define CTRL_BTN_A B0
#define CTRL_BTN_B B1
#define CTRL_BTN_C B2
#define CTRL_BTN_L B3
#define CTRL_BTN_R B4
#define CTRL_BTN_Z B5
#define CTRL_BTN_CUP B6
#define CTRL_BTN_CDOWN B7
#define CTRL_BTN_CLEFT B8
#define CTRL_BTN_CRIGHT B9
#define CTRL_Z_TARGET BA
#define CTRL_CONTROL_PAD BB
#define CTRL_END BF
#define CTRL_BACKGROUND C1
#define CTRL_TWO_CHOICE C2
#define CTRL_THREE_CHOICE C3
#define CTRL_TIMER_POSTMAN C4
#define CTRL_TIMER_MINIGAME_1 C5
#define CTRL_TIMER_2 C6
#define CTRL_TIMER_MOON_CRASH C7
#define CTRL_TIMER_MINIGAME_2 C8
#define CTRL_TIMER_ENV_HAZARD C9
#define CTRL_TIME CA
#define CTRL_CHEST_FLAGS CB
#define CTRL_INPUT_BANK CC
#define CTRL_RUPEES_SELECTED CD
#define CTRL_RUPEES_TOTAL CE
#define CTRL_TIME_UNTIL_MOON_CRASH CF
#define CTRL_INPUT_DOGGY_RACETRACK_BET D0
#define CTRL_INPUT_BOMBER_CODE D1
#define CTRL_PAUSE_MENU D2
#define CTRL_TIME_SPEED D3
#define CTRL_OWL_WARP D4
#define CTRL_INPUT_LOTTERY_CODE D5
#define CTRL_SPIDER_HOUSE_MASK_CODE D6
#define CTRL_STRAY_FAIRIES_LEFT_WOODFALL D7
#define CTRL_STRAY_FAIRIES_LEFT_SNOWHEAD D8
#define CTRL_STRAY_FAIRIES_LEFT_GREAT_BAY D9
#define CTRL_STRAY_FAIRIES_LEFT_STONE_TOWER DA
#define CTRL_POINTS_BOAT_ARCHERY DB // Seems to be the exact same as CTRL_POINTS_THOUSANDS
#define CTRL_LOTTERY_CODE DC
#define CTRL_LOTTERY_CODE_GUESS DD
#define CTRL_HELD_ITEM_PRICE DE
#define CTRL_BOMBER_CODE DF
#define CTRL_EVENT2 E0 // Seems to be the exact same as CTRL_EVENT
#define CTRL_SPIDER_HOUSE_MASK_CODE_1 E1
#define CTRL_SPIDER_HOUSE_MASK_CODE_2 E2
#define CTRL_SPIDER_HOUSE_MASK_CODE_3 E3
#define CTRL_SPIDER_HOUSE_MASK_CODE_4 E4
#define CTRL_SPIDER_HOUSE_MASK_CODE_5 E5
#define CTRL_SPIDER_HOUSE_MASK_CODE_6 E6
#define CTRL_HOURS_UNTIL_MOON_CRASH E7
#define CTRL_TIME_UNTIL_NEW_DAY E8
#define CTRL_HS_POINTS_BANK_RUPEES F0
#define CTRL_HS_POINTS_UNK_1 F1
#define CTRL_HS_POINTS_FISHING F2
#define CTRL_HS_TIME_BOAT_ARCHERY F3 // Note this interprets the highscore value as a time (not the actual timer for the minigame)
#define CTRL_HS_TIME_HORSE_BACK_BALLOON F4 // Note this interprets the highscore value as a time (not the actual timer for the minigame)
#define CTRL_HS_TIME_LOTTERY_GUESS F5
#define CTRL_HS_TOWN_SHOOTING_GALLERY F6
#define CTRL_HS_UNK_1 F7
#define CTRL_HS_UNK_3_LOWER F8
#define CTRL_HS_HORSE_BACK_BALLOON F9
#define CTRL_HS_DEKU_PLAYGROUND_DAY_1 FA
#define CTRL_HS_DEKU_PLAYGROUND_DAY_2 FB
#define CTRL_HS_DEKU_PLAYGROUND_DAY_3 FC
#define CTRL_DEKU_PLAYGROUND_NAME_DAY_1 FD
#define CTRL_DEKU_PLAYGROUND_NAME_DAY_2 FE
#define CTRL_DEKU_PLAYGROUND_NAME_DAY_3 FF
#ifdef MESSAGE_DATA_STATIC
// For use in message_data_static files
#define ARG(x) x
#define CMD_COLOR_DEFAULT STR(CTRL_COLOR_DEFAULT)
#define CMD_COLOR_RED STR(CTRL_COLOR_RED)
#define CMD_COLOR_GREEN STR(CTRL_COLOR_GREEN)
#define CMD_COLOR_BLUE STR(CTRL_COLOR_BLUE)
#define CMD_COLOR_YELLOW STR(CTRL_COLOR_YELLOW)
#define CMD_COLOR_LIGHTBLUE STR(CTRL_COLOR_LIGHTBLUE)
#define CMD_COLOR_PINK STR(CTRL_COLOR_PINK)
#define CMD_COLOR_SILVER STR(CTRL_COLOR_SILVER)
#define CMD_COLOR_ORANGE STR(CTRL_COLOR_ORANGE)
#define CMD_TEXT_SPEED STR(CTRL_TEXT_SPEED)
#define CMD_HS_BOAT_ARCHERY STR(CTRL_HS_BOAT_ARCHERY)
#define CMD_STRAY_FAIRIES STR(CTRL_STRAY_FAIRIES)
#define CMD_TOKENS STR(CTRL_TOKENS)
#define CMD_POINTS_TENS STR(CTRL_POINTS_TENS)
#define CMD_POINTS_THOUSANDS STR(CTRL_POINTS_THOUSANDS)
#define CMD_BOX_BREAK STR(CTRL_BOX_BREAK)
// while a control character, newlines are handled in the charmap conversion
// stage to allow normal newline \n usage in message_data_static files
#define CMD_NEWLINE STR(CTRL_NEWLINE)
#define CMD_BOX_BREAK2 STR(CTRL_BOX_BREAK2)
#define CMD_CARRIAGE_RETURN STR(CTRL_CARRIAGE_RETURN)
#define CMD_SHIFT(x) STR(CTRL_SHIFT) ARG(x) // 1
#define CMD_CONTINUE STR(CTRL_CONTINUE)
#define CMD_NAME STR(CTRL_NAME)
#define CMD_QUICKTEXT_ENABLE STR(CTRL_QUICKTEXT_ENABLE)
#define CMD_QUICKTEXT_DISABLE STR(CTRL_QUICKTEXT_DISABLE)
#define CMD_EVENT STR(CTRL_EVENT)
#define CMD_PERSISTENT STR(CTRL_PERSISTENT)
#define CMD_BOX_BREAK_DELAYED(x) STR(CTRL_BOX_BREAK_DELAYED) ARG(x) // 2
#define CMD_FADE(x) STR(CTRL_FADE) ARG(x) // 2
#define CMD_FADE_SKIPPABLE(x) STR(CTRL_FADE_SKIPPABLE) ARG(x) // 2
#define CMD_SFX(x) STR(CTRL_SFX) ARG(x) // 2
#define CMD_DELAY(x) STR(CTRL_DELAY) ARG(x) // 2
// while control characters, button images are handled in the charmap conversion
#define CMD_BTN_A STR(CTRL_BTN_A) // "[A]"
#define CMD_BTN_B STR(CTRL_BTN_B) // "[B]"
#define CMD_BTN_C STR(CTRL_BTN_C) // "[C]"
#define CMD_BTN_L STR(CTRL_BTN_L) // "[L]"
#define CMD_BTN_R STR(CTRL_BTN_R) // "[R]"
#define CMD_BTN_Z STR(CTRL_BTN_Z) // "[Z]"
#define CMD_BTN_CUP STR(CTRL_BTN_CUP) // "[C-Up]"
#define CMD_BTN_CDOWN STR(CTRL_BTN_CDOWN) // "[C-Down]"
#define CMD_BTN_CLEFT STR(CTRL_BTN_CLEFT) // "[C-Left]"
#define CMD_BTN_CRIGHT STR(CTRL_BTN_CRIGHT) // "[C-Right]"
#define CMD_Z_TARGET STR(CTRL_Z_TARGET) // "▼"
#define CMD_CONTROL_PAD STR(CTRL_CONTROL_PAD) // "[Control-Pad]"
#define CMD_END STR(CTRL_END)
#define CMD_BACKGROUND STR(CTRL_BACKGROUND)
#define CMD_TWO_CHOICE STR(CTRL_TWO_CHOICE)
#define CMD_THREE_CHOICE STR(CTRL_THREE_CHOICE)
#define CMD_TIMER_POSTMAN STR(CTRL_TIMER_POSTMAN)
#define CMD_TIMER_MINIGAME_1 STR(CTRL_TIMER_MINIGAME_1)
#define CMD_TIMER_2 STR(CTRL_TIMER_2)
#define CMD_TIMER_MOON_CRASH STR(CTRL_TIMER_MOON_CRASH)
#define CMD_TIMER_MINIGAME_2 STR(CTRL_TIMER_MINIGAME_2)
#define CMD_TIMER_ENV_HAZARD STR(CTRL_TIMER_ENV_HAZARD)
#define CMD_TIME STR(CTRL_TIME)
#define CMD_CHEST_FLAGS STR(CTRL_CHEST_FLAGS)
#define CMD_INPUT_BANK STR(CTRL_INPUT_BANK)
#define CMD_RUPEES_SELECTED STR(CTRL_RUPEES_SELECTED)
#define CMD_RUPEES_TOTAL STR(CTRL_RUPEES_TOTAL)
#define CMD_TIME_UNTIL_MOON_CRASH STR(CTRL_TIME_UNTIL_MOON_CRASH)
#define CMD_INPUT_DOGGY_RACETRACK_BET STR(CTRL_INPUT_DOGGY_RACETRACK_BET)
#define CMD_INPUT_BOMBER_CODE STR(CTRL_INPUT_BOMBER_CODE)
#define CMD_PAUSE_MENU STR(CTRL_PAUSE_MENU)
#define CMD_TIME_SPEED STR(CTRL_TIME_SPEED)
#define CMD_OWL_WARP STR(CTRL_OWL_WARP)
#define CMD_INPUT_LOTTERY_CODE STR(CTRL_INPUT_LOTTERY_CODE)
#define CMD_SPIDER_HOUSE_MASK_CODE STR(CTRL_SPIDER_HOUSE_MASK_CODE)
#define CMD_STRAY_FAIRIES_LEFT_WOODFALL STR(CTRL_STRAY_FAIRIES_LEFT_WOODFALL)
#define CMD_STRAY_FAIRIES_LEFT_SNOWHEAD STR(CTRL_STRAY_FAIRIES_LEFT_SNOWHEAD)
#define CMD_STRAY_FAIRIES_LEFT_GREAT_BAY STR(CTRL_STRAY_FAIRIES_LEFT_GREAT_BAY)
#define CMD_STRAY_FAIRIES_LEFT_STONE_TOWER STR(CTRL_STRAY_FAIRIES_LEFT_STONE_TOWER)
#define CMD_POINTS_BOAT_ARCHERY STR(CTRL_POINTS_BOAT_ARCHERY)
#define CMD_LOTTERY_CODE STR(CTRL_LOTTERY_CODE)
#define CMD_LOTTERY_CODE_GUESS STR(CTRL_LOTTERY_CODE_GUESS)
#define CMD_HELD_ITEM_PRICE STR(CTRL_HELD_ITEM_PRICE)
#define CMD_BOMBER_CODE STR(CTRL_BOMBER_CODE)
#define CMD_EVENT2 STR(CTRL_EVENT2)
#define CMD_SPIDER_HOUSE_MASK_CODE_1 STR(CTRL_SPIDER_HOUSE_MASK_CODE_1)
#define CMD_SPIDER_HOUSE_MASK_CODE_2 STR(CTRL_SPIDER_HOUSE_MASK_CODE_2)
#define CMD_SPIDER_HOUSE_MASK_CODE_3 STR(CTRL_SPIDER_HOUSE_MASK_CODE_3)
#define CMD_SPIDER_HOUSE_MASK_CODE_4 STR(CTRL_SPIDER_HOUSE_MASK_CODE_4)
#define CMD_SPIDER_HOUSE_MASK_CODE_5 STR(CTRL_SPIDER_HOUSE_MASK_CODE_5)
#define CMD_SPIDER_HOUSE_MASK_CODE_6 STR(CTRL_SPIDER_HOUSE_MASK_CODE_6)
#define CMD_HOURS_UNTIL_MOON_CRASH STR(CTRL_HOURS_UNTIL_MOON_CRASH)
#define CMD_TIME_UNTIL_NEW_DAY STR(CTRL_TIME_UNTIL_NEW_DAY)
#define CMD_HS_POINTS_BANK_RUPEES STR(CTRL_HS_POINTS_BANK_RUPEES)
#define CMD_HS_POINTS_UNK_1 STR(CTRL_HS_POINTS_UNK_1)
#define CMD_HS_POINTS_FISHING STR(CTRL_HS_POINTS_FISHING)
#define CMD_HS_TIME_BOAT_ARCHERY STR(CTRL_HS_TIME_BOAT_ARCHERY)
#define CMD_HS_TIME_HORSE_BACK_BALLOON STR(CTRL_HS_TIME_HORSE_BACK_BALLOON)
#define CMD_HS_TIME_LOTTERY_GUESS STR(CTRL_HS_TIME_LOTTERY_GUESS)
#define CMD_HS_TOWN_SHOOTING_GALLERY STR(CTRL_HS_TOWN_SHOOTING_GALLERY)
#define CMD_HS_UNK_1 STR(CTRL_HS_UNK_1)
#define CMD_HS_UNK_3_LOWER STR(CTRL_HS_UNK_3_LOWER)
#define CMD_HS_HORSE_BACK_BALLOON STR(CTRL_HS_HORSE_BACK_BALLOON)
#define CMD_HS_DEKU_PLAYGROUND_DAY_1 STR(CTRL_HS_DEKU_PLAYGROUND_DAY_1)
#define CMD_HS_DEKU_PLAYGROUND_DAY_2 STR(CTRL_HS_DEKU_PLAYGROUND_DAY_2)
#define CMD_HS_DEKU_PLAYGROUND_DAY_3 STR(CTRL_HS_DEKU_PLAYGROUND_DAY_3)
#define CMD_DEKU_PLAYGROUND_NAME_DAY_1 STR(CTRL_DEKU_PLAYGROUND_NAME_DAY_1)
#define CMD_DEKU_PLAYGROUND_NAME_DAY_2 STR(CTRL_DEKU_PLAYGROUND_NAME_DAY_2)
#define CMD_DEKU_PLAYGROUND_NAME_DAY_3 STR(CTRL_DEKU_PLAYGROUND_NAME_DAY_3)
#else
#define MESSAGE_COLOR_DEFAULT HEX(CTRL_COLOR_DEFAULT)
#define MESSAGE_COLOR_RED HEX(CTRL_COLOR_RED)
#define MESSAGE_COLOR_GREEN HEX(CTRL_COLOR_GREEN)
#define MESSAGE_COLOR_BLUE HEX(CTRL_COLOR_BLUE)
#define MESSAGE_COLOR_YELLOW HEX(CTRL_COLOR_YELLOW)
#define MESSAGE_COLOR_LIGHTBLUE HEX(CTRL_COLOR_LIGHTBLUE)
#define MESSAGE_COLOR_PINK HEX(CTRL_COLOR_PINK)
#define MESSAGE_COLOR_SILVER HEX(CTRL_COLOR_SILVER)
#define MESSAGE_COLOR_ORANGE HEX(CTRL_COLOR_ORANGE)
#define MESSAGE_TEXT_SPEED HEX(CTRL_TEXT_SPEED)
#define MESSAGE_HS_BOAT_ARCHERY HEX(CTRL_HS_BOAT_ARCHERY)
#define MESSAGE_STRAY_FAIRIES HEX(CTRL_STRAY_FAIRIES)
#define MESSAGE_TOKENS HEX(CTRL_TOKENS)
#define MESSAGE_POINTS_TENS HEX(CTRL_POINTS_TENS)
#define MESSAGE_POINTS_THOUSANDS HEX(CTRL_POINTS_THOUSANDS)
#define MESSAGE_BOX_BREAK HEX(CTRL_BOX_BREAK)
#define MESSAGE_NEWLINE HEX(CTRL_NEWLINE)
#define MESSAGE_BOX_BREAK2 HEX(CTRL_BOX_BREAK2)
#define MESSAGE_CARRIAGE_RETURN HEX(CTRL_CARRIAGE_RETURN)
#define MESSAGE_SHIFT HEX(CTRL_SHIFT)
#define MESSAGE_CONTINUE HEX(CTRL_CONTINUE)
#define MESSAGE_NAME HEX(CTRL_NAME)
#define MESSAGE_QUICKTEXT_ENABLE HEX(CTRL_QUICKTEXT_ENABLE)
#define MESSAGE_QUICKTEXT_DISABLE HEX(CTRL_QUICKTEXT_DISABLE)
#define MESSAGE_EVENT HEX(CTRL_EVENT)
#define MESSAGE_PERSISTENT HEX(CTRL_PERSISTENT)
#define MESSAGE_BOX_BREAK_DELAYED HEX(CTRL_BOX_BREAK_DELAYED)
#define MESSAGE_FADE HEX(CTRL_FADE)
#define MESSAGE_FADE_SKIPPABLE HEX(CTRL_FADE_SKIPPABLE)
#define MESSAGE_SFX HEX(CTRL_SFX)
#define MESSAGE_DELAY HEX(CTRL_DELAY)
#define MESSAGE_BTN_A HEX(CTRL_BTN_A)
#define MESSAGE_BTN_B HEX(CTRL_BTN_B)
#define MESSAGE_BTN_C HEX(CTRL_BTN_C)
#define MESSAGE_BTN_L HEX(CTRL_BTN_L)
#define MESSAGE_BTN_R HEX(CTRL_BTN_R)
#define MESSAGE_BTN_Z HEX(CTRL_BTN_Z)
#define MESSAGE_BTN_CUP HEX(CTRL_BTN_CUP)
#define MESSAGE_BTN_CDOWN HEX(CTRL_BTN_CDOWN)
#define MESSAGE_BTN_CLEFT HEX(CTRL_BTN_CLEFT)
#define MESSAGE_BTN_CRIGHT HEX(CTRL_BTN_CRIGHT)
#define MESSAGE_Z_TARGET HEX(CTRL_Z_TARGET)
#define MESSAGE_CONTROL_PAD HEX(CTRL_CONTROL_PAD)
#define MESSAGE_END HEX(CTRL_END)
#define MESSAGE_BACKGROUND HEX(CTRL_BACKGROUND)
#define MESSAGE_TWO_CHOICE HEX(CTRL_TWO_CHOICE)
#define MESSAGE_THREE_CHOICE HEX(CTRL_THREE_CHOICE)
#define MESSAGE_TIMER_POSTMAN HEX(CTRL_TIMER_POSTMAN)
#define MESSAGE_TIMER_MINIGAME_1 HEX(CTRL_TIMER_MINIGAME_1)
#define MESSAGE_TIMER_2 HEX(CTRL_TIMER_2)
#define MESSAGE_TIMER_MOON_CRASH HEX(CTRL_TIMER_MOON_CRASH)
#define MESSAGE_TIMER_MINIGAME_2 HEX(CTRL_TIMER_MINIGAME_2)
#define MESSAGE_TIMER_ENV_HAZARD HEX(CTRL_TIMER_ENV_HAZARD)
#define MESSAGE_TIME HEX(CTRL_TIME)
#define MESSAGE_CHEST_FLAGS HEX(CTRL_CHEST_FLAGS)
#define MESSAGE_INPUT_BANK HEX(CTRL_INPUT_BANK)
#define MESSAGE_RUPEES_SELECTED HEX(CTRL_RUPEES_SELECTED)
#define MESSAGE_RUPEES_TOTAL HEX(CTRL_RUPEES_TOTAL)
#define MESSAGE_TIME_UNTIL_MOON_CRASH HEX(CTRL_TIME_UNTIL_MOON_CRASH)
#define MESSAGE_INPUT_DOGGY_RACETRACK_BET HEX(CTRL_INPUT_DOGGY_RACETRACK_BET)
#define MESSAGE_INPUT_BOMBER_CODE HEX(CTRL_INPUT_BOMBER_CODE)
#define MESSAGE_PAUSE_MENU HEX(CTRL_PAUSE_MENU)
#define MESSAGE_TIME_SPEED HEX(CTRL_TIME_SPEED)
#define MESSAGE_OWL_WARP HEX(CTRL_OWL_WARP)
#define MESSAGE_INPUT_LOTTERY_CODE HEX(CTRL_INPUT_LOTTERY_CODE)
#define MESSAGE_SPIDER_HOUSE_MASK_CODE HEX(CTRL_SPIDER_HOUSE_MASK_CODE)
#define MESSAGE_STRAY_FAIRIES_LEFT_WOODFALL HEX(CTRL_STRAY_FAIRIES_LEFT_WOODFALL)
#define MESSAGE_STRAY_FAIRIES_LEFT_SNOWHEAD HEX(CTRL_STRAY_FAIRIES_LEFT_SNOWHEAD)
#define MESSAGE_STRAY_FAIRIES_LEFT_GREAT_BAY HEX(CTRL_STRAY_FAIRIES_LEFT_GREAT_BAY)
#define MESSAGE_STRAY_FAIRIES_LEFT_STONE_TOWER HEX(CTRL_STRAY_FAIRIES_LEFT_STONE_TOWER)
#define MESSAGE_POINTS_BOAT_ARCHERY HEX(CTRL_POINTS_BOAT_ARCHERY)
#define MESSAGE_LOTTERY_CODE HEX(CTRL_LOTTERY_CODE)
#define MESSAGE_LOTTERY_CODE_GUESS HEX(CTRL_LOTTERY_CODE_GUESS)
#define MESSAGE_HELD_ITEM_PRICE HEX(CTRL_HELD_ITEM_PRICE)
#define MESSAGE_BOMBER_CODE HEX(CTRL_BOMBER_CODE)
#define MESSAGE_EVENT2 HEX(CTRL_EVENT2)
#define MESSAGE_SPIDER_HOUSE_MASK_CODE_1 HEX(CTRL_SPIDER_HOUSE_MASK_CODE_1)
#define MESSAGE_SPIDER_HOUSE_MASK_CODE_2 HEX(CTRL_SPIDER_HOUSE_MASK_CODE_2)
#define MESSAGE_SPIDER_HOUSE_MASK_CODE_3 HEX(CTRL_SPIDER_HOUSE_MASK_CODE_3)
#define MESSAGE_SPIDER_HOUSE_MASK_CODE_4 HEX(CTRL_SPIDER_HOUSE_MASK_CODE_4)
#define MESSAGE_SPIDER_HOUSE_MASK_CODE_5 HEX(CTRL_SPIDER_HOUSE_MASK_CODE_5)
#define MESSAGE_SPIDER_HOUSE_MASK_CODE_6 HEX(CTRL_SPIDER_HOUSE_MASK_CODE_6)
#define MESSAGE_HOURS_UNTIL_MOON_CRASH HEX(CTRL_HOURS_UNTIL_MOON_CRASH)
#define MESSAGE_TIME_UNTIL_NEW_DAY HEX(CTRL_TIME_UNTIL_NEW_DAY)
#define MESSAGE_HS_POINTS_BANK_RUPEES HEX(CTRL_HS_POINTS_BANK_RUPEES)
#define MESSAGE_HS_POINTS_UNK_1 HEX(CTRL_HS_POINTS_UNK_1)
#define MESSAGE_HS_POINTS_FISHING HEX(CTRL_HS_POINTS_FISHING)
#define MESSAGE_HS_TIME_BOAT_ARCHERY HEX(CTRL_HS_TIME_BOAT_ARCHERY)
#define MESSAGE_HS_TIME_HORSE_BACK_BALLOON HEX(CTRL_HS_TIME_HORSE_BACK_BALLOON)
#define MESSAGE_HS_TIME_LOTTERY_GUESS HEX(CTRL_HS_TIME_LOTTERY_GUESS)
#define MESSAGE_HS_TOWN_SHOOTING_GALLERY HEX(CTRL_HS_TOWN_SHOOTING_GALLERY)
#define MESSAGE_HS_UNK_1 HEX(CTRL_HS_UNK_1)
#define MESSAGE_HS_UNK_3_LOWER HEX(CTRL_HS_UNK_3_LOWER)
#define MESSAGE_HS_HORSE_BACK_BALLOON HEX(CTRL_HS_HORSE_BACK_BALLOON)
#define MESSAGE_HS_DEKU_PLAYGROUND_DAY_1 HEX(CTRL_HS_DEKU_PLAYGROUND_DAY_1)
#define MESSAGE_HS_DEKU_PLAYGROUND_DAY_2 HEX(CTRL_HS_DEKU_PLAYGROUND_DAY_2)
#define MESSAGE_HS_DEKU_PLAYGROUND_DAY_3 HEX(CTRL_HS_DEKU_PLAYGROUND_DAY_3)
#define MESSAGE_DEKU_PLAYGROUND_NAME_DAY_1 HEX(CTRL_DEKU_PLAYGROUND_NAME_DAY_1)
#define MESSAGE_DEKU_PLAYGROUND_NAME_DAY_2 HEX(CTRL_DEKU_PLAYGROUND_NAME_DAY_2)
#define MESSAGE_DEKU_PLAYGROUND_NAME_DAY_3 HEX(CTRL_DEKU_PLAYGROUND_NAME_DAY_3)
#endif
#endif

View File

@ -0,0 +1,180 @@
#ifndef MESSAGE_DATA_FMT_STAFF_H
#define MESSAGE_DATA_FMT_STAFF_H
/*
* Macros to create both a constant and a string literal from a magic value
* The constants are used in code files when parsing text for various purposes
* The strings are used in the message_data_static files themselves, as you can only concat strings with other strings
*/
#ifndef GLUE
#define GLUE(a, b) a##b
#endif
#define STRINGIFY(s) #s
#define EXPAND_AND_STRINGIFY(s) STRINGIFY(s)
#define HEX(N) GLUE(0x, N)
#define STR(N) EXPAND_AND_STRINGIFY(GLUE(\x, N))
/*
* Text control characters
*/
// Control character magic values, in 2-digit hex without prefix
#define CTRL_NEWLINE 01
#define CTRL_END 02
#define CTRL_BOX_BREAK 04
#define CTRL_COLOR 05
#define CTRL_SHIFT 06
#define CTRL_TEXTID 07
#define CTRL_QUICKTEXT_ENABLE 08
#define CTRL_QUICKTEXT_DISABLE 09
#define CTRL_PERSISTENT 0A
#define CTRL_EVENT 0B
#define CTRL_BOX_BREAK_DELAYED 0C
#define CTRL_AWAIT_BUTTON_PRESS 0D
#define CTRL_FADE 0E
#define CTRL_NAME 0F
#define CTRL_OCARINA 10
#define CTRL_FADE2 11
#define CTRL_SFX 12
#define CTRL_ITEM_ICON 13
#define CTRL_TEXT_SPEED 14
#define CTRL_BACKGROUND 15
#define CTRL_MARATHON_TIME 16
#define CTRL_RACE_TIME 17
#define CTRL_POINTS 18
#define CTRL_TOKENS 19
#define CTRL_UNSKIPPABLE 1A
#define CTRL_TWO_CHOICE 1B
#define CTRL_THREE_CHOICE 1C
#define CTRL_FISH_INFO 1D
#define CTRL_HIGHSCORE 1E
#define CTRL_TIME 1F
/*
* Colors
*/
#define COLOR_STR(N) EXPAND_AND_STRINGIFY(GLUE(\x4, N))
// Color magic values, in single-digit hex without prefix
#define CTRL_DEFAULT 0
#define CTRL_RED 1
#define CTRL_ADJUSTABLE 2
#define CTRL_BLUE 3
#define CTRL_LIGHTBLUE 4
#define CTRL_PURPLE 5
#define CTRL_YELLOW 6
#define CTRL_BLACK 7
#ifdef MESSAGE_DATA_STATIC
// For use in message_data_static files
#define ARG(x) x
// while a control character, newlines are handled in the charmap conversion
// stage to allow normal newline \n usage in message_data_static files
#define CMD_NEWLINE STR(CTRL_NEWLINE)
#define CMD_END STR(CTRL_END)
#define CMD_BOX_BREAK STR(CTRL_BOX_BREAK)
#define CMD_COLOR(x) STR(CTRL_COLOR) ARG(x) // 1
#define CMD_SHIFT(x) STR(CTRL_SHIFT) ARG(x) // 1
#define CMD_TEXTID(x) STR(CTRL_TEXTID) ARG(x) // 2
#define CMD_QUICKTEXT_ENABLE STR(CTRL_QUICKTEXT_ENABLE)
#define CMD_QUICKTEXT_DISABLE STR(CTRL_QUICKTEXT_DISABLE)
#define CMD_PERSISTENT STR(CTRL_PERSISTENT)
#define CMD_EVENT STR(CTRL_EVENT)
#define CMD_BOX_BREAK_DELAYED(x) STR(CTRL_BOX_BREAK_DELAYED) ARG(x) // 1
#define CMD_AWAIT_BUTTON_PRESS STR(CTRL_AWAIT_BUTTON_PRESS)
#define CMD_FADE(x) STR(CTRL_FADE) ARG(x) // 1
#define CMD_NAME STR(CTRL_NAME)
#define CMD_OCARINA STR(CTRL_OCARINA)
#define CMD_FADE2(x) STR(CTRL_FADE2) ARG(x) // 2
#define CMD_SFX(x) STR(CTRL_SFX) ARG(x) // 2
#define CMD_ITEM_ICON(x) STR(CTRL_ITEM_ICON) ARG(x) // 1
#define CMD_TEXT_SPEED(x) STR(CTRL_TEXT_SPEED) ARG(x) // 1
#define CMD_BACKGROUND(x,y,z) STR(CTRL_BACKGROUND) ARG(x) ARG(y) ARG(z)
#define CMD_MARATHON_TIME STR(CTRL_MARATHON_TIME)
#define CMD_RACE_TIME STR(CTRL_RACE_TIME)
#define CMD_POINTS STR(CTRL_POINTS)
#define CMD_TOKENS STR(CTRL_TOKENS)
#define CMD_UNSKIPPABLE STR(CTRL_UNSKIPPABLE)
#define CMD_TWO_CHOICE STR(CTRL_TWO_CHOICE)
#define CMD_THREE_CHOICE STR(CTRL_THREE_CHOICE)
#define CMD_FISH_INFO STR(CTRL_FISH_INFO)
#define CMD_HIGHSCORE(x) STR(CTRL_HIGHSCORE) ARG(x) // 1
#define CMD_TIME STR(CTRL_TIME)
/*
* Highscore values as strings, for code references the HighScores
* enum should be used.
*/
#define HS_BANK_RUPEES "\x00"
#define HS_UNK_1 "\x01"
#define HS_FISHING "\x02"
#define HS_BOAT_ARCHERY "\x03"
#define HS_HORSE_BACK_BALLOON "\x04"
#define HS_SHOOTING_GALLERY "\x06"
/*
* Color values as strings
*/
#define DEFAULT COLOR_STR(CTRL_DEFAULT)
#define RED COLOR_STR(CTRL_RED)
#define ADJUSTABLE COLOR_STR(CTRL_ADJUSTABLE)
#define BLUE COLOR_STR(CTRL_BLUE)
#define LIGHTBLUE COLOR_STR(CTRL_LIGHTBLUE)
#define PURPLE COLOR_STR(CTRL_PURPLE)
#define YELLOW COLOR_STR(CTRL_YELLOW)
#define BLACK COLOR_STR(CTRL_BLACK)
#else
// For use in code files
#define MSGCOL_DEFAULT HEX(CTRL_DEFAULT)
#define MSGCOL_RED HEX(CTRL_RED)
#define MSGCOL_ADJUSTABLE HEX(CTRL_ADJUSTABLE)
#define MSGCOL_BLUE HEX(CTRL_BLUE)
#define MSGCOL_LIGHTBLUE HEX(CTRL_LIGHTBLUE)
#define MSGCOL_PURPLE HEX(CTRL_PURPLE)
#define MSGCOL_YELLOW HEX(CTRL_YELLOW)
#define MSGCOL_BLACK HEX(CTRL_BLACK)
#define MESSAGE_NEWLINE HEX(CTRL_NEWLINE)
#define MESSAGE_END HEX(CTRL_END)
#define MESSAGE_BOX_BREAK HEX(CTRL_BOX_BREAK)
#define MESSAGE_COLOR HEX(CTRL_COLOR)
#define MESSAGE_SHIFT HEX(CTRL_SHIFT)
#define MESSAGE_TEXTID HEX(CTRL_TEXTID)
#define MESSAGE_QUICKTEXT_ENABLE HEX(CTRL_QUICKTEXT_ENABLE)
#define MESSAGE_QUICKTEXT_DISABLE HEX(CTRL_QUICKTEXT_DISABLE)
#define MESSAGE_PERSISTENT HEX(CTRL_PERSISTENT)
#define MESSAGE_EVENT HEX(CTRL_EVENT)
#define MESSAGE_BOX_BREAK_DELAYED HEX(CTRL_BOX_BREAK_DELAYED)
#define MESSAGE_AWAIT_BUTTON_PRESS HEX(CTRL_AWAIT_BUTTON_PRESS)
#define MESSAGE_FADE HEX(CTRL_FADE)
#define MESSAGE_NAME HEX(CTRL_NAME)
#define MESSAGE_OCARINA HEX(CTRL_OCARINA)
#define MESSAGE_FADE2 HEX(CTRL_FADE2)
#define MESSAGE_SFX HEX(CTRL_SFX)
#define MESSAGE_ITEM_ICON HEX(CTRL_ITEM_ICON)
#define MESSAGE_TEXT_SPEED HEX(CTRL_TEXT_SPEED)
#define MESSAGE_BACKGROUND HEX(CTRL_BACKGROUND)
#define MESSAGE_MARATHON_TIME HEX(CTRL_MARATHON_TIME)
#define MESSAGE_RACE_TIME HEX(CTRL_RACE_TIME)
#define MESSAGE_POINTS HEX(CTRL_POINTS)
#define MESSAGE_TOKENS HEX(CTRL_TOKENS)
#define MESSAGE_UNSKIPPABLE HEX(CTRL_UNSKIPPABLE)
#define MESSAGE_TWO_CHOICE HEX(CTRL_TWO_CHOICE)
#define MESSAGE_THREE_CHOICE HEX(CTRL_THREE_CHOICE)
#define MESSAGE_FISH_INFO HEX(CTRL_FISH_INFO)
#define MESSAGE_HIGHSCORE HEX(CTRL_HIGHSCORE)
#define MESSAGE_TIME HEX(CTRL_TIME)
#endif
#endif

View File

@ -9,4 +9,18 @@ typedef struct MessageTableEntry {
/* 0x4 */ const char* segment;
} MessageTableEntry; // size = 0x8;
#define DEFINE_MESSAGE(textId, typePos, msg) \
extern const char _message_##textId[];
#include "assets/text/message_data.h"
#undef DEFINE_MESSAGE
#define DEFINE_MESSAGE(textId, typePos, msg) \
extern const char _message_##textId##_staff[];
#include "assets/text/staff_message_data.h"
#undef DEFINE_MESSAGE
#endif

View File

@ -30,30 +30,30 @@ typedef enum TextBoxType {
/* 0x10 */ TEXTBOX_TYPE_MAX
} TextBoxType;
#define TEXTBOX_ENDTYPE_00 0x00
#define TEXTBOX_ENDTYPE_DEFAULT 0x00
#define TEXTBOX_ENDTYPE_10 0x10
#define TEXTBOX_ENDTYPE_11 0x11
#define TEXTBOX_ENDTYPE_TWO_CHOICE 0x10
#define TEXTBOX_ENDTYPE_THREE_CHOICE 0x11
#define TEXTBOX_ENDTYPE_12 0x12
#define TEXTBOX_ENDTYPE_20 0x20
#define TEXTBOX_ENDTYPE_NEXT 0x20
#define TEXTBOX_ENDTYPE_30 0x30
#define TEXTBOX_ENDTYPE_PERSISTENT 0x30
#define TEXTBOX_ENDTYPE_40 0x40
#define TEXTBOX_ENDTYPE_41 0x41
#define TEXTBOX_ENDTYPE_42 0x42
#define TEXTBOX_ENDTYPE_EVENT 0x40
#define TEXTBOX_ENDTYPE_PAUSE_MENU 0x41
#define TEXTBOX_ENDTYPE_EVENT2 0x42
#define TEXTBOX_ENDTYPE_50 0x50
#define TEXTBOX_ENDTYPE_52 0x52
#define TEXTBOX_ENDTYPE_55 0x55
#define TEXTBOX_ENDTYPE_56 0x56
#define TEXTBOX_ENDTYPE_57 0x57
#define TEXTBOX_ENDTYPE_FADE_NORMAL 0x50
#define TEXTBOX_ENDTYPE_FADE_SKIPPABLE 0x52
#define TEXTBOX_ENDTYPE_FADE_STAGES_1 0x55
#define TEXTBOX_ENDTYPE_FADE_STAGES_2 0x56
#define TEXTBOX_ENDTYPE_FADE_STAGES_3 0x57
#define TEXTBOX_ENDTYPE_60 0x60
#define TEXTBOX_ENDTYPE_61 0x61
#define TEXTBOX_ENDTYPE_62 0x62
#define TEXTBOX_ENDTYPE_63 0x63
#define TEXTBOX_ENDTYPE_INPUT_BANK 0x60
#define TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET 0x61
#define TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE 0x62
#define TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE 0x63
#define TEXTBOX_ENDTYPE_64 0x64
typedef enum MessageMode {
@ -154,23 +154,23 @@ u16 Text_GetFaceReaction(struct PlayState* play, FaceReactionSet reactionSet);
typedef enum TextState {
/* 0 */ TEXT_STATE_NONE,
/* 1 */ TEXT_STATE_1,
/* 1 */ TEXT_STATE_NEXT,
/* 2 */ TEXT_STATE_CLOSING,
/* 3 */ TEXT_STATE_3,
/* 3 */ TEXT_STATE_FADING,
/* 4 */ TEXT_STATE_CHOICE,
/* 5 */ TEXT_STATE_5,
/* 5 */ TEXT_STATE_EVENT,
/* 6 */ TEXT_STATE_DONE,
/* 7 */ TEXT_STATE_7,
/* 7 */ TEXT_STATE_SONG_DEMO_DONE,
/* 8 */ TEXT_STATE_8,
/* 9 */ TEXT_STATE_9,
/* 10 */ TEXT_STATE_10,
/* 10 */ TEXT_STATE_AWAITING_NEXT,
/* 11 */ TEXT_STATE_11,
/* 12 */ TEXT_STATE_12,
/* 13 */ TEXT_STATE_13,
/* 14 */ TEXT_STATE_14,
/* 15 */ TEXT_STATE_15,
/* 16 */ TEXT_STATE_16,
/* 17 */ TEXT_STATE_17,
/* 14 */ TEXT_STATE_INPUT_RUPEES,
/* 15 */ TEXT_STATE_INPUT_BOMBER_CODE,
/* 16 */ TEXT_STATE_PAUSE_MENU,
/* 17 */ TEXT_STATE_INPUT_LOTTERY_CODE,
/* 18 */ TEXT_STATE_18
} TextState;
@ -282,12 +282,12 @@ typedef struct MessageContext {
/* 0x1206C */ s32 unk1206C;
/* 0x12070 */ s32 unk12070;
/* 0x12074 */ s32 unk12074;
/* 0x12078 */ s32 bankRupeesSelected;
/* 0x1207C */ s32 bankRupees;
/* 0x12080 */ struct MessageTableEntry* messageEntryTable;
/* 0x12084 */ struct MessageTableEntry* messageEntryTableNes;
/* 0x12078 */ s32 rupeesSelected; // Used for bank and doggy racetrack bet
/* 0x1207C */ s32 rupeesTotal; // Used for bank and doggy racetrack bet
/* 0x12080 */ struct MessageTableEntry* messageTable;
/* 0x12084 */ struct MessageTableEntry* messageTableNES;
/* 0x12088 */ UNK_TYPE1 unk12088[0x4];
/* 0x1208C */ struct MessageTableEntry* messageTableStaff;
/* 0x1208C */ struct MessageTableEntry* messageTableCredits;
/* 0x12090 */ s16 textIsCredits;
/* 0x12092 */ s16 messageHasSetSfx;
/* 0x12094 */ u8 textboxSkipped;
@ -326,7 +326,7 @@ void Message_DrawTextChar(struct PlayState* play, TexturePtr texture, Gfx** gfxP
void Message_DrawItemIcon(struct PlayState* play, Gfx** gfxP);
void Message_HandleOcarina(struct PlayState* play);
void Message_LoadItemIcon(struct PlayState* play, u16 itemId, s16 arg2);
void Message_SetupLoadItemIcon(struct PlayState* play);
void Message_DecodeHeader(struct PlayState* play);
void func_801514B0(struct PlayState* play, u16 arg1, u8 arg2);
void Message_StartTextbox(struct PlayState* play, u16 textId, Actor* actor);
void Message_ContinueTextbox(struct PlayState* play, u16 textId);

View File

@ -88,7 +88,7 @@ typedef struct EnHy {
/* 0x194 */ ColliderCylinder collider;
/* 0x1E0 */ u16 textId;
/* 0x1E2 */ u8 waitingOnInit;
/* 0x1E3 */ u8 inMsgState3;
/* 0x1E3 */ u8 msgFading;
/* 0x1E4 */ Path* path;
/* 0x1E8 */ s16 curPoint;
/* 0x1EC */ Vec3f leftFootPos;

14
spec
View File

@ -405,31 +405,35 @@ endseg
beginseg
name "message_static"
romalign 0x1000
include "build/baserom/message_static.o"
include "build/assets/interface/message_static/message_static.o"
number 7
endseg
beginseg
name "message_texture_static"
romalign 0x1000
include "build/baserom/message_texture_static.o"
include "build/assets/interface/message_texture_static/message_texture_static.o"
number 9
endseg
beginseg
name "nes_font_static"
romalign 0x1000
include "build/baserom/nes_font_static.o"
include "build/assets/interface/nes_font_static/nes_font_static.o"
endseg
beginseg
name "message_data_static"
romalign 0x1000
include "build/baserom/message_data_static.o"
include "build/assets/text/message_data_static.o"
number 8
endseg
beginseg
name "staff_message_data_static"
romalign 0x1000
include "build/baserom/staff_message_data_static.o"
include "build/assets/text/staff_message_data_static.o"
number 7
endseg
beginseg

View File

@ -43,7 +43,6 @@
#include "fault_internal.h"
#include "fault.h"
#include "prevent_bss_reordering.h"
#include "libc64/sprintf.h"
#include "libc64/sleep.h"
#include "vt.h"

View File

@ -3,9 +3,9 @@
void Setup_SetRegs(void) {
XREG(2) = 0;
XREG(10) = 0x1A;
XREG(11) = 0x14;
XREG(12) = 0xE;
XREG(10) = 26;
XREG(11) = 20;
XREG(12) = 14;
XREG(13) = 0;
R_A_BTN_Y_OFFSET = 0;
R_MAGIC_CONSUME_TIMER_GIANTS_MASK = 80;

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "fault.h"
#include "libc64/fixed_point.h"
#include "libc64/sprintf.h"

View File

@ -1052,8 +1052,8 @@ void CutsceneCmd_Text(PlayState* play, CutsceneContext* csCtx, CsCmdText* cmd) {
// a textbox that is expected to be closed by the user is still open.
endFrame = csCtx->curFrame;
talkState = Message_GetState(&play->msgCtx);
if ((talkState != TEXT_STATE_CLOSING) && (talkState != TEXT_STATE_NONE) && (talkState != TEXT_STATE_7) &&
(talkState != TEXT_STATE_8)) {
if ((talkState != TEXT_STATE_CLOSING) && (talkState != TEXT_STATE_NONE) &&
(talkState != TEXT_STATE_SONG_DEMO_DONE) && (talkState != TEXT_STATE_8)) {
csCtx->curFrame--;
if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
@ -1096,7 +1096,7 @@ void CutsceneCmd_Text(PlayState* play, CutsceneContext* csCtx, CsCmdText* cmd) {
}
}
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_DisplayOcarinaStaff(play, cmd->textId);
}
}

View File

@ -14,7 +14,7 @@ void Font_LoadCharNES(PlayState* play, u8 codePointIndex, s32 offset) {
}
void Font_LoadMessageBoxEndIcon(Font* font, u16 icon) {
DmaMgr_RequestSync(&font->iconBuf, SEGMENT_ROM_START_OFFSET(message_static, 5 * 0x1000 + icon * FONT_CHAR_TEX_SIZE),
DmaMgr_RequestSync(&font->iconBuf, SEGMENT_ROM_START_OFFSET(message_static, 0x5000 + icon * FONT_CHAR_TEX_SIZE),
FONT_CHAR_TEX_SIZE);
}

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#include "z64horse.h"
#include "z64shrink_window.h"
@ -48,9 +49,23 @@ u16 gBombersNotebookWeekEventFlags[BOMBERS_NOTEBOOK_EVENT_MAX] = {
#undef DEFINE_PERSON
#undef DEFINE_EVENT
// TODO: Scripts
// Include message tables D_801C6B98 and D_801CFB08
#include "src/code/z_message_tables.inc.c"
#define DEFINE_MESSAGE(textId, typePos, msg) { textId, typePos, _message_##textId },
MessageTableEntry sMessageTableNES[] = {
#include "assets/text/message_data.h"
{ 0xFFFF, 0, NULL },
};
#undef DEFINE_MESSAGE
#define DEFINE_MESSAGE(textId, typePos, msg) { textId, typePos, _message_##textId##_staff },
MessageTableEntry sMessageTableCredits[] = {
#include "assets/text/staff_message_data.h"
{ 0xFFFF, 0, NULL },
};
#undef DEFINE_MESSAGE
s16 D_801CFC78[TEXTBOX_TYPE_MAX] = {
0, // TEXTBOX_TYPE_0
@ -135,7 +150,8 @@ bool Message_ShouldAdvance(PlayState* play) {
MessageContext* msgCtx = &play->msgCtx;
Input* controller = CONTROLLER1(&play->state);
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_11)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_THREE_CHOICE)) {
if (CHECK_BTN_ALL(controller->press.button, BTN_A)) {
Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS);
}
@ -154,7 +170,8 @@ bool Message_ShouldAdvanceSilent(PlayState* play) {
MessageContext* msgCtx = &play->msgCtx;
Input* controller = CONTROLLER1(&play->state);
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_11)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_THREE_CHOICE)) {
return CHECK_BTN_ALL(controller->press.button, BTN_A);
} else {
return CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->press.button, BTN_B) ||
@ -168,7 +185,7 @@ void Message_CloseTextbox(PlayState* play) {
if (play->msgCtx.msgLength != 0) {
msgCtx->stateTimer = 2;
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_00;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
Audio_PlaySfx(NA_SE_NONE);
}
}
@ -552,9 +569,9 @@ void func_80148D64(PlayState* play) {
sAnalogStickHeld = false;
}
msgCtx->bankRupeesSelected = (msgCtx->decodedBuffer.schar[msgCtx->unk120C0] - '0') * 100;
msgCtx->bankRupeesSelected += (msgCtx->decodedBuffer.schar[msgCtx->unk120C0 + 1] - '0') * 10;
msgCtx->bankRupeesSelected += msgCtx->decodedBuffer.schar[msgCtx->unk120C0 + 2] - '0';
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[msgCtx->unk120C0] - '0') * 100;
msgCtx->rupeesSelected += (msgCtx->decodedBuffer.schar[msgCtx->unk120C0 + 1] - '0') * 10;
msgCtx->rupeesSelected += msgCtx->decodedBuffer.schar[msgCtx->unk120C0 + 2] - '0';
}
void func_80149048(PlayState* play) {
@ -578,7 +595,7 @@ void func_80149048(PlayState* play) {
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
}
msgCtx->bankRupeesSelected = (msgCtx->decodedBuffer.schar[msgCtx->unk120C0] - '0') * 10;
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[msgCtx->unk120C0] - '0') * 10;
}
void func_801491DC(PlayState* play) {
@ -782,7 +799,7 @@ void Message_GrowTextbox(PlayState* play) {
void Message_FindMessage(PlayState* play, u16 textId) {
MessageContext* msgCtx = &play->msgCtx;
Font* font = &msgCtx->font;
MessageTableEntry* msgEntry = msgCtx->messageEntryTable;
MessageTableEntry* msgEntry = msgCtx->messageTable;
const char* segment = msgEntry->segment;
const char* foundSegment;
const char* nextSegment;
@ -799,7 +816,7 @@ void Message_FindMessage(PlayState* play, u16 textId) {
msgEntry++;
}
msgEntry = msgCtx->messageEntryTable;
msgEntry = msgCtx->messageTable;
foundSegment = msgEntry->segment;
msgEntry++;
nextSegment = msgEntry->segment;
@ -1031,11 +1048,11 @@ Color_RGB16 D_801CFE74[] = {
{ 255, 120, 0 }, { 70, 255, 80 }, { 80, 110, 255 }, { 255, 255, 30 },
{ 90, 180, 255 }, { 210, 100, 255 }, { 170, 170, 170 }, { 255, 130, 30 },
};
Color_RGB16 D_801CFEA4[] = {
static Color_RGB16 sColorsNormalJPN[] = {
{ 255, 60, 60 }, { 70, 255, 80 }, { 80, 90, 255 }, { 255, 255, 50 },
{ 80, 150, 255 }, { 255, 150, 180 }, { 170, 170, 170 }, { 255, 130, 30 },
};
Color_RGB16 D_801CFED4[] = {
static Color_RGB16 sColorsButtonsJPN[] = {
{ 255, 60, 60 }, { 70, 255, 80 }, { 80, 90, 255 }, { 255, 255, 50 },
{ 80, 150, 255 }, { 255, 150, 180 }, { 180, 180, 200 }, { 255, 130, 30 },
};
@ -1043,12 +1060,12 @@ Color_RGB16 D_801CFF04[] = {
{ 195, 0, 0 }, { 70, 255, 80 }, { 80, 90, 255 }, { 255, 255, 50 },
{ 80, 150, 255 }, { 255, 150, 180 }, { 170, 170, 170 }, { 255, 130, 30 },
};
Color_RGB16 D_801CFF34[] = {
static Color_RGB16 sColorsBombersNotebookJPN[] = {
{ 255, 60, 60 }, { 110, 170, 255 }, { 80, 90, 255 }, { 255, 255, 50 },
{ 80, 150, 255 }, { 255, 150, 180 }, { 170, 170, 170 }, { 255, 130, 30 },
};
u8 D_801CFF64[] = { 2, 1, 3, 6, 6, 6, 3, 3, 3, 3, 1, 6 };
static u8 sButtonColorIndicesJPN[] = { 2, 1, 3, 6, 6, 6, 3, 3, 3, 3, 1, 6 };
#define MESSAGE_ITEM_NONE 9999
@ -1061,9 +1078,9 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
Gfx* gfx = *gfxP;
u16 character;
s16 sp130;
s16 sp12E;
s16 sp12C;
s16 sp12A;
s16 prevR;
s16 prevG;
s16 prevB;
u16 lookAheadCharacter;
play->msgCtx.textPosX = play->msgCtx.unk11F1A[0] + play->msgCtx.unk11FF8;
@ -1135,9 +1152,9 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
msgCtx->textColorB = D_801CFE74[(s16)(character - 0x2001)].b + msgCtx->unk120D4;
}
} else if (play->pauseCtx.bombersNotebookOpen) {
msgCtx->textColorR = D_801CFF34[(s16)(character - 0x2001)].r;
msgCtx->textColorG = D_801CFF34[(s16)(character - 0x2001)].g;
msgCtx->textColorB = D_801CFF34[(s16)(character - 0x2001)].b;
msgCtx->textColorR = sColorsBombersNotebookJPN[(s16)(character - 0x2001)].r;
msgCtx->textColorG = sColorsBombersNotebookJPN[(s16)(character - 0x2001)].g;
msgCtx->textColorB = sColorsBombersNotebookJPN[(s16)(character - 0x2001)].b;
} else if (msgCtx->textBoxType == TEXTBOX_TYPE_1) {
msgCtx->textColorR = D_801CFE74[(s16)(character - 0x2001)].r;
msgCtx->textColorG = D_801CFE74[(s16)(character - 0x2001)].g;
@ -1147,9 +1164,9 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
msgCtx->textColorG = D_801CFF04[(s16)(character - 0x2001)].g;
msgCtx->textColorB = D_801CFF04[(s16)(character - 0x2001)].b;
} else {
msgCtx->textColorR = D_801CFEA4[(s16)(character - 0x2001)].r;
msgCtx->textColorG = D_801CFEA4[(s16)(character - 0x2001)].g;
msgCtx->textColorB = D_801CFEA4[(s16)(character - 0x2001)].b;
msgCtx->textColorR = sColorsNormalJPN[(s16)(character - 0x2001)].r;
msgCtx->textColorG = sColorsNormalJPN[(s16)(character - 0x2001)].g;
msgCtx->textColorB = sColorsNormalJPN[(s16)(character - 0x2001)].b;
}
if ((i + 1) == msgCtx->textDrawPos) {
@ -1237,9 +1254,9 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->unk11F0C == 3) {
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_55;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADE_STAGES_1;
} else {
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_50;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADE_NORMAL;
}
msgCtx->stateTimer = msgCtx->decodedBuffer.wchar[++i];
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
@ -1253,7 +1270,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
case 0x112:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_52;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADE_SKIPPABLE;
msgCtx->stateTimer = msgCtx->decodedBuffer.wchar[++i];
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
if (play->csCtx.state == CS_STATE_IDLE) {
@ -1338,7 +1355,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
break;
case 0x202:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_10;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_TWO_CHOICE;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->choiceTextId = msgCtx->currentTextId;
@ -1348,7 +1365,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
break;
case 0x203:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_11;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_THREE_CHOICE;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->choiceTextId = msgCtx->currentTextId;
@ -1358,7 +1375,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
break;
case 0x20C:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_60;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_INPUT_BANK;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
@ -1366,7 +1383,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
break;
case 0x220:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_61;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
@ -1374,7 +1391,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
break;
case 0x221:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_62;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
@ -1384,14 +1401,14 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
case 0x222:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_41;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PAUSE_MENU;
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 0);
Audio_PlaySfx(NA_SE_SY_MESSAGE_END);
}
break;
case 0x225:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_63;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
@ -1407,7 +1424,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
return;
}
msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_00) {
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
Audio_PlaySfx(NA_SE_SY_MESSAGE_END);
if (character == 0x500) {
Font_LoadMessageBoxEndIcon(font, 1);
@ -1428,7 +1445,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfx(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_30;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
}
*gfxP = gfx;
return;
@ -1436,7 +1453,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
case 0x103:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_40;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 0);
Audio_PlaySfx(NA_SE_SY_MESSAGE_END);
}
@ -1446,7 +1463,7 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
case 0x230:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_42;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT2;
Font_LoadMessageBoxEndIcon(&play->msgCtx.font, 1);
Audio_PlaySfx(NA_SE_SY_MESSAGE_END);
}
@ -1478,16 +1495,16 @@ void Message_DrawTextDefault(PlayState* play, Gfx** gfxP) {
}
if ((character >= 0x839F) && (character < 0x83AB)) {
sp12E = msgCtx->textColorR;
sp12C = msgCtx->textColorG;
sp12A = msgCtx->textColorB;
msgCtx->textColorR = D_801CFED4[(s16)D_801CFF64[character - 0x839F]].r;
msgCtx->textColorG = D_801CFED4[(s16)D_801CFF64[character - 0x839F]].g;
msgCtx->textColorB = D_801CFED4[(s16)D_801CFF64[character - 0x839F]].b;
prevR = msgCtx->textColorR;
prevG = msgCtx->textColorG;
prevB = msgCtx->textColorB;
msgCtx->textColorR = sColorsButtonsJPN[(s16)sButtonColorIndicesJPN[character - 0x839F]].r;
msgCtx->textColorG = sColorsButtonsJPN[(s16)sButtonColorIndicesJPN[character - 0x839F]].g;
msgCtx->textColorB = sColorsButtonsJPN[(s16)sButtonColorIndicesJPN[character - 0x839F]].b;
Message_DrawTextChar(play, &font->charBuf[font->unk_11D88][charTexIndex], &gfx);
msgCtx->textColorR = sp12E;
msgCtx->textColorG = sp12C;
msgCtx->textColorB = sp12A;
msgCtx->textColorR = prevR;
msgCtx->textColorG = prevG;
msgCtx->textColorB = prevB;
} else {
Message_DrawTextChar(play, &font->charBuf[font->unk_11D88][charTexIndex], &gfx);
}
@ -1952,7 +1969,7 @@ void Message_GetTimerDigits(OSTime time, s16 digits[8]) {
digits[7] = t;
}
void Message_SetupLoadItemIcon(PlayState* play) {
void Message_DecodeHeader(PlayState* play) {
Font* font;
MessageContext* msgCtx = &play->msgCtx;
@ -2138,15 +2155,13 @@ void Message_LoadOwlWarpText(PlayState* play, s32* offset, f32* arg2, s16* decod
*arg2 = sp3C;
}
// Counterpart to NES D_801D08D8
u16 D_801D0268[][3] = {
u16 sTimeSpeedTextJPN[][3] = {
{ 0x82CD, 0x82E2, 0x82A2 },
{ 0x82D3, 0x82C2, 0x82A4 },
{ 0x82A8, 0x82BB, 0x82A2 },
};
// Counterpart to NES D_801D08E4
u16 D_801D027C[] = { 0x2001, 0x2003, 0x2004, 0x2002 };
u16 sMaskCodeColorCmdJPN[] = { 0x2001, 0x2003, 0x2004, 0x2002 };
// Counterpart to NES sMaskCodeTextENG
u16 D_801D0284[] = { 0x90D4, 0x90C2, 0x89A9, 0x97CE };
@ -2186,7 +2201,7 @@ void Message_Decode(PlayState* play) {
numLines = 0;
decodedBufPos = 0;
charTexIndex = 0;
Message_SetupLoadItemIcon(play);
Message_DecodeHeader(play);
while (true) {
curChar = msgCtx->decodedBuffer.wchar[decodedBufPos] = font->msgBuf.wchar[msgCtx->msgBufPos];
@ -2383,7 +2398,7 @@ void Message_Decode(PlayState* play) {
msgCtx->unk120BE = spD2;
msgCtx->unk120C0 = decodedBufPos;
msgCtx->unk120C2 = 2;
msgCtx->bankRupeesSelected = 0;
msgCtx->rupeesSelected = 0;
msgCtx->unk120C4 = charTexIndex;
digits[0] = digits[1] = digits[2] = 0;
@ -2394,7 +2409,7 @@ void Message_Decode(PlayState* play) {
func_8014CCB4(play, &decodedBufPos, &charTexIndex, &spC0);
} else if (curChar == 0x20D) {
digits[0] = digits[1] = 0;
digits[2] = msgCtx->bankRupeesSelected;
digits[2] = msgCtx->rupeesSelected;
while (digits[2] >= 100) {
digits[0]++;
@ -2419,7 +2434,7 @@ void Message_Decode(PlayState* play) {
func_8014CCB4(play, &decodedBufPos, &charTexIndex, &spC0);
} else if (curChar == 0x20E) {
digits[0] = digits[1] = digits[2] = 0;
digits[3] = msgCtx->bankRupees;
digits[3] = msgCtx->rupeesTotal;
while (digits[3] >= 1000) {
digits[0]++;
@ -2546,7 +2561,7 @@ void Message_Decode(PlayState* play) {
msgCtx->unk120BE = spD2;
msgCtx->unk120C0 = decodedBufPos;
msgCtx->unk120C2 = 0;
msgCtx->bankRupeesSelected = 0;
msgCtx->rupeesSelected = 0;
msgCtx->unk120C4 = charTexIndex;
digits[0] = digits[1] = digits[2] = 0;
for (i = 0; i < 2; i++) {
@ -2559,7 +2574,7 @@ void Message_Decode(PlayState* play) {
msgCtx->unk120BE = spD2;
msgCtx->unk120C0 = decodedBufPos;
msgCtx->unk120C2 = 0;
msgCtx->bankRupeesSelected = 0;
msgCtx->rupeesSelected = 0;
msgCtx->unk120C4 = charTexIndex;
for (i = 0; i < 5; i++) {
@ -2578,8 +2593,8 @@ void Message_Decode(PlayState* play) {
}
for (i = 0; i < 3; i++, decodedBufPos++) {
msgCtx->decodedBuffer.wchar[decodedBufPos] = D_801D0268[index][i];
Font_LoadChar(play, D_801D0268[index][i], charTexIndex);
msgCtx->decodedBuffer.wchar[decodedBufPos] = sTimeSpeedTextJPN[index][i];
Font_LoadChar(play, sTimeSpeedTextJPN[index][i], charTexIndex);
charTexIndex += FONT_CHAR_TEX_SIZE;
}
decodedBufPos--;
@ -2592,7 +2607,7 @@ void Message_Decode(PlayState* play) {
msgCtx->unk120BE = spD2;
msgCtx->unk120C0 = decodedBufPos;
msgCtx->unk120C2 = 0;
msgCtx->bankRupeesSelected = 0;
msgCtx->rupeesSelected = 0;
msgCtx->unk120C4 = charTexIndex;
for (i = 0; i < 3; i++) {
@ -2607,7 +2622,7 @@ void Message_Decode(PlayState* play) {
} else if (curChar == 0x226) {
for (i = 0; i < 6; i++) {
msgCtx->decodedBuffer.wchar[decodedBufPos] =
D_801D027C[((void)0, gSaveContext.save.saveInfo.spiderHouseMaskOrder[i])];
sMaskCodeColorCmdJPN[((void)0, gSaveContext.save.saveInfo.spiderHouseMaskOrder[i])];
decodedBufPos++;
Message_LoadChar(play, i + 0x8250, &charTexIndex, &spC0, decodedBufPos);
decodedBufPos++;
@ -2732,8 +2747,8 @@ void Message_Decode(PlayState* play) {
}
decodedBufPos--;
} else if ((curChar >= 0x231) && (curChar < 0x237)) {
msgCtx->decodedBuffer.wchar[decodedBufPos] =
D_801D027C[((void)0, gSaveContext.save.saveInfo.spiderHouseMaskOrder[(s16)(curChar - 0x231)])];
msgCtx->decodedBuffer.wchar[decodedBufPos] = sMaskCodeColorCmdJPN[(
(void)0, gSaveContext.save.saveInfo.spiderHouseMaskOrder[(s16)(curChar - 0x231)])];
decodedBufPos++;
Message_LoadChar(
play,
@ -3182,7 +3197,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
msgCtx->choiceNum = 0;
msgCtx->textUnskippable = false;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_00;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
msgCtx->textDrawPos = 0;
msgCtx->msgBufPos = 0;
msgCtx->decodedTextLen = 0;
@ -3275,7 +3290,7 @@ void func_801514B0(PlayState* play, u16 arg1, u8 arg2) {
}
msgCtx->choiceNum = 0;
msgCtx->textUnskippable = false;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_00;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
msgCtx->textDrawPos = 0;
msgCtx->msgBufPos = 0;
msgCtx->decodedTextLen = 0;
@ -3285,7 +3300,7 @@ void func_801514B0(PlayState* play, u16 arg1, u8 arg2) {
msgCtx->textBoxPos = arg2;
msgCtx->unk11F0C = msgCtx->unk11F08 & 0xF;
msgCtx->textUnskippable = true;
DmaMgr_RequestSync(msgCtx->textboxSegment, SEGMENT_ROM_START(message_static) + (D_801CFC78[0] << 12), 0x1000);
DmaMgr_RequestSync(msgCtx->textboxSegment, SEGMENT_ROM_START(message_static) + (D_801CFC78[0] * 0x1000), 0x1000);
msgCtx->textboxColorRed = 0;
msgCtx->textboxColorGreen = 0;
msgCtx->textboxColorBlue = 0;
@ -3610,30 +3625,33 @@ u8 Message_GetState(MessageContext* msgCtx) {
if (msgCtx->msgMode == MSGMODE_TEXT_DONE) {
if (msgCtx->nextTextId != 0xFFFF) {
return TEXT_STATE_1;
return TEXT_STATE_NEXT;
}
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_11)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_THREE_CHOICE)) {
return TEXT_STATE_CHOICE;
}
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_40) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_42) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_30)) {
return TEXT_STATE_5;
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_EVENT) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_EVENT2) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_PERSISTENT)) {
return TEXT_STATE_EVENT;
}
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_41) {
return TEXT_STATE_16;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_PAUSE_MENU) {
return TEXT_STATE_PAUSE_MENU;
}
if ((msgCtx->textboxEndType >= TEXTBOX_ENDTYPE_50) && (msgCtx->textboxEndType <= TEXTBOX_ENDTYPE_57)) {
return TEXT_STATE_3;
if ((msgCtx->textboxEndType >= TEXTBOX_ENDTYPE_FADE_NORMAL) &&
(msgCtx->textboxEndType <= TEXTBOX_ENDTYPE_FADE_STAGES_3)) {
return TEXT_STATE_FADING;
}
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_60) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_61)) {
return TEXT_STATE_14;
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BANK) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET)) {
return TEXT_STATE_INPUT_RUPEES;
}
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_62) {
return TEXT_STATE_15;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE) {
return TEXT_STATE_INPUT_BOMBER_CODE;
}
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_63) {
return TEXT_STATE_17;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE) {
return TEXT_STATE_INPUT_LOTTERY_CODE;
}
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_12) {
return TEXT_STATE_18;
@ -3642,10 +3660,10 @@ u8 Message_GetState(MessageContext* msgCtx) {
}
if (msgCtx->msgMode == MSGMODE_TEXT_AWAIT_NEXT) {
return TEXT_STATE_10;
return TEXT_STATE_AWAITING_NEXT;
}
if (msgCtx->msgMode == MSGMODE_SONG_DEMONSTRATION_DONE) {
return TEXT_STATE_7;
return TEXT_STATE_SONG_DEMO_DONE;
}
if ((msgCtx->ocarinaMode == OCARINA_MODE_EVENT) || (msgCtx->msgMode == MSGMODE_37)) {
return TEXT_STATE_8;
@ -3667,7 +3685,7 @@ u8 Message_GetState(MessageContext* msgCtx) {
return TEXT_STATE_CLOSING;
}
return TEXT_STATE_3;
return TEXT_STATE_FADING;
}
void Message_DrawTextBox(PlayState* play, Gfx** gfxP) {
@ -4964,7 +4982,7 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
case MSGMODE_TEXT_DONE:
switch (msgCtx->textboxEndType) {
case TEXTBOX_ENDTYPE_60:
case TEXTBOX_ENDTYPE_INPUT_BANK:
temp_v0_33 = msgCtx->unk120BE;
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
func_80147F18(play, &gfx,
@ -4974,7 +4992,7 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
func_80148D64(play);
break;
case TEXTBOX_ENDTYPE_61:
case TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET:
temp_v0_33 = msgCtx->unk120BE;
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
func_80148558(play, &gfx,
@ -4983,7 +5001,7 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
func_80149048(play);
break;
case TEXTBOX_ENDTYPE_62:
case TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE:
temp_v0_33 = msgCtx->unk120BE;
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
func_80147F18(play, &gfx,
@ -4993,7 +5011,7 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
func_801491DC(play);
break;
case TEXTBOX_ENDTYPE_63:
case TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE:
temp_v0_33 = msgCtx->unk120BE;
temp = msgCtx->unk11FFA + (msgCtx->unk11FFC * temp_v0_33);
func_80147F18(play, &gfx,
@ -5024,11 +5042,11 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
Message_DrawText(play, &gfx);
switch (msgCtx->textboxEndType) {
case TEXTBOX_ENDTYPE_10:
case TEXTBOX_ENDTYPE_TWO_CHOICE:
func_80148CBC(play, &gfx, 1);
break;
case TEXTBOX_ENDTYPE_11:
case TEXTBOX_ENDTYPE_THREE_CHOICE:
func_80148CBC(play, &gfx, 2);
break;
@ -5036,25 +5054,25 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
func_80148CBC(play, &gfx, 1);
break;
case TEXTBOX_ENDTYPE_30:
case TEXTBOX_ENDTYPE_41:
case TEXTBOX_ENDTYPE_50:
case TEXTBOX_ENDTYPE_52:
case TEXTBOX_ENDTYPE_55:
case TEXTBOX_ENDTYPE_56:
case TEXTBOX_ENDTYPE_57:
case TEXTBOX_ENDTYPE_62:
case TEXTBOX_ENDTYPE_PERSISTENT:
case TEXTBOX_ENDTYPE_PAUSE_MENU:
case TEXTBOX_ENDTYPE_FADE_NORMAL:
case TEXTBOX_ENDTYPE_FADE_SKIPPABLE:
case TEXTBOX_ENDTYPE_FADE_STAGES_1:
case TEXTBOX_ENDTYPE_FADE_STAGES_2:
case TEXTBOX_ENDTYPE_FADE_STAGES_3:
case TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE:
break;
case TEXTBOX_ENDTYPE_40:
case TEXTBOX_ENDTYPE_60:
case TEXTBOX_ENDTYPE_61:
case TEXTBOX_ENDTYPE_EVENT:
case TEXTBOX_ENDTYPE_INPUT_BANK:
case TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET:
default:
Message_DrawTextboxIcon(play, &gfx, 158,
(s16)(D_801D03A8[msgCtx->textBoxType] + msgCtx->textboxYTarget));
break;
case TEXTBOX_ENDTYPE_42:
case TEXTBOX_ENDTYPE_EVENT2:
Message_DrawTextboxIcon(play, &gfx, 158,
(s16)(D_801D03A8[msgCtx->textBoxType] + msgCtx->textboxYTarget));
break;
@ -5343,7 +5361,7 @@ void Message_Update(PlayState* play) {
} else if (msgCtx->textBoxPos == 2) {
msgCtx->textboxYTarget = sTextboxMidYPositions[var_v1];
} else if (msgCtx->textBoxPos == 7) {
msgCtx->textboxYTarget = 0x9E;
msgCtx->textboxYTarget = 158;
} else {
msgCtx->textboxYTarget = sTextboxLowerYPositions[var_v1];
}
@ -5352,12 +5370,12 @@ void Message_Update(PlayState* play) {
if ((gSaveContext.options.language == LANGUAGE_JPN) && !msgCtx->textIsCredits) {
msgCtx->unk11FFE[0] = (s16)(msgCtx->textboxYTarget + 7);
msgCtx->unk11FFE[1] = (s16)(msgCtx->textboxYTarget + 0x19);
msgCtx->unk11FFE[2] = (s16)(msgCtx->textboxYTarget + 0x2B);
msgCtx->unk11FFE[1] = (s16)(msgCtx->textboxYTarget + 25);
msgCtx->unk11FFE[2] = (s16)(msgCtx->textboxYTarget + 43);
} else {
msgCtx->unk11FFE[0] = (s16)(msgCtx->textboxYTarget + 0x14);
msgCtx->unk11FFE[1] = (s16)(msgCtx->textboxYTarget + 0x20);
msgCtx->unk11FFE[2] = (s16)(msgCtx->textboxYTarget + 0x2C);
msgCtx->unk11FFE[0] = (s16)(msgCtx->textboxYTarget + 20);
msgCtx->unk11FFE[1] = (s16)(msgCtx->textboxYTarget + 32);
msgCtx->unk11FFE[2] = (s16)(msgCtx->textboxYTarget + 44);
}
if ((msgCtx->textBoxType == TEXTBOX_TYPE_4) || (msgCtx->textBoxType == TEXTBOX_TYPE_5)) {
@ -5467,10 +5485,11 @@ void Message_Update(PlayState* play) {
break;
case MSGMODE_TEXT_DONE:
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_50) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_52)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_NORMAL) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_SKIPPABLE)) {
msgCtx->stateTimer--;
if ((msgCtx->stateTimer == 0) ||
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_52) && Message_ShouldAdvance(play))) {
((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_SKIPPABLE) && Message_ShouldAdvance(play))) {
if (msgCtx->nextTextId != 0xFFFF) {
Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS);
Message_ContinueTextbox(play, msgCtx->nextTextId);
@ -5483,28 +5502,30 @@ void Message_Update(PlayState* play) {
}
}
} else {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_30) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_40) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_42) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_41)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_PERSISTENT) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_EVENT) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_EVENT2) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_PAUSE_MENU)) {
return;
}
switch (msgCtx->textboxEndType) {
case TEXTBOX_ENDTYPE_55:
case TEXTBOX_ENDTYPE_FADE_STAGES_1:
msgCtx->textColorAlpha += 20;
if (msgCtx->textColorAlpha >= 255) {
msgCtx->textColorAlpha = 255;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_56;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADE_STAGES_2;
}
break;
case TEXTBOX_ENDTYPE_56:
case TEXTBOX_ENDTYPE_FADE_STAGES_2:
msgCtx->stateTimer--;
if (msgCtx->stateTimer == 0) {
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_57;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADE_STAGES_3;
}
break;
case TEXTBOX_ENDTYPE_57:
case TEXTBOX_ENDTYPE_FADE_STAGES_3:
msgCtx->textColorAlpha -= 20;
if (msgCtx->textColorAlpha <= 0) {
msgCtx->textColorAlpha = 0;
@ -5525,11 +5546,11 @@ void Message_Update(PlayState* play) {
}
break;
case TEXTBOX_ENDTYPE_10:
case TEXTBOX_ENDTYPE_TWO_CHOICE:
Message_HandleChoiceSelection(play, 1);
break;
case TEXTBOX_ENDTYPE_11:
case TEXTBOX_ENDTYPE_THREE_CHOICE:
Message_HandleChoiceSelection(play, 2);
break;
@ -5541,7 +5562,7 @@ void Message_Update(PlayState* play) {
break;
}
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) &&
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) &&
(play->msgCtx.ocarinaMode == OCARINA_MODE_ACTIVE)) {
if (Message_ShouldAdvance(play)) {
if (msgCtx->choiceIndex == 0) {
@ -5551,7 +5572,7 @@ void Message_Update(PlayState* play) {
}
Message_CloseTextbox(play);
}
} else if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) &&
} else if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) &&
(play->msgCtx.ocarinaMode == OCARINA_MODE_PROCESS_SOT)) {
if (Message_ShouldAdvance(play)) {
if (msgCtx->choiceIndex == 0) {
@ -5566,7 +5587,7 @@ void Message_Update(PlayState* play) {
Message_CloseTextbox(play);
}
}
} else if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) &&
} else if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) &&
(play->msgCtx.ocarinaMode == OCARINA_MODE_PROCESS_INVERTED_TIME)) {
if (Message_ShouldAdvance(play)) {
if (msgCtx->choiceIndex == 0) {
@ -5585,7 +5606,7 @@ void Message_Update(PlayState* play) {
Message_CloseTextbox(play);
}
}
} else if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) &&
} else if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) &&
(play->msgCtx.ocarinaMode == OCARINA_MODE_PROCESS_DOUBLE_TIME)) {
if (Message_ShouldAdvance(play)) {
if (msgCtx->choiceIndex == 0) {
@ -5603,9 +5624,9 @@ void Message_Update(PlayState* play) {
}
Message_CloseTextbox(play);
}
} else if ((msgCtx->textboxEndType != TEXTBOX_ENDTYPE_10) ||
} else if ((msgCtx->textboxEndType != TEXTBOX_ENDTYPE_TWO_CHOICE) ||
(pauseCtx->state != PAUSE_STATE_OWL_WARP_CONFIRM)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) &&
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) &&
(play->msgCtx.ocarinaMode == OCARINA_MODE_1B)) {
if (Message_ShouldAdvance(play)) {
if (msgCtx->choiceIndex == 0) {
@ -5617,18 +5638,18 @@ void Message_Update(PlayState* play) {
}
Message_CloseTextbox(play);
}
} else if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_60) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_61) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_11) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_50) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_52) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_55) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_56) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_57) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_62)) {
} else if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BANK) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_THREE_CHOICE) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_NORMAL) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_SKIPPABLE) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_STAGES_1) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_STAGES_2) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_STAGES_3) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE)) {
//! FAKE: debug?
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_50) {}
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_FADE_NORMAL) {}
} else if (pauseCtx->itemDescriptionOn) {
if ((input->rel.stick_x != 0) || (input->rel.stick_y != 0) ||
CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
@ -5748,11 +5769,11 @@ void Message_Update(PlayState* play) {
pauseCtx->itemDescriptionOn = false;
}
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_30) {
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_00;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_PERSISTENT) {
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
play->msgCtx.ocarinaMode = OCARINA_MODE_WARP;
} else {
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_00;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
}
if (EQ_MAX_QUEST_HEART_PIECE_COUNT) {
@ -5989,8 +6010,8 @@ void Message_Update(PlayState* play) {
}
void Message_SetTables(PlayState* play) {
play->msgCtx.messageEntryTableNes = D_801C6B98;
play->msgCtx.messageTableStaff = D_801CFB08;
play->msgCtx.messageTableNES = sMessageTableNES;
play->msgCtx.messageTableCredits = sMessageTableCredits;
}
void Message_Init(PlayState* play) {
@ -6004,10 +6025,10 @@ void Message_Init(PlayState* play) {
msgCtx->msgMode = MSGMODE_NONE;
msgCtx->msgLength = 0;
msgCtx->currentTextId = 0;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_00;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
msgCtx->choiceIndex = 0;
msgCtx->ocarinaAction = msgCtx->textUnskippable = 0;
msgCtx->textColorAlpha = 0xFF;
msgCtx->textColorAlpha = 255;
View_Init(&msgCtx->view, play->state.gfxCtx);

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,11 @@
#include "global.h"
#include "message_data_fmt_staff.h"
#include "message_data_static.h"
void Message_FindCreditsMessage(PlayState* play, u16 textId) {
MessageContext* msgCtx = &play->msgCtx;
Font* font = &msgCtx->font;
MessageTableEntry* msgEntry = msgCtx->messageTableStaff;
MessageTableEntry* msgEntry = msgCtx->messageTableCredits;
const char* segment = msgEntry->segment;
const char* foundSegment;
const char* nextSegment;
@ -66,7 +67,7 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
character = msgCtx->decodedBuffer.schar[i];
switch (character) {
case 0x1: // MESSAGE_NEWLINE
case MESSAGE_NEWLINE:
msgCtx->textPosX = msgCtx->unk11FF8;
if ((msgCtx->choiceNum == 1) || (msgCtx->choiceNum == 3)) {
msgCtx->textPosX += 32;
@ -77,14 +78,14 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
msgCtx->textPosY += msgCtx->unk11FFC;
break;
case 0x5: // Remnant of MESSAGE_COLOR
case MESSAGE_COLOR:
break;
case ' ':
msgCtx->textPosX += 6;
break;
case 0x4: // MESSAGE_BOX_BREAK
case MESSAGE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
if (!msgCtx->textboxSkipped) {
Audio_PlaySfx(NA_SE_NONE);
@ -99,12 +100,12 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
*gfxP = gfx;
return;
case 0x6: // MESSAGE_SHIFT
case MESSAGE_SHIFT:
msgCtx->textPosX += msgCtx->decodedBuffer.schar[++i];
break;
case 0x7: // MESSAGE_TEXTID
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_20;
case MESSAGE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_NEXT;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfx(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
@ -113,7 +114,7 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
*gfxP = gfx;
return;
case 0x8: // MESSAGE_QUICKTEXT_ENABLE
case MESSAGE_QUICKTEXT_ENABLE:
if (((i + 1) == msgCtx->textDrawPos) &&
((msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) ||
((msgCtx->msgMode >= MSGMODE_OCARINA_STARTING) && (msgCtx->msgMode <= MSGMODE_26)))) {
@ -124,8 +125,10 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
j += 2;
continue;
}
if ((character != 9) && (character != 0xA) && (character != 0xB) && (character != 0xC) &&
(character != 0xD) && (character != 4) && (character != 2)) {
if ((character != MESSAGE_QUICKTEXT_DISABLE) && (character != MESSAGE_PERSISTENT) &&
(character != MESSAGE_EVENT) && (character != MESSAGE_BOX_BREAK_DELAYED) &&
(character != MESSAGE_AWAIT_BUTTON_PRESS) && (character != MESSAGE_BOX_BREAK) &&
(character != MESSAGE_END)) {
j++;
continue;
}
@ -135,10 +138,10 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
msgCtx->textDrawPos = i + 1;
}
// fallthrough
case 0x9: // MESSAGE_QUICKTEXT_DISABLE
case MESSAGE_QUICKTEXT_DISABLE:
break;
case 0xD: // MESSAGE_AWAIT_BUTTON_PRESS
case MESSAGE_AWAIT_BUTTON_PRESS:
if ((i + 1) == msgCtx->textDrawPos) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_INPUT;
@ -149,7 +152,7 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
}
break;
case 0xC: // MESSAGE_BOX_BREAK_DELAYED
case MESSAGE_BOX_BREAK_DELAYED:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->stateTimer = msgCtx->decodedBuffer.schar[++i];
msgCtx->msgMode = MSGMODE_TEXT_DELAYED_BREAK;
@ -157,17 +160,17 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
*gfxP = gfx;
return;
case 0x11: // MESSAGE_FADE2
case MESSAGE_FADE2:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_50;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADE_NORMAL;
msgCtx->stateTimer = msgCtx->decodedBuffer.schar[++i] << 8;
msgCtx->stateTimer |= msgCtx->decodedBuffer.schar[++i];
}
*gfxP = gfx;
return;
case 0x12: // MESSAGE_SFX
case MESSAGE_SFX:
if ((msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) && !msgCtx->messageHasSetSfx) {
msgCtx->messageHasSetSfx = true;
sfxHi = msgCtx->decodedBuffer.schar[i + 1];
@ -177,10 +180,10 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
i += 2;
break;
case 0x13: // remnant of MESSAGE_ITEM_ICON
case MESSAGE_ITEM_ICON:
break;
case 0x15: // MESSAGE_BACKGROUND
case MESSAGE_BACKGROUND:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfx(NA_SE_NONE);
}
@ -192,14 +195,14 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gfx++, (msgCtx->textPosX + 1) << 2, (msgCtx->unk12012 + 1) << 2,
(msgCtx->textPosX + 0x61) << 2, (msgCtx->unk12012 + 0x31) << 2, G_TX_RENDERTILE, 0,
0, 1 << 10, 1 << 10);
(msgCtx->textPosX + 97) << 2, (msgCtx->unk12012 + 49) << 2, G_TX_RENDERTILE, 0, 0,
1 << 10, 1 << 10);
gDPLoadTextureBlock_4b(gfx++, msgCtx->textboxSegment + 0x1900, G_IM_FMT_I, 96, 48, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gfx++, (msgCtx->textPosX + 0x61) << 2, (msgCtx->unk12012 + 1) << 2,
(msgCtx->textPosX + 0xC2) << 2, (msgCtx->unk12012 + 0x31) << 2, 0, 0, 0, 1 << 10,
gSPTextureRectangle(gfx++, (msgCtx->textPosX + 97) << 2, (msgCtx->unk12012 + 1) << 2,
(msgCtx->textPosX + 194) << 2, (msgCtx->unk12012 + 49) << 2, 0, 0, 0, 1 << 10,
1 << 10);
gDPPipeSync(gfx++);
@ -207,30 +210,30 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
gDPLoadTextureBlock_4b(gfx++, msgCtx->textboxSegment + 0x1000, G_IM_FMT_I, 96, 48, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gfx++, msgCtx->textPosX << 2, msgCtx->unk12012 << 2, (msgCtx->textPosX + 0x60) << 2,
(msgCtx->unk12012 + 0x30) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gSPTextureRectangle(gfx++, msgCtx->textPosX << 2, msgCtx->unk12012 << 2, (msgCtx->textPosX + 96) << 2,
(msgCtx->unk12012 + 48) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gDPLoadTextureBlock_4b(gfx++, msgCtx->textboxSegment + 0x1900, G_IM_FMT_I, 96, 48, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gfx++, (msgCtx->textPosX + 0x60) << 2, msgCtx->unk12012 << 2,
(msgCtx->textPosX + 0xC0) << 2, (msgCtx->unk12012 + 0x30) << 2, G_TX_RENDERTILE, 0,
0, 1 << 10, 1 << 10);
gSPTextureRectangle(gfx++, (msgCtx->textPosX + 96) << 2, msgCtx->unk12012 << 2,
(msgCtx->textPosX + 192) << 2, (msgCtx->unk12012 + 48) << 2, G_TX_RENDERTILE, 0, 0,
1 << 10, 1 << 10);
gDPPipeSync(gfx++);
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0,
PRIMITIVE, 0);
msgCtx->textPosX += 0x20;
msgCtx->textPosX += 32;
break;
case 0x14: // MESSAGE_TEXT_SPEED
case MESSAGE_TEXT_SPEED:
msgCtx->textDelay = msgCtx->decodedBuffer.schar[++i];
break;
case 0x1A: // MESSAGE_UNSKIPPABLE
case MESSAGE_UNSKIPPABLE:
msgCtx->textUnskippable = true;
break;
case 0x1B: // MESSAGE_TWO_CHOICE
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_10;
case MESSAGE_TWO_CHOICE:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_TWO_CHOICE;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->choiceTextId = msgCtx->currentTextId;
msgCtx->stateTimer = 4;
@ -239,8 +242,8 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
}
break;
case 0x1C: // MESSAGE_THREE_CHOICE
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_11;
case MESSAGE_THREE_CHOICE:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_THREE_CHOICE;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->choiceTextId = msgCtx->currentTextId;
msgCtx->stateTimer = 4;
@ -249,10 +252,10 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
}
break;
case 0x2: // MESSAGE_END
case MESSAGE_END:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_00) {
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
Audio_PlaySfx(NA_SE_SY_MESSAGE_END);
Font_LoadMessageBoxEndIcon(font, 1);
if (play->csCtx.state == CS_STATE_IDLE) {
@ -263,7 +266,7 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
*gfxP = gfx;
return;
case 0x10: // MESSAGE_OCARINA
case MESSAGE_OCARINA:
if ((i + 1) == msgCtx->textDrawPos) {
Message_HandleOcarina(play);
*gfxP = gfx;
@ -271,10 +274,10 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
}
break;
case 0xE: // MESSAGE_FADE
case MESSAGE_FADE:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_50;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADE_NORMAL;
msgCtx->stateTimer = msgCtx->decodedBuffer.schar[++i];
Font_LoadMessageBoxEndIcon(font, 1);
if (play->csCtx.state == CS_STATE_IDLE) {
@ -284,19 +287,19 @@ void Message_DrawTextCredits(PlayState* play, Gfx** gfxP) {
*gfxP = gfx;
return;
case 0xA: // MESSAGE_PERSISTENT
case MESSAGE_PERSISTENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfx(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_30;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
}
*gfxP = gfx;
return;
case 0xB: // MESSAGE_EVENT
case MESSAGE_EVENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_40;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
Font_LoadMessageBoxEndIcon(font, 0);
Audio_PlaySfx(NA_SE_SY_MESSAGE_END);
}
@ -347,7 +350,8 @@ void Message_DecodeCredits(PlayState* play) {
curChar = font->msgBuf.schar[msgCtx->msgBufPos];
msgCtx->decodedBuffer.schar[decodedBufPos] = font->msgBuf.schar[msgCtx->msgBufPos];
if ((curChar == 4) || (curChar == 7) || (curChar == 0xC) || (curChar == 0xB) || (curChar == 2)) {
if ((curChar == MESSAGE_BOX_BREAK) || (curChar == MESSAGE_TEXTID) || (curChar == MESSAGE_BOX_BREAK_DELAYED) ||
(curChar == MESSAGE_EVENT) || (curChar == MESSAGE_END)) {
// Textbox decoding ends with any of the above text control characters
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
msgCtx->textDrawPos = 1;
@ -363,7 +367,7 @@ void Message_DecodeCredits(PlayState* play) {
}
}
if (curChar == 7) {
if (curChar == MESSAGE_TEXTID) {
value = font->msgBuf.schar[msgCtx->msgBufPos + 1];
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[msgCtx->msgBufPos + 1];
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[msgCtx->msgBufPos + 2];
@ -371,7 +375,7 @@ void Message_DecodeCredits(PlayState* play) {
msgCtx->nextTextId = msgCtx->decodedBuffer.schar[decodedBufPos] | value;
}
if (curChar == 0xC) {
if (curChar == MESSAGE_BOX_BREAK_DELAYED) {
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[msgCtx->msgBufPos + 1];
msgCtx->msgBufPos += 2;
}
@ -382,7 +386,7 @@ void Message_DecodeCredits(PlayState* play) {
msgCtx->textDrawPos = msgCtx->decodedTextLen;
}
break;
} else if (curChar == 0xF) {
} else if (curChar == MESSAGE_NAME) {
// Substitute the player name control character for the file's player name.
for (playerNameLen = ARRAY_COUNT(gSaveContext.save.saveInfo.playerData.playerName); playerNameLen > 0;
playerNameLen--) {
@ -418,7 +422,7 @@ void Message_DecodeCredits(PlayState* play) {
decodedBufPos++;
}
decodedBufPos--;
} else if ((curChar == 0x16) || (curChar == 0x17)) {
} else if ((curChar == MESSAGE_MARATHON_TIME) || (curChar == MESSAGE_RACE_TIME)) {
digits[0] = digits[1] = digits[2] = 0;
if (curChar == 0x17) {
digits[3] = gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2];
@ -457,7 +461,7 @@ void Message_DecodeCredits(PlayState* play) {
}
}
} else if (curChar == 0x18) {
} else if (curChar == MESSAGE_POINTS) {
digits[0] = digits[1] = digits[2] = 0;
digits[3] = gSaveContext.minigameScore;
@ -487,8 +491,8 @@ void Message_DecodeCredits(PlayState* play) {
}
}
decodedBufPos--;
} else if (curChar != 0x19) {
if (curChar == 0x1D) {
} else if (curChar != MESSAGE_TOKENS) {
if (curChar == MESSAGE_FISH_INFO) {
digits[0] = 0;
digits[1] = gSaveContext.minigameScore;
@ -506,7 +510,7 @@ void Message_DecodeCredits(PlayState* play) {
}
}
decodedBufPos--;
} else if (curChar == 0x1E) {
} else if (curChar == MESSAGE_HIGHSCORE) {
value = HIGH_SCORE((u8)font->msgBuf.schar[++msgCtx->msgBufPos]);
if ((font->msgBuf.schar[msgCtx->msgBufPos] & 0xFF) == HS_FISHING) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
@ -518,9 +522,9 @@ void Message_DecodeCredits(PlayState* play) {
value = SQ((f32)value) * 0.0036f + 0.5f;
}
switch (font->msgBuf.schar[msgCtx->msgBufPos] & 0xFF) {
case 0:
case 1:
case 2:
case HS_BANK_RUPEES:
case HS_UNK_1:
case HS_FISHING:
digits[0] = digits[1] = digits[2] = 0;
digits[3] = value;
@ -552,9 +556,9 @@ void Message_DecodeCredits(PlayState* play) {
decodedBufPos--;
break;
case 3:
case 4:
case 6:
case HS_BOAT_ARCHERY:
case HS_HORSE_BACK_BALLOON:
case HS_SHOOTING_GALLERY:
digits[0] = digits[1] = digits[2] = 0;
digits[3] = value;
@ -592,7 +596,7 @@ void Message_DecodeCredits(PlayState* play) {
default:
break;
}
} else if (curChar == 0x1F) {
} else if (curChar == MESSAGE_TIME) {
digits[0] = 0;
timeInSeconds = TIME_TO_MINUTES_F(CURRENT_TIME);
@ -623,10 +627,10 @@ void Message_DecodeCredits(PlayState* play) {
}
decodedBufPos--;
} else if (curChar == 0x13) {
} else if (curChar == MESSAGE_ITEM_ICON) {
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[msgCtx->msgBufPos + 1];
Message_LoadItemIcon(play, font->msgBuf.schar[msgCtx->msgBufPos + 1], msgCtx->textboxY + 10);
} else if (curChar == 0x15) {
} else if (curChar == MESSAGE_BACKGROUND) {
DmaMgr_RequestSync(msgCtx->textboxSegment + 0x1000,
(uintptr_t)SEGMENT_ROM_START(message_texture_static) + 0x900, 0x900);
DmaMgr_RequestSync(msgCtx->textboxSegment + 0x1900,
@ -634,27 +638,28 @@ void Message_DecodeCredits(PlayState* play) {
msgCtx->msgBufPos += 3;
msgCtx->unk12012 = msgCtx->textboxY + 8;
numLines = 2;
} else if (curChar == 5) {
} else if (curChar == MESSAGE_COLOR) {
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[++msgCtx->msgBufPos];
} else if (curChar == 1) {
} else if (curChar == MESSAGE_NEWLINE) {
numLines++;
} else if ((curChar != 8) && (curChar != 9) && (curChar != 0xD) && (curChar != 0x10) && (curChar != 0xA) &&
(curChar != 0x1A)) {
if (curChar == 0xE) {
} else if ((curChar != MESSAGE_QUICKTEXT_ENABLE) && (curChar != MESSAGE_QUICKTEXT_DISABLE) &&
(curChar != MESSAGE_AWAIT_BUTTON_PRESS) && (curChar != MESSAGE_OCARINA) &&
(curChar != MESSAGE_PERSISTENT) && (curChar != MESSAGE_UNSKIPPABLE)) {
if (curChar == MESSAGE_FADE) {
msgCtx->textFade = true;
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[++msgCtx->msgBufPos];
} else if (curChar == 0x11) {
} else if (curChar == MESSAGE_FADE2) {
msgCtx->textFade = true;
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[++msgCtx->msgBufPos];
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[++msgCtx->msgBufPos];
} else if ((curChar == 6) || (curChar == 0x14)) {
} else if ((curChar == MESSAGE_SHIFT) || (curChar == MESSAGE_TEXT_SPEED)) {
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[++msgCtx->msgBufPos] & 0xFF;
} else if (curChar == 0x12) {
} else if (curChar == MESSAGE_SFX) {
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[++msgCtx->msgBufPos];
msgCtx->decodedBuffer.schar[++decodedBufPos] = font->msgBuf.schar[++msgCtx->msgBufPos];
} else if (curChar == 0x1B) {
} else if (curChar == MESSAGE_TWO_CHOICE) {
msgCtx->choiceNum = 2;
} else if (curChar == 0x1C) {
} else if (curChar == MESSAGE_THREE_CHOICE) {
msgCtx->choiceNum = 3;
} else if (curChar != ' ') {
Font_LoadCharNES(play, curChar, charTexIdx);

File diff suppressed because it is too large Load Diff

View File

@ -967,7 +967,7 @@ void Play_UpdateMain(PlayState* this) {
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) &&
(((this->msgCtx.msgMode == MSGMODE_NONE)) ||
((this->msgCtx.currentTextId == 0xFF) && (this->msgCtx.msgMode == MSGMODE_TEXT_DONE) &&
(this->msgCtx.textboxEndType == TEXTBOX_ENDTYPE_41)) ||
(this->msgCtx.textboxEndType == TEXTBOX_ENDTYPE_PAUSE_MENU)) ||
((this->msgCtx.currentTextId >= 0x100) && (this->msgCtx.currentTextId <= 0x200))) &&
(this->gameOverCtx.state == GAMEOVER_INACTIVE)) {
KaleidoSetup_Update(this);

View File

@ -272,7 +272,7 @@ void func_80954340(BgIngate* this, PlayState* play) {
void func_809543D4(BgIngate* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == TEXT_STATE_CHOICE) || (talkState == TEXT_STATE_5)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_CHOICE) || (talkState == TEXT_STATE_EVENT)) && Message_ShouldAdvance(play)) {
switch (this->dyna.actor.textId) {
case 0x9E4:
this->dyna.actor.textId = 0x9E5;

View File

@ -1332,7 +1332,7 @@ void func_80BEEE10(EnAkindonuts* this, PlayState* play) {
void func_80BEEFA8(EnAkindonuts* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (talkState == TEXT_STATE_5) {
if (talkState == TEXT_STATE_EVENT) {
if (Message_ShouldAdvance(play)) {
if (this->unk_32C & 1) {
this->unk_32C &= ~0x1;
@ -1372,13 +1372,13 @@ void func_80BEEFA8(EnAkindonuts* this, PlayState* play) {
break;
}
}
} else if (talkState == TEXT_STATE_16) {
} else if (talkState == TEXT_STATE_PAUSE_MENU) {
func_80BEE73C(this, play);
}
}
void func_80BEF18C(EnAkindonuts* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
this->unk_33C = 0;
@ -1403,7 +1403,7 @@ void func_80BEF20C(EnAkindonuts* this, PlayState* play) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_6);
}
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->unk_32C & 1) {
this->unk_32C &= ~0x1;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;

View File

@ -440,7 +440,7 @@ void EnAob01_BeforeRace_HandleConversation(EnAob01* this, PlayState* play) {
}
gSaveContext.unk_3F5C = this->rupeesBet;
play->msgCtx.bankRupees = this->rupeesBet;
play->msgCtx.rupeesTotal = this->rupeesBet;
this->textId = 0x3529; // Is that bet okay?
break;
@ -517,7 +517,7 @@ void EnAob01_BeforeRace_RespondToPlayAgainQuestion(EnAob01* this, PlayState* pla
break;
}
}
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
this->textId = 0;
@ -667,7 +667,7 @@ void EnAob01_BeforeRace_Talk(EnAob01* this, PlayState* play) {
break;
}
}
} else if (talkState == TEXT_STATE_5) {
} else if (talkState == TEXT_STATE_EVENT) {
if (Message_ShouldAdvance(play)) {
this->stateFlags &= ~ENAOB01_FLAG_LAUGH;
if (this->stateFlags & ENAOB01_FLAG_CONVERSATION_OVER) {
@ -679,9 +679,9 @@ void EnAob01_BeforeRace_Talk(EnAob01* this, PlayState* play) {
EnAob01_BeforeRace_HandleConversation(this, play);
}
}
} else if ((talkState == TEXT_STATE_14) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_INPUT_RUPEES) && Message_ShouldAdvance(play)) {
this->stateFlags &= ~ENAOB01_FLAG_LAUGH;
this->rupeesBet = play->msgCtx.bankRupeesSelected;
this->rupeesBet = play->msgCtx.rupeesSelected;
EnAob01_BeforeRace_HandleConversation(this, play);
}
}
@ -854,7 +854,7 @@ void EnAob01_AfterRace_GiveRaceResult(EnAob01* this, PlayState* play) {
this->stateFlags |= ENAOB01_FLAG_SURPRISE;
this->rupeesBet *= 3;
Rupees_ChangeBy(this->rupeesBet);
play->msgCtx.bankRupees = this->rupeesBet;
play->msgCtx.rupeesTotal = this->rupeesBet;
break;
case 2:
@ -862,7 +862,7 @@ void EnAob01_AfterRace_GiveRaceResult(EnAob01* this, PlayState* play) {
this->stateFlags |= ENAOB01_FLAG_SURPRISE;
this->rupeesBet *= 2;
Rupees_ChangeBy(this->rupeesBet);
play->msgCtx.bankRupees = this->rupeesBet;
play->msgCtx.rupeesTotal = this->rupeesBet;
break;
case 3:
@ -896,7 +896,7 @@ void EnAob01_AfterRace_GiveReward(EnAob01* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (EnAob01_ProcessIdleAnim(this)) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->rupeesBet = 0;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
@ -930,7 +930,7 @@ void EnAob01_AfterRace_GiveReward(EnAob01* this, PlayState* play) {
void EnAob01_AfterRace_AfterGivingReward(EnAob01* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_EVENT) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED)) {
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED);
}
@ -983,7 +983,7 @@ void EnAob01_AfterRace_Talk(EnAob01* this, PlayState* play) {
}
}
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->stateFlags &= ~ENAOB01_FLAG_LAUGH;
this->stateFlags &= ~ENAOB01_FLAG_SURPRISE;
if (this->rupeesBet >= 150) {

View File

@ -701,7 +701,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
case TEXT_STATE_DONE:
if ((play->msgCtx.currentTextId == 0x10DD) && (this->unk_374 & 0x8000)) {
if (SubS_StartCutscene(&brother->actor, brother->csIdList[0], CS_ID_GLOBAL_TALK,
@ -1212,9 +1212,9 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
break;
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
default:
break;
}
@ -1515,7 +1515,7 @@ void func_80A97AB4(EnAz* this, PlayState* play) {
break;
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
@ -1548,7 +1548,7 @@ void func_80A97AB4(EnAz* this, PlayState* play) {
break;
}
}
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
default:
break;

View File

@ -595,7 +595,7 @@ void EnBaba_Idle(EnBaba* this, PlayState* play) {
void EnBaba_FollowSchedule_Talk(EnBaba* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_EVENT) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
this->actionFunc = EnBaba_FollowSchedule;
@ -606,7 +606,7 @@ void EnBaba_FollowSchedule_Talk(EnBaba* this, PlayState* play) {
void EnBaba_Talk(EnBaba* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (talkState == TEXT_STATE_5) {
if (talkState == TEXT_STATE_EVENT) {
if (Message_ShouldAdvance(play)) {
if (this->stateFlags & BOMB_SHOP_LADY_STATE_END_CONVERSATION) {
this->stateFlags &= ~BOMB_SHOP_LADY_STATE_END_CONVERSATION;
@ -779,7 +779,7 @@ s32 EnBaba_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
Matrix_RotateZS(-this->torsoRot.x, MTXMODE_APPLY);
}
if ((limbIndex == BBA_LIMB_NECK) && (this->inMsgState3 != 0) && ((play->state.frames % 2) == 0)) {
if ((limbIndex == BBA_LIMB_NECK) && this->msgFading && ((play->state.frames % 2) == 0)) {
Matrix_Translate(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
}

View File

@ -30,7 +30,7 @@ typedef struct EnBaba {
/* 0x150 */ SkelAnime skelAnime;
/* 0x194 */ ColliderCylinder collider;
/* 0x1E0 */ u16 textId;
/* 0x1E2 */ u8 inMsgState3;
/* 0x1E2 */ u8 msgFading;
/* 0x1E4 */ Path* path;
/* 0x1E8 */ s16 waypoint;
/* 0x1EA */ UNK_TYPE1 unk1EA[0x1C];

View File

@ -235,7 +235,7 @@ void func_80BE8AAC(EnBaisen* this, PlayState* play) {
EnBaisen_ChangeAnim(this, ENBAISEN_ANIM_0);
}
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->textIdIndex++;
if (this->textIdIndex < 6) {

View File

@ -592,13 +592,13 @@ void EnBal_Talk(EnBal* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
break;
case TEXT_STATE_CLOSING:
break;
case TEXT_STATE_3:
case TEXT_STATE_FADING:
if (this->textId != 0x1D10) {
this->isTalking = true;
}
@ -608,7 +608,7 @@ void EnBal_Talk(EnBal* this, PlayState* play) {
EnBal_TryPurchaseMap(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
EnBal_HandleConversation(this, play);
break;
@ -618,7 +618,7 @@ void EnBal_Talk(EnBal* this, PlayState* play) {
}
break;
case TEXT_STATE_10:
case TEXT_STATE_AWAITING_NEXT:
if (Message_ShouldAdvance(play) && (this->textId == 0x1D08)) {
this->forceEyesShut = false;
this->eyeTexIndex = TINGLE_EYETEX_OPEN;
@ -986,7 +986,7 @@ void EnBal_SetupOfferGetItem(EnBal* this) {
void EnBal_OfferGetItem(EnBal* this, PlayState* play) {
GetItemId mapGetItemId;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
sGetItemPending = true;
}

View File

@ -187,7 +187,7 @@ void EnBba01_Talk(EnHy* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xFA0, 1);
talkState = Message_GetState(&play->msgCtx);
this->inMsgState3 = (talkState == TEXT_STATE_3) ? true : false;
this->msgFading = (talkState == TEXT_STATE_FADING) ? true : false;
switch (talkState) {
case TEXT_STATE_NONE:
@ -284,7 +284,7 @@ s32 EnBba01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
Matrix_RotateZS(-this->enHy.torsoRot.x, MTXMODE_APPLY);
}
if ((limbIndex == BBA_LIMB_RIGHT_LOWER_ARM_ROOT) && this->enHy.inMsgState3 && ((play->state.frames % 2) == 0)) {
if ((limbIndex == BBA_LIMB_RIGHT_LOWER_ARM_ROOT) && this->enHy.msgFading && ((play->state.frames % 2) == 0)) {
Matrix_Translate(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
}

View File

@ -264,7 +264,7 @@ void EnBji01_DialogueHandler(EnBji01* this, PlayState* play) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
switch (play->msgCtx.currentTextId) {

View File

@ -244,12 +244,12 @@ s32 EnBjt_ChooseBehaviour(Actor* thisx, PlayState* play) {
case TOILET_HAND_BEHAVIOUR_WAIT_FOR_ITEM:
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (!Message_ShouldAdvance(play)) {
break;
}
// Fallthrough
case TEXT_STATE_16:
case TEXT_STATE_PAUSE_MENU:
itemAction = func_80123810(play);
if ((itemAction == PLAYER_IA_DEED_LAND) || (itemAction == PLAYER_IA_LETTER_TO_KAFEI) ||

View File

@ -296,7 +296,7 @@ void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
}
}
if ((this->unk_2BC == 0) && (Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((this->unk_2BC == 0) && (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Player* player = GET_PLAYER(play);
s32 pad;
s32 sp28 = false;
@ -472,7 +472,7 @@ void func_809C5524(EnBomBowlMan* this, PlayState* play) {
}
void func_809C5598(EnBomBowlMan* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
if ((this->actor.textId == 0x72F) || (this->actor.textId == 0x730)) {
this->actor.textId = 0x731;

View File

@ -224,7 +224,7 @@ void func_80C038B4(EnBombers* this) {
void func_80C039A8(EnBombers* this, PlayState* play) {
Player* player = GET_PLAYER(play);
this->unk_2A6 = TEXT_STATE_5;
this->unk_2A6 = TEXT_STATE_EVENT;
switch (player->transformation) {
case PLAYER_FORM_HUMAN:
@ -351,7 +351,7 @@ void func_80C03AF4(EnBombers* this, PlayState* play) {
if (Text_GetFaceReaction(play, FACE_REACTION_SET_BOMBERS) == 0) {
func_80C039A8(this, play);
} else {
this->unk_2A6 = TEXT_STATE_5;
this->unk_2A6 = TEXT_STATE_EVENT;
this->actor.textId = Text_GetFaceReaction(play, FACE_REACTION_SET_BOMBERS);
}
@ -395,7 +395,7 @@ void func_80C03FAC(EnBombers* this, PlayState* play) {
if ((this->unk_2A6 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
sp2A = 0;
Message_CloseTextbox(play);
this->unk_2A6 = TEXT_STATE_5;
this->unk_2A6 = TEXT_STATE_EVENT;
if ((this->actor.textId == 0x73D) || (this->actor.textId == 0x73E) || (this->actor.textId == 0x73F)) {
this->actor.textId = 0x740;
@ -510,7 +510,7 @@ void func_80C04354(EnBombers* this, PlayState* play) {
void func_80C043C8(EnBombers* this, PlayState* play) {
Math_SmoothStepToS(&this->unk_288, this->unk_28E, 1, 0x3E8, 0);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
func_80C042F8(this);
}

View File

@ -168,13 +168,13 @@ void func_80C04BA0(EnBombers2* this, PlayState* play) {
case PLAYER_FORM_GORON:
case PLAYER_FORM_ZORA:
this->textIdIndex = 1;
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
break;
case PLAYER_FORM_DEKU:
case PLAYER_FORM_HUMAN:
this->textIdIndex = 2;
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
break;
default:
@ -242,7 +242,7 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
break;
}
if ((this->talkState == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
if (this->talkState == TEXT_STATE_15) {
if (this->talkState == TEXT_STATE_INPUT_BOMBER_CODE) {
s32 i;
s32 correctDigits;
@ -263,7 +263,7 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
this->actor.textId = sTextIds[this->textIdIndex];
Message_ContinueTextbox(play, this->actor.textId);
Actor_PlaySfx(&this->actor, NA_SE_SY_PIECE_OF_HEART);
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
return;
}
}
@ -288,7 +288,7 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
this->textIdIndex = 3;
this->actor.textId = sTextIds[this->textIdIndex];
Message_ContinueTextbox(play, this->actor.textId);
this->talkState = TEXT_STATE_15;
this->talkState = TEXT_STATE_INPUT_BOMBER_CODE;
break;
case 3:
@ -299,14 +299,14 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_SY_ERROR);
this->actor.textId = sTextIds[this->textIdIndex];
Message_ContinueTextbox(play, this->actor.textId);
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
break;
case 4:
this->textIdIndex = 5;
this->actor.textId = sTextIds[this->textIdIndex];
Message_ContinueTextbox(play, this->actor.textId);
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
break;
case 6:
@ -360,7 +360,7 @@ void func_80C0520C(EnBombers2* this, PlayState* play) {
this->actor.speed = 0.0f;
if (fabsf(this->actor.world.rot.y - this->actor.yawTowardsPlayer) < 100.0f) {
Message_CloseTextbox(play);
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
this->textIdIndex = 7;
EnBombers2_ChangeAnim(this, ENBOMBERS_ANIM_6, 1.0f);
this->unk_2A8 = 0;

View File

@ -695,7 +695,7 @@ void func_80BFF6CC(EnBomjima* this, PlayState* play) {
f32 curFrame = this->skelAnime.curFrame;
if (curFrame >= this->animEndFrame) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
EnBomjima_ChangeAnim(this, ENBOMJIMA_ANIM_1, 1.0f);
this->actionFunc = func_80BFF754;
@ -800,7 +800,7 @@ void func_80BFF9B0(EnBomjima* this, PlayState* play) {
}
void func_80BFFB40(EnBomjima* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
EnBomjima_ChangeAnim(this, ENBOMJIMA_ANIM_15, 1.0f);
D_80C009F0 = 100;
@ -991,7 +991,7 @@ void func_80C00284(EnBomjima* this, PlayState* play) {
break;
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->collider.dim.radius = 10;
this->collider.dim.height = 30;
if ((this->action == EN_BOMJIMA_ACTION_4) || (this->unk_2CA == 1) ||

View File

@ -829,7 +829,7 @@ void func_80C02A14(EnBomjimb* this, PlayState* play) {
player->actor.freezeTimer = 3;
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
if ((this->unk_2CA == 8) && (gSaveContext.save.saveInfo.bombersCaughtNum >= 5)) {
func_80C02CA4(this, play);
@ -848,7 +848,7 @@ void func_80C02BCC(EnBomjimb* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x1388, 0);
if (this->unk_2C0 == 0) {
player->actor.freezeTimer = 3;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->unk_2C0 = 1;
player->stateFlags1 &= ~PLAYER_STATE1_10000000;

View File

@ -177,7 +177,7 @@ void EnCne01_Talk(EnHy* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xFA0, 1);
talkState = Message_GetState(&play->msgCtx);
this->inMsgState3 = (talkState == TEXT_STATE_3) ? true : false;
this->msgFading = (talkState == TEXT_STATE_FADING) ? true : false;
switch (talkState) {
case TEXT_STATE_NONE:
@ -274,7 +274,7 @@ s32 EnCne01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
Matrix_RotateZS(-this->enHy.torsoRot.x, MTXMODE_APPLY);
}
if ((limbIndex == CNE_LIMB_HEAD) && this->enHy.inMsgState3 && ((play->state.frames % 2) == 0)) {
if ((limbIndex == CNE_LIMB_HEAD) && this->enHy.msgFading && ((play->state.frames % 2) == 0)) {
Matrix_Translate(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
}

View File

@ -206,7 +206,7 @@ void EnCow_UpdateAnimation(EnCow* this, PlayState* play) {
}
void EnCow_TalkEnd(EnCow* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
Message_CloseTextbox(play);
this->actionFunc = EnCow_Idle;
@ -230,7 +230,7 @@ void EnCow_GiveMilkWait(EnCow* this, PlayState* play) {
}
void EnCow_GiveMilk(EnCow* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
Message_CloseTextbox(play);
this->actionFunc = EnCow_GiveMilkWait;
@ -239,7 +239,7 @@ void EnCow_GiveMilk(EnCow* this, PlayState* play) {
}
void EnCow_CheckForEmptyBottle(EnCow* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (Inventory_HasEmptyBottle()) {
Message_ContinueTextbox(play, 0x32C9); // Text to give milk.
this->actionFunc = EnCow_GiveMilk;

View File

@ -278,7 +278,7 @@ void func_80943BDC(EnDaiku* this, PlayState* play) {
}
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
func_80943820(this);
}

View File

@ -333,7 +333,7 @@ void func_80BE6B40(EnDaiku2* this, PlayState* play) {
void func_80BE6BC0(EnDaiku2* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
s32 day = gSaveContext.save.day - 1;
Message_CloseTextbox(play);

View File

@ -149,7 +149,7 @@ void EnDemoheishi_SetupTalk(EnDemoheishi* this) {
}
void EnDemoheishi_Talk(EnDemoheishi* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
EnDemoheishi_SetupIdle(this);
}

View File

@ -438,7 +438,7 @@ void func_80A71F18(EnDno* this, PlayState* play) {
}
break;
case TEXT_STATE_3:
case TEXT_STATE_FADING:
if (play->msgCtx.currentTextId == 0x80B) {
switch (this->animIndex) {
case EN_DNO_ANIM_IMPLORE_START:
@ -466,7 +466,7 @@ void func_80A71F18(EnDno* this, PlayState* play) {
break;
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
case TEXT_STATE_DONE:
switch (play->msgCtx.currentTextId) {
case 0x80B:
@ -656,9 +656,9 @@ void func_80A725F8(EnDno* this, PlayState* play) {
}
break;
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
if (((play->msgCtx.currentTextId == 0x800) || (play->msgCtx.currentTextId == 0x801)) &&
(this->animIndex == EN_DNO_ANIM_OPEN_PARASOL)) {
Math_SmoothStepToF(&this->unk_454, 1.0f, 1.0f, 0.1f, 0.01f);
@ -682,7 +682,7 @@ void func_80A725F8(EnDno* this, PlayState* play) {
break;
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
case TEXT_STATE_DONE:
switch (play->msgCtx.currentTextId) {
case 0x800:

View File

@ -1390,7 +1390,7 @@ void func_8088FE64(Actor* thisx, PlayState* play2) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x240:

View File

@ -456,7 +456,7 @@ void func_80B29128(EnFish2* this) {
}
void func_80B2913C(EnFish2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
func_80B28B5C(this);
}

View File

@ -1127,7 +1127,7 @@ void EnFishing_UpdateEffects(FishingEffect* effect, PlayState* play) {
Message_StartTextbox(play, 0x40B3, NULL);
}
if ((effect->unk_2C >= 100) && (Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
if ((effect->unk_2C >= 100) && (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT)) {
if (Message_ShouldAdvance(play) || (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
Message_CloseTextbox(play);
Rupees_ChangeBy(-50);
@ -4756,7 +4756,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 2:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
Message_ContinueTextbox(play, 0x407F);
this->unk_154 = 4;
@ -4764,7 +4764,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 3:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->unk_154 = 0;
}
@ -4795,7 +4795,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 5:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
play->interfaceCtx.unk_27E = 1;
@ -4909,7 +4909,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 11:
if (((Message_GetState(&play->msgCtx) == TEXT_STATE_5) ||
if (((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) ||
Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) &&
Message_ShouldAdvance(play)) {
s32 getItemId;
@ -4986,7 +4986,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
break;
case 20:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->unk_154 = 0;
}

View File

@ -126,7 +126,8 @@ static Vec3f sShopItemPositions[3] = {
bool EnFsn_TestItemSelected(PlayState* play) {
MessageContext* msgCtx = &play->msgCtx;
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_11)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_THREE_CHOICE)) {
return CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A);
}
return CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) ||
@ -846,7 +847,7 @@ void EnFsn_StartBuying(EnFsn* this, PlayState* play) {
Player* player = GET_PLAYER(play);
EnFsn_HandleLookToShopkeeperBuyingCutscene(this);
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (this->actor.textId) {
case 0x29CC:
this->actor.textId = 0x29CD;
@ -879,7 +880,7 @@ void EnFsn_StartBuying(EnFsn* this, PlayState* play) {
void EnFsn_AskBuyOrSell(EnFsn* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (talkState == TEXT_STATE_5) {
if (talkState == TEXT_STATE_EVENT) {
if (Message_ShouldAdvance(play)) {
switch (this->actor.textId) {
case 0x29CC:
@ -958,7 +959,7 @@ void EnFsn_DeterminePrice(EnFsn* this, PlayState* play) {
PlayerItemAction itemAction;
u8 buttonItem;
if (Message_GetState(&play->msgCtx) == TEXT_STATE_16) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_PAUSE_MENU) {
itemAction = func_80123810(play);
if (itemAction > PLAYER_IA_NONE) {
@ -1150,7 +1151,7 @@ void EnFsn_BrowseShelf(EnFsn* this, PlayState* play) {
this->drawCursor = 0xFF;
this->stickLeftPrompt.isEnabled = true;
EnFsn_UpdateCursorPos(this, play);
if (talkstate == TEXT_STATE_5) {
if (talkstate == TEXT_STATE_EVENT) {
func_8011552C(play, DO_ACTION_DECIDE);
if (!EnFsn_HasPlayerSelectedItem(this, play, CONTROLLER1(&play->state))) {
EnFsn_CursorLeftRight(this);
@ -1241,7 +1242,7 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, PlayState* play) {
void EnFsn_SetupEndInteraction(EnFsn* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_EVENT) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (play->msgCtx.bombersNotebookEventQueueCount == 0) {
EnFsn_EndInteraction(this, play);
@ -1280,7 +1281,7 @@ void EnFsn_SelectItem(EnFsn* this, PlayState* play) {
}
void EnFsn_PlayerCannotBuy(EnFsn* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->actionFunc = this->prevActionFunc;
Message_ContinueTextbox(play, this->items[this->cursorIndex]->actor.textId);
}
@ -1322,7 +1323,7 @@ void EnFsn_AskCanBuyMore(EnFsn* this, PlayState* play) {
break;
}
}
} else if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
} else if (((talkState == TEXT_STATE_EVENT) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (play->msgCtx.bombersNotebookEventQueueCount == 0) {
EnFsn_EndInteraction(this, play);
@ -1373,7 +1374,7 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, PlayState* play) {
break;
}
}
} else if (((talkState == TEXT_STATE_5) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
} else if (((talkState == TEXT_STATE_EVENT) || (talkState == TEXT_STATE_DONE)) && Message_ShouldAdvance(play)) {
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
if (play->msgCtx.bombersNotebookEventQueueCount == 0) {
EnFsn_EndInteraction(this, play);
@ -1405,7 +1406,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
Audio_PlaySfx(NA_SE_SY_CURSOR);
}
}
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->actor.textId = 0x29D6;
Message_StartTextbox(play, this->actor.textId, &this->actor);
//! FAKE:
@ -1414,7 +1415,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) {
}
void EnFsn_SetupEndInteractionImmediately(EnFsn* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
EnFsn_EndInteraction(this, play);
}
}
@ -1430,7 +1431,7 @@ void EnFsn_IdleBackroom(EnFsn* this, PlayState* play) {
}
void EnFsn_ConverseBackroom(EnFsn* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->flags & ENFSN_END_CONVERSATION) {
this->flags &= ~ENFSN_END_CONVERSATION;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;

View File

@ -601,16 +601,16 @@ void func_809628D0(EnFu* this, PlayState* play) {
switch (talkState) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
break;
case TEXT_STATE_CHOICE:
func_80962588(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
func_80962660(this, play);
break;
@ -640,7 +640,7 @@ void func_809628D0(EnFu* this, PlayState* play) {
break;
}
if (talkState != TEXT_STATE_3) {
if (talkState != TEXT_STATE_FADING) {
func_80964190(this, play);
func_8096426C(this, play);
}
@ -866,7 +866,7 @@ void func_80963350(EnFu* this, PlayState* play) {
BgFuKaiten* fuKaiten = (BgFuKaiten*)this->actor.child;
if ((this->unk_54A == 0) &&
(((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) ||
(((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) ||
((Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) && (play->msgCtx.stateTimer == 1)))) {
Message_CloseTextbox(play);
this->unk_54A = 2;

View File

@ -397,7 +397,7 @@ void func_80B0FEBC(EnGb2* this, PlayState* play) {
void func_80B0FFA8(EnGb2* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (talkState == TEXT_STATE_5) {
if (talkState == TEXT_STATE_EVENT) {
if (Message_ShouldAdvance(play)) {
if (this->unk_26C & 2) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
@ -565,7 +565,7 @@ void func_80B10584(EnGb2* this, PlayState* play) {
void func_80B10634(EnGb2* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (talkState == TEXT_STATE_5) {
if (talkState == TEXT_STATE_EVENT) {
if (Message_ShouldAdvance(play)) {
if (this->unk_26C & 2) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
@ -768,7 +768,7 @@ void func_80B10DAC(EnGb2* this, PlayState* play) {
}
void func_80B10E98(EnGb2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->unk_26C & 2) {
this->unk_26C &= ~2;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
@ -812,7 +812,7 @@ void func_80B11048(EnGb2* this, PlayState* play) {
}
void func_80B110F8(EnGb2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->unk_26C & 2) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;

View File

@ -589,7 +589,7 @@ void func_80BB2520(EnGeg* this, PlayState* play) {
}
void func_80BB26EC(EnGeg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (this->unk_496) {
case 0xD5E:
this->nextCsId = this->csIdList[1];
@ -614,7 +614,7 @@ void func_80BB26EC(EnGeg* this, PlayState* play) {
}
void func_80BB27D4(EnGeg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (this->unk_496) {
case 0xD63:
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
@ -665,7 +665,7 @@ void func_80BB2944(EnGeg* this, PlayState* play) {
this->animIndex = ENGEG_ANIM_6;
EnGeg_ChangeAnim(this, play);
}
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->unk_496 == 0xD67) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
@ -679,7 +679,7 @@ void func_80BB2944(EnGeg* this, PlayState* play) {
}
void func_80BB2A54(EnGeg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->unk_496 == 0xD65) {
CutsceneManager_Stop(this->csId);
this->unk_230 &= ~0x10;

View File

@ -276,7 +276,7 @@ void func_80B35450(EnGg* this, PlayState* play) {
}
void func_80B3556C(EnGg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->animIndex == ENGG_ANIM_4) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;

View File

@ -200,7 +200,7 @@ void func_80B3B05C(EnGg2* this, PlayState* play) {
}
void func_80B3B0A0(EnGg2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
this->unk_2F0 = 0;

View File

@ -154,7 +154,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING);
}
play->msgCtx.bankRupees = HS_GET_BANK_RUPEES();
play->msgCtx.rupeesTotal = HS_GET_BANK_RUPEES();
Message_StartTextbox(play, 0x45A, &this->actor);
this->curTextId = 0x45A;
}
@ -229,7 +229,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) {
case 0x465:
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING);
play->msgCtx.bankRupees = HS_GET_BANK_RUPEES();
play->msgCtx.rupeesTotal = HS_GET_BANK_RUPEES();
Message_StartTextbox(play, 0x45A, &this->actor);
this->curTextId = 0x45A;
break;
@ -305,7 +305,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) {
Message_StartTextbox(play, 0x478, &this->actor);
this->curTextId = 0x478;
} else {
play->msgCtx.bankRupees = HS_GET_BANK_RUPEES();
play->msgCtx.rupeesTotal = HS_GET_BANK_RUPEES();
Message_StartTextbox(play, 0x45A, &this->actor);
this->curTextId = 0x45A;
}
@ -359,17 +359,17 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) {
case 0x452:
if (play->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) {
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.bankRupeesSelected) {
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.rupeesSelected) {
Audio_PlaySfx(NA_SE_SY_ERROR);
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING);
Message_StartTextbox(play, 0x459, &this->actor);
this->curTextId = 0x459;
} else {
Audio_PlaySfx_MessageDecide();
if (play->msgCtx.bankRupeesSelected >= 100) {
if (play->msgCtx.rupeesSelected >= 100) {
Message_StartTextbox(play, 0x455, &this->actor);
this->curTextId = 0x455;
} else if (play->msgCtx.bankRupeesSelected >= 10) {
} else if (play->msgCtx.rupeesSelected >= 10) {
Message_StartTextbox(play, 0x454, &this->actor);
this->curTextId = 0x454;
} else {
@ -382,9 +382,9 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) {
this->isNewAccount = true;
}
Rupees_ChangeBy(-play->msgCtx.bankRupeesSelected);
Rupees_ChangeBy(-play->msgCtx.rupeesSelected);
this->previousBankValue = HS_GET_BANK_RUPEES();
HS_SET_BANK_RUPEES(HS_GET_BANK_RUPEES() + play->msgCtx.bankRupeesSelected);
HS_SET_BANK_RUPEES(HS_GET_BANK_RUPEES() + play->msgCtx.rupeesSelected);
}
} else { // GINKOMAN_CHOICE_NO
Audio_PlaySfx_MessageCancel();
@ -420,23 +420,23 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) {
case 0x471:
if (play->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) {
if ((s32)HS_GET_BANK_RUPEES() < (play->msgCtx.bankRupeesSelected + this->serviceFee)) {
if ((s32)HS_GET_BANK_RUPEES() < (play->msgCtx.rupeesSelected + this->serviceFee)) {
Audio_PlaySfx(NA_SE_SY_ERROR);
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING);
Message_StartTextbox(play, 0x476, &this->actor);
this->curTextId = 0x476;
} else if (CUR_CAPACITY(UPG_WALLET) <
(play->msgCtx.bankRupeesSelected + gSaveContext.save.saveInfo.playerData.rupees)) {
(play->msgCtx.rupeesSelected + gSaveContext.save.saveInfo.playerData.rupees)) {
// check if wallet is big enough
Audio_PlaySfx(NA_SE_SY_ERROR);
Message_StartTextbox(play, 0x475, &this->actor);
this->curTextId = 0x475;
} else {
Audio_PlaySfx_MessageDecide();
if (play->msgCtx.bankRupeesSelected >= 100) {
if (play->msgCtx.rupeesSelected >= 100) {
Message_StartTextbox(play, 0x474, &this->actor);
this->curTextId = 0x474;
} else if (play->msgCtx.bankRupeesSelected >= 10) {
} else if (play->msgCtx.rupeesSelected >= 10) {
Message_StartTextbox(play, 0x473, &this->actor);
this->curTextId = 0x473;
} else {
@ -445,8 +445,8 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) {
}
this->previousBankValue = HS_GET_BANK_RUPEES();
HS_SET_BANK_RUPEES(HS_GET_BANK_RUPEES() - play->msgCtx.bankRupeesSelected - this->serviceFee);
Rupees_ChangeBy(play->msgCtx.bankRupeesSelected);
HS_SET_BANK_RUPEES(HS_GET_BANK_RUPEES() - play->msgCtx.rupeesSelected - this->serviceFee);
Rupees_ChangeBy(play->msgCtx.rupeesSelected);
}
} else {
Audio_PlaySfx_MessageCancel();
@ -464,7 +464,7 @@ void EnGinkoMan_WaitForRupeeCount(EnGinkoMan* this, PlayState* play) {
if (Message_ShouldAdvance(play)) {
switch (this->curTextId) {
case 0x450:
if (play->msgCtx.bankRupeesSelected == 0) {
if (play->msgCtx.rupeesSelected == 0) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING);
Message_StartTextbox(play, 0x457, &this->actor);
this->curTextId = 0x457;
@ -475,7 +475,7 @@ void EnGinkoMan_WaitForRupeeCount(EnGinkoMan* this, PlayState* play) {
break;
case 0x46E:
if (play->msgCtx.bankRupeesSelected == 0) {
if (play->msgCtx.rupeesSelected == 0) {
Message_StartTextbox(play, 0x46F, &this->actor);
this->curTextId = 0x46F;
} else if (gSaveContext.save.isNight == true) {
@ -508,7 +508,7 @@ void EnGinkoMan_Dialogue(EnGinkoMan* this, PlayState* play) {
EnGinkoMan_WaitForDialogueInput(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
EnGinkoMan_DepositDialogue(this, play);
break;
@ -519,7 +519,7 @@ void EnGinkoMan_Dialogue(EnGinkoMan* this, PlayState* play) {
}
break;
case TEXT_STATE_14:
case TEXT_STATE_INPUT_RUPEES:
EnGinkoMan_WaitForRupeeCount(this, play);
break;
@ -609,7 +609,7 @@ void EnGinkoMan_Stamp(EnGinkoMan* this, PlayState* play) {
case 0x469:
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING);
play->msgCtx.bankRupees = HS_GET_BANK_RUPEES();
play->msgCtx.rupeesTotal = HS_GET_BANK_RUPEES();
if ((CURRENT_DAY == 3) && (gSaveContext.save.isNight == true)) {
Message_StartTextbox(play, 0x46C, &this->actor);
this->curTextId = 0x46C;

View File

@ -705,7 +705,7 @@ void func_80B51760(EnGk* this, PlayState* play) {
void func_80B51970(EnGk* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == TEXT_STATE_DONE) || (talkState == TEXT_STATE_5)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_DONE) || (talkState == TEXT_STATE_EVENT)) && Message_ShouldAdvance(play)) {
if ((this->unk_31C == 0xE84) || (this->unk_31C == 0xE99)) {
CutsceneManager_Stop(this->csId);
this->csId = CutsceneManager_GetAdditionalCsId(this->csId);
@ -919,7 +919,7 @@ void func_80B5202C(EnGk* this, PlayState* play) {
}
void func_80B5216C(EnGk* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80B51698;

View File

@ -884,8 +884,8 @@ void func_8094F3D0(EnGm* this, PlayState* play) {
s32 talkState = Message_GetState(&play->msgCtx);
s32 textId = play->msgCtx.currentTextId;
if ((&this->actor == player->talkActor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3)) {
if ((&this->actor == player->talkActor) && ((textId < 0xFF) || (textId > 0x200)) &&
(talkState == TEXT_STATE_FADING) && (this->prevTalkState == TEXT_STATE_FADING)) {
if ((play->state.frames % 3) == 0) {
if (this->unk_3AC == 120.0f) {
this->unk_3AC = 0.0f;

View File

@ -212,13 +212,13 @@ void func_80997E4C(EnGs* this, PlayState* play) {
Message_StartTextbox(play, this->unk_210, &this->actor);
break;
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
break;
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {

View File

@ -230,7 +230,7 @@ void func_80ABB590(EnGuardNuts* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToS(&this->actor.shape.rot.y, yaw, 1, 0xBB8, 0);
}
if (Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) {
this->targetHeadPos.y = 0;
this->targetHeadPos.x = 0;
if ((this->guardTextIndex == 3) && (this->animIndex == GUARD_NUTS_ANIM_WAIT_HEAD_TILT)) {
@ -262,7 +262,7 @@ void func_80ABB590(EnGuardNuts* this, PlayState* play) {
EnGuardNuts_SetupWait(this);
}
}
} else if ((Message_GetState(&play->msgCtx) >= TEXT_STATE_3) && (D_80ABBE20 == 0)) {
} else if ((Message_GetState(&play->msgCtx) >= TEXT_STATE_FADING) && (D_80ABBE20 == 0)) {
if ((this->guardTextIndex == 0) || (this->guardTextIndex == 3) || (this->guardTextIndex >= 7)) {
if (this->timer == 0) {
this->timer = 2;

View File

@ -208,7 +208,7 @@ void func_80BC7068(EnGuruguru* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
} else if (this->unusedTimer == 0) {
this->unusedTimer = 6;
if (Message_GetState(&play->msgCtx) != TEXT_STATE_5) {
if (Message_GetState(&play->msgCtx) != TEXT_STATE_EVENT) {
if (this->unk266 == 0) {
if (this->headZRotTarget != 0) {
this->headZRotTarget = 0;
@ -224,7 +224,7 @@ void func_80BC7068(EnGuruguru* this, PlayState* play) {
}
}
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->headZRotTarget = 0;
if ((this->textIdIndex == 13) || (this->textIdIndex == 14)) {

View File

@ -190,13 +190,13 @@ void EnHgo_SetupDialogueHandler(EnHgo* this) {
void EnHgo_DefaultDialogueHandler(EnHgo* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
case TEXT_STATE_CHOICE:
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
EnHgo_HandlePlayerChoice(this, play);
break;

View File

@ -253,7 +253,7 @@ void func_80BDB59C(EnHiddenNuts* this, PlayState* play) {
this->unk_218 = 30;
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
func_80BDB268(this);
}

View File

@ -443,7 +443,7 @@ void func_80C208D0(EnHintSkb* this, PlayState* play) {
this->unk_3DE = 0;
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_3:
case TEXT_STATE_FADING:
if ((play->gameplayFrames % 2) != 0) {
this->unk_3DE = 1;
}
@ -453,7 +453,7 @@ void func_80C208D0(EnHintSkb* this, PlayState* play) {
func_80C20B88(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
func_80C20C24(this, play);
break;
@ -464,7 +464,7 @@ void func_80C208D0(EnHintSkb* this, PlayState* play) {
break;
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
default:
break;

View File

@ -174,7 +174,7 @@ void func_80953098(EnHs* this, PlayState* play) {
}
void func_80953180(EnHs* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x33F4: // laughing that they are all roosters (!)
case 0x33F6: // Grog regrets not being able to see his chicks reach adult hood

View File

@ -1322,7 +1322,7 @@ s32 func_808F5674(PlayState* play, EnIn* this, s32 arg2) {
break;
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play) && func_808F4414(play, this, arg2)) {
Message_CloseTextbox(play);
ret = true;
@ -1620,8 +1620,8 @@ void func_808F6334(EnIn* this, PlayState* play) {
Matrix_Translate(this->unk4C4, 0.0f, 0.0f, MTXMODE_APPLY);
if ((&this->actor == player->talkActor) &&
((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3)) {
((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) &&
(talkState == TEXT_STATE_FADING) && (this->prevTalkState == TEXT_STATE_FADING)) {
if (!(play->state.frames & 1)) {
this->unk4C0 = (this->unk4C0 != 0.0f) ? 0.0f : 1.0f;
}

View File

@ -233,8 +233,9 @@ void func_80BC1E40(EnJa* this, PlayState* play) {
s32 talkState = Message_GetState(&play->msgCtx);
f32 phi_f0;
if (((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3) && (&this->actor == player->talkActor)) {
if (((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) &&
(talkState == TEXT_STATE_FADING) && (this->prevTalkState == TEXT_STATE_FADING) &&
(&this->actor == player->talkActor)) {
if ((play->state.frames % 2) == 0) {
if (this->unk_348 != 0.0f) {
this->unk_348 = 0.0f;

View File

@ -364,7 +364,7 @@ void EnJg_GoronShrineIdle(EnJg* this, PlayState* play) {
}
void EnJg_GoronShrineTalk(EnJg* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if ((this->textId == 0xDCC) || (this->textId == 0xDDD) || (this->textId == 0xDE0)) {
// There is nothing more to say after these lines, so end the current conversation.
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
@ -431,7 +431,7 @@ void EnJg_AlternateTalkOrWalkInPlace(EnJg* this, PlayState* play) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
}
} else if (this->animIndex == EN_JG_ANIM_SURPRISE_LOOP) {
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
this->flags &= ~FLAG_LOOKING_AT_PLAYER;
@ -486,7 +486,7 @@ void EnJg_Talk(EnJg* this, PlayState* play) {
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
}
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
temp = this->textId;
if ((temp == 0xDB4) || (temp == 0xDB5) || (temp == 0xDC4) || (temp == 0xDC6)) {
// There is nothing more to say after these lines, so end the current conversation.

View File

@ -260,16 +260,16 @@ void func_80C14030(EnJgameTsn* this) {
void func_80C14044(EnJgameTsn* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
break;
case TEXT_STATE_CHOICE:
func_80C14684(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
func_80C147B4(this, play);
break;

View File

@ -544,7 +544,7 @@ void func_80969748(EnJs* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 6, 0x1838, 0x64);
this->actor.shape.rot.y = this->actor.world.rot.y;
if (Message_GetState(&play->msgCtx) == TEXT_STATE_16) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_PAUSE_MENU) {
itemAction = func_80123810(play);
if (itemAction != PLAYER_IA_NONE) {
@ -600,7 +600,7 @@ void func_80969898(EnJs* this, PlayState* play) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x220C:
@ -704,7 +704,7 @@ void func_80969C54(EnJs* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 6, 0x1838, 0x64);
this->actor.shape.rot.y = this->actor.world.rot.y;
if (Message_GetState(&play->msgCtx) == TEXT_STATE_16) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_PAUSE_MENU) {
itemAction = func_80123810(play);
if (itemAction != PLAYER_IA_NONE) {
@ -763,7 +763,7 @@ void func_80969DA4(EnJs* this, PlayState* play) {
}
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x221B:
@ -992,7 +992,7 @@ void func_8096A38C(EnJs* this, PlayState* play) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x2202:

View File

@ -495,7 +495,7 @@ void EnJso_IntroCutscene(EnJso* this, PlayState* play) {
this->subCamAtNext.z = player->actor.world.pos.z;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
Message_ContinueTextbox(play, sTextIds[this->textIndex]);
this->cutsceneTimer = 0;
@ -507,7 +507,7 @@ void EnJso_IntroCutscene(EnJso* this, PlayState* play) {
case EN_JSO_INTRO_CS_STATE_RAISE_ARM_AND_DRAW_RIGHT_SWORD:
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
if (Message_GetState(&play->msgCtx) == TEXT_STATE_10) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_AWAITING_NEXT) {
this->targetRobeRightRot.x = -0x2710;
this->targetRobeRightRot.z = -0x2710;
}
@ -532,7 +532,7 @@ void EnJso_IntroCutscene(EnJso* this, PlayState* play) {
this->subCamAtNext.y = player->actor.world.pos.y + 30.0f;
this->subCamAtNext.z = player->actor.world.pos.z - 40.0f;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->targetRightArmRot.x = this->targetRightArmRot.y = this->targetRightArmRot.z =
this->targetRobeRightRot.x = this->targetRobeRightRot.y = this->targetRobeRightRot.z = 0;
@ -1218,7 +1218,7 @@ void EnJso_TellHint(EnJso* this, PlayState* play) {
return;
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
if (this->textIndex == 2) {
u16 textId = 0x139C; // Hint about using Elegy to climb Stone Tower
@ -1310,7 +1310,7 @@ void EnJso_BurstIntoFlames(EnJso* this, PlayState* play) {
s32 i;
player->actor.freezeTimer = 3;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Player* player2 = GET_PLAYER(play);
Message_CloseTextbox(play);

View File

@ -451,7 +451,7 @@ void EnJso2_UpdateSubCam(EnJso2* this, PlayState* play) {
}
s32 EnJso2_ShouldAdvanceMessage(PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
return true;
}

View File

@ -523,7 +523,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
player->actor.world.pos.z = this->picto.actor.home.pos.z - 30.0f;
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_11);
this->unk_598 = 0;
@ -572,7 +572,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
break;
case 4:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->unk_598 = 0;
this->unk_59C++;
@ -722,7 +722,7 @@ void func_80B868B8(EnKaizoku* this, PlayState* play) {
break;
case 2:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
Player_SetCsActionWithHaltedActors(play, &this->picto.actor, PLAYER_CSACTION_END);
CutsceneManager_Stop(this->csId);
@ -796,7 +796,7 @@ void func_80B86B74(EnKaizoku* this, PlayState* play) {
}
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_18);
Player_SetCsActionWithHaltedActors(play, &this->picto.actor, PLAYER_CSACTION_133);

View File

@ -321,7 +321,7 @@ void EnKakasi_TimeSkipDialogue(EnKakasi* this, PlayState* play) {
// dialogue after skipped time 'did you feel that? went by in an instant'
this->picto.actor.textId = 0x1653;
CLEAR_WEEKEVENTREG(WEEKEVENTREG_83_01);
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
player->stateFlags1 |= PLAYER_STATE1_20;
this->picto.actor.flags |= ACTOR_FLAG_10000;
}
@ -393,7 +393,7 @@ void EnKakasi_SetupDialogue(EnKakasi* this) {
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING);
}
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
this->unkState196 = 1;
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SPIN_REACH_OFFER);
this->actionFunc = EnKakasi_RegularDialogue;
@ -430,7 +430,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
if ((this->talkState == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
if (this->talkState == TEXT_STATE_5) {
if (this->talkState == TEXT_STATE_EVENT) {
// bad song input
if ((this->unkState196 == 2) && (this->picto.actor.textId == 0x1647)) {
Player_SetCsActionWithHaltedActors(play, &this->picto.actor, PLAYER_CSACTION_END);
@ -524,7 +524,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
return;
}
} else {
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
if (play->msgCtx.choiceIndex == 1) {
Audio_PlaySfx_MessageDecide();
@ -573,7 +573,7 @@ void EnKakasi_SetupSongTeach(EnKakasi* this, PlayState* play) {
* before actually teaching
*/
void EnKakasi_OcarinaRemark(EnKakasi* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_DisplayOcarinaStaff(play, OCARINA_ACTION_SCARECROW_SPAWN_RECORDING);
this->unkState1A8 = 0;
if (CutsceneManager_GetCurrentCsId() == CS_ID_GLOBAL_TALK) {
@ -640,7 +640,7 @@ void EnKakasi_TeachingSong(EnKakasi* this, PlayState* play) {
this->subCamId = SUB_CAM_ID_DONE;
this->picto.actor.textId = 0x1647;
this->unkState1A8 = 2;
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING);
this->actionFunc = EnKakasi_RegularDialogue;
@ -672,7 +672,7 @@ void EnKakasi_SetupPostSongLearnDialogue(EnKakasi* this, PlayState* play) {
this->unkCounter1A4 = 0;
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_HOPPING_REGULAR);
this->subCamId = SUB_CAM_ID_DONE;
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
this->unkState1A8 = 1;
this->actionFunc = EnKakasi_PostSongLearnDialogue;
this->subCamFov = 0.0f;
@ -751,7 +751,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
Message_CloseTextbox(play);
if (this->talkState == TEXT_STATE_5) {
if (this->talkState == TEXT_STATE_EVENT) {
this->unk190++;
if (this->unk190 > 5) {
this->unk190 = 5;
@ -783,7 +783,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
}
} else {
this->talkState = TEXT_STATE_5;
this->talkState = TEXT_STATE_EVENT;
if (play->msgCtx.choiceIndex == 1) {
Audio_PlaySfx_MessageDecide();
this->picto.actor.textId = 0x164A;
@ -1120,7 +1120,7 @@ void EnKakasi_IdleRisen(EnKakasi* this, PlayState* play) {
void EnKakasi_RisenDialogue(EnKakasi* this, PlayState* play) {
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 0x3E8, 0);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
EnKakasi_SetupIdleRisen(this);
}

View File

@ -338,7 +338,7 @@ void func_80B26AFC(EnKendoJs* this, PlayState* play) {
func_80B26758(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
func_80B269A4(this, play);
break;
@ -357,9 +357,9 @@ void func_80B26AFC(EnKendoJs* this, PlayState* play) {
}
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
default:
break;
}
@ -538,7 +538,7 @@ void func_80B2714C(EnKendoJs* this) {
void func_80B27188(EnKendoJs* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->unk_288 == 0x2729) {
func_80B26F14(this, play);
} else if (!func_80B26F6C(this, play)) {

View File

@ -486,7 +486,7 @@ void func_80B4163C(EnKgy* this, PlayState* play) {
void func_80B417B8(EnKgy* this, PlayState* play) {
func_80B4163C(this, play);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
func_80B413C8(this);
this->actor.flags &= ~ACTOR_FLAG_TALK;
@ -510,7 +510,7 @@ void func_80B41858(EnKgy* this, PlayState* play) {
void func_80B418C4(EnKgy* this, PlayState* play) {
func_80B4163C(this, play);
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play) &&
(Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play) &&
((play->msgCtx.currentTextId == 0xC4E) || (play->msgCtx.currentTextId == 0xC4F))) {
Message_CloseTextbox(play);
this->actor.textId = 0xC4F;
@ -553,7 +553,7 @@ void func_80B41ACC(EnKgy* this, PlayState* play) {
Player* player = GET_PLAYER(play);
SkelAnime_Update(&this->skelAnime);
if (Message_GetState(&play->msgCtx) == TEXT_STATE_16) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_PAUSE_MENU) {
itemAction = func_80123810(play);
if (itemAction != PLAYER_IA_NONE) {
this->actionFunc = func_80B41E18;
@ -695,7 +695,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
textId = play->msgCtx.currentTextId;
@ -900,7 +900,7 @@ void func_80B425A0(EnKgy* this, PlayState* play) {
void func_80B42660(EnKgy* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
this->actor.focus.pos = this->unk_2A8;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
func_80B413C8(this);
this->actor.flags &= ~ACTOR_FLAG_TALK;
@ -941,7 +941,7 @@ void func_80B427C8(EnKgy* this, PlayState* play) {
}
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
(Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
textId = play->msgCtx.currentTextId;
switch (textId) {
@ -1016,7 +1016,7 @@ void func_80B42A8C(EnKgy* this, PlayState* play) {
}
if ((this->unk_2E4 <= 0) && !(this->unk_29C & 2) && (func_80B40E54(this) == 0) &&
(Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
(Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
textId = play->msgCtx.currentTextId;
switch (textId) {
case 0xC1D:

View File

@ -191,7 +191,7 @@ void EnKujiya_Talk(EnKujiya* this, PlayState* play) {
EnKujiya_HandlePlayerChoice(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
EnKujiya_ChooseNextDialogue(this, play);
break;
@ -201,7 +201,7 @@ void EnKujiya_Talk(EnKujiya* this, PlayState* play) {
}
break;
case TEXT_STATE_17:
case TEXT_STATE_INPUT_LOTTERY_CODE:
if (Message_ShouldAdvance(play)) {
Inventory_SaveLotteryCodeGuess(play);
Message_StartTextbox(play, 0x2B60, &this->actor);

View File

@ -16,7 +16,7 @@ void EnLiftNuts_Destroy(Actor* thisx, PlayState* play);
void EnLiftNuts_Update(Actor* thisx, PlayState* play);
void EnLiftNuts_Draw(Actor* thisx, PlayState* play);
void EnLiftNuts_HandleConversation5(EnLiftNuts* this, PlayState* play);
void EnLiftNuts_HandleConversationEvent(EnLiftNuts* this, PlayState* play);
void EnLiftNuts_SetupIdleHidden(EnLiftNuts* this);
void EnLiftNuts_IdleHidden(EnLiftNuts* this, PlayState* play);
@ -556,8 +556,7 @@ void EnLiftNuts_HandleConversationChoice(EnLiftNuts* this, PlayState* play) {
}
}
// TODO: name based on TEXT_STATE_5
void EnLiftNuts_HandleConversation5(EnLiftNuts* this, PlayState* play) {
void EnLiftNuts_HandleConversationEvent(EnLiftNuts* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (Message_ShouldAdvance(play)) {
@ -697,17 +696,17 @@ void EnLiftNuts_HandleConversation(EnLiftNuts* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
break;
case TEXT_STATE_CHOICE:
EnLiftNuts_HandleConversationChoice(this, play);
break;
case TEXT_STATE_5:
EnLiftNuts_HandleConversation5(this, play);
case TEXT_STATE_EVENT:
EnLiftNuts_HandleConversationEvent(this, play);
break;
case TEXT_STATE_DONE:

View File

@ -303,7 +303,7 @@ void EnLookNuts_SetupSendPlayerToSpawn(EnLookNuts* this) {
void EnLookNuts_SendPlayerToSpawn(EnLookNuts* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
play->nextEntrance = Entrance_CreateFromSpawn(this->spawnIndex);
gSaveContext.nextCutsceneIndex = 0;

View File

@ -664,7 +664,7 @@ void EnMa4_DialogueHandler(EnMa4* this, PlayState* play) {
EnMa4_HandlePlayerChoice(this, play);
break;
case TEXT_STATE_5: // End message block
case TEXT_STATE_EVENT: // End message block
EnMa4_ChooseNextDialogue(this, play);
break;
@ -676,9 +676,9 @@ void EnMa4_DialogueHandler(EnMa4* this, PlayState* play) {
}
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
break;
default:

View File

@ -451,7 +451,7 @@ void EnMaYto_DefaultDialogueHandler(EnMaYto* this, PlayState* play) {
EnMaYto_DefaultHandlePlayerChoice(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
EnMaYto_DefaultChooseNextDialogue(this, play);
break;
@ -463,9 +463,9 @@ void EnMaYto_DefaultDialogueHandler(EnMaYto* this, PlayState* play) {
break;
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
default:
break;
}
@ -585,7 +585,7 @@ void EnMaYto_DinnerDialogueHandler(EnMaYto* this, PlayState* play) {
EnMaYto_DinnerHandlePlayerChoice(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
EnMaYto_DinnerChooseNextDialogue(this, play);
break;
@ -596,9 +596,9 @@ void EnMaYto_DinnerDialogueHandler(EnMaYto* this, PlayState* play) {
break;
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
default:
break;
}
@ -773,7 +773,7 @@ void EnMaYto_SetupBarnDialogueHandler(EnMaYto* this) {
void EnMaYto_BarnDialogueHandler(EnMaYto* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
EnMaYto_BarnChooseNextDialogue(this, play);
break;
@ -785,9 +785,9 @@ void EnMaYto_BarnDialogueHandler(EnMaYto* this, PlayState* play) {
break;
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
case TEXT_STATE_CHOICE:
default:
break;
@ -953,14 +953,14 @@ void EnMaYto_SetupAfterMilkRunDialogueHandler(EnMaYto* this) {
void EnMaYto_AfterMilkRunDialogueHandler(EnMaYto* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
case TEXT_STATE_CHOICE:
case TEXT_STATE_DONE:
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
EnMaYto_AfterMilkRunChooseNextDialogue(this, play);
break;
@ -1110,8 +1110,8 @@ void EnMaYto_SetupPostMilkRunWaitDialogueEnd(EnMaYto* this) {
}
void EnMaYto_PostMilkRunWaitDialogueEnd(EnMaYto* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) || (Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
if (Message_ShouldAdvance(play) && (Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) || (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT)) {
if (Message_ShouldAdvance(play) && (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT)) {
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_WAIT);
Message_CloseTextbox(play);
}

View File

@ -386,7 +386,7 @@ void EnMaYts_SetupDialogueHandler(EnMaYts* this) {
void EnMaYts_DialogueHandler(EnMaYts* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_5: // End message block
case TEXT_STATE_EVENT: // End message block
EnMaYts_ChooseNextDialogue(this, play);
break;
@ -397,9 +397,9 @@ void EnMaYts_DialogueHandler(EnMaYts* this, PlayState* play) {
break;
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
case TEXT_STATE_CHOICE:
default:
break;

View File

@ -257,7 +257,7 @@ void EnMinifrog_ReturnFrogCutscene(EnMinifrog* this, PlayState* play) {
EnMinifrog_TurnToPlayer(this);
EnMinifrog_Jump(this);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
EnMinifrog_SetJumpState(this);
switch (play->msgCtx.currentTextId) {
@ -517,7 +517,7 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, PlayState* play) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
EnMinifrog_SetJumpState(this);
switch (play->msgCtx.currentTextId) {

View File

@ -185,7 +185,7 @@ void func_809596A0(EnMk* this, PlayState* play) {
}
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->actionFunc = func_80959774;
@ -288,7 +288,7 @@ void func_80959A24(EnMk* this, PlayState* play) {
case TEXT_STATE_CLOSING:
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0xFA1:

View File

@ -47,7 +47,7 @@ void EnMm2_Destroy(Actor* thisx, PlayState* play) {
*/
void EnMm2_Reading(EnMm2* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
this->actionFunc = EnMm2_WaitForRead;

View File

@ -337,11 +337,11 @@ void func_80A6F9DC(EnMm3* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
break;
case TEXT_STATE_3:
case TEXT_STATE_FADING:
this->unk_2B0 |= 2;
break;
@ -349,7 +349,7 @@ void func_80A6F9DC(EnMm3* this, PlayState* play) {
func_80A6F3B4(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
func_80A6F5E4(this, play);
break;

View File

@ -692,7 +692,7 @@ void func_80AB61E8(EnMnk* this, PlayState* play) {
this->picto.actor.world.rot.y = this->picto.actor.yawTowardsPlayer;
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.world.rot.y, 2, 0xBB8, 0xC8);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x7D9:
Message_ContinueTextbox(play, 0x7DA);
@ -724,7 +724,7 @@ void func_80AB6304(EnMnk* this, PlayState* play) {
this->picto.actor.world.rot.y = this->picto.actor.yawTowardsPlayer;
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.world.rot.y, 2, 0xBB8, 0xC8);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->flags |= MONKEY_FLAGS_4;
}
@ -740,7 +740,7 @@ void func_80AB6304(EnMnk* this, PlayState* play) {
void func_80AB63CC(EnMnk* this, PlayState* play) {
s32 pad;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->flags |= MONKEY_FLAGS_4;
}
@ -855,7 +855,7 @@ void EnMnk_Monkey_WaitToRunAndWaitAtEachPoint(EnMnk* this, PlayState* play) {
}
void EnMnk_Monkey_TalkAfterRun(EnMnk* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->flags |= MONKEY_FLAGS_4;
Message_CloseTextbox(play);
}
@ -967,7 +967,7 @@ void EnMnk_Monkey_TalkAfterApproach(EnMnk* this, PlayState* play) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x7D0:
@ -1311,7 +1311,7 @@ void EnMnk_MonkeyTiedUp_ReactToWrongInstrument(EnMnk* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
SkelAnime_Update(&this->propSkelAnime);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x8D4:
case 0x8DA:
@ -1376,7 +1376,7 @@ void EnMnk_MonkeyTiedUp_TransitionAfterTalk(EnMnk* this, PlayState* play) {
}
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x8CA:
EnMnk_MonkeyTiedUp_SetAnim(this, MONKEY_TIEDUP_ANIM_SHAKEHEAD);
@ -1613,7 +1613,7 @@ void EnMnk_MonkeyHanging_WaitForTextboxAfterDunk(EnMnk* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
SkelAnime_Update(&this->propSkelAnime);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->flags & MONKEY_FLAGS_800) {
this->flags &= ~MONKEY_FLAGS_800;
CutsceneManager_Stop(this->picto.actor.csId);
@ -1684,7 +1684,7 @@ void EnMnk_MonkeyHanging_Plead(EnMnk* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
SkelAnime_Update(&this->propSkelAnime);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x8E8:
Message_ContinueTextbox(play, 0x8E9);
@ -1874,7 +1874,7 @@ void EnMnk_Monkey_WaitToGuideThroughWoods(EnMnk* this, PlayState* play) {
void EnMnk_Monkey_TalkAfterSaved(EnMnk* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x8E5:
Message_ContinueTextbox(play, 0x8E6);

View File

@ -103,7 +103,7 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
Actor_OfferGetItem(&this->actor, play, GI_MAGIC_BEANS, this->actor.xzDistToPlayer,

View File

@ -413,7 +413,7 @@ void EnMttag_RaceFinish(EnMttag* this, PlayState* play) {
void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) || (talkState == TEXT_STATE_CLOSING)) {
if (((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) || (talkState == TEXT_STATE_CLOSING)) {
if (this->shouldRestartRace) {
play->nextEntrance = ENTRANCE(GORON_RACETRACK, 1);

View File

@ -207,7 +207,7 @@ void EnMuto_SetupDialogue(EnMuto* this, PlayState* play) {
void EnMuto_InDialogue(EnMuto* this, PlayState* play) {
if (!this->isInMayorsRoom) {
this->yawTowardsTarget = this->actor.yawTowardsPlayer;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
if (this->actor.textId == 0x62C) {

View File

@ -414,8 +414,8 @@ void func_80BC05A8(EnNb* this, PlayState* play) {
TextState talkState = Message_GetState(&play->msgCtx);
u16 textId = play->msgCtx.currentTextId;
if ((&this->actor == player->talkActor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3)) {
if ((&this->actor == player->talkActor) && ((textId < 0xFF) || (textId > 0x200)) &&
(talkState == TEXT_STATE_FADING) && (this->prevTalkState == TEXT_STATE_FADING)) {
if ((play->state.frames % 3) == 0) {
if (this->unk_26C == 120.0f) {
this->unk_26C = 0.0f;

View File

@ -102,7 +102,7 @@ void func_80B11F78(EnOnpuman* this, PlayState* play) {
void func_80B1202C(EnOnpuman* this, PlayState* play2) {
PlayState* play = play2;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0x8D4:
this->unk_2A4 |= 1;
@ -141,7 +141,7 @@ void func_80B1202C(EnOnpuman* this, PlayState* play2) {
}
void func_80B1217C(EnOnpuman* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->actionFunc = func_80B121D8;
Message_CloseTextbox(play);
}

View File

@ -884,7 +884,7 @@ void EnOsn_HandleCutscene(EnOsn* this, PlayState* play) {
void EnOsn_Talk(EnOsn* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
if (((talkState == TEXT_STATE_DONE) || (talkState == TEXT_STATE_5)) && Message_ShouldAdvance(play)) {
if (((talkState == TEXT_STATE_DONE) || (talkState == TEXT_STATE_EVENT)) && Message_ShouldAdvance(play)) {
if (this->stateFlags & OSN_STATE_END_CONVERSATION) {
this->stateFlags &= ~OSN_STATE_END_CONVERSATION;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;

View File

@ -196,7 +196,8 @@ void EnOssan_SetupAction(EnOssan* this, EnOssanActionFunc action) {
bool EnOssan_TestItemSelected(PlayState* play) {
MessageContext* msgCtx = &play->msgCtx;
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) || (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_11)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_TWO_CHOICE) ||
(msgCtx->textboxEndType == TEXTBOX_ENDTYPE_THREE_CHOICE)) {
return CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A);
}
return CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) ||
@ -570,7 +571,7 @@ void EnOssan_Hello(EnOssan* this, PlayState* play) {
Player* player = GET_PLAYER(play);
EnOssan_RotateHead(this, play);
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if ((this->animIndex == ANI_ANIM_APOLOGY_LOOP) && (this->actor.params == ENOSSAN_PART_TIME_WORKER)) {
this->animIndex = ANI_ANIM_STANDING_NORMAL_LOOP_2;
SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, ANI_ANIM_STANDING_NORMAL_LOOP_2);
@ -587,7 +588,7 @@ void EnOssan_Hello(EnOssan* this, PlayState* play) {
return;
}
}
if ((talkState == TEXT_STATE_10) && (this->actor.params == ENOSSAN_PART_TIME_WORKER) &&
if ((talkState == TEXT_STATE_AWAITING_NEXT) && (this->actor.params == ENOSSAN_PART_TIME_WORKER) &&
(player->transformation == PLAYER_FORM_ZORA) && Message_ShouldAdvance(play)) {
this->animIndex = ANI_ANIM_APOLOGY_LOOP;
SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, ANI_ANIM_APOLOGY_LOOP);
@ -678,7 +679,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
void EnOssan_TalkToShopkeeper(EnOssan* this, PlayState* play) {
AnimationInfoS* animationInfo = sAnimationInfoList[this->actor.params];
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if ((this->animIndex == ANI_ANIM_APOLOGY_LOOP) && (this->actor.params == ENOSSAN_PART_TIME_WORKER)) {
this->animIndex = ANI_ANIM_STANDING_NORMAL_LOOP_2;
SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, ANI_ANIM_STANDING_NORMAL_LOOP_2);
@ -865,7 +866,7 @@ void EnOssan_BrowseLeftShelf(EnOssan* this, PlayState* play) {
this->drawCursor = 0xFF;
this->stickRightPrompt.isEnabled = true;
EnOssan_UpdateCursorPos(play, this);
if (talkState == TEXT_STATE_5) {
if (talkState == TEXT_STATE_EVENT) {
func_8011552C(play, DO_ACTION_DECIDE);
if (!EnOssan_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
if (this->moveHorizontal) {
@ -923,7 +924,7 @@ void EnOssan_BrowseRightShelf(EnOssan* this, PlayState* play) {
this->drawCursor = 0xFF;
this->stickLeftPrompt.isEnabled = true;
EnOssan_UpdateCursorPos(play, this);
if (talkState == TEXT_STATE_5) {
if (talkState == TEXT_STATE_EVENT) {
func_8011552C(play, DO_ACTION_DECIDE);
if (!EnOssan_HasPlayerSelectedItem(play, this, CONTROLLER1(&play->state))) {
if (this->moveHorizontal != 0) {
@ -1095,7 +1096,7 @@ void EnOssan_SelectItem(EnOssan* this, PlayState* play) {
}
void EnOssan_CannotBuy(EnOssan* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->actionFunc = this->prevActionFunc;
Message_ContinueTextbox(play, this->items[this->cursorIndex]->actor.textId);
}
@ -1104,7 +1105,7 @@ void EnOssan_CannotBuy(EnOssan* this, PlayState* play) {
void EnOssan_CanBuy(EnOssan* this, PlayState* play) {
EnGirlA* item;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
this->shopItemSelectedTween = 0.0f;
EnOssan_ResetItemPosition(this);
item = this->items[this->cursorIndex];
@ -1169,7 +1170,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) {
}
}
}
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
EnOssan_ResetItemPosition(this);
item = this->items[this->cursorIndex];
item->restockFunc(play, item);

View File

@ -683,13 +683,13 @@ void func_80B5CD40(EnOt* this, PlayState* play) {
}
break;
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
break;
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x1069)) {
this->unk_32C |= 4;
@ -814,13 +814,13 @@ void func_80B5D160(EnOt* this, PlayState* play) {
}
break;
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
break;
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {

View File

@ -345,14 +345,14 @@ void func_8095AD54(EnOwl* this, PlayState* play) {
}
void func_8095AE00(EnOwl* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_ContinueTextbox(play, 0x7D2);
this->actionFunc = func_8095AD54;
}
}
void func_8095AE60(EnOwl* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_ContinueTextbox(play, 0x7D1);
this->actionFunc = func_8095AE00;
}
@ -368,7 +368,7 @@ void func_8095AEC0(EnOwl* this, PlayState* play) {
void func_8095AF2C(EnOwl* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
if (play->msgCtx.currentTextId == 0xBFE) {
func_8095ACEC(this);
@ -663,7 +663,7 @@ void func_8095BA84(EnOwl* this, PlayState* play) {
}
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
switch (play->msgCtx.currentTextId) {
case 0xBEA:

View File

@ -648,13 +648,13 @@ void func_80BD9A9C(EnPamera* this) {
void EnPamera_HandleDialogue(EnPamera* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
case TEXT_STATE_CHOICE:
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
func_80BD9B4C(this, play);
break;

View File

@ -1140,8 +1140,8 @@ void func_80AF8C68(EnPm* this, PlayState* play) {
s32 talkState = Message_GetState(&play->msgCtx);
u16 textId = play->msgCtx.currentTextId;
if ((player->talkActor == &this->actor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
(this->prevTalkState == TEXT_STATE_3)) {
if ((player->talkActor == &this->actor) && ((textId < 0xFF) || (textId > 0x200)) &&
(talkState == TEXT_STATE_FADING) && (this->prevTalkState == TEXT_STATE_FADING)) {
if ((play->state.frames % 3) == 0) {
if (this->unk_360 == 120.0f) {
this->unk_360 = 0.0f;

View File

@ -218,9 +218,9 @@ s32 EnPst_ChooseBehaviour(Actor* thisx, PlayState* play) {
case POSTBOX_BEHAVIOUR_WAIT_FOR_ITEM:
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_CHOICE:
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
case TEXT_STATE_16:
case TEXT_STATE_PAUSE_MENU:
itemAction = func_80123810(play);
scriptBranch = 0;
if ((itemAction == PLAYER_IA_LETTER_TO_KAFEI) || (itemAction == PLAYER_IA_LETTER_MAMA)) {

View File

@ -533,11 +533,11 @@ void func_80B717E0(EnRailSkb* this, PlayState* play) {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
break;
case TEXT_STATE_3:
case TEXT_STATE_FADING:
if ((play->gameplayFrames % 2) != 0) {
this->unk_3FA = 1;
}
@ -547,7 +547,7 @@ void func_80B717E0(EnRailSkb* this, PlayState* play) {
func_80B72100(this, play);
break;
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
func_80B71F3C(this, play);
break;

View File

@ -975,7 +975,7 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, PlayState* play) {
}
} else {
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_5:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play)) {
Message_StartTextbox(play, 0x13B3, &this->actor);
this->textId = 0x13B3;
@ -991,9 +991,9 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, PlayState* play) {
break;
case TEXT_STATE_NONE:
case TEXT_STATE_1:
case TEXT_STATE_NEXT:
case TEXT_STATE_CLOSING:
case TEXT_STATE_3:
case TEXT_STATE_FADING:
case TEXT_STATE_CHOICE:
default:
break;

View File

@ -147,7 +147,7 @@ void EnRecepgirl_Talk(EnRecepgirl* this, PlayState* play) {
if (talkState == TEXT_STATE_CLOSING) {
this->actor.textId = 0x2ADC; // hear directions again?
EnRecepgirl_SetupWait(this);
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
} else if ((talkState == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
if (this->actor.textId == 0x2AD9) {
Flags_SetSwitch(play, ENRECEPGIRL_GET_SWITCH_FLAG(&this->actor));
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 10.0f);

Some files were not shown because too many files have changed in this diff Show More