Skip to content

Commit

Permalink
Voice: Fix wrong ASK opcode initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
julianxhokaxhiu committed Jan 9, 2023
1 parent 340bbf7 commit d07396f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Renderer: Fixed graphical glitch happening in battle when 3d models rendered in front of UI ( https://github.com/julianxhokaxhiu/FFNx/issues/131 )
- Voice: Add play voice for enemy actions during BATTLE mode ( https://github.com/julianxhokaxhiu/FFNx/pull/502 )
- Voice: Fix worldmap message opcode wrong dialog id
- Voice: Fix wrong ASK opcode initialization
- Widescreen: Allow the buster sword image on new game screen to support 16:9 ratio ( https://github.com/julianxhokaxhiu/FFNx/pull/506 )

## FF8
Expand Down
8 changes: 2 additions & 6 deletions src/voice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ int opcode_voice_parse_options(uint8_t window_id, uint8_t dialog_id, uint8_t fir

int opcode_voice_ask(int unk)
{
int ret = opcode_old_ask(unk);

byte window_id = get_field_parameter<byte>(1);
byte dialog_id = get_field_parameter<byte>(2);
byte message_current_opcode = get_dialog_opcode(window_id);
Expand Down Expand Up @@ -427,7 +425,7 @@ int opcode_voice_ask(int unk)
current_opcode_message_status[window_id].message_last_opcode = message_current_opcode;
current_opcode_message_status[window_id].message_last_option = opcode_ask_current_option;

return ret;
return opcode_old_ask(unk);
}

// -- WORLDMAP --
Expand Down Expand Up @@ -473,8 +471,6 @@ int opcode_wm_message(uint8_t window_id, uint8_t dialog_id) {
}

int opcode_wm_ask(uint8_t window_id, uint8_t dialog_id, uint8_t first_question_id, uint8_t last_question_id, WORD *current_question_id) {
int ret = opcode_wm_old_ask(window_id, dialog_id, first_question_id, last_question_id, current_question_id);

byte message_current_opcode = get_dialog_opcode(window_id);

bool _is_dialog_opening = is_dialog_opening(message_current_opcode);
Expand Down Expand Up @@ -509,7 +505,7 @@ int opcode_wm_ask(uint8_t window_id, uint8_t dialog_id, uint8_t first_question_i
current_opcode_message_status[window_id].message_last_opcode = message_current_opcode;
current_opcode_message_status[window_id].message_last_option = *current_question_id;

return ret;
return opcode_wm_old_ask(window_id, dialog_id, first_question_id, last_question_id, current_question_id);
}

// -- BATTLE --
Expand Down

0 comments on commit d07396f

Please sign in to comment.