Commit graph

526 commits

Author SHA1 Message Date
Torbjörn Andersson
0ffe2ada11 SCUMM: Allow more than one Mac font
Indiana Jones and the Last Crusade uses two fonts, thoug at the moment
it uses the wrong font during the intro. I'm not sure why.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson
0c3872d515 SCUMM: Use the mixer's mutex in Player_AD
This is one of the players that has had problems with deadlocks
recently. I'm not very well versed in threaded programming, but arthxx
has promised to fix up some more players later. This one was used as
proof of concept because it deadlocks a lot.
2021-06-24 20:38:38 +02:00
sluicebox
8e1d90f8e4 ALL: Remove clearAllDebugChannels() from Engine dtors 2021-06-14 12:42:38 -05: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
athrxx
d099ed5047 SCUMM: (FM-TOWNS) - make scrolling more smooth for fast platforms
The engine now measures whether it can perform one screen update within a 60Hz tick. Unfortunately the calls to OSystem::updateScreen() may take very long, depending on the backend and the filter setting. In this case the engine will start to catch up to the current frame. It should still look fine, unless the platform is way too slow for the selected filter setting (with the wrong settings it is not too difficult to achieve OSystem::updateScreen()  durations of over 100ms).
2021-05-28 20:26:28 +02:00
athrxx
78de93126f SCUMM: (FM-TOWNS) - optimize drawing code
("drawing" in this case means the data conversion and transfer from the gfx layers to the screen buffer)

From my measuring experiments in the MSVC debugger this speeds up the drawing 2 - 3 times. Not sure about release builds, whether these profit even more.
2021-05-24 03:34:49 +02:00
ysj1173886760
17efb68cba SCUMM: move debug channels to metaEngineDetection 2021-05-22 01:34:57 +02:00
athrxx
fb8f108402 SCUMM: (FM-Towns) - improve smooth scroling
I have made the scrolling more smooth and still hopefully managed not to break the sync with the engine (which really is a bit tricky).
I've tested playing the ZAK and LOOM intros and also walking around in ZAK and MI2, since there are some good test cases there. I've also compared all these side by side with the UNZ emulator.
2021-05-17 20:02:24 +02:00
Torbjörn Andersson
70a36d6b71 SCUMM: Use high-resolution cursor for Mac Loom 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
Orgad Shaneh
dd88556a0c SCUMM: Fix autosave
Autosave was centralized in 30d34fa63d, but
SCUMM engine was left behind.

Bugreport #12026
2021-05-01 11:30:45 +03:00
Zvika Haramaty
a1f440c073 SCUMM: FM-TOWNS: Add optional trimming to 200 pixels height
Trimming the screen to 200 pixels allows using aspect ratio correction.
2021-04-20 23:56:39 +02:00
athrxx
ca6db6e409 SCUMM: (IMUSE/Amiga) - ignore Roland GS setting for Amiga driver
(Fix for bug no. 12374 - the invalid GS setting would cause a nullptr deref)
2021-04-10 16:02:05 +02:00
D G Turner
a404c80d41 SCUMM: Fix Memset on Non-Trivial Structure GCC Compiler Warnings 2021-03-24 23:23:46 +00:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
athrxx
4f9ae442d5 SCUMM: (FM-TOWNS) - add smooth scrolling
This is mostly based on ZAK and MI2 disasm (and a bit LOOM). For MI1 and INDY4 I have at least checked with the FM-Towns UNZ emulator to ensure that they actually have the smooth scrolling.

The smooth scrolling is a bit tricky with regard to the timing. The scrolling tends to be a bit too slow for the engine, since it happens at a speed of 1 pixel per 60Hz tick, while the engine sometimes writes one or more new 8 pixel strips at the same time. So the scrolling often has to catch up to the engine. The original has a compensation mechanism which I tried to adapt. We'll see if it needs more fine tuning...

The Loom intro even glitches in the UNZ FM-Towns emulator due overflowing the scrolling surface (and causing a wraparound). But I made a fix for that.

Since we do have a bug report about the speed of the ZAK intro (and the new scrolling code does affect the timing) I have run the ZAK intro in ScummVM and in the FM-Towns UNZ emulator (with i80386DX, 16 MHz setting) side by side and they seem totally in sync. If I reduce the MHz setting in the emulator to 10 MHz on the emulator the intro will play slower, but still not play through the whole song. With 8 MHz I get close to finishing the song, but this seems to be almost to slow to run the game properly. So I'll leave that bug ticket open...
2021-02-11 20:01:24 +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
wonst719
d2aedb650b SCUMM: Cleanup Korean Multi-font code
- Remove unused code
- Fix uninitialized variables
2020-11-17 03:06:21 +09:00
wonst719
4f31022bb0
SCUMM: Implement language bundle for Korean fan translation (#2620) 2020-11-15 15:45:07 +09:00
wonst719
7a2a0542fc SCUMM: Support variation of Korean postpositions 2020-11-06 19:35:12 +01:00
wonst719
345771f574 SCUMM: Add multi-font support for Korean fan translated games 2020-11-06 19:29:47 +01:00
aryanrawlani28
29ceb07959 ENGINES: ALL: Revert detection submodule to be directly present in the engine directory
- DETECT_OBJS are present and added inside an engine's modules.mk file.
2020-10-03 14:56:36 +02:00
aryanrawlani28
8189a05316 ENGINES: ALL: Adapt to changes for new plugins by defining a new detection module
For each engine:
- Make a new folder detection
- Move detection-related files inside the folder
- Add a new module "enginename/detection"
- Add DETECT_OBJS here
- Adjust the normal engine module to remove detect_objs
- Adjust every file for the new changes.
2020-10-03 14:56:36 +02:00
aryanrawlani28
4c1a03845f SCUMM: Refactoring, remove detection.o dependency from modules.
- Move detection code used by createInstance & MetaEngine to a common header - detection_internal.h
- Move steam-related method & table to detection_steam.h
- More info in comments.
2020-10-03 14:56:36 +02:00
aryanrawlani28
df03b319fb SCUMM: GUI: U32: Use more translations 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
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
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
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
mataniko
06242a712b JANITORIAL: Rename EVENT_RTL
Now that ScummVM is adding RTL support, the EVENT_RTL should be disambigious that it is for returning to launcher
2020-05-12 10:36:38 +02:00
Henrik "Henke37" Andersson
95f4144190 SCUMM: Use baseclass runDialog & always pause _splayer
Part of the PauseToken refactoring. Needs checking that pausing _splayer is the correct action for all types of pauses.
2020-05-10 23:39:31 +02:00
mataniko
e85e6cf846 SCUMM: Fix MM NES palette and colors
Also adds an optional more natural palette as a game option
2020-05-03 01:11:13 +02:00
Paul Gilbert
45cda9db22 SCUMM: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
athrxx
01f99f1a0a SCUMM: imuse driver directory cleanup
- move mac, pc speaker and fm-towns ims sound drivers into separate directory

(AdLib and MT32/GM drivers are still too entangled with common code to be moved so easily, especially MT32/GM. It would require lots of changes to the common code and possibly to all engines using the MidiDriver class. So I leave that for now.)
2019-07-14 21:45:43 +02:00
athrxx
d1b64aab0c SCUMM: (iMuse/Amiga) - improve accuracy
This fixes the issue that some rhythm instruments didn't receive correct notes. The changes have been limited to the Amiga versions.
2019-07-14 21:45:29 +02:00
athrxx
0899ecc987 SCUMM: hook up Amiga MI2 + INDY4 to new sound driver 2019-07-14 20:56:27 +02:00
Torbjörn Andersson
1e23d43006 SCUMM: Silence GCC memset() warnings
Recent GCC versions complain if you memset() a class or struct that
contain non-POD data types. Get around that by either initializing
the object when created, or by adding a reset() method.
2019-07-14 14:58:19 +03:00
Robert Crossfield
71172add9c SCUMM: Original V0-V2 flashlight shape and size for MM/Zak (#10947, #10951) 2019-05-05 15:41:20 +03:00
Adrian Frühwirth
8cb0109b40 SCUMM: Improve autosave handling
v5+ scripts can request saving/loading of savegames, this type of
savegame is internally called a "temporary" savegame
(_saveStateTemporary == true) which is invisible to the user (I'm not
sure whether this is by design or not).

Currently the savegame handling in scummLoop_handleSaveLoad() doesn't
distinguish between such temporary savegames and normal autosaves and
unconditionally resets _lastSaveTime (even after loading).
This has the unwanted side effect of potentially delaying the creation
of normal autosaves which are supposed to be created in accordance with
the autosave period setting in the GUI.

This commit makes sure that _lastSaveTime only gets updated if and only
if saving a (non-temporary) autosave.
2018-05-10 17:51:30 +00:00
nukeykt
e5bfead345 SCUMM HE: Use Miles AdLib driver 2018-02-04 12:56:06 +01:00
Colin Snover
51329c0dc6 ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
Colin Snover
64191781b5 SCUMM: Fix compilation on systems without USE_RGB_COLOR 2017-10-07 13:09:07 -05:00
Colin Snover
432fd522d2 ENGINES: Remove default1x scaler flag
This flag is removed for a few reasons:

* Engines universally set this flag to true for widths > 320,
  which made it redundant everywhere;
* This flag functioned primarily as a "force 1x scaler" flag,
  since its behaviour was almost completely undocumented and users
  would need to figure out that they'd need an explicit non-default
  scaler set to get a scaler to operate at widths > 320;
* (Most importantly) engines should not be in the business of
  deciding how the backend may choose to render its virtual screen.
  The choice of rendering behaviour belongs to the user, and the
  backend, in that order.

A nearby future commit restores the default1x scaler behaviour in
the SDL backend code for the moment, but in the future it is my
hope that there will be a better configuration UI to allow users
to specify how they want scaling to work for high resolutions.
2017-10-07 12:30:29 -05:00
Ben Castricum
6f38c1e55d ALL: game state => saved game 2016-11-29 20:15:20 +01:00
Eugene Sandulenko
cce8885b39 SCUMM HE: Hid noisy Moonbase AI warnings under debug channel 2016-11-20 23:38:33 +01:00
Ben Castricum
940bb41526 SCUMM HE: Compensate timers for pauses, fixes bug #6352 2016-08-30 09:09:21 +02:00
Eugene Sandulenko
52abd69551 SCUMM: Use more portable rounding function 2016-07-19 16:22:59 +03:00
Robert Crossfield
67071b42bc SCUMM: Maniac V0: Implement 'simulator' for CPU lag (as the original engine occasionally ran at less than 60Hz). Fix call to 'getClosestPtOnBox', whcih was being passed X * V12_X_MULTIPLIER and Y * V12_Y_MULTIPLIER, but the box coordinates, where not 2016-07-19 20:39:58 +10:00
Kirben
87c5540c2a SCUMM HE: Update sound flags and queue, for new settings. 2016-06-22 11:45:44 +10:00
Eugene Sandulenko
36526cb27b SCUMM HE: Moved Moonbase to ScummEngine_v100he 2016-05-26 21:30:02 +02:00