Commit graph

262 commits

Author SHA1 Message Date
Filippos Karapetis
05cae5caf4 SCUMM: More cleanup and fixes for the MI1SE audio code 2025-01-07 03:38:03 +02:00
AndywinXp
bc8e3b5280 SCUMM: MI1SE: Implement speech playback
What is now missing is the delay time between phrases.
Some of the code will be refactored, since this was
hacked in for mantaining compatibility with stuff outside
of MI1:SE.
2024-12-29 22:05:02 +01:00
AndywinXp
92d487bfd8 SCUMM: MI1SE: Implement speech entry matching code from disasm 2024-12-29 14:28:34 +01:00
Filippos Karapetis
e859f4118c SCUMM: More work on the MI1 and MI2 remastered speech
- Injected the audio code in the correct place (displayDialog), from
  disasm provided by @AndyWinXP (thanks!)
- Added support for multiple speech files for the same message
- Added game flag to MI1SE, for using remastered audio
2024-12-25 13:45:44 +02:00
athrxx
b3baa636ee SCUMM: whitespace 2024-11-23 23:11:51 +01:00
athrxx
1c629d4c0d SCUMM: fix invalid mem access (bug no. 15507) 2024-11-17 18:57:03 +01:00
AndywinXp
9f319cdd86 SCUMM: Add Mac screen implementation for remaining LEC games
This adds optional EPX scaling and 640x480 resolution for
LucasArts Macintosh games other than Indy3 and Loom.

This includes:
* Monkey Island 1
* Monkey Island 2
* Indy4
* Day of the Tentacle
* Sam&Max
* Full Throttle
* The Dig

In doing this, I reverted the ugly code which previously offset
the game screen 20 pixels below (to create an internal 320x240
buffer, instead of 320x200). Instead of just offsetting mouse
coordinates and the final screen texture, I used to offset the
in-engine graphics elements. Ew.

This ensures flawless savegame compatibility between old and
new, without touching anything.
2024-10-28 08:24:59 +01:00
AndywinXp
67b0440ad0 SCUMM: MI1 (Mac): Implement EPX scaling and a stub for the menu 2024-10-28 08:24:59 +01:00
Vladimir Serbinenko
e4595172d5 SCUMM: Set the correct encoding for Simplified Chinese
Big5 aka Windows950 is only for Traditional Chinese. Simplified one
uses EUC-CN/Windows936

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
2024-09-16 22:14:56 +03:00
Hubert Maier
370064f93f JANITORIAL: SCUMM: Fix typos 2024-09-16 01:55:26 +03:00
AndywinXp
354a11880a SCUMM: MI1 (SegaCD): Fix typo which broke text wrapping
Closes #15368:
"SCUMM: MONKEY1: Text regression in SegaCD cutscenes"

Shame on me :-) I should have tested the game for more than
the intro cutscene ;-)
2024-09-14 10:00:30 +02:00
Donovan Watteau
28891948d6 SCUMM: Backport a small enhancement from the Japanese Indy3 FM-TOWNS release
One of the tunnels in the catacombs has no object description at all, in some
Indy3 releases. This was fixed in the Japanese FM-TOWNS release, but not in
the English FM-TOWNS release (this, among other differences between the two
releases, makes me think that the Japanese release actually benefited from
some late fixes).

This is a very minor issue, but since it's trivial to fix it, and since LEC
decided that it was worth a bugfix themselves, let's do it too.
2024-08-31 09:34:45 +02:00
Donovan Watteau
1f8b5439dc SCUMM: INDY3 (VGA DE): Update workaround comment for the latest convertMessageToString() changes 2024-08-29 13:32:19 +02:00
AndywinXp
df622224db SCUMM: INDY3 (German): Set invalid control code workarounds as enhancements 2024-08-27 22:46:23 +02:00
AndywinXp
aa296eac73 SCUMM: Fix behavior of bad control code in handleNextCharsetCode() 2024-08-27 22:44:12 +02:00
AndywinXp
7832eb4291 SCUMM: HE: Avoid erroring out on invalid control codes
This now mirrors the original.
2024-08-12 14:09:20 +02:00
AndywinXp
03d1631b63 SCUMM: Avoid erroring out on invalid control codes
This matches the actual behavior from every SCUMM version.
This should properly fix the crashes in #1675 and #2715.
2024-08-12 13:31:41 +02:00
AndywinXp
1379807833 SCUMM: v0: Fix regression of last letter of verb missing
Also remove a leftover debug comment
2024-08-11 14:16:09 +02:00
Donovan Watteau
853c0a9894 SCUMM: Improve Trac#1675 and Trac#2715 bugfixes for German Indy3
- Fix an off-by-one in resStrLen() return value, and apply its workaround
  for Trac#2715 too.
- Merge the two convertMessageToString() workarounds into a single one,
  and fix another off-by-one in the Trac#1675 case.
- Restrict both workarounds to the German release of Indy3 (DOS release
  checked against my own copy, Amiga release tested by gabberhead).
- Restrict both workarounds to the two rooms using the wrong byte for the
  German Eszett character -- but don't limit it to a particular script
  number, because the faulty lines can be triggered by some global scripts
  too (e.g. highlighting a dialogue option).

This should fix the following problems:

- the use-case in Trac#2715 still triggering a fatal "string escape
  sequence 32 unknown" error in convertMessagetoString(), when one
  highlights the "Woher weiß ich, daß SIE kein Spion sind?" line.
- the missing full stop at the end of the "…irgendwo hier im
  Schloß." line from the drunk guard.
2024-08-11 11:40:25 +02:00
AndywinXp
0f87863c7b SCUMM: MANIAC/ZAK (C64): Make screen layout pixel-perfect
This closes and fixes #11971:
"SCUMM: MANIAC/ZAK C64: GUI & dialog text are incorrectly
positioned on screen, and cursor is improperly layered"

The ticket also mentions improperly layered cursor:
"the pointer cursors pass *behind* the various character sprites
on screen", but there's really nothing we can do about it,
our cursor handling is way too different to function like the original
(and anyway, it looks like a severe C64 hardware limitation quirk...)
2024-08-11 00:09:33 +02:00
Torbjörn Andersson
eb375c897b SCUMM: Silence GCC calloc() warnings
It shouldn't matter, but it's the second parameter to calloc() that's
the element size, not the first one.
2024-07-27 10:49:30 +02:00
athrxx
5c71c1c87b SCUMM: (DIG) - fix bug no. 15025
(Sentence line font has wrong colors)

I am not sure if that is all the ticket is about, but that's at least how I
understand it.
2024-05-07 21:06:28 +02:00
athrxx
3afaca351a SCUMM: (DIG) - fix regression 2024-05-07 19:26:06 +02:00
AndywinXp
8fe0f93630 SCUMM: Rename CHARSET_1() to displayDialog()
We are now using a name which respects the coding
guidelines and also reflects how the actual function was
named.
2024-04-28 19:59:30 +02:00
athrxx
6857eb56ba SCUMM: (LOOM/EGA/AMIGA) - add missing shadow mode
(bug no. 15030)

I have verified that neither the FM-Towns versions nor
INDY3 VGA have that mode. I don't know about Indy 3 EGA
(I presume not, but it would be worth checking).

I have verified (as can be seen in the ticket) that the original
seems to glitch on that new shadow mode in varying ways.
I haven't found the cause of it yet (current state of guessing:
glitchy text mask). And I am not sure if we need to replicate
the glitch, anyway...
2024-03-20 23:26:09 +01:00
athrxx
acd5c7f249 SCUMM: fix warning
(misleading indentation)
2024-03-11 21:00:29 +01:00
athrxx
41f11b8da9 SCUMM: fix/silence various coverity warnings 2024-03-11 20:44:18 +01:00
athrxx
9d914bc6f6 SCUMM : string code cleanup
(move huge special purpose code blob to extra
function)
2024-03-11 20:44:11 +01:00
Torbjörn Andersson
fb2bd1166d SCUMM: Split up gfx_mac.cpp into new macgui directory
The Mac GUI code is getting unwieldy, and this is an attempt at breaking
it up into more manageable chunks.
2023-12-22 15:09:06 +01:00
AndywinXp
bd22763cdc SCUMM: MACGUI: Implement correct video size for Mac v3 games
This commit brings games to 640x480 (from 640x400).
All old savegames are compatible and are brought up to date in
real time.
2023-12-03 21:03:59 +01:00
Torbjörn Andersson
6848116b9c SCUMM: Remove unnecessary calls to mac_drawIndy3TextBox() 2023-11-23 15:23:20 +01:00
Torbjörn Andersson
2935f247c3 SCUMM: Add Mac GUI slider widget
This is the first, and so far only, widget that doesn't correspond
directly to a single dialog item. Instead, it combines two picture
widgets (which are made invisible to keep them out of the way), neatly
solving my problem with keeping track of the background under the slider
handle.

Also rewrote the Mac dialog event loop for better accuracy (it is now
possible to click and hold down the mouse over a widget, move the mouse
out of it, and then move it back it again), and - hopefully - improved
flexibility.

Plus some other minor cleanups along the way.
2023-11-18 18:47:39 +01:00
Torbjörn Andersson
5f51200454 SCUMM: Move Indy 3 Mac text box drawing into MacIndy3Gui 2023-11-18 18:47:39 +01:00
Torbjörn Andersson
ec1ab82283 SCUMM: Initial work on a common MacGui class that handles Mac menus etc.
This will be used for Last Crusade and Loom. Loom is currently the more
broken of the two, though.
2023-11-18 18:47:39 +01:00
AndywinXp
ad2542a922 SCUMM: INDY4 (DOS/Mac Jap): Implement horizontal scrolling bar for long strings in dialog choices
This should be the last thing missing for our complete support of this version.
2023-11-12 21:00:12 +01:00
AndywinXp
a7cf349bf8 SCUMM: MI1 (SegaCD JAP)/INDY4 (DOS/Mac Jap): Fix multline text rendering
My intuition for MI1 Jap was correct, but the code had to be moved elsewhere.
This as a bonus finally yields pixel perfect positioning for text for INDY4 as well.
2023-11-12 15:57:19 +01:00
AndywinXp
82818aa260 SCUMM: HE: Fix trailing spaces behavior in savegame strings
Taken from disasm.
2023-11-12 11:25:36 +01:00
AndywinXp
7758097918 SCUMM: Fix Japanese strings handling for all platforms
This fixes some nasty text rendering issues in MI1 SegaCD and
INDY4 DOS/Mac Japanese versions, in which 2-byte characters
treated as separate one byte characters, and therefore any '@'
character would be treated as an escape char.
2023-11-11 21:35:43 +01:00
AndywinXp
8461f25218 SCUMM: Rename enhancementClassActive to enhancementEnabled 2023-11-08 11:46:06 +01:00
AndywinXp
d5fa7aeb90 SCUMM: Mark all enhancements with their respective classes 2023-11-08 11:46:06 +01:00
Torbjörn Andersson
44b7558756 SCUMM: Remove Indy 3 Mac hacks that are no longer needed 2023-10-16 17:40:29 +02:00
AndywinXp
6da4114418 SCUMM: HE (Sound): Fix subtitles behaviour 2023-08-18 22:20:45 +02:00
AndywinXp
d6812afea7 SCUMM: HE: Remove leftover comment 2023-08-18 22:20:45 +02:00
AndywinXp
26b6a9d6ef SCUMM: HE (Sound): Reimplement support for Lokalizator.big files 2023-08-18 22:20:45 +02:00
AndywinXp
815e280da4 SCUMM: HE (Sound): Implement software mixer for all the other games
Sound now appears to play correctly for all HE games.
2023-08-18 22:20:45 +02:00
AndywinXp
9f89e3e823 SCUMM: HE (Sound): Finish wiring up high level functions
Everything is wired up... except the mixer, hence no sound.
2023-08-18 22:20:45 +02:00
AndywinXp
f4455e773e SCUMM: Relabel part of the general sound code
Albeit not 100% necessary for rewriting the HE sound engine,
I decided to make this change in order to:
- Give proper meaning to magic numbers and variables
  which were given temporary names 20 years ago;
- Avoid going insane when making comparison with HE code
  and ours, when rewriting the sound code.
2023-08-18 22:20:45 +02:00
Vladimir Serbinenko
b06893a692 SCUMM: Support extracting resources from macbinary 2023-05-10 22:44:04 +02:00
AndywinXp
ac506478d9 SCUMM: Fix string wrapping regression caused by Sega CD changes 2023-02-26 15:11:01 +01:00
AndywinXp
182ce944a5 SCUMM: MI1 (Sega CD): Implement correct text centering routine
...this was painful to research. Check the comment on string.cpp for a detailed
explaination on how text centering supposedly works on this particular version.
This fixes the biggest issue of #10447, but there are still things left to do about it.
2023-02-19 20:23:07 +01:00