Alchemy
Loading...
Searching...
No Matches

messages.c File Reference

Messages shown at an actor, and the speaker's voice. More...

Go to the source code of this file.

Data Structures

struct  WorkPointers
 The work slots from the window work's onward, seen as the window work and, twelve slots on, the event work in slot 27. More...

Functions

struct UiWindow * UiText_OpenMessageAtObject (s32 actor, s32 unused)
 The event command "open message": opens the event's current message in a speech window next to the speaking actor, with the speaker's portrait beside it when it has one, and moves on to the next message.
void FieldEvent_ShowMessageAndWait (s32 actor, s32 flags)
 The event command "show message": opens the current message at actor (UiText_OpenMessageAtObject) and waits until it has been read.
void BattlePres_RunActionThenWaitIfModeZero (s32 actor, s32 flags, s32 wait)
 The event command "show message and wait": shows the message, then waits wait frames.
s32 FieldEvent_AskYesNoAndShowResponse (s32 actor, s32 flags)
 The event command "ask yes or no": opens the question at actor, lets the leader answer, then shows the next message for yes or the one after it for no.
void BattleEventRuntime_EmptyCallback (void)
void Event_ShowSpeakerMessage (s32 speaker)
 A speaker-message entry point retained by its overlay veneer, with no current scene caller.
void ObjectTable_CallRefreshHook (s32 unused0, s32 unused1, s32 x, s32 y)
 Retained by its overlay veneer; no current caller establishes the coordinates forwarded to Event_ShowMessageAtPosition.
void Event_ShowMessageAtPosition (s32 unused0, s32 unused1, s32 x, s32 y)
 A retained coordinate-message entry point: waits for the message and advances the event's message index.
void ObjectTable_RunIfActive (s32 actor)
 Closes the portrait of an actor's sprite, if it has one.
void Battle_ShowPairedUnitWorkAndWait (s32 first, s32 firstX, s32 firstY, s32 firstPortraitX, s32 firstPortraitY, s32 second, s32 secondX, s32 secondY, s32 secondPortraitX, s32 secondPortraitY)
 The event command "show two messages and wait": two actors speak at once, each message at its own (x, y) with its portrait at (portraitX, portraitY), all in tiles.
void Ui_SetMessageVoiceFromActor (s32 actor)
 Sets the voice of the messages that follow to that of actor's sprite, at the rate the message speed option picks (gUi_RenderResultValues).

Detailed Description

Messages shown at an actor, and the speaker's voice.

Part of psynergy_effects.c, compiled only through it.

Definition in file messages.c.

Function Documentation

◆ UiText_OpenMessageAtObject()

struct UiWindow * UiText_OpenMessageAtObject ( s32 actor,
s32 unused )

The event command "open message": opens the event's current message in a speech window next to the speaking actor, with the speaker's portrait beside it when it has one, and moves on to the next message.

The low 12 bits of actor are the speaker (0 to 7, a party member, speaks from the leader); its high bits place the windows: 0x1000 portrait on the left, 0x2000 on the right, 0x4000 message above the speaker, 0x8000 never above. Returns the message window.

Definition at line 24 of file messages.c.

Referenced by FieldEvent_AskYesNoAndShowResponse(), FieldEvent_ShowMessageAndWait(), SetSail(), SolSanctumStatue_ExplainStatuePuzzle(), and UiText_OpenMessageAtObject().

◆ FieldEvent_ShowMessageAndWait()

void FieldEvent_ShowMessageAndWait ( s32 actor,
s32 flags )

The event command "show message": opens the current message at actor (UiText_OpenMessageAtObject) and waits until it has been read.

The message closes by itself after 600 frames, or at once while Select, L, R and A are all held.

Definition at line 248 of file messages.c.

Referenced by BattlePres_RunActionThenWaitIfModeZero(), Field_RunEventAction(), Field_UseItem(), FieldEvent_AskYesNoAndShowResponse(), FieldEvent_ShowMessageAndWait(), Scene_RunRaisedEvent(), Scene_RunTouchOrExit(), and Scene_TalkToActor().

◆ BattlePres_RunActionThenWaitIfModeZero()

void BattlePres_RunActionThenWaitIfModeZero ( s32 actor,
s32 flags,
s32 wait )

The event command "show message and wait": shows the message, then waits wait frames.

Definition at line 283 of file messages.c.

Referenced by BattlePres_RunActionThenWaitIfModeZero(), and SolSanctumElementalStarRoom_DemandElementalStars().

◆ FieldEvent_AskYesNoAndShowResponse()

s32 FieldEvent_AskYesNoAndShowResponse ( s32 actor,
s32 flags )

The event command "ask yes or no": opens the question at actor, lets the leader answer, then shows the next message for yes or the one after it for no.

Returns 0 for yes, 1 for no.

Definition at line 291 of file messages.c.

Referenced by FieldEvent_AskYesNoAndShowResponse().

◆ BattleEventRuntime_EmptyCallback()

void BattleEventRuntime_EmptyCallback ( void )

Definition at line 311 of file messages.c.

Referenced by BattleEventRuntime_EmptyCallback().

◆ Event_ShowSpeakerMessage()

void Event_ShowSpeakerMessage ( s32 speaker)

A speaker-message entry point retained by its overlay veneer, with no current scene caller.

Records the speaker, waits for the message unless fast-forwarding, and advances the message index. XXX: this and Event_ShowMessageAtPosition apply a 32-unit offset and 312/220 limits before calling a window service that takes tiles. A caller establishing the intended position would settle its units and conversion.

Definition at line 319 of file messages.c.

Referenced by Event_ShowSpeakerMessage().

◆ ObjectTable_CallRefreshHook()

void ObjectTable_CallRefreshHook ( s32 unused0,
s32 unused1,
s32 x,
s32 y )

Retained by its overlay veneer; no current caller establishes the coordinates forwarded to Event_ShowMessageAtPosition.

Definition at line 392 of file messages.c.

Referenced by ObjectTable_CallRefreshHook().

◆ Event_ShowMessageAtPosition()

void Event_ShowMessageAtPosition ( s32 unused0,
s32 unused1,
s32 x,
s32 y )

A retained coordinate-message entry point: waits for the message and advances the event's message index.

Its placement units are unresolved, as in Event_ShowSpeakerMessage.

Definition at line 399 of file messages.c.

Referenced by Event_ShowMessageAtPosition(), and ObjectTable_CallRefreshHook().

◆ ObjectTable_RunIfActive()

void ObjectTable_RunIfActive ( s32 actor)

Closes the portrait of an actor's sprite, if it has one.

Definition at line 425 of file messages.c.

Referenced by ObjectTable_RunIfActive().

◆ Battle_ShowPairedUnitWorkAndWait()

void Battle_ShowPairedUnitWorkAndWait ( s32 first,
s32 firstX,
s32 firstY,
s32 firstPortraitX,
s32 firstPortraitY,
s32 second,
s32 secondX,
s32 secondY,
s32 secondPortraitX,
s32 secondPortraitY )

The event command "show two messages and wait": two actors speak at once, each message at its own (x, y) with its portrait at (portraitX, portraitY), all in tiles.

Waits for A, B, L or R, then closes both.

Definition at line 436 of file messages.c.

Referenced by Battle_ShowPairedUnitWorkAndWait().

◆ Ui_SetMessageVoiceFromActor()

void Ui_SetMessageVoiceFromActor ( s32 actor)

Sets the voice of the messages that follow to that of actor's sprite, at the rate the message speed option picks (gUi_RenderResultValues).

With 0x80000000 the messages are silent.

Definition at line 483 of file messages.c.

Referenced by Event_DoraWakesIsaac(), Kalay_WatchTourGroupDeparture(), TolbiShipDeck_MonsterLandsOnDeck(), TolbiShipDeck_MonstersAttackCrew(), TolbiShipDeck_MonstersBoard(), TolbiShipInteriors_ReportMonstersBelowdecks(), TolbiShipInteriors_TurnBackFromStairs(), and Ui_SetMessageVoiceFromActor().