Commit Graph
81 Commits
Author SHA1 Message Date
sluicebox fed2504257 SCI: Fix QFG1VGA PC pic window initialization
I forgot the platform test in a3c3865877

Also, a second attempt at explaining something confusing
2022-06-06 17:20:58 -04:00
sluicebox a3c3865877 SCI: Initialize pic window correctly for QFG1VGA Mac
Fixes the opening background being drawn 10 pixels too low
2022-05-20 14:20:22 -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
sluicebox 71235358e3 SCI: Set port origin to even x coordinates only
Fixes QFG1 (EGA) character allocation/stat screens drawing most of
their content one pixel to the right of where SSCI does.

Confirmed in disassembly of earliest and latest SCI16 interpreters.

This partially addresses bug #9593 regarding port drawing inaccuracies.
2021-04-08 21:01:03 -07:00
sluicebox 9982c761a2 SCI: Update all old bug tracker ticket numbers 2021-02-25 01:18:52 -08:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Martin Kiewitz 6269075ad6 SCI: fix kernelCoordinateToPriority
do not check _priorityTop. Sierra never did it (I checked all sorts
of SCI versions, kq4 early, kq5, kq6, etc.) and checking it will
cause at least a priority issue in lsl2 in room 54 (airplane that
is taking off will be drawn using priority 1 instead of 0)
2016-01-14 23:37:13 +01:00
Martin Kiewitz 72e6a9eeab SCI: some more work on 480x300 mac support 2014-11-09 12:54:41 +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
D G Turner ac4087856f ALL: Remove optimization unstable code on checking for null after new.
These issues were identified by the STACK tool.

By default, the C++ new operator will throw an exception on allocation
failure, rather than returning a null pointer.

The result is that testing the returned pointer for null is redundant
and _may_ be removed by the compiler. This is thus optimization
unstable and may result in incorrect behaviour at runtime.

However, we do not use exceptions as they are not supported by all
compilers and may be disabled.

To make this stable without removing the null check, you could qualify
the new operator call with std::nothrow to indicate that this should
return a null, rather than throwing an exception.

However, using (std::nothrow) was not desirable due to the Symbian
toolchain lacking a <new> header.
A global solution to this was also not easy by redefining "new" as "new
(std::nothrow)" due to custom constructors in NDS toolchain and various
common classes.

Also, this would then need explicit checks for OOM adding to all new
usages as per C malloc which is untidy.

For now to remove this optimisation unstable code is best as it is
likely to not be present anyway, and OOM will cause a system library
exception instead, even without exceptions enabled in the application
code.
2014-01-15 02:36:19 +00:00
Filippos Karapetis d530985a6b SCI: Avoid using g_sci for usesOldGfxFunctions() in the GfxPorts class 2013-06-21 13:19:37 +03:00
Willem Jan Palenstijn 0250fd8ee1 SCI: Fix hunk entry leak 2013-04-15 21:46:09 +02:00
Filippos Karapetis a73e3f44ad SCI: Add a workaround for the large text boxes in Freddy Pharkas CD
Fixes bug #3575276 - "SCI: Freddy Pharkas: Text sometimes drawn/erased
incorrectly"
2012-10-08 22:47:27 +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
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5 89f9c5a9c3 SCI: Moved the engine hunk pointer processing code inside the GfxPorts class
This allows us make _windowList private again
2011-03-20 15:29:12 +02:00
md5 4df049f4d7 SCI: Added a new console command "window_list" or "wl"
This can be used to see a list of the currently open windows. Also, added
a sanity check for the "al" command and performed some minor cleanup
2011-03-20 14:56:13 +02:00
md5 fd2c39591f SCI: Fixed the flashing icon bar in the Mac version of Castle of Dr. Brain
Thanks to waltervn for his work and help on this
2011-03-13 23:34:08 +02:00
Willem Jan Palenstijn 3f05221334 SCI: Always add new windows to back of list up to SCI_1_EGA_ONLY.
Confirmed this behaviour in KQ1sci, KQ4, Iceman and QfG2.
Hoyle3-demo remains an exception.
2011-03-02 23:48:57 +01:00
Willem Jan Palenstijn 1ef1f3e671 SCI: Call Graph(RedrawBox) from EndUpdate for SCI0/01
Confirmed this behaviour in KQ1sci, KQ4, Iceman, and that
it isn't present in QfG2 and KQ5CD.

This fixes the graphics glitch in KQ4 when falling down the
stairs in room 61 (#3039775).
2011-03-02 23:48:57 +01:00
Willem Jan Palenstijn 5972a6bbe9 SCI: Fix variable name 2011-03-02 08:37:22 +01: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
Willem Jan Palenstijn db536da8d3 SCI: Skip Ports when iterating over Windows in GC 2011-02-28 21:37:12 +01:00
Willem Jan Palenstijn d17a889400 SCI: Fix negative window origin alignment.
SSCI does a shr 1; shl 1 here in SetOrigin.
This fixes a crash in the ending scene of SQ3 (#3194199).
2011-02-27 18:17:22 +01:00
Matthew Hoops 7b5792d6d2 SCI: Fix window height for some Mac SCI1/1.1 games
Some games have removed the menu bar from the screen. This also fixes King's Quest V's icon bar.
2011-02-18 15:58:23 -05:00
Filippos Karapetis cf94a99bb7 SCI: Changed the bShow parameter of GfxText16:Box() into a bool
svn-id: r55179
2011-01-09 00:32:26 +00:00
Filippos Karapetis 26dfb6affa SCI: Fixed bug #3041153 - "SCI Fanmade Games: Message window glitch"
The left window dimension adjustment (rev #48772) has been moved from
GfxPorts::setOrigin() into GfxPorts::addWindow(), as the updated dimension is
later used when filling the contents of the window (apparent in some fan made
games)

svn-id: r54976
2010-12-20 15:30:31 +00:00
Martin Kiewitz eefa151d70 SCI: saving/restoring script created windows now
fixes "GfxPorts::kernelSetActive" error
based on code by [md5]

svn-id: r54012
2010-11-01 16:09:33 +00:00
Torbjörn Andersson c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Martin Kiewitz 7b8add291e SCI: multiple changes for mother goose vga
which is sci1 and sci1.1
fixes bug #3051145
- separating this mother goose from ega and sci2.1
- adding workaround when restoring saved games in these games, games try to calculate restored savedgameid instead of looking it up, we patch this code out and also set the global to the current savedgameid
- adding workaround for scripts checking savedgameid to be below 13 (our savedgameids begin at 100 now)
- changing official range for savedgameids from 1000->1999 to 100->199, otherwise mother goose would have required much larger patches and this range should be fine even if we replace savedgame dialogs later

svn-id: r52301
2010-08-23 16:33:19 +00:00
Filippos Karapetis dd1708a1f1 Reverting r52224, as it was incorrect - fanmade games use the same interpreter as normal ones, so this doesn't make sense. Added a FIXME with a description about the graphics glitch in fanmade games
svn-id: r52225
2010-08-20 15:17:19 +00:00
Filippos Karapetis 273a9eb036 SCI: Fixed bug #3041153 - "SCI Fanmade Games: Message window glitch"
svn-id: r52224
2010-08-20 12:24:48 +00:00
Martin Kiewitz f8697e20b5 SCI: now reusing window ids on kNewWindow
sq4cd recreates the inventory window several times, but also reuses old window ids, causing kernelSetActive errors. fixes bug #3044757

svn-id: r52079
2010-08-14 08:03:32 +00:00
Martin Kiewitz 512bf22af6 SCI: adding workaround for camelot during ending
fixes bug #3044734
also fixing heap corruption during the ending

svn-id: r52077
2010-08-14 06:05:54 +00:00
Martin Kiewitz 6181241f57 SCI: extending life of port for sq4 gum wrapper
fixes bug #3044507

svn-id: r52068
2010-08-13 18:25:16 +00:00
Martin Kiewitz a06dcea2e5 SCI: kDisposeWindow changes
kDisposeWindow doesn't free windows immediately anymore. We free them after some calls to kSetPort, so the handle will be valid for a short time. Fixes sq4cd and hoyle 4 (commented out patching of script for hoyle 4)

svn-id: r51932
2010-08-08 18:26:40 +00:00
Martin Kiewitz 753c431937 SCI: adding script patching
including a patch for hoyle 4 and commenting out the workaround code inside kDisposeWindow

svn-id: r51795
2010-08-06 18:54:58 +00:00
Martin Kiewitz c71f1f1612 SCI: actually enable hoyle 4 workaround
and adding additional comment

svn-id: r51754
2010-08-05 07:54:33 +00:00
Martin Kiewitz 1b69257654 SCI: changing hoyle 4 workaround
fixing hoyle 4 detection entry (not a demo)
adding direct selector fix, maybe we should replace this later with a script patch
adding detailed comment about the issue

svn-id: r51753
2010-08-05 07:49:19 +00:00
Filippos Karapetis 624107319e SCI: Fixed an off-by-one error in GfxPorts::getPortById() and moved the error checking code outside the function. Also fixed script bug #3039305 - "HOYLE4: segfault"
svn-id: r51733
2010-08-04 12:41:00 +00:00
Martin Kiewitz 2e11c1cf96 SCI: reset ports when restoring
fixes qfg3/fairy tales restoring (bug #3035626)
also fixes ScummVM menu restoring while a window is shown (e.g. sq5)

svn-id: r51712
2010-08-03 19:43:16 +00:00
Martin Kiewitz 512fec56c7 SCI: adding offTop = 0 for mother goose sci1.1
fixes graphics in that game

svn-id: r51643
2010-08-02 18:04:23 +00:00
Martin Kiewitz 97b1cd34cf SCI: sci1.1 priority bands now changing in kDrawPic
fixes qfg3: right guard on top of the palace having wrong priority
fixes sq5 and all sorts of sci1.1 games: when loading wrong priority for some actors that fixed itself after one frame

svn-id: r51397
2010-07-27 23:20:43 +00:00
Filippos Karapetis 9da4c3f883 SCI: Some cosmetic changes to the warning thrown when fixing invalid windows
svn-id: r51306
2010-07-26 09:18:04 +00:00
Martin Kiewitz 32c81fa918 SCI: fixing kNewWindow (SCI1.1)
check differently for null restoreRect, fixes pq3 some windows not getting fully removed
calling showBits on actual dims and not on restoreRect, fixes lb2 about window issues (and possible qfg1vga window issues as well)

svn-id: r51204
2010-07-23 12:37:58 +00:00
Martin Kiewitz e857cc623e SCI: added comment - lsl5 also has too large windows
svn-id: r50450
2010-06-28 16:35:20 +00:00
Filippos Karapetis e6a9a9da82 Silenced a false positive in MSVC about a potentially uninitialized variable
svn-id: r50392
2010-06-27 20:22:09 +00:00
Max Horn 6ee82a2027 SCI: Introduce SciGameId enum
svn-id: r50273
2010-06-25 16:16:29 +00:00