65208 Commits

Author SHA1 Message Date
aryanrawlani28
219646378c SCUMM: GUI: U32: Remove redundant code
- Translations are removed from the md5 warning message because logMessage doesn't support unicode.
2020-08-30 14:43:41 +02:00
aryanrawlani28
c855f6259a GUI: U32: Fix incorrect code for redirecting constructors.
- The changes previously were creating a temporary object whose lifetime was limited to that line.
- Additionally, use Strings instead of const char* in MessageDialogs.
2020-08-30 14:43:41 +02:00
aryanrawlani28
277d7dc64c MOHAWK: I18N: Move new translation filename to root dir POTFILES of Mohawk 2020-08-30 14:43:41 +02:00
aryanrawlani28
579b370183 ILLUSIONS: Fix conversion to string 2020-08-30 14:43:41 +02:00
aryanrawlani28
d41d0e9b22 JANITORIAL: Fix formatting issues 2020-08-30 14:43:41 +02:00
aryanrawlani28
b709e2f40c GLK: SCOTT: Improve usage of translations when looking. 2020-08-30 14:43:41 +02:00
aryanrawlani28
d2da98d3b0 GLK: More usage of translations
- Add helpers in Advsys, Comprehend & ZCode to match functionality provided for strings.
2020-08-30 14:43:41 +02:00
aryanrawlani28
dd31b45be3 GLK: SCOTT: Fix unsafe memory usage 2020-08-30 14:43:41 +02:00
aryanrawlani28
840f08d537 GUI: U32: Code cleanup & misc fixes
- Fix a translation for scumm subtitle settings dialogs.
2020-08-30 14:43:41 +02:00
aryanrawlani28
edec55cf64 GLK: SCOTT: Add new helpers to use translated strings. 2020-08-30 14:43:41 +02:00
aryanrawlani28
bc8ead4a7c AGOS: GUI: U32: Remove redundant code 2020-08-30 14:43:41 +02:00
aryanrawlani28
6fa5d7ee2f CRYOMNI3D: Assign char outside if condition to avoid ambiguity with new contains utility 2020-08-30 14:43:41 +02:00
Thierry Crozat
dc977ffd85 GLK: Avoid back and forth conversion between UTF-32 and UTF-8 for TTS 2020-08-30 14:43:41 +02:00
aryanrawlani28
95aae12527 GUI: ULTIMA: Use u32 strings for keymap description 2020-08-30 14:43:41 +02:00
aryanrawlani28
12e4f871a3 GUI: U32: Improve u32 in all engine subsystems
- Common: add wordWrap function to ustr.cpp
- Bladerunner: Explicitly state we have a U32String in subs (same as Subtitles::loadOuttakeSubsText)
- Don't use translations for engine specific "put strings", because they might not support.
- SCI: Use const references for showScummVMDialog
- SCUMM:
-- Don't use translation in md5 warning. left comments with the translated version.
-- Remove some redundant headers in help.cpp
-- Don't use translation in handleSaveload when printing to console
-- Also, display success transaction correctly via u32::format
- TESTBED: Use fake constructor when setting label of button
- SKY: Correctly use translation when using SaveStateDescription
- ULTIMA: Don't use translations when display_string
- ENGINES:
-- GenerateUnknownGameReport correctly, with proper translations.
-- There was an error, where a function had been declared twice, in a header file. Correct this.
2020-08-30 14:43:41 +02:00
aryanrawlani28
7a19c7ffee I18N: Update POTFILES
In the previous commit, some new places where translations could be used were found. This commit adds the relevant files to POTFILES.
2020-08-30 14:43:41 +02:00
aryanrawlani28
4b6976c558 GUI: U32: Reduce number of files changed and fixes
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28
ffc89d1a2b GUI: U32: SCUMM: Make variables in help to use U32
Make titles and other translation dependent variables to use u32
2020-08-30 14:43:41 +02:00
aryanrawlani28
bd19eaa5bf GUI: U32: More code improvements in engines and misc fixes
- Xeen's GUIError now takes in U32String
- Scumm's ValueDisplayDialog takes in U32
- Mohawk's InfoDialog & PauseDialog takes in U32
- Mohawk - in riven.cpp, Some assignment fixes
- Backends -in sdl.cpp, Remove incorrect conversion from iso8859 when setting text in clipboard
- Graphics - Add u32 strings instead of decoding each piece in format
2020-08-30 14:43:41 +02:00
aryanrawlani28
d12c6c4338 GUI: U32: Code cleanup
- Remove extra parantheses leftover from temp code
- SaveLoadDialog - do not encode when setting labels
- Remove mapping variable from ThemeEngine::loadScalableFont (and use default 0)
- Remove incorrect u32 constructor wrapper from confman.set in eventrecorder.cpp
2020-08-30 14:43:41 +02:00
aryanrawlani28
185fb72783 GUI: U32: Improve U32 code
- Revert accidentally put translations in mt32.cpp
- Use U32::format in some places earlier missed
- Add %u and %i for u32::format
- Add support for GUIErrorMsgFormat to use u32::format internally
- Use the above whereever needed
- Improve linux tts by removing redundant code
- Some places I had changed nullptr -> "". Revert this
2020-08-30 14:43:41 +02:00
aryanrawlani28
a9bfe35216 GUI: U32: More issue fixes and general improvements
- Use the fake constructor for message dialog less often
- solve errors regarding comparision between string and u32string in midi
- solve errors in testbed/speech related to ttsMan->say
- fix unsigned comparision warning in tab.cpp
- fix issue with static strings and translations in sdl-graphics
2020-08-30 14:43:41 +02:00
aryanrawlani28
4506bcd9f3 GUI: U32: Fix compilation errors
After rebasing to get even with master, some compilation errors occured. This commit fixes that.
2020-08-30 14:43:41 +02:00
aryanrawlani28
e22b32abfe GUI: U32: Use Common::U32String::format where necessary and GUIError to u32
- Where necessary as in, where translated messages are used.
- GUIErrorMessage now takes in U32String
- error messages across some engines use U32Strings. they are changed because they show a message dialog.
2020-08-30 14:43:41 +02:00
aryanrawlani28
ef7ec444d3 GUI: U32: Enable u32 for tts (Windows)
They always take in U32 strings now.

- Revert tts descriptions to string, they don't use translations, so better to keep it as strings.
- Make read() take in const U32 references.
2020-08-30 14:43:41 +02:00
aryanrawlani28
d4d5b8906e GUI: U32: Begin making TTS take in U32Strings for saying
Only for strings without an explicit action. The first level takes in a u32 string, encodes it, and passes it along further with the default action

- For gui widgets, the strings are passed in as native u32 strings.
- For everything else, they are being converted to u32 by Common::convertToU32... and then being passed along
2020-08-30 14:43:41 +02:00
aryanrawlani28
bed05ea134 GUI: U32: Fix compilation errors across entire project
After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28
96912f4adb GUI: U32: Rename some references of strings to use U32() & not helper method 2020-08-30 14:43:41 +02:00
aryanrawlani28
f800ca4ada GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
2020-08-30 14:43:41 +02:00
aryanrawlani28
5f2af6b93e GUI: U32: Add u32 support to Editables and Dialogs
- Editable widgets
- Lists
- SaveLoad Dialogs
- Browser Dialogs
2020-08-30 14:43:41 +02:00
aryanrawlani28
aafade4507 GUI: U32: Shift most widgets to draw with u32
- ButtonWidgets (Button, Radio, Checkbox, dropdown)
- StaticTextWidgets
- PopUpWidgets
- Tabs
- Add a temporary overloaded drawDDText function to make other widgets draw normally
2020-08-30 14:43:41 +02:00
Filippos Karapetis
f8a36ec93a SCI: Promote PQ:SWAT to testing 2020-08-30 15:27:15 +03:00
Filippos Karapetis
2f6d499349 ZVISION: Use the liberation fonts by default
These do not exhibit some of the glitches seen with the GNU FreeType
fonts in zvision games
2020-08-30 15:27:15 +03:00
Filippos Karapetis
2e65886f65 STARTREK: Fix infinite loop while reading some RDF files 2020-08-30 13:37:20 +03:00
Filippos Karapetis
ef6f8c008f SCI: Ignore digital channel data in midiMixChannels(), and remove some GOTOs
These are found at the end of SCI01/SCI1 SND files with sound effects
2020-08-30 13:37:19 +03:00
Filippos Karapetis
648d669c2d SCI: Properly handle alternative MIDI sound effects for SCI01/CI1 games
SCI01/SCI1 games have sound effects in SND files, which contain both
digital sounds and their alternative MIDI counterparts. Allow the user
to listen to the alternative MIDI counterparts by unchecking the
"Prefer digital sound effects" checkbox, like with other SCI versions.
Fixes bug #11587
2020-08-30 13:37:19 +03:00
Thierry Crozat
4cb45cf1aa GLK: HUGO: Fix compilation 2020-08-30 03:00:14 +01:00
Paul Gilbert
44dd967a7e GLK: HUGO: Fix Tales of the Travelling Swordsman crash
Vanilla hugo limits spaces printed in the GO_TO code block
to the fixed width of a line. But since Glk doesn't have a
predetermined width, when the game specified a width of 7fffh,
it crashed trying to buffer out a string that actual length.
This new fix simply limits spaces to at most 20.
2020-08-29 18:02:15 -07:00
Paul Gilbert
b513242292 MADS: Avoid potential crash for reading beyond end of sound data 2020-08-29 15:06:00 -07:00
athrxx
7b66f1191d KYRA: whitespace cleanup 2020-08-29 23:50:29 +02:00
Paul Gilbert
96c860c5bd GLK: HUGO: Fix hang closing ScummVM window 2020-08-29 14:23:57 -07:00
Paul Gilbert
ac7b1e326d GLK: HUGO: Properly fix display images
The resource file format Hugo uses has named entries.
Because of this, the original Glk code added to Hugo
does a whole mess of reading in a picture, then copying
it to a dummy pic file with a dummy number, just so a
call to glk_image_draw could detect it.

Since this isn't the first time I've had to deal with
named resources, it ended up being cleaner to add a new
variation of glk_image_draw and glk_image_draw_scaled
that can take in a string image parameter. That way, I
was able to set up an archive class to represent the
resource file, and pass the resource name directly
without worrying about dummy picture numbers & files
2020-08-29 13:59:52 -07:00
Thierry Crozat
cca6090454 ADL: Enable virtual keyboard when the engine is running 2020-08-29 16:31:37 +01:00
Thierry Crozat
d25fb352d8 GLK: Enable virtual keyboard when the engine is running 2020-08-29 16:31:37 +01:00
Thierry Crozat
96c977cd56 ENGINES: Reset virtual keyboard state when showing and hiding GMM 2020-08-29 16:31:37 +01:00
Eugene Sandulenko
8c01b5c675 ULTIMA: ULTIMA1: Added virtual destructor 2020-08-29 17:22:24 +02:00
Eugene Sandulenko
343bfe42d8 GLK: TADS2: Remove no-op check. CID 1401577
min is uint16, and MCSPAGETAB is 256, thus, min >> 8 will be always < 256
2020-08-29 17:22:24 +02:00
Eugene Sandulenko
1a998cddad JANITORIAL: Whitespace fixes 2020-08-29 17:22:24 +02:00
Eugene Sandulenko
d01ac29dd2 DM: Properly set mapX and mapY. CID #1362609 2020-08-29 17:22:24 +02:00
Eugene Sandulenko
3d2f4e78b5 KINGDOM: Initialize variable 2020-08-29 17:22:24 +02:00