Skip to content

Commit

Permalink
GameHacks: Add toggle for Voice auto-text feature
Browse files Browse the repository at this point in the history
  • Loading branch information
julianxhokaxhiu committed Mar 6, 2023
1 parent 827b939 commit 8dfee46
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Common: Allow to skip the FFNx logo on button press
- Common: Improve texture upload time by reducing allocations for color conversion
- GameHacks: Add toggle for Voice auto-text feature ( see https://github.com/julianxhokaxhiu/FFNx/blob/master/docs/shortcuts.md#voice-auto-text )
- Voice: Fix track master volume inheritance when overriding via config

## FF7
Expand Down
8 changes: 8 additions & 0 deletions docs/shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,11 @@ This cheat will allow you to resume the music playback while battle is on pause.
Shortcuts:

- Keyboard Shortcut: `CTRL + M`

### Voice Auto-Text

This cheat will allow you to toggle the voice auto text feature while playing the game. By pressing the key combination you will be able to toggle the auto advance of text boxes as voice line finishes to play.

Shortcuts:

- Keyboard Shortcut: `CTRL + T`
12 changes: 12 additions & 0 deletions src/gamehacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ void GameHacks::toggleMusicOnBattlePause()
}
}

void GameHacks::toggleAutoText()
{
enable_voice_auto_text = !enable_voice_auto_text;

show_popup_msg(TEXTCOLOR_LIGHT_BLUE, "Voice auto text mode: %s", enable_voice_auto_text ? "ENABLED" : "DISABLED");

holdInput();
}

void GameHacks::skipMovies()
{
if (!ff8)
Expand Down Expand Up @@ -165,6 +174,9 @@ void GameHacks::processKeyboardInput(UINT msg, WPARAM wParam, LPARAM lParam)
case 'S':
skipMovies();
break;
case 'T':
toggleAutoText();
break;
case VK_UP:
increaseSpeedhack();
break;
Expand Down
3 changes: 3 additions & 0 deletions src/gamehacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class GameHacks
void holdInput();
void drawnInput();

// VOICE AUTO TEXT
void toggleAutoText();

public:
void init();

Expand Down

0 comments on commit 8dfee46

Please sign in to comment.