Commit graph

162 commits

Author SHA1 Message Date
Andrea Boscarino
f731cfd648
SCUMM: DiMUSE: New Digital iMUSE Engine (#3368)
SCUMM: DiMUSE: Add new implementation of the engine
2021-11-16 00:05:18 +01:00
Orgad Shaneh
ed5489929c SCUMM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
trembyle
c740f96f63 COMMON: Normalize and document language maintenance
* Add documentation to add or maintain language values
* Fix and reorder existing entries to match ISO standards
2021-11-11 12:06:15 +01:00
Ben Castricum
d4cef0e3ad SCUMM: Use correct variable for current room 2021-10-24 19:49:19 +03:00
Ben Castricum
c8dadd413d SCUMM: SAMNMAX - Add missing actor animation in German floppy version too 2021-10-24 16:14:05 +03:00
Ben Castricum
dc5a8de28a SCUMM: SAMNMAX - Add Missing actor animation in German CD version, fixes bug #12249
for details, see bugreport.

I tested all the other CD versions from GOG as well, but the German version
seems to be to only one missing the animation.
2021-10-24 00:01:24 +03:00
athrxx
48fb15812d SCUMM: (DIG) - fix workaround for Russian version so as not to write outside the expected scope
I experienced weird string modifications while trying to improve the text code. Turns out that this workaround will kick in even for 0 length strings and will lead to values being written to "negative" (before the original dst ptr argument) offsets.
2021-09-10 18:21:41 +02:00
athrxx
c1bc192abf SCUMM: (COMI) - fix vertical position of object descriptions
This is just a small hack to address bug no. 12796 ("SCUMM: COMI: Object label line printed on the wrong spot"). It tries to apply the correct fix that we already have in SmushFont::drawStringWrap() to "normal" (non-Smush) blast strings.
2021-08-15 15:48:32 +02:00
Torbjörn Andersson
81f26dd9e4 SCUMM: Workaround for bug #12734
In Monkey Island 2, after Rapp gives you his map piece it calls
script-109 to print a message about which map piece you just found.
But as soon as that message is displayed, it's erased by printing a
single space.

This wouldn't normally be much of a problem, but apparently in the
"ultimate talkie" version you will still hear the spoken line. This is
my attempt at bypassing the erasing.

I don't dare to patch the script itself, because I'm guessing all the
messages are hard-coded so it would have to recognize every
localization. Instead, it checks if a single space is printed from the
appropriate script, while there is a message pending and you are
carrying Rapp's map piece. I hope that's specific enough.
2021-07-27 20:55:05 +02:00
Orgad Shaneh
2602d0fe8e SCUMM: Fix encoding for Hebrew dialogs
Like Pause dialog.
2021-07-22 00:06:25 +03:00
Torbjörn Andersson
49b58ae946 SCUMM: Clarify Indy 3 Mac text position hack
The text positions for the books in Indy 3 Mac only need to be adjusted
when using the low-resolution font. When using the Mac font, it works as
intended without changes.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson
61dbbb2d72 SCUMM: Disable text position corrections for Indy 3 Mac in hi-res mode
The text rendering isn't pixel perfect compared to the original, but I
actually think ScummVM looks better. Maybe the original draws one
character at a time without compensating for when the character width
isn't even? That might account for text being slightly wider in the
original.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson
81ad3a9cf9 SCUMM: Honor the _keepText flag when creating the Indy 3 Mac text box
Sometimes more than one piece of text is drawn to the same box, and we
don't want to clear the old text then.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson
cfe270c8af SCUMM: Render the Indy 3 Mac text box to a separate surface.
There's still the matter of exactly when the text box should be created
(sometimes text is drawn to it in several steps, and we don't want to
erase the old text), and when/how to remove the box.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson
9d2d6b60c8 SCUMM: Some more work on the Indy 3 Mac text box.
I'm starting to reconsider the exact way I'm doing this, so this is a
good place to commit what's there, before tearing it up.
2021-06-30 14:59:55 +02:00
sluicebox
674ed112aa JANITORIAL: Update more old bug tracker numbers
I missed the six digit ones and a few others in:
93eeffc84d
2021-06-09 14:28:52 -06:00
Torbjörn Andersson
27420f78d4 SCUMM: Simplified Mac font rendering
Instead of trying to keep track of the real Mac screen coordinates in
the _charset data type, use the original 320x200 coordinates and only
scale up at the time of rendering.

Either way, the output is not pixel perfect, and this is much less error
prone.

Now if only text removal worked correctly...
2021-05-17 18:44:29 +02:00
Torbjörn Andersson
819cfb8383 SCUMM: Initial work on Mac Loom font renderer
The main purpose of this set of changes is to refactor the code to make
it easier to pass the name of the Macintosh resource file to other parts
of the engine (it used to be hard-coded in the music players), and to
scale-up the graphics by 2.

The actual font rendering is almost completely broken.
2021-05-17 18:44:29 +02:00
wonst719
7ac29d2dcd SCUMM: Fix HashMap usage in Korean translation code 2021-05-16 21:09:24 +09:00
Orgad Shaneh
3e27d24994 SCUMM: Fix calculation of arrow position on Hebrew
The text buffer starts on the i offset. This was overlooked in the original
patch.

This amends commit 89c5cd5e5d.
2021-03-31 02:03:21 +03:00
Orgad Shaneh
89c5cd5e5d SCUMM: Simplify and optimize calculation of left position in Hebrew
Control characters are already handled in getStringWidth. There is no
reason to copy the entire string for stripping them.
2021-03-25 08:28:19 +02:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
athrxx
9b582ce0c5 SCUMM: (LOOM) - fix bug no. 11480
(Loom (VGA) - Graphical glitches where some text appears over previous line and the wood musical note disappear)

The glitch is caused by a workaround in ScummEngine::actorTalk(). Removing it will make the original bug (speech animations for empty text strings) reappear. I have located the code which prevents that in LOOM DOS EGA disasm and added that. The FM-Towns versions don't have such code, but I do not get that weird speech animations either. So it seems to be fixed in a different manner there...
2021-02-28 21:00:23 +01:00
athrxx
80f79d21c9 SCUMM: (FM-Towns) - fix graphics glitch
In certain situations a string rect could get restored twice, e. g. LOOM, dragon's lair, when double clicking the gold pile and then pressing Esc.
2021-02-28 21:00:23 +01:00
Vladimir Serbinenko
5c91fb8d6a SCUMM: Support Lokalizator plugin.
This was used by Russian translation of Pajama Sam 2 and Spy Fox 3
2020-12-07 23:01:38 +01:00
athrxx
1af3e4ef35 SCUMM: (FT) - fix minor actor text positioning glitch 2020-12-04 00:02:32 +01:00
athrxx
4e2122cff2 SCUMM: Revert 873efee47f
The patch no longer works and actually causes slightly incorrect text display in COMI, because the strings in language.tab are not 100% identical with the resource strings.
2020-12-02 19:45:06 +01:00
athrxx
b91f4e3e4e SCUMM: fix warning (unused var) 2020-11-21 13:59:46 +01:00
wonst719
4f31022bb0
SCUMM: Implement language bundle for Korean fan translation (#2620) 2020-11-15 15:45:07 +09:00
wonst719
b99a748b4e SCUMM: Add comment for Korean postposition handling 2020-11-10 01:10:09 +09:00
wonst719
1ce198f06b SCUMM: Replace Scumm::checkHangul() with Scumm::checkKSCode()
- the two functions were identical
2020-11-10 01:10:09 +09:00
wonst719
f468db1c63 SCUMM: Guard Korean postposition code against existing code 2020-11-08 13:34:44 +09:00
wonst719
7a2a0542fc SCUMM: Support variation of Korean postpositions 2020-11-06 19:35:12 +01:00
wonst719
9a54c220c4 SCUMM: Enable basic Korean fan translation 2020-11-06 19:26:50 +01:00
athrxx
7b3b47024b SCUMM: (COMI/CJK) - fix blast text shading and positioning
- COMI adds a y-Offset of 2 in CJK mode.
- The shadowed glyphs are used for all CJK font drawing, not only Korean. Also, the char height has to be adjusted by one pixel for the shadow.
2020-10-24 17:58:29 +02:00
athrxx
c5216c6367 SCUMM: (DIG/CJK) - add specific text positioning fix from disasm
This is basically a hack, but the original does it just like that. It ensures that certain CJK message strings at the bottom of the screen won't get cut off.
2020-10-24 17:58:29 +02:00
athrxx
afef3d71cb SCUMM: (DIG/CJK) - fix blast text rendering and positioning
- fix getStringWidth()
- fix string translation
- skip special newline character when drawing text
2020-10-24 17:58:28 +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
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
BLooperZ
441e73bf58 SCUMM: do not reverse strings in HE 2020-06-11 21:10:30 +02:00
BLooperZ
fdeffa1a32 SCUMM: fix loop counter type 2020-01-01 20:28:56 +02:00
BLooperZ
b7275be051 SCUMM: use reliable types in fake bidi 2020-01-01 20:28:56 +02:00
BLooperZ
f13c76fec9 SCUMM: move comment to more appropriate location 2020-01-01 00:31:21 +01:00
BLooperZ
cbcb36ac61 SCUMM: add more comments 2020-01-01 00:31:21 +01:00
BLooperZ
c10ed91c3e SCUMM: avoid allocating large buffers on stack 2020-01-01 00:31:21 +01:00
BLooperZ
a96b82203b SCUMM: add comments and fix formatting 2020-01-01 00:31:21 +01:00
BLooperZ
e411a539cb SCUMM: use memset for initialization 2020-01-01 00:31:21 +01:00
BLooperZ
2105313d8b SCUMM: remove forced right-to-left mode 2020-01-01 00:31:21 +01:00
BLooperZ
800ea6fb15 SCUMM: fix formatting 2020-01-01 00:31:21 +01:00
BLooperZ
0af04124c8 SCUMM: export fakeBidi to function 2020-01-01 00:31:21 +01:00