Skip to content

Commit

Permalink
FF7: Fix worldmap message voice acting
Browse files Browse the repository at this point in the history
Dialog id was not inherited correctly at the moment the voice playback was starting.
Inherit such id when the dialog is initialized and use it through its entire lifecycle.
  • Loading branch information
julianxhokaxhiu committed Dec 28, 2022
1 parent a1ec862 commit 1946eeb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/voice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,12 @@ int opcode_wm_message(uint8_t window_id, uint8_t dialog_id) {
if (_is_dialog_opening)
{
begin_voice(window_id);
current_opcode_message_status[window_id].message_dialog_id = dialog_id;
}
else if (_is_dialog_starting || _is_dialog_paging)
{
if (trace_all || trace_opcodes) ffnx_trace("wm_opcode[MESSAGE]: window_id=%u,dialog_id=%u,paging_id=%u\n", window_id, dialog_id, current_opcode_message_status[window_id].message_page_count);
current_opcode_message_status[window_id].is_voice_acting = play_voice("_world", window_id, dialog_id, current_opcode_message_status[window_id].message_page_count);
if (trace_all || trace_opcodes) ffnx_trace("wm_opcode[MESSAGE]: window_id=%u,dialog_id=%u,paging_id=%u\n", window_id, current_opcode_message_status[window_id].message_dialog_id, current_opcode_message_status[window_id].message_page_count);
current_opcode_message_status[window_id].is_voice_acting = play_voice("_world", window_id, current_opcode_message_status[window_id].message_dialog_id, current_opcode_message_status[window_id].message_page_count);
}
else if (_is_dialog_closing)
{
Expand Down

0 comments on commit 1946eeb

Please sign in to comment.