This restores kGetEvent throttling (10ms delay) during inner loops that
don't throttle themselves. For example, the event processing loop in
Dialog:doit doesn't include a kWait(1) call in some games.
In these games, dialogs max out CPU, and if they run animations then
they run too fast. This happens in the CD version of JONES, bug #14020.
I had considered doing something like this earlier, but it wasn't clear
how to best detect these loops. What I didn't realize is that the SCI32
code already does this by counting kGetEvent calls in between kFrameout.
Now that technique is adapted for SCI16. Combined with the existing
"fast cast" detection, this throttles event-polling inner loops while
keeping the kGetEvent and kGameIsRestarting throttling separate so that
they don't overlap and conflict.
See: e09010f7d8
This heuristic was originally how all SCI16 speed tests were handled.
It has been gradually replaced with script patches, until all games
were patched in: ea48986006
At the time, I left this in because it had the benefit of speeding up
the SCI11 test variants so that they didn't produce a startup delay.
Now we know that this heuristic has been identifying regular rooms as
speed tests and unthrottling them too, causing unintended effects.
Some of this behavior was masked by fast-cast throttling occurring
everywhere, until: e09010f7d8
For example, the QFG1VGA Sierra logo animation changes speed and runs
very fast as soon as the sparkle is finished. The Longbow map rooms
were also detected as speed test rooms and animated too fast. Cast-less
rooms like LB2's title screen run unthrottled and consume CPU.
There are only a few SCI11 speed test rooms, so now they're explicitly
unthrottled in kGameIsRestarting with the other throttling exceptions.
Speed throttling was disabled on LONGBOW maps because they were treated
as speed tests by the heuristic in GfxAnimate::throttleSpeed. This bug
was masked by fast-cast throttling being applied everywhere, but that
was changed in e09010f7d8
Now the map rooms trigger throttling so that they don't run too fast.
But the game scripts also attempt to throttle the animations based on
speed test results, causing them to run too slow, so that's patched out.
Fixes bug #13966
This adds the existing GAMEOPTION_HIGH_RESOLUTION_GRAPHICS option to
Mac games with native fonts. Default is enabled. If disabled, then the
low resolution Mac fonts are used and the game isn't upscaled.
Even though strcpy in SegManager isn't a problem, our forbidden symbols
list being defined at preprocessor level, we won't be able to use this
name anymore.
Allows testing the speed throttler for possible improvements
and to demonstrate what it affects and what it doesn't.
`speed_throttle 0` disables kGameIsRestarting throttling.
(Except for game-specific workarounds.)
This command is possible due to several recent cleanups of other
throttling mechanisms that overlapped and were absorbed by this one.
- Skate-O-Rama (CD version) can now be completed at all game speeds.
- Removed the extra speed throttling on Skate-O-Rama. Floppy doesn't
have the timing bugs and now both versions run at normal speeds.
- Fixed the coordinate bug that made the west exit impossible at
certain game speeds.
Bugs #5514 and #11038
Prevents extra speed throttling from being applied when a script queries
the restart flag. Some rooms such as the KQ6 caves and the QFG4 caves do
this on every game cycle. In practice, this extra throttling didn't seem
to have much effect, but the intent is to only throttle game loops and
the script patches that fix inner loops.
Updated script patches to call kGameIsRestarting like game loops.
This is a mild optimization so that kGetTime only queries the time and
date when it actually uses the results. kGetTime is frequently called to
return the game time in ticks, and if each of those also calls
OSystem::getTimeAndDate() then that generates a lot of unnecessary
EventRecorder records.
Detect when kPaletteSetIntensity is called from an unthrottled
script loop and only apply speed throttling in that situation.
This fixes several slow fade-in / fade-outs such as KQ6's Sierra
logo and title screen. We've been throttling kPaletteSetIntensity
on every call, even when it was being used once per game cycle
(which our kGameIsRestarting throttling already handles) or within
kWait-throttled loops. In both cases this has added delays on top
of delays and slowed things down even further.
This change doesn't affect kGetTime results.
kGetTime has been logging its return value in debug messages as a 32-bit
value before converting down to the actual 16-bit value that's returned.
- 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.
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
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
Also gate them behind the presence of a 184.VOC resource instead of GID_CATDATE. This should not matter with regards to the remap effects -- the 2015 and 2016 demos had none, and the first that did has an unknown release status. Only the 2017 demo would fall, which would be easily fixed by dropping in a valid 184.VOC patch file.
Add support for reinitializing the mac icon bar when restarting.
Restarting runs the game's init script which calls KPlatform again.
Prior to this, restarting these games would fail an assertion.
This code is currently untestable and is almost certainly at least
partly based on guesswork & not actual reverse-engineering (as was
the case for all other pre-2015 SCI32 code), so future developers
interested in adding SCI32 Mac support should use it only as an
intermediate reference rather than as known good code.
In the DOS interpreters, this function is a no-op. Lighthouse calls
it regardless of platform, so dummy it out for non-Windows
platforms. This is not known to address any particular issue, and
is really just to eliminate the warning about an unknown
configuration setting when starting Lighthouse in a manner that is
compatible with the original interpreter.
This is not known to fix any particular issue, but the game does
set some flags internally if it's running in 256-color Windows,
which is possibly undesirable since we do run 16-bit videos
regardless.
This fixes missing playback of some videos in Rama, like the
background video that plays when selecting an email at the
computer at the start of the game.