Skip to content

MM: Add text-to-speech (TTS)#6835

Merged
sev- merged 1 commit intoscummvm:masterfrom
ellm135:mm-tts
Aug 10, 2025
Merged

MM: Add text-to-speech (TTS)#6835
sev- merged 1 commit intoscummvm:masterfrom
ellm135:mm-tts

Conversation

@ellm135
Copy link
Contributor

@ellm135 ellm135 commented Jul 27, 2025

Adds a toggle for text-to-speech to the game options.
Adds text-to-speech for the following:

  • Main menu text and buttons
  • Credits
  • Character info sheet
  • Quick reference chart
  • Location text, options, and buttons
  • Character creation
  • Party screen
  • Items screen
  • Quests screen
  • Text input
  • Spells menus
  • Control panel
  • Combat menus (enemy list and quick fighting options)
  • Info screen
  • Notifications
  • Prompts
  • Map

Currently only tested with Xeen games. Only English, Russian, and Spanish translations have been tested.

@sev- sev- added the GSoC Part of a Google Summer of Code project label Jul 27, 2025
Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to review, but quickly faced with abundant amount of added magic numbers. Is there a way to improve how we handle these indices, so it is clearer to the developers what is going on?

r.translate(0, 25);
} else {
addButton(Common::Rect(), Common::KEYCODE_INVALID);
addButton(Common::Rect(), Common::KEYCODE_INVALID, nullptr, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a huge fan of magic numbers like this. Is there a way and sense in general, of putting these indexes to an enum?

addButton(Common::Rect(285, 75, 309, 95), Res.KeyConstants.DialogsCharInfo.KEY_EXCHANGE, &_iconSprites);

addButton(Common::Rect(285, 107, 309, 127), Common::KEYCODE_ESCAPE, &_iconSprites);
addButton(Common::Rect(10, 24, 34, 44), 1001, &_iconSprites, 4);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code snippet (and other like this) are very clearly show the probem with these magic numbers. Why it is 4 and not, say, 28? If there would be some kind of an enum, that would make it less error-prone.

@sev-
Copy link
Member

sev- commented Aug 10, 2025

Thank you!

@sev- sev- merged commit ebe27c7 into scummvm:master Aug 10, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Part of a Google Summer of Code project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants