Commit Graph
111 Commits
Author SHA1 Message Date
sluicebox ae5db52c2e SCI: Remove speed test detector
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.
2022-12-21 12:26:51 -08:00
sluicebox e09010f7d8 SCI: Restrict kGetEvent throttling to fast cast mode
In 2010 a 10 ms delay was added to every kGetEvent call to prevent
maxing out the CPU when some games display message boxes:
b0b4ddcc52

This rapid kGetEvent polling is called fast cast and it only exists in
SCI1.1 games and some SCI1 games. It occurs in an inner loop when the
fast cast global is set.

Now the workaround is only applied to fast cast games and only when the
kGetEvent polling occurs.

Removing this 10 ms delay from every SCI16 game cycle doesn't change
game speed by itself because the larger dynamic throttling in
kGameIsRestarting has been absorbing the 10 ms. But this does make the
other throttles easier to understand and work with, and solves minor
edge cases where delays from multiple kGetEvent calls add up.
2022-08-02 17:23:34 -04:00
sluicebox ea48986006 SCI: Disable speed tests with script patches
Disables SCI16 speed tests with generic script patches.

- All games now pass their speed tests, and consistently.
- Handles games/versions that the benchmarking heuristic misses.
- Fixes bug #13529 (speed test overflow on fast CPUs) on all games.
- Replaces most game-specific patches.

I've left the benchmarking heuristic so that any game or version that
still needs patching will still be handled with unthrottling.
2022-06-06 17:20:58 -04:00
sluicebox 3c3ed549f1 SCI: Disable JONES speed test
Fixes bug #13529
2022-06-03 12:00:58 -04:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 940c7bfc14 SCI: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Kawa c22e8ebfd0 SCI: fix full view remap effect (#1432) 2018-12-03 22:31:23 +02:00
Willem Jan Palenstijn 65861bb914 SCI: Change workaround for PalVary / Animate race condition
The new approach is to delay kAnimate briefly (with an 68ms timeout)
while there is a zero-tick PalVary running, so that it has time to
trigger.

The previous workaround would immediately process a zero-tick
PalVaryInit/PalVaryReverse. This caused problems in QfG3 (bug #10304)
where it interfered with PalVaryPause.

The previous workaround could also be modified to handle pause/resume,
but this new approach should be closer to SSCI's behaviour, which used a
timer for a zero-tick PalVary too.

This fixes bug #10304, and keeps #5298 fixed too.
2018-04-22 22:54:18 +02:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Colin Snover 6290f1e5fc SCI: Add prefix to global variable constants 2016-09-29 19:39:16 -05:00
Colin Snover b5d0fffb8b SCI: Replace magic numbers for globals with named constants 2016-09-29 19:39:16 -05:00
Martin Kiewitz 82165bb6f6 SCI: Improve kAnimate fastcast detection, Remove EQ1 hack
- Add "kAnimate fast cast state" to "version" debug command
- Make it possible for script patcher signatures to get fully
used outside of the regular script patcher
- Remove previous fastcast detections and replace them with
a signature heuristic
- Remove object name checking, when fastcast global is set
- Heuristic detects "fast cast" support incorrectly for multilingual
KQ5, but it seems the game never sets the global, so it won't
matter. KQ5 CD (also SCI1 late) has fastcast support.
- Remove hack in GfxView::draw
- Add lots of comments to ScriptPatcher class

This fixes EcoQuest 1 Floppy showing the anemone on top of the
message box (see bug #5170)
2016-02-23 20:17:18 +01:00
Alexandre Detiste 6c298e964f JANITORIAL: Typos detected with lintian & grep 2016-02-15 18:27:02 +01:00
Johannes Schickel daa8d57a86 ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. 2014-05-27 02:04:07 +02:00
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis 46ebf37ec9 SCI: Change wording for bug/further info references 2013-04-27 14:04:27 +03:00
Filippos Karapetis 2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Filippos Karapetis 513d0be106 SCI: Merged all the code to get/set the NS rect 2011-10-19 20:29:05 +03:00
Max Horn 88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Matthew Hoops eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5 1e68000def SCI: Added a new console command, "animate_list" or "al"
This shows the current animation list, along with object properties,
positions and the scripts they belong to
2011-03-20 04:10:29 +02:00
Willem Jan Palenstijn bc48b124f0 SCI: Change workaround for hoyle3-demo's rendering order
This behaviour much more closely matches SSCI.
2011-03-02 00:48:21 +01:00
md5 72f65b3946 SCI: Renamed SCI_VERSION_1_EGA to SCI_VERSION_1_EGA_ONLY
This renaming allows us to better distinguish that this version is for games
that only had an EGA version, and avoid confusion with newer SCI1 game releases
with EGA graphics (e.g. KQ5 EGA). The only game with this SCI version is QFG2,
a SCI1 EGA game with a parser. Also, added some games for each SCI version.
2011-02-27 16:48:53 +02:00
md5 67aee1ebd8 SCI: Slight cleanup in the animate code 2011-02-26 05:19:11 +02:00
Matthew Hoops 336186900d SCI: Don't name a variable the same as its function
Silences a gcc warning
2011-02-23 13:01:01 -05:00
md5 5c9b1e6cbd SCI: Added a workaround for bug #3036763 - "HOYLE3 Demo: Bad Dialog Priorities" 2011-02-23 13:36:31 +02:00
md5 a01395bb45 SCI: Cleaned up and segmented the animate code in order to make it a bit more readable 2011-02-23 13:28:17 +02:00
Filippos Karapetis 1528a3d904 SCI: A more efficient solution for bug #3037874 (SCI high CPU usage), which will hopefully
not clash with the speed throttler. This is a more proper fix for bug #3058865, and a
partial fix for bug #3127824

svn-id: r55046
2010-12-26 15:28:02 +00:00
Martin Kiewitz bd7d9965e9 SCI: removing unneeded call
was a left-over from debugging

svn-id: r53857
2010-10-26 20:56:55 +00:00
Martin Kiewitz d078a4d235 SCI: fix gfx issues when giving out cards hoyle4
bit 2 actually triggers special drawing of cels in sierra sci

svn-id: r53855
2010-10-26 20:19:17 +00:00
Martin Kiewitz 9af803f575 SCI: kAnimate bit 2 is hoyle 4 exclusive
adjusted comments about that and also renamed the bit, also added additional TODO, because hoyle 4 has special code that gets into action, when bit 0 is not set, but bit 2 is

svn-id: r53853
2010-10-26 16:21:00 +00:00
Martin Kiewitz a877ba0026 SCI: little cleanup kAnimate
svn-id: r53852
2010-10-26 15:29:04 +00:00
Martin Kiewitz f9cb635b58 SCI: fixing bug #3091767 by reverting r52820
interpreters should get checked for that hoyle 4 code, comment added

svn-id: r53851
2010-10-26 14:42:24 +00:00
Martin Kiewitz adcab043a2 SCI: fix comment in kAddToPic
svn-id: r53828
2010-10-25 16:33:04 +00:00
Martin Kiewitz b581a866a9 SCI: fixing obvious kAddToPic regression
caused by r53068, triggered bug #3092840 (SQ5 genetix lab scaled incorrectly when laying course) - thx to digitall for bisect

svn-id: r53775
2010-10-24 21:49:22 +00:00
Max Horn 7642cd002a SCI: Fix warning about uninitialized variable
svn-id: r53140
2010-10-10 22:25:30 +00:00
Martin Kiewitz 6798b01569 SCI: add global scaling again to kAddToPic
fixes regression of r52887 - lb2 actors not scaled correctly bug #3083577

needs to get backported

svn-id: r53068
2010-10-08 10:35:25 +00:00
Martin Kiewitz 7105e294e2 SCI: little optimization in kAddToPic
definitely save to backport, belongs to r52887

svn-id: r52888
2010-09-25 19:43:36 +00:00
Martin Kiewitz 18cd3333c0 SCI: changes to kAddToPic
kAddToPic doesnt do loop/cel fixups, it also doesnt support global scaling and will only set nsRect on scaled Cels, not reusing fill() of kAnimate anymore, but doing those things separately

fixes kq6 - 2nd window shown instead of peppermint bush (bug #3070465)

should be save to backport

svn-id: r52887
2010-09-25 19:28:56 +00:00
Lars Skovlund 0e86f6aa61 Make r52818 general on trunk
svn-id: r52820
2010-09-20 18:45:52 +00:00
Lars Skovlund bd9f9bb06e SCI: Handle bit 2 of scaleSignal by not updating nsRect values when
it's set. Currently game-specific for Hoyle4; fixes bug #3038424. But
other SCI1.1 games should be tested with a general version of this to
see whether it fixes relevant bugs.

svn-id: r52818
2010-09-20 18:31:59 +00:00
Martin Kiewitz d5d5dde56b SCI: dont do global scaling on non-scaleable views
lb2floppy: scripts get confused in the rat scene, when scaleX/Y are set with applied global scaling. This results in kInitBresen to get called almost endlessly, which results in ego slowing down to a crawl and not being able to reach the upper right exit - fixes bug #3050606

svn-id: r52559
2010-09-05 12:55:15 +00:00
Filippos Karapetis 9096848e4b SCI: Throttle the invocations of Engine::shouldQuit()
SCI constantly invoked Engine::shouldQuit(), which in
turn called 2 virtual functions. This added a significant
overhead, as this was called constantly without any
throttling whatsoever. Now, the invocation of shouldQuit()
is throttled to be on each frame update (i.e. at a rate of
60fps). Thanks to wjp for profiling this.

svn-id: r52431
2010-08-29 00:39:33 +00:00
Martin Kiewitz 6de3b6c55c SCI: adding detection for freddy pharkas "fred"
fixes blop not appearing during intro song, because game thought we were too slow (bug #3051514)

svn-id: r52392
2010-08-25 17:49:03 +00:00
Martin Kiewitz 06139e2be7 SCI: properly doing kAnimate loop/cel fixing
really weird, but it works now. Bug #3037578 (kq5 trunk), bug #3043286 (lb1 knight)

svn-id: r52007
2010-08-11 21:47:44 +00:00
Martin Kiewitz 7e3b2bedb6 SCI: revert r51969
broke laura bow 1, need to figure out whats exactly wrong

svn-id: r52004
2010-08-11 21:16:45 +00:00
Martin Kiewitz ab35ae03c3 SCI: kAddToPic only wrote nsRect in sci1.1
fixes regression of r51952 and bug #3042957

svn-id: r51971
2010-08-11 12:01:56 +00:00
Martin Kiewitz 42c3cc4c08 SCI: kAnimate invalid loop/cels now correctly fixed
fixes kq5 trunk getting closed again during intro - is actually a script bug that sets cel to some really high number - bug #3037578, may also fix other similar issues

svn-id: r51969
2010-08-11 05:20:29 +00:00
Martin Kiewitz a201b2e506 SCI: kAddToPic(list) set fixed priority flag
svn-id: r51954
2010-08-10 17:16:38 +00:00