Commit Graph
205 Commits
Author SHA1 Message Date
AndywinXp 58185c5654 SCUMM: SMUSH: Extend dynamic video framerate changes to all games
This has been verified from disasm, and also removes the need for
another old workaround.
2023-01-15 22:20:01 +01:00
AndywinXp 9e7e6a08b2 SCUMM: INSANE/SMUSH: Implement video file dependent frame rate
In FT and DIG demo, video files have the correct frame rate encoded in the FLU header.
This fixes bug #14029.
2023-01-15 14:39:33 +01:00
AndywinXp 468dd3ab4d JANITORIAL: SCUMM: Reword SMUSH codec comment 2023-01-04 22:09:52 +01:00
AndywinXp a6500c009d JANITORIAL: SCUMM: Clean-up and relabel SMUSH codecs 37 and 47 2023-01-04 21:56:50 +01:00
AndywinXp c3256a614a SCUMM: DIMUSE: Make engine sample rate and feed size parametric 2023-01-02 22:55:26 +01:00
BLooperZ 8cfec8a3c9 SCUMM: Reuse bomp decoder for SMUSH RLE codec 2022-12-26 20:28:54 +01:00
AndywinXp 92454c2c0c SCUMM: SMUSH: Relabel codecs 1, 3 and 20 2022-12-21 19:58:17 +01:00
Eugene Sandulenko fb7095f5a4 COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
BLooperZ 8f9d49960a SCUMM: Align variable name styling in codec47 2022-11-18 13:53:12 +01:00
BLooperZ fe15712547 SCUMM: relabel codec47 initialization 2022-11-18 13:53:12 +01:00
Le Philousophe 137b51d7ac SCUMM: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
AndywinXp a7a4d9f120 SCUMM: DiMUSE: Implement antiskip system for devices with slow load times
This code is present in all the original interpreters using Digital iMUSE, and it was implemented
in order to allow slower CD drives to fetch new data without having music skipping during load times.
This works by basically flooding the music buffer with data whenever a big resource, a voice file, or
a SMUSH movie is loaded.
Arguably this is not needed for devices using SSD drives, but since this change had its benefits on a
quite old laptop of mine, and since the memory overhead is very minimal, I have decided to implement it.
2022-10-04 11:34:14 +02:00
AndywinXp 8356072add SCUMM: GUI: Fix a color glitch when loading a game during a SMUSH movie 2022-09-08 19:10:42 +02:00
AndywinXp ddb54b30a4 SCUMM: GUI: Implement saving and loading routines for the old style menu 2022-09-08 19:10:42 +02:00
athrxx 3d39d206ee SCUMM: replace strcpy calls with Common::strlcpy
This replaces every single strcpy call in the engine with
Common::strlcpy.

Some of these might cases seem a bit pointless, but it is
supposed to discourage future use of strcpy. If people don't
see a single occasion of it they might think twice before they
use it...
2022-08-27 13:08:38 +03:00
Donovan Watteau 4ec06a2bf6 SCUMM: Unify WORKAROUND usage and complete/tweak some of them 2022-08-07 17:24:27 +02:00
AndywinXp fabaeb4b83 SCUMM: COMI: Implement original GUI 2022-08-06 13:33:56 +02:00
Eugene Sandulenko b49a5d8866 SCUMM: Fix clashing overridden methods 2022-05-29 17:22:47 +02:00
AndywinXp d82c3cea5f SCUMM: SMUSH/INSANE: Call resetAudioTracks() in the correct places (fix #13476) 2022-05-19 13:51:59 +02:00
Le Philousophe f1fa5d9826 SCUMM: SMUSH: Fix AmigaOS4 build 2022-04-17 12:42:07 +02:00
Andrea Boscarino 024aa1f22b SCUMM: SMUSH: Implement audio sub-engine 2022-04-16 23:25:31 +02:00
Andrea Boscarino 6fdab6d7f7 SCUMM: SMUSH: Replace DiMUSE magic numbers with constants 2022-04-09 19:41:50 +02:00
Andrea Boscarino ba0cbd2dc8 SCUMM: add support for FT with the new text handling 2022-04-08 19:53:44 +02:00
athrxx acb665c109 SCUMM: (SCUMM7/8) - cleanup (text) verb drawing and Hebrew right-to-left drawing
(SCUMM7/8 only)
2022-04-08 19:53:44 +02:00
athrxx d9ca128863 SCUMM: (SCUMM7/8) - implement right alignment flag for text
The original has it, although it isn't used. It is not meant for right to left languages, it just right-aligns left-to-right texts. Since I'll only use it for Hebrew I have to upgrade it a bit...
2022-04-08 19:53:44 +02:00
athrxx de4513cdff SCUMM: (SCUMM7/8) - implement original text formatting flags for more flexibility 2022-04-08 19:53:44 +02:00
athrxx f5f49d1b3f SCUMM: (SCUMM7/8) - improve ingame text wrapping and positioning for DIG and COMI
This fixes a couple of regressions (mostly camera related). For DIG it seems that the older version of the interpreter uses CharsetRenderClassic type text display while the newer version uses COMI style. I stick with the COMI style, but with the necessary tweeks to make it pixel perfect for all versions.

COMI (I've tested English and Chinese) seemed to be pixel perfect without having to do much, same for DIG Chinese (new interpreter version). Even the verbs seem to be fine, although I haven't changed anything there yet (applies to COMI only afaik, I think DIG doesn't have text verbs).

DIG English (old interpreter version) is another matter. That one wraps text quite differently. Our version looked quite different from the original. But now it also seems to be fine. I even fixed a weirdo problem with the character width (It seems that the fonts have some kerning data; if we use that like we did the 'a' character gets displayed too narrow by 1 pixel. So all lines containing 'a' characters were slightly off). I have examined several strings in several camera settings for pixel perfect drawing in DIG and all seems good now...

FT: I'll do that separately. I haven't even checked if it needs any fixing. Maybe it is fine already. But it sure would be nice to get rid of any redundancies...
2022-04-08 19:53:44 +02:00
athrxx 37e58e8420 SCUMM: (SCUMM7/8) - minor fix to string escape code handling
(the old values do not get restored)
2022-04-08 19:53:44 +02:00
athrxx 0256e92c25 SCUMM: (SCUMM7/8) - reorganize font rendering - second part
- Attach actor talk texts to the appropriate text renderer and get rid of redundant code.
- Cleanup subtitle text handling.
- Fix handling of ^codes.
- Fix more regressions from last commit.
- Correct some x/y positioning.
2022-04-08 19:53:44 +02:00
athrxx 1f56132725 SCUMM: (SCUMM7/8) - reorganize font rendering - first part
(inspired by PR 3276 - this here has the desired effect, but actually allows the removal of hacks, workarounds and redundancy code instead of adding more of that sort)

The purpose is to have the same accurate font rendering that we already have in the Smush code also for the ingame texts. The original interpreters draw the text like that, so this is not a weirdo invention of mine.

This is still broken. The main purpose was to get as much code done as necessary to have it at least compile again and correctly run the Smush texts.

The rest still needs quite some work...
2022-04-08 19:53:44 +02:00
Andrea Boscarino 1d20d016ad SCUMM: SMUSH: Stop channel handles when stopping a video
This has been thoroughly tested with all SCUMM 7-8 games:
- FT (full and demo) and DIG (demo) now exhibit the expected behaviour from the interpreters: when finishing or skipping a video, audio does not continue to play for a period of time (which is, until all the channel streams are emptied out);
- DIG (full) is unaffected, it uses other audio routines (DiMUSE);
- COMI (full and demo) is unaffected, it has its own separate IACT channel handle which is already being closed correctly.
2022-02-27 23:56:47 +01:00
Eugene Sandulenko 34f96756d6 ALL: Update license in ARM assembly files too 2021-12-26 19:02:46 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Andrea Boscarino a1710c4533 SCUMM: DiMUSE: Properly implement audio handling when skipping SMUSH videos 2021-11-22 18:08:21 +01:00
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
athrxx 02bf7e0063 SCUMM: fix comment (typo/wording) 2021-08-15 00:48:34 +02:00
athrxx e39b911895 SCUMM: (COMI/CJK) - fix 1-byte-character display in Smush movies
(bug #11947 - "SMUSH text rendering differences with Korean COMI")

Turns out that the interpreter has another hack that I missed...
2021-08-14 15:24:29 +02:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
BLooperZ ad58230915 SCUMM: always enable line wrap on hebrew 2021-03-19 01:20:10 +01:00
sluicebox 93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
BLooperZ 73e8a49464 SCUMM: SMUSH: fix regression in hebrew text 2021-02-04 22:25:39 +02:00
athrxx 5fc9a43b8f SCUMM: (Smush) - cleanup text clipping
Move left side x boundary check from drawSubString() to drawStringWrap().
2020-12-04 00:02:28 +01:00
athrxx 30f4fd049e SCUMM: (SMUSH) - fix text coordinates and wrapping
Some fixes from disasm to have the text look pixel-exact like the original.

Some lines in COMI are still off a bit by 2 pixels to the left or to the right. Whilst I doubt that anyone would notice it I'll try to fix that, too.
2020-10-24 17:58:29 +02:00
athrxx 1266fdeb0d SCUMM: (COMI/CJK) - fix smush font glyph shadows
I have confirmed that this type of shadow (one shadow pixel to the left, one to the right and one to the bottom) is drawn for all CJK characters in COMI.
2020-10-24 17:58:29 +02:00
athrxx c4d3cc6c18 SCUMM: (DIG/CJK) - fix regression in text positioning
CJK text in DIG was 2 pixels off vertically due to 4b13c33b.
COMI actually has a y-offset of 2 (not 7) for CJK fonts, but it is applied at a different location.
2020-10-24 17:58:28 +02:00
athrxx 651eca6abb SCUMM: (SMUSH) - fix text flags
- Flag 8 is just for the subtitles. This is actually handled correctly in line 538/539.
- Flag 4 is for the wrapping. Most cases I have seen set both 4 and 8, so the visible changes are subtle.
2020-10-24 17:58:28 +02:00
athrxx 9ff197ef8b SCUMM: (DIG/CJK) - fix CJK Smush font drawing
- fix character spacing, vertical placement, clipping etc.
- in particular I rewrote SmushFont::drawStringWrap() and modified getStringWidth() and getStringHeight() to match COMI disasm (fully compatible with DIG, but a bit nicer)
- this actually also fixes some slightly misplaced English (or other standard font language) strings
2020-10-24 17:58:28 +02:00
athrxx 09a9f4b158 SCUMM: (DIG/CJK) - fix 'invalid escape code' error in Chinese intro
(the '^' char could occasionally appear as the second byte in a 2byte character)
2020-10-24 17:58:28 +02:00